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 polkadot 0.9.11 #272

Merged
merged 29 commits into from
Oct 22, 2021
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
72d5f56
chore: update dependencies
wischli Oct 18, 2021
ac7cb1f
fix: update vesting in launch pallet
wischli Oct 18, 2021
a7c176a
fix: add TypeInfo
wischli Oct 18, 2021
0c2d475
refactor: calls
wischli Oct 18, 2021
37e30ec
refactor: remove unused TypeInfos
wischli Oct 18, 2021
6f8fb0f
wip: try to fix compiling issues
wischli Oct 18, 2021
ad1adeb
fix: TypeInfo issues
wischli Oct 18, 2021
f6249f0
fix: standalone client
wischli Oct 19, 2021
1e74153
fix: runtimes
wischli Oct 19, 2021
8a3c16e
wip: fix parachain client
wischli Oct 19, 2021
6659a9d
fix: parachain client
wischli Oct 21, 2021
4fe2b32
fix: launch unit tests
wischli Oct 21, 2021
bb3d099
fix: tests for all features
wischli Oct 21, 2021
e2072aa
fix: clippy
wischli Oct 21, 2021
bb96672
refactor: rm redundant TypeInfo traits
wischli Oct 21, 2021
e981492
Merge remote-tracking branch 'origin/develop' into wf-0.9.11-clean
wischli Oct 21, 2021
f8ac580
fix: formatting
wischli Oct 21, 2021
acbba78
apply suggestion by Weichweichs review
wischli Oct 21, 2021
a8825cf
refactor: bump pallet versions to 1.0.0
wischli Oct 21, 2021
e012d7b
chore: bump spec versions to 2800
wischli Oct 21, 2021
9282a5c
cargo run --quiet --release -p kilt-parachain --features=runtime-benc…
Oct 21, 2021
2e6c02a
cargo run --quiet --release -p kilt-parachain --features=runtime-benc…
Oct 21, 2021
f4973b9
cargo run --quiet --release -p kilt-parachain --features=runtime-benc…
Oct 21, 2021
f7471f0
cargo run --quiet --release -p kilt-parachain --features=runtime-benc…
Oct 22, 2021
f6d3257
cargo run --quiet --release -p kilt-parachain --features=runtime-benc…
Oct 22, 2021
3f058d4
cargo run --quiet --release -p kilt-parachain --features=runtime-benc…
Oct 22, 2021
0f595c3
cargo run --quiet --release -p kilt-parachain --features=runtime-benc…
Oct 22, 2021
3ccee8d
style: fix launch bench fmt
wischli Oct 22, 2021
36a3201
refactor: tokio handle
wischli Oct 22, 2021
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
2,463 changes: 1,033 additions & 1,430 deletions Cargo.lock

Large diffs are not rendered by default.

106 changes: 53 additions & 53 deletions nodes/parachain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ peregrine-runtime = {path = "../../runtimes/peregrine"}
spiritnet-runtime = {path = "../../runtimes/spiritnet"}

# External dependencies
codec = {package = "parity-scale-codec", version = "2.0.0"}
codec = {package = "parity-scale-codec", version = "2.3.1"}
derive_more = "0.15.0"
exit-future = "0.1.4"
futures = {version = "0.3.1", features = ["compat"]}
Expand All @@ -31,70 +31,70 @@ structopt = "0.3.3"
trie-root = "0.15.2"

# Substrate dependencies
sc-basic-authorship = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
sc-chain-spec = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
sc-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
sc-client-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
sc-consensus = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
sc-executor = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
sc-finality-grandpa = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
sc-network = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
sc-service = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
sc-telemetry = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
sc-tracing = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
sc-transaction-pool = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
sc-transaction-pool-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
sp-block-builder = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
sp-blockchain = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
sp-consensus = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
sp-consensus-aura = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
sp-core = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
sp-inherents = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
sp-io = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
sp-keystore = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
sp-offchain = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
sp-runtime = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.10"}
sp-session = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
sp-timestamp = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
sp-transaction-pool = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
sp-trie = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
substrate-prometheus-endpoint = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
sc-basic-authorship = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
sc-chain-spec = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
sc-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
sc-client-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
sc-consensus = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
sc-executor = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
sc-finality-grandpa = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
sc-network = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
sc-service = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
sc-telemetry = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
sc-tracing = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
sc-transaction-pool = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
sc-transaction-pool-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
sp-block-builder = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
sp-blockchain = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
sp-consensus = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
sp-consensus-aura = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
sp-core = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
sp-inherents = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
sp-io = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
sp-keystore = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
sp-offchain = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
sp-runtime = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.11"}
sp-session = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
sp-timestamp = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
sp-transaction-pool = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
sp-trie = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
substrate-prometheus-endpoint = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}

