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

chore: upgrade to 1.11.0 #189

Merged
merged 86 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
464519b
chore: upgrade to v1.9.0
chungquantin Aug 12, 2024
26af9de
chore: upgrade to 1.10.0
chungquantin Aug 13, 2024
52ed359
refactor: remove native executor, add unified host functions
chungquantin Aug 13, 2024
e0ff905
feat: pov claim feature
chungquantin Aug 13, 2024
7998178
feat: pov claim feature
chungquantin Aug 13, 2024
551218b
chore: upgrade to 1.10.0
chungquantin Aug 13, 2024
787d39a
chore: rebase upstream 1.8.0
chungquantin Aug 14, 2024
939ba7a
chore: update cargo.lock
chungquantin Aug 14, 2024
db16f2b
Merge branch 'chungquantin/chore-polkadot-v1.9.0' into chungquantin/c…
chungquantin Aug 14, 2024
2b7428c
fix: undo benchmarking host functions removal
chungquantin Aug 14, 2024
17fcfd1
chore: upgrade to v1.11.0
chungquantin Aug 14, 2024
a5630f0
fix: add missing signed extra
chungquantin Aug 14, 2024
4bdae59
chore: upgrade to 1.10.0
chungquantin Aug 13, 2024
f4813dd
refactor: remove native executor, add unified host functions
chungquantin Aug 13, 2024
63dd2d8
feat: pov claim feature
chungquantin Aug 13, 2024
efac88e
chore: upgrade to 1.10.0
chungquantin Aug 13, 2024
c2ec0e0
chore: rebase upstream 1.8.0
chungquantin Aug 14, 2024
c2fe9b3
chore: update cargo.lock
chungquantin Aug 14, 2024
1bdc5b8
fix: undo benchmarking host functions removal
chungquantin Aug 14, 2024
ba35239
Merge remote-tracking branch 'refs/remotes/origin/chungquantin/chore-…
chungquantin Aug 14, 2024
f7b5b53
fix: remove pov reclaim from testnet
chungquantin Aug 14, 2024
06fbb92
fix: remove signed extra
chungquantin Aug 14, 2024
76b0712
feat: update the authoring duration
chungquantin Aug 14, 2024
fcbecff
fix: comment identation
chungquantin Aug 14, 2024
676023d
chore: upgrade to v1.11.0
chungquantin Aug 14, 2024
36440f9
fix: comment identation
chungquantin Aug 14, 2024
dbfaa40
Merge remote-tracking branch 'refs/remotes/origin/chungquantin/chore-…
chungquantin Aug 14, 2024
36f7bf1
fix: remove signed extra from testnet
chungquantin Aug 14, 2024
6a21b84
fix: mismatch dependency version
chungquantin Aug 14, 2024
8b085e2
chore(upgrade): add feature gate to the unified host functions
chungquantin Aug 14, 2024
a127f44
chore: rebase v1.10.0
chungquantin Aug 14, 2024
6950395
fix: comment identation
chungquantin Aug 14, 2024
6a1f0ca
fix: remove signed extra from testnet
chungquantin Aug 14, 2024
5503e5f
fix: mismatch dependency version
chungquantin Aug 14, 2024
45b59e2
Merge remote-tracking branch 'refs/remotes/origin/chungquantin/chore-…
chungquantin Aug 14, 2024
2352a50
chore: revert pov reclaim feature
chungquantin Aug 15, 2024
f554468
Merge branch 'chungquantin/chore-polkadot-v1.9.0' into chungquantin/c…
chungquantin Aug 15, 2024
cfbd5d4
Merge branch 'developer' into chungquantin/chore-polkadot-v1.10.0
chungquantin Aug 15, 2024
0d8e50a
chore: update lock file
chungquantin Aug 15, 2024
9cd01dd
chore: upgrade to v1.9.0
chungquantin Aug 12, 2024
e68615e
feat: pov claim feature
chungquantin Aug 13, 2024
f22d339
fix: add missing signed extra
chungquantin Aug 14, 2024
a3e6de2
chore: upgrade to 1.10.0
chungquantin Aug 13, 2024
7943f0a
refactor: remove native executor, add unified host functions
chungquantin Aug 13, 2024
8e91a8d
feat: pov claim feature
chungquantin Aug 13, 2024
833e4ba
chore: upgrade to 1.10.0
chungquantin Aug 13, 2024
ea2adee
chore: rebase upstream 1.8.0
chungquantin Aug 14, 2024
e923e9e
chore: update cargo.lock
chungquantin Aug 14, 2024
be53317
fix: undo benchmarking host functions removal
chungquantin Aug 14, 2024
48803bd
chore: upgrade to 1.10.0
chungquantin Aug 13, 2024
2b91db6
refactor: remove native executor, add unified host functions
chungquantin Aug 13, 2024
10ebaa6
feat: pov claim feature
chungquantin Aug 13, 2024
c9abfa2
chore: upgrade to 1.10.0
chungquantin Aug 13, 2024
a258bf6
chore: rebase upstream 1.8.0
chungquantin Aug 14, 2024
88f423d
chore: update cargo.lock
chungquantin Aug 14, 2024
fb8c6eb
fix: undo benchmarking host functions removal
chungquantin Aug 14, 2024
8257cc4
fix: remove signed extra
chungquantin Aug 14, 2024
ff33961
feat: update the authoring duration
chungquantin Aug 14, 2024
587dc45
chore(upgrade): add feature gate to the unified host functions
chungquantin Aug 14, 2024
5608785
chore: revert pov reclaim feature
chungquantin Aug 15, 2024
827dc84
chore: update lock file
chungquantin Aug 15, 2024
ab65d6a
Merge remote-tracking branch 'refs/remotes/origin/chungquantin/chore-…
chungquantin Aug 15, 2024
1257186
feat: pov claim feature
chungquantin Aug 13, 2024
81115f5
chore: upgrade to 1.10.0
chungquantin Aug 13, 2024
242b68a
refactor: remove native executor, add unified host functions
chungquantin Aug 13, 2024
62ca070
feat: pov claim feature
chungquantin Aug 13, 2024
a72b206
chore: upgrade to 1.10.0
chungquantin Aug 13, 2024
9863cff
fix: undo benchmarking host functions removal
chungquantin Aug 14, 2024
d058b22
refactor: remove native executor, add unified host functions
chungquantin Aug 13, 2024
5344837
fix: undo benchmarking host functions removal
chungquantin Aug 14, 2024
b981174
chore: revert pov reclaim feature
chungquantin Aug 15, 2024
c9416ea
Merge branch 'developer' into chungquantin/chore-polkadot-v1.10.0
chungquantin Aug 15, 2024
256e8d4
Merge branch 'developer' into chungquantin/chore-polkadot-v1.10.0
chungquantin Aug 15, 2024
fff8d0d
fix: add missing experimental feature
chungquantin Aug 15, 2024
84d9334
chore: revert experimental flag
chungquantin Aug 15, 2024
764e41d
fix: remove EOL space
chungquantin Aug 15, 2024
b8d61ea
chore: rebase v1.10.0
chungquantin Aug 14, 2024
0db3bb9
fix: comment identation
chungquantin Aug 14, 2024
b6ee08f
fix: remove signed extra from testnet
chungquantin Aug 14, 2024
2b4ce6d
fix: mismatch dependency version
chungquantin Aug 14, 2024
a544bef
chore: upgrade to v1.11.0
chungquantin Aug 14, 2024
ff34782
fix: remove signed extra from testnet
chungquantin Aug 14, 2024
b33a5bc
fix: mismatch dependency version
chungquantin Aug 14, 2024
a624454
Merge remote-tracking branch 'refs/remotes/origin/chungquantin/chore-…
chungquantin Aug 15, 2024
b88473e
Merge branch 'developer' into chungquantin/chore-polkadot-v1.11.0
chungquantin Aug 16, 2024
d222eb6
refactor: simplify wasm build script
chungquantin Aug 16, 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
4,993 changes: 2,744 additions & 2,249 deletions Cargo.lock

