From 99506d7ad5540812ee820d43d36d5d4ec1e7ac80 Mon Sep 17 00:00:00 2001 From: jacekv Date: Fri, 27 Sep 2024 13:40:27 +0200 Subject: [PATCH] PAN-2194: Adding field back in --- pantos/servicenode/blockchains/base.py | 3 +++ service-node-config.yml | 16 ++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/pantos/servicenode/blockchains/base.py b/pantos/servicenode/blockchains/base.py index ec84b70..f562fda 100644 --- a/pantos/servicenode/blockchains/base.py +++ b/pantos/servicenode/blockchains/base.py @@ -646,6 +646,9 @@ def _start_transaction_submission( min_adaptable_fee_per_gas = \ self._get_config()['min_adaptable_fee_per_gas'] max_total_fee_per_gas = self._get_config().get('max_total_fee_per_gas') + if max_total_fee_per_gas == 0: + # Since YAML Tag directives do not support the `or` operation + max_total_fee_per_gas = None adaptable_fee_increase_factor = \ self._get_config()['adaptable_fee_increase_factor'] blocks_until_resubmission = \ diff --git a/service-node-config.yml b/service-node-config.yml index 47af242..4d077c4 100644 --- a/service-node-config.yml +++ b/service-node-config.yml @@ -69,7 +69,7 @@ blockchains: pan_token: !ENV ${AVALANCHE_PAN_TOKEN:0xC892F1D09a7BEF98d65e7f9bD4642d36BC506441} confirmations: !ENV tag:yaml.org,2002:int ${AVALANCHE_CONFIRMATIONS:20} min_adaptable_fee_per_gas: !ENV tag:yaml.org,2002:int ${AVALANCHE_MIN_ADAPTABLE_FEE_PER_GAS:1000000000} - #max_total_fee_per_gas: !ENV tag:yaml.org,2002:int ${AVALANCHE_MAX_TOTAL_FEE_PER_GAS: } + max_total_fee_per_gas: !ENV tag:yaml.org,2002:int ${AVALANCHE_MAX_TOTAL_FEE_PER_GAS:0} adaptable_fee_increase_factor: !ENV tag:yaml.org,2002:float ${AVALANCHE_ADAPTABLE_FEE_INCREASE_FACTOR:1.101} blocks_until_resubmission: !ENV tag:yaml.org,2002:int ${AVALANCHE_BLOCKS_UNTIL_RESUBMISSION:20} stake: !ENV tag:yaml.org,2002:int ${AVALANCHE_STAKE:10000000000000} @@ -90,7 +90,7 @@ blockchains: 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: } + 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} stake: !ENV tag:yaml.org,2002:int ${BNB_STAKE:10000000000000} @@ -111,7 +111,7 @@ blockchains: pan_token: !ENV ${CELO_PAN_TOKEN:0x5538e600dc919f72858dd4D4F5E4327ec6f2af60} confirmations: !ENV tag:yaml.org,2002:int ${CELO_CONFIRMATIONS:3} min_adaptable_fee_per_gas: !ENV tag:yaml.org,2002:int ${CELO_MIN_ADAPTABLE_FEE_PER_GAS:1000000000} - #max_total_fee_per_gas: !ENV tag:yaml.org,2002:int ${CELO_MAX_TOTAL_FEE_PER_GAS: } + max_total_fee_per_gas: !ENV tag:yaml.org,2002:int ${CELO_MAX_TOTAL_FEE_PER_GAS:0} adaptable_fee_increase_factor: !ENV tag:yaml.org,2002:float ${CELO_ADAPTABLE_FEE_INCREASE_FACTOR:1.101} blocks_until_resubmission: !ENV tag:yaml.org,2002:int ${CELO_BLOCKS_UNTIL_RESUBMISSION:20} stake: !ENV tag:yaml.org,2002:int ${CELO_STAKE:10000000000000} @@ -132,7 +132,7 @@ blockchains: pan_token: !ENV ${CRONOS_PAN_TOKEN:0x5538e600dc919f72858dd4D4F5E4327ec6f2af60} confirmations: !ENV tag:yaml.org,2002:int ${CRONOS_CONFIRMATIONS:3} min_adaptable_fee_per_gas: !ENV tag:yaml.org,2002:int ${CRONOS_MIN_ADAPTABLE_FEE_PER_GAS:1000000000} - #max_total_fee_per_gas: !ENV tag:yaml.org,2002:int ${CRONOS_MAX_TOTAL_FEE_PER_GAS: } + max_total_fee_per_gas: !ENV tag:yaml.org,2002:int ${CRONOS_MAX_TOTAL_FEE_PER_GAS:0} adaptable_fee_increase_factor: !ENV tag:yaml.org,2002:float ${CRONOS_ADAPTABLE_FEE_INCREASE_FACTOR:1.101} blocks_until_resubmission: !ENV tag:yaml.org,2002:int ${CRONOS_BLOCKS_UNTIL_RESUBMISSION:20} stake: !ENV tag:yaml.org,2002:int ${CRONOS_STAKE:10000000000000} @@ -153,7 +153,7 @@ blockchains: pan_token: !ENV ${ETHEREUM_PAN_TOKEN:0x7EFfCc0a130E452c2FB78bFEDBd02a33E03FD50d} confirmations: !ENV tag:yaml.org,2002:int ${ETHEREUM_CONFIRMATIONS:20} min_adaptable_fee_per_gas: !ENV tag:yaml.org,2002:int ${ETHEREUM_MIN_ADAPTABLE_FEE_PER_GAS:1000000000} - #max_total_fee_per_gas: !ENV tag:yaml.org,2002:int ${ETHEREUM_MAX_TOTAL_FEE_PER_GAS: } + max_total_fee_per_gas: !ENV tag:yaml.org,2002:int ${ETHEREUM_MAX_TOTAL_FEE_PER_GAS:0} adaptable_fee_increase_factor: !ENV tag:yaml.org,2002:float ${ETHEREUM_ADAPTABLE_FEE_INCREASE_FACTOR:1.101} blocks_until_resubmission: !ENV tag:yaml.org,2002:int ${ETHEREUM_BLOCKS_UNTIL_RESUBMISSION:20} stake: !ENV tag:yaml.org,2002:int ${ETHEREUM_STAKE:10000000000000} @@ -174,7 +174,7 @@ blockchains: pan_token: !ENV ${FANTOM_PAN_TOKEN:0x5538e600dc919f72858dd4D4F5E4327ec6f2af60} confirmations: !ENV tag:yaml.org,2002:int ${FANTOM_CONFIRMATIONS:6} min_adaptable_fee_per_gas: !ENV tag:yaml.org,2002:int ${FANTOM_MIN_ADAPTABLE_FEE_PER_GAS:1000000000} - #max_total_fee_per_gas: !ENV tag:yaml.org,2002:int ${FANTOM_MAX_TOTAL_FEE_PER_GAS: } + max_total_fee_per_gas: !ENV tag:yaml.org,2002:int ${FANTOM_MAX_TOTAL_FEE_PER_GAS:0} adaptable_fee_increase_factor: !ENV tag:yaml.org,2002:float ${FANTOM_ADAPTABLE_FEE_INCREASE_FACTOR:1.101} blocks_until_resubmission: !ENV tag:yaml.org,2002:int ${FANTOM_BLOCKS_UNTIL_RESUBMISSION:20} stake: !ENV tag:yaml.org,2002:int ${FANTOM_STAKE:10000000000000} @@ -195,7 +195,7 @@ blockchains: pan_token: !ENV ${POLYGON_PAN_TOKEN:0xC892F1D09a7BEF98d65e7f9bD4642d36BC506441} confirmations: !ENV tag:yaml.org,2002:int ${POLYGON_CONFIRMATIONS:200} min_adaptable_fee_per_gas: !ENV tag:yaml.org,2002:int ${POLYGON_MIN_ADAPTABLE_FEE_PER_GAS:1000000000} - #max_total_fee_per_gas: !ENV tag:yaml.org,2002:int ${POLYGON_MAX_TOTAL_FEE_PER_GAS: } + max_total_fee_per_gas: !ENV tag:yaml.org,2002:int ${POLYGON_MAX_TOTAL_FEE_PER_GAS:0} adaptable_fee_increase_factor: !ENV tag:yaml.org,2002:float ${POLYGON_ADAPTABLE_FEE_INCREASE_FACTOR:1.101} blocks_until_resubmission: !ENV tag:yaml.org,2002:int ${POLYGON_BLOCKS_UNTIL_RESUBMISSION:20} stake: !ENV tag:yaml.org,2002:int ${POLYGON_STAKE:10000000000000} @@ -215,7 +215,7 @@ blockchains: pan_token: !ENV ${SOLANA_PAN_TOKEN:' '} confirmations: !ENV tag:yaml.org,2002:int ${SOLANA_CONFIRMATIONS:1} min_adaptable_fee_per_gas: !ENV tag:yaml.org,2002:int ${SOLANA_MIN_ADAPTABLE_FEE_PER_GAS:1000000000} - #max_total_fee_per_gas: !ENV tag:yaml.org,2002:int ${SOLANA_MAX_TOTAL_FEE_PER_GAS:' '} + max_total_fee_per_gas: !ENV tag:yaml.org,2002:int ${SOLANA_MAX_TOTAL_FEE_PER_GAS:0} adaptable_fee_increase_factor: !ENV tag:yaml.org,2002:float ${SOLANA_ADAPTABLE_FEE_INCREASE_FACTOR:1.101} blocks_until_resubmission: !ENV tag:yaml.org,2002:int ${SOLANA_BLOCKS_UNTIL_RESUBMISSION:20} stake: !ENV tag:yaml.org,2002:int ${SOLANA_STAKE:10000000000000}