feat(spv): verify the chain identity of a server on connect
After the handshake the wallet checks server.features genesis_hash and, when the profile has checkpoints, the header at the highest checkpoint not above the server's tip (mainnet shares Bitcoin's genesis, so the checkpoint is what tells the chains apart). A server on another chain is refused with WrongChainException and the next candidate is tried. Used by the GUI, peer discovery, the CLI and the server probe. See ADR 0036.
This commit is contained in:
1 parent
77f00d1b4e
commit
8bcee27c23
13 files changed
+341
-6
No files matched your search
@@ -39,6 +39,7 @@ One ADR per feature or significant design decision. Format: `template.md`. Workf
|
||||
| 0033 | [Test the UI layer and CLI headlessly, gate coverage](0033-test-strategy-beyond-core.md) | Testing | Accepted |
|
||||
| 0034 | [Bound every network request with a timeout](0034-bound-every-network-request.md) | Network | Accepted |
|
||||
| 0035 | [Cap the length of a server line](0035-cap-server-line-length.md) | Network | Accepted |
|
||||
| 0036 | [Verify the chain identity of a server right after connecting](0036-verify-chain-identity-on-connect.md) | SPV | Accepted |
|
||||
|
||||
ADRs `0002` onwards were written retroactively on 2026-11-03 from the code, comments and changelog.
|
||||
If one misstates the original reasoning, fix it in a pull request.
|
||||
Reference in new issue
Block a user