Skip to content

Commit

Permalink
Upgrade to polkadot-v1.5.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
gdethier committed Mar 11, 2024
1 parent d1b67a0 commit ce6d08c
Show file tree
Hide file tree
Showing 16 changed files with 3,760 additions and 2,190 deletions.
4,485 changes: 3,030 additions & 1,455 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ members = [
"node",
"runtime",
]
resolver = "2"
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,35 @@ Below, `$CHAIN` is one of `logion`, `logion-dev`, `logion-test` or `local`. It i
- `checkVersion`: Yes
- `parachainSystem.enactAuthorizedUpgrade(code)`
- `code`: the compressed runtime produced by `srtool`

## Try Runtime

`try-runtime` tool enables the testing of a new runtime against real data.

### Test a runtime upgrade

Generally, what's tested here is one or several storage migrations activated by the new runtime or any Polkadot upgrade.

If not yet done, the [Substrate Try Runtime CLI](https://github.com/paritytech/try-runtime-cli) must be installed:

```sh
cargo install --git https://github.com/paritytech/try-runtime-cli --locked
```

If not yet done, the runtime has to be built with the `try-runtime` feature:

```sh
cargo build --release --features=try-runtime
```

It can then be tested by executing the following command:

```sh
try-runtime --runtime target/release/wbuild/logion-runtime/logion_runtime.compact.compressed.wasm on-runtime-upgrade live --uri wss://para-rpc01.logion.network:443
```

This will:
- connect to RPC node
- download current state
- execute the upgrade
- run pallets' `post_upgrade` hook
103 changes: 56 additions & 47 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,74 +10,83 @@ edition = "2021"
build = "build.rs"

[dependencies]
clap = { version = "4.4.2", features = ["derive"] }
clap = { version = "4.4.10", features = ["derive"] }
log = "0.4.20"
codec = { package = "parity-scale-codec", version = "3.0.0" }
serde = { version = "1.0.188", features = ["derive"] }
serde = { version = "1.0.193", features = ["derive"] }
jsonrpsee = { version = "0.16.2", features = ["server"] }
futures = "0.3.28"
serde_json = "1.0.108"

# Local
logion-runtime = { path = "../runtime" }

# Substrate
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sc-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
try-runtime-cli = { git = "https://github.com/paritytech/substrate", optional = true , branch = "polkadot-v1.0.0" }
frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
sc-network = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
sc-service = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
sc-tracing = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
sp-api = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
sp-core = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }

# Polkadot
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v1.0.0" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v1.0.0" }
xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v1.0.0" }
polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-v1.5.0" }

# Cumulus
cumulus-client-cli = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v1.0.0" }
cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v1.0.0" }
cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v1.0.0" }
cumulus-client-service = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v1.0.0" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v1.0.0" }
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v1.0.0" }
cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v1.0.0" }
color-print = "0.3.5"
cumulus-client-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
cumulus-client-collator = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
cumulus-client-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
cumulus-client-consensus-common = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
cumulus-client-consensus-proposer = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
cumulus-client-service = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
cumulus-relay-chain-interface = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }
color-print = "0.3.4"

[build-dependencies]
substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.5.0" }

[features]
default = []
runtime-benchmarks = [
"cumulus-primitives-core/runtime-benchmarks",
"frame-benchmarking-cli/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
"logion-runtime/runtime-benchmarks",
"polkadot-cli/runtime-benchmarks",
"polkadot-primitives/runtime-benchmarks",
"sc-service/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
try-runtime = [
"try-runtime-cli/try-runtime",
"logion-runtime/try-runtime"
"logion-runtime/try-runtime",
"polkadot-cli/try-runtime",
"sp-runtime/try-runtime",
]
Loading

0 comments on commit ce6d08c

Please sign in to comment.