Skip to content
This repository has been archived by the owner on Aug 19, 2020. It is now read-only.

Document Runtime Upgrades #35

Open
shawntabrizi opened this issue Nov 22, 2019 · 4 comments
Open

Document Runtime Upgrades #35

shawntabrizi opened this issue Nov 22, 2019 · 4 comments
Labels
K1 - Runtime Info about the runtime. Q4 - Hard Requires someone with expert knowledge. T2 - New Page Add a new page to the KB.

Comments

@shawntabrizi
Copy link
Contributor

  • What are different runtime version types, when should I bump them, when not? (authoring, spec, impl, ...)

  • Who can issue runtime upgrades? (sudo, democracy, council, ...)

  • When do I have to do runtime upgrades? Anything that modifies the actual runtime?

  • How does the technical process look like, how to I correctly build the runtime and how do I push it to my running chain? Does this require a target block number?

  • How to get the wasm code? Is cargo build --release enough?

  • How to ensure/test that the wasm code does not lead to chain halts, such as unexpected validator set/epoch changes, corrupt storage, etc...?

  • Are there limits on what can be upgrated? E. g. can we upgrade things like reward curves, seconds per slot, transition from a PoA to a PoS chain?

  • How to upgrade without the sudo module?

  • How to schedule a time for the upgrade? Or will it be performed as soon as the democracy module has voted?

@soc1c
Copy link
Contributor

soc1c commented Dec 11, 2019

cc @roninkaizen

@JoshOrndorff JoshOrndorff transferred this issue from polkadot-developers/substrate-developer-hub.github.io Mar 16, 2020
@joepetrowski joepetrowski transferred this issue from polkadot-developers/substrate-cms Apr 9, 2020
@joepetrowski joepetrowski added K1 - Runtime Info about the runtime. Q4 - Hard Requires someone with expert knowledge. T2 - New Page Add a new page to the KB. labels Apr 9, 2020
@joepetrowski
Copy link
Contributor

joepetrowski commented Apr 17, 2020

Useful: https://hackmd.io/mGgNZX0VT4S0UTaq89-_SQ?sync=&type=

Should also include storage migrations.

@danforbes
Copy link
Contributor

This is probably related to #39, particularly the question How to upgrade without the sudo module?

@JoshOrndorff
Copy link
Contributor

I just wrote this in a riot message today.

Here are some sparse docs about runtime upgrades. https://substrate.dev/substrate-beginner-workshop/#/3-upgrading/
The basic idea is:

  1. Launch a chain
  2. Modify your runtime in some way
    2a. Make double sure you've changed the spec_version. Here's one example of a spec_version from the recipes. Every runtime has this spec_version.
  3. recompile your runtime
  4. find the ./target/release/wbuild/<name-of-your-runtime>/<name-of-your-runtime>.compact.wasm file
  5. Use sudo to call system.set_code with that wasm file

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
K1 - Runtime Info about the runtime. Q4 - Hard Requires someone with expert knowledge. T2 - New Page Add a new page to the KB.
Projects
None yet
Development

No branches or pull requests

5 participants