Skip to content

Commit be94504

Browse files
Merge pull request #274 from OffchainLabs/rename-params-maxcodesize
Rename MaxCodeSize and MaxInitCodeSize to DefaultMaxCodeSize and DefaultMaxInitCodeSize
2 parents 0a65849 + 197f5ff commit be94504

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

core/state_processor_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func TestStateProcessorErrors(t *testing.T) {
128128
},
129129
}
130130
blockchain, _ = NewBlockChain(db, nil, nil, gspec, nil, beacon.New(ethash.NewFaker()), vm.Config{}, nil, nil)
131-
tooBigInitCode = [params.MaxInitCodeSize + 1]byte{}
131+
tooBigInitCode = [params.DefaultMaxInitCodeSize + 1]byte{}
132132
)
133133

134134
defer blockchain.Stop()

params/config_arbitrum.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ type ArbitrumChainParams struct {
2929
InitialArbOSVersion uint64
3030
InitialChainOwner common.Address
3131
GenesisBlockNum uint64
32-
MaxCodeSize uint64 `json:"MaxCodeSize,omitempty"` // Maximum bytecode to permit for a contract. 0 value implies params.MaxCodeSize
33-
MaxInitCodeSize uint64 `json:"MaxInitCodeSize,omitempty"` // Maximum initcode to permit in a creation transaction and create instructions. 0 value implies params.MaxInitCodeSize
32+
MaxCodeSize uint64 `json:"MaxCodeSize,omitempty"` // Maximum bytecode to permit for a contract. 0 value implies params.DefaultMaxCodeSize
33+
MaxInitCodeSize uint64 `json:"MaxInitCodeSize,omitempty"` // Maximum initcode to permit in a creation transaction and create instructions. 0 value implies params.DefaultMaxInitCodeSize
3434
}
3535

3636
func (c *ChainConfig) IsArbitrum() bool {
@@ -43,7 +43,7 @@ func (c *ChainConfig) IsArbitrumNitro(num *big.Int) bool {
4343

4444
func (c *ChainConfig) MaxCodeSize() uint64 {
4545
if c.ArbitrumChainParams.MaxCodeSize == 0 {
46-
return MaxCodeSize
46+
return DefaultMaxCodeSize
4747
}
4848
return c.ArbitrumChainParams.MaxCodeSize
4949
}

params/protocol_params.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ const (
124124
DefaultElasticityMultiplier = 2 // Bounds the maximum gas limit an EIP-1559 block may have.
125125
InitialBaseFee = 1000000000 // Initial base fee for EIP-1559 blocks.
126126

127-
MaxCodeSize = 24576 // Maximum bytecode to permit for a contract
128-
MaxInitCodeSize = 2 * MaxCodeSize // Maximum initcode to permit in a creation transaction and create instructions
127+
DefaultMaxCodeSize = 24576 // Maximum bytecode to permit for a contract
128+
DefaultMaxInitCodeSize = 2 * DefaultMaxCodeSize // Maximum initcode to permit in a creation transaction and create instructions
129129

130130
// Precompiled contract gas prices
131131

0 commit comments

Comments
 (0)