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

Add Ability to Change max-wasm-size via Governance #137

Merged
merged 9 commits into from
Feb 1, 2024
Merged

Conversation

jim380
Copy link
Contributor

@jim380 jim380 commented Dec 19, 2023

Overview

This PR attempts to achieve the followings:

  • The option to override max-wasm-size at compile time
  • The to change max-wasm-size via governance

Closes #62

@jim380 jim380 requested a review from hacheigriega December 19, 2023 02:24
@jim380 jim380 changed the title feat: add ability to change max-wasm-size via gov Add Ability to Change max-wasm-size via Gov Dec 19, 2023
@jim380 jim380 changed the title Add Ability to Change max-wasm-size via Gov Add Ability to Change max-wasm-size Dec 19, 2023
@jim380 jim380 changed the title Add Ability to Change max-wasm-size Add Ability to Change max-wasm-size via Governance Jan 3, 2024
@hacheigriega
Copy link
Member

LGTM but wouldn't this have to be changed again once we migrate to collections?

@jim380
Copy link
Contributor Author

jim380 commented Jan 4, 2024

LGTM but wouldn't this have to be changed again once we migrate to collections?

Yeah there'd be some structural changes, but mostly around keeper.

if m.GetAuthority() != req.Authority {
return nil, fmt.Errorf("invalid authority; expected %s, got %s", m.GetAuthority(), req.Authority)
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v0.50 recommends that we validate message here

}

ctx := sdk.UnwrapSDKContext(goCtx)
if err := m.SetParams(ctx, req.Params); err != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

validate params before setting?

x/wasm-storage/types/tx.go Outdated Show resolved Hide resolved
@jim380 jim380 requested a review from hacheigriega February 1, 2024 01:15
@jim380 jim380 merged commit 6518f88 into main Feb 1, 2024
14 checks passed
@jim380 jim380 deleted the jay/issue-62 branch February 1, 2024 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✨ Parameterize max Wasm size in wasm-storage module
3 participants