Skip to content
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
865 changes: 517 additions & 348 deletions Cargo.lock

Large diffs are not rendered by default.

142 changes: 71 additions & 71 deletions node/Cargo.toml

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ pub enum Subcommand {
#[clap(name = "benchmark", about = "Benchmark runtime pallets.")]
Benchmark(frame_benchmarking_cli::BenchmarkCmd),

/// Sub command for benchmarking the storage speed.
#[clap(name = "benchmark-storage", about = "Benchmark storage speed.")]
BenchmarkStorage(frame_benchmarking_cli::StorageCmd),

/// Try some command against runtime state.
#[cfg(feature = "try-runtime")]
TryRuntime(try_runtime_cli::TryRuntimeCmd),
Expand Down
16 changes: 16 additions & 0 deletions node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,22 @@ pub fn run() -> Result<()> {
You can enable it with `--features runtime-benchmarks`."
.into())
},
Some(Subcommand::BenchmarkStorage(cmd)) => {
if !cfg!(feature = "runtime-benchmarks") {
return Err("Benchmarking wasn't enabled when building the node. \
You can enable it with `--features runtime-benchmarks`."
.into())
}

let runner = cli.create_runner(cmd)?;
runner.async_run(|config| {
let PartialComponents { client, task_manager, backend, .. } = new_partial(&config)?;
let db = backend.expose_db();
let storage = backend.expose_storage();

Ok((cmd.run(config, client, db, storage), task_manager))
})
},
Some(Subcommand::Key(cmd)) => cmd.run(&cli),
Some(Subcommand::Sign(cmd)) => cmd.run(),
Some(Subcommand::Verify(cmd)) => cmd.run(),
Expand Down
9 changes: 6 additions & 3 deletions node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ pub fn new_partial(
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();

let slot =
sp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_duration(
sp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
*timestamp,
slot_duration,
);
Expand Down Expand Up @@ -441,7 +441,7 @@ pub fn new_full_base(
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();

let slot =
sp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_duration(
sp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
*timestamp,
slot_duration,
);
Expand Down Expand Up @@ -672,7 +672,10 @@ mod tests {
.epoch_changes()
.shared_data()
.epoch_data(&epoch_descriptor, |slot| {
sc_consensus_babe::Epoch::genesis(&babe_link.config(), slot)
sc_consensus_babe::Epoch::genesis(
&babe_link.config(),
slot,
)
})
.unwrap();

Expand Down
23 changes: 12 additions & 11 deletions pallets/chainbridge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ edition = '2021'

[dependencies]
# third-party dependencies
codec = { package = "parity-scale-codec", version = "2.2.0", default-features = false, features = ["derive", "max-encoded-len"] }
scale-info = { version = "1.0", default-features = false, features = ["derive"] }
serde = { version = "1.0.126", optional = true }
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] }
scale-info = { version = "2.0.0", default-features = false, features = ["derive"] }
serde = { version = "1.0.136", optional = true }

# primitives
sp-io = { version = "4.0.0", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-02' }
sp-core = { version = "4.1.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-02' }
sp-runtime = { version = "4.1.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-02' }
sp-std = { version = "4.0.0", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-02' }
sp-io = { version = "5.0.0", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-03' }
sp-core = { version = "5.0.0", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-03' }
sp-runtime = { version = "5.0.0", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-03' }
sp-std = { version = "4.0.0", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-03' }

# frame dependencies
frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-02' }
frame-support = { version = "4.0.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-02' }
frame-system = { version = "4.0.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-02' }
pallet-balances = { version = "4.0.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-02' }
frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-03' }
frame-support = { version = "4.0.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-03' }
frame-system = { version = "4.0.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-03' }
pallet-balances = { version = "4.0.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-03' }

[build-dependencies]
wasm-builder-runner = { version = "3.0.0", package = "substrate-wasm-builder-runner"}
Expand All @@ -30,6 +30,7 @@ default = ["std"]
runtime-benchmarks = ['frame-benchmarking']
std = [
"codec/std",
"scale-info/std",
"serde",
"sp-std/std",
"sp-runtime/std",
Expand Down
30 changes: 15 additions & 15 deletions pallets/dentbridge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,29 @@ version = '0.0.1'
targets = ['x86_64-unknown-linux-gnu']

[dev-dependencies]
sp-io = { version = "4.0.0", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-02' }
sp-core = { version = "4.1.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-02' }
sp-runtime = { version = "4.1.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-02' }
pallet-assets = { version = "4.0.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-02' }
pallet-balances = { version = "4.0.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-02' }
sp-io = { version = "5.0.0", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-03' }
sp-core = { version = "5.0.0", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-03' }
sp-runtime = { version = "5.0.0", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-03' }
pallet-assets = { version = "4.0.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-03' }
pallet-balances = { version = "4.0.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-03' }
hex-literal = { version = "0.3.4" }

[dependencies]
# third-party dependencies
codec = { package = "parity-scale-codec", version = "2.2.0", default-features = false, features = ["derive", "max-encoded-len"] }
scale-info = { version = "1.0", default-features = false, features = ["derive"] }
#serde = { version = "1.0.126", optional = true }
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] }
scale-info = { version = "2.0.0", default-features = false, features = ["derive"] }

# primitives
sp-io = { version = "4.0.0", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-02' }
sp-core = { version = "4.1.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-02' }
sp-std = { version = "4.0.0", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-02' }
sp-io = { version = "5.0.0", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-03' }
sp-core = { version = "5.0.0", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-03' }
sp-std = { version = "4.0.0", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-03' }

frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-02', optional = true }
frame-support = { version = "4.0.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-02' }
frame-system = { version = "4.0.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-02' }
frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-03', optional = true }
frame-support = { version = "4.0.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-03' }
frame-system = { version = "4.0.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-03' }

# for benchmarking only (optional)
pallet-assets = { version = "4.0.0-dev", optional = true, default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-02' }
pallet-assets = { version = "4.0.0-dev", optional = true, default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-03' }
hex-literal = { version = "0.3.4", optional = true }

[dependencies.chainbridge]
Expand All @@ -57,6 +56,7 @@ std = [
'frame-system/std',
'frame-benchmarking/std',
# 'sp-std/std',
'scale-info/std',
'sp-core/std',
'chainbridge/std'
]
Expand Down
18 changes: 9 additions & 9 deletions pallets/executive-collective/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ readme = "README.md"
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
scale-info = { version = "1.0", default-features = false, features = ["derive"] }
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] }
scale-info = { version = "2.0.0", default-features = false, features = ["derive"] }
log = { version = "0.4.14", default-features = false }

sp-core = { version = "4.1.0-dev",default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-02' }
sp-io = { version = "4.0.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-02' }
sp-runtime = { version = "4.1.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-02' }
sp-std = { version = "4.0.0", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-02' }
sp-core = { version = "5.0.0",default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-03' }
sp-io = { version = "5.0.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-03' }
sp-runtime = { version = "5.0.0", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-03' }
sp-std = { version = "4.0.0", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-03' }

frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-02', optional = true }
frame-support = { version = "4.0.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-02' }
frame-system = { version = "4.0.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-02' }
frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-03', optional = true }
frame-support = { version = "4.0.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-03' }
frame-system = { version = "4.0.0-dev", default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2022-03' }

[features]
default = ["std"]
Expand Down
Loading