Skip to content

Commit 84b848c

Browse files
committed
Bitcoin: document 2026-09-16 runtime hardening and verification state
1 parent a7fe333 commit 84b848c

1 file changed

Lines changed: 56 additions & 0 deletions

File tree

‎bitcoin/REVISIONS-2026-09-16.md‎

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Bitcoin Revisions — 2026-09-16
2+
3+
## Runtime and accounting hardening
4+
5+
The Bitcoin subsystem received the next planned engineering pass.
6+
7+
### Implemented
8+
9+
- Added `BitcoinRpcPolicy.java` as the central RPC and monetary-input policy.
10+
- Added an explicit allowlist for server-exposed Bitcoin Core RPC methods.
11+
- Added wallet-name validation.
12+
- Added exact BTC-to-satoshi conversion using `BigDecimal`.
13+
- Added eight-decimal-place enforcement and positive-amount checks.
14+
- Added Bitcoin address syntax validation before `sendtoaddress`.
15+
- Added validated `BITCOIN_RPC_PORT` handling.
16+
- Reworked `BitcoinBase` process execution around `ProcessBuilder`.
17+
- Added a bounded RPC process timeout.
18+
- Reduced command logging so raw command arguments are not logged.
19+
- Added `BitcoinBalanceObserver` and the `bitcoin_balance_observations` table.
20+
- Balance observations now originate from authenticated Bitcoin Core `getbalance`, not wallet-file size or filename inference.
21+
- Monetary observations are persisted as satoshis.
22+
- Wallet artifact metadata remains separate from monetary observations.
23+
- Added deterministic `BitcoinRpcPolicyTest` regression checks.
24+
- Changed the centralized Bitcoin Core installer to fail closed when SHA-256 verification data is missing or invalid.
25+
26+
## Data model
27+
28+
The Bitcoin data boundary is now explicitly separated into:
29+
30+
1. `bitcoin_wallet_artifacts` — file metadata and integrity information.
31+
2. `bitcoin_balance_observations` — authenticated Bitcoin Core monetary observations.
32+
3. `bitcoin_trade_events_v{N}` — application/session trade events.
33+
34+
A wallet file is not treated as a balance ledger.
35+
36+
## Transaction semantics
37+
38+
`BitcoinBase.send()` validates the destination and amount before requesting `sendtoaddress`. Bitcoin Core remains authoritative for final acceptance. The session command `trade btc <amount>` remains a recording-only operation and does not broadcast a transaction.
39+
40+
## Release provenance
41+
42+
The centralized Bitcoin Core installer now requires a matching SHA-256 entry before extraction or installation. Signature verification is intentionally treated as a separate trust-policy layer because signature validity depends on an operator-established trusted release-key set.
43+
44+
## Verification status
45+
46+
Source-level changes have been committed to `main`. A full repository build, full integration test run, and live Bitcoin Core regtest execution have **not** been claimed by source inspection alone.
47+
48+
## Remaining production verification
49+
50+
- Run the deterministic policy test in CI.
51+
- Run Bitcoin Core in isolated regtest.
52+
- Exercise wallet lifecycle and balance observation end-to-end.
53+
- Verify rejected RPC methods never reach `bitcoin-cli`.
54+
- Review all Bitcoin web state-changing endpoints for authenticated sessions, CSRF protection, authorization, and rate limiting.
55+
- Establish a documented trusted Bitcoin Core release-keyring policy and signature verification workflow.
56+
- Add transaction confirmation-state tracking for any future broadcast workflow.

0 commit comments

Comments
 (0)