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 polkadot v0.9.16 #567

Merged
merged 3 commits into from
Feb 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1,544 changes: 929 additions & 615 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ exclude = [
panic = "unwind"

[patch.crates-io]
ethereum = { git = "https://github.com/AstarNetwork/ethereum", branch = "polkadot-v0.9.13" }
evm = { git = "https://github.com/AstarNetwork/evm", branch = "polkadot-v0.9.13" }
evm-gasometer = { git = "https://github.com/AstarNetwork/evm", branch = "polkadot-v0.9.13" }
evm-runtime = { git = "https://github.com/AstarNetwork/evm", branch = "polkadot-v0.9.13" }
ethereum = { git = "https://github.com/AstarNetwork/ethereum", branch = "polkadot-v0.9.16" }
evm = { git = "https://github.com/AstarNetwork/evm", branch = "polkadot-v0.9.16" }
evm-gasometer = { git = "https://github.com/AstarNetwork/evm", branch = "polkadot-v0.9.16" }
evm-runtime = { git = "https://github.com/AstarNetwork/evm", branch = "polkadot-v0.9.16" }
142 changes: 72 additions & 70 deletions bin/collator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "astar-collator"
version = "3.7.1"
version = "3.8.0"
authors = ["Stake Technologies <devops@stake.co.jp>"]
description = "Astar collator implementation in Rust."
build = "build.rs"
Expand All @@ -25,54 +25,54 @@ serde_json = "1.0"
log = "0.4.8"

# primitives
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sp-trie= { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sp-keystore= { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
sp-trie= { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
sp-keystore= { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }

# client dependencies
sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-client-db = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", default-features = false }
sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
sc-client-db = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false }
sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
sc-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
sc-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
sc-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }

# RPC related dependencies
jsonrpc-core = "18.0.0"
jsonrpc-pubsub = "18.0.0"

# Frontier dependencies
fc-consensus = { git = "https://github.com/PlasmNetwork/frontier", branch = "polkadot-v0.9.13" }
fp-consensus = { git = "https://github.com/PlasmNetwork/frontier", branch = "polkadot-v0.9.13" }
fc-rpc-core = { git = "https://github.com/PlasmNetwork/frontier", branch = "polkadot-v0.9.13" }
fc-rpc = { git = "https://github.com/PlasmNetwork/frontier", branch = "polkadot-v0.9.13", features = ["rpc_binary_search_estimate"] }
fp-rpc = { git = "https://github.com/PlasmNetwork/frontier", branch = "polkadot-v0.9.13" }
fc-db = { git = "https://github.com/PlasmNetwork/frontier", branch = "polkadot-v0.9.13" }
fc-mapping-sync = { git = "https://github.com/PlasmNetwork/frontier", branch = "polkadot-v0.9.13" }
pallet-evm = { git = "https://github.com/PlasmNetwork/frontier", branch = "polkadot-v0.9.13" }
pallet-ethereum = { git = "https://github.com/PlasmNetwork/frontier", branch = "polkadot-v0.9.13" }
fc-consensus = { git = "https://github.com/PlasmNetwork/frontier", branch = "polkadot-v0.9.16" }
fp-consensus = { git = "https://github.com/PlasmNetwork/frontier", branch = "polkadot-v0.9.16" }
fc-rpc-core = { git = "https://github.com/PlasmNetwork/frontier", branch = "polkadot-v0.9.16" }
fc-rpc = { git = "https://github.com/PlasmNetwork/frontier", branch = "polkadot-v0.9.16", features = ["rpc_binary_search_estimate"] }
fp-rpc = { git = "https://github.com/PlasmNetwork/frontier", branch = "polkadot-v0.9.16" }
fc-db = { git = "https://github.com/PlasmNetwork/frontier", branch = "polkadot-v0.9.16" }
fc-mapping-sync = { git = "https://github.com/PlasmNetwork/frontier", branch = "polkadot-v0.9.16" }
pallet-evm = { git = "https://github.com/PlasmNetwork/frontier", branch = "polkadot-v0.9.16" }
pallet-ethereum = { git = "https://github.com/PlasmNetwork/frontier", branch = "polkadot-v0.9.16" }

# astar-specific dependencies
astar-runtime = { path = "../../runtime/astar" }
Expand All @@ -81,47 +81,49 @@ shiden-runtime = { path = "../../runtime/shiden" }
shibuya-runtime = { path = "../../runtime/shibuya" }

# frame dependencies
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
frame-rpc-system = { package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
pallet-contracts-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
frame-rpc-system = { package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
pallet-contracts-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }

# CLI-specific dependencies
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", optional = true }
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", optional = true }

# cumulus dependencies
cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.13" }
cumulus-client-network = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.13" }
cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.13" }
cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.13" }
cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.13" }
cumulus-client-consensus-relay-chain = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.13" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.13" }
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.13" }
substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.16" }
cumulus-client-network = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.16" }
cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.16" }
cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.16" }
cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.16" }
cumulus-client-consensus-relay-chain = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.16" }
cumulus-relay-chain-local = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.16" }
cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.16" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.16" }
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.16" }
substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }

