Skip to content

Commit

Permalink
Merge branch 'master' into gav-tx-ext
Browse files Browse the repository at this point in the history
  • Loading branch information
gavofyork authored Nov 23, 2023
2 parents 6e17a83 + 21f1811 commit b077f9e
Show file tree
Hide file tree
Showing 38 changed files with 196 additions and 174 deletions.
13 changes: 7 additions & 6 deletions .gitlab/pipeline/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,16 @@ check-rust-feature-propagation:
export RUST_LOG=remote-ext=debug,runtime=debug
echo "---------- Downloading try-runtime CLI ----------"
curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.3.3/try-runtime-x86_64-unknown-linux-musl -o try-runtime
curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.5.0/try-runtime-x86_64-unknown-linux-musl -o try-runtime
chmod +x ./try-runtime
echo "---------- Building ${PACKAGE} runtime ----------"
time cargo build --release --locked -p "$PACKAGE" --features try-runtime
echo "---------- Executing on-runtime-upgrade for ${NETWORK} ----------"
time ./try-runtime \
time ./try-runtime ${COMMAND_EXTRA_ARGS} \
--runtime ./target/release/wbuild/"$PACKAGE"/"$WASM" \
on-runtime-upgrade --checks=pre-and-post ${EXTRA_ARGS} live --uri ${URI}
on-runtime-upgrade --disable-spec-version-check --checks=all ${SUBCOMMAND_EXTRA_ARGS} live --uri ${URI}
# Check runtime migrations for Parity managed relay chains
check-runtime-migration-westend:
Expand All @@ -124,7 +124,7 @@ check-runtime-migration-westend:
PACKAGE: "westend-runtime"
WASM: "westend_runtime.compact.compressed.wasm"
URI: "wss://westend-try-runtime-node.parity-chains.parity.io:443"
EXTRA_ARGS: "--no-weight-warnings"
SUBCOMMAND_EXTRA_ARGS: "--no-weight-warnings"

check-runtime-migration-rococo:
stage: check
Expand All @@ -137,7 +137,7 @@ check-runtime-migration-rococo:
PACKAGE: "rococo-runtime"
WASM: "rococo_runtime.compact.compressed.wasm"
URI: "wss://rococo-try-runtime-node.parity-chains.parity.io:443"
EXTRA_ARGS: "--no-weight-warnings"
SUBCOMMAND_EXTRA_ARGS: "--no-weight-warnings"

# Check runtime migrations for Parity managed asset hub chains
check-runtime-migration-asset-hub-westend:
Expand All @@ -151,7 +151,7 @@ check-runtime-migration-asset-hub-westend:
PACKAGE: "asset-hub-westend-runtime"
WASM: "asset_hub_westend_runtime.compact.compressed.wasm"
URI: "wss://westend-asset-hub-rpc.polkadot.io:443"

check-runtime-migration-asset-hub-rococo:
stage: check
extends:
Expand Down Expand Up @@ -214,6 +214,7 @@ check-runtime-migration-collectives-westend:
PACKAGE: "collectives-westend-runtime"
WASM: "collectives_westend_runtime.compact.compressed.wasm"
URI: "wss://westend-collectives-rpc.polkadot.io:443"
COMMAND_EXTRA_ARGS: "--disable-spec-name-check"

