From 60f22c7e3c56858dff93291b4dfd8840f4cab600 Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Thu, 7 Sep 2023 21:46:48 -0400 Subject: [PATCH] fix: enable cancun in transaction validator if active at genesis --- crates/transaction-pool/src/validate/eth.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/transaction-pool/src/validate/eth.rs b/crates/transaction-pool/src/validate/eth.rs index 01f5253b3c52..5eb8cd498c43 100644 --- a/crates/transaction-pool/src/validate/eth.rs +++ b/crates/transaction-pool/src/validate/eth.rs @@ -380,6 +380,9 @@ pub struct EthTransactionValidatorBuilder { impl EthTransactionValidatorBuilder { /// Creates a new builder for the given [ChainSpec] pub fn new(chain_spec: Arc) -> Self { + // If cancun is enabled at genesis, enable it + let cancun = chain_spec.is_cancun_activated_at_timestamp(chain_spec.genesis_timestamp()); + Self { chain_spec, block_gas_limit: ETHEREUM_BLOCK_GAS_LIMIT, @@ -398,7 +401,7 @@ impl EthTransactionValidatorBuilder { shanghai: true, // TODO: can hard enable by default once mainnet transitioned - cancun: false, + cancun, } }