-
Notifications
You must be signed in to change notification settings - Fork 193
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
feat(wasm)!: increase contract size limit to 3MB #1906
Conversation
WalkthroughThe recent update increases the contract size limit to 3MB in the Nibiru EVM. This change involves adding a new function Changes
Sequence Diagram(s) (Beta)sequenceDiagram
participant User
participant Nibiru EVM
participant App
User->>Nibiru EVM: Deploy contract (>2.5MB)
Nibiru EVM->>App: Check wasm size
App->>App: overrideWasmVariables()
App->>Nibiru EVM: Allow deployment (size limit 3MB)
Nibiru EVM->>User: Contract deployed successfully
Assessment against linked issues
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1906 +/- ##
=======================================
Coverage 62.13% 62.14%
=======================================
Files 245 245
Lines 16006 16010 +4
=======================================
+ Hits 9946 9950 +4
Misses 5323 5323
Partials 737 737
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range and nitpick comments (4)
app/app.go (4)
Line range hint
94-94
: TheAppKeepers
is referenced but not defined or imported. Please ensure it is correctly defined or imported to avoid runtime errors.
Line range hint
68-68
:ModuleBasicManager
is used but not defined or imported. Please define or import it to ensure the application can compile and run correctly.
Line range hint
71-71
:ModuleAccPerms
is referenced but not defined or imported. This needs to be addressed to ensure the application functions as expected.
Line range hint
75-75
:NibiruApp
does not implement all methods of theruntime.AppI
interface. Please implement the missing methods to ensure full compatibility.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- CHANGELOG.md (1 hunks)
- app/app.go (2 hunks)
Additional context used
golangci-lint
app/app.go
[error] 94-94: undefined: AppKeepers
[error] 68-68: undefined: ModuleBasicManager
[error] 71-71: undefined: ModuleAccPerms
[error] 75-75: cannot use (*NibiruApp)(nil) (value of type *NibiruApp) as "github.com/cosmos/cosmos-sdk/runtime".AppI value in variable declaration: *NibiruApp does not implement "github.com/cosmos/cosmos-sdk/runtime".AppI (missing method ExportAppStateAndValidators)
[error] 144-144: undefined: EncodingConfig
[error] 417-417: app.ibcKeeper undefined (type *NibiruApp has no field or method ibcKeeper)
[error] 421-421: app.ScopedIBCKeeper undefined (type *NibiruApp has no field or method ScopedIBCKeeper)
[error] 413-413: app.StakingKeeper undefined (type *NibiruApp has no field or method StakingKeeper)
[error] 428-428: undefined: MakeEncodingConfig
[error] 168-168: undefined: initStoreKeys
[error] 179-179: app.InitKeepers undefined (type *NibiruApp has no field or method InitKeepers)
[error] 188-188: app.initModuleManager undefined (type *NibiruApp has no field or method initModuleManager)
[error] 190-190: app.setupUpgrades undefined (type *NibiruApp has no field or method setupUpgrades)
[error] 198-198: app.initSimulationManager undefined (type *NibiruApp has no field or method initSimulationManager)
[error] 208-208: undefined: NewAnteHandler
[error] 210-210: app.AccountKeeper undefined (type *NibiruApp has no field or method AccountKeeper)
[error] 211-211: app.BankKeeper undefined (type *NibiruApp has no field or method BankKeeper)
[error] 212-212: app.FeeGrantKeeper undefined (type *NibiruApp has no field or method FeeGrantKeeper)
[error] 217-217: app.ibcKeeper undefined (type *NibiruApp has no field or method ibcKeeper)
[error] 220-220: app.DevGasKeeper undefined (type *NibiruApp has no field or method DevGasKeeper)
[error] 221-221: app.BankKeeper undefined (type *NibiruApp has no field or method BankKeeper)
[error] 233-233: app.WasmKeeper undefined (type *NibiruApp has no field or method WasmKeeper)
[error] 259-259: app.capabilityKeeper undefined (type *NibiruApp has no field or method capabilityKeeper)
[error] 280-280: undefined: GenesisState
[error] 284-284: app.upgradeKeeper undefined (type *NibiruApp has no field or method upgradeKeeper)
[error] 353-353: app.paramsKeeper undefined (type *NibiruApp has no field or method paramsKeeper)
Additional comments not posted (2)
app/app.go (1)
130-136
: The implementation ofoverrideWasmVariables
correctly sets the wasm size limits to 3MB as intended.CHANGELOG.md (1)
51-51
: The changelog entry for PR #1906 is correctly documented and provides clear information about the increase in wasm contract size limit to 3MB.
* feat(wasm): increase contract size limit to 3MB * chore: update changelog
Purpose / Abstract
Increases the contract size limit to 3MB (up from 800KB). I originally tried to set the config via compile time flag (
-X github.com/CosmWasm/wasmd/x/wasm/types.MaxWasmSize=3145728
) but got an errorgithub.com/CosmWasm/wasmd/x/wasm/types.MaxWasmSize: cannot set with -X: not a var of type string (type:int)
. Seems like it's not possible to set an int variable with a compile time flag.I took inspiration from Osmosis'
overrideWasmVariables()
.Summary by CodeRabbit