MCPcopy Create free account
hub / github.com/base/base / validate_base_time_progression

Function validate_base_time_progression

crates/execution/node/src/engine.rs:766–791  ·  view source on GitHub ↗
(
        parent_timestamp: u64,
        parent_millis_part: u16,
        child_timestamp: u64,
        child_millis_part: u16,
        withdrawals_root: B256,
    )

Source from the content-addressed store, hash-verified

764 }
765
766 fn validate_base_time_progression(
767 parent_timestamp: u64,
768 parent_millis_part: u16,
769 child_timestamp: u64,
770 child_millis_part: u16,
771 withdrawals_root: B256,
772 ) -> Result<(), InsertBlockErrorKind> {
773 let validator = validator_with_chain_spec(
774 BaseChainSpecBuilder::base_mainnet()
775 .with_fork(BaseUpgrade::Denim, ForkCondition::Timestamp(DENIM_TIMESTAMP))
776 .build(),
777 );
778 let block = base_time_block(child_timestamp, child_millis_part, withdrawals_root);
779 let parent =
780 SealedHeader::seal_slow(Header { timestamp: parent_timestamp, ..Default::default() });
781 let state_updates = HashedPostState::default();
782 let parent_state = parent_state(parent_millis_part);
783
784 PayloadValidator::<BaseEngineTypes>::validate_block_post_execution_with_hashed_state(
785 &validator,
786 || &state_updates,
787 &block,
788 &parent,
789 || Ok(Box::new(parent_state)),
790 )
791 }
792
793 fn base_consensus_error(error: &InsertBlockErrorKind) -> Option<&BaseConsensusError> {
794 let InsertBlockErrorKind::Consensus(ConsensusError::Other(error)) = error else {

Calls 6

base_time_blockFunction · 0.85
parent_stateFunction · 0.85
with_forkMethod · 0.80
newFunction · 0.50
buildMethod · 0.45