Skip to content

Commit c5f02cf

Browse files
authored
Refactor/bitvm (#424)
* rename instances of 'bitvm2' to 'bitvm' across documentation and scripts * add validation for publisher key set * optimize `fetch_target_block` * fix: add full commit history validation and building functions * update install scripts * feat: implement API authentication with trusted public keys * add missing file * fix clippy
1 parent d17fd85 commit c5f02cf

84 files changed

Lines changed: 1424 additions & 182 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.claude/commands/bridge-out.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ Initiate Bridge Out via the `bridge-out` binary (payInvoice quote -> swap initia
2525

2626
3. Check if the `bridge-out` binary exists at `./bin/bridge-out`. If not, run the install script to download it:
2727
```bash
28-
.claude/commands/install-bitvm2.sh install
28+
.claude/commands/install-bitvm.sh install
2929
```
3030
To upgrade to the latest version:
3131
```bash
32-
.claude/commands/install-bitvm2.sh upgrade
32+
.claude/commands/install-bitvm.sh upgrade
3333
```
3434
The script auto-detects the platform (x86_64-linux / aarch64-macos), downloads from GitHub Releases,
3535
verifies the sha256 checksum, and installs all binaries to `./bin/`.

‎.claude/commands/challenge.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Use the `/run-challenger-node` skill to start one, or see `deployment/README.md`
3131

3232
5. Check if the `challenge` binary exists at `./bin/challenge`. If not, run:
3333
```bash
34-
.claude/commands/install-bitvm2.sh install
34+
.claude/commands/install-bitvm.sh install
3535
```
3636

3737
6. Run the command using the pre-built binary:
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -euo pipefail
44
REPO="GOATNetwork/bitvm2-node"
55
API_URL="https://api.github.com/repos/${REPO}/releases"
66
INSTALL_DIR="./bin"
7-
VERSION_FILE=".bitvm2-version"
7+
VERSION_FILE=".bitvm-version"
88

99
usage() {
1010
cat <<EOF
@@ -71,7 +71,7 @@ do_install() {
7171
local platform
7272
platform="$(detect_platform)"
7373

74-
local tarball="bitvm2-node-${version}-${platform}.tar.gz"
74+
local tarball="bitvm-node-${version}-${platform}.tar.gz"
7575
local base_url="https://github.com/${REPO}/releases/download/${version}"
7676
local url="${base_url}/${tarball}"
7777
local sha_url="${url}.sha256"

‎.claude/commands/pegin-request.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ Send a pegin request to GoatChain via the `pegin-request` binary.
2727

2828
3. Check if the `pegin-request` binary exists at `./bin/pegin-request`. If not, run the install script to download it:
2929
```bash
30-
.claude/commands/install-bitvm2.sh install
30+
.claude/commands/install-bitvm.sh install
3131
```
3232
To upgrade to the latest version:
3333
```bash
34-
.claude/commands/install-bitvm2.sh upgrade
34+
.claude/commands/install-bitvm.sh upgrade
3535
```
3636
The script auto-detects the platform (x86_64-linux / aarch64-macos), downloads from GitHub Releases, verifies the sha256 checksum, and installs all binaries to `./bin/`.
3737

‎.claude/commands/pegout.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Use the `/run-operator-node` skill to start one, or see `deployment/README.md` (
4141

4242
4. Check if the `pegout` binary exists at `./bin/pegout`. If not, run:
4343
```bash
44-
.claude/commands/install-bitvm2.sh install
44+
.claude/commands/install-bitvm.sh install
4545
```
4646

4747
5. Run the command using the pre-built binary:
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Run a BitVM2 Challenger node locally.
1+
Run a BitVM Challenger node locally.
22

33
The Challenger verifies operator operations and submits challenges if necessary.
44

@@ -8,11 +8,11 @@ The Challenger verifies operator operations and submits challenges if necessary.
88
- **network**: Which network? `testnet4` or `regtest`
99
- **rpc_addr**: RPC listen address. Default: `127.0.0.1:8906`
1010
- **p2p_port**: P2P listen port. Default: `8449` (testnet4) or `8450` (regtest)
11-
- **db_path**: SQLite database path. Default: `sqlite:$PWD/bitvm2-node.db`
11+
- **db_path**: SQLite database path. Default: `sqlite:$PWD/bitvm-node.db`
1212

1313
2. Ensure the `.env` file exists in the working directory. Template configs are at:
14-
- **testnet4**: `deployment/testnet4/bitvm2-nodes/challenge_0/.env.challenge_0`
15-
- **regtest**: `deployment/regtest/bitvm2-nodes/challenge_0/.env.challenge_0`
14+
- **testnet4**: `deployment/testnet4/bitvm-noded/challenge_0/.env.challenge_0`
15+
- **regtest**: `deployment/regtest/bitvm-noded/challenge_0/.env.challenge_0`
1616

1717
The user **must** fill in these required secrets:
1818
- `BITVM_SECRET` - Node BTC key (hex or `seed:...`)
@@ -21,23 +21,23 @@ The Challenger verifies operator operations and submits challenges if necessary.
2121

2222
Copy the template if needed:
2323
```bash
24-
cp deployment/<network>/bitvm2-nodes/challenge_0/.env.challenge_0 .env
24+
cp deployment/<network>/bitvm-noded/challenge_0/.env.challenge_0 .env
2525
```
2626

27-
3. Check if the `bitvm2-noded` binary exists at `./bin/bitvm2-noded`. If not, run:
27+
3. Check if the `bitvm-noded` binary exists at `./bin/bitvm-noded`. If not, run:
2828
```bash
29-
.claude/commands/install-bitvm2.sh install
29+
.claude/commands/install-bitvm.sh install
3030
```
3131

3232
4. Start the challenger node:
3333

3434
```bash
35-
./bin/bitvm2-noded --rpc-addr <rpc_addr> --db-path <db_path> --p2p-port <p2p_port> --bootnodes "$BOOTNODES"
35+
./bin/bitvm-noded --rpc-addr <rpc_addr> --db-path <db_path> --p2p-port <p2p_port> --bootnodes "$BOOTNODES"
3636
```
3737

3838
To run in the background:
3939
```bash
40-
nohup ./bin/bitvm2-noded --rpc-addr <rpc_addr> --db-path <db_path> --p2p-port <p2p_port> --bootnodes "$BOOTNODES" >challenger_$(date +'%Y%m%d').log 2>&1 &
40+
nohup ./bin/bitvm-noded --rpc-addr <rpc_addr> --db-path <db_path> --p2p-port <p2p_port> --bootnodes "$BOOTNODES" >challenger_$(date +'%Y%m%d').log 2>&1 &
4141
```
4242

4343
5. Verify the node is running:
@@ -49,9 +49,9 @@ Should return `Hello, World!`.
4949
### Example (testnet4)
5050

5151
```bash
52-
cp deployment/testnet4/bitvm2-nodes/challenge_0/.env.challenge_0 .env
52+
cp deployment/testnet4/bitvm-noded/challenge_0/.env.challenge_0 .env
5353
# Edit .env to fill in BITVM_SECRET, GOAT_ADDRESS, PEER_KEY
54-
./bin/bitvm2-noded --rpc-addr 127.0.0.1:8906 --db-path sqlite:$PWD/bitvm2-node.db --p2p-port 8449 --bootnodes /ip4/34.215.238.232/tcp/8445/p2p/12D3KooWCrPTAmhFdC5DBGgkxZvJi6iuSeiDWKRL87isrt4iMHXv
54+
./bin/bitvm-noded --rpc-addr 127.0.0.1:8906 --db-path sqlite:$PWD/bitvm-node.db --p2p-port 8449 --bootnodes /ip4/34.215.238.232/tcp/8445/p2p/12D3KooWCrPTAmhFdC5DBGgkxZvJi6iuSeiDWKRL87isrt4iMHXv
5555
```
5656

5757
For full deployment documentation, see `deployment/README.md` (section **Challenger**).
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Run a BitVM2 Operator node locally.
1+
Run a BitVM Operator node locally.
22

33
The Operator manages bridge operations, kickoff processing, and pegout (Gateway.initWithdraw).
44

@@ -8,11 +8,11 @@ The Operator manages bridge operations, kickoff processing, and pegout (Gateway.
88
- **network**: Which network? `testnet4` or `regtest`
99
- **rpc_addr**: RPC listen address. Default: `127.0.0.1:8902`
1010
- **p2p_port**: P2P listen port. Default: `8445` (testnet4) or `8446` (regtest)
11-
- **db_path**: SQLite database path. Default: `sqlite:$PWD/bitvm2-node.db`
11+
- **db_path**: SQLite database path. Default: `sqlite:$PWD/bitvm-node.db`
1212

1313
2. Ensure the `.env` file exists in the working directory. Template configs are at:
14-
- **testnet4**: `deployment/testnet4/bitvm2-nodes/operator_0/.env.operator_0`
15-
- **regtest**: `deployment/regtest/bitvm2-nodes/operator_0/.env.operator_0`
14+
- **testnet4**: `deployment/testnet4/bitvm-noded/operator_0/.env.operator_0`
15+
- **regtest**: `deployment/regtest/bitvm-noded/operator_0/.env.operator_0`
1616

1717
The user **must** fill in these required secrets:
1818
- `BITVM_SECRET` - Operator BTC private key (hex)
@@ -24,23 +24,23 @@ The Operator manages bridge operations, kickoff processing, and pegout (Gateway.
2424

2525
Copy the template if needed:
2626
```bash
27-
cp deployment/<network>/bitvm2-nodes/operator_0/.env.operator_0 .env
27+
cp deployment/<network>/bitvm-noded/operator_0/.env.operator_0 .env
2828
```
2929

30-
3. Check if the `bitvm2-noded` binary exists at `./bin/bitvm2-noded`. If not, run:
30+
3. Check if the `bitvm-noded` binary exists at `./bin/bitvm-noded`. If not, run:
3131
```bash
32-
.claude/commands/install-bitvm2.sh install
32+
.claude/commands/install-bitvm.sh install
3333
```
3434

3535
4. Start the operator node:
3636

3737
```bash
38-
./bin/bitvm2-noded --rpc-addr <rpc_addr> --db-path <db_path> --p2p-port <p2p_port> --bootnodes "$BOOTNODES"
38+
./bin/bitvm-noded --rpc-addr <rpc_addr> --db-path <db_path> --p2p-port <p2p_port> --bootnodes "$BOOTNODES"
3939
```
4040

4141
To run in the background:
4242
```bash
43-
nohup ./bin/bitvm2-noded --rpc-addr <rpc_addr> --db-path <db_path> --p2p-port <p2p_port> --bootnodes "$BOOTNODES" >operator_$(date +'%Y%m%d').log 2>&1 &
43+
nohup ./bin/bitvm-noded --rpc-addr <rpc_addr> --db-path <db_path> --p2p-port <p2p_port> --bootnodes "$BOOTNODES" >operator_$(date +'%Y%m%d').log 2>&1 &
4444
```
4545

4646
5. Verify the node is running:
@@ -52,9 +52,9 @@ Should return `Hello, World!`.
5252
### Example (testnet4)
5353

5454
```bash
55-
cp deployment/testnet4/bitvm2-nodes/operator_0/.env.operator_0 .env
55+
cp deployment/testnet4/bitvm-noded/operator_0/.env.operator_0 .env
5656
# Edit .env to fill in BITVM_SECRET, GOAT_ADDRESS, PEER_KEY, GOAT_PRIVATE_KEY
57-
./bin/bitvm2-noded --rpc-addr 127.0.0.1:8902 --db-path sqlite:$PWD/bitvm2-node.db --p2p-port 8445 --bootnodes /ip4/34.215.238.232/tcp/8445/p2p/12D3KooWCrPTAmhFdC5DBGgkxZvJi6iuSeiDWKRL87isrt4iMHXv
57+
./bin/bitvm-noded --rpc-addr 127.0.0.1:8902 --db-path sqlite:$PWD/bitvm-node.db --p2p-port 8445 --bootnodes /ip4/34.215.238.232/tcp/8445/p2p/12D3KooWCrPTAmhFdC5DBGgkxZvJi6iuSeiDWKRL87isrt4iMHXv
5858
```
5959

6060
For full deployment documentation, see `deployment/README.md` (section **Operator**).

‎.claude/commands/upgrade.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
Upgrade or install bitvm2-node binaries via `install-bitvm2.sh`.
1+
Upgrade or install bitvm-node binaries via `install-bitvm.sh`.
22

33
## Instructions
44

55
1. Check the currently installed version:
66
```bash
7-
.claude/commands/install-bitvm2.sh version
7+
.claude/commands/install-bitvm.sh version
88
```
99

1010
2. If $ARGUMENTS contains a target version (e.g. `v0.3.2`), use that version. Otherwise, upgrade to the latest release.
1111

1212
3. Run the upgrade:
1313
```bash
14-
.claude/commands/install-bitvm2.sh upgrade $ARGUMENTS
14+
.claude/commands/install-bitvm.sh upgrade $ARGUMENTS
1515
```
1616

17-
4. If the script is missing or not executable, inform the user that `.claude/commands/install-bitvm2.sh` is required and offer to check if it exists.
17+
4. If the script is missing or not executable, inform the user that `.claude/commands/install-bitvm.sh` is required and offer to check if it exists.
1818

1919
5. Report the result to the user: what version was installed before, what version is installed now, and list the installed binaries.

‎.env.template‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ GOAT_PRIVATE_KEY=
2222
GOAT_ADDRESS=
2323

2424
# protocol name
25-
PROTO_NAME=bitvm2t3
25+
PROTO_NAME=bitvmt3
2626

2727
# setup bootnodes, separate multiple nodes by comma ",".
2828
BOOTNODES=

‎.github/workflows/ci_time_consuming.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ jobs:
1818
- name: Run all unit tests
1919
run: |
2020
source ~/.zkm-toolchain/env
21-
cd crates/bitvm2-ga
21+
cd crates/bitvm-gc
2222
cargo test -r --features ci-tests -- --nocapture

0 commit comments

Comments
 (0)