Skip to content

Commit

Permalink
Update from polkadot-v0.9.38 to polkadot-v0.9.39
Browse files Browse the repository at this point in the history
Breaking changes from upstream:

- Rename pallet-random-collective-flip to Insecure...
  paritytech/substrate#13301
- sc_service::BuildNetworkParams::warp_sync field has changed,
  paritytech/substrate#12761

- SortedListProvider::try_state() now only available for the try-runtime
  feature, see paritytech/substrate#13296

- When calling cmd.run() for try-runtime we also need something called
  BlockBuildingInfoProvider, see paritytech/substrate#12896

- Updaged function arguments b/c of mismatched types:

  --> node/rpc/src/task.rs:64:26
   |
64 |         api.offchain_nonce_key(&at, &account_id).map_err(|e| {
   |             ------------------ ^^^ expected associated type, found `&BlockId<_>`
   |             |
   |             arguments to this method are incorrect
   |
   = note: expected associated type `<B as BlockT>::Hash`
           found reference `&BlockId<_>`

  --> sha3pow/src/lib.rs:84:33
   |
84 |         self.runtime_api().difficulty(&parent_id).map_err(|err| {
   |                            ---------- ^^^^^^^^^^ expected struct `H256`, found `&BlockId<B>`
   |                            |
   |                            arguments to this method are incorrect
   |
   = note: expected struct `H256`
           found reference `&BlockId<B>`
  • Loading branch information
atodorov committed Apr 13, 2023
1 parent 0085ed3 commit fd33ebc
Show file tree
Hide file tree
Showing 10 changed files with 416 additions and 372 deletions.
623 changes: 329 additions & 294 deletions Cargo.lock

Large diffs are not rendered by default.

128 changes: 64 additions & 64 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,69 +54,69 @@ task-scheduler-runtime-api = { path = "pallets/offchain-task-scheduler/runtime-a
traced-test = { path = "test/traced-test" }

# Substrate Dependencies
frame-benchmarking-cli = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git"}
frame-benchmarking = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
frame-executive = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
frame-election-provider-support = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
frame-support = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
frame-system = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
frame-system-benchmarking = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
frame-system-rpc-runtime-api = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
pallet-balances = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
pallet-randomness-collective-flip = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
pallet-session = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
pallet-staking-substrate = { package = "pallet-staking", branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
pallet-scheduler = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
pallet-sudo = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
pallet-timestamp = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
pallet-transaction-payment = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
pallet-transaction-payment-rpc = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git" }
pallet-transaction-payment-rpc-runtime-api = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
sc-basic-authorship = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git" }
sc-cli = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git"}
sc-client-api = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git" }
sc-client-db = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", features = ["test-helpers"] }
sc-consensus = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git" }
sc-consensus-pow = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git" }
sc-executor = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git"}
sc-keystore = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git" }
sc-offchain = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git" }
sc-rpc = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git" }
sc-rpc-api = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git" }
sc-telemetry = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git" }
sc-transaction-pool = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git" }
sc-transaction-pool-api = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git" }
sc-service = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", features = [
frame-benchmarking-cli = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git"}
frame-benchmarking = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
frame-executive = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
frame-election-provider-support = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
frame-support = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
frame-system = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
frame-system-benchmarking = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
frame-system-rpc-runtime-api = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
pallet-balances = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
pallet-insecure-randomness-collective-flip = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
pallet-session = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
pallet-staking-substrate = { package = "pallet-staking", branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
pallet-scheduler = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
pallet-sudo = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
pallet-timestamp = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
pallet-transaction-payment = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
pallet-transaction-payment-rpc = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git" }
pallet-transaction-payment-rpc-runtime-api = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
sc-basic-authorship = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git" }
sc-cli = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git"}
sc-client-api = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git" }
sc-client-db = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", features = ["test-helpers"] }
sc-consensus = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git" }
sc-consensus-pow = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git" }
sc-executor = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git"}
sc-keystore = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git" }
sc-offchain = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git" }
sc-rpc = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git" }
sc-rpc-api = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git" }
sc-telemetry = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git" }
sc-transaction-pool = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git" }
sc-transaction-pool-api = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git" }
sc-service = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", features = [
"test-helpers",
] }
sp-api = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-application-crypto = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git" }
sp-arithmetic = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-block-builder = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-blockchain = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git" }
sp-consensus = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-consensus-pow = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-core = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-inherents = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-io = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-keystore = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-offchain = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-runtime = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-runtime-interface = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-session = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-state-machine = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-staking = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-std = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-timestamp = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git" }
sp-transaction-pool = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-version = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
substrate-build-script-utils = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git" }
substrate-frame-rpc-system = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git" }
substrate-prometheus-endpoint = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git" }
substrate-test-client = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git" }
tracing = { package = "sp-tracing", branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
frame-try-runtime = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-externalities = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git", default-features = false }
substrate-wasm-builder = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git" }
try-runtime-cli = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git" }
sp-keyring = { branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git" }
sp-api = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-application-crypto = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git" }
sp-arithmetic = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-block-builder = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-blockchain = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git" }
sp-consensus = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-consensus-pow = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-core = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-inherents = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-io = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-keystore = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-offchain = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-runtime = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-runtime-interface = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-session = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-state-machine = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-staking = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-std = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-timestamp = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git" }
sp-transaction-pool = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-version = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
substrate-build-script-utils = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git" }
substrate-frame-rpc-system = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git" }
substrate-prometheus-endpoint = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git" }
substrate-test-client = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git" }
tracing = { package = "sp-tracing", branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
frame-try-runtime = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
sp-externalities = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git", default-features = false }
substrate-wasm-builder = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git" }
try-runtime-cli = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git" }
sp-keyring = { branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git" }
9 changes: 3 additions & 6 deletions node/rpc/src/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use core::str::FromStr;
use creditcoin_node_runtime as runtime;
use sc_rpc::DenyUnsafe;
use sp_blockchain::HeaderBackend;
use sp_runtime::{generic::BlockId, traits};
use sp_runtime::traits;
use std::sync::Arc;
use task_scheduler_runtime_api::TaskApi;

Expand Down Expand Up @@ -49,10 +49,7 @@ where
async fn offchain_nonce_key(&self, account_id: String) -> RpcResult<Vec<u8>> {
self.deny_unsafe.check_if_safe()?;
let api = self.client.runtime_api();
let at = {
let best = self.client.info().best_hash;
BlockId::hash(best)
};
let at = self.client.info().best_hash;
let account_id = AccountId::from_str(&account_id).map_err(|e| {
JsonRpseeError::Call(CallError::Custom(ErrorObject::owned(
ErrorCode::InvalidParams.code(),
Expand All @@ -61,7 +58,7 @@ where
)))
})?;

api.offchain_nonce_key(&at, &account_id).map_err(|e| {
api.offchain_nonce_key(at, &account_id).map_err(|e| {
JsonRpseeError::Call(CallError::Custom(ErrorObject::owned(
ErrorCode::ServerError(Error::RuntimeError.into()).code(),
"Unable to query offchain nonce key.",
Expand Down
9 changes: 8 additions & 1 deletion node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,16 @@ pub fn run() -> sc_cli::Result<()> {
},
#[cfg(feature = "try-runtime")]
Some(Subcommand::TryRuntime(cmd)) => {
use creditcoin_node_runtime::SLOT_DURATION;
use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch};
use sp_io::SubstrateHostFunctions;
use try_runtime_cli::block_building_info::substrate_info;

let runner = cli.create_runner(cmd)?;
// https://github.com/paritytech/substrate/pull/12896/files#diff-c57da6fbeff8c46ce15f55ea42fedaa5a4684d79578006ce4af01ae04fd6b8f8R245
// for reference implementation
let info_provider = substrate_info(SLOT_DURATION);

runner.async_run(|config| {
// we don't need any of the components of new_partial, just a runtime, or a task
// manager to do `async_run`.
Expand All @@ -174,7 +181,7 @@ pub fn run() -> sc_cli::Result<()> {
cmd.run::<Block, ExtendedHostFunctions<
SubstrateHostFunctions,
<service::ExecutorDispatch as NativeExecutionDispatch>::ExtendHostFunctions,
>>(),
>, _>(Some(info_provider)),
task_manager,
))
})
Expand Down
2 changes: 1 addition & 1 deletion node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ pub fn new_full(config: Configuration, cli: Cli) -> Result<TaskManager, ServiceE
spawn_handle: task_manager.spawn_handle(),
import_queue,
block_announce_validator_builder: None,
warp_sync: None,
warp_sync_params: None,
})?;

if config.offchain_worker.enabled {
Expand Down
8 changes: 6 additions & 2 deletions pallets/staking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ frame-system = { workspace = true }
log = { workspace = true }
pallet-offchain-task-scheduler = { workspace = true }
pallet-session = { workspace = true }
pallet-staking-substrate = { package = "pallet-staking", default-features = false, branch = "polkadot-v0.9.38", git = "https://github.com/paritytech/substrate.git" }
pallet-staking-substrate = { package = "pallet-staking", default-features = false, branch = "polkadot-v0.9.39", git = "https://github.com/paritytech/substrate.git" }
parity-scale-codec = { workspace = true }
serde.workspace = true
scale-info = { workspace = true }
Expand Down Expand Up @@ -49,4 +49,8 @@ std = [
'pallet-offchain-task-scheduler/std',
'sp-std/std',
]
try-runtime = ['frame-support/try-runtime']
try-runtime = [
'frame-support/try-runtime',
'frame-election-provider-support/try-runtime',
'pallet-staking-substrate/try-runtime',
]
2 changes: 2 additions & 0 deletions pallets/staking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ impl<T: Config> SortedListProvider<T::AccountId> for EmptyList<T> {
defensive!();
}

#[cfg(feature = "try-runtime")]
fn try_state() -> Result<(), &'static str> {
defensive!();
Ok(())
Expand Down Expand Up @@ -214,6 +215,7 @@ where
defensive!();
}

#[cfg(feature = "try-runtime")]
fn try_state() -> Result<(), &'static str> {
defensive!();
Ok(())
Expand Down
2 changes: 1 addition & 1 deletion primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ num = { version = "0.4.0", default-features = false, features = [
parity-scale-codec = { workspace = true }
schnorrkel = { version = "0.9", default-features = false }
sp-arithmetic = { workspace = true }
sp-consensus-vrf = { branch = "polkadot-v0.9.38", default-features = false, git = "https://github.com/paritytech/substrate.git" }
sp-consensus-vrf = { branch = "polkadot-v0.9.39", default-features = false, git = "https://github.com/paritytech/substrate.git" }
sp-externalities = { workspace = true }
sp-keystore = { workspace = true, optional = true }
sp-runtime-interface = { workspace = true }
Expand Down
Loading

0 comments on commit fd33ebc

Please sign in to comment.