From 61e585194d5b6b090b4ba146e66fe546cca9e392 Mon Sep 17 00:00:00 2001 From: rbitcoin-grok Date: Sat, 22 Aug 2026 18:27:56 -0700 Subject: [PATCH] docs: Electrum 1.6/1.7 after P2P package relay MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit protocol_max stays 1.4.2 until BIP331 (Q-48). Then implement 1.6 (broadcast_package) and 1.7 and raise the advertised max in the same work — do not advertise a version we do not speak. --- COMPAT.md | 16 +++++++++++++++- docs/quality.md | 2 +- docs/road-to-1.0.md | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/COMPAT.md b/COMPAT.md index 5c6fd896e..691d27e8a 100644 --- a/COMPAT.md +++ b/COMPAT.md @@ -80,10 +80,24 @@ Full method list, auth, and shindex matrix: **[`docs/rpc.md`](./docs/rpc.md)**. | scripthash history / balance / listunspent | done | Unconf when mempool attached; `get_history` optional BCH-style `from_height` / exclusive `to_height` (`-1` = tip + mempool); 1-arg = full history; **subscribe status always full**; `listunspent` loads `txid.body` only for unspent creates; one TCP connection reuses the last SH outs+spent join until tip **hash** changes. Confirmed methods stamp `chain_tip` / `chain_tip_height` on the JSON-RPC object (not inside `result`). `server.features.chain_tip = true`. | | scripthash.get_mempool / subscribe | done | Status on mempool announce **and** on confirming tip when that block creates or spends the hash (posting-list probe; no Class A expand on a miss). Reorg (`TipNotify.reorg_from_height`) restatuses every watch even if the new block misses the script. Status preimage is `txid:height:blockhash:` for confirmed rows (mempool rows stay `txid:height:`). | | transaction.get / get_merkle | done | get falls back to mempool; confirmed responses stamp `chain_tip` | -| transaction.broadcast | done | Mempool accept + P2P inv | +| transaction.broadcast | done | Mempool accept + P2P inv. `broadcast_package` is Electrum **1.6** — wait for P2P package relay, then bump (below). | | relayfee / estimatefee / histogram | done | Libre min + live median | | TLS | external | terminate at reverse proxy; node is plain TCP | +### Protocol versions + +`features.protocol_max` is **1.4.2** on purpose. Electrum 4.8 wallets +speak 1.4–1.6; ElectrumX advertises 1.7. Do **not** raise the number +ahead of the methods. + +**After P2P package relay** ([`docs/quality.md`](./docs/quality.md) **Q-48** / +BIP331), implement Electrum **1.6** (`blockchain.transaction.broadcast_package`, +`mempool.get_info`, `block.headers` as a list, `server.version` first) then +**1.7** (`scriptpubkey.*`, outpoint subscribe) and raise `protocol_max` in +the same work. Dual-serve `scripthash.*` until 1.7 clients exist. RPC +`submitpackage` / Esplora `POST /txs/package` already accept packages; the +Electrum bump waits on the P2P command so 1.6 is not a lie. + ### Why `server.version` says electrs We are **not** electrs. Cake Wallet `getNodeIsElectrs()` lowercases diff --git a/docs/quality.md b/docs/quality.md index 52dd9c037..dbfc5d3bf 100644 --- a/docs/quality.md +++ b/docs/quality.md @@ -84,7 +84,7 @@ evidence (failed Core corpus, new dual path, red required CI, MSRV drift). |-----:|----|------|-----|-----------------| | 1 | **Q-30** | Continuous differential fuzz | reliability | A nightly/weekly job that feeds BIP324 + header/block (and script) wire. Crashes → `docs/external_findings/` + named regression. **Today: `fuzz/` `block_wire` + nightly `fuzz.yml` (not a required PR check).** Grow corpus / more targets. Findings 001–021 came from an external fuzzamoto campaign — that is not a substitute for the in-tree job. | | 2 | **Q-41** | Grow Core functional `run` set | test | Inventory `run` covers the wallet-client / P2P / mempool / buried-activation scripts we **claim**. **Today: 44 / 267.** COMPAT-done leftovers are `rpc-dialect` (not `rpc-missing`). Next `run` candidates: `mempool_accept` type-check, `mining_basic` weight, `rpc_getblockfrompeer`. Product-never skips stay skip. Unlabeled PRs stay cargo-only; nightly green | -| 3 | **Q-48** | BIP331 rust-bitcoin package types | interop | Native BIP331 `NetworkMessage` when rust-bitcoin exposes it (**RB-007**). Packages today are RPC `submitpackage` / Esplora `POST /txs/package` only — no private P2P command. Blocked upstream — ranked below unblocked ops work | +| 3 | **Q-48** | BIP331 rust-bitcoin package types | interop | Native BIP331 `NetworkMessage` when rust-bitcoin exposes it (**RB-007**). Packages today are RPC `submitpackage` / Esplora `POST /txs/package` only — no private P2P command. Blocked upstream — ranked below unblocked ops work. **After this:** Electrum 1.6 then 1.7 (`protocol_max` bump in the same work) — [`COMPAT.md`](../COMPAT.md) § Protocol versions | | 4 | **Q-31** | Hermetic tip fixtures | ops | Frozen signet/mainnet tip packs for offline consensus/Electrum regression (no live API). Unblocks Q-30 corpora | | 5 | **R-10** | Residual god-files | code | Peel **only** when a higher row needs a seam. After extracting `peer_tests` / `methods_tests` / `scripthash_tests`: production `query/lib` **4.2k**, `electrum/server` **3.7k**, `scripthash` **3.4k**, `sorted_run` **3.4k**, `methods` **3.3k**, `chain` **3.3k**, `store` **3.2k**. Further production peels wait for a real seam | diff --git a/docs/road-to-1.0.md b/docs/road-to-1.0.md index 79ffd3611..5853f38c2 100644 --- a/docs/road-to-1.0.md +++ b/docs/road-to-1.0.md @@ -124,6 +124,6 @@ Older-than-1.0 or corrupt files can still refuse with a one-line message. ## After 1.0 (unless it falls out earlier) -- BIP331 package relay, if rust-bitcoin still has no types (**Q-48**) +- BIP331 package relay, if rust-bitcoin still has no types (**Q-48**); then Electrum protocol 1.6/1.7 ([`COMPAT.md`](../COMPAT.md) § Protocol versions) - Tor - Publishing the store as a crate