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

Fix Parameter change via proposal #392

Closed
alpe opened this issue Jan 27, 2021 · 2 comments · Fixed by #389
Closed

Fix Parameter change via proposal #392

alpe opened this issue Jan 27, 2021 · 2 comments · Fixed by #389
Assignees
Labels
bug Something isn't working
Milestone

Comments

@alpe
Copy link
Contributor

alpe commented Jan 27, 2021

Scenario:

Change value for the instantiateAccess parameter from AccessTypeOnlyAddress with an address to a value without address like AccessTypeNobody.

Issue

It fails with invalid parameter value: address not allowed for this type.

Cause

The address part from the previous state was not cleared by the gov parameter change proposal handler. Probably because it is set to an empty value.

This can be replicated in a modified TestUpdateParamsProposal test.

@alpe alpe added the bug Something isn't working label Jan 27, 2021
@alpe
Copy link
Contributor Author

alpe commented Jan 27, 2021

@bragaz fyi: you may run into this with simulations

@alpe alpe added this to the v0.16.0 milestone Jan 27, 2021
@alpe alpe self-assigned this Feb 1, 2021
@leobragaz
Copy link
Contributor

leobragaz commented Feb 1, 2021

During the weekend I've tried to solve this but somehow it kept returning this error so this morning I asked my @RiccardoM to help me debug the code.
We found out that protobuf takes care of the unmarshal while we were using json.Marshal to encode the CodeUploadAccess param inside ParamChanges.
After switching to protobuf marshaler everything worked fine.
However, the tests will fail due to a bug inside the Capability module but I don't think this is related to the wasm params.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants