From f9661660eccd070cc5ca73502e4db58f76315580 Mon Sep 17 00:00:00 2001 From: popcnt <142196625+popcnt1@users.noreply.github.com> Date: Sun, 22 Sep 2024 00:19:42 +0800 Subject: [PATCH] feat(scripts): add BTC sync interval to deploy script (#2666) Introduces --btc-sync-block-interval flag to deploy script to set block sync interval(default is 60s) --- crates/rooch-benchmarks/README.md | 5 +++-- scripts/deploy_rooch_mainnet.sh | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/rooch-benchmarks/README.md b/crates/rooch-benchmarks/README.md index 72cf13b2db..8234eeb5c8 100644 --- a/crates/rooch-benchmarks/README.md +++ b/crates/rooch-benchmarks/README.md @@ -70,7 +70,7 @@ in `target/criterion///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: @@ -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 diff --git a/scripts/deploy_rooch_mainnet.sh b/scripts/deploy_rooch_mainnet.sh index 9736676880..a8cddcc503 100644 --- a/scripts/deploy_rooch_mainnet.sh +++ b/scripts/deploy_rooch_mainnet.sh @@ -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"