@@ -296,11 +296,12 @@ var (
296296 // adding flags to the config to also have to set these fields.
297297 AllEthashProtocolChanges = & ChainConfig {big .NewInt (1337 ), big .NewInt (0 ), nil , false , big .NewInt (0 ), common.Hash {}, big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), nil , new (EthashConfig ), nil ,
298298 ScrollConfig {
299- UseZktrie : false ,
300- FeeVaultAddress : nil ,
301- EnableEIP2718 : true ,
302- EnableEIP1559 : true ,
303- MaxTxPerBlock : nil ,
299+ UseZktrie : false ,
300+ FeeVaultAddress : nil ,
301+ EnableEIP2718 : true ,
302+ EnableEIP1559 : true ,
303+ MaxTxPerBlock : nil ,
304+ MaxTxPayloadBytesPerBlock : nil ,
304305 }}
305306
306307 // AllCliqueProtocolChanges contains every protocol change (EIPs) introduced
@@ -310,30 +311,33 @@ var (
310311 // adding flags to the config to also have to set these fields.
311312 AllCliqueProtocolChanges = & ChainConfig {big .NewInt (1337 ), big .NewInt (0 ), nil , false , big .NewInt (0 ), common.Hash {}, big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), nil , nil , nil , & CliqueConfig {Period : 0 , Epoch : 30000 },
312313 ScrollConfig {
313- UseZktrie : false ,
314- FeeVaultAddress : nil ,
315- EnableEIP2718 : true ,
316- EnableEIP1559 : true ,
317- MaxTxPerBlock : nil ,
314+ UseZktrie : false ,
315+ FeeVaultAddress : nil ,
316+ EnableEIP2718 : true ,
317+ EnableEIP1559 : true ,
318+ MaxTxPerBlock : nil ,
319+ MaxTxPayloadBytesPerBlock : nil ,
318320 }}
319321
320322 TestChainConfig = & ChainConfig {big .NewInt (1 ), big .NewInt (0 ), nil , false , big .NewInt (0 ), common.Hash {}, big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), nil , new (EthashConfig ), nil ,
321323 ScrollConfig {
322- UseZktrie : false ,
323- FeeVaultAddress : & common.Address {123 },
324- EnableEIP2718 : true ,
325- EnableEIP1559 : true ,
326- MaxTxPerBlock : nil ,
324+ UseZktrie : false ,
325+ FeeVaultAddress : & common.Address {123 },
326+ EnableEIP2718 : true ,
327+ EnableEIP1559 : true ,
328+ MaxTxPerBlock : nil ,
329+ MaxTxPayloadBytesPerBlock : nil ,
327330 }}
328331 TestRules = TestChainConfig .Rules (new (big.Int ))
329332
330333 TestNoL1feeChainConfig = & ChainConfig {big .NewInt (1 ), big .NewInt (0 ), nil , false , big .NewInt (0 ), common.Hash {}, big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), big .NewInt (0 ), nil , new (EthashConfig ), nil ,
331334 ScrollConfig {
332- UseZktrie : false ,
333- FeeVaultAddress : nil ,
334- EnableEIP2718 : true ,
335- EnableEIP1559 : true ,
336- MaxTxPerBlock : nil ,
335+ UseZktrie : false ,
336+ FeeVaultAddress : nil ,
337+ EnableEIP2718 : true ,
338+ EnableEIP1559 : true ,
339+ MaxTxPerBlock : nil ,
340+ MaxTxPayloadBytesPerBlock : nil ,
337341 }}
338342)
339343
@@ -459,13 +463,18 @@ func (s ScrollConfig) ZktrieEnabled() bool {
459463}
460464
461465func (s ScrollConfig ) String () string {
462- if s . MaxTxPerBlock == nil {
463- return fmt . Sprintf ( "{useZktrie: %v, maxTxPerBlock: < nil>, feeVaultAddress: %v, enableEIP2718:%v, enableEIP1559:%v}" ,
464- s . UseZktrie , s . FeeVaultAddress , s . EnableEIP2718 , s . EnableEIP1559 )
466+ maxTxPerBlock := "< nil>"
467+ if s . MaxTxPerBlock != nil {
468+ maxTxPerBlock = fmt . Sprintf ( "%v" , * s . MaxTxPerBlock )
465469 }
466470
467- return fmt .Sprintf ("{useZktrie: %v, maxTxPerBlock: %v, feeVaultAddress: %v, enableEIP2718:%v, enableEIP1559:%v}" ,
468- s .UseZktrie , * s .MaxTxPerBlock , s .FeeVaultAddress , s .EnableEIP2718 , s .EnableEIP1559 )
471+ maxTxPayloadBytesPerBlock := "<nil>"
472+ if s .MaxTxPayloadBytesPerBlock != nil {
473+ maxTxPayloadBytesPerBlock = fmt .Sprintf ("%v" , * s .MaxTxPayloadBytesPerBlock )
474+ }
475+
476+ return fmt .Sprintf ("{useZktrie: %v, maxTxPerBlock: %v, MaxTxPayloadBytesPerBlock: %v, feeVaultAddress: %v, enableEIP2718:%v, enableEIP1559:%v}" ,
477+ s .UseZktrie , maxTxPerBlock , maxTxPayloadBytesPerBlock , s .FeeVaultAddress , s .EnableEIP2718 , s .EnableEIP1559 )
469478}
470479
471480// IsValidTxCount returns whether the given block's transaction count is below the limit.
0 commit comments