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 to polkadot v1.3.0 #259

Merged
merged 29 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
333eb12
bend deps to crates-io and polkadot 1.3
brenzi Feb 1, 2024
3932229
fixes
brenzi Feb 1, 2024
b9a3991
fixes
brenzi Feb 1, 2024
e525369
runtimes build
brenzi Feb 1, 2024
3dd28e6
builds, but completely overwrites collator node. dropped shell support
brenzi Feb 1, 2024
ecaa609
split service file simplify maintenance
brenzi Feb 2, 2024
9abd858
cosmetics
brenzi Feb 2, 2024
8a708f8
taplo fmt
brenzi Feb 2, 2024
8ecc062
lift patch and point to pallet release branch
brenzi Feb 2, 2024
f548cde
bump versions
brenzi Feb 2, 2024
7217b15
update README
brenzi Feb 2, 2024
32feb58
fixes
brenzi Feb 2, 2024
0024bbf
fix feature propagation
brenzi Feb 2, 2024
9a3b2c8
review fixes
brenzi Feb 3, 2024
a7ea43a
try to fix feature propagation for runtime-benchmarks
brenzi Feb 3, 2024
266b3f6
try to fix feature propagation for runtime-benchmarks
brenzi Feb 3, 2024
904248f
try to fix feature propagation for runtime-benchmarks
brenzi Feb 3, 2024
05ad898
fixed runtime-benchamrks build
brenzi Feb 3, 2024
6222fb8
cleanup unnecessary dep pin
brenzi Feb 3, 2024
cdda1bd
trying to fix benchmarks
brenzi Feb 3, 2024
4a8593c
next try. nope
brenzi Feb 3, 2024
73c7793
more tries to fix benchmarking build
brenzi Feb 3, 2024
dfad573
more attempts to fix benchmark feature propagation
brenzi Feb 5, 2024
d34b693
remove try-runtime-cli stuff
brenzi Feb 5, 2024
ae81ebf
fixed benchmarks build
brenzi Feb 5, 2024
de33d62
alignment with parachain-template
brenzi Feb 6, 2024
6ec337f
use construct_partials macro. doesn't help
brenzi Feb 6, 2024
d516799
further aligning with parachain-template
brenzi Feb 6, 2024
46365ce
re-ran benchmarks. manual corrections were necessary
brenzi Feb 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,855 changes: 2,440 additions & 1,415 deletions Cargo.lock

Large diffs are not rendered by default.

255 changes: 127 additions & 128 deletions Cargo.toml

Large diffs are not rendered by default.

21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,24 @@ The benchmarks are run with the following script:

```
cargo build --release --features try-runtime
./target/release/integritee-collator try-runtime \
--chain integritee-kusama \
--runtime ./target/release/wbuild/integritee-runtime/integritee_runtime.wasm \
on-runtime-upgrade --checks=all \
live --uri wss://kusama.api.integritee.network:443
try-runtime --runtime ./target/release/wbuild/integritee-runtime/integritee_runtime.compact.compressed.wasm on-runtime-upgrade --checks=pre-and-post live --uri wss://kusama.api.integritee.network:443
```

## testing with chopsticks

To test runtime upgrades

```
nvm use 20
npx @acala-network/chopsticks@latest --config integritee-kusama --wasm-override ./target/release/wbuild/integritee-runtime/integritee_runtime.compact.compressed.wasm
```
to test XCM

```
npx @acala-network/chopsticks@latest xcm --p=karura --p=integritee-kusama
```
see other options in chopsticks help