find-fail-ci-phrase:
stage: check
Expand Down
4 changes: 4 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions cumulus/client/relay-chain-rpc-interface/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ sp-authority-discovery = { path = "../../../substrate/primitives/authority-disco
sp-state-machine = { path = "../../../substrate/primitives/state-machine" }
sp-storage = { path = "../../../substrate/primitives/storage" }
sp-runtime = { path = "../../../substrate/primitives/runtime" }
sp-version = { path = "../../../substrate/primitives/version" }
sc-client-api = { path = "../../../substrate/client/api" }
sc-rpc-api = { path = "../../../substrate/client/rpc-api" }
sc-service = { path = "../../../substrate/client/service" }
Expand Down
2 changes: 1 addition & 1 deletion cumulus/client/relay-chain-rpc-interface/src/rpc_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ use cumulus_relay_chain_interface::{RelayChainError, RelayChainResult};
use sc_client_api::StorageData;
use sc_rpc_api::{state::ReadProof, system::Health};
use sc_service::TaskManager;
use sp_api::RuntimeVersion;
use sp_consensus_babe::Epoch;
use sp_core::sp_std::collections::btree_map::BTreeMap;
use sp_storage::StorageKey;
use sp_version::RuntimeVersion;

use crate::{
light_client_worker::{build_smoldot_client, LightClientRpcWorker},
Expand Down
2 changes: 1 addition & 1 deletion cumulus/pallets/xcmp-queue/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ fn xcm_enqueueing_broken_xcm_works() {
.take(20)
.collect::<Vec<_>>(),
);
EnqueuedMessages::set(&vec![]);
EnqueuedMessages::take();

// But if we do it all in one page, then it only uses the first 10:
XcmpQueue::handle_xcmp_messages(
Expand Down
3 changes: 1 addition & 2 deletions cumulus/parachain-template/node/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
#![warn(missing_docs)]

mod chain_spec;
#[macro_use]
mod service;
mod cli;
mod command;
mod rpc;
mod service;

fn main() -> sc_cli::Result<()> {
command::run()
Expand Down
108 changes: 60 additions & 48 deletions cumulus/parachains/runtimes/collectives/collectives-westend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,69 +7,76 @@ license = "Apache-2.0"
description = "Westend Collectives Parachain Runtime"

[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] }
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = [
"derive",
"max-encoded-len",
] }
hex-literal = { version = "0.4.1" }
log = { version = "0.4.20", default-features = false }
scale-info = { version = "2.10.0", default-features = false, features = ["derive"] }
scale-info = { version = "2.10.0", default-features = false, features = [
"derive",
] }
smallvec = "1.11.0"

# Substrate
frame-benchmarking = { path = "../../../../../substrate/frame/benchmarking", default-features = false, optional = true}
frame-executive = { path = "../../../../../substrate/frame/executive", default-features = false}
frame-support = { path = "../../../../../substrate/frame/support", default-features = false}
frame-system = { path = "../../../../../substrate/frame/system", default-features = false}
frame-system-benchmarking = { path = "../../../../../substrate/frame/system/benchmarking", default-features = false, optional = true}
frame-system-rpc-runtime-api = { path = "../../../../../substrate/frame/system/rpc/runtime-api", default-features = false}
frame-try-runtime = { path = "../../../../../substrate/frame/try-runtime", default-features = false, optional = true}
pallet-alliance = { path = "../../../../../substrate/frame/alliance", default-features = false}
pallet-aura = { path = "../../../../../substrate/frame/aura", default-features = false}
pallet-authorship = { path = "../../../../../substrate/frame/authorship", default-features = false}
pallet-balances = { path = "../../../../../substrate/frame/balances", default-features = false}
pallet-collective = { path = "../../../../../substrate/frame/collective", default-features = false}
pallet-multisig = { path = "../../../../../substrate/frame/multisig", default-features = false}
frame-benchmarking = { path = "../../../../../substrate/frame/benchmarking", default-features = false, optional = true }
frame-executive = { path = "../../../../../substrate/frame/executive", default-features = false }
frame-support = { path = "../../../../../substrate/frame/support", default-features = false }
frame-system = { path = "../../../../../substrate/frame/system", default-features = false }
frame-system-benchmarking = { path = "../../../../../substrate/frame/system/benchmarking", default-features = false, optional = true }
frame-system-rpc-runtime-api = { path = "../../../../../substrate/frame/system/rpc/runtime-api", default-features = false }
frame-try-runtime = { path = "../../../../../substrate/frame/try-runtime", default-features = false, optional = true }
pallet-alliance = { path = "../../../../../substrate/frame/alliance", default-features = false }
pallet-aura = { path = "../../../../../substrate/frame/aura", default-features = false }
pallet-authorship = { path = "../../../../../substrate/frame/authorship", default-features = false }
pallet-balances = { path = "../../../../../substrate/frame/balances", default-features = false }
pallet-collective = { path = "../../../../../substrate/frame/collective", default-features = false }
pallet-multisig = { path = "../../../../../substrate/frame/multisig", default-features = false }
pallet-preimage = { path = "../../../../../substrate/frame/preimage", default-features = false }
pallet-proxy = { path = "../../../../../substrate/frame/proxy", default-features = false}
pallet-proxy = { path = "../../../../../substrate/frame/proxy", default-features = false }
pallet-scheduler = { path = "../../../../../substrate/frame/scheduler", default-features = false }
pallet-session = { path = "../../../../../substrate/frame/session", default-features = false}
pallet-timestamp = { path = "../../../../../substrate/frame/timestamp", default-features = false}
pallet-transaction-payment = { path = "../../../../../substrate/frame/transaction-payment", default-features = false}
pallet-transaction-payment-rpc-runtime-api = { path = "../../../../../substrate/frame/transaction-payment/rpc/runtime-api", default-features = false}
pallet-utility = { path = "../../../../../substrate/frame/utility", default-features = false}
pallet-referenda = { path = "../../../../../substrate/frame/referenda", default-features = false}
pallet-ranked-collective = { path = "../../../../../substrate/frame/ranked-collective", default-features = false}
pallet-core-fellowship = { path = "../../../../../substrate/frame/core-fellowship", default-features = false}
pallet-salary = { path = "../../../../../substrate/frame/salary", default-features = false}
sp-api = { path = "../../../../../substrate/primitives/api", default-features = false}
pallet-session = { path = "../../../../../substrate/frame/session", default-features = false }
pallet-timestamp = { path = "../../../../../substrate/frame/timestamp", default-features = false }
pallet-transaction-payment = { path = "../../../../../substrate/frame/transaction-payment", default-features = false }
pallet-transaction-payment-rpc-runtime-api = { path = "../../../../../substrate/frame/transaction-payment/rpc/runtime-api", default-features = false }
pallet-utility = { path = "../../../../../substrate/frame/utility", default-features = false }
pallet-referenda = { path = "../../../../../substrate/frame/referenda", default-features = false }
pallet-ranked-collective = { path = "../../../../../substrate/frame/ranked-collective", default-features = false }
pallet-core-fellowship = { path = "../../../../../substrate/frame/core-fellowship", default-features = false }
pallet-salary = { path = "../../../../../substrate/frame/salary", default-features = false }
sp-api = { path = "../../../../../substrate/primitives/api", default-features = false }
sp-arithmetic = { path = "../../../../../substrate/primitives/arithmetic", default-features = false }
sp-block-builder = { path = "../../../../../substrate/primitives/block-builder", default-features = false}
sp-consensus-aura = { path = "../../../../../substrate/primitives/consensus/aura", default-features = false}
sp-core = { path = "../../../../../substrate/primitives/core", default-features = false}
sp-block-builder = { path = "../../../../../substrate/primitives/block-builder", default-features = false }
sp-consensus-aura = { path = "../../../../../substrate/primitives/consensus/aura", default-features = false }
sp-core = { path = "../../../../../substrate/primitives/core", default-features = false }
sp-genesis-builder = { path = "../../../../../substrate/primitives/genesis-builder", default-features = false }
sp-inherents = { path = "../../../../../substrate/primitives/inherents", default-features = false}
sp-offchain = { path = "../../../../../substrate/primitives/offchain", default-features = false}
sp-runtime = { path = "../../../../../substrate/primitives/runtime", default-features = false}
sp-session = { path = "../../../../../substrate/primitives/session", default-features = false}
sp-std = { path = "../../../../../substrate/primitives/std", default-features = false}
sp-storage = { path = "../../../../../substrate/primitives/storage", default-features = false}
sp-transaction-pool = { path = "../../../../../substrate/primitives/transaction-pool", default-features = false}
sp-version = { path = "../../../../../substrate/primitives/version", default-features = false}
sp-inherents = { path = "../../../../../substrate/primitives/inherents", default-features = false }
sp-offchain = { path = "../../../../../substrate/primitives/offchain", default-features = false }
sp-runtime = { path = "../../../../../substrate/primitives/runtime", default-features = false }
sp-session = { path = "../../../../../substrate/primitives/session", default-features = false }
sp-std = { path = "../../../../../substrate/primitives/std", default-features = false }
sp-storage = { path = "../../../../../substrate/primitives/storage", default-features = false }
sp-transaction-pool = { path = "../../../../../substrate/primitives/transaction-pool", default-features = false }
sp-version = { path = "../../../../../substrate/primitives/version", default-features = false }

# Polkadot
pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features = false}
polkadot-core-primitives = { path = "../../../../../polkadot/core-primitives", default-features = false}
polkadot-parachain-primitives = { path = "../../../../../polkadot/parachain", default-features = false}
polkadot-runtime-common = { path = "../../../../../polkadot/runtime/common", default-features = false}
xcm = { package = "staging-xcm", path = "../../../../../polkadot/xcm", default-features = false}
xcm-builder = { package = "staging-xcm-builder", path = "../../../../../polkadot/xcm/xcm-builder", default-features = false}
xcm-executor = { package = "staging-xcm-executor", path = "../../../../../polkadot/xcm/xcm-executor", default-features = false}
westend-runtime-constants = { path = "../../../../../polkadot/runtime/westend/constants", default-features = false}
pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features = false }
polkadot-core-primitives = { path = "../../../../../polkadot/core-primitives", default-features = false }
polkadot-parachain-primitives = { path = "../../../../../polkadot/parachain", default-features = false }
polkadot-runtime-common = { path = "../../../../../polkadot/runtime/common", default-features = false }
xcm = { package = "staging-xcm", path = "../../../../../polkadot/xcm", default-features = false }
xcm-builder = { package = "staging-xcm-builder", path = "../../../../../polkadot/xcm/xcm-builder", default-features = false }
xcm-executor = { package = "staging-xcm-executor", path = "../../../../../polkadot/xcm/xcm-executor", default-features = false }
westend-runtime-constants = { path = "../../../../../polkadot/runtime/westend/constants", default-features = false }

