From 4565d679f5bbb80d81aa94b410879ae11055c958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Miko=C5=82ajczyk?= Date: Mon, 3 Nov 2025 18:25:18 +0100 Subject: [PATCH 1/2] Extend ArbitrumChainParams --- params/config_arbitrum.go | 1 + 1 file changed, 1 insertion(+) diff --git a/params/config_arbitrum.go b/params/config_arbitrum.go index 7ca6983f83..5450056154 100644 --- a/params/config_arbitrum.go +++ b/params/config_arbitrum.go @@ -57,6 +57,7 @@ type ArbitrumChainParams struct { GenesisBlockNum uint64 MaxCodeSize uint64 `json:"MaxCodeSize,omitempty"` // Maximum bytecode to permit for a contract. 0 value implies params.DefaultMaxCodeSize MaxInitCodeSize uint64 `json:"MaxInitCodeSize,omitempty"` // Maximum initcode to permit in a creation transaction and create instructions. 0 value implies params.DefaultMaxInitCodeSize + MaxUncompressedBatchSize uint64 `json:"MaxUncompressedBatchSize,omitempty"` } func (c *ChainConfig) IsArbitrum() bool { From 99f642a2d66c4ed31819e69573636b257291e2fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Miko=C5=82ajczyk?= Date: Mon, 10 Nov 2025 10:35:54 +0100 Subject: [PATCH 2/2] Add accessor for the limit in the config --- params/config_arbitrum.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/params/config_arbitrum.go b/params/config_arbitrum.go index 5450056154..3d0a744a22 100644 --- a/params/config_arbitrum.go +++ b/params/config_arbitrum.go @@ -48,6 +48,8 @@ const MaxArbosVersionSupported = ArbosVersion_40 const MaxDebugArbosVersionSupported = ArbosVersion_50 const ArbosVersion_Dia = ArbosVersion_50 +const DefaultMaxUncompressedBatchSize = 16 * 1024 * 1024 // 16 MB + type ArbitrumChainParams struct { EnableArbOS bool AllowDebugPrecompiles bool @@ -86,6 +88,13 @@ func (c *ChainConfig) DebugMode() bool { return c.ArbitrumChainParams.AllowDebugPrecompiles } +func (c *ChainConfig) MaxUncompressedBatchSize() uint64 { + if c.ArbitrumChainParams.MaxUncompressedBatchSize == 0 { + return DefaultMaxUncompressedBatchSize + } + return c.ArbitrumChainParams.MaxUncompressedBatchSize +} + func (c *ChainConfig) checkArbitrumCompatible(newcfg *ChainConfig, head *big.Int) *ConfigCompatError { if c.IsArbitrum() != newcfg.IsArbitrum() { // This difference applies to the entire chain, so report that the genesis block is where the difference appears.