## More Resources
* Thorough Readme about Rococo and Collators in general in the original [repository](https://github.com/paritytech/cumulus) of this fork.
* Parachains Development in the [Polkadot Wiki](https://wiki.polkadot.network/docs/build-pdk)
Expand Down
30 changes: 16 additions & 14 deletions polkadot-parachains/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "integritee-collator"
description = "The Integritee parachain collator binary"
# align major.minor revision with the runtimes. bump patch revision ad lib. make this the github release tag
version = "1.7.8"
version = "1.8.0"
authors = ["Integritee AG <[email protected]>"]
homepage = "https://integritee.network/"
repository = "https://github.com/integritee-network/parachain"
Expand All @@ -24,9 +24,9 @@ serde = { workspace = true }
serde_json = { workspace = true }

# Parachain runtimes
parachain-runtime = { package = "integritee-runtime", path = "integritee-runtime" }
integritee-runtime = { path = "integritee-runtime" }
parachains-common = { path = "common" }
shell-runtime = { package = "shell-runtime", path = "shell-runtime" }
shell-runtime = { path = "shell-runtime" }

# Substrate dependencies
frame-benchmarking = { workspace = true, features = ["std"] }
Expand Down Expand Up @@ -67,18 +67,19 @@ substrate-prometheus-endpoint = { workspace = true }
try-runtime-cli = { workspace = true }

# RPC related dependencies
frame-rpc-system = { workspace = true }
jsonrpsee = { workspace = true }
pallet-transaction-payment-rpc = { workspace = true }
sc-transaction-pool-api = { workspace = true }
substrate-frame-rpc-system = { workspace = true }
substrate-state-trie-migration-rpc = { workspace = true }

# Cumulus dependencies
color-print = { workspace = true }
cumulus-client-cli = { workspace = true }
cumulus-client-collator = { workspace = true }
cumulus-client-consensus-aura = { workspace = true }
cumulus-client-consensus-common = { workspace = true }
cumulus-client-consensus-relay-chain = { workspace = true }
cumulus-client-consensus-proposer = { workspace = true }
cumulus-client-network = { workspace = true }
cumulus-client-service = { workspace = true }
cumulus-primitives-core = { workspace = true, features = ["std"] }
Expand All @@ -92,7 +93,7 @@ cumulus-relay-chain-rpc-interface = { workspace = true }
polkadot-cli = { workspace = true }
polkadot-primitives = { workspace = true, features = ["std"] }
polkadot-service = { workspace = true }
xcm = { workspace = true, features = ["std"] }
staging-xcm = { workspace = true, features = ["std"] }

# Temporary pin only
# See https://github.com/bluejekyll/trust-dns/issues/1946 for more details.
Expand All @@ -106,27 +107,28 @@ assert_cmd = { workspace = true }
nix = { workspace = true }
pallet-sudo = { workspace = true, features = ["std"] }
polkadot-cli = { workspace = true, features = ["rococo-native"] } # purge_chain_works works with rococo-local and needs to allow this
substrate-test-client = { workspace = true }
substrate-test-runtime-client = { workspace = true }
tempfile = { workspace = true }
tokio = { workspace = true }
wait-timeout = { workspace = true }

[features]
default = []
runtime-benchmarks = [
"try-runtime-cli/try-runtime",
"polkadot-service/runtime-benchmarks",
"parachain-runtime/runtime-benchmarks",
"shell-runtime/runtime-benchmarks",
"frame-benchmarking-cli/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
"integritee-runtime/runtime-benchmarks",
"polkadot-cli/runtime-benchmarks",
"polkadot-primitives/runtime-benchmarks",
"sc-service/runtime-benchmarks",
#"shell-runtime/runtime-benchmarks", we don't need benchmarking for shell
"sp-runtime/runtime-benchmarks",
]
fast-runtime = [
"polkadot-service/fast-runtime",
"parachain-runtime/fast-runtime",
"integritee-runtime/fast-runtime",
]
try-runtime = [
"try-runtime-cli/try-runtime",
"parachain-runtime/try-runtime",
"integritee-runtime/try-runtime",
"shell-runtime/try-runtime",
]
12 changes: 5 additions & 7 deletions polkadot-parachains/common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "parachains-common"
# major.minor revision must match collator node. patch bump ad lib
version = "1.7.0"
version = "1.8.0"
authors = ["Parity Technologies <[email protected]>"]
edition = "2021"
description = "Logic which is common to all parachain runtimes"
Expand All @@ -18,7 +18,6 @@ smallvec = { workspace = true }
frame-executive = { workspace = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
pallet-assets = { workspace = true }
pallet-authorship = { workspace = true }
pallet-balances = { workspace = true }
sp-consensus-aura = { workspace = true }
Expand All @@ -31,8 +30,8 @@ sp-std = { workspace = true }
polkadot-core-primitives = { workspace = true }
polkadot-primitives = { workspace = true }
polkadot-runtime-common = { workspace = true }
xcm = { workspace = true }
xcm-executor = { workspace = true }
staging-xcm = { workspace = true }
staging-xcm-executor = { workspace = true }

[build-dependencies]
substrate-wasm-builder = { workspace = true }
Expand All @@ -44,7 +43,6 @@ std = [
"frame-executive/std",
"frame-support/std",
"frame-system/std",
"pallet-assets/std",
"pallet-authorship/std",
"pallet-balances/std",
"polkadot-core-primitives/std",
Expand All @@ -56,6 +54,6 @@ std = [
"sp-io/std",
"sp-runtime/std",
"sp-std/std",
"xcm-executor/std",
"xcm/std",
"staging-xcm-executor/std",
"staging-xcm/std",
]
19 changes: 15 additions & 4 deletions polkadot-parachains/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ pub mod fee;

pub mod xcm_config;
pub use constants::*;
pub use opaque::*;
pub use types::*;

/// Common types of parachains.
mod types {
use sp_runtime::traits::{IdentifyAccount, Verify};
use sp_runtime::{
generic,
traits::{BlakeTwo256, IdentifyAccount, Verify},
};

/// An index to a block.
pub type BlockNumber = u32;
Expand Down Expand Up @@ -63,6 +65,11 @@ mod types {

// Id used for identifying assets.
pub type AssetIdForTrustBackedAssets = u32;

/// The address format for describing accounts.
pub type Address = sp_runtime::MultiAddress<AccountId, ()>;
/// Block header type as expected by this runtime.
pub type Header = generic::Header<BlockNumber, BlakeTwo256>;
}

/// Common constants of parachains.
Expand Down Expand Up @@ -104,13 +111,17 @@ mod constants {
/// to even the core data structures.
pub mod opaque {
use super::*;
use sp_runtime::{generic, traits::BlakeTwo256};

pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic;
use sp_runtime::{
generic,
traits::{BlakeTwo256, Hash as HashT},
};
/// Opaque block header type.
pub type Header = generic::Header<BlockNumber, BlakeTwo256>;
/// Opaque block type.
pub type Block = generic::Block<Header, UncheckedExtrinsic>;
/// Opaque block identifier type.
pub type BlockId = generic::BlockId<Block>;
/// Opaque block hash type.
pub type Hash = <BlakeTwo256 as HashT>::Output;
}
42 changes: 28 additions & 14 deletions polkadot-parachains/integritee-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "integritee-runtime"
description = "The Integritee parachain runtime"
# patch revision must match runtime spec_version
version = "1.7.44"
version = "1.8.45"
authors = ["Integritee AG <[email protected]>"]
homepage = "https://integritee.network/"
repository = "https://github.com/integritee-network/parachain"
Expand All @@ -21,6 +21,7 @@ parachains-common = { path = "../common", default-features = false }
cumulus-pallet-aura-ext = { workspace = true }
cumulus-pallet-dmp-queue = { workspace = true }
cumulus-pallet-parachain-system = { workspace = true }
cumulus-pallet-session-benchmarking = { workspace = true }
cumulus-pallet-xcm = { workspace = true }
cumulus-pallet-xcmp-queue = { workspace = true }
cumulus-primitives-core = { workspace = true }
Expand Down Expand Up @@ -58,8 +59,8 @@ pallet-utility = { workspace = true }
pallet-vesting = { workspace = true }
pallet-xcm = { workspace = true }
pallet-xcm-transactor = { workspace = true }
parachain-info = { workspace = true }
polkadot-parachain = { workspace = true }
polkadot-parachain-primitives = { workspace = true }
polkadot-runtime-common = { workspace = true }
sp-api = { workspace = true }
sp-block-builder = { workspace = true }
sp-consensus-aura = { workspace = true }
Expand All @@ -72,9 +73,10 @@ sp-session = { workspace = true }
sp-std = { workspace = true }
sp-transaction-pool = { workspace = true }
sp-version = { workspace = true }
xcm = { workspace = true }
xcm-builder = { workspace = true }
xcm-executor = { workspace = true }
staging-parachain-info = { workspace = true }
staging-xcm = { workspace = true }
staging-xcm-builder = { workspace = true }
staging-xcm-executor = { workspace = true }
xcm-transactor-primitives = { workspace = true }

# Benchmarking
Expand All @@ -98,13 +100,16 @@ std = [
"cumulus-pallet-aura-ext/std",
"cumulus-pallet-dmp-queue/std",
"cumulus-pallet-parachain-system/std",
"cumulus-pallet-session-benchmarking/std",
"cumulus-pallet-xcm/std",
"cumulus-pallet-xcmp-queue/std",
"cumulus-primitives-core/std",
"cumulus-primitives-timestamp/std",
"cumulus-primitives-utility/std",
"frame-benchmarking?/std",
"frame-executive/std",
"frame-support/std",
"frame-system-benchmarking?/std",
"frame-system-rpc-runtime-api/std",
"frame-system/std",
"frame-try-runtime/std",
Expand Down Expand Up @@ -136,10 +141,10 @@ std = [
"pallet-vesting/std",
"pallet-xcm-transactor/std",
"pallet-xcm/std",
"parachain-info/std",
"parachains-common/std",
"parity-scale-codec/std",
"polkadot-parachain/std",
"polkadot-parachain-primitives/std",
"polkadot-runtime-common/std",
"scale-info/std",
"sp-api/std",
"sp-block-builder/std",
Expand All @@ -153,19 +158,23 @@ std = [
"sp-std/std",
"sp-transaction-pool/std",
"sp-version/std",
"xcm-builder/std",
"xcm-executor/std",
"staging-parachain-info/std",
"staging-xcm-builder/std",
"staging-xcm-executor/std",
"staging-xcm/std",
"xcm-transactor-primitives/std",
"xcm/std",
]
runtime-benchmarks = [
"cumulus-pallet-parachain-system/runtime-benchmarks",
"cumulus-pallet-session-benchmarking/runtime-benchmarks",
"cumulus-pallet-xcmp-queue/runtime-benchmarks",
"cumulus-primitives-utility/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system-benchmarking/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"hex-literal",
"orml-xtokens/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-bounties/runtime-benchmarks",
"pallet-child-bounties/runtime-benchmarks",
Expand All @@ -185,8 +194,12 @@ runtime-benchmarks = [
"pallet-utility/runtime-benchmarks",
"pallet-vesting/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"pallet-xcm-transactor/runtime-benchmarks",
"polkadot-parachain-primitives/runtime-benchmarks",
"polkadot-runtime-common/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
"staging-xcm-builder/runtime-benchmarks",
"staging-xcm-executor/runtime-benchmarks",
]

try-runtime = [
Expand Down Expand Up @@ -222,7 +235,8 @@ try-runtime = [
"pallet-vesting/try-runtime",
"pallet-xcm-transactor/try-runtime",
"pallet-xcm/try-runtime",
"parachain-info/try-runtime",
"polkadot-runtime-common/try-runtime",
"staging-parachain-info/try-runtime",
]
# Set timing constants (e.g. session period) to faster versions to speed up testing.
fast-runtime = []
Loading
Loading