docs: restore §6 version table and fix BIP44_COIN_TYPE to 0
ElectrumX versions confirmed from purple-stack/doc/configuration.md. BIP44_COIN_TYPE corrected to 0 (mainnet) / 1 (testnet) to match Bitcoin Purple Core wallet (src/wallet/scriptpubkeyman.cpp)
This commit is contained in:
+16
-15
@@ -525,7 +525,7 @@ Modelled after the `AbstractNet` interface (see `pallectrum` for a working examp
|
|||||||
| `BOLT11_HRP` | `"btcp"` | `"tbtcp"` | LN invoice prefix |
|
| `BOLT11_HRP` | `"btcp"` | `"tbtcp"` | LN invoice prefix |
|
||||||
| `GENESIS` | `000003823f…c015` | `000002fdc3…d998` | full hashes in §2.5 / §3 |
|
| `GENESIS` | `000003823f…c015` | `000002fdc3…d998` | full hashes in §2.5 / §3 |
|
||||||
| `DEFAULT_PORTS` | `{'t':'50001','s':'50002'}` | `{'t':'60001','s':'60002'}` | |
|
| `DEFAULT_PORTS` | `{'t':'50001','s':'50002'}` | `{'t':'60001','s':'60002'}` | |
|
||||||
| `BIP44_COIN_TYPE` | **TBD / private project constant** | `1` | not registered for BitcoinPurple — see note |
|
| `BIP44_COIN_TYPE` | `0` | `1` | il core usa `0` (Bitcoin) in mainnet e `1` in testnet/regtest — vedere nota |
|
||||||
| `LN_REALM_BYTE` | `0` | `1` | LN DNS realm byte; unused while `LN_DNS_SEEDS=[]` |
|
| `LN_REALM_BYTE` | `0` | `1` | LN DNS realm byte; unused while `LN_DNS_SEEDS=[]` |
|
||||||
| `LN_DNS_SEEDS` | `[]` | `[]` | no LN seeds configured |
|
| `LN_DNS_SEEDS` | `[]` | `[]` | no LN seeds configured |
|
||||||
| `SKIP_POW_DIFFICULTY_VALIDATION` | `False` only after BTCP retarget support | `False` only after BTCP retarget support | see §7.7 |
|
| `SKIP_POW_DIFFICULTY_VALIDATION` | `False` only after BTCP retarget support | `False` only after BTCP retarget support | see §7.7 |
|
||||||
@@ -533,14 +533,15 @@ Modelled after the `AbstractNet` interface (see `pallectrum` for a working examp
|
|||||||
| `COINBASE_MATURITY` | `100` | `100` | blocks before coinbase is spendable |
|
| `COINBASE_MATURITY` | `100` | `100` | blocks before coinbase is spendable |
|
||||||
| `BLOCK_HEIGHT_FIRST_LIGHTNING_CHANNELS` | `0` | `0` | allowed from genesis if LN is enabled |
|
| `BLOCK_HEIGHT_FIRST_LIGHTNING_CHANNELS` | `0` | `0` | allowed from genesis if LN is enabled |
|
||||||
|
|
||||||
> **BIP44 coin type:** BitcoinPurple has no SLIP-0044 entry. `BTCP` at index
|
> **BIP44 coin type:** The Bitcoin Purple Core wallet (`src/wallet/scriptpubkeyman.cpp`)
|
||||||
> `183` is already assigned to Bitcoin Private, so do not reuse it for
|
> uses `coin_type = 0` on mainnet and `coin_type = 1` on testnet/regtest — the same
|
||||||
> BitcoinPurple. In Electrum constants, store the non-hardened index
|
> values as Bitcoin. The resulting mainnet derivation paths are `m/44'/0'/0'/0/*`
|
||||||
> (`0 <= value < 0x80000000`); wallet derivation code adds the hardened bit when
|
> (BIP44 P2PKH), `m/49'/0'/0'/0/*` (BIP49 P2WPKH-P2SH), `m/84'/0'/0'/0/*`
|
||||||
> building paths such as `m/44'/COIN_TYPE'/0'`. Use one project-wide provisional
|
> (BIP84 P2WPKH), and `m/86'/0'/0'/0/*` (BIP86 P2TR). BitcoinPurple has no
|
||||||
> integer until an official SLIP-0044 slot is registered. The `13496` value below
|
> registered SLIP-0044 entry; index `183` is already assigned to Bitcoin Private.
|
||||||
> is a project-local placeholder chosen to match the BTCP P2P port, not a
|
> Until an official coin type is registered, any Electrum or LND fork targeting
|
||||||
> registered SLIP-0044 value.
|
> BTCP should use `coin_type = 0` for mainnet and `1` for testnet to stay
|
||||||
|
> consistent with the core wallet.
|
||||||
|
|
||||||
### 7.2 `constants.py` Class Definitions
|
### 7.2 `constants.py` Class Definitions
|
||||||
|
|
||||||
@@ -568,8 +569,8 @@ class BitcoinPurple(AbstractNet):
|
|||||||
COINBASE_MATURITY = 100 # consensus/consensus.h:19
|
COINBASE_MATURITY = 100 # consensus/consensus.h:19
|
||||||
POW_TARGET_SPACING = 60 # 60-second blocks
|
POW_TARGET_SPACING = 60 # 60-second blocks
|
||||||
|
|
||||||
# BIP44 coin type — not registered in SLIP-0044
|
# BIP44 coin type — matches Bitcoin Purple Core (src/wallet/scriptpubkeyman.cpp)
|
||||||
BIP44_COIN_TYPE = 13496 # provisional private constant; update when registered
|
BIP44_COIN_TYPE = 0 # same as Bitcoin mainnet; no SLIP-0044 entry registered
|
||||||
|
|
||||||
# Lightning. Height 0 means "allowed from genesis" in Electrum.
|
# Lightning. Height 0 means "allowed from genesis" in Electrum.
|
||||||
BLOCK_HEIGHT_FIRST_LIGHTNING_CHANNELS = 0
|
BLOCK_HEIGHT_FIRST_LIGHTNING_CHANNELS = 0
|
||||||
@@ -637,8 +638,8 @@ class BitcoinPurpleTestnet(BitcoinPurple):
|
|||||||
|
|
||||||
### 7.3 Derivation Paths (BIP44 / 49 / 84 / 86)
|
### 7.3 Derivation Paths (BIP44 / 49 / 84 / 86)
|
||||||
|
|
||||||
Standard HD paths for each script type. Replace `COIN_TYPE` with the registered
|
Standard HD paths for each script type. The Bitcoin Purple Core wallet uses
|
||||||
value (TBD — see §7.1 note).
|
`COIN_TYPE = 0` on mainnet and `1` on testnet/regtest (see §7.1 note).
|
||||||
|
|
||||||
| BIP | Script type | Path template | xpub/xprv prefix |
|
| BIP | Script type | Path template | xpub/xprv prefix |
|
||||||
|-----|-------------|---------------|-----------------|
|
|-----|-------------|---------------|-----------------|
|
||||||
@@ -776,7 +777,7 @@ Files that must be added or changed in an Electrum fork:
|
|||||||
| `electrum/chains/bitcoinpurple/checkpoints.json` | Generate from a synced BTCP node |
|
| `electrum/chains/bitcoinpurple/checkpoints.json` | Generate from a synced BTCP node |
|
||||||
| header chain verifier | Use 120-block retarget and BTCP `powLimit` |
|
| header chain verifier | Use 120-block retarget and BTCP `powLimit` |
|
||||||
| address module | Accept Base58 versions 56/55 and Bech32 HRP `btcp` |
|
| address module | Accept Base58 versions 56/55 and Bech32 HRP `btcp` |
|
||||||
| transaction/wallet formats | Use BTCP provisional BIP44 coin type consistently |
|
| transaction/wallet formats | Use `coin_type = 0` (mainnet) / `1` (testnet), matching Bitcoin Purple Core |
|
||||||
| Lightning invoice parser | Accept `lnbtcp` / `lntbtcp` BOLT11 prefixes if LN is enabled |
|
| Lightning invoice parser | Accept `lnbtcp` / `lntbtcp` BOLT11 prefixes if LN is enabled |
|
||||||
| UI/network selector | Expose BitcoinPurple mainnet/testnet names and datadirs |
|
| UI/network selector | Expose BitcoinPurple mainnet/testnet names and datadirs |
|
||||||
|
|
||||||
@@ -926,7 +927,7 @@ fork needs equivalent new `chaincfg` / chain registry parameters.
|
|||||||
| Address params | P2PKH 56, P2SH 55, Bech32 `btcp`, WIF 183 |
|
| Address params | P2PKH 56, P2SH 55, Bech32 `btcp`, WIF 183 |
|
||||||
| Chain hash | same §8.1 wire value |
|
| Chain hash | same §8.1 wire value |
|
||||||
| Invoice HRP | `btcp` |
|
| Invoice HRP | `btcp` |
|
||||||
| Coin type | use the same provisional Electrum value until SLIP-0044 registration |
|
| Coin type | `0` (mainnet) / `1` (testnet) — matches Bitcoin Purple Core wallet |
|
||||||
| Timeout defaults | use §8.3 scaled block counts |
|
| Timeout defaults | use §8.3 scaled block counts |
|
||||||
| Fee estimator | ensure targets are interpreted as 1-minute BTCP blocks |
|
| Fee estimator | ensure targets are interpreted as 1-minute BTCP blocks |
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user