Skip to content

Commit

Permalink
Release v0.11.1 (#686)
Browse files Browse the repository at this point in the history
* anchor `darwinia-v0.11.1`

* companion for #polkadot-2966

* companion for #polkadot-2648

* companion for #polkadot-2845

* companion for #substrate-8718

* update format

* fix typo

* companion for #common-629

* fix compile

* `cargo update -p dvm-dynamic-fee`

* remove old migrations

* companion for #common-628 (#689)

Co-authored-by: bear <[email protected]>
  • Loading branch information
Xavier Lau and bear authored Jul 28, 2021
1 parent 536bda9 commit 64ab5d3
Show file tree
Hide file tree
Showing 24 changed files with 746 additions and 624 deletions.
488 changes: 271 additions & 217 deletions Cargo.lock

Large diffs are not rendered by default.

44 changes: 22 additions & 22 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,41 +9,41 @@ name = "darwinia-cli"
repository = "https://github.com/darwinia-network/darwinia/"
version = "0.11.0"

[package.metadata.wasm-pack.profile.release]
# `wasm-opt` has some problems on linux, see
# https://github.com/rustwasm/wasm-pack/issues/781 etc.
wasm-opt = false
[package.metadata.wasm-pack.profile.release]
# `wasm-opt` has some problems on linux, see
# https://github.com/rustwasm/wasm-pack/issues/781 etc.
wasm-opt = false

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
# crates
log = { version = "0.4.14" }
serde = { version = "1.0.126", optional = true }
structopt = { version = "0.3.21" }
tokio = { version = "0.3.7", optional = true, features = ["rt-multi-thread"] }
log = { version = "0.4.14" }
serde = { version = "1.0.126", optional = true }
structopt = { version = "0.3.21" }
tokio = { version = "0.3.7", optional = true, features = ["rt-multi-thread"] }
# darwinia client
darwinia-cli = { optional = true, git = "https://github.com/darwinia-network/darwinia-common.git", tag = "darwinia-v0.11.0" }
darwinia-cli = { optional = true, git = "https://github.com/darwinia-network/darwinia-common.git", tag = "darwinia-v0.11.1" }
# darwinia service
darwinia-service = { default-features = false, path = "../node/service" }
# substrate client
sc-cli = { optional = true, git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sc-client-api = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sc-executor = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sc-network = { optional = true, git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sc-service = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sc-tracing = { optional = true, git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
try-runtime-cli = { optional = true, git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sc-cli = { optional = true, git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sc-client-api = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sc-executor = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sc-network = { optional = true, git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sc-service = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sc-tracing = { optional = true, git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
try-runtime-cli = { optional = true, git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
# substrate primitives
sp-core = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sp-core = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
# this crate is used only to enable `trie-memory-tracker` feature
# see https://github.com/paritytech/substrate/pull/6745
sp-trie = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sp-trie = { default-features = false, git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }

[build-dependencies]
substrate-build-script-utils = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
try-runtime-cli = { optional = true, git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
substrate-build-script-utils = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
try-runtime-cli = { optional = true, git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }

[features]
default = [
Expand All @@ -60,10 +60,10 @@ cli = [
"darwinia-cli",
"darwinia-service/full-node",
]
db = ["darwinia-service/db"]
db = ["darwinia-service/db"]

trie-memory-tracker = ["sp-trie/memory-tracker"]
wasmtime = [
wasmtime = [
"sc-cli/wasmtime",
"trie-memory-tracker",
]
Expand Down
15 changes: 15 additions & 0 deletions cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ pub struct RunCmd {
/// to a subset.
#[structopt(long = "disable-authority-discovery")]
pub authority_discovery_disabled: bool,

#[allow(missing_docs)]
#[structopt(flatten)]
pub dynamic_fee_parameters: DynamicFeeParameters,
}

#[allow(missing_docs)]
Expand Down Expand Up @@ -109,3 +113,14 @@ pub enum Subcommand {
#[cfg(feature = "try-runtime")]
TryRuntime(try_runtime_cli::TryRuntimeCmd),
}

#[derive(Debug, StructOpt)]
pub struct DynamicFeeParameters {
/// Maximum number of logs in a query.
#[structopt(long, default_value = "10000")]
pub max_past_logs: u32,

/// The dynamic-fee pallet target gas price set by block author
#[structopt(long, default_value = "1000000000")]
pub target_gas_price: u64,
}
41 changes: 34 additions & 7 deletions cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ fn set_default_ss58_version(spec: &Box<dyn sc_service::ChainSpec>) {
/// Parses Darwinia specific CLI arguments and run the service.
pub fn run() -> sc_cli::Result<()> {
let cli = Cli::from_args();
let max_past_logs = cli.run.dynamic_fee_parameters.max_past_logs;
let target_gas_price = cli.run.dynamic_fee_parameters.target_gas_price;

match &cli.subcommand {
None => {
Expand All @@ -162,8 +164,13 @@ pub fn run() -> sc_cli::Result<()> {
Role::Light => {
crab::crab_new_light(config).map(|(task_manager, _)| task_manager)
}
_ => crab::crab_new_full(config, authority_discovery_disabled)
.map(|(task_manager, _, _)| task_manager),
_ => crab::crab_new_full(
config,
authority_discovery_disabled,
max_past_logs,
target_gas_price,
)
.map(|(task_manager, _, _)| task_manager),
}
.map_err(sc_cli::Error::Service)
})
Expand Down Expand Up @@ -194,7 +201,11 @@ pub fn run() -> sc_cli::Result<()> {
if chain_spec.is_crab() {
runner.async_run(|mut config| {
let (client, _, import_queue, task_manager) =
crab::new_chain_ops::<crab_runtime::RuntimeApi, CrabExecutor>(&mut config)?;
crab::new_chain_ops::<crab_runtime::RuntimeApi, CrabExecutor>(
&mut config,
max_past_logs,
target_gas_price,
)?;

Ok((cmd.run(client, import_queue), task_manager))
})
Expand All @@ -220,7 +231,11 @@ pub fn run() -> sc_cli::Result<()> {
if chain_spec.is_crab() {
runner.async_run(|mut config| {
let (client, _, _, task_manager) =
crab::new_chain_ops::<crab_runtime::RuntimeApi, CrabExecutor>(&mut config)?;
crab::new_chain_ops::<crab_runtime::RuntimeApi, CrabExecutor>(
&mut config,
max_past_logs,
target_gas_price,
)?;

Ok((cmd.run(client, config.database), task_manager))
})
Expand All @@ -246,7 +261,11 @@ pub fn run() -> sc_cli::Result<()> {
if chain_spec.is_crab() {
runner.async_run(|mut config| {
let (client, _, _, task_manager) =
crab::new_chain_ops::<crab_runtime::RuntimeApi, CrabExecutor>(&mut config)?;
crab::new_chain_ops::<crab_runtime::RuntimeApi, CrabExecutor>(
&mut config,
max_past_logs,
target_gas_price,
)?;

Ok((cmd.run(client, config.chain_spec), task_manager))
})
Expand All @@ -272,7 +291,11 @@ pub fn run() -> sc_cli::Result<()> {
if chain_spec.is_crab() {
runner.async_run(|mut config| {
let (client, _, import_queue, task_manager) =
crab::new_chain_ops::<crab_runtime::RuntimeApi, CrabExecutor>(&mut config)?;
crab::new_chain_ops::<crab_runtime::RuntimeApi, CrabExecutor>(
&mut config,
max_past_logs,
target_gas_price,
)?;

Ok((cmd.run(client, import_queue), task_manager))
})
Expand Down Expand Up @@ -302,7 +325,11 @@ pub fn run() -> sc_cli::Result<()> {
if chain_spec.is_crab() {
runner.async_run(|mut config| {
let (client, backend, _, task_manager) =
crab::new_chain_ops::<crab_runtime::RuntimeApi, CrabExecutor>(&mut config)?;
crab::new_chain_ops::<crab_runtime::RuntimeApi, CrabExecutor>(
&mut config,
max_past_logs,
target_gas_price,
)?;

Ok((cmd.run(client, backend), task_manager))
})
Expand Down
88 changes: 46 additions & 42 deletions node/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,17 @@ log = { version = "0.4.14" }
serde = { version = "1.0.126", features = ["derive"] }
serde_json = { version = "1.0.64" }
# darwinia frame
darwinia-balances-rpc-runtime-api = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "darwinia-v0.11.0" }
darwinia-header-mmr-rpc-runtime-api = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "darwinia-v0.11.0" }
darwinia-staking-rpc-runtime-api = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "darwinia-v0.11.0" }
darwinia-balances-rpc-runtime-api = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "darwinia-v0.11.1" }
darwinia-header-mmr-rpc-runtime-api = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "darwinia-v0.11.1" }
darwinia-staking-rpc-runtime-api = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "darwinia-v0.11.1" }
# dvm
darwinia-evm = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "darwinia-v0.11.0" }
dc-db = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "darwinia-v0.11.0" }
dc-mapping-sync = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "darwinia-v0.11.0" }
dc-rpc = { features = ["rpc_binary_search_estimate"], git = "https://github.com/darwinia-network/darwinia-common.git", tag = "darwinia-v0.11.0" }
dp-rpc = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "darwinia-v0.11.0" }
dvm-rpc-runtime-api = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "darwinia-v0.11.0" }
darwinia-evm = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "darwinia-v0.11.1" }
dc-db = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "darwinia-v0.11.1" }
dc-mapping-sync = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "darwinia-v0.11.1" }
dc-rpc = { features = ["rpc_binary_search_estimate"], git = "https://github.com/darwinia-network/darwinia-common.git", tag = "darwinia-v0.11.1" }
dp-rpc = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "darwinia-v0.11.1" }
dvm-dynamic-fee = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "darwinia-v0.11.1" }
dvm-rpc-runtime-api = { git = "https://github.com/darwinia-network/darwinia-common.git", tag = "darwinia-v0.11.1" }
# darwinia primitives
darwinia-primitives = { path = "../../primitives" }
# darwinia rpc
Expand All @@ -35,41 +36,44 @@ darwinia-rpc = { path = "../../rpc" }
crab-runtime = { path = "../../runtime/crab" }
darwinia-runtime = { path = "../../runtime/darwinia" }
# substrate client
sc-authority-discovery = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sc-basic-authorship = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sc-chain-spec = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sc-client-api = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sc-client-db = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sc-consensus = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sc-consensus-babe = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sc-executor = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sc-finality-grandpa = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sc-network = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sc-service = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sc-telemetry = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sc-transaction-pool = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sc-authority-discovery = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sc-basic-authorship = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sc-chain-spec = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sc-client-api = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sc-client-db = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sc-consensus = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sc-consensus-babe = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sc-consensus-uncles = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sc-executor = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sc-finality-grandpa = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sc-network = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sc-service = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sc-telemetry = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sc-transaction-pool = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
# substrate frame
frame-system-rpc-runtime-api = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
pallet-im-online = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
substrate-prometheus-endpoint = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
frame-system-rpc-runtime-api = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
pallet-im-online = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
substrate-prometheus-endpoint = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
# substrate primitives
sc-consensus-slots = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sc-keystore = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sp-api = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sp-authority-discovery = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sp-block-builder = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sp-blockchain = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sp-consensus = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sp-consensus-babe = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sp-core = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sp-finality-grandpa = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sp-inherents = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sp-offchain = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sp-runtime = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sp-session = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sp-transaction-pool = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sp-trie = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.0" }
sc-consensus-slots = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sc-keystore = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sp-api = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sp-authority-discovery = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sp-authorship = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sp-block-builder = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sp-blockchain = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sp-consensus = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sp-consensus-babe = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sp-core = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sp-finality-grandpa = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sp-inherents = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sp-offchain = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sp-runtime = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sp-session = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sp-timestamp = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sp-transaction-pool = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }
sp-trie = { git = "https://github.com/darwinia-network/substrate.git", tag = "darwinia-v0.11.1" }

[features]
default = ["db", "full-node"]
Expand Down
2 changes: 2 additions & 0 deletions node/service/src/chain_spec/crab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ pub fn crab_build_spec_genesis() -> GenesisConfig {
accounts: BTreeMap::new(),
},
dvm_ethereum: Default::default(),
dvm_dynamic_fee: Default::default(),
}
}

Expand Down Expand Up @@ -315,6 +316,7 @@ pub fn crab_testnet_genesis(
accounts: BTreeMap::new(),
},
dvm_ethereum: Default::default(),
dvm_dynamic_fee: Default::default(),
}
}

Expand Down
Loading

0 comments on commit 64ab5d3

Please sign in to comment.