# polkadot dependencies
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.13" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.13" }
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.13" }
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.13", optional = true }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.16" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.16" }
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.16" }
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.16", optional = true }

# benchmark dependencies
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", optional = true }
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", optional = true }
pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.13", optional = true }
xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.13", optional = true }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", optional = true }
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", optional = true }
pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.16", optional = true }
xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.16", optional = true }

# try-runtime
frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", optional = true }
try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", optional = true }
frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", optional = true }
try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", optional = true }

[build-dependencies]
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", optional = true }
sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", optional = true }
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.13", optional = true }
build-script-utils = { package = "substrate-build-script-utils", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", optional = true }
sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", optional = true }
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.16", optional = true }
build-script-utils = { package = "substrate-build-script-utils", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" }
structopt = { version = "0.3.8", optional = true }
vergen = { version = "3.0.4", optional = true }

Expand Down
34 changes: 25 additions & 9 deletions bin/collator/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,10 +447,10 @@ pub fn run() -> Result<()> {
builder.with_profiling(sc_tracing::TracingReceiver::Log, "");
let _ = builder.init();

let block: Block = generate_genesis_block(&load_spec(
&params.chain.clone().unwrap_or_default(),
params.parachain_id.into(),
)?)?;
let spec = cli.load_spec(&params.chain.clone().unwrap_or_default())?;
let state_version = Cli::native_runtime_version(&spec).state_version();

let block: Block = generate_genesis_block(&spec, state_version)?;
let raw_header = block.header().encode();
let output_buf = if params.raw {
raw_header
Expand Down Expand Up @@ -570,8 +570,9 @@ pub fn run() -> Result<()> {
let parachain_account =
AccountIdConversion::<polkadot_primitives::v0::AccountId>::into_account(&id);

let block: Block =
generate_genesis_block(&config.chain_spec).map_err(|e| format!("{:?}", e))?;
let state_version = Cli::native_runtime_version(&config.chain_spec).state_version();
let block: Block = generate_genesis_block(&config.chain_spec, state_version)
.map_err(|e| format!("{:?}", e))?;
let genesis_state = format!("0x{:?}", HexDisplay::from(&block.header().encode()));

let polkadot_config = SubstrateCli::create_configuration(
Expand Down Expand Up @@ -668,11 +669,26 @@ impl CliConfiguration<Self> for RelayChainCli {
self.base.base.rpc_ws(default_listen_port)
}

fn prometheus_config(&self, default_listen_port: u16) -> Result<Option<PrometheusConfig>> {
self.base.base.prometheus_config(default_listen_port)
fn prometheus_config(
&self,
default_listen_port: u16,
chain_spec: &Box<dyn ChainSpec>,
) -> Result<Option<PrometheusConfig>> {
self.base
.base
.prometheus_config(default_listen_port, chain_spec)
}

fn init<C: SubstrateCli>(&self) -> Result<()> {
fn init<F>(
&self,
_support_url: &String,
_impl_version: &String,
_logger_hook: F,
_config: &sc_service::Configuration,
) -> Result<()>
where
F: FnOnce(&mut sc_cli::LoggerBuilder, &sc_service::Configuration),
{
unreachable!("PolkadotCli is never initialized; qed");
}

Expand Down
5 changes: 4 additions & 1 deletion bin/collator/src/local/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ pub fn development_config() -> ChainSpec {
vec![],
None,
None,
None,
Some(properties),
None,
)
Expand Down Expand Up @@ -119,7 +120,9 @@ fn testnet_genesis(
false,
sp_runtime::Permill::from_parts(125_000),
),
sudo: SudoConfig { key: root_key },
sudo: SudoConfig {
key: Some(root_key),
},
}
}

Expand Down
Loading