Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
4c0abc5
A clean new attempt
kianenigma Feb 3, 2021
7f9b5b8
Checkpoint to move remote.
kianenigma Feb 10, 2021
4883812
A lot of dependency wiring to make it feature gated.
kianenigma Feb 10, 2021
be549b4
bad macro, bad macro.
kianenigma Feb 10, 2021
8e97733
Master.into()
kianenigma Feb 11, 2021
d84dad4
Undo the DB mess.
kianenigma Feb 11, 2021
aeb7a0e
Update frame/support/src/traits.rs
kianenigma Feb 11, 2021
d968f58
Apply suggestions from code review
kianenigma Feb 11, 2021
ce4128b
unbreak the build
kianenigma Feb 13, 2021
ee8ae08
Merge branch 'kiz-finally-finally-finally-finally-migration-testing-2…
kianenigma Feb 13, 2021
62be119
Master.into()
kianenigma Feb 16, 2021
712c240
Update frame/try-runtime/src/lib.rs
kianenigma Feb 18, 2021
9a23940
Update utils/frame/try-runtime/cli/Cargo.toml
kianenigma Feb 18, 2021
93f299a
Update frame/try-runtime/Cargo.toml
kianenigma Feb 18, 2021
3cea840
Address most review grumbles.
kianenigma Feb 18, 2021
ab9d4a3
Upstream.into()
kianenigma Feb 18, 2021
b13ea31
Fix build
kianenigma Feb 18, 2021
d3a2368
Add some comments
kianenigma Feb 18, 2021
c8ba546
Remove allowing one pallet at a time.
kianenigma Feb 18, 2021
2f9ad0e
More grumbles.
kianenigma Feb 18, 2021
6db195c
Merge branch 'master' of github.com:paritytech/substrate into kiz-fin…
kianenigma Feb 18, 2021
b8ab620
relocate remote-ext
kianenigma Feb 19, 2021
be5210d
Merge branch 'master' of github.com:paritytech/substrate into kiz-fin…
kianenigma Feb 19, 2021
b5e394b
Fix build
kianenigma Feb 19, 2021
deb03d4
Merge branch 'master' of github.com:paritytech/substrate into kiz-fin…
kianenigma Feb 19, 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
Prev Previous commit
Next Next commit
Master.into()
  • Loading branch information
