Skip to content

Commit 5a76403

Browse files
Make batch size limit arbos-version dependent
1 parent 3199f20 commit 5a76403

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

params/config_arbitrum.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ const ArbosVersion_40 = uint64(40)
4040
const ArbosVersion_41 = uint64(41)
4141
const ArbosVersion_50 = uint64(50)
4242
const ArbosVersion_51 = uint64(51)
43+
const ArbosVersion_52 = uint64(52)
4344
const ArbosVersion_60 = uint64(60)
4445

4546
const ArbosVersion_FixRedeemGas = ArbosVersion_11
@@ -50,6 +51,7 @@ const MaxArbosVersionSupported = ArbosVersion_51
5051
const MaxDebugArbosVersionSupported = ArbosVersion_51
5152
const ArbosVersion_Dia = ArbosVersion_50
5253
const ArbosVersion_MultiConstraintFix = ArbosVersion_51
54+
const ArbosVersion_BatchSize = ArbosVersion_52
5355

5456
const DefaultMaxUncompressedBatchSize = 16 * 1024 * 1024 // 16 MB
5557

@@ -91,8 +93,8 @@ func (c *ChainConfig) DebugMode() bool {
9193
return c.ArbitrumChainParams.AllowDebugPrecompiles
9294
}
9395

94-
func (c *ChainConfig) MaxUncompressedBatchSize() uint64 {
95-
if c.ArbitrumChainParams.MaxUncompressedBatchSize == 0 {
96+
func (c *ChainConfig) MaxUncompressedBatchSize(arbosVersion uint64) uint64 {
97+
if arbosVersion < ArbosVersion_BatchSize || c.ArbitrumChainParams.MaxUncompressedBatchSize == 0 {
9698
return DefaultMaxUncompressedBatchSize
9799
}
98100
return c.ArbitrumChainParams.MaxUncompressedBatchSize

0 commit comments

Comments
 (0)