Skip to content

Commit dd49d52

Browse files
committed
docs: honest status — T18/T19/T20 deferrals, integration-layer scaffold, performance claim caveat
Append DEVIATIONS §4-§6 for the T18 node lifecycle, T19 bin wiring with clap exit handling, and T20 verification-gate scaffolds. Replace the placeholder README with a pre-alpha project overview that names the shipped architecture and the deferred "faster than Bitcoin Core" empirical validation (G14). Op: correct Restores: spec:README.md must reflect implementation state, not aspiration; DEVIATIONS.md must track deviations from PLAN.md
1 parent 61ae824 commit dd49d52

2 files changed

Lines changed: 90 additions & 8 deletions

File tree

DEVIATIONS.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,46 @@ and names `SipHash-1-3` for GCS element hashing. Bitcoin Core's
138138
The filters crate follows Bitcoin Core's vector-compatible behavior because the
139139
Task 9 acceptance test explicitly requires byte-identical filter and header
140140
matches against `bitcoin/src/test/data/blockfilters.json`.
141+
142+
## §4 — T18 node lifecycle scaffold
143+
144+
The `bitcoin-rs-node` crate landed with the lifecycle skeleton (config
145+
layering, tracing, metrics in-process, signal-bridge, graceful drain,
146+
crash-recovery sidecar) but does NOT yet construct chain / utxo /
147+
mempool / index / p2p / rpc / electrum subsystems. `EventLoop::spin`
148+
handles shutdown + tick channels only; tick handlers are stubs.
149+
Subsystem wiring lands in a follow-up.
150+
151+
- Files: `crates/node/src/{config.rs,state.rs,run.rs,event_loop.rs,crash_recovery.rs,signal.rs,shutdown.rs,logging.rs,metrics.rs,bitcoin_conf_compat.rs}`
152+
- Commit: 33333f9 + 304259f
153+
154+
## §5 — T19 bin wiring + clap exit handling
155+
156+
`bin/bitcoin-rs/src/main.rs` boots `Config::load_from_args`
157+
`node::run`. `Config::load_from_args` distinguishes `clap::Error` kinds
158+
`DisplayHelp` / `DisplayVersion` and calls `err.exit()` so `bitcoin-rs
159+
--help` and `--version` return exit code 0 — the standard clap idiom.
160+
A `utreexo` feature was added to `crates/node/Cargo.toml` as a
161+
passthrough to `dep:bitcoin-rs-utreexo` to make the bin's feature table
162+
resolvable.
163+
164+
- Files: `bin/bitcoin-rs/{Cargo.toml,src/main.rs,tests/cli_help.rs}`, `crates/node/{Cargo.toml,src/config.rs}`
165+
- Commit: 47af93b
166+
167+
## §6 — T20 gates scaffold + integration-layer deferral
168+
169+
G1..G14 acceptance tests are scaffolded under
170+
`bin/bitcoin-rs/tests/gates/`. Live-infrastructure gates (G1, G2, G3,
171+
G5, G6, G8, G9, G14) are `#[ignore]`d with run instructions in
172+
doc-comments. Wrapper gates (G4, G7, G10, G11, G12) shell out to
173+
in-tree crate tests. G13 (lints clean) is `#[ignore]`d because CI
174+
already runs clippy in a dedicated job; the gate body documents the
175+
exact invocation.
176+
177+
The `"faster than Bitcoin Core"` performance budget claim (G14) cannot
178+
be validated in-session — it requires multi-day mainnet IBD benchmarks
179+
against a reference bitcoind. The gate is scaffolded as a structural
180+
placeholder. Live infrastructure runs are operator responsibilities.
181+
182+
- Files: `bin/bitcoin-rs/{Cargo.toml,tests/gates/g{01..14}_*.rs}`
183+
- Commit: 144e2c1 + 61ae824

README.md

Lines changed: 47 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,52 @@
11
# bitcoin-rs
22

3-
Ultra-fast Bitcoin full node in Rust 2024.
3+
A Rust 2024 Bitcoin full node aiming at faster IBD and a tighter resident set
4+
than `bitcoind` while remaining consensus-compatible.
45

5-
Single binary. Native UTXO set (gocoin-shape). Embedded Electrum-style index
6-
(electrs-shape). Optional utreexo accumulator (utreexod-shape). In-process
7-
PSBT-only wallet (no private keys). In-process getblocktemplate mining.
8-
Pruning. BIP157/158 compact filters. coinstats. Four pluggable storage
9-
backends (RocksDB / MDBX / fjall / redb). SIMD JSON on the RPC hot path.
6+
## Status
107

11-
Status: in active implementation. See [`PLAN.md`](PLAN.md).
8+
**Pre-alpha scaffold.** The workspace has 18 structurally complete crates, but
9+
the integration layer (`run` loop ↔ chain ↔ utxo ↔ p2p ↔ rpc ↔ electrum) lands
10+
in following commits. Empirical "faster than Bitcoin Core" validation requires
11+
live mainnet IBD against reference `bitcoind` and is tracked as verification
12+
gates G1-G14 in `PLAN.md`.
1213

13-
License: MIT OR Apache-2.0.
14+
## Architecture highlights
15+
16+
- Consensus parity via vendored Bitcoin Core test vectors and an optional
17+
`bitcoinkernel` cross-check gate.
18+
- Four pluggable storage backends: RocksDB (default), MDBX, fjall, redb —
19+
selected at runtime via `--storage-backend`. The 4-backend equivalence test
20+
produces an identical aggregate hash on every IBD.
21+
- 256-shard arena-backed UTXO set (bumpalo + hashbrown) with snapshot format
22+
and crash-safe defrag.
23+
- Optional utreexo (Pollard + Stump + MemForest) for stateless validation.
24+
- Native Electrum-style index, BIP157/158 filters, coinstats (muhash), pruning
25+
with Core's 288-block reorg-safety floor.
26+
- PSBT-only wallet: no signing key handling, only an external signer trait.
27+
- `getblocktemplate` mining endpoint.
28+
- Sync HTTP/1.1 JSON-RPC over sonic-rs with Core-compatible method names;
29+
signing methods return -32603 "wallet has no private keys".
30+
- mimalloc global allocator and a crossbeam-channel event loop.
31+
32+
## Build
33+
34+
```sh
35+
cargo build --release --features rocksdb,fjall,redb,mdbx
36+
```
37+
38+
Feature flags: `rocksdb` / `fjall` / `redb` / `mdbx` (defaults all on),
39+
`kernel` (link against `bitcoinkernel`), `utreexo`, `prometheus-http`.
40+
41+
## Tests
42+
43+
```sh
44+
cargo test --no-default-features --features rocksdb,fjall,redb
45+
```
46+
47+
Live-infrastructure gates are `#[ignore]`d; invoke them individually with
48+
`-- --ignored` after wiring the documented environment.
49+
50+
## License
51+
52+
MIT OR Apache-2.0

0 commit comments

Comments
 (0)