Skip to content

Commit

Permalink
feat(scripts): add BTC sync interval to deploy script (#2666)
Browse files Browse the repository at this point in the history
Introduces --btc-sync-block-interval flag to deploy script to set block sync interval(default is 60s)
  • Loading branch information
popcnt1 authored Sep 21, 2024
1 parent 85ee9e5 commit f966166
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/rooch-benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ in `target/criterion/<bench_group_name>/<bench_id>/profile` dir.
e.g., profiling `bench_tx_exec` for 3.1 seconds:

```shell
cargo bench --bench bench_tx_exec -- --profile-time=3.1
cargo bench --bench bench_tx_exec -- --profile-time=3
```

for PPROF_OUT output location:
Expand Down Expand Up @@ -98,7 +98,8 @@ Coming soon...

### How to prepare the Bitcoin blocks

Run the benchmark with Bitcoin RPC config, it will download the blocks from Bitcoin network and save them in `target/btc_blocks` dir.
Run the benchmark with Bitcoin RPC config, it will download the blocks from Bitcoin network and save them in
`target/btc_blocks` dir.

```shell
ROOCH_BENCH_TX_TYPE=btc_tx ROOCH_BENCH_BTC_RPC_URL=http://localhost:8332 ROOCH_BENCH_BTC_RPC_USERNAME=YourBTCUser ROOCH_BENCH_BTC_RPC_PASSWORD=YourBTCPass cargo bench -p rooch-benchmarks --bench bench_tx_exec
Expand Down
1 change: 1 addition & 0 deletions scripts/deploy_rooch_mainnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ docker ps -a | grep rooch | grep -v faucet | awk '{print $1}' | xargs -r docker
docker pull "ghcr.io/rooch-network/rooch:$REF"
docker run -d --name rooch-mainnet --restart unless-stopped -v /data:/root -p 6767:6767 -p 9184:9184 -e RUST_BACKTRACE=full "ghcr.io/rooch-network/rooch:$REF" \
server start -n main \
--btc-sync-block-interval 20 \
--btc-rpc-url "$BTC_MAIN_RPC_URL" \
--btc-rpc-username rooch-main \
--btc-rpc-password "$BTC_MAIN_RPC_PWD"

0 comments on commit f966166

Please sign in to comment.