Skip to content

Commit 8df47a2

Browse files
committed
Merge branch 'develop' into l1data-to-rollupfee
2 parents 1fbe3ea + a67863c commit 8df47a2

File tree

3 files changed

+64
-32
lines changed

3 files changed

+64
-32
lines changed

eth/api.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,11 @@ func generateWitness(blockchain *core.BlockChain, block *types.Block) (*stateles
362362
// Collect storage locations that prover needs but sequencer might not touch necessarily
363363
statedb.GetState(rcfg.L2MessageQueueAddress, rcfg.WithdrawTrieRootSlot)
364364

365+
// Note: scroll-revm detects the Feynman transition block using this storage slot,
366+
// since it does not have access to the parent block timestamp. We need to make
367+
// sure that this is always present in the execution witness.
368+
statedb.GetState(rcfg.L1GasPriceOracleAddress, rcfg.IsFeynmanSlot)
369+
365370
receipts, _, usedGas, err := blockchain.Processor().Process(block, statedb, *blockchain.GetVMConfig())
366371
if err != nil {
367372
return nil, fmt.Errorf("failed to process block %d: %w", block.Number(), err)

miner/scroll_worker.go

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -633,10 +633,9 @@ func (w *worker) handleForks(parent *types.Block) (bool, error) {
633633
return true, nil
634634
}
635635

636-
// Stop/start miner at Euclid fork boundary on zktrie/mpt nodes
637-
if w.chainConfig.IsEuclid(w.current.header.Time) {
638-
parent := w.chain.GetBlockByHash(w.current.header.ParentHash)
639-
return parent != nil && !w.chainConfig.IsEuclid(parent.Time()), nil
636+
// Apply Feynman hard fork
637+
if w.chainConfig.IsFeynmanTransitionBlock(w.current.header.Time, parent.Time()) {
638+
misc.ApplyFeynmanHardFork(w.current.state)
640639
}
641640

642641
// Apply Feynman hard fork
@@ -651,6 +650,12 @@ func (w *worker) handleForks(parent *types.Block) (bool, error) {
651650
core.ProcessParentBlockHash(w.current.header.ParentHash, vmenv, w.current.state)
652651
}
653652

653+
// Stop/start miner at Euclid fork boundary on zktrie/mpt nodes
654+
if w.chainConfig.IsEuclid(w.current.header.Time) {
655+
parent := w.chain.GetBlockByHash(w.current.header.ParentHash)
656+
return parent != nil && !w.chainConfig.IsEuclid(parent.Time()), nil
657+
}
658+
654659
return false, nil
655660
}
656661

0 commit comments

Comments
 (0)