From 5f4bca99cff655b9eae7955035cda4f143d45f88 Mon Sep 17 00:00:00 2001 From: marcello33 Date: Wed, 13 Nov 2024 14:28:27 +0100 Subject: [PATCH 1/5] cgh: bor_grpc_flag disabled by default --- src/setup/devnet/index.js | 4 ++-- src/setup/heimdall/index.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/setup/devnet/index.js b/src/setup/devnet/index.js index 02f507f7..867be323 100644 --- a/src/setup/devnet/index.js +++ b/src/setup/devnet/index.js @@ -262,7 +262,7 @@ export class Devnet { ) .replace( /bor_grpc_flag[ ]*=[ ]*".*"/gi, - 'bor_grpc_flag = "true"' + 'bor_grpc_flag = "false"' ) .replace( /bor_grpc_url[ ]*=[ ]*".*"/gi, @@ -382,7 +382,7 @@ export class Devnet { ) .replace( /bor_grpc_flag[ ]*=[ ]*".*"/gi, - 'bor_grpc_flag = "true"' + 'bor_grpc_flag = "false"' ) .replace( /bor_grpc_url[ ]*=[ ]*".*"/gi, diff --git a/src/setup/heimdall/index.js b/src/setup/heimdall/index.js index 81adc47c..3d2bc991 100644 --- a/src/setup/heimdall/index.js +++ b/src/setup/heimdall/index.js @@ -313,7 +313,7 @@ export class Heimdall { /bor_rpc_url[ ]*=[ ]*".*"/gi, 'bor_rpc_url = "http://localhost:8545"' ) - .replace(/bor_grpc_flag[ ]*=[ ]*".*"/gi, 'bor_grpc_flag = "true"') + .replace(/bor_grpc_flag[ ]*=[ ]*".*"/gi, 'bor_grpc_flag = "false"') .replace( /bor_grpc_url[ ]*=[ ]*".*"/gi, 'bor_grpc_url = "localhost:3131"' From cffaa6ceac6cd41a0df16ee9698d1fe02ccbedbe Mon Sep 17 00:00:00 2001 From: marcello33 Date: Wed, 13 Nov 2024 14:39:53 +0100 Subject: [PATCH 2/5] cgh: fix docker def value for bor_grpc_url --- src/setup/devnet/index.js | 2 +- src/setup/heimdall/index.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/setup/devnet/index.js b/src/setup/devnet/index.js index 867be323..d8b42966 100644 --- a/src/setup/devnet/index.js +++ b/src/setup/devnet/index.js @@ -266,7 +266,7 @@ export class Devnet { ) .replace( /bor_grpc_url[ ]*=[ ]*".*"/gi, - 'bor_grpc_url = "localhost:3131"' + `bor_grpc_url = "bor${i}:3131"` ) .replace( /amqp_url[ ]*=[ ]*".*"/gi, diff --git a/src/setup/heimdall/index.js b/src/setup/heimdall/index.js index 3d2bc991..f5f32b27 100644 --- a/src/setup/heimdall/index.js +++ b/src/setup/heimdall/index.js @@ -313,7 +313,8 @@ export class Heimdall { /bor_rpc_url[ ]*=[ ]*".*"/gi, 'bor_rpc_url = "http://localhost:8545"' ) - .replace(/bor_grpc_flag[ ]*=[ ]*".*"/gi, 'bor_grpc_flag = "false"') + .replace(/bor_grpc_flag[ ]*=[ ]*".*"/gi, + 'bor_grpc_flag = "false"') .replace( /bor_grpc_url[ ]*=[ ]*".*"/gi, 'bor_grpc_url = "localhost:3131"' From deaedd2f043e72b95386ff2adf7423972943a833 Mon Sep 17 00:00:00 2001 From: marcello33 Date: Wed, 13 Nov 2024 14:55:21 +0100 Subject: [PATCH 3/5] cgh: bor_grpc_flag enabled by default --- src/setup/devnet/index.js | 4 ++-- src/setup/heimdall/index.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/setup/devnet/index.js b/src/setup/devnet/index.js index d8b42966..bea08528 100644 --- a/src/setup/devnet/index.js +++ b/src/setup/devnet/index.js @@ -262,7 +262,7 @@ export class Devnet { ) .replace( /bor_grpc_flag[ ]*=[ ]*".*"/gi, - 'bor_grpc_flag = "false"' + 'bor_grpc_flag = "true"' ) .replace( /bor_grpc_url[ ]*=[ ]*".*"/gi, @@ -382,7 +382,7 @@ export class Devnet { ) .replace( /bor_grpc_flag[ ]*=[ ]*".*"/gi, - 'bor_grpc_flag = "false"' + 'bor_grpc_flag = "true"' ) .replace( /bor_grpc_url[ ]*=[ ]*".*"/gi, diff --git a/src/setup/heimdall/index.js b/src/setup/heimdall/index.js index f5f32b27..67588cf0 100644 --- a/src/setup/heimdall/index.js +++ b/src/setup/heimdall/index.js @@ -314,7 +314,7 @@ export class Heimdall { 'bor_rpc_url = "http://localhost:8545"' ) .replace(/bor_grpc_flag[ ]*=[ ]*".*"/gi, - 'bor_grpc_flag = "false"') + 'bor_grpc_flag = "true"') .replace( /bor_grpc_url[ ]*=[ ]*".*"/gi, 'bor_grpc_url = "localhost:3131"' From 6576b0d809b53f3a41ea157791f189c9f0143d2e Mon Sep 17 00:00:00 2001 From: marcello33 Date: Wed, 13 Nov 2024 15:13:40 +0100 Subject: [PATCH 4/5] cgh: lint --- src/setup/heimdall/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/setup/heimdall/index.js b/src/setup/heimdall/index.js index 67588cf0..81adc47c 100644 --- a/src/setup/heimdall/index.js +++ b/src/setup/heimdall/index.js @@ -313,8 +313,7 @@ export class Heimdall { /bor_rpc_url[ ]*=[ ]*".*"/gi, 'bor_rpc_url = "http://localhost:8545"' ) - .replace(/bor_grpc_flag[ ]*=[ ]*".*"/gi, - 'bor_grpc_flag = "true"') + .replace(/bor_grpc_flag[ ]*=[ ]*".*"/gi, 'bor_grpc_flag = "true"') .replace( /bor_grpc_url[ ]*=[ ]*".*"/gi, 'bor_grpc_url = "localhost:3131"' From 1c54ba13f05861b14e9b2111d8f242c30b9e62fd Mon Sep 17 00:00:00 2001 From: marcello33 Date: Wed, 13 Nov 2024 16:23:40 +0100 Subject: [PATCH 5/5] chg: fix bash warnings --- .github/integration-tests/bor_health.sh | 4 ++-- .github/integration-tests/smoke_test.sh | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/integration-tests/bor_health.sh b/.github/integration-tests/bor_health.sh index 0791d415..46999209 100644 --- a/.github/integration-tests/bor_health.sh +++ b/.github/integration-tests/bor_health.sh @@ -11,5 +11,5 @@ do fi done -echo $peers -echo $block +echo "$peers" +echo "$block" diff --git a/.github/integration-tests/smoke_test.sh b/.github/integration-tests/smoke_test.sh index 4541ec5d..5ef75568 100644 --- a/.github/integration-tests/smoke_test.sh +++ b/.github/integration-tests/smoke_test.sh @@ -18,7 +18,7 @@ do exit 1 fi - if (( $balance > $balanceInit )); then + if (( balance > balanceInit )); then if [ $stateSyncFound != "true" ]; then stateSyncTime=$(( SECONDS - start_time )) stateSyncFound="true" @@ -27,7 +27,7 @@ do checkpointID=$(curl -sL http://localhost:1317/checkpoints/latest | jq .result.id) - if [ $checkpointID != "null" ]; then + if [ "$checkpointID" != "null" ]; then if [ $checkpointFound != "true" ]; then checkpointTime=$(( SECONDS - start_time )) checkpointFound="true" @@ -40,5 +40,5 @@ do done echo "Both state sync and checkpoint went through. All tests have passed!" -echo "Time taken for state sync: $(printf '%02dm:%02ds\n' $(($stateSyncTime%3600/60)) $(($stateSyncTime%60)))" -echo "Time taken for checkpoint: $(printf '%02dm:%02ds\n' $(($checkpointTime%3600/60)) $(($checkpointTime%60)))" +echo "Time taken for state sync: $(printf '%02dm:%02ds\n' $((stateSyncTime%3600/60)) $((stateSyncTime%60)))" +echo "Time taken for checkpoint: $(printf '%02dm:%02ds\n' $((checkpointTime%3600/60)) $((checkpointTime%60)))"