go-ethereum icon indicating copy to clipboard operation
go-ethereum copied to clipboard

miner: build a more Merge friendly pending block

Open riposteX opened this issue 3 years ago • 0 comments

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.

riposteX avatar Sep 21 '22 00:09 riposteX