go-ethereum
go-ethereum copied to clipboard
miner: build a more Merge friendly pending block
Adjust geth's block building parameters to produce (most of the time) a block acceptable to consensus clients.
-
Set header.Time = parent.Time() + 12. This is the correct value unless the previous slot block proposal was missed.
-
Set header.MixDigest = parent.Header().MixDigest. This is the correct value except at the beginning of a new epoch.
-
Apply FinalizeAndAssemble to the snapshot block. This sets header.Root
An alternative would be to add/modify an API which allows the user to specify these values, similar to how the consensus client currently acquires a block from geth.