Skip to content
This repository has been archived by the owner on Mar 30, 2023. It is now read-only.

To polkadot-v0.9.33 and some other changes #171

Merged
merged 42 commits into from
Jan 16, 2023
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
bef7024
Anchor polkadot-v0.9.33
jiguantong Jan 3, 2023
c8c92a1
Companion for paritytech/cumulus#1685
jiguantong Jan 3, 2023
c84aad4
Companion for paritytech/cumulus#1585
jiguantong Jan 3, 2023
b02c851
Companion for paritytech/cumulus#1745
jiguantong Jan 3, 2023
341a001
Companion for paritytech/cumulus#1759
jiguantong Jan 3, 2023
3c10385
Companion for paritytech/cumulus#1782
jiguantong Jan 3, 2023
8ba0195
Companion for paritytech/cumulus#1793
jiguantong Jan 3, 2023
4f61104
Companion for paritytech/cumulus#1808
jiguantong Jan 3, 2023
7015136
Temp use prepare branch of messages-substrate
Jan 9, 2023
12b7e4a
Use darwinia fork frontier
Jan 9, 2023
7feed4a
Use correct moonbeam substrate commit
Jan 9, 2023
8a986c9
Correct bp-darwinia-core std
Jan 10, 2023
53b1915
Use prepare moonbeam v0.9.33
Jan 10, 2023
24eb417
Update ethereum to 0.14.0
Jan 10, 2023
89a4aac
Companion for paritytech/substrate#11649, paritytech/polkadot#5729 de…
Jan 10, 2023
650e8e4
Companion for paritytech/substrate#11649, paritytech/polkadot#5729 sc…
Jan 10, 2023
bc8d5ec
Companion for paritytech/substrate#11649, paritytech/polkadot#5729 pr…
Jan 10, 2023
ac6464c
Companion for paritytech/substrate#12109
Jan 10, 2023
ba7470e
Type create origin
Jan 10, 2023
710a439
Format
Jan 10, 2023
21c50da
Fix type CreateOrigin
Jan 10, 2023
7854698
Format
Jan 10, 2023
791555b
Companion for paritytech/frontier#935
Jan 10, 2023
eb99990
Fix compile
Jan 10, 2023
d45d201
Fix service
Jan 11, 2023
d00ef46
Format
Jan 11, 2023
a2aa89a
`Frontier` upgrade (#196)
boundless-forest Jan 11, 2023
2d0bff3
Merge branch 'main' into bear-replace-dispatch
boundless-forest Jan 12, 2023
a3ecf36
Update prepare branch
Jan 12, 2023
650df5f
Merge branch 'main' into guantong/prepare-polkadot-v0.9.33
Jan 12, 2023
87fef95
Fix mock
Jan 12, 2023
e7af287
Add pallet-evm-precompile-dispatch/std
Jan 12, 2023
351236b
Merge branch 'main' into guantong/prepare-polkadot-v0.9.33
Jan 13, 2023
a91769d
Format
Jan 13, 2023
39296e0
Format
Jan 13, 2023
e22c541
Correct version after merge
Jan 13, 2023
b786302
Fix review
Jan 13, 2023
553ef8a
Fix review
Jan 13, 2023
87fbe5e
Fix CI test
boundless-forest Jan 13, 2023
998278a
Merge branch 'main' into guantong/prepare-polkadot-v0.9.33
Jan 13, 2023
37f3cda
Merge branch 'main' into guantong/prepare-polkadot-v0.9.33
Jan 13, 2023
a30bd12
Fix compile after merge
Jan 15, 2023
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,178 changes: 1,046 additions & 1,132 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/inflation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dc-types = { path = "../types" }
substrate-fixed = { default-features = false, git = "https://github.com/encointer/substrate-fixed" }

[dev-dependencies]
sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }

[features]
default = ["std"]
Expand Down
7 changes: 3 additions & 4 deletions core/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ version = "6.0.0"
dc-types = { path = "../types" }

