diff --git a/apply_test_vectors.sh b/apply_test_vectors.sh index 08ef2bf..4fbbc70 100755 --- a/apply_test_vectors.sh +++ b/apply_test_vectors.sh @@ -8,8 +8,10 @@ OUT_DIR=./blocks N=5 -function apply_block() { - BLOCK=$1 +function apply_block_file() { + BLOCK_FILEPATH=$1 + BLOCK=$(<$BLOCK_FILEPATH) + echo Applying $BLOCK # The ASCII representation of `2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a` JWT_SECRET="********************************" @@ -58,8 +60,6 @@ function apply_block() { for ((i = 1; i <= N; i++)); do BLOCK_FILEPATH=$OUT_DIR/block_$i.json - BLOCK=$(cat $BLOCK_FILEPATH) - echo Applying $BLOCK - apply_block $BLOCK + apply_block_file $BLOCK_FILEPATH done diff --git a/chiado_genesis_alloc.json b/chiado_genesis_alloc.json index d0ca528..351cb96 100644 --- a/chiado_genesis_alloc.json +++ b/chiado_genesis_alloc.json @@ -16,8 +16,8 @@ }, "terminalTotalDifficulty": 0, "terminalTotalDifficultyPassed": true, - "shanghaiTime": 1704401480, - "cancunTime": 1704403000, + "shanghaiTime": 9999999999, + "cancunTime": 9999999999, "minBlobGasPrice": 1000000000, "maxBlobGasPerBlock": 262144, "targetBlobGasPerBlock": 131072, diff --git a/src/consensus.rs b/src/consensus.rs index 4fc7f64..b55509b 100644 --- a/src/consensus.rs +++ b/src/consensus.rs @@ -19,7 +19,8 @@ impl GnosisBeaconConsensus { // `validate_header`, `validate_header_against_parent`, `validate_header_with_total_difficulty`, `validate_block_pre_execution`, `validate_block_post_execution` impl Consensus for GnosisBeaconConsensus { fn validate_header(&self, _header: &SealedHeader) -> Result<(), ConsensusError> { - todo!(); + // TODO + Ok(()) } fn validate_header_against_parent( @@ -27,7 +28,8 @@ impl Consensus for GnosisBeaconConsensus { _header: &SealedHeader, _parent: &SealedHeader, ) -> Result<(), ConsensusError> { - todo!(); + // TODO + Ok(()) } fn validate_header_with_total_difficulty( @@ -35,11 +37,13 @@ impl Consensus for GnosisBeaconConsensus { _header: &Header, _total_difficulty: U256, ) -> Result<(), ConsensusError> { - todo!(); + // TODO + Ok(()) } fn validate_block_pre_execution(&self, _block: &SealedBlock) -> Result<(), ConsensusError> { - todo!(); + // TODO + Ok(()) } fn validate_block_post_execution( @@ -47,6 +51,7 @@ impl Consensus for GnosisBeaconConsensus { _block: &BlockWithSenders, _input: PostExecutionInput<'_>, ) -> Result<(), ConsensusError> { - todo!(); + // TODO + Ok(()) } } diff --git a/src/lib.rs b/src/lib.rs index 0878f40..79d9082 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,7 +11,10 @@ use reth::{ }, }; use reth_node_ethereum::{ - node::{EthereumNetworkBuilder, EthereumPayloadBuilder, EthereumPoolBuilder}, + node::{ + EthereumConsensusBuilder, EthereumNetworkBuilder, EthereumPayloadBuilder, + EthereumPoolBuilder, + }, EthEngineTypes, EthereumNode, }; use std::sync::Arc; @@ -51,14 +54,12 @@ impl GnosisNode { EthereumPayloadBuilder, EthereumNetworkBuilder, GnosisExecutorBuilder, - GnosisConsensusBuilder, + EthereumConsensusBuilder, > where Node: FullNodeTypes, { - EthereumNode::components() - .executor(GnosisExecutorBuilder::default()) - .consensus(GnosisConsensusBuilder::default()) + EthereumNode::components().executor(GnosisExecutorBuilder::default()) } } @@ -78,7 +79,7 @@ where EthereumPayloadBuilder, EthereumNetworkBuilder, GnosisExecutorBuilder, - GnosisConsensusBuilder, + EthereumConsensusBuilder, >; fn components_builder(self) -> Self::ComponentsBuilder {