diff --git a/node/default.config.toml b/node/default.config.toml index 2661b8f403..c4a200ce3a 100644 --- a/node/default.config.toml +++ b/node/default.config.toml @@ -6,6 +6,7 @@ db_path = '/tmp/rusk-harness/' consensus_keys_path = '/tmp/consensus_bls.keys' generation_timeout = '3s' max_queue_size = 5000 +block_gas_limit = 5000000000 [chain.db_options] enable_debug = false diff --git a/node/src/chain/consensus.rs b/node/src/chain/consensus.rs index d2838cad01..d8150151bd 100644 --- a/node/src/chain/consensus.rs +++ b/node/src/chain/consensus.rs @@ -361,4 +361,8 @@ impl Operations for Executor { Ok(()) } + + async fn get_block_gas_limit(&self) -> u64 { + self.vm.read().await.get_block_gas_limit() + } } diff --git a/node/src/vm.rs b/node/src/vm.rs index 72d2f9361a..8e29e30184 100644 --- a/node/src/vm.rs +++ b/node/src/vm.rs @@ -66,6 +66,9 @@ pub trait VMExecution: Send + Sync + 'static { /// Returns last finalized state root fn get_finalized_state_root(&self) -> anyhow::Result<[u8; 32]>; + /// Returns block gas limit + fn get_block_gas_limit(&self) -> u64; + fn revert(&self, state_hash: [u8; 32]) -> anyhow::Result<[u8; 32]>; fn revert_to_finalized(&self) -> anyhow::Result<[u8; 32]>; }