mirror of
https://github.com/bitcoin/bips.git
synced 2026-03-30 16:06:44 +00:00
BIP360: Pay to Merkle Root (P2MR) (#1670)
Review comments and assistance by: Armin Sabouri <armins88@gmail.com> D++ <82842780+dplusplus1024@users.noreply.github.com> Jameson Lopp <jameson.lopp@gmail.com> jbride <jbride2001@yahoo.com> Joey Yandle <xoloki@gmail.com> Jon Atack <jon@atack.com> Jonas Nick <jonasd.nick@gmail.com> Kyle Crews <kylecrews@Kyles-Mac-Studio.local> Mark "Murch" Erhardt <murch@murch.one> notmike-5 <notmike-5@users.noreply.github.com> Vojtěch Strnad <43024885+vostrnad@users.noreply.github.com> Co-authored-by: Ethan Heilman <ethan.r.heilman@gmail.com> Co-authored-by: Isabel Foxen Duke <110147802+Isabelfoxenduke@users.noreply.github.com>
This commit is contained in:
45
bip-0360/ref-impl/rust/README.md
Normal file
45
bip-0360/ref-impl/rust/README.md
Normal file
@@ -0,0 +1,45 @@
|
||||
|
||||
# p2mr test vectors
|
||||
|
||||
This rust project contains the test vectors for BIP-360
|
||||
|
||||
|
||||
## Run Test Vectors
|
||||
|
||||
These test vectors are being developed in conjunction with forks of [rust-bitcoin](https://github.com/jbride/rust-bitcoin/tree/p2mr) and [rust-miniscript](https://github.com/jbride/rust-miniscript/tree/p2mr-pqc) customized with p2mr functionality.
|
||||
|
||||
|
||||
1. environment variables
|
||||
```
|
||||
// Specify Bitcoin network used when generating bip350 (bech32m) address
|
||||
// Options: regtest, testnet, signet
|
||||
// Default: mainnet
|
||||
$ export BITCOIN_NETWORK=<regtest | testnet | signet >
|
||||
```
|
||||
|
||||
1. run a specific test:
|
||||
```
|
||||
$ cargo test test_p2mr_single_leaf_script_tree -- --nocapture
|
||||
```
|
||||
|
||||
## Local Development
|
||||
|
||||
|
||||
All P2MR/PQC enabled bitcoin crates are temporarily available in a custom crate registry at: `https://crates.denver.space`.
|
||||
These crates will be made available in `crates.io` in the near future.
|
||||
|
||||
Subsequently, you will need to execute the following at the root of your rust workspace:
|
||||
|
||||
```bash
|
||||
mkdir .cargo \
|
||||
&& echo '[registries.kellnr-denver-space]
|
||||
index = "sparse+https://crates.denver.space/api/v1/crates/"' > .cargo/config
|
||||
```
|
||||
|
||||
Afterwards, for all P2MR/PQC enabled dependencies used in your project, include a "registry" similar to the following:
|
||||
|
||||
```bash
|
||||
bitcoin = { version="0.32.6", registry = "kellnr-denver-space" }
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user