Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,37 @@
"version": 1,
"test_vectors": [
{
"id": "p2tsh_missing_leaf_script_tree_error",
"objective": "Tests P2TSH with missing leaf script tree",
"id": "p2tr_using_v2_witness_version_error",
"objective": "Tests that a P2TR v2 scriptPubKey fails with use of witness version 2",
"given": {
"internalPubkey": "d6889cb081036e0faefa3a35157ad71086b123b2b144b649798b494c300a961d",
"scriptTree": null
},
"intermediary": {
"merkleRoot": null,
"tweak": "b86e7be8f39bab32a6f2c0443abbc210f0edac0e2c53d501b36b64437d9c6c70",
"tweakedPubkey": "53a1f6e454df1aa2776a2814a721372d6258050de330b3c6d10ee8f4e0dda343"
},
"expected": {
"scriptPubKey": "522053a1f6e454df1aa2776a2814a721372d6258050de330b3c6d10ee8f4e0dda343",
"error": "P2TR requires witness version of 1"
}
},
{
"id": "p2mr_missing_leaf_script_tree_error",
"objective": "Tests P2MR with missing leaf script tree",
"given": {
"script_tree": ""
},
"intermediary": {
},
"expected": {
"error": "P2TSH requires a script tree with at least one leaf"
"error": "P2MR requires a script tree with at least one leaf"
}
},
{
"id": "p2tsh_single_leaf_script_tree",
"objective": "Tests P2TSH with single leaf script tree",
"id": "p2mr_single_leaf_script_tree",
"objective": "Tests P2MR with single leaf script tree",
"given": {
"scriptTree": {
"id": 0,
Expand All @@ -39,8 +56,8 @@
}
},
{
"id": "p2tsh_different_version_leaves",
"objective": "Tests P2TSH with two script leaves of different versions. TO-DO: currently ignores given leaf version and over-rides. Probably better to throw error",
"id": "p2mr_different_version_leaves",
"objective": "Tests P2MR with two script leaves of different versions. TO-DO: currently ignores given leaf version and over-rides. Probably better to throw error",
"given": {
"scriptTree": [
{
Expand Down Expand Up @@ -75,8 +92,8 @@
}
},
{
"id": "p2tsh_simple_lightning_contract",
"objective": "Tests P2TSH with two script leaves that simulate a simple lightning network contract. Reference: https://github.com/bitcoin-core/btcdeb/blob/master/doc/tapscript-example-with-tap.md",
"id": "p2mr_simple_lightning_contract",
"objective": "Tests P2MR with two script leaves that simulate a simple lightning network contract. Reference: https://github.com/bitcoin-core/btcdeb/blob/master/doc/tapscript-example-with-tap.md",
"given": {
"scriptTree": [
{
Expand Down Expand Up @@ -112,8 +129,8 @@
}
},
{
"id": "p2tsh_two_leaf_same_version",
"objective": "Tests P2TSH with two script leaves of same version",
"id": "p2mr_two_leaf_same_version",
"objective": "Tests P2MR with two script leaves of same version",
"given": {
"scriptTree": [
{
Expand Down Expand Up @@ -148,8 +165,8 @@
}
},
{
"id": "p2tsh_three_leaf_complex",
"objective": "Tests P2TSH with a complex three-leaf script tree structure, demonstrating nested script paths and multiple verification options",
"id": "p2mr_three_leaf_complex",
"objective": "Tests P2MR with a complex three-leaf script tree structure, demonstrating nested script paths and multiple verification options",
"given": {
"internalPubkey": "e0dfe2300b0dd746a3f8674dfd4525623639042569d829c7f0eed9602d263e6f",
"scriptTree": [
Expand Down Expand Up @@ -194,8 +211,8 @@
}
},
{
"id": "p2tsh_three_leaf_alternative",
"objective": "Tests another variant of P2TSH with three leaves arranged in a different tree structure, showing alternative script path spending options",
"id": "p2mr_three_leaf_alternative",
"objective": "Tests another variant of P2MR with three leaves arranged in a different tree structure, showing alternative script path spending options",
"given": {
"internalPubkey": "55adf4e8967fbd2e29f20ac896e60c3b0f1d5b0efa9d34941b5958c7b0a0312d",
"scriptTree": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
"version": 1,
"test_vectors": [
{
"id": "p2tsh_missing_leaf_script_tree_error",
"objective": "Tests P2TSH with missing leaf script tree",
"id": "p2mr_missing_leaf_script_tree_error",
"objective": "Tests P2MR with missing leaf script tree",
"given": {
"script_tree": ""
},
"intermediary": {
},
"expected": {
"error": "P2TSH requires a script tree with at least one leaf"
"error": "P2MR requires a script tree with at least one leaf"
}
},
{
"id": "p2tsh_single_leaf_script_tree",
"objective": "Tests P2TSH with single leaf script tree",
"id": "p2mr_single_leaf_script_tree",
"objective": "Tests P2MR with single leaf script tree",
"given": {
"scriptTree": {
"id": 0,
Expand All @@ -40,8 +40,8 @@
}
},
{
"id": "p2tsh_different_version_leaves",
"objective": "Tests P2TSH with two script leaves of different versions. TO-DO: currently ignores given leaf version and over-rides. Probably better to throw error",
"id": "p2mr_different_version_leaves",
"objective": "Tests P2MR with two script leaves of different versions. TO-DO: currently ignores given leaf version and over-rides. Probably better to throw error",
"given": {
"scriptTree": [
{
Expand Down Expand Up @@ -77,8 +77,8 @@
}
},
{
"id": "p2tsh_simple_lightning_contract",
"objective": "Tests P2TSH with two script leaves that simulate a simple lightning network contract. Reference: https://github.com/bitcoin-core/btcdeb/blob/master/doc/tapscript-example-with-tap.md",
"id": "p2mr_simple_lightning_contract",
"objective": "Tests P2MR with two script leaves that simulate a simple lightning network contract. Reference: https://github.com/bitcoin-core/btcdeb/blob/master/doc/tapscript-example-with-tap.md",
"given": {
"scriptTree": [
{
Expand Down Expand Up @@ -116,8 +116,8 @@
}
},
{
"id": "p2tsh_two_leaf_same_version",
"objective": "Tests P2TSH with two script leaves of same version",
"id": "p2mr_two_leaf_same_version",
"objective": "Tests P2MR with two script leaves of same version",
"given": {
"scriptTree": [
{
Expand Down Expand Up @@ -153,8 +153,8 @@
}
},
{
"id": "p2tsh_three_leaf_complex",
"objective": "Tests P2TSH with a complex three-leaf script tree structure, demonstrating nested script paths and multiple verification options",
"id": "p2mr_three_leaf_complex",
"objective": "Tests P2MR with a complex three-leaf script tree structure, demonstrating nested script paths and multiple verification options",
"given": {
"scriptTree": [
{
Expand Down Expand Up @@ -201,8 +201,8 @@
}
},
{
"id": "p2tsh_three_leaf_alternative",
"objective": "Tests another variant of P2TSH with three leaves arranged in a different tree structure, showing alternative script path spending options",
"id": "p2mr_three_leaf_alternative",
"objective": "Tests another variant of P2MR with three leaves arranged in a different tree structure, showing alternative script path spending options",
"given": {
"scriptTree": [
{
Expand Down
6 changes: 3 additions & 3 deletions bip-0360/ref-impl/common/utils/signet_miner_loop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

# Invokes mining simulator a configurable number of times

if [ -z "${P2TSH_ADDR}" ]; then
echo "Error: Environment variable P2TSH_ADDR needs to be set"
if [ -z "${P2MR_ADDR}" ]; then
echo "Error: Environment variable P2MR_ADDR needs to be set"
exit 1
fi

Expand Down Expand Up @@ -33,7 +33,7 @@ for ((i=1; i<=LOOP_COUNT; i++))
do
echo "Iteration $i of $LOOP_COUNT"
$BITCOIN_SOURCE_DIR/contrib/signet/miner --cli "bitcoin-cli -conf=$BITCOIN_CONF_FILE_PATH" generate \
--address $P2TSH_ADDR \
--address $P2MR_ADDR \
--grind-cmd "$BITCOIN_SOURCE_DIR/build/bin/bitcoin-util grind" \
--poolid "$POOL_ID" \
--min-nbits --set-block-time $(date +%s)
Expand Down
6 changes: 3 additions & 3 deletions bip-0360/ref-impl/common/utils/workshop/Dockerfile.bcli
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# podman build -f Dockerfile.bcli -t quay.io/jbride2000/p2tsh_bcli:0.1 .
# podman run -it --entrypoint /bin/bash quay.io/jbride200/p2tsh_bcli:0.1
# podman build -f Dockerfile.bcli -t quay.io/jbride2000/p2mr_bcli:0.1 .
# podman run -it --entrypoint /bin/bash quay.io/jbride200/p2mr_bcli:0.1

FROM rust:1-slim-bookworm AS builder

Expand Down Expand Up @@ -28,7 +28,7 @@ WORKDIR /bitcoin

# Copy Bitcoin Core source (or clone)
# COPY . /bitcoin
RUN git clone --branch p2tsh-pqc --single-branch https://github.com/jbride/bitcoin.git
RUN git clone --branch p2mr-pqc --single-branch https://github.com/jbride/bitcoin.git

# Environment variables for musl
ENV CC=gcc
Expand Down
8 changes: 4 additions & 4 deletions bip-0360/ref-impl/common/utils/workshop/Dockerfile.full
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# podman build -f Dockerfile.full -t quay.io/jbride2000/p2tsh_demo:0.1 .
# podman run -it --entrypoint /bin/bash quay.io/jbride2000/p2tsh_demo:0.1
# podman build -f Dockerfile.full -t quay.io/jbride2000/p2mr_demo:0.1 .
# podman run -it --entrypoint /bin/bash quay.io/jbride2000/p2mr_demo:0.1

FROM rust:1-slim-bookworm AS builder

Expand Down Expand Up @@ -28,7 +28,7 @@ WORKDIR /bitcoin

# Copy Bitcoin Core source (or clone)
# COPY . /bitcoin
RUN git clone --branch p2tsh-pqc --single-branch https://github.com/jbride/bitcoin.git
RUN git clone --branch p2mr-pqc --single-branch https://github.com/jbride/bitcoin.git

# Environment variables for musl
ENV CC=gcc
Expand Down Expand Up @@ -96,7 +96,7 @@ USER bip360

WORKDIR /home/bip360

RUN git clone --no-checkout --depth 1 --branch p2tsh-pqc \
RUN git clone --no-checkout --depth 1 --branch p2mr-pqc \
--single-branch https://github.com/jbride/bips.git bips && \
cd bips && \
git sparse-checkout init --cone && \
Expand Down
2 changes: 1 addition & 1 deletion bip-0360/ref-impl/js/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ $ npx tsc


# run tests
$ node src/p2tsh-example.ts
$ node src/p2mr-example.ts
$ node src/test-npm-pqc-package.js
-----
6 changes: 3 additions & 3 deletions bip-0360/ref-impl/js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bip-0360/ref-impl/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"typescript": "^5.9.3"
},
"dependencies": {
"@jbride/bitcoinjs-lib": "^7.0.0-rc.0-p2tsh-0.0",
"@jbride/bitcoinjs-lib": "^7.0.0-rc.0-p2mr-0.0",
"@jbride/bitcoinpqc-wasm": "^0.1.1",
"ecpair": "^3.0.0",
"tiny-secp256k1": "^2.2.4"
Expand Down
Loading