Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make contract size limit configurable #255

Merged
merged 16 commits into from
Oct 25, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions params/config_arbitrum.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ type ArbitrumChainParams struct {
InitialArbOSVersion uint64
InitialChainOwner common.Address
GenesisBlockNum uint64
MaxCodeSize uint64 // Maximum bytecode to permit for a contract. 0 value implies params.MaxCodeSize
MaxInitCodeSize uint64 // Maximum initcode to permit in a creation transaction and create instructions. o value implies params.MaxInitCodeSize
MaxCodeSize uint64 `json:"maxCodeSize,omitempty,"` // Maximum bytecode to permit for a contract. 0 value implies params.MaxCodeSize
MaxInitCodeSize uint64 `json:"maxInitCodeSize,omitempty"` // Maximum initcode to permit in a creation transaction and create instructions. 0 value implies params.MaxInitCodeSize
ganeshvanahalli marked this conversation as resolved.
Show resolved Hide resolved
}

func (c *ChainConfig) IsArbitrum() bool {
Expand All @@ -50,7 +50,7 @@ func (c *ChainConfig) MaxCodeSize() uint64 {

func (c *ChainConfig) MaxInitCodeSize() uint64 {
if c.ArbitrumChainParams.MaxInitCodeSize == 0 {
return MaxInitCodeSize
return c.MaxCodeSize() * 2
}
return c.ArbitrumChainParams.MaxInitCodeSize
}
Expand Down
Loading