From eeb7bc45f222afcdb7c3bd5526540047f8abf99a Mon Sep 17 00:00:00 2001 From: Joe Matthew Date: Tue, 8 Oct 2024 11:28:04 +0200 Subject: [PATCH] fix: migrate to bnb chain --- .github/workflows/ci.yaml | 6 +++--- docker-compose.override.yml | 4 ++-- service-node-config.docker.env | 14 ++++++------- service-node-config.env | 38 +++++++++++++++++----------------- service-node-config.local.env | 16 +++++++------- service-node-config.yml | 38 +++++++++++++++++----------------- 6 files changed, 58 insertions(+), 58 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6763571..2095c20 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -229,10 +229,10 @@ jobs: docker cp $ETH_TASK_ID:/data/ETHEREUM.env /etc/pantos/ETHEREUM.env # Get the task ID for the bnb service - BNB_TASK_ID=$(docker ps --filter "name=stack-ethereum-contracts--1-bnb" --format "{{.ID}}") + BNB_CHAIN_TASK_ID=$(docker ps --filter "name=stack-ethereum-contracts--1-bnb" --format "{{.ID}}") # Copy files from the bnb service - docker cp $BNB_TASK_ID:/data/keystore /etc/pantos/keystore.bnb - docker cp $BNB_TASK_ID:/data/BNB.env /etc/pantos/BNB.env + docker cp $BNB_CHAIN_TASK_ID:/data/keystore /etc/pantos/keystore.bnb + docker cp $BNB_CHAIN_TASK_ID:/data/BNB.env /etc/pantos/BNB.env working-directory: ethereum-contracts - name: Set env diff --git a/docker-compose.override.yml b/docker-compose.override.yml index adb8c5d..dc4359a 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -13,7 +13,7 @@ services: environment: PANTOS_ENV_FILE: /etc/pantos/service-node-config.env APP_URL: http://localhost:808${INSTANCE-1} - BNB_PRIVATE_KEY: /etc/pantos/bnb-data/keystore + BNB_CHAIN_PRIVATE_KEY: /etc/pantos/bnb-data/keystore ETHEREUM_PRIVATE_KEY: /etc/pantos/eth-data/keystore volumes: - type: volume @@ -46,7 +46,7 @@ services: environment: PANTOS_ENV_FILE: /etc/pantos/service-node-config.env APP_URL: http://localhost:808${INSTANCE-1} - BNB_PRIVATE_KEY: /etc/pantos/bnb-data/keystore + BNB_CHAIN_PRIVATE_KEY: /etc/pantos/bnb-data/keystore ETHEREUM_PRIVATE_KEY: /etc/pantos/eth-data/keystore PANTOS_STATUS_MONITOR: 1 ports: diff --git a/service-node-config.docker.env b/service-node-config.docker.env index 6268cab..bd46183 100644 --- a/service-node-config.docker.env +++ b/service-node-config.docker.env @@ -9,13 +9,13 @@ PROTOCOL=0.1.0 AVALANCHE_ACTIVE=false # BNB -#BNB_WITHDRAWAL_ADDRESS=' ' -BNB_PRIVATE_KEY_PASSWORD='' -BNB_PROVIDER=http://bnb:8545 -BNB_CHAIN_ID=31338 -BNB_FALLBACK_PROVIDER=' ' -BNB_CONFIRMATIONS=0 -BNB_BLOCKS_UNTIL_RESUBMISSION=10 +#BNB_CHAIN_WITHDRAWAL_ADDRESS=' ' +BNB_CHAIN_PRIVATE_KEY_PASSWORD='' +BNB_CHAIN_PROVIDER=http://bnb:8545 +BNB_CHAIN_CHAIN_ID=31338 +BNB_CHAIN_FALLBACK_PROVIDER=' ' +BNB_CHAIN_CONFIRMATIONS=0 +BNB_CHAIN_BLOCKS_UNTIL_RESUBMISSION=10 # Celo CELO_ACTIVE=false diff --git a/service-node-config.env b/service-node-config.env index f549978..db9aa41 100644 --- a/service-node-config.env +++ b/service-node-config.env @@ -72,25 +72,25 @@ AVALANCHE_PRIVATE_KEY_PASSWORD='' # AVALANCHE_BLOCKS_UNTIL_RESUBMISSION= # AVALANCHE_DEPOSIT= ##### Section: bnb_chain ##### -# BNB_ACTIVE= -# BNB_REGISTERED= -BNB_WITHDRAWAL_ADDRESS='' -# BNB_PRIVATE_KEY= -BNB_PRIVATE_KEY_PASSWORD='' -# BNB_PROVIDER= -# BNB_FALLBACK_PROVIDER= -# BNB_AVERAGE_BLOCK_TIME= -# BNB_PROVIDER_TIMEOUT= -# BNB_CHAIN_ID= -# BNB_HUB= -# BNB_FORWARDER= -# BNB_PAN_TOKEN= -# BNB_CONFIRMATIONS= -# BNB_MIN_ADAPTABLE_FEE_PER_GAS= -# BNB_MAX_TOTAL_FEE_PER_GAS= -# BNB_ADAPTABLE_FEE_INCREASE_FACTOR= -# BNB_BLOCKS_UNTIL_RESUBMISSION= -# BNB_DEPOSIT= +# BNB_CHAIN_ACTIVE= +# BNB_CHAIN_REGISTERED= +BNB_CHAIN_WITHDRAWAL_ADDRESS='' +# BNB_CHAIN_PRIVATE_KEY= +BNB_CHAIN_PRIVATE_KEY_PASSWORD='' +# BNB_CHAIN_PROVIDER= +# BNB_CHAIN_FALLBACK_PROVIDER= +# BNB_CHAIN_AVERAGE_BLOCK_TIME= +# BNB_CHAIN_PROVIDER_TIMEOUT= +# BNB_CHAIN_CHAIN_ID= +# BNB_CHAIN_HUB= +# BNB_CHAIN_FORWARDER= +# BNB_CHAIN_PAN_TOKEN= +# BNB_CHAIN_CONFIRMATIONS= +# BNB_CHAIN_MIN_ADAPTABLE_FEE_PER_GAS= +# BNB_CHAIN_MAX_TOTAL_FEE_PER_GAS= +# BNB_CHAIN_ADAPTABLE_FEE_INCREASE_FACTOR= +# BNB_CHAIN_BLOCKS_UNTIL_RESUBMISSION= +# BNB_CHAIN_DEPOSIT= ##### Section: celo ##### # CELO_ACTIVE= # CELO_REGISTERED= diff --git a/service-node-config.local.env b/service-node-config.local.env index fd0270e..05e42f0 100644 --- a/service-node-config.local.env +++ b/service-node-config.local.env @@ -24,15 +24,15 @@ SIGNER_PEM_PASSWORD=1234 AVALANCHE_ACTIVE=false # BNB -#BNB_WITHDRAWAL_ADDRESS=' ' +#BNB_CHAIN_WITHDRAWAL_ADDRESS=' ' # **This path is used in CI** -BNB_PRIVATE_KEY=/etc/pantos/keystore.bnb -BNB_PRIVATE_KEY_PASSWORD='' -BNB_PROVIDER=http://localhost:8511 -BNB_CHAIN_ID=31338 -BNB_FALLBACK_PROVIDER=' ' -BNB_CONFIRMATIONS=2 -BNB_BLOCKS_UNTIL_RESUBMISSION=10 +BNB_CHAIN_PRIVATE_KEY=/etc/pantos/keystore.bnb +BNB_CHAIN_PRIVATE_KEY_PASSWORD='' +BNB_CHAIN_PROVIDER=http://localhost:8511 +BNB_CHAIN_CHAIN_ID=31338 +BNB_CHAIN_FALLBACK_PROVIDER=' ' +BNB_CHAIN_CONFIRMATIONS=2 +BNB_CHAIN_BLOCKS_UNTIL_RESUBMISSION=10 # Celo CELO_ACTIVE=false diff --git a/service-node-config.yml b/service-node-config.yml index e9a1373..5a03bfb 100644 --- a/service-node-config.yml +++ b/service-node-config.yml @@ -76,26 +76,26 @@ blockchains: blocks_until_resubmission: !ENV tag:yaml.org,2002:int ${AVALANCHE_BLOCKS_UNTIL_RESUBMISSION:20} deposit: !ENV tag:yaml.org,2002:int ${AVALANCHE_DEPOSIT:10000000000000} bnb_chain: - active: !ENV tag:yaml.org,2002:bool ${BNB_ACTIVE:true} - registered: !ENV tag:yaml.org,2002:bool ${BNB_REGISTERED:true} - withdrawal_address: !ENV ${BNB_WITHDRAWAL_ADDRESS:0x726265A9e352F2e9f15F255957840992803cED7d} - private_key: !ENV ${BNB_PRIVATE_KEY:/etc/pantos/service-node.keystore} - private_key_password: !ENV ${BNB_PRIVATE_KEY_PASSWORD:} - provider: !ENV ${BNB_PROVIDER:https://data-seed-prebsc-1-s1.binance.org:8545/} + active: !ENV tag:yaml.org,2002:bool ${BNB_CHAIN_ACTIVE:true} + registered: !ENV tag:yaml.org,2002:bool ${BNB_CHAIN_REGISTERED:true} + withdrawal_address: !ENV ${BNB_CHAIN_WITHDRAWAL_ADDRESS:0x726265A9e352F2e9f15F255957840992803cED7d} + private_key: !ENV ${BNB_CHAIN_PRIVATE_KEY:/etc/pantos/service-node.keystore} + private_key_password: !ENV ${BNB_CHAIN_PRIVATE_KEY_PASSWORD:} + provider: !ENV ${BNB_CHAIN_PROVIDER:https://data-seed-prebsc-1-s1.binance.org:8545/} fallback_providers: - - !ENV ${BNB_FALLBACK_PROVIDER:https://data-seed-prebsc-1-s1.binance.org:8545/} - average_block_time: !ENV tag:yaml.org,2002:int ${BNB_AVERAGE_BLOCK_TIME:3} - provider_timeout: !ENV tag:yaml.org,2002:int ${BNB_PROVIDER_TIMEOUT:100} - chain_id: !ENV tag:yaml.org,2002:int ${BNB_CHAIN_ID:97} - hub: !ENV ${BNB_HUB:0xFB37499DC5401Dc39a0734df1fC7924d769721d5} - forwarder: !ENV ${BNB_FORWARDER:0x8d1A4C7bc5f327f30895150c4596E3db6Eb48562} - pan_token: !ENV ${BNB_PAN_TOKEN:0xC892F1D09a7BEF98d65e7f9bD4642d36BC506441} - confirmations: !ENV tag:yaml.org,2002:int ${BNB_CONFIRMATIONS:20} - min_adaptable_fee_per_gas: !ENV tag:yaml.org,2002:int ${BNB_MIN_ADAPTABLE_FEE_PER_GAS:5000000000} - max_total_fee_per_gas: !ENV tag:yaml.org,2002:int ${BNB_MAX_TOTAL_FEE_PER_GAS:0} - adaptable_fee_increase_factor: !ENV tag:yaml.org,2002:float ${BNB_ADAPTABLE_FEE_INCREASE_FACTOR:1.101} - blocks_until_resubmission: !ENV tag:yaml.org,2002:int ${BNB_BLOCKS_UNTIL_RESUBMISSION:20} - deposit: !ENV tag:yaml.org,2002:int ${BNB_DEPOSIT:10000000000000} + - !ENV ${BNB_CHAIN_FALLBACK_PROVIDER:https://data-seed-prebsc-1-s1.binance.org:8545/} + average_block_time: !ENV tag:yaml.org,2002:int ${BNB_CHAIN_AVERAGE_BLOCK_TIME:3} + provider_timeout: !ENV tag:yaml.org,2002:int ${BNB_CHAIN_PROVIDER_TIMEOUT:100} + chain_id: !ENV tag:yaml.org,2002:int ${BNB_CHAIN_CHAIN_ID:97} + hub: !ENV ${BNB_CHAIN_HUB:0xFB37499DC5401Dc39a0734df1fC7924d769721d5} + forwarder: !ENV ${BNB_CHAIN_FORWARDER:0x8d1A4C7bc5f327f30895150c4596E3db6Eb48562} + pan_token: !ENV ${BNB_CHAIN_PAN_TOKEN:0xC892F1D09a7BEF98d65e7f9bD4642d36BC506441} + confirmations: !ENV tag:yaml.org,2002:int ${BNB_CHAIN_CONFIRMATIONS:20} + min_adaptable_fee_per_gas: !ENV tag:yaml.org,2002:int ${BNB_CHAIN_MIN_ADAPTABLE_FEE_PER_GAS:5000000000} + max_total_fee_per_gas: !ENV tag:yaml.org,2002:int ${BNB_CHAIN_MAX_TOTAL_FEE_PER_GAS:0} + adaptable_fee_increase_factor: !ENV tag:yaml.org,2002:float ${BNB_CHAIN_ADAPTABLE_FEE_INCREASE_FACTOR:1.101} + blocks_until_resubmission: !ENV tag:yaml.org,2002:int ${BNB_CHAIN_BLOCKS_UNTIL_RESUBMISSION:20} + deposit: !ENV tag:yaml.org,2002:int ${BNB_CHAIN_DEPOSIT:10000000000000} celo: active: !ENV tag:yaml.org,2002:bool ${CELO_ACTIVE:true} registered: !ENV tag:yaml.org,2002:bool ${CELO_REGISTERED:true}