Large diffs are not rendered by default.

195 changes: 98 additions & 97 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ subxt-signer = "0.34.0"
tokio = { version = "1.36", features = ["macros", "time", "rt-multi-thread"] }

# Build
substrate-wasm-builder = "21.0.0"
substrate-build-script-utils = "11.0.0"
substrate-wasm-builder = "22.0.1"

# Local
pop-runtime-devnet = { path = "runtime/devnet", default-features = true } # default-features=true required for `-p pop-node` builds
Expand All @@ -57,113 +57,114 @@ pop-runtime-common = { path = "runtime/common", default-features = false }
pop-primitives = { path = "./primitives", default-features = false }

# Substrate
sc-basic-authorship = "0.38.0"
sc-chain-spec = "31.0.0"
sc-cli = "0.40.0"
sc-client-api = "32.0.0"
sc-offchain = "33.0.0"
sc-consensus = "0.37.0"
sc-executor = "0.36.0"
sc-network = "0.38.0"
sc-network-sync = "0.37.0"
sc-rpc = "33.0.0"
sc-service = "0.39.0"
sc-sysinfo = "31.0.0"
sc-telemetry = "18.0.0"
sc-tracing = "32.0.0"
sc-transaction-pool = "32.0.0"
sc-transaction-pool-api = "32.0.0"
frame-benchmarking = { version = "32.0.0", default-features = false }
frame-benchmarking-cli = "36.0.0"
frame-executive = { version = "32.0.0", default-features = false }
frame-support = { version = "32.0.0", default-features = false }
frame-system = { version = "32.0.0", default-features = false }
frame-system-benchmarking = { version = "32.0.0", default-features = false }
frame-system-rpc-runtime-api = { version = "30.0.0", default-features = false }
frame-try-runtime = { version = "0.38.0", default-features = false }
pallet-aura = { version = "31.0.0", default-features = false }
pallet-authorship = { version = "32.0.0", default-features = false }
pallet-assets = { version = "33.0.0", default-features = false }
pallet-balances = { version = "33.0.0", default-features = false }
pallet-contracts = { version = "31.0.0", default-features = false }
pallet-message-queue = { version = "35.0.0", default-features = false }
pallet-multisig = { version = "32.0.0", default-features = false }
pallet-nft-fractionalization = { version = "14.0.0", default-features = false }
pallet-nfts = { version = "26.0.0", default-features = false }
pallet-nfts-runtime-api = { version = "18.0.0", default-features = false }
pallet-preimage = { version = "32.0.0", default-features = false }
pallet-proxy = { version = "32.0.0", default-features = false }
pallet-scheduler = { version = "33.0.0", default-features = false }
pallet-session = { version = "32.0.0", default-features = false }
pallet-sudo = { version = "32.0.0", default-features = false }
pallet-timestamp = { version = "31.0.0", default-features = false }
pallet-transaction-payment = { version = "32.0.0", default-features = false }
pallet-transaction-payment-rpc = "34.0.0"
pallet-transaction-payment-rpc-runtime-api = { version = "32.0.0", default-features = false }
pallet-utility = { version = "32.0.0", default-features = false }
sp-api = { version = "30.0.0", default-features = false }
sp-authority-discovery = { version = "30.0.0", default-features = false }
sp-block-builder = { version = "30.0.0", default-features = false }
sp-blockchain = "32.0.0"
sp-consensus-aura = { version = "0.36.0", default-features = false }
sp-consensus-babe = { version = "0.36.0", default-features = false }
sp-consensus-beefy = { version = "17.0.0", default-features = false }
sp-consensus-grandpa = { version = "17.0.0", default-features = false }
sc-basic-authorship = "0.39.0"
sc-chain-spec = "32.0.0"
sc-cli = "0.41.0"
sc-client-api = "33.0.0"
sc-offchain = "34.0.0"
sc-consensus = "0.38.0"
sc-executor = "0.37.0"
sc-network = "0.39.0"
sc-network-sync = "0.38.0"
sc-rpc = "34.0.0"
sc-service = "0.40.0"
sc-sysinfo = "32.0.0"
sc-telemetry = "19.0.0"
sc-tracing = "33.0.0"
sc-transaction-pool = "33.0.0"
sc-transaction-pool-api = "33.0.0"
frame-benchmarking = { version = "33.0.0", default-features = false }
frame-benchmarking-cli = "37.0.0"
frame-executive = { version = "33.0.0", default-features = false }
frame-metadata-hash-extension = { version = "0.2.0", default-features = false }
frame-support = { version = "33.0.0", default-features = false }
frame-system = { version = "33.0.0", default-features = false }
frame-system-benchmarking = { version = "33.0.0", default-features = false }
frame-system-rpc-runtime-api = { version = "31.0.0", default-features = false }
frame-try-runtime = { version = "0.39.0", default-features = false }
pallet-aura = { version = "32.0.0", default-features = false }
pallet-authorship = { version = "33.0.0", default-features = false }
pallet-assets = { version = "34.0.0", default-features = false }
pallet-balances = { version = "34.0.0", default-features = false }
pallet-contracts = { version = "32.0.0", default-features = false }
pallet-message-queue = { version = "36.0.0", default-features = false }
pallet-multisig = { version = "33.0.0", default-features = false }
pallet-nft-fractionalization = { version = "15.0.0", default-features = false }
pallet-nfts = { version = "27.0.0", default-features = false }
pallet-nfts-runtime-api = { version = "19.0.0", default-features = false }
pallet-preimage = { version = "33.0.0", default-features = false }
pallet-proxy = { version = "33.0.0", default-features = false }
pallet-scheduler = { version = "34.0.0", default-features = false }
pallet-session = { version = "33.0.0", default-features = false }
pallet-sudo = { version = "33.0.0", default-features = false }
pallet-timestamp = { version = "32.0.0", default-features = false }
pallet-transaction-payment = { version = "33.0.0", default-features = false }
pallet-transaction-payment-rpc = "35.0.0"
pallet-transaction-payment-rpc-runtime-api = { version = "33.0.0", default-features = false }
pallet-utility = { version = "33.0.0", default-features = false }
sp-api = { version = "31.0.0", default-features = false }
sp-authority-discovery = { version = "31.0.0", default-features = false }
sp-block-builder = { version = "31.0.0", default-features = false }
sp-blockchain = "33.0.0"
sp-consensus-aura = { version = "0.37.0", default-features = false }
sp-consensus-babe = { version = "0.37.0", default-features = false }
sp-consensus-beefy = { version = "18.0.0", default-features = false }
sp-consensus-grandpa = { version = "18.0.0", default-features = false }
sp-core = { version = "32.0.0", default-features = false }
sp-keystore = "0.38.0"
sp-io = { version = "34.0.0", default-features = false }
sp-genesis-builder = { version = "0.11.0", default-features = false }
sp-inherents = { version = "30.0.0", default-features = false }
sp-offchain = { version = "30.0.0", default-features = false }
sp-runtime = { version = "35.0.0", default-features = false }
sp-timestamp = "30.0.0"
substrate-frame-rpc-system = "32.0.0"
sp-io = { version = "35.0.0", default-features = false }
sp-genesis-builder = { version = "0.12.0", default-features = false }
sp-inherents = { version = "31.0.0", default-features = false }
sp-offchain = { version = "31.0.0", default-features = false }
sp-runtime = { version = "36.0.0", default-features = false }
sp-timestamp = "31.0.0"
substrate-frame-rpc-system = "33.0.0"
substrate-prometheus-endpoint = "0.17.0"
sp-session = { version = "31.0.0", default-features = false }
sp-session = { version = "32.0.0", default-features = false }
sp-std = { version = "14.0.0", default-features = false }
sp-transaction-pool = { version = "30.0.0", default-features = false }
sp-version = { version = "33.0.0", default-features = false }
sp-transaction-pool = { version = "31.0.0", default-features = false }
sp-version = { version = "34.0.0", default-features = false }