# RPC related dependencies
frame-rpc-system = {package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
jsonrpc-core = "15.1.0"
pallet-transaction-payment-rpc = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
sc-rpc = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
sc-rpc-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
sp-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
frame-rpc-system = {package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
jsonrpc-core = "18.0.0"
pallet-transaction-payment-rpc = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
sc-rpc = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
sc-rpc-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
sp-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}

# Cumulus dependencies
cumulus-client-cli = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10"}
cumulus-client-collator = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10"}
cumulus-client-consensus-aura = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10"}
cumulus-client-consensus-common = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10"}
cumulus-client-consensus-relay-chain = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10"}
cumulus-client-network = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10"}
cumulus-client-service = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10"}
cumulus-primitives-core = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10"}
cumulus-primitives-parachain-inherent = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10"}
cumulus-client-cli = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.11"}
cumulus-client-collator = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.11"}
cumulus-client-consensus-aura = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.11"}
cumulus-client-consensus-common = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.11"}
cumulus-client-consensus-relay-chain = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.11"}
cumulus-client-network = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.11"}
cumulus-client-service = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.11"}
cumulus-primitives-core = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.11"}
cumulus-primitives-parachain-inherent = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.11"}

# Polkadot dependencies
polkadot-cli = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.10"}
polkadot-parachain = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.10"}
polkadot-primitives = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.10"}
polkadot-service = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.10"}
polkadot-cli = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.11"}
polkadot-parachain = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.11"}
polkadot-primitives = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.11"}
polkadot-service = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.11"}

# Benchmarking
frame-benchmarking = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
frame-benchmarking-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
frame-benchmarking = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}
frame-benchmarking-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}

# Runtime tests
node-executor = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", optional = true}
try-runtime-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", optional = true}
node-executor = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11", optional = true}
try-runtime-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11", optional = true}

[build-dependencies]
substrate-build-script-utils = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10"}
substrate-build-script-utils = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.11"}

[features]
default = []
Expand Down
14 changes: 5 additions & 9 deletions nodes/parachain/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use cumulus_primitives_core::ParaId;
use kilt_primitives::Block;
use log::info;
#[cfg(feature = "try-runtime")]
use node_executor::Executor;
use node_executor::ExecutorDispatch;
use polkadot_parachain::primitives::AccountIdConversion;
use sc_cli::{
ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams, NetworkParams, Result,
Expand Down Expand Up @@ -237,7 +237,7 @@ pub fn run() -> Result<()> {
);

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

cmd.run(config, polkadot_config)
Expand Down Expand Up @@ -312,10 +312,10 @@ pub fn run() -> Result<()> {
// we don't need any of the components of new_partial, just a runtime, or a task
// manager to do `async_run`.
let registry = config.prometheus_config.as_ref().map(|cfg| &cfg.registry);
let task_manager = sc_service::TaskManager::new(config.task_executor.clone(), registry)
let task_manager = sc_service::TaskManager::new(config.tokio_handle.clone(), registry)
.map_err(|e| sc_cli::Error::Service(sc_service::Error::Prometheus(e)))?;

Ok((cmd.run::<Block, Executor>(config), task_manager))
Ok((cmd.run::<Block, ExecutorDispatch>(config), task_manager))
})
}
#[cfg(not(feature = "try-runtime"))]
Expand All @@ -342,7 +342,7 @@ pub fn run() -> Result<()> {
let block: Block = generate_genesis_block(&config.chain_spec).map_err(|e| format!("{:?}", e))?;
let genesis_state = format!("0x{:?}", HexDisplay::from(&block.header().encode()));

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

Expand Down Expand Up @@ -474,10 +474,6 @@ impl CliConfiguration<Self> for RelayChainCli {
self.base.base.rpc_cors(is_dev)
}

fn telemetry_external_transport(&self) -> Result<Option<sc_service::config::ExtTransport>> {
self.base.base.telemetry_external_transport()
}

fn default_heap_pages(&self) -> Result<Option<u64>> {
self.base.base.default_heap_pages()
}
Expand Down
4 changes: 3 additions & 1 deletion nodes/parachain/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
use std::sync::Arc;

use kilt_primitives::{AccountId, Balance, Block, Index};
use polkadot_service::AuxStore;
use sc_service::Error;
use sc_transaction_pool_api::TransactionPool;
use sp_api::ProvideRuntimeApi;
Expand All @@ -48,12 +49,13 @@ pub struct FullDeps<C, P> {
pub fn create_full<C, P>(deps: FullDeps<C, P>) -> Result<jsonrpc_core::IoHandler<sc_rpc::Metadata>, Error>
where
C: ProvideRuntimeApi<Block>,
C: AuxStore,
C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError> + 'static,
C: Send + Sync + 'static,
C::Api: frame_rpc_system::AccountNonceApi<Block, AccountId, Index>,
C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>,
C::Api: BlockBuilder<Block>,
P: TransactionPool + 'static,
P: TransactionPool + Sync + Send + 'static,
{
use frame_rpc_system::{FullSystem, SystemApi};
use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApi};
Expand Down
Loading