# moonbeam
account = { default-features = false, git = "https://github.com/darwinia-network/moonbeam", branch = "polkadot-v0.9.30" }
account = { default-features = false, git = "https://github.com/darwinia-network/moonbeam", branch = "polkadot-v0.9.33" }

# substrate
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }

sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }

[features]
default = ["std"]
Expand Down
136 changes: 70 additions & 66 deletions node/Cargo.toml

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions node/src/chain_spec/crab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ pub fn genesis_config() -> ChainSpec {
// EVM stuff.
ethereum: Default::default(),
evm: Default::default(),
base_fee: Default::default(),

// S2S stuff.
bridge_polkadot_grandpa: Default::default(),
Expand Down Expand Up @@ -335,7 +334,6 @@ fn testnet_genesis(
)
},
},
base_fee: Default::default(),

// S2S stuff.
bridge_polkadot_grandpa: Default::default(),
Expand Down
2 changes: 0 additions & 2 deletions node/src/chain_spec/darwinia.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ pub fn genesis_config() -> ChainSpec {
// EVM stuff.
ethereum: Default::default(),
evm: Default::default(),
base_fee: Default::default(),

// S2S stuff.
bridge_kusama_grandpa: Default::default(),
Expand Down Expand Up @@ -335,7 +334,6 @@ fn testnet_genesis(
)
},
},
base_fee: Default::default(),

// S2S stuff.
bridge_kusama_grandpa: Default::default(),
Expand Down
2 changes: 0 additions & 2 deletions node/src/chain_spec/pangolin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ pub fn genesis_config() -> ChainSpec {
// EVM stuff.
ethereum: Default::default(),
evm: Default::default(),
base_fee: Default::default(),
}
},
Vec::new(),
Expand Down Expand Up @@ -329,6 +328,5 @@ fn testnet_genesis(
)
},
},
base_fee: Default::default(),
}
}
27 changes: 16 additions & 11 deletions node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,29 @@ pub enum Subcommand {

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

/// Try some testing command against a specified runtime state.
#[cfg(feature = "try-runtime")]
TryRuntime(try_runtime_cli::TryRuntimeCmd),

/// Errors since the binary was not build with `--features try-runtime`.
#[cfg(not(feature = "try-runtime"))]
TryRuntime,
}

