diff options
| author | Nsable-sh <nsable-sh@noreply.git.bitflash.network> | 2026-08-11 09:31:58 -0300 |
|---|---|---|
| committer | Nsable-sh <nsable-sh@noreply.git.bitflash.network> | 2026-08-11 09:31:58 -0300 |
| commit | 034bc9a9497a336239aadb2e52d620661e90e536 (patch) | |
| tree | 8d1f49d16111817b85212b721e36c42823d32157 /docs/utxo-commitment.md | |
| parent | 33554d8989d49a7a8d9580c187e4ade58a65b98b (diff) | |
tools: add UTXO inclusion proofs
Diffstat (limited to 'docs/utxo-commitment.md')
| -rw-r--r-- | docs/utxo-commitment.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/utxo-commitment.md b/docs/utxo-commitment.md index ddf5450..991e5d9 100644 --- a/docs/utxo-commitment.md +++ b/docs/utxo-commitment.md | |||
| @@ -54,6 +54,20 @@ SHA256("BTFNODE1|" || left_hash || right_hash) | |||
| 54 | 54 | ||
| 55 | The final hash is the UTXO-set root. | 55 | The final hash is the UTXO-set root. |
| 56 | 56 | ||
| 57 | ## Inclusion Proofs | ||
| 58 | |||
| 59 | After a root has been computed, `scripts/prove-utxo.py` can create a compact | ||
| 60 | inclusion proof for one unspent output: | ||
| 61 | |||
| 62 | ```bash | ||
| 63 | python3 scripts/prove-utxo.py TXID:VOUT --out utxo-proof.json --json | ||
| 64 | python3 scripts/verify-utxo-proof.py utxo-proof.json | ||
| 65 | ``` | ||
| 66 | |||
| 67 | The verifier does not need local block files. It recomputes the target leaf, | ||
| 68 | walks the sibling path, and compares the result with the expected root. See | ||
| 69 | [UTXO inclusion proofs](utxo-proofs.md). | ||
| 70 | |||
| 57 | ## Deterministic Output | 71 | ## Deterministic Output |
| 58 | 72 | ||
| 59 | `--json` and `--out` write canonical JSON with sorted keys, fixed separators, | 73 | `--json` and `--out` write canonical JSON with sorted keys, fixed separators, |