# Polkadot
pallet-xcm = { version = "11.0.0", default-features = false }
polkadot-cli = "11.0.0"
polkadot-parachain-primitives = { version = "10.0.0", default-features = false }
polkadot-runtime-parachains = { version = "11.0.0", default-features = false }
polkadot-primitives = { version = "11.0.0", default-features = false }
polkadot-runtime-common = { version = "11.0.0", default-features = false }
rococo-runtime-constants = { version = "11.0.0", default-features = false }
rococo-runtime = { version = "11.0.0", default-features = false }
xcm = { version = "11.0.0", package = "staging-xcm", default-features = false }
xcm-builder = { version = "11.0.0", package = "staging-xcm-builder", default-features = false }
xcm-executor = { version = "11.0.0", package = "staging-xcm-executor", default-features = false }
pallet-xcm = { version = "12.0.0", default-features = false }
polkadot-cli = "12.0.0"
polkadot-parachain-primitives = { version = "11.0.0", default-features = false }
polkadot-runtime-parachains = { version = "12.0.0", default-features = false }
polkadot-primitives = { version = "12.0.0", default-features = false }
polkadot-runtime-common = { version = "12.0.0", default-features = false }
rococo-runtime-constants = { version = "12.0.0", default-features = false }
rococo-runtime = { version = "12.0.1", default-features = false }
xcm = { version = "12.0.0", package = "staging-xcm", default-features = false }
xcm-builder = { version = "12.0.0", package = "staging-xcm-builder", default-features = false }
xcm-executor = { version = "12.0.0", package = "staging-xcm-executor", default-features = false }

