Compare commits
4 Commits
3f90a46fa5
...
0da9670a36
| Author | SHA1 | Date | |
|---|---|---|---|
| 0da9670a36 | |||
| b193282766 | |||
| 12881fc477 | |||
| f0654310e1 |
+112
@@ -0,0 +1,112 @@
|
||||
# Changelog — Electrum Purple
|
||||
|
||||
All notable changes to the Electrum Purple fork are documented here.
|
||||
Upstream Electrum changes are not listed; see the [upstream changelog](https://github.com/spesmilo/electrum/blob/master/CHANGELOG).
|
||||
|
||||
---
|
||||
|
||||
## [0.9.0] — 2026-05-06
|
||||
|
||||
First public release of Electrum Purple — an unofficial fork of Electrum 4.7.x
|
||||
with first-class support for the **BitcoinPurple (BTCP)** network.
|
||||
|
||||
### New network: BitcoinPurple (BTCP)
|
||||
|
||||
- Added `BitcoinPurple` and `BitcoinPurpleTestnet` network classes with all chain
|
||||
parameters: 1-minute blocks, 120-block difficulty retarget, adjusted PoW limits
|
||||
(`MAX_TARGET`, `POW_GENESIS_BITS`, `DIFFICULTY_ADJUSTMENT_INTERVAL`,
|
||||
`POW_TARGET_TIMESPAN`). (`e0d04af15`)
|
||||
- Generalized difficulty adjustment logic in `blockchain.py` to support
|
||||
per-chain PoW constants; in-chunk retarget (120-block boundary) reads headers
|
||||
from the in-RAM buffer instead of disk. (`d1088c036`)
|
||||
- Default network set to BitcoinPurple mainnet. (`8b8d958a4`)
|
||||
- `BIP44_COIN_TYPE` set to 13496 for BitcoinPurple. (`af1997438`)
|
||||
- Launch flags: `--bitcoinpurple` and `--bitcoinpurple_testnet`. (via constants)
|
||||
|
||||
### Lightning Network — block-scaled timeouts
|
||||
|
||||
- All LN timeout values expressed in blocks scaled ×10 to preserve real-world
|
||||
security windows with 1-minute blocks (e.g. `to_self_delay` 144 → 1440,
|
||||
`cltv_expiry_delta` 40 → 400).
|
||||
|
||||
### UI / branding
|
||||
|
||||
- Coin name and unit strings are now network-aware: QML and Qt GUIs display
|
||||
the correct coin name (BTCP/BTC) based on the active network. (`d51076cb0`,
|
||||
`5ddbb637f`, `029ec7ab2`)
|
||||
- All icons recolored blue → purple (hue 278°) to match BitcoinPurple branding.
|
||||
(`374d1c6b6`, `12881fc47`)
|
||||
- Desktop icon (`.ico`, `.png`) updated to purple in all sizes (16 → 256 px).
|
||||
- Qt wizard logo updated to use `electrum-purple.png`. (`63e76fb08`)
|
||||
|
||||
### Packaging and build
|
||||
|
||||
- Package renamed to `electrum-purple`; pip entry point renamed to
|
||||
`electrum-purple`. (`90f567d57`)
|
||||
- `setup.py` data files and PyInstaller spec updated for `electrum-purple`
|
||||
naming. (`55f2ba258`)
|
||||
- Broken `electrum-purple` symlink fixed (was `../run_electrum`, now
|
||||
`run_electrum`). (`4fc74d551`)
|
||||
- Desktop and metainfo files renamed to `electrum-purple.desktop` /
|
||||
`electrum-purple.metainfo.xml`. (`729a0081a`)
|
||||
|
||||
#### Windows
|
||||
|
||||
- NSIS installer script renamed to `electrum-purple.nsi`; produces
|
||||
`electrum-purple-<VERSION>-setup.exe` and `electrum-purple-<VERSION>-portable.exe`.
|
||||
(`2a7cf8278`)
|
||||
- PyInstaller spec updated: icon set to `electrum-purple.ico`, exe name to
|
||||
`electrum-purple-<VERSION>.exe`. (`55f2ba258`)
|
||||
- Docker build: added `--security-opt seccomp=unconfined` and
|
||||
`--cap-add SYS_PTRACE` to fix Wine wineserver socket failure on WSL2.
|
||||
(`f0654310e`)
|
||||
|
||||
#### Linux AppImage
|
||||
|
||||
- Build script updated: output renamed to
|
||||
`electrum-purple-<VERSION>-x86_64.AppImage`. (`1a09d60a9`)
|
||||
- `apprun.sh` corrected: launches `electrum-purple` (was `electrum`). (`7e782baa7`)
|
||||
- Desktop file and icon (`electrum-purple.png`) correctly referenced in AppDir.
|
||||
- `run_electrum` `is_local` check updated to look for `electrum-purple.desktop`.
|
||||
(`7e782baa7`)
|
||||
- type2-runtime xz pin updated. (`013d23434`)
|
||||
|
||||
#### Android
|
||||
|
||||
- Buildozer spec updated: `title = Electrum Purple`,
|
||||
`package.domain = org.electrumpurple`, `package.name = electrum_purple`.
|
||||
(`2ab945833`)
|
||||
- Java classes (`SimpleScannerActivity`, `BiometricActivity`) updated to import
|
||||
`org.electrumpurple.electrum_purple.res.R`. (`7e782baa7`)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- Fixed onion message queues: replaced `put_nowait` + `sleep` polling with
|
||||
`call_later` to eliminate busy-wait. (`9a93bfda8`)
|
||||
- Fixed flaky Lightning peer tests (retries, timeouts, MPP wait loop).
|
||||
(`49ac312c8`, `7d433d0b4`)
|
||||
- Tests now use `config.path` instead of `electrum_path` for network-aware
|
||||
temporary directories. (`5c406683b`)
|
||||
|
||||
### Tests
|
||||
|
||||
- Added full BitcoinPurple test suite: address encoding, difficulty calculation,
|
||||
header verification, retarget clamping (46 tests). (`41e4a8141`)
|
||||
- 1005 tests pass, 6 skipped (upstream suite + BitcoinPurple suite). (`f4d2d0ade`)
|
||||
|
||||
### Documentation
|
||||
|
||||
- `README.md` updated: identifies this as an unofficial BitcoinPurple fork,
|
||||
credits Davide Grilli as fork author, preserves upstream credits. (`13f8be46b`)
|
||||
- `LICENCE` updated: added Davide Grilli copyright for fork additions. (`39d65bb45`)
|
||||
- `AUTHORS` updated: Davide Grilli listed as fork author and maintainer. (`f3c376d8f`)
|
||||
- `CLAUDE.md` added with codebase and BitcoinPurple architecture documentation.
|
||||
(`88525ef51`, `7b39a89d1`)
|
||||
- `technical-data.md` added: complete BitcoinPurple parameter reference (ports,
|
||||
genesis, PoW, LN, ElectrumX). (`6db423282`, `a95945668`)
|
||||
- `quickstart.md` added (English). (`ea8f27358`)
|
||||
|
||||
### Based on
|
||||
|
||||
Electrum 4.7.x (upstream commit `bd5ac019c` — release notes 4.7.2),
|
||||
MIT Licence, © 2011-2024 Thomas Voegtlin and The Electrum developers.
|
||||
@@ -48,10 +48,10 @@ else
|
||||
info "not doing fresh clone."
|
||||
fi
|
||||
|
||||
DOCKER_RUN_FLAGS=""
|
||||
DOCKER_RUN_FLAGS="--security-opt seccomp=unconfined --cap-add SYS_PTRACE"
|
||||
if sh -c ": >/dev/tty" >/dev/null 2>/dev/null; then
|
||||
info "/dev/tty is available and usable"
|
||||
DOCKER_RUN_FLAGS="-it"
|
||||
DOCKER_RUN_FLAGS="$DOCKER_RUN_FLAGS -it"
|
||||
fi
|
||||
|
||||
info "building binary..."
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 34 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 9.7 KiB |
+27
-26
@@ -302,12 +302,6 @@ XPUB_HEADERS = {
|
||||
|
||||
## 6. ElectrumX Server
|
||||
|
||||
| Component | Version |
|
||||
|-----------|---------|
|
||||
| ElectrumX (`e-x`) | **1.18.0** — [spesmilo/electrumx](https://github.com/spesmilo/electrumx) |
|
||||
| Python (container) | **3.13.5** |
|
||||
| Base Docker image | `lukechilds/electrumx:latest` (unpinned) |
|
||||
|
||||
### 6.1 Coin Definition (`coins_btcp.py`)
|
||||
|
||||
Drop-in patch for `electrumx/lib/coins.py`. Place as
|
||||
@@ -410,7 +404,15 @@ For `servers.json`, replace `your-server.example.com` with a real DNS name or
|
||||
public IP. The current file only documents the format; it does not configure a
|
||||
real public server.
|
||||
|
||||
### 6.2 Docker Patch Snippet
|
||||
### 6.2 Tested Component Versions
|
||||
|
||||
| Component | Version |
|
||||
|-----------|---------|
|
||||
| ElectrumX (`e-x`) | **1.18.0** — [spesmilo/electrumx](https://github.com/spesmilo/electrumx) |
|
||||
| Python (container) | **3.13.5** |
|
||||
| Base Docker image | `lukechilds/electrumx:latest` (unpinned) |
|
||||
|
||||
### 6.3 Docker Patch Snippet
|
||||
|
||||
```dockerfile
|
||||
COPY electrumx-patch/coins_btcp.py /tmp/coins_btcp.py
|
||||
@@ -437,7 +439,7 @@ print('>> Patched ElectrumX with BitcoinPurple coin classes')
|
||||
PATCH
|
||||
```
|
||||
|
||||
### 6.3 Environment Variables
|
||||
### 6.4 Environment Variables
|
||||
|
||||
```env
|
||||
# ── Identity ──────────────────────────────────────────────────────────────────
|
||||
@@ -485,7 +487,7 @@ ulimits:
|
||||
hard: 1048576
|
||||
```
|
||||
|
||||
### 6.4 ZMQ Notification Ports
|
||||
### 6.5 ZMQ Notification Ports
|
||||
|
||||
These are recommended local ports if you enable ZMQ notifications. BitcoinPurple
|
||||
Core does not assign default ZMQ bind ports; the port only exists if you set the
|
||||
@@ -525,7 +527,7 @@ Modelled after the `AbstractNet` interface (see `pallectrum` for a working examp
|
||||
| `BOLT11_HRP` | `"btcp"` | `"tbtcp"` | LN invoice prefix |
|
||||
| `GENESIS` | `000003823f…c015` | `000002fdc3…d998` | full hashes in §2.5 / §3 |
|
||||
| `DEFAULT_PORTS` | `{'t':'50001','s':'50002'}` | `{'t':'60001','s':'60002'}` | |
|
||||
| `BIP44_COIN_TYPE` | `0` | `1` | il core usa `0` (Bitcoin) in mainnet e `1` in testnet/regtest — vedere nota |
|
||||
| `BIP44_COIN_TYPE` | `13496` (provisional — not SLIP-0044 registered) | `1` | matches BTCP P2P port; update when registered |
|
||||
| `LN_REALM_BYTE` | `0` | `1` | LN DNS realm byte; unused while `LN_DNS_SEEDS=[]` |
|
||||
| `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 |
|
||||
@@ -533,15 +535,14 @@ Modelled after the `AbstractNet` interface (see `pallectrum` for a working examp
|
||||
| `COINBASE_MATURITY` | `100` | `100` | blocks before coinbase is spendable |
|
||||
| `BLOCK_HEIGHT_FIRST_LIGHTNING_CHANNELS` | `0` | `0` | allowed from genesis if LN is enabled |
|
||||
|
||||
> **BIP44 coin type:** The Bitcoin Purple Core wallet (`src/wallet/scriptpubkeyman.cpp`)
|
||||
> uses `coin_type = 0` on mainnet and `coin_type = 1` on testnet/regtest — the same
|
||||
> values as Bitcoin. The resulting mainnet derivation paths are `m/44'/0'/0'/0/*`
|
||||
> (BIP44 P2PKH), `m/49'/0'/0'/0/*` (BIP49 P2WPKH-P2SH), `m/84'/0'/0'/0/*`
|
||||
> (BIP84 P2WPKH), and `m/86'/0'/0'/0/*` (BIP86 P2TR). BitcoinPurple has no
|
||||
> registered SLIP-0044 entry; index `183` is already assigned to Bitcoin Private.
|
||||
> Until an official coin type is registered, any Electrum or LND fork targeting
|
||||
> BTCP should use `coin_type = 0` for mainnet and `1` for testnet to stay
|
||||
> consistent with the core wallet.
|
||||
> **BIP44 coin type:** BitcoinPurple has no SLIP-0044 entry. `BTCP` at index
|
||||
> `183` is already assigned to Bitcoin Private, so do not reuse it for
|
||||
> BitcoinPurple. In Electrum constants, store the non-hardened index
|
||||
> (`0 <= value < 0x80000000`); wallet derivation code adds the hardened bit when
|
||||
> building paths such as `m/44'/COIN_TYPE'/0'`. Use one project-wide provisional
|
||||
> integer until an official SLIP-0044 slot is registered. The `13496` value below
|
||||
> is a project-local placeholder chosen to match the BTCP P2P port, not a
|
||||
> registered SLIP-0044 value.
|
||||
|
||||
### 7.2 `constants.py` Class Definitions
|
||||
|
||||
@@ -569,8 +570,8 @@ class BitcoinPurple(AbstractNet):
|
||||
COINBASE_MATURITY = 100 # consensus/consensus.h:19
|
||||
POW_TARGET_SPACING = 60 # 60-second blocks
|
||||
|
||||
# BIP44 coin type — matches Bitcoin Purple Core (src/wallet/scriptpubkeyman.cpp)
|
||||
BIP44_COIN_TYPE = 0 # same as Bitcoin mainnet; no SLIP-0044 entry registered
|
||||
# BIP44 coin type — not registered in SLIP-0044
|
||||
BIP44_COIN_TYPE = 13496 # provisional private constant; update when registered
|
||||
|
||||
# Lightning. Height 0 means "allowed from genesis" in Electrum.
|
||||
BLOCK_HEIGHT_FIRST_LIGHTNING_CHANNELS = 0
|
||||
@@ -638,8 +639,8 @@ class BitcoinPurpleTestnet(BitcoinPurple):
|
||||
|
||||
### 7.3 Derivation Paths (BIP44 / 49 / 84 / 86)
|
||||
|
||||
Standard HD paths for each script type. The Bitcoin Purple Core wallet uses
|
||||
`COIN_TYPE = 0` on mainnet and `1` on testnet/regtest (see §7.1 note).
|
||||
Standard HD paths for each script type. Replace `COIN_TYPE` with the registered
|
||||
value (TBD — see §7.1 note).
|
||||
|
||||
| BIP | Script type | Path template | xpub/xprv prefix |
|
||||
|-----|-------------|---------------|-----------------|
|
||||
@@ -777,7 +778,7 @@ Files that must be added or changed in an Electrum fork:
|
||||
| `electrum/chains/bitcoinpurple/checkpoints.json` | Generate from a synced BTCP node |
|
||||
| header chain verifier | Use 120-block retarget and BTCP `powLimit` |
|
||||
| address module | Accept Base58 versions 56/55 and Bech32 HRP `btcp` |
|
||||
| transaction/wallet formats | Use `coin_type = 0` (mainnet) / `1` (testnet), matching Bitcoin Purple Core |
|
||||
| transaction/wallet formats | Use BTCP provisional BIP44 coin type consistently |
|
||||
| Lightning invoice parser | Accept `lnbtcp` / `lntbtcp` BOLT11 prefixes if LN is enabled |
|
||||
| UI/network selector | Expose BitcoinPurple mainnet/testnet names and datadirs |
|
||||
|
||||
@@ -927,7 +928,7 @@ fork needs equivalent new `chaincfg` / chain registry parameters.
|
||||
| Address params | P2PKH 56, P2SH 55, Bech32 `btcp`, WIF 183 |
|
||||
| Chain hash | same §8.1 wire value |
|
||||
| Invoice HRP | `btcp` |
|
||||
| Coin type | `0` (mainnet) / `1` (testnet) — matches Bitcoin Purple Core wallet |
|
||||
| Coin type | use the same provisional Electrum value until SLIP-0044 registration |
|
||||
| Timeout defaults | use §8.3 scaled block counts |
|
||||
| Fee estimator | ensure targets are interpreted as 1-minute BTCP blocks |
|
||||
|
||||
@@ -1052,4 +1053,4 @@ COST_SOFT_LIMIT=0
|
||||
COST_HARD_LIMIT=0
|
||||
PEER_DISCOVERY=on
|
||||
PEER_ANNOUNCE=true
|
||||
```
|
||||
```
|
||||
-1048
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user