Commit 7ffb8350 authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

Merge pull request #1303 from ethereum-optimism/fix/deterministic-extradata

l2geth: make block hashes deterministic
parents 33cb9025 11d46182
---
'@eth-optimism/l2geth': patch
---
Make the extradata deterministic for deterministic block hashes
......@@ -241,6 +241,16 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
}
func makeExtraData(extra []byte) []byte {
if vm.UsingOVM {
// Make the extradata deterministic
extra, _ = rlp.EncodeToBytes([]interface{}{
uint(params.VersionMajor<<16 | params.VersionMinor<<8 | params.VersionPatch),
"geth",
"go1.15.13",
"linux",
})
return extra
}
if len(extra) == 0 {
// create default extradata
extra, _ = rlp.EncodeToBytes([]interface{}{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment