@@ -30,16 +30,18 @@ import (
3030
3131// Genesis hashes to enforce below configs on.
3232var (
33- MainnetGenesisHash = common .HexToHash ("0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3" )
34- RopstenGenesisHash = common .HexToHash ("0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d" )
35- SepoliaGenesisHash = common .HexToHash ("0x25a5cc106eea7138acab33231d7160d69cb777ee0c2c553fcddf5138993e6dd9" )
36- RinkebyGenesisHash = common .HexToHash ("0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177" )
37- GoerliGenesisHash = common .HexToHash ("0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a" )
38- ScrollAlphaGenesisHash = common .HexToHash ("0xa4fc62b9b0643e345bdcebe457b3ae898bef59c7203c3db269200055e037afda" )
39- ScrollSepoliaGenesisHash = common .HexToHash ("0xaa62d1a8b2bffa9e5d2368b63aae0d98d54928bd713125e3fd9e5c896c68592c" )
40- ScrollMainnetGenesisHash = common .HexToHash ("0xbbc05efd412b7cd47a2ed0e5ddfcf87af251e414ea4c801d78b6784513180a80" )
41- ScrollSepoliaGenesisState = common .HexToHash ("0x20695989e9038823e35f0e88fbc44659ffdbfa1fe89fbeb2689b43f15fa64cb5" )
42- ScrollMainnetGenesisState = common .HexToHash ("0x08d535cc60f40af5dd3b31e0998d7567c2d568b224bed2ba26070aeb078d1339" )
33+ MainnetGenesisHash = common .HexToHash ("0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3" )
34+ RopstenGenesisHash = common .HexToHash ("0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d" )
35+ SepoliaGenesisHash = common .HexToHash ("0x25a5cc106eea7138acab33231d7160d69cb777ee0c2c553fcddf5138993e6dd9" )
36+ RinkebyGenesisHash = common .HexToHash ("0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177" )
37+ GoerliGenesisHash = common .HexToHash ("0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a" )
38+ ScrollAlphaGenesisHash = common .HexToHash ("0xa4fc62b9b0643e345bdcebe457b3ae898bef59c7203c3db269200055e037afda" )
39+ ScrollSepoliaGenesisHash = common .HexToHash ("0xaa62d1a8b2bffa9e5d2368b63aae0d98d54928bd713125e3fd9e5c896c68592c" )
40+ ScrollMainnetGenesisHash = common .HexToHash ("0xbbc05efd412b7cd47a2ed0e5ddfcf87af251e414ea4c801d78b6784513180a80" )
41+ ScrollSepoliaGenesisState = common .HexToHash ("0x20695989e9038823e35f0e88fbc44659ffdbfa1fe89fbeb2689b43f15fa64cb5" )
42+ ScrollMainnetGenesisState = common .HexToHash ("0x08d535cc60f40af5dd3b31e0998d7567c2d568b224bed2ba26070aeb078d1339" )
43+ ScrollMainnetMissingHeaderFieldsSHA256 = common .HexToHash ("0xfa2746026ec9590e37e495cb20046e20a38fd0e7099abd2012640dddf6c88b25" )
44+ ScrollSepoliaMissingHeaderFieldsSHA256 = common .HexToHash ("0xa02354c12ca0f918bf4768255af9ed13c137db7e56252348f304b17bb4088924" )
4345)
4446
4547func newUint64 (val uint64 ) * uint64 { return & val }
@@ -354,7 +356,8 @@ var (
354356 ScrollChainAddress : common .HexToAddress ("0x2D567EcE699Eabe5afCd141eDB7A4f2D0D6ce8a0" ),
355357 L2SystemConfigAddress : common .HexToAddress ("0xF444cF06A3E3724e20B35c2989d3942ea8b59124" ),
356358 },
357- GenesisStateRoot : & ScrollSepoliaGenesisState ,
359+ GenesisStateRoot : & ScrollSepoliaGenesisState ,
360+ MissingHeaderFieldsSHA256 : & ScrollSepoliaMissingHeaderFieldsSHA256 ,
358361 },
359362 }
360363
@@ -406,7 +409,8 @@ var (
406409 ScrollChainAddress : common .HexToAddress ("0xa13BAF47339d63B743e7Da8741db5456DAc1E556" ),
407410 L2SystemConfigAddress : common .HexToAddress ("0x331A873a2a85219863d80d248F9e2978fE88D0Ea" ),
408411 },
409- GenesisStateRoot : & ScrollMainnetGenesisState ,
412+ GenesisStateRoot : & ScrollMainnetGenesisState ,
413+ MissingHeaderFieldsSHA256 : & ScrollMainnetMissingHeaderFieldsSHA256 ,
410414 },
411415 }
412416
@@ -710,6 +714,9 @@ type ScrollConfig struct {
710714
711715 // Genesis State Root for MPT clients
712716 GenesisStateRoot * common.Hash `json:"genesisStateRoot,omitempty"`
717+
718+ // MissingHeaderFieldsSHA256 is the SHA256 hash of the missing header fields file.
719+ MissingHeaderFieldsSHA256 * common.Hash `json:"missingHeaderFieldsSHA256,omitempty"`
713720}
714721
715722// L1Config contains the l1 parameters needed to sync l1 contract events (e.g., l1 messages, commit/revert/finalize batches) in the sequencer
@@ -760,8 +767,13 @@ func (s ScrollConfig) String() string {
760767 genesisStateRoot = fmt .Sprintf ("%v" , * s .GenesisStateRoot )
761768 }
762769
763- return fmt .Sprintf ("{useZktrie: %v, maxTxPerBlock: %v, MaxTxPayloadBytesPerBlock: %v, feeVaultAddress: %v, l1Config: %v, genesisStateRoot: %v}" ,
764- s .UseZktrie , maxTxPerBlock , maxTxPayloadBytesPerBlock , s .FeeVaultAddress , s .L1Config .String (), genesisStateRoot )
770+ missingHeaderFieldsSHA256 := "<nil>"
771+ if s .MissingHeaderFieldsSHA256 != nil {
772+ missingHeaderFieldsSHA256 = fmt .Sprintf ("%v" , * s .MissingHeaderFieldsSHA256 )
773+ }
774+
775+ return fmt .Sprintf ("{useZktrie: %v, maxTxPerBlock: %v, MaxTxPayloadBytesPerBlock: %v, feeVaultAddress: %v, l1Config: %v, genesisStateRoot: %v, missingHeaderFieldsSHA256: %v}" ,
776+ s .UseZktrie , maxTxPerBlock , maxTxPayloadBytesPerBlock , s .FeeVaultAddress , s .L1Config .String (), genesisStateRoot , missingHeaderFieldsSHA256 )
765777}
766778
767779// IsValidTxCount returns whether the given block's transaction count is below the limit.
0 commit comments