Skip to content

Do not call ProcessParentBlockHash during process #444

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion core/state_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg
if beaconRoot := block.BeaconRoot(); beaconRoot != nil {
ProcessBeaconBlockRoot(*beaconRoot, evm)
}
if p.config.IsPrague(block.Number(), block.Time(), context.ArbOSVersion) || p.config.IsVerkle(block.Number(), block.Time()) {
// We do not need to process the parent block hash if we are on Arbitrum.
// This is taken care of in the while we process the arbitrum internal transaction.
if !p.config.IsArbitrum() && (p.config.IsPrague(block.Number(), block.Time(), context.ArbOSVersion) || p.config.IsVerkle(block.Number(), block.Time())) {
ProcessParentBlockHash(block.ParentHash(), evm)
}

Expand Down
7 changes: 6 additions & 1 deletion params/protocol_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,12 @@ var (

// EIP-2935 - Serve historical block hashes from state
HistoryStorageAddress = common.HexToAddress("0x0000F90827F1C53a10cb7A02335B175320002935")
HistoryStorageCode = common.FromHex("3373fffffffffffffffffffffffffffffffffffffffe14604857602036036044575f356001430381116044576205ffd0814303116044576205ffd09006545f5260205ff35b5f5ffd5b5f356205ffd060014303065500")
HistoryStorageCode = common.FromHex("3373fffffffffffffffffffffffffffffffffffffffe14604657602036036042575f35600143038111604257611fff81430311604257611fff9006545f5260205ff35b5f5ffd5b5f35611fff60014303065500")
// EIP-2935 - Serve historical block hashes from state (Arbitrum), majorly differ from the original in two aspects:
// 1. The buffer size is 393168 blocks instead of 8191.
// 2. Instead of using number (L1 block number), it uses arb_block_num (L2 block number).
// https://github.com/OffchainLabs/sys-asm/blob/main/src/execution_hash/main.eas
HistoryStorageCodeArbitrum = common.FromHex("3373fffffffffffffffffffffffffffffffffffffffe14607657602036036072575f35600163a3b1b31d5f5260205f6004601c60645afa156072575f510381116072576205ffd08163a3b1b31d5f5260205f6004601c60645afa156072575f5103116072576205ffd09006545f5260205ff35b5f5ffd5b5f356205ffd0600163a3b1b31d5f5260205f6004601c60645afa156072575f5103065500")

// EIP-7002 - Execution layer triggerable withdrawals
WithdrawalQueueAddress = common.HexToAddress("0x00000961Ef480Eb55e80D19ad83579A64c007002")
Expand Down
Loading