#[derive(Debug, clap::Parser)]
#[clap(
#[command(
propagate_version = true,
args_conflicts_with_subcommands = true,
subcommand_negates_reqs = true
)]
pub struct Cli {
#[clap(subcommand)]
#[command(subcommand)]
pub subcommand: Option<Subcommand>,

#[clap(flatten)]
#[command(flatten)]
pub run: cumulus_client_cli::RunCmd,

/// Disable automatic hardware benchmarks.
Expand All @@ -81,14 +86,14 @@ pub struct Cli {
///
/// The results are then printed out in the logs, and also sent as part of
/// telemetry, if telemetry is enabled.
#[clap(long)]
#[arg(long)]
pub no_hardware_benchmarks: bool,

/// Relay chain arguments
#[clap(raw = true)]
#[arg(raw = true)]
pub relay_chain_args: Vec<String>,

#[clap(flatten)]
#[command(flatten)]
pub eth_args: EthArgs,
}

Expand Down Expand Up @@ -119,19 +124,19 @@ impl RelayChainCli {
#[derive(Debug, clap::Parser)]
pub struct EthArgs {
/// Size in bytes of the LRU cache for block data.
#[clap(long, default_value = "300000000")]
#[arg(long, default_value = "300000000")]
pub eth_log_block_cache: usize,

/// Size of the LRU cache for block data and their transaction statuses.
#[clap(long, default_value = "300000000")]
#[arg(long, default_value = "300000000")]
pub eth_statuses_cache: usize,

/// Maximum number of logs in a query.
#[clap(long, default_value = "10000")]
#[arg(long, default_value = "10000")]
pub max_past_logs: u32,

/// Maximum fee history cache size.
#[clap(long, default_value = "2048")]
#[arg(long, default_value = "2048")]
pub fee_history_limit: u64,
}
impl EthArgs {
Expand Down
52 changes: 28 additions & 24 deletions node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ use sc_cli::{
};
use sc_service::{
config::{BasePath, PrometheusConfig},
DatabaseSource, PartialComponents, TaskManager,
DatabaseSource, PartialComponents,
};
use sp_core::{crypto::Ss58AddressFormatRegistry, hexdisplay::HexDisplay};
use sp_runtime::traits::{AccountIdConversion, Block as BlockT};
Expand Down Expand Up @@ -496,35 +496,35 @@ pub fn run() -> Result<()> {
_ => Err("Benchmarking sub-command unsupported".into()),
}
},
#[cfg(feature = "try-runtime")]
Some(Subcommand::TryRuntime(cmd)) => {
if cfg!(feature = "try-runtime") {
let runner = cli.create_runner(cmd)?;
let chain_spec = &runner.config().chain_spec;
let runner = cli.create_runner(cmd)?;
let chain_spec = &runner.config().chain_spec;

set_default_ss58_version(chain_spec);
// grab the task manager.
let registry = &runner.config().prometheus_config.as_ref().map(|cfg| &cfg.registry);
let task_manager =
TaskManager::new(runner.config().tokio_handle.clone(), *registry)
.map_err(|e| format!("Error: {:?}", e))?;
set_default_ss58_version(chain_spec);
// grab the task manager.
let registry = &runner.config().prometheus_config.as_ref().map(|cfg| &cfg.registry);
let task_manager = TaskManager::new(runner.config().tokio_handle.clone(), *registry)
.map_err(|e| format!("Error: {:?}", e))?;

if chain_spec.is_crab() {
runner.async_run(|config| {
Ok((cmd.run::<Block, CrabRuntimeExecutor>(config), task_manager))
})
} else if chain_spec.is_pangolin() {
runner.async_run(|config| {
Ok((cmd.run::<Block, PangolinRuntimeExecutor>(config), task_manager))
})
} else {
runner.async_run(|config| {
Ok((cmd.run::<Block, DarwiniaRuntimeExecutor>(config), task_manager))
})
}
if chain_spec.is_crab() {
runner.async_run(|config| {
Ok((cmd.run::<Block, CrabRuntimeExecutor>(config), task_manager))
})
} else if chain_spec.is_pangolin() {
runner.async_run(|config| {
Ok((cmd.run::<Block, PangolinRuntimeExecutor>(config), task_manager))
})
} else {
Err("Try-runtime must be enabled by `--features try-runtime`.".into())
runner.async_run(|config| {
Ok((cmd.run::<Block, DarwiniaRuntimeExecutor>(config), task_manager))
})
}
},
#[cfg(not(feature = "try-runtime"))]
Some(Subcommand::TryRuntime) => Err("Try-runtime was not enabled when building the node. \
You can enable it with `--features try-runtime`."
.into()),
None => {
let runner = cli.create_runner(&cli.run.normalize())?;
let collator_options = cli.run.collator_options();
Expand Down Expand Up @@ -568,6 +568,10 @@ pub fn run() -> Result<()> {
if config.role.is_authority() { "yes" } else { "no" }
);

if collator_options.relay_chain_rpc_url.is_some() && cli.relay_chain_args.len() > 0 {
log::warn!("Detected relay chain node arguments together with --relay-chain-rpc-url. This command starts a minimal Polkadot node that only uses a network-related subset of all relay chain CLI options.");
}

if chain_spec.is_dev() {
return if chain_spec.is_crab() {
service::start_dev_node::<CrabRuntimeApi, CrabRuntimeExecutor>(
Expand Down
Loading