Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: connect the musig2 withdrawal test to regtest #85

Closed
Closed
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
41 changes: 28 additions & 13 deletions docker-compose-via.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ services:
bitcoin-cli $${RPC_ARGS} -rpcwallet=Alice sendtoaddress $${TEST_ADDRESS} 300
echo "Sent 300 BTC to TEST_ADDRESS: $${TEST_ADDRESS}"

echo "TEST_ADDRESS_2: $${TEST_ADDRESS_2}"
bitcoin-cli $${RPC_ARGS} -rpcwallet=Alice sendtoaddress $${TEST_ADDRESS_2} 300
echo "Sent 300 BTC to TEST_ADDRESS_2: $${TEST_ADDRESS_2}"

echo "VERIFIER_1_ADDRESS: $${VERIFIER_1_ADDRESS}"
bitcoin-cli $${RPC_ARGS} -rpcwallet=Alice sendtoaddress $${VERIFIER_1_ADDRESS} 300
echo "Sent 300 BTC to VERIFIER_1_ADDRESS: $${VERIFIER_1_ADDRESS}"
Expand All @@ -62,6 +66,14 @@ services:
bitcoin-cli $${RPC_ARGS} -rpcwallet=Alice sendtoaddress $${VERIFIER_3_ADDRESS} 300
echo "Sent 300 BTC to VERIFIER_3_ADDRESS: $${VERIFIER_3_ADDRESS}"

echo "BRIDGE_ADDRESS: $${BRIDGE_ADDRESS}"
bitcoin-cli $${RPC_ARGS} -rpcwallet=Alice sendtoaddress $${BRIDGE_ADDRESS} 300
echo "Sent 300 BTC to BRIDGE_ADDRESS: $${BRIDGE_ADDRESS}"

echo "BRIDGE_ADDRESS_TEST: $${BRIDGE_ADDRESS_TEST}"
bitcoin-cli $${RPC_ARGS} -rpcwallet=Alice sendtoaddress $${BRIDGE_ADDRESS_TEST} 300
echo "Sent 300 BTC to BRIDGE_ADDRESS_TEST: $${BRIDGE_ADDRESS_TEST}"

bitcoin-cli $${RPC_ARGS} generatetoaddress 6 $${ALICE_ADDRESS}

RAW_DESCRIPTOR=$$(bitcoin-cli $${RPC_ARGS} -rpcwallet=Alice getdescriptorinfo "addr($${TEST_ADDRESS})")
Expand Down Expand Up @@ -89,9 +101,12 @@ services:
environment:
- BITCOIN_DATA=/home/bitcoin/.bitcoin
- TEST_ADDRESS=bcrt1qx2lk0unukm80qmepjp49hwf9z6xnz0s73k9j56
- TEST_ADDRESS_2=bcrt1quw8xktufw6v4vjl32ledaenfzghs9ckyujcc5z
- VERIFIER_1_ADDRESS=bcrt1qw2mvkvm6alfhe86yf328kgvr7mupdx4vln7kpv
- VERIFIER_2_ADDRESS=bcrt1qk8mkhrmgtq24nylzyzejznfzws6d98g4kmuuh4
- VERIFIER_3_ADDRESS=bcrt1q23lgaa90s85jvtl6dsrkvn0g949cwjkwuyzwdm
- BRIDGE_ADDRESS_TEST=bcrt1pcx974cg2w66cqhx67zadf85t8k4sd2wp68l8x8agd3aj4tuegsgsz97amg
- BRIDGE_ADDRESS=bcrt1pu2js99s96f97ecngk8nz7hkaf7fgnjnpv8rxpaft7zd3h9q5affqdz0dch
- RPC_ARGS=-chain=regtest -rpcconnect=bitcoind -rpcwait -rpcuser=rpcuser -rpcpassword=rpcpassword
- SLEEP_SECONDS=5

Expand All @@ -107,19 +122,19 @@ services:
environment:
- POSTGRES_PASSWORD=notsecurepassword

celestia-node:
image: "ghcr.io/celestiaorg/celestia-node:v0.20.2-arabica"
container_name: celestia-node
volumes:
- type: bind
source: ./volumes/celestia
target: /home/celestia
command: celestia light start --headers.trusted-hash ${VIA_CELESTIA_CLIENT_TRUSTED_BLOCK_HASH} --core.ip validator-2.celestia-arabica-11.com --p2p.network arabica
ports:
- '26658:26658'
environment:
- NODE_TYPE=light
- P2P_NETWORK=arabica
# celestia-node:
# image: "ghcr.io/celestiaorg/celestia-node:v0.20.4-mocha"
# container_name: celestia-node
# volumes:
# - type: bind
# source: ./volumes/celestia
# target: /home/celestia
# command: celestia light start --headers.trusted-hash ${VIA_CELESTIA_CLIENT_TRUSTED_BLOCK_HASH} --core.ip consensus-full-mocha-4.celestia-mocha.com --p2p.network mocha
# ports:
# - '26658:26658'
# environment:
# - NODE_TYPE=light
# - P2P_NETWORK=mocha

volumes:
bitcoin_data:
17 changes: 16 additions & 1 deletion via_verifier/lib/via_musig2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,18 @@ reqwest.workspace = true
bitcoincore-rpc = "0.19.0"
bitcoin = { version = "0.32.2", features = ["serde"] }
musig2 = "0.2.0"
secp256k1_musig2 = { package = "secp256k1", version = "0.30.0", features = ["rand"]}
secp256k1_musig2 = { package = "secp256k1", version = "0.30.0", features = [
"rand",
"hashes",
] }
tokio = { version = "1.0", features = ["full"] }
axum = "0.6"
uuid = { version = "1.3", features = ["v4"] }
hyper = { version = "0.14", features = ["full"] }
base64 = "0.21"

[dev-dependencies]
bitcoincore-rpc = "0.19.0"


[[example]]
Expand All @@ -45,3 +50,13 @@ path = "examples/withdrawal.rs"
[[example]]
name = "coordinator"
path = "examples/coordinator.rs"


[[example]]
name = "withdrawal2"
path = "examples/withdrawal2.rs"


[[example]]
name = "withdrawal3"
path = "examples/withdrawal3.rs"
Loading