diff options
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, |