diff --git a/.claude/commands/install-bitvm.sh b/.claude/commands/install-bitvm.sh index 401ab4dca..a194ed784 100755 --- a/.claude/commands/install-bitvm.sh +++ b/.claude/commands/install-bitvm.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -euo pipefail -REPO="GOATNetwork/bitvm2-node" +REPO="GOATNetwork/bitvm-node" API_URL="https://api.github.com/repos/${REPO}/releases" INSTALL_DIR="./bin" VERSION_FILE=".bitvm-version" diff --git a/.claude/commands/rpc-health-monitor.md b/.claude/commands/rpc-health-monitor.md index c740b6779..55ea3f060 100644 --- a/.claude/commands/rpc-health-monitor.md +++ b/.claude/commands/rpc-health-monitor.md @@ -84,12 +84,12 @@ Monitor goat-node RPC health by polling graph or instance status counts, node on ```bash # testnet4 public RPC python3 ./.claude/commands/rpc-health-monitor.py \ - --base-url https://bitvm2-api-testnet4.goat.network \ + --base-url https://bitvm3-api-testnet4.goat.network \ --once # override proof-builder lag thresholds and chain RPC sources python3 ./.claude/commands/rpc-health-monitor.py \ - --base-url https://bitvm2-api-testnet4.goat.network \ + --base-url https://bitvm3-api-testnet4.goat.network \ --header-chain-height-url https://mempool.space/testnet4 \ --state-chain-rpc-url https://rpc.testnet3.goat.network \ --header-chain-lag-alert-blocks 30 \ diff --git a/.env.template b/.env.template index 1489b5410..1c315f44e 100644 --- a/.env.template +++ b/.env.template @@ -1,10 +1,10 @@ RUST_LOG=debug # required -ACTOR=Challenger +ACTOR=Verifier # required -GOAT_GATEWAY_CONTRACT_ADDRESS=0xc3c2D73FB80cbc10DD85B6896e639D47ebd21B01 +GOAT_GATEWAY_CONTRACT_ADDRESS= # required GOAT_CHAIN_URL=https://rpc.testnet3.goat.network @@ -12,7 +12,7 @@ GOAT_CHAIN_URL=https://rpc.testnet3.goat.network # required PEER_KEY= -# required, operator and challenger should setup its BTC private key, committee can setup a seed string. +# required, operator and verifier should setup its BTC private key, committee can setup a seed string. BITVM_SECRET= # optional, for relayer only diff --git a/README.md b/README.md index efbd60831..6ddf509ff 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ state machines and the peg-out timelock configuration against real races and boundary conditions found in the Rust implementation. This started as an **audit pass**: the specs proved several real bugs existed and proved a correct fix design for each. **As of commit -[`991faaa`](https://github.com/GOATNetwork/bitvm2-node/commit/991faaabdb56c747103e8f1c6d6477c638ccfc4c), +[`991faaa`](https://github.com/GOATNetwork/bitvm-node/commit/991faaabdb56c747103e8f1c6d6477c638ccfc4c), all 8 of those findings have been fixed and verified in the shipped Rust code** - see `audit/TLAPlus-20260630.md` for the full report, including what each real applied fix looks like. diff --git a/audit/TLAPlus-20260710.md b/audit/TLAPlus-20260710.md index 77f4ad653..e463707df 100644 --- a/audit/TLAPlus-20260710.md +++ b/audit/TLAPlus-20260710.md @@ -1,6 +1,6 @@ # BitVM Node — Formal Verification Audit (Round 1) -**Branch:** `audit/round-1` · **Base:** `gc-v2` · **Method:** TLA+ model checking (TLC) · **Status:** all 8 formally-proven findings from this round are now **fixed and verified** in commit [`991faaa`](https://github.com/GOATNetwork/bitvm2-node/commit/991faaabdb56c747103e8f1c6d6477c638ccfc4c) ("Dev fix #418", authored independently by a teammate — not applied by this audit). Two smaller, lower-priority adjacent defects noted under Finding 8 remain open. +**Branch:** `audit/round-1` · **Base:** `gc-v2` · **Method:** TLA+ model checking (TLC) · **Status:** all 8 formally-proven findings from this round are now **fixed and verified** in commit [`991faaa`](https://github.com/GOATNetwork/bitvm-node/commit/991faaabdb56c747103e8f1c6d6477c638ccfc4c) ("Dev fix #418", authored independently by a teammate — not applied by this audit). Two smaller, lower-priority adjacent defects noted under Finding 8 remain open. ## Executive summary diff --git a/deployment/docker-compose.yml b/deployment/docker-compose.yml index f8155f5ab..3ec15d301 100644 --- a/deployment/docker-compose.yml +++ b/deployment/docker-compose.yml @@ -3,7 +3,7 @@ version: '3.8' services: committee_0: - image: ghcr.io/goatnetwork/bitvm2-node:${TAG:-0.1.0} + image: ghcr.io/goatnetwork/bitvm-node:${TAG:-0.1.0} container_name: committee_0 volumes: - ./committee_0:/var/data @@ -16,7 +16,7 @@ services: restart: unless-stopped committee_1: - image: ghcr.io/goatnetwork/bitvm2-node:${TAG:-0.1.0} + image: ghcr.io/goatnetwork/bitvm-node:${TAG:-0.1.0} container_name: committee_1 volumes: - ./committee_1:/var/data @@ -30,23 +30,23 @@ services: depends_on: - committee_0 - challenger_0: - image: ghcr.io/goatnetwork/bitvm2-node:${TAG:-0.1.0} - container_name: challenger_0 + verifier_0: + image: ghcr.io/goatnetwork/bitvm-node:${TAG:-0.1.0} + container_name: verifier_0 volumes: - - ./challenger_0:/var/data - - ./challenger_0/.env:/app/.env + - ./verifier_0:/var/data + - ./verifier_0/.env:/app/.env ports: - "8902:9100" - "8445:8443" env_file: - - ./challenger_0/.env + - ./verifier_0/.env restart: unless-stopped depends_on: - committee_0 operator_0: - image: ghcr.io/goatnetwork/bitvm2-node:${TAG:-0.1.0} + image: ghcr.io/goatnetwork/bitvm-node:${TAG:-0.1.0} container_name: operator_0 volumes: - ./operator_0:/var/data @@ -61,7 +61,7 @@ services: - committee_0 watchtower_0: - image: ghcr.io/goatnetwork/bitvm2-node:${TAG:-0.1.0} + image: ghcr.io/goatnetwork/bitvm-node:${TAG:-0.1.0} container_name: watchtower_0 volumes: - ./watchtower_0:/var/data diff --git a/deployment/regtest/bitvm-noded/challenge_0/.env.challenge_0 b/deployment/regtest/bitvm-noded/challenge_0/.env.challenge_0 deleted file mode 100644 index da66c25aa..000000000 --- a/deployment/regtest/bitvm-noded/challenge_0/.env.challenge_0 +++ /dev/null @@ -1,27 +0,0 @@ -RUST_LOG=info -# required -ACTOR=Challenger - -# bitcoin network config -BITCOIN_NETWORK=regtest -BTC_CHAIN_URL=http://127.0.0.1:3002 - -# goat network config -GOAT_CHAIN_URL=https://rpc.testnet3.goat.network - -# the graph config -GOAT_GATEWAY_CONTRACT_ADDRESS=0x26Aa99d72f5f85D60A1B44773B3897793981B7F7 -GOAT_GATEWAY_EVENT_THE_GRAPH_URL=https://graph.goat.network/subgraphs/name/bitvm2_gateway_dev -GOAT_GATEWAY_EVENT_FILTER_FROM=10596000 -GOAT_SWAP_CONTRACT_ADDRESS=0xe510D5781C6C849284Fb25Dc20b1684cEC445C8B -GOAT_SWAP_EVENT_THE_GRAPH_URL=https://graph.goat.network/subgraphs/name/bitvm2_escrow_manager_dev -GOAT_SWAP_EVENT_FILTER_FROM=10596000 - -# node config -BITVM_SECRET= -GOAT_ADDRESS= - -# libp2p config -PEER_KEY= -BOOTNODES=/ip4/127.0.0.1/tcp/8444/p2p/12D3KooWKmAQDFCibTTpKTi6Kwk9SmtLGDXhv5fEsc9gr1Vdcu4j -PROTO_NAME=bitvm_regtest \ No newline at end of file diff --git a/deployment/regtest/bitvm-noded/challenge_0/run.sh b/deployment/regtest/bitvm-noded/challenge_0/run.sh deleted file mode 100644 index aa2d1f58c..000000000 --- a/deployment/regtest/bitvm-noded/challenge_0/run.sh +++ /dev/null @@ -1 +0,0 @@ -nohup ../bitvm-noded --rpc-addr 127.0.0.1:8906 --db-path sqlite:$PWD/bitvm2-node.db --p2p-port 8450 --bootnodes $bootnode_urls >$PWD/$(date +'%Y%m%d').log 2>&1 & \ No newline at end of file diff --git a/deployment/regtest/bitvm-noded/committee_0/.env.committee_0 b/deployment/regtest/bitvm-noded/committee_0/.env.committee_0 index 73e4572e1..c5a9643f9 100644 --- a/deployment/regtest/bitvm-noded/committee_0/.env.committee_0 +++ b/deployment/regtest/bitvm-noded/committee_0/.env.committee_0 @@ -15,17 +15,21 @@ GOAT_CHAIN_URL=https://rpc.testnet3.goat.network ENABLE_UPDATE_SPV_CONTRACT=true # the graph config -GOAT_GATEWAY_CONTRACT_ADDRESS=0x26Aa99d72f5f85D60A1B44773B3897793981B7F7 -GOAT_GATEWAY_EVENT_THE_GRAPH_URL=https://graph.goat.network/subgraphs/name/bitvm2_gateway_dev -GOAT_GATEWAY_EVENT_FILTER_FROM=10596000 -GOAT_SWAP_CONTRACT_ADDRESS=0xe510D5781C6C849284Fb25Dc20b1684cEC445C8B -GOAT_SWAP_EVENT_THE_GRAPH_URL=https://graph.goat.network/subgraphs/name/bitvm2_escrow_manager_dev -GOAT_SWAP_EVENT_FILTER_FROM=10596000 +GOAT_GATEWAY_CONTRACT_ADDRESS= +GOAT_GATEWAY_EVENT_THE_GRAPH_URL= +# block number to start filtering events from +GOAT_GATEWAY_EVENT_FILTER_FROM= +GOAT_SWAP_CONTRACT_ADDRESS= +GOAT_SWAP_EVENT_THE_GRAPH_URL= +# block number to start filtering events from +GOAT_SWAP_EVENT_FILTER_FROM= # node config BITVM_SECRET= GOAT_PRIVATE_KEY= +GENESIS_SEQUENCER_COMMIT_TXID= + # libp2p config PEER_KEY= PROTO_NAME=bitvm_regtest \ No newline at end of file diff --git a/deployment/regtest/bitvm-noded/committee_0/run.sh b/deployment/regtest/bitvm-noded/committee_0/run.sh index 16f8d988c..0ce409bb3 100644 --- a/deployment/regtest/bitvm-noded/committee_0/run.sh +++ b/deployment/regtest/bitvm-noded/committee_0/run.sh @@ -1 +1 @@ -nohup ../bitvm-noded --rpc-addr 0.0.0.0:8900 --db-path sqlite:$PWD/bitvm2-node.db --p2p-port 8444 >$PWD/$(date +'%Y%m%d').log 2>&1 & \ No newline at end of file +nohup ../bitvm-noded --rpc-addr 0.0.0.0:8900 --db-path sqlite:$PWD/bitvm-node.db --p2p-port 8444 >$PWD/$(date +'%Y%m%d').log 2>&1 & \ No newline at end of file diff --git a/deployment/regtest/bitvm-noded/committee_1/.env.committee_1 b/deployment/regtest/bitvm-noded/committee_1/.env.committee_1 index 5eb00df85..32c9b4e9f 100644 --- a/deployment/regtest/bitvm-noded/committee_1/.env.committee_1 +++ b/deployment/regtest/bitvm-noded/committee_1/.env.committee_1 @@ -10,17 +10,21 @@ BTC_CHAIN_URL=http://127.0.0.1:3002 GOAT_CHAIN_URL=https://rpc.testnet3.goat.network # the graph config -GOAT_GATEWAY_CONTRACT_ADDRESS=0x26Aa99d72f5f85D60A1B44773B3897793981B7F7 -GOAT_GATEWAY_EVENT_THE_GRAPH_URL=https://graph.goat.network/subgraphs/name/bitvm2_gateway_dev -GOAT_GATEWAY_EVENT_FILTER_FROM=10596000 -GOAT_SWAP_CONTRACT_ADDRESS=0xe510D5781C6C849284Fb25Dc20b1684cEC445C8B -GOAT_SWAP_EVENT_THE_GRAPH_URL=https://graph.goat.network/subgraphs/name/bitvm2_escrow_manager_dev -GOAT_SWAP_EVENT_FILTER_FROM=10596000 +GOAT_GATEWAY_CONTRACT_ADDRESS= +GOAT_GATEWAY_EVENT_THE_GRAPH_URL= +# block number to start filtering events from +GOAT_GATEWAY_EVENT_FILTER_FROM= +GOAT_SWAP_CONTRACT_ADDRESS= +GOAT_SWAP_EVENT_THE_GRAPH_URL= +# block number to start filtering events from +GOAT_SWAP_EVENT_FILTER_FROM= # node config BITVM_SECRET= GOAT_PRIVATE_KEY= +GENESIS_SEQUENCER_COMMIT_TXID= + # libp2p config PEER_KEY= BOOTNODES=/ip4/127.0.0.1/tcp/8444/p2p/12D3KooWKmAQDFCibTTpKTi6Kwk9SmtLGDXhv5fEsc9gr1Vdcu4j diff --git a/deployment/regtest/bitvm-noded/committee_1/run.sh b/deployment/regtest/bitvm-noded/committee_1/run.sh index 49b4e315f..73c64c84d 100644 --- a/deployment/regtest/bitvm-noded/committee_1/run.sh +++ b/deployment/regtest/bitvm-noded/committee_1/run.sh @@ -1 +1 @@ -nohup ../bitvm-noded --rpc-addr 127.0.0.1:8901 --db-path sqlite:$PWD/bitvm2-node.db --p2p-port 8445 --bootnodes $bootnode_urls >$PWD/$(date +'%Y%m%d').log 2>&1 & \ No newline at end of file +nohup ../bitvm-noded --rpc-addr 127.0.0.1:8901 --db-path sqlite:$PWD/bitvm-node.db --p2p-port 8445 --bootnodes $bootnode_urls >$PWD/$(date +'%Y%m%d').log 2>&1 & \ No newline at end of file diff --git a/deployment/regtest/bitvm-noded/operator_0/.env.operator_0 b/deployment/regtest/bitvm-noded/operator_0/.env.operator_0 index 33b863818..8d7796b58 100644 --- a/deployment/regtest/bitvm-noded/operator_0/.env.operator_0 +++ b/deployment/regtest/bitvm-noded/operator_0/.env.operator_0 @@ -10,12 +10,14 @@ BTC_CHAIN_URL=http://127.0.0.1:3002 GOAT_CHAIN_URL=https://rpc.testnet3.goat.network # the graph config -GOAT_GATEWAY_CONTRACT_ADDRESS=0x26Aa99d72f5f85D60A1B44773B3897793981B7F7 -GOAT_GATEWAY_EVENT_THE_GRAPH_URL=https://graph.goat.network/subgraphs/name/bitvm2_gateway_dev -GOAT_GATEWAY_EVENT_FILTER_FROM=10596000 -GOAT_SWAP_CONTRACT_ADDRESS=0xe510D5781C6C849284Fb25Dc20b1684cEC445C8B -GOAT_SWAP_EVENT_THE_GRAPH_URL=https://graph.goat.network/subgraphs/name/bitvm2_escrow_manager_dev -GOAT_SWAP_EVENT_FILTER_FROM=10596000 +GOAT_GATEWAY_CONTRACT_ADDRESS= +GOAT_GATEWAY_EVENT_THE_GRAPH_URL= +# block number to start filtering events from +GOAT_GATEWAY_EVENT_FILTER_FROM= +GOAT_SWAP_CONTRACT_ADDRESS= +GOAT_SWAP_EVENT_THE_GRAPH_URL= +# block number to start filtering events from +GOAT_SWAP_EVENT_FILTER_FROM= # node config BITVM_SECRET= @@ -27,5 +29,27 @@ BOOTNODES=/ip4/127.0.0.1/tcp/8444/p2p/12D3KooWKmAQDFCibTTpKTi6Kwk9SmtLGDXhv5fEsc PROTO_NAME=bitvm_regtest ## Proof -GENESIS_SEQUENCER_COMMIT_TXID=0a7f66f7b4befe841ebc51a53738fa35b833f66a3b001a90e37a751bd9b7713e -GOAT_PROOF_BUILD_URL= \ No newline at end of file +GOAT_PROOF_BUILD_URL= + +ZKM_IMM_WRAP_VK=1 +# store soldering materials +SOLDERING_PROOF_PAYLOAD_STORE_PATH= + +OPERATOR_VK_HASH=0x0091d5d17e00f266331d9597637ff6b7e7c8f9da80aa7a1ac7e2eb94cb569990 +OPERATOR_ZKM_VERSION=v1.2.7 +GENESIS_SEQUENCER_COMMIT_TXID= + +# required for babe +CAC_BATCH_SIZE=100 + +# In order to generate the following files, please refer to https://github.com/GOATNetwork/bitvm-gc/blob/feat/goat-bitvm3/verifiable-circuit-babe/src/bin/generate_artifacts.rs +FGC_GATES_PATH= +FGC_OUT_INDICES_PATH= +SGC_GATES_PATH= +SGC_OUT_INDICES_PATH= +FGC_COMPACT_GATES_PATH= +FGC_COMPACT_OUT_INDICES_PATH= +SGC_COMPACT_GATES_PATH= +SGC_COMPACT_OUT_INDICES_PATH= + +ENABLE_BABE_SETUP_STATE_CLEANUP=true \ No newline at end of file diff --git a/deployment/regtest/bitvm-noded/operator_0/run.sh b/deployment/regtest/bitvm-noded/operator_0/run.sh index 9de067bba..fe8e5c7e7 100644 --- a/deployment/regtest/bitvm-noded/operator_0/run.sh +++ b/deployment/regtest/bitvm-noded/operator_0/run.sh @@ -1 +1 @@ -nohup ../bitvm-noded --rpc-addr 127.0.0.1:8902 --db-path sqlite:$PWD/bitvm2-node.db --p2p-port 8446 --bootnodes $bootnode_urls >$PWD/$(date +'%Y%m%d').log 2>&1 & \ No newline at end of file +nohup ../bitvm-noded --rpc-addr 127.0.0.1:8902 --db-path sqlite:$PWD/bitvm-node.db --p2p-port 8446 --bootnodes $bootnode_urls >$PWD/$(date +'%Y%m%d').log 2>&1 & \ No newline at end of file diff --git a/deployment/regtest/bitvm-noded/start_nodes.sh b/deployment/regtest/bitvm-noded/start_nodes.sh index c68b064a7..a27f14869 100644 --- a/deployment/regtest/bitvm-noded/start_nodes.sh +++ b/deployment/regtest/bitvm-noded/start_nodes.sh @@ -23,7 +23,7 @@ sh -x ./run.sh cd .. sleep 1 -echo "start challenger_0" -cd challenger_0 +echo "start verifier_0" +cd verifier_0 sh -x ./run.sh cd .. \ No newline at end of file diff --git a/deployment/regtest/bitvm-noded/verifier_0/.env.verifier_0 b/deployment/regtest/bitvm-noded/verifier_0/.env.verifier_0 new file mode 100644 index 000000000..79c14e821 --- /dev/null +++ b/deployment/regtest/bitvm-noded/verifier_0/.env.verifier_0 @@ -0,0 +1,50 @@ +RUST_LOG=info +# required +ACTOR=Verifier + +# bitcoin network config +BITCOIN_NETWORK=regtest +BTC_CHAIN_URL=http://127.0.0.1:3002 + +# goat network config +GOAT_CHAIN_URL=https://rpc.testnet3.goat.network + +# the graph config +GOAT_GATEWAY_CONTRACT_ADDRESS= +GOAT_GATEWAY_EVENT_THE_GRAPH_URL= +GOAT_GATEWAY_EVENT_FILTER_FROM= +GOAT_SWAP_CONTRACT_ADDRESS= +GOAT_SWAP_EVENT_THE_GRAPH_URL= +GOAT_SWAP_EVENT_FILTER_FROM= + +# node config +BITVM_SECRET= +GOAT_ADDRESS= + +# libp2p config +PEER_KEY= +BOOTNODES=/ip4/127.0.0.1/tcp/8444/p2p/12D3KooWKmAQDFCibTTpKTi6Kwk9SmtLGDXhv5fEsc9gr1Vdcu4j +PROTO_NAME=bitvm_regtest + +OPERATOR_VK_HASH=0x0091d5d17e00f266331d9597637ff6b7e7c8f9da80aa7a1ac7e2eb94cb569990 +OPERATOR_ZKM_VERSION=v1.2.7 +GENESIS_SEQUENCER_COMMIT_TXID= + +ZKM_IMM_WRAP_VK=1 +# store soldering materials +SOLDERING_PROOF_PAYLOAD_STORE_PATH= + +# for babe +CAC_BATCH_SIZE=100 + +# In order to generate the following files, please refer to https://github.com/GOATNetwork/bitvm-gc/blob/feat/goat-bitvm3/verifiable-circuit-babe/src/bin/generate_artifacts.rs +FGC_GATES_PATH= +FGC_OUT_INDICES_PATH= +SGC_GATES_PATH= +SGC_OUT_INDICES_PATH= +FGC_COMPACT_GATES_PATH= +FGC_COMPACT_OUT_INDICES_PATH= +SGC_COMPACT_GATES_PATH= +SGC_COMPACT_OUT_INDICES_PATH= + +ENABLE_BABE_SETUP_STATE_CLEANUP=true \ No newline at end of file diff --git a/deployment/regtest/bitvm-noded/verifier_0/run.sh b/deployment/regtest/bitvm-noded/verifier_0/run.sh new file mode 100644 index 000000000..cb09ad860 --- /dev/null +++ b/deployment/regtest/bitvm-noded/verifier_0/run.sh @@ -0,0 +1 @@ +nohup ../bitvm-noded --rpc-addr 127.0.0.1:8906 --db-path sqlite:$PWD/bitvm-node.db --p2p-port 8450 --bootnodes $bootnode_urls >$PWD/$(date +'%Y%m%d').log 2>&1 & \ No newline at end of file diff --git a/deployment/regtest/bitvm-noded/watchtower_0/.env.watchtower_0 b/deployment/regtest/bitvm-noded/watchtower_0/.env.watchtower_0 index c6b018615..182782f11 100644 --- a/deployment/regtest/bitvm-noded/watchtower_0/.env.watchtower_0 +++ b/deployment/regtest/bitvm-noded/watchtower_0/.env.watchtower_0 @@ -11,18 +11,19 @@ GOAT_CHAIN_URL=https://rpc.testnet3.goat.network GOAT_PROOF_BUILD_URL= # the graph config -GOAT_GATEWAY_CONTRACT_ADDRESS=0x26Aa99d72f5f85D60A1B44773B3897793981B7F7 -GOAT_GATEWAY_EVENT_THE_GRAPH_URL=https://graph.goat.network/subgraphs/name/bitvm2_gateway_dev -GOAT_GATEWAY_EVENT_FILTER_FROM=10596000 -GOAT_SWAP_CONTRACT_ADDRESS=0xe510D5781C6C849284Fb25Dc20b1684cEC445C8B -GOAT_SWAP_EVENT_THE_GRAPH_URL=https://graph.goat.network/subgraphs/name/bitvm2_escrow_manager_dev -GOAT_SWAP_EVENT_FILTER_FROM=10596000 +GOAT_GATEWAY_CONTRACT_ADDRESS= +GOAT_GATEWAY_EVENT_THE_GRAPH_URL= +GOAT_GATEWAY_EVENT_FILTER_FROM= +GOAT_SWAP_CONTRACT_ADDRESS= +GOAT_SWAP_EVENT_THE_GRAPH_URL= +GOAT_SWAP_EVENT_FILTER_FROM= # node config BITVM_SECRET= -ALWAYS_CHALLENGE=true # libp2p config PEER_KEY= BOOTNODES=/ip4/127.0.0.1/tcp/8444/p2p/12D3KooWKmAQDFCibTTpKTi6Kwk9SmtLGDXhv5fEsc9gr1Vdcu4j -PROTO_NAME=bitvm_regtest \ No newline at end of file +PROTO_NAME=bitvm_regtest + +GENESIS_SEQUENCER_COMMIT_TXID= \ No newline at end of file diff --git a/deployment/regtest/bitvm-noded/watchtower_0/run.sh b/deployment/regtest/bitvm-noded/watchtower_0/run.sh index 53faf2138..740b59475 100644 --- a/deployment/regtest/bitvm-noded/watchtower_0/run.sh +++ b/deployment/regtest/bitvm-noded/watchtower_0/run.sh @@ -1 +1 @@ -nohup ../bitvm-noded --rpc-addr 127.0.0.1:8904 --db-path sqlite:$PWD/bitvm2-node.db --p2p-port 8448 --bootnodes $bootnode_urls >$PWD/$(date +'%Y%m%d').log 2>&1 & \ No newline at end of file +nohup ../bitvm-noded --rpc-addr 127.0.0.1:8904 --db-path sqlite:$PWD/bitvm-node.db --p2p-port 8448 --bootnodes $bootnode_urls >$PWD/$(date +'%Y%m%d').log 2>&1 & \ No newline at end of file diff --git a/deployment/regtest/proof-builder-rpc/.env.proof-builder-rpc b/deployment/regtest/proof-builder-rpc/.env.proof-builder-rpc index 5b96d9ab7..acfd86898 100644 --- a/deployment/regtest/proof-builder-rpc/.env.proof-builder-rpc +++ b/deployment/regtest/proof-builder-rpc/.env.proof-builder-rpc @@ -4,6 +4,7 @@ ZKM_PROVER="network" #ZKM_PROVER="local" ENDPOINT= ZKM_PRIVATE_KEY= +ZKM_IMM_WRAP_VK=1 TOOL="../../circuits" #TOOL="." @@ -21,10 +22,10 @@ ZKM_PROOF_POLL_INTERVAL=2000 # The log directory. ESPLORA_URL=http://localhost:13002 BITCOIN_NETWORK=regtest -DATABASE_URL=sqlite:/tmp/.bitvm-node-sd.sqlite +DATABASE_URL=sqlite:/tmp/.bitvm-node.sqlite # GOAT contracts used for live Operator/Watchtower authorization. GOAT_NETWORK=test GOAT_CHAIN_URL=https://rpc.testnet3.goat.network # Proof Builder accepts a comma-separated list; each Node still configures one Gateway address. -GOAT_GATEWAY_CONTRACT_ADDRESS=0x26Aa99d72f5f85D60A1B44773B3897793981B7F7 +GOAT_GATEWAY_CONTRACT_ADDRESS= diff --git a/deployment/testnet4/bitvm-noded/challenge_0/.env.challenge_0 b/deployment/testnet4/bitvm-noded/challenge_0/.env.challenge_0 deleted file mode 100644 index f844f88d0..000000000 --- a/deployment/testnet4/bitvm-noded/challenge_0/.env.challenge_0 +++ /dev/null @@ -1,27 +0,0 @@ -RUST_LOG=info -# required -ACTOR=Challenger - -# bitcoin network config -BITCOIN_NETWORK=testnet4 -BTC_CHAIN_URL=https://mempool.space/testnet4/api - -# goat network config -GOAT_CHAIN_URL=https://rpc.testnet3.goat.network - -# the graph config -GOAT_GATEWAY_CONTRACT_ADDRESS=0x440c6dCA87C3511E1eBf4FDB1f584ddaA49dD029 -GOAT_GATEWAY_EVENT_THE_GRAPH_URL=https://graph.goat.network/subgraphs/name/bitvm2_testnet4 -GOAT_GATEWAY_EVENT_FILTER_FROM=10670000 -GOAT_SWAP_CONTRACT_ADDRESS=0x3FbbA0eb82cf1247cbf92B3D51641226310F0Ca5 -GOAT_SWAP_EVENT_THE_GRAPH_URL=https://graph.goat.network/subgraphs/name/bitvm2_escrow_manager_0x3Fbb -GOAT_SWAP_EVENT_FILTER_FROM=10781948 - -# node config -BITVM_SECRET= -GOAT_ADDRESS= - -# libp2p config -PEER_KEY= -BOOTNODES=/ip4/34.215.238.232/tcp/8445/p2p/12D3KooWCrPTAmhFdC5DBGgkxZvJi6iuSeiDWKRL87isrt4iMHXv -PROTO_NAME=bitvm2t4 \ No newline at end of file diff --git a/deployment/testnet4/bitvm-noded/challenge_0/run.sh b/deployment/testnet4/bitvm-noded/challenge_0/run.sh deleted file mode 100644 index c8d6aa6ff..000000000 --- a/deployment/testnet4/bitvm-noded/challenge_0/run.sh +++ /dev/null @@ -1 +0,0 @@ -nohup ../bitvm-noded --rpc-addr 127.0.0.1:8906 --db-path sqlite:$PWD/bitvm2-node.db --p2p-port 8449 --bootnodes $bootnode_urls >$PWD/$(date +'%Y%m%d').log 2>&1 & diff --git a/deployment/testnet4/bitvm-noded/committee_0/.env.committee_0 b/deployment/testnet4/bitvm-noded/committee_0/.env.committee_0 index 70d015a34..5116cd7fc 100644 --- a/deployment/testnet4/bitvm-noded/committee_0/.env.committee_0 +++ b/deployment/testnet4/bitvm-noded/committee_0/.env.committee_0 @@ -15,12 +15,12 @@ GOAT_CHAIN_URL=https://rpc.testnet3.goat.network ENABLE_UPDATE_SPV_CONTRACT=true # the graph config -GOAT_GATEWAY_CONTRACT_ADDRESS=0x440c6dCA87C3511E1eBf4FDB1f584ddaA49dD029 -GOAT_GATEWAY_EVENT_THE_GRAPH_URL=https://graph.goat.network/subgraphs/name/bitvm2_testnet4 -GOAT_GATEWAY_EVENT_FILTER_FROM=10670000 +GOAT_GATEWAY_CONTRACT_ADDRESS=0x60a5b099eE011018DD064F9eBD50d381C37b5e8b +GOAT_GATEWAY_EVENT_THE_GRAPH_URL=https://graph.goat.network/subgraphs/name/bitvmt4_gateway_0x60a5 +GOAT_GATEWAY_EVENT_FILTER_FROM=15908000 GOAT_SWAP_CONTRACT_ADDRESS=0x3FbbA0eb82cf1247cbf92B3D51641226310F0Ca5 GOAT_SWAP_EVENT_THE_GRAPH_URL=https://graph.goat.network/subgraphs/name/bitvm2_escrow_manager_0x3Fbb -GOAT_SWAP_EVENT_FILTER_FROM=10781948 +GOAT_SWAP_EVENT_FILTER_FROM=15908000 # node config BITVM_SECRET= @@ -28,4 +28,6 @@ GOAT_PRIVATE_KEY= # libp2p config PEER_KEY= -PROTO_NAME=bitvm2t4 \ No newline at end of file +PROTO_NAME=bitvmt4 + +GENESIS_SEQUENCER_COMMIT_TXID=c2d816940391da550af23c7924f8d9ecd276cdf6a22a164fc44443f5eba6d4b5 \ No newline at end of file diff --git a/deployment/testnet4/bitvm-noded/committee_0/run.sh b/deployment/testnet4/bitvm-noded/committee_0/run.sh index c324fb028..eea944bf2 100644 --- a/deployment/testnet4/bitvm-noded/committee_0/run.sh +++ b/deployment/testnet4/bitvm-noded/committee_0/run.sh @@ -1 +1 @@ -nohup ../bitvm-noded --rpc-addr 127.0.0.1:8902 --db-path sqlite:$PWD/bitvm2-node.db --p2p-port 8445 >$PWD/$(date +'%Y%m%d').log 2>&1 & +nohup ../bitvm-noded --rpc-addr 127.0.0.1:8902 --db-path sqlite:$PWD/bitvm-node.db --p2p-port 8445 >$PWD/$(date +'%Y%m%d').log 2>&1 & diff --git a/deployment/testnet4/bitvm-noded/committee_1/.env.committee_1 b/deployment/testnet4/bitvm-noded/committee_1/.env.committee_1 index 2b87ebd93..030f118bb 100644 --- a/deployment/testnet4/bitvm-noded/committee_1/.env.committee_1 +++ b/deployment/testnet4/bitvm-noded/committee_1/.env.committee_1 @@ -10,12 +10,12 @@ BTC_CHAIN_URL=https://mempool.space/testnet4/api GOAT_CHAIN_URL=https://rpc.testnet3.goat.network # the graph config -GOAT_GATEWAY_CONTRACT_ADDRESS=0x440c6dCA87C3511E1eBf4FDB1f584ddaA49dD029 -GOAT_GATEWAY_EVENT_THE_GRAPH_URL=https://graph.goat.network/subgraphs/name/bitvm2_testnet4 -GOAT_GATEWAY_EVENT_FILTER_FROM=10670000 +GOAT_GATEWAY_CONTRACT_ADDRESS=0x60a5b099eE011018DD064F9eBD50d381C37b5e8b +GOAT_GATEWAY_EVENT_THE_GRAPH_URL=https://graph.goat.network/subgraphs/name/bitvmt4_gateway_0x60a5 +GOAT_GATEWAY_EVENT_FILTER_FROM=15908000 GOAT_SWAP_CONTRACT_ADDRESS=0x3FbbA0eb82cf1247cbf92B3D51641226310F0Ca5 GOAT_SWAP_EVENT_THE_GRAPH_URL=https://graph.goat.network/subgraphs/name/bitvm2_escrow_manager_0x3Fbb -GOAT_SWAP_EVENT_FILTER_FROM=10781948 +GOAT_SWAP_EVENT_FILTER_FROM=15908000 # node config BITVM_SECRET= @@ -23,5 +23,7 @@ GOAT_PRIVATE_KEY= # libp2p config PEER_KEY= -BOOTNODES=/ip4/34.215.238.232/tcp/8445/p2p/12D3KooWCrPTAmhFdC5DBGgkxZvJi6iuSeiDWKRL87isrt4iMHXv -PROTO_NAME=bitvm2t4 \ No newline at end of file +BOOTNODES=/ip4/16.146.8.146/tcp/8445/p2p/12D3KooWCrPTAmhFdC5DBGgkxZvJi6iuSeiDWKRL87isrt4iMHXv +PROTO_NAME=bitvmt4 + +GENESIS_SEQUENCER_COMMIT_TXID=c2d816940391da550af23c7924f8d9ecd276cdf6a22a164fc44443f5eba6d4b5 \ No newline at end of file diff --git a/deployment/testnet4/bitvm-noded/committee_1/run.sh b/deployment/testnet4/bitvm-noded/committee_1/run.sh index d2213ccf8..b5ac2a6f9 100644 --- a/deployment/testnet4/bitvm-noded/committee_1/run.sh +++ b/deployment/testnet4/bitvm-noded/committee_1/run.sh @@ -1 +1 @@ -nohup ../bitvm-noded --rpc-addr 127.0.0.1:8901 --db-path sqlite:$PWD/bitvm2-node.db --p2p-port 8444 --bootnodes $bootnode_urls >$PWD/$(date +'%Y%m%d').log 2>&1 & \ No newline at end of file +nohup ../bitvm-noded --rpc-addr 127.0.0.1:8901 --db-path sqlite:$PWD/bitvm-node.db --p2p-port 8444 --bootnodes $bootnode_urls >$PWD/$(date +'%Y%m%d').log 2>&1 & \ No newline at end of file diff --git a/deployment/testnet4/bitvm-noded/operator_0/.env.operator_0 b/deployment/testnet4/bitvm-noded/operator_0/.env.operator_0 index c831c5600..e580e75c9 100644 --- a/deployment/testnet4/bitvm-noded/operator_0/.env.operator_0 +++ b/deployment/testnet4/bitvm-noded/operator_0/.env.operator_0 @@ -5,17 +5,18 @@ ACTOR=Operator # bitcoin network config BITCOIN_NETWORK=testnet4 BTC_CHAIN_URL=https://mempool.space/testnet4/api +GOAT_PROOF_BUILD_URL= # goat network config GOAT_CHAIN_URL=https://rpc.testnet3.goat.network # the graph config -GOAT_GATEWAY_CONTRACT_ADDRESS=0x440c6dCA87C3511E1eBf4FDB1f584ddaA49dD029 -GOAT_GATEWAY_EVENT_THE_GRAPH_URL=https://graph.goat.network/subgraphs/name/bitvm2_testnet4 -GOAT_GATEWAY_EVENT_FILTER_FROM=10670000 +GOAT_GATEWAY_CONTRACT_ADDRESS=0x60a5b099eE011018DD064F9eBD50d381C37b5e8b +GOAT_GATEWAY_EVENT_THE_GRAPH_URL=https://graph.goat.network/subgraphs/name/bitvmt4_gateway_0x60a5 +GOAT_GATEWAY_EVENT_FILTER_FROM=15908000 GOAT_SWAP_CONTRACT_ADDRESS=0x3FbbA0eb82cf1247cbf92B3D51641226310F0Ca5 GOAT_SWAP_EVENT_THE_GRAPH_URL=https://graph.goat.network/subgraphs/name/bitvm2_escrow_manager_0x3Fbb -GOAT_SWAP_EVENT_FILTER_FROM=10781948 +GOAT_SWAP_EVENT_FILTER_FROM=15908000 # node config BITVM_SECRET= @@ -23,9 +24,27 @@ GOAT_ADDRESS= # libp2p config PEER_KEY= -BOOTNODES=/ip4/34.215.238.232/tcp/8445/p2p/12D3KooWCrPTAmhFdC5DBGgkxZvJi6iuSeiDWKRL87isrt4iMHXv -PROTO_NAME=bitvm2t4 +BOOTNODES=/ip4/16.146.8.146/tcp/8445/p2p/12D3KooWCrPTAmhFdC5DBGgkxZvJi6iuSeiDWKRL87isrt4iMHXv +PROTO_NAME=bitvmt4 -## Proof -GENESIS_SEQUENCER_COMMIT_TXID=9afa052d65a7f8e6b2616e56719fe8419ba90469021b6b4696d81360fe842026 -GOAT_PROOF_BUILD_URL= \ No newline at end of file +# store soldering materials +SOLDERING_PROOF_PAYLOAD_STORE_PATH= + +OPERATOR_VK_HASH=0x0091d5d17e00f266331d9597637ff6b7e7c8f9da80aa7a1ac7e2eb94cb569990 +OPERATOR_ZKM_VERSION=v1.2.7 +GENESIS_SEQUENCER_COMMIT_TXID=c2d816940391da550af23c7924f8d9ecd276cdf6a22a164fc44443f5eba6d4b5 + +# required for babe +CAC_BATCH_SIZE=100 + +# In order to generate the following files, please refer to https://github.com/GOATNetwork/bitvm-gc/blob/feat/goat-bitvm3/verifiable-circuit-babe/src/bin/generate_artifacts.rs +FGC_GATES_PATH= +FGC_OUT_INDICES_PATH= +SGC_GATES_PATH= +SGC_OUT_INDICES_PATH= +FGC_COMPACT_GATES_PATH= +FGC_COMPACT_OUT_INDICES_PATH= +SGC_COMPACT_GATES_PATH= +SGC_COMPACT_OUT_INDICES_PATH= + +ENABLE_BABE_SETUP_STATE_CLEANUP=true \ No newline at end of file diff --git a/deployment/testnet4/bitvm-noded/operator_0/run.sh b/deployment/testnet4/bitvm-noded/operator_0/run.sh index a7b0246a0..2d7c33397 100644 --- a/deployment/testnet4/bitvm-noded/operator_0/run.sh +++ b/deployment/testnet4/bitvm-noded/operator_0/run.sh @@ -1 +1 @@ -nohup ../bitvm-noded --rpc-addr 127.0.0.1:8902 --db-path sqlite:$PWD/bitvm2-node.db --p2p-port 8445 --bootnodes $bootnode_urls >$PWD/$(date +'%Y%m%d').log 2>&1 & \ No newline at end of file +nohup ../bitvm-noded --rpc-addr 127.0.0.1:8902 --db-path sqlite:$PWD/bitvm-node.db --p2p-port 8445 --bootnodes $bootnode_urls >$PWD/$(date +'%Y%m%d').log 2>&1 & \ No newline at end of file diff --git a/deployment/testnet4/bitvm-noded/start_nodes.sh b/deployment/testnet4/bitvm-noded/start_nodes.sh index c68b064a7..a27f14869 100644 --- a/deployment/testnet4/bitvm-noded/start_nodes.sh +++ b/deployment/testnet4/bitvm-noded/start_nodes.sh @@ -23,7 +23,7 @@ sh -x ./run.sh cd .. sleep 1 -echo "start challenger_0" -cd challenger_0 +echo "start verifier_0" +cd verifier_0 sh -x ./run.sh cd .. \ No newline at end of file diff --git a/deployment/testnet4/bitvm-noded/verifier_0/.env.verifier_0 b/deployment/testnet4/bitvm-noded/verifier_0/.env.verifier_0 new file mode 100644 index 000000000..c98d89bc4 --- /dev/null +++ b/deployment/testnet4/bitvm-noded/verifier_0/.env.verifier_0 @@ -0,0 +1,51 @@ +RUST_LOG=info +# required +ACTOR=Verifier + +# bitcoin network config +BITCOIN_NETWORK=testnet4 +BTC_CHAIN_URL=https://mempool.space/testnet4/api + +# goat network config +GOAT_CHAIN_URL=https://rpc.testnet3.goat.network + +# the graph config +GOAT_GATEWAY_CONTRACT_ADDRESS=0x60a5b099eE011018DD064F9eBD50d381C37b5e8b +GOAT_GATEWAY_EVENT_THE_GRAPH_URL=https://graph.goat.network/subgraphs/name/bitvmt4_gateway_0x60a5 +GOAT_GATEWAY_EVENT_FILTER_FROM=15908000 +GOAT_SWAP_CONTRACT_ADDRESS=0x3FbbA0eb82cf1247cbf92B3D51641226310F0Ca5 +GOAT_SWAP_EVENT_THE_GRAPH_URL=https://graph.goat.network/subgraphs/name/bitvm2_escrow_manager_0x3Fbb +GOAT_SWAP_EVENT_FILTER_FROM=15908000 + +# node config +BITVM_SECRET= +GOAT_ADDRESS= + +# libp2p config +PEER_KEY= +BOOTNODES=/ip4/16.146.8.146/tcp/8445/p2p/12D3KooWCrPTAmhFdC5DBGgkxZvJi6iuSeiDWKRL87isrt4iMHXv +PROTO_NAME=bitvmt4 + +OPERATOR_VK_HASH=0x0091d5d17e00f266331d9597637ff6b7e7c8f9da80aa7a1ac7e2eb94cb569990 +OPERATOR_ZKM_VERSION=v1.2.7 +GENESIS_SEQUENCER_COMMIT_TXID=c2d816940391da550af23c7924f8d9ecd276cdf6a22a164fc44443f5eba6d4b5 + +ZKM_IMM_WRAP_VK=1 + +# store soldering materials +SOLDERING_PROOF_PAYLOAD_STORE_PATH= + +# for babe +CAC_BATCH_SIZE=100 + +# In order to generate the following files, please refer to https://github.com/GOATNetwork/bitvm-gc/blob/feat/goat-bitvm3/verifiable-circuit-babe/src/bin/generate_artifacts.rs +FGC_GATES_PATH= +FGC_OUT_INDICES_PATH= +SGC_GATES_PATH= +SGC_OUT_INDICES_PATH= +FGC_COMPACT_GATES_PATH= +FGC_COMPACT_OUT_INDICES_PATH= +SGC_COMPACT_GATES_PATH= +SGC_COMPACT_OUT_INDICES_PATH= + +ENABLE_BABE_SETUP_STATE_CLEANUP=true \ No newline at end of file diff --git a/deployment/testnet4/bitvm-noded/verifier_0/run.sh b/deployment/testnet4/bitvm-noded/verifier_0/run.sh new file mode 100644 index 000000000..2d0b213c1 --- /dev/null +++ b/deployment/testnet4/bitvm-noded/verifier_0/run.sh @@ -0,0 +1 @@ +nohup ../bitvm-noded --rpc-addr 127.0.0.1:8906 --db-path sqlite:$PWD/bitvm-node.db --p2p-port 8449 --bootnodes $bootnode_urls >$PWD/$(date +'%Y%m%d').log 2>&1 & diff --git a/deployment/testnet4/bitvm-noded/watchtower_0/.env.watchtower_0 b/deployment/testnet4/bitvm-noded/watchtower_0/.env.watchtower_0 index 378d2d45c..2100c570d 100644 --- a/deployment/testnet4/bitvm-noded/watchtower_0/.env.watchtower_0 +++ b/deployment/testnet4/bitvm-noded/watchtower_0/.env.watchtower_0 @@ -11,18 +11,19 @@ GOAT_CHAIN_URL=https://rpc.testnet3.goat.network GOAT_PROOF_BUILD_URL= # the graph config -GOAT_GATEWAY_CONTRACT_ADDRESS=0x440c6dCA87C3511E1eBf4FDB1f584ddaA49dD029 -GOAT_GATEWAY_EVENT_THE_GRAPH_URL=https://graph.goat.network/subgraphs/name/bitvm2_testnet4 -GOAT_GATEWAY_EVENT_FILTER_FROM=10670000 +GOAT_GATEWAY_CONTRACT_ADDRESS=0x60a5b099eE011018DD064F9eBD50d381C37b5e8b +GOAT_GATEWAY_EVENT_THE_GRAPH_URL=https://graph.goat.network/subgraphs/name/bitvmt4_gateway_0x60a5 +GOAT_GATEWAY_EVENT_FILTER_FROM=15908000 GOAT_SWAP_CONTRACT_ADDRESS=0x3FbbA0eb82cf1247cbf92B3D51641226310F0Ca5 GOAT_SWAP_EVENT_THE_GRAPH_URL=https://graph.goat.network/subgraphs/name/bitvm2_escrow_manager_0x3Fbb -GOAT_SWAP_EVENT_FILTER_FROM=10781948 +GOAT_SWAP_EVENT_FILTER_FROM=15908000 # node config BITVM_SECRET= -ALWAYS_CHALLENGE=true # libp2p config PEER_KEY= -BOOTNODES=/ip4/34.215.238.232/tcp/8445/p2p/12D3KooWCrPTAmhFdC5DBGgkxZvJi6iuSeiDWKRL87isrt4iMHXv -PROTO_NAME=bitvm2t4 \ No newline at end of file +BOOTNODES=/ip4/16.146.8.146/tcp/8445/p2p/12D3KooWCrPTAmhFdC5DBGgkxZvJi6iuSeiDWKRL87isrt4iMHXv +PROTO_NAME=bitvmt4 + +GENESIS_SEQUENCER_COMMIT_TXID=c2d816940391da550af23c7924f8d9ecd276cdf6a22a164fc44443f5eba6d4b5 \ No newline at end of file diff --git a/deployment/testnet4/bitvm-noded/watchtower_0/run.sh b/deployment/testnet4/bitvm-noded/watchtower_0/run.sh index 9f67f22b3..a83ceea0f 100644 --- a/deployment/testnet4/bitvm-noded/watchtower_0/run.sh +++ b/deployment/testnet4/bitvm-noded/watchtower_0/run.sh @@ -1 +1 @@ -nohup ../bitvm-noded --rpc-addr 127.0.0.1:8904 --db-path sqlite:$PWD/bitvm2-node.db --p2p-port 8447 --bootnodes $bootnode_urls >$PWD/$(date +'%Y%m%d').log 2>&1 & \ No newline at end of file +nohup ../bitvm-noded --rpc-addr 127.0.0.1:8904 --db-path sqlite:$PWD/bitvm-node.db --p2p-port 8447 --bootnodes $bootnode_urls >$PWD/$(date +'%Y%m%d').log 2>&1 & \ No newline at end of file