# Cumulus
asset-hub-rococo-runtime = { version = "0.15.0", default-features = false }
asset-test-utils = { version = "11.0.0", default-features = false }
cumulus-pallet-aura-ext = { version = "0.11.0", default-features = false }
cumulus-pallet-parachain-system = { version = "0.11.0", default-features = false, features = [
asset-hub-rococo-runtime = { version = "0.16.1", default-features = false }
asset-test-utils = { version = "12.0.0", default-features = false }
cumulus-pallet-aura-ext = { version = "0.12.0", default-features = false }
cumulus-pallet-parachain-system = { version = "0.12.0", default-features = false, features = [
"parameterized-consensus-hook",
] }
cumulus-pallet-session-benchmarking = { version = "13.0.0", default-features = false }
cumulus-pallet-xcm = { version = "0.11.0", default-features = false }
cumulus-pallet-xcmp-queue = { version = "0.11.0", default-features = false }
cumulus-primitives-aura = { version = "0.11.0", default-features = false }
cumulus-primitives-core = { version = "0.11.0", default-features = false }
cumulus-primitives-storage-weight-reclaim = { version = "2.0.0", default-features = false }
cumulus-primitives-utility = { version = "0.11.0", default-features = false }
emulated-integration-tests-common = { version = "7.0.0", default-features = false }
pallet-collator-selection = { version = "13.0.1", default-features = false }
parachains-common = { version = "11.0.0", default-features = false }
parachain-info = { version = "0.11.0", package = "staging-parachain-info", default-features = false }
cumulus-primitives-parachain-inherent = "0.11.0"
cumulus-relay-chain-interface = "0.11.0"
cumulus-pallet-session-benchmarking = { version = "14.0.0", default-features = false }
cumulus-pallet-xcm = { version = "0.12.0", default-features = false }
cumulus-pallet-xcmp-queue = { version = "0.12.0", default-features = false }
cumulus-primitives-aura = { version = "0.12.0", default-features = false }
cumulus-primitives-core = { version = "0.12.0", default-features = false }
cumulus-primitives-storage-weight-reclaim = { version = "3.0.0", default-features = false }
cumulus-primitives-utility = { version = "0.12.0", default-features = false }
emulated-integration-tests-common = { version = "8.0.0", default-features = false }
pallet-collator-selection = { version = "14.0.0", default-features = false }
parachains-common = { version = "12.0.0", default-features = false }
parachain-info = { version = "0.12.0", package = "staging-parachain-info", default-features = false }
cumulus-primitives-parachain-inherent = "0.12.0"
cumulus-relay-chain-interface = "0.12.0"
color-print = "0.3.4"
cumulus-client-cli = "0.11.0"
cumulus-client-collator = "0.11.0"
cumulus-client-consensus-aura = "0.11.0"
cumulus-client-consensus-common = "0.11.0"
cumulus-client-consensus-proposer = "0.11.0"
cumulus-client-service = "0.11.0"
cumulus-client-cli = "0.12.0"
cumulus-client-collator = "0.12.0"
cumulus-client-consensus-aura = "0.12.0"
cumulus-client-consensus-common = "0.12.0"
cumulus-client-consensus-proposer = "0.12.0"
cumulus-client-service = "0.12.0"

# Paseo
asset-hub-paseo-runtime = { git = "https://github.com/paseo-network/runtimes/", tag = "v1.2.5-system-chains", default-features = false }
Expand Down
5 changes: 0 additions & 5 deletions node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,46 @@

/// Sub-commands supported by the collator.
#[derive(Debug, clap::Subcommand)]
pub enum Subcommand {
/// Build a chain specification.
BuildSpec(sc_cli::BuildSpecCmd),

/// Validate blocks.
CheckBlock(sc_cli::CheckBlockCmd),

/// Export blocks.
ExportBlocks(sc_cli::ExportBlocksCmd),

/// Export the state of a given block into a chain spec.
ExportState(sc_cli::ExportStateCmd),

/// Import blocks.
ImportBlocks(sc_cli::ImportBlocksCmd),

/// Revert the chain to a previous state.
Revert(sc_cli::RevertCmd),

/// Remove the whole chain.
PurgeChain(cumulus_client_cli::PurgeChainCmd),

/// Export the genesis head data of the parachain.
///
/// Head data is the encoded block header.
#[command(alias = "export-genesis-state")]
ExportGenesisHead(cumulus_client_cli::ExportGenesisHeadCommand),

/// Export the genesis wasm of the parachain.
ExportGenesisWasm(cumulus_client_cli::ExportGenesisWasmCommand),

/// Sub-commands concerned with benchmarking.
/// The pallet benchmarking moved to the `pallet` sub-command.
#[command(subcommand)]
Benchmark(frame_benchmarking_cli::BenchmarkCmd),

/// Try-runtime has migrated to a standalone
/// [CLI](<https://github.com/paritytech/try-runtime-cli>). The subcommand exists as a stub and
/// deprecation notice. It will be removed entirely some time after Janurary 2024.
TryRuntime,

/// Key management CLI utilities
#[command(subcommand)]
Key(sc_cli::KeySubcommand),
}

Check warning on line 44 in node/src/cli.rs

View workflow job for this annotation

GitHub Actions / clippy

large size difference between variants

warning: large size difference between variants --> node/src/cli.rs:5:1 | 5 | / pub enum Subcommand { 6 | | /// Build a chain specification. 7 | | BuildSpec(sc_cli::BuildSpecCmd), ... | 19 | | ImportBlocks(sc_cli::ImportBlocksCmd), | | ------------------------------------- the second-largest variant contains at least 240 bytes ... | 39 | | Benchmark(frame_benchmarking_cli::BenchmarkCmd), | | ----------------------------------------------- the largest variant contains at least 544 bytes ... | 43 | | Key(sc_cli::KeySubcommand), 44 | | } | |_^ the entire enum is at least 544 bytes | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant = note: `#[warn(clippy::large_enum_variant)]` on by default help: consider boxing the large fields to reduce the total size of the enum | 39 | Benchmark(Box<frame_benchmarking_cli::BenchmarkCmd>), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

const AFTER_HELP_EXAMPLE: &str = color_print::cstr!(
r#"<bold><underline>Examples:</></>
Expand Down
44 changes: 17 additions & 27 deletions node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use sc_cli::{
NetworkParams, Result, SharedParams, SubstrateCli,
};
use sc_service::config::{BasePath, PrometheusConfig};
use sp_runtime::traits::AccountIdConversion;
use sp_runtime::traits::HashingFor;

use crate::{
chain_spec,
Expand Down Expand Up @@ -248,9 +248,7 @@ pub fn run() -> Result<()> {
Some(Subcommand::ExportGenesisHead(cmd)) => {
let runner = cli.create_runner(cmd)?;
runner.sync_run(|config| {
construct_benchmark_partials!(config, |partials| {
cmd.run(partials.client)
})
construct_benchmark_partials!(config, |partials| cmd.run(partials.client))
})
},
Some(Subcommand::ExportGenesisWasm(cmd)) => {
Expand All @@ -264,24 +262,26 @@ pub fn run() -> Result<()> {
let runner = cli.create_runner(cmd)?;
// Switch on the concrete benchmark sub-command-
match cmd {
BenchmarkCmd::Pallet(cmd) =>
BenchmarkCmd::Pallet(cmd) => {
if cfg!(feature = "runtime-benchmarks") {
runner.sync_run(|config| cmd.run::<sp_runtime::traits::HashingFor<Block>, ()>(config))
runner.sync_run(|config| {
cmd.run_with_spec::<HashingFor<Block>, ()>(Some(config.chain_spec))
})
} else {
Err("Benchmarking wasn't enabled when building the node. \
You can enable it with `--features runtime-benchmarks`."
.into())
},
}
},
BenchmarkCmd::Block(cmd) => runner.sync_run(|config| {
construct_benchmark_partials!(config, |partials| cmd.run(partials.client))
}),
#[cfg(not(feature = "runtime-benchmarks"))]
BenchmarkCmd::Storage(_) =>
Err(sc_cli::Error::Input(
"Compile with --features=runtime-benchmarks \
BenchmarkCmd::Storage(_) => Err(sc_cli::Error::Input(
"Compile with --features=runtime-benchmarks \
to enable storage benchmarks."
.into(),
)),
.into(),
)),
#[cfg(feature = "runtime-benchmarks")]
BenchmarkCmd::Storage(cmd) => runner.sync_run(|config| {
construct_benchmark_partials!(config, |partials| {
Expand All @@ -290,15 +290,15 @@ pub fn run() -> Result<()> {
cmd.run(config, partials.client.clone(), db, storage)
})
}),
BenchmarkCmd::Machine(cmd) =>
runner.sync_run(|config| cmd.run(&config, SUBSTRATE_REFERENCE_HARDWARE.clone())),
BenchmarkCmd::Machine(cmd) => {
runner.sync_run(|config| cmd.run(&config, SUBSTRATE_REFERENCE_HARDWARE.clone()))
},
// NOTE: this allows the Client to leniently implement
// new benchmark commands without requiring a companion MR.
#[allow(unreachable_patterns)]
_ => Err("Benchmarking sub-command unsupported".into()),
}
},
Some(Subcommand::TryRuntime) => Err("The `try-runtime` subcommand has been migrated to a standalone CLI (https://github.com/paritytech/try-runtime-cli). It is no longer being maintained here and will be removed entirely some time after January 2024. Please remove this subcommand from your runtime and use the standalone CLI.".into()),
Some(Subcommand::Key(cmd)) => cmd.run(&cli),
None => {
let runner = cli.create_runner(&cli.run.normalize())?;
Expand All @@ -323,27 +323,19 @@ pub fn run() -> Result<()> {

let id = ParaId::from(para_id);

let parachain_account =
AccountIdConversion::<polkadot_primitives::AccountId>::into_account_truncating(
&id,
);

let tokio_handle = config.tokio_handle.clone();
let polkadot_config =
SubstrateCli::create_configuration(&polkadot_cli, &polkadot_cli, tokio_handle)
.map_err(|err| format!("Relay chain argument error: {}", err))?;

info!("Parachain Account: {parachain_account}");
info!("Is collating: {}", if config.role.is_authority() { "yes" } else { "no" });

match config.chain_spec.runtime() {
Runtime::Devnet => {
sp_core::crypto::set_default_ss58_version(
pop_runtime_devnet::SS58Prefix::get().into(),
);
crate::service::start_parachain_node::<
pop_runtime_devnet::RuntimeApi,
>(
crate::service::start_parachain_node::<pop_runtime_devnet::RuntimeApi>(
config,
polkadot_config,
collator_options,
Expand All @@ -358,9 +350,7 @@ pub fn run() -> Result<()> {
sp_core::crypto::set_default_ss58_version(
pop_runtime_testnet::SS58Prefix::get().into(),
);
crate::service::start_parachain_node::<
pop_runtime_testnet::RuntimeApi,
>(
crate::service::start_parachain_node::<pop_runtime_testnet::RuntimeApi>(
config,
polkadot_config,
collator_options,
Expand Down
Loading
Loading