Skip to content

Commit

Permalink
unschedule shangai
Browse files Browse the repository at this point in the history
  • Loading branch information
dapplion committed Aug 3, 2024
1 parent 9ac77c5 commit 2c82519
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 18 deletions.
10 changes: 5 additions & 5 deletions apply_test_vectors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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="********************************"
Expand Down Expand Up @@ -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

4 changes: 2 additions & 2 deletions chiado_genesis_alloc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
},
"terminalTotalDifficulty": 0,
"terminalTotalDifficultyPassed": true,
"shanghaiTime": 1704401480,
"cancunTime": 1704403000,
"shanghaiTime": 9999999999,
"cancunTime": 9999999999,
"minBlobGasPrice": 1000000000,
"maxBlobGasPerBlock": 262144,
"targetBlobGasPerBlock": 131072,
Expand Down
15 changes: 10 additions & 5 deletions src/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,39 @@ 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(
&self,
_header: &SealedHeader,
_parent: &SealedHeader,
) -> Result<(), ConsensusError> {
todo!();
// TODO
Ok(())
}

fn validate_header_with_total_difficulty(
&self,
_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(
&self,
_block: &BlockWithSenders,
_input: PostExecutionInput<'_>,
) -> Result<(), ConsensusError> {
todo!();
// TODO
Ok(())
}
}
13 changes: 7 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -51,14 +54,12 @@ impl GnosisNode {
EthereumPayloadBuilder,
EthereumNetworkBuilder,
GnosisExecutorBuilder,
GnosisConsensusBuilder,
EthereumConsensusBuilder,
>
where
Node: FullNodeTypes<Engine = EthEngineTypes>,
{
EthereumNode::components()
.executor(GnosisExecutorBuilder::default())
.consensus(GnosisConsensusBuilder::default())
EthereumNode::components().executor(GnosisExecutorBuilder::default())
}
}

Expand All @@ -78,7 +79,7 @@ where
EthereumPayloadBuilder,
EthereumNetworkBuilder,
GnosisExecutorBuilder,
GnosisConsensusBuilder,
EthereumConsensusBuilder,
>;

fn components_builder(self) -> Self::ComponentsBuilder {
Expand Down

0 comments on commit 2c82519

Please sign in to comment.