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

Upgrade sandbox to v0.30.0 #3048

Closed
futurechimp opened this issue Feb 16, 2023 · 2 comments
Closed

Upgrade sandbox to v0.30.0 #3048

futurechimp opened this issue Feb 16, 2023 · 2 comments
Assignees

Comments

@futurechimp
Copy link
Contributor

We are currently running sandbox at v0.26.1. This version is patched against a security vulnerability called dragonberry (see nymtech/nyxd@c7f71a1 for the commit which fixes dragonberry). wasmd first incorporated the dragonberry patch around v0.29.1, so we should re-apply this patch to versions in between what we're running (v.026.1) and v0.29.1 as we upgrade.

We will need to do some pretty fancy stuff to upgrade our chain without a chain halt. We might as well practice on Sandbox.

The overall process will look like:

a) from speaking to the cosmwasm crew, one of the versions in our upgrade path needs us to enable chain migrations when we do it, otherwise we get a chain fork/halt. Go over the wasmd upstream changes to determine which version requires migrations, and make sure chain migrations are enabled for the upgrade of that version (this requires a code patch).

b) prepare any intermediate versions of nyxd which are currently unprotected from dragonberry by applying the patch. Build those versions of the validator and have them ready.

c) go through the successive version upgrades. Most should be drop-in, but watch out for the chain migration one.

d) profit!

@futurechimp futurechimp changed the title Upgrade sandbox to v0.31.0 Upgrade sandbox to v0.30.0 Feb 16, 2023
@jstuczyn
Copy link
Contributor

One note to keep in mind when performing this (the same applies to mainnet) is that we have set our max contract sizes to be 1200kB via changes to module parameters (wasm.params.max_wasm_code_size = "1228800" in final bits of https://rpc.nymtech.net/genesis? and https://sandbox-validator1.dev.nymte.ch/genesis?). This is defined here: https://github.com/nymtech/dragonberry-nymd/blob/f8d25eb930502a023b8abb40ef51115cc1500a13/x/wasm/types/types.pb.go#L180. However, that parameter was removed in 0.27.0 so I have absolutely no idea what what effects it's going to have. Will validators start failing to parse the current state? Will they fallback to the new default (800kB which is TOO LITTLE for our existing contracts)? No idea. We have to check it.

@webmaster128
Copy link

webmaster128 commented Apr 14, 2023

Will they fallback to the new default (800kB which is TOO LITTLE for our existing contracts)? No idea. We have to check it.

The parameter is now a compile time variable that you can just set to your old value (CosmWasm/wasmd#826)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

5 participants