kianenigma committed Feb 11, 2021
commit 8e97733bce1b4df28dc0d1b72713ed60f763d8c2
95 changes: 36 additions & 59 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ members = [
"frame/contracts/rpc",
"frame/contracts/rpc/runtime-api",
"frame/democracy",
"frame/dry-run-runtime-upgrade",
"frame/try-runtime",
"frame/elections",
"frame/example",
"frame/example-offchain-worker",
Expand Down Expand Up @@ -187,8 +187,8 @@ members = [
"utils/fork-tree",
"utils/frame/benchmarking-cli",
"utils/frame/frame-utilities-cli",
"utils/frame/dry-run-runtime-upgrade/remote-externalities",
"utils/frame/dry-run-runtime-upgrade/cli",
"utils/frame/try-runtime/remote-externalities",
"utils/frame/try-runtime/cli",
"utils/frame/rpc/support",
"utils/frame/rpc/system",
"utils/prometheus",
Expand Down
18 changes: 9 additions & 9 deletions bin/node/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ node-executor = { version = "2.0.0", path = "../executor" }
sc-cli = { version = "0.9.0", optional = true, path = "../../../client/cli" }
frame-benchmarking-cli = { version = "3.0.0", optional = true, path = "../../../utils/frame/benchmarking-cli" }
node-inspect = { version = "0.8.0", optional = true, path = "../inspect" }
dry-run-runtime-upgrade-cli = { version = "2.0.0", optional = true, path = "../../../utils/frame/dry-run-runtime-upgrade/cli" }
try-runtime-cli = { version = "3.0.0", optional = true, path = "../../../utils/frame/try-runtime/cli" }

# WASM-specific dependencies
wasm-bindgen = { version = "0.2.57", optional = true }
Expand Down Expand Up @@ -129,10 +129,10 @@ platforms = "1.1"
[build-dependencies]
structopt = { version = "0.3.8", optional = true }
node-inspect = { version = "0.8.0", optional = true, path = "../inspect" }
frame-benchmarking-cli = { version = "2.0.0", optional = true, path = "../../../utils/frame/benchmarking-cli" }
substrate-build-script-utils = { version = "2.0.0", optional = true, path = "../../../utils/build-script-utils" }
substrate-frame-cli = { version = "2.0.0", optional = true, path = "../../../utils/frame/frame-utilities-cli" }
dry-run-runtime-upgrade-cli = { version = "2.0.0", optional = true, path = "../../../utils/frame/dry-run-runtime-upgrade/cli" }
frame-benchmarking-cli = { version = "3.0.0", optional = true, path = "../../../utils/frame/benchmarking-cli" }
substrate-build-script-utils = { version = "3.0.0", optional = true, path = "../../../utils/build-script-utils" }
substrate-frame-cli = { version = "3.0.0", optional = true, path = "../../../utils/frame/frame-utilities-cli" }
try-runtime-cli = { version = "3.0.0", optional = true, path = "../../../utils/frame/try-runtime/cli" }

[build-dependencies.sc-cli]
version = "0.9.0"
Expand All @@ -157,13 +157,13 @@ cli = [
"sc-finality-grandpa-warp-sync",
"structopt",
"substrate-build-script-utils",
"dry-run-runtime-upgrade-cli",
"try-runtime-cli",
]
runtime-benchmarks = [
"node-runtime/runtime-benchmarks",
"frame-benchmarking-cli",
]
runtime-upgrade-dry-run = [
"node-runtime/runtime-upgrade-dry-run",
"dry-run-runtime-upgrade-cli",
try-runtime = [
"node-runtime/try-runtime",
"try-runtime-cli",
]
2 changes: 1 addition & 1 deletion bin/node/cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub enum Subcommand {
/// Dry-run all of the runtime upgrade hooks in the current runtime upon a configurable state.
///
/// The state is independent of the current chain and can be fetched remotely.
DryRunRuntimeUpgrade(dry_run_runtime_upgrade_cli::DryRunRuntimeUpgradeCmd),
TryRuntime(try_runtime_cli::TryRuntimeCmd),

/// Verify a signature for a message, provided on STDIN, with a given (public or secret) key.
Verify(VerifyCmd),
Expand Down
2 changes: 1 addition & 1 deletion bin/node/cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ pub fn run() -> Result<()> {
Ok((cmd.run(client, backend), task_manager))
})
},
Some(Subcommand::DryRunRuntimeUpgrade(cmd)) => {
Some(Subcommand::TryRuntime(cmd)) => {
let runner = cli.create_runner(cmd)?;
runner.async_run(|config| {
let PartialComponents { task_manager, .. } = new_partial(&config)?;
Expand Down
36 changes: 18 additions & 18 deletions bin/node/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,20 @@ sp-transaction-pool = { version = "3.0.0", default-features = false, path = "../
sp-version = { version = "3.0.0", default-features = false, path = "../../../primitives/version" }

# frame dependencies
frame-executive = { version = "2.0.0", default-features = false, path = "../../../frame/executive" }
frame-benchmarking = { version = "2.0.0", default-features = false, path = "../../../frame/benchmarking", optional = true }
frame-support = { version = "2.0.0", default-features = false, path = "../../../frame/support" }
frame-system = { version = "2.0.0", default-features = false, path = "../../../frame/system" }
frame-system-benchmarking = { version = "2.0.0", default-features = false, path = "../../../frame/system/benchmarking", optional = true }
frame-system-rpc-runtime-api = { version = "2.0.0", default-features = false, path = "../../../frame/system/rpc/runtime-api/" }
frame-dry-run-runtime-upgrade = { default-features = false, path = "../../../frame/dry-run-runtime-upgrade", optional = true }
pallet-assets = { version = "2.0.0", default-features = false, path = "../../../frame/assets" }
pallet-authority-discovery = { version = "2.0.0", default-features = false, path = "../../../frame/authority-discovery" }
pallet-authorship = { version = "2.0.0", default-features = false, path = "../../../frame/authorship" }
pallet-babe = { version = "2.0.0", default-features = false, path = "../../../frame/babe" }
pallet-balances = { version = "2.0.0", default-features = false, path = "../../../frame/balances" }
pallet-bounties = { version = "2.0.0", default-features = false, path = "../../../frame/bounties" }
pallet-collective = { version = "2.0.0", default-features = false, path = "../../../frame/collective" }
frame-executive = { version = "3.0.0", default-features = false, path = "../../../frame/executive" }
frame-benchmarking = { version = "3.0.0", default-features = false, path = "../../../frame/benchmarking", optional = true }
frame-support = { version = "3.0.0", default-features = false, path = "../../../frame/support" }
frame-system = { version = "3.0.0", default-features = false, path = "../../../frame/system" }
frame-system-benchmarking = { version = "3.0.0", default-features = false, path = "../../../frame/system/benchmarking", optional = true }
frame-system-rpc-runtime-api = { version = "3.0.0", default-features = false, path = "../../../frame/system/rpc/runtime-api/" }
frame-try-runtime = { version = "3.0.0", default-features = false, path = "../../../frame/try-runtime", optional = true }
pallet-assets = { version = "3.0.0", default-features = false, path = "../../../frame/assets" }
pallet-authority-discovery = { version = "3.0.0", default-features = false, path = "../../../frame/authority-discovery" }
pallet-authorship = { version = "3.0.0", default-features = false, path = "../../../frame/authorship" }
pallet-babe = { version = "3.0.0", default-features = false, path = "../../../frame/babe" }
pallet-balances = { version = "3.0.0", default-features = false, path = "../../../frame/balances" }
pallet-bounties = { version = "3.0.0", default-features = false, path = "../../../frame/bounties" }
pallet-collective = { version = "3.0.0", default-features = false, path = "../../../frame/collective" }
pallet-contracts = { version = "2.0.0", default-features = false, path = "../../../frame/contracts" }
pallet-contracts-primitives = { version = "2.0.0", default-features = false, path = "../../../frame/contracts/common/" }
pallet-contracts-rpc-runtime-api = { version = "0.8.0", default-features = false, path = "../../../frame/contracts/rpc/runtime-api/" }
Expand Down Expand Up @@ -152,7 +152,7 @@ std = [
"pallet-society/std",
"pallet-recovery/std",
"pallet-vesting/std",
"frame-dry-run-runtime-upgrade/std",
"frame-try-runtime/std",
]
runtime-benchmarks = [
"frame-benchmarking",
Expand Down Expand Up @@ -188,7 +188,7 @@ runtime-benchmarks = [
"frame-system-benchmarking",
"hex-literal",
]
runtime-upgrade-dry-run = [
"frame-executive/runtime-upgrade-dry-run",
"frame-dry-run-runtime-upgrade",
try-runtime = [
"frame-executive/try-runtime",
"frame-try-runtime",
]
12 changes: 6 additions & 6 deletions bin/node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1332,21 +1332,21 @@ impl_runtime_apis! {
}
}

#[cfg(feature = "runtime-upgrade-dry-run")]
impl frame_dry_run_runtime_upgrade::DryRunRuntimeUpgrade<Block> for Runtime {
fn dry_run_runtime_upgrade(target: frame_dry_run_runtime_upgrade::Target) -> Weight {
#[cfg(feature = "try-runtime")]
impl frame_try_runtime::TryRuntime<Block> for Runtime {
fn on_runtime_upgrade(target: frame_try_runtime::Target) -> Weight {
frame_support::debug::RuntimeLogger::init();

let weight = match target {
frame_dry_run_runtime_upgrade::Target::All => {
frame_try_runtime::Target::All => {
frame_support::debug::info!("Dry-running all on-runtime-upgrades.");
Executive::dry_run_runtime_upgrade()
},
frame_dry_run_runtime_upgrade::Target::Pallet(name) => {
frame_try_runtime::Target::Pallet(name) => {
let name = sp_std::str::from_utf8(&name).unwrap();
frame_support::debug::info!("Dry-running on-runtime-upgrade of {}.", name);

frame_dry_run_runtime_upgrade::match_pallet_on_runtime_upgrade!(name,
frame_try_runtime::match_pallet_on_runtime_upgrade!(name,
System, Utility, Babe, Timestamp, Authorship, Indices, Balances,
TransactionPayment, Staking, Session, Democracy, Council,
TechnicalCommittee, Elections, TechnicalMembership, Grandpa, Treasury,
Expand Down
4 changes: 2 additions & 2 deletions frame/executive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ std = [
"sp-tracing/std",
"sp-std/std",
]
runtime-upgrade-dry-run = [
"frame-support/runtime-upgrade-dry-run"
try-runtime = [
"frame-support/try-runtime"
]
2 changes: 1 addition & 1 deletion frame/executive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ where
/// Execute all `OnRuntimeUpgrade` of this runtime, including the pre and post migration checks.
///
/// This should only be used for testing.
#[cfg(feature = "runtime-upgrade-dry-run")]
#[cfg(feature = "try-runtime")]
pub fn dry_run_runtime_upgrade() -> frame_support::weights::Weight {
<
(frame_system::Module::<System>, COnRuntimeUpgrade, AllModules)
Expand Down
2 changes: 1 addition & 1 deletion frame/support/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ std = [
nightly = []
strict = []
runtime-benchmarks = []
runtime-upgrade-dry-run = []
try-runtime = []
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.