# Cumulus
cumulus-pallet-aura-ext = { path = "../../../../pallets/aura-ext", default-features = false }
pallet-message-queue = { path = "../../../../../substrate/frame/message-queue", default-features = false }
cumulus-pallet-dmp-queue = { path = "../../../../pallets/dmp-queue", default-features = false }
cumulus-pallet-parachain-system = { path = "../../../../pallets/parachain-system", default-features = false, features = ["parameterized-consensus-hook",] }
cumulus-pallet-session-benchmarking = { path = "../../../../pallets/session-benchmarking", default-features = false}
cumulus-pallet-parachain-system = { path = "../../../../pallets/parachain-system", default-features = false, features = [
"parameterized-consensus-hook",
] }
cumulus-pallet-session-benchmarking = { path = "../../../../pallets/session-benchmarking", default-features = false }
cumulus-pallet-xcm = { path = "../../../../pallets/xcm", default-features = false }
cumulus-pallet-xcmp-queue = { path = "../../../../pallets/xcmp-queue", default-features = false }
cumulus-primitives-core = { path = "../../../../primitives/core", default-features = false }
Expand All @@ -84,7 +91,7 @@ testnets-common = { path = "../../../testnets-common", default-features = false
substrate-wasm-builder = { path = "../../../../../substrate/utils/wasm-builder", optional = true }

[dev-dependencies]
sp-io = { path = "../../../../../substrate/primitives/io", features = [ "std" ]}
sp-io = { path = "../../../../../substrate/primitives/io", features = ["std"] }

[features]
default = [ "std" ]
Expand Down Expand Up @@ -228,3 +235,8 @@ std = [
]

experimental = [ "pallet-aura/experimental" ]

# A feature that should be enabled when the runtime should be built for on-chain
# deployment. This will disable stuff that shouldn't be part of the on-chain wasm
# to make it smaller like logging for example.
on-chain-release-build = [ "sp-api/disable-logging" ]
3 changes: 1 addition & 2 deletions cumulus/polkadot-parachain/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@
#![warn(unused_extern_crates)]

mod chain_spec;
#[macro_use]
mod service;
mod cli;
mod command;
mod rpc;
mod service;

fn main() -> sc_cli::Result<()> {
command::run()
Expand Down
2 changes: 1 addition & 1 deletion polkadot/node/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pub use service::{
ChainSpec, Configuration, Error as SubstrateServiceError, PruningMode, Role, RuntimeGenesis,
TFullBackend, TFullCallExecutor, TFullClient, TaskManager, TransactionPoolOptions,
};
pub use sp_api::{ApiRef, ConstructRuntimeApi, Core as CoreApi, ProvideRuntimeApi, StateBackend};
pub use sp_api::{ApiRef, ConstructRuntimeApi, Core as CoreApi, ProvideRuntimeApi};
pub use sp_runtime::{
generic,
traits::{self as runtime_traits, BlakeTwo256, Block as BlockT, Header as HeaderT, NumberFor},
Expand Down
3 changes: 1 addition & 2 deletions substrate/bin/minimal/node/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@
#![warn(missing_docs)]

mod chain_spec;
#[macro_use]
mod service;
mod cli;
mod command;
mod rpc;
mod service;

fn main() -> sc_cli::Result<()> {
command::run()
Expand Down
5 changes: 2 additions & 3 deletions substrate/bin/node-template/node/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
//! Substrate Node Template CLI library.
#![warn(missing_docs)]

mod chain_spec;
#[macro_use]
mod service;
mod benchmarking;
mod chain_spec;
mod cli;
mod command;
mod rpc;
mod service;

fn main() -> sc_cli::Result<()> {
command::run()
Expand Down
6 changes: 2 additions & 4 deletions substrate/bin/node/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,14 @@
#![warn(missing_docs)]

pub mod chain_spec;

#[macro_use]
pub mod service;
#[cfg(feature = "cli")]
mod benchmarking;
pub mod chain_spec;
#[cfg(feature = "cli")]
mod cli;
#[cfg(feature = "cli")]
mod command;
pub mod service;

#[cfg(feature = "cli")]
pub use cli::*;
Expand Down
4 changes: 2 additions & 2 deletions substrate/client/api/src/call_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
use sc_executor::{RuntimeVersion, RuntimeVersionOf};
use sp_core::traits::CallContext;
use sp_externalities::Extensions;
use sp_runtime::traits::Block as BlockT;
use sp_runtime::traits::{Block as BlockT, HashingFor};
use sp_state_machine::{OverlayedChanges, StorageProof};
use std::cell::RefCell;

use crate::execution_extensions::ExecutionExtensions;
use sp_api::{HashingFor, ProofRecorder};
use sp_api::ProofRecorder;

/// Executor Provider
pub trait ExecutorProvider<Block: BlockT> {
Expand Down
3 changes: 1 addition & 2 deletions substrate/client/api/src/in_mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -812,9 +812,8 @@ pub fn check_genesis_storage(storage: &Storage) -> sp_blockchain::Result<()> {
#[cfg(test)]
mod tests {
use crate::{in_mem::Blockchain, NewBlockState};
use sp_api::HeaderT;
use sp_blockchain::Backend;
use sp_runtime::{ConsensusEngineId, Justifications};
use sp_runtime::{traits::Header as HeaderT, ConsensusEngineId, Justifications};
use substrate_test_runtime::{Block, Header, H256};

pub const ID1: ConsensusEngineId = *b"TST1";
Expand Down
4 changes: 2 additions & 2 deletions substrate/client/consensus/beefy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ use sc_client_api::{Backend, BlockBackend, BlockchainEvents, FinalityNotificatio
use sc_consensus::BlockImport;
use sc_network::{NetworkRequest, ProtocolName};
use sc_network_gossip::{GossipEngine, Network as GossipNetwork, Syncing as GossipSyncing};
use sp_api::{HeaderT, NumberFor, ProvideRuntimeApi};
use sp_api::ProvideRuntimeApi;
use sp_blockchain::{
Backend as BlockchainBackend, Error as ClientError, HeaderBackend, Result as ClientResult,
};
Expand All @@ -51,7 +51,7 @@ use sp_consensus_beefy::{
};
use sp_keystore::KeystorePtr;
use sp_mmr_primitives::MmrApi;
use sp_runtime::traits::{Block, Zero};
use sp_runtime::traits::{Block, Header as HeaderT, NumberFor, Zero};
use std::{
collections::{BTreeMap, VecDeque},
marker::PhantomData,
Expand Down
Loading

0 comments on commit b077f9e

Please sign in to comment.