mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-06 04:28:01 +00:00
Rename node-runtime to node-kitchensink-runtime (#11930)
* Rename node=runtime to kithensink-runtime * Undo md formatting
This commit is contained in:
Generated
+99
-99
@@ -3299,6 +3299,100 @@ dependencies = [
|
||||
"tiny-keccak",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "kitchensink-runtime"
|
||||
version = "3.0.0-dev"
|
||||
dependencies = [
|
||||
"frame-benchmarking",
|
||||
"frame-election-provider-support",
|
||||
"frame-executive",
|
||||
"frame-support",
|
||||
"frame-system",
|
||||
"frame-system-benchmarking",
|
||||
"frame-system-rpc-runtime-api",
|
||||
"frame-try-runtime",
|
||||
"hex-literal",
|
||||
"log",
|
||||
"node-primitives",
|
||||
"pallet-alliance",
|
||||
"pallet-asset-tx-payment",
|
||||
"pallet-assets",
|
||||
"pallet-authority-discovery",
|
||||
"pallet-authorship",
|
||||
"pallet-babe",
|
||||
"pallet-bags-list",
|
||||
"pallet-balances",
|
||||
"pallet-bounties",
|
||||
"pallet-child-bounties",
|
||||
"pallet-collective",
|
||||
"pallet-contracts",
|
||||
"pallet-contracts-primitives",
|
||||
"pallet-contracts-rpc-runtime-api",
|
||||
"pallet-conviction-voting",
|
||||
"pallet-democracy",
|
||||
"pallet-election-provider-multi-phase",
|
||||
"pallet-election-provider-support-benchmarking",
|
||||
"pallet-elections-phragmen",
|
||||
"pallet-gilt",
|
||||
"pallet-grandpa",
|
||||
"pallet-identity",
|
||||
"pallet-im-online",
|
||||
"pallet-indices",
|
||||
"pallet-lottery",
|
||||
"pallet-membership",
|
||||
"pallet-mmr",
|
||||
"pallet-multisig",
|
||||
"pallet-nomination-pools",
|
||||
"pallet-nomination-pools-benchmarking",
|
||||
"pallet-nomination-pools-runtime-api",
|
||||
"pallet-offences",
|
||||
"pallet-offences-benchmarking",
|
||||
"pallet-preimage",
|
||||
"pallet-proxy",
|
||||
"pallet-randomness-collective-flip",
|
||||
"pallet-ranked-collective",
|
||||
"pallet-recovery",
|
||||
"pallet-referenda",
|
||||
"pallet-remark",
|
||||
"pallet-scheduler",
|
||||
"pallet-session",
|
||||
"pallet-session-benchmarking",
|
||||
"pallet-society",
|
||||
"pallet-staking",
|
||||
"pallet-staking-reward-curve",
|
||||
"pallet-state-trie-migration",
|
||||
"pallet-sudo",
|
||||
"pallet-timestamp",
|
||||
"pallet-tips",
|
||||
"pallet-transaction-payment",
|
||||
"pallet-transaction-payment-rpc-runtime-api",
|
||||
"pallet-transaction-storage",
|
||||
"pallet-treasury",
|
||||
"pallet-uniques",
|
||||
"pallet-utility",
|
||||
"pallet-vesting",
|
||||
"pallet-whitelist",
|
||||
"parity-scale-codec",
|
||||
"scale-info",
|
||||
"sp-api",
|
||||
"sp-authority-discovery",
|
||||
"sp-block-builder",
|
||||
"sp-consensus-babe",
|
||||
"sp-core",
|
||||
"sp-inherents",
|
||||
"sp-io",
|
||||
"sp-offchain",
|
||||
"sp-runtime",
|
||||
"sp-sandbox",
|
||||
"sp-session",
|
||||
"sp-staking",
|
||||
"sp-std",
|
||||
"sp-transaction-pool",
|
||||
"sp-version",
|
||||
"static_assertions",
|
||||
"substrate-wasm-builder",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "kv-log-macro"
|
||||
version = "1.0.7"
|
||||
@@ -4511,12 +4605,12 @@ dependencies = [
|
||||
"futures",
|
||||
"hash-db",
|
||||
"hex",
|
||||
"kitchensink-runtime",
|
||||
"kvdb",
|
||||
"kvdb-rocksdb",
|
||||
"lazy_static",
|
||||
"log",
|
||||
"node-primitives",
|
||||
"node-runtime",
|
||||
"node-testing",
|
||||
"parity-db",
|
||||
"parity-util-mem",
|
||||
@@ -4553,13 +4647,13 @@ dependencies = [
|
||||
"futures",
|
||||
"hex-literal",
|
||||
"jsonrpsee",
|
||||
"kitchensink-runtime",
|
||||
"log",
|
||||
"nix 0.23.1",
|
||||
"node-executor",
|
||||
"node-inspect",
|
||||
"node-primitives",
|
||||
"node-rpc",
|
||||
"node-runtime",
|
||||
"pallet-asset-tx-payment",
|
||||
"pallet-balances",
|
||||
"pallet-im-online",
|
||||
@@ -4631,8 +4725,8 @@ dependencies = [
|
||||
"frame-support",
|
||||
"frame-system",
|
||||
"futures",
|
||||
"kitchensink-runtime",
|
||||
"node-primitives",
|
||||
"node-runtime",
|
||||
"node-testing",
|
||||
"pallet-balances",
|
||||
"pallet-contracts",
|
||||
@@ -4716,107 +4810,13 @@ dependencies = [
|
||||
"substrate-state-trie-migration-rpc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "node-runtime"
|
||||
version = "3.0.0-dev"
|
||||
dependencies = [
|
||||
"frame-benchmarking",
|
||||
"frame-election-provider-support",
|
||||
"frame-executive",
|
||||
"frame-support",
|
||||
"frame-system",
|
||||
"frame-system-benchmarking",
|
||||
"frame-system-rpc-runtime-api",
|
||||
"frame-try-runtime",
|
||||
"hex-literal",
|
||||
"log",
|
||||
"node-primitives",
|
||||
"pallet-alliance",
|
||||
"pallet-asset-tx-payment",
|
||||
"pallet-assets",
|
||||
"pallet-authority-discovery",
|
||||
"pallet-authorship",
|
||||
"pallet-babe",
|
||||
"pallet-bags-list",
|
||||
"pallet-balances",
|
||||
"pallet-bounties",
|
||||
"pallet-child-bounties",
|
||||
"pallet-collective",
|
||||
"pallet-contracts",
|
||||
"pallet-contracts-primitives",
|
||||
"pallet-contracts-rpc-runtime-api",
|
||||
"pallet-conviction-voting",
|
||||
"pallet-democracy",
|
||||
"pallet-election-provider-multi-phase",
|
||||
"pallet-election-provider-support-benchmarking",
|
||||
"pallet-elections-phragmen",
|
||||
"pallet-gilt",
|
||||
"pallet-grandpa",
|
||||
"pallet-identity",
|
||||
"pallet-im-online",
|
||||
"pallet-indices",
|
||||
"pallet-lottery",
|
||||
"pallet-membership",
|
||||
"pallet-mmr",
|
||||
"pallet-multisig",
|
||||
"pallet-nomination-pools",
|
||||
"pallet-nomination-pools-benchmarking",
|
||||
"pallet-nomination-pools-runtime-api",
|
||||
"pallet-offences",
|
||||
"pallet-offences-benchmarking",
|
||||
"pallet-preimage",
|
||||
"pallet-proxy",
|
||||
"pallet-randomness-collective-flip",
|
||||
"pallet-ranked-collective",
|
||||
"pallet-recovery",
|
||||
"pallet-referenda",
|
||||
"pallet-remark",
|
||||
"pallet-scheduler",
|
||||
"pallet-session",
|
||||
"pallet-session-benchmarking",
|
||||
"pallet-society",
|
||||
"pallet-staking",
|
||||
"pallet-staking-reward-curve",
|
||||
"pallet-state-trie-migration",
|
||||
"pallet-sudo",
|
||||
"pallet-timestamp",
|
||||
"pallet-tips",
|
||||
"pallet-transaction-payment",
|
||||
"pallet-transaction-payment-rpc-runtime-api",
|
||||
"pallet-transaction-storage",
|
||||
"pallet-treasury",
|
||||
"pallet-uniques",
|
||||
"pallet-utility",
|
||||
"pallet-vesting",
|
||||
"pallet-whitelist",
|
||||
"parity-scale-codec",
|
||||
"scale-info",
|
||||
"sp-api",
|
||||
"sp-authority-discovery",
|
||||
"sp-block-builder",
|
||||
"sp-consensus-babe",
|
||||
"sp-core",
|
||||
"sp-inherents",
|
||||
"sp-io",
|
||||
"sp-offchain",
|
||||
"sp-runtime",
|
||||
"sp-sandbox",
|
||||
"sp-session",
|
||||
"sp-staking",
|
||||
"sp-std",
|
||||
"sp-transaction-pool",
|
||||
"sp-version",
|
||||
"static_assertions",
|
||||
"substrate-wasm-builder",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "node-runtime-generate-bags"
|
||||
version = "3.0.0"
|
||||
dependencies = [
|
||||
"clap 3.1.18",
|
||||
"generate-bags",
|
||||
"node-runtime",
|
||||
"kitchensink-runtime",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4905,10 +4905,10 @@ dependencies = [
|
||||
"frame-system",
|
||||
"fs_extra",
|
||||
"futures",
|
||||
"kitchensink-runtime",
|
||||
"log",
|
||||
"node-executor",
|
||||
"node-primitives",
|
||||
"node-runtime",
|
||||
"pallet-asset-tx-payment",
|
||||
"pallet-transaction-payment",
|
||||
"parity-scale-codec",
|
||||
|
||||
@@ -13,7 +13,7 @@ clap = { version = "3.1.18", features = ["derive"] }
|
||||
log = "0.4.17"
|
||||
node-primitives = { version = "2.0.0", path = "../primitives" }
|
||||
node-testing = { version = "3.0.0-dev", path = "../testing" }
|
||||
node-runtime = { version = "3.0.0-dev", path = "../runtime" }
|
||||
kitchensink-runtime = { version = "3.0.0-dev", path = "../runtime" }
|
||||
sc-client-api = { version = "4.0.0-dev", path = "../../../client/api/" }
|
||||
sp-runtime = { version = "6.0.0", path = "../../../primitives/runtime" }
|
||||
sp-state-machine = { version = "0.12.0", path = "../../../primitives/state-machine" }
|
||||
|
||||
@@ -148,13 +148,13 @@ impl core::Benchmark for ImportBenchmark {
|
||||
// the transaction fee into the treasury
|
||||
// - extrinsic success
|
||||
assert_eq!(
|
||||
node_runtime::System::events().len(),
|
||||
kitchensink_runtime::System::events().len(),
|
||||
(self.block.extrinsics.len() - 1) * 8 + 1,
|
||||
);
|
||||
},
|
||||
BlockType::Noop => {
|
||||
assert_eq!(
|
||||
node_runtime::System::events().len(),
|
||||
kitchensink_runtime::System::events().len(),
|
||||
// should be 2 per signed extrinsic + 1 per unsigned
|
||||
// we have 1 unsigned and the rest are signed in the block
|
||||
// those 2 events per signed are:
|
||||
|
||||
@@ -87,7 +87,7 @@ pallet-asset-tx-payment = { version = "4.0.0-dev", path = "../../../frame/transa
|
||||
pallet-im-online = { version = "4.0.0-dev", default-features = false, path = "../../../frame/im-online" }
|
||||
|
||||
# node-specific dependencies
|
||||
node-runtime = { version = "3.0.0-dev", path = "../runtime" }
|
||||
kitchensink-runtime = { version = "3.0.0-dev", path = "../runtime" }
|
||||
node-rpc = { version = "3.0.0-dev", path = "../rpc" }
|
||||
node-primitives = { version = "2.0.0", path = "../primitives" }
|
||||
node-executor = { version = "3.0.0-dev", path = "../executor" }
|
||||
@@ -159,10 +159,10 @@ cli = [
|
||||
"substrate-build-script-utils",
|
||||
"try-runtime-cli",
|
||||
]
|
||||
runtime-benchmarks = ["node-runtime/runtime-benchmarks", "frame-benchmarking-cli"]
|
||||
runtime-benchmarks = ["kitchensink-runtime/runtime-benchmarks", "frame-benchmarking-cli"]
|
||||
# Enable features that allow the runtime to be tried and debugged. Name might be subject to change
|
||||
# in the near future.
|
||||
try-runtime = ["node-runtime/try-runtime", "try-runtime-cli"]
|
||||
try-runtime = ["kitchensink-runtime/try-runtime", "try-runtime-cli"]
|
||||
|
||||
[[bench]]
|
||||
name = "transaction_pool"
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
|
||||
use criterion::{criterion_group, criterion_main, BatchSize, Criterion, Throughput};
|
||||
|
||||
use kitchensink_runtime::{constants::currency::*, BalancesCall};
|
||||
use node_cli::service::{create_extrinsic, FullClient};
|
||||
use node_runtime::{constants::currency::*, BalancesCall};
|
||||
use sc_block_builder::{BlockBuilderProvider, BuiltBlock, RecordProof};
|
||||
use sc_client_api::execution_extensions::ExecutionStrategies;
|
||||
use sc_consensus::{
|
||||
@@ -121,9 +121,9 @@ fn new_node(tokio_handle: Handle) -> node_cli::service::NewFullBase {
|
||||
}
|
||||
|
||||
fn extrinsic_set_time(now: u64) -> OpaqueExtrinsic {
|
||||
node_runtime::UncheckedExtrinsic {
|
||||
kitchensink_runtime::UncheckedExtrinsic {
|
||||
signature: None,
|
||||
function: node_runtime::Call::Timestamp(pallet_timestamp::Call::set { now }),
|
||||
function: kitchensink_runtime::Call::Timestamp(pallet_timestamp::Call::set { now }),
|
||||
}
|
||||
.into()
|
||||
}
|
||||
|
||||
@@ -20,9 +20,9 @@ use std::time::Duration;
|
||||
|
||||
use criterion::{criterion_group, criterion_main, BatchSize, Criterion, Throughput};
|
||||
use futures::{future, StreamExt};
|
||||
use kitchensink_runtime::{constants::currency::*, BalancesCall, SudoCall};
|
||||
use node_cli::service::{create_extrinsic, fetch_nonce, FullClient, TransactionPool};
|
||||
use node_primitives::AccountId;
|
||||
use node_runtime::{constants::currency::*, BalancesCall, SudoCall};
|
||||
use sc_client_api::execution_extensions::ExecutionStrategies;
|
||||
use sc_service::{
|
||||
config::{
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
|
||||
use crate::service::{create_extrinsic, FullClient};
|
||||
|
||||
use kitchensink_runtime::{BalancesCall, SystemCall};
|
||||
use node_primitives::{AccountId, Balance};
|
||||
use node_runtime::{BalancesCall, SystemCall};
|
||||
use sc_cli::Result;
|
||||
use sp_inherents::{InherentData, InherentDataProvider};
|
||||
use sp_keyring::Sr25519Keyring;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
use grandpa_primitives::AuthorityId as GrandpaId;
|
||||
use hex_literal::hex;
|
||||
use node_runtime::{
|
||||
use kitchensink_runtime::{
|
||||
constants::currency::*, wasm_binary_unwrap, AuthorityDiscoveryConfig, BabeConfig,
|
||||
BalancesConfig, Block, CouncilConfig, DemocracyConfig, ElectionsConfig, GrandpaConfig,
|
||||
ImOnlineConfig, IndicesConfig, MaxNominations, NominationPoolsConfig, SessionConfig,
|
||||
@@ -40,8 +40,8 @@ use sp_runtime::{
|
||||
Perbill,
|
||||
};
|
||||
|
||||
pub use kitchensink_runtime::GenesisConfig;
|
||||
pub use node_primitives::{AccountId, Balance, Signature};
|
||||
pub use node_runtime::GenesisConfig;
|
||||
|
||||
type AccountPublic = <Signature as Verify>::Signer;
|
||||
|
||||
@@ -343,7 +343,7 @@ pub fn testnet_genesis(
|
||||
sudo: SudoConfig { key: Some(root_key) },
|
||||
babe: BabeConfig {
|
||||
authorities: vec![],
|
||||
epoch_config: Some(node_runtime::BABE_GENESIS_EPOCH_CONFIG),
|
||||
epoch_config: Some(kitchensink_runtime::BABE_GENESIS_EPOCH_CONFIG),
|
||||
},
|
||||
im_online: ImOnlineConfig { keys: vec![] },
|
||||
authority_discovery: AuthorityDiscoveryConfig { keys: vec![] },
|
||||
|
||||
@@ -23,9 +23,9 @@ use crate::{
|
||||
Cli, Subcommand,
|
||||
};
|
||||
use frame_benchmarking_cli::*;
|
||||
use kitchensink_runtime::{ExistentialDeposit, RuntimeApi};
|
||||
use node_executor::ExecutorDispatch;
|
||||
use node_primitives::Block;
|
||||
use node_runtime::{ExistentialDeposit, RuntimeApi};
|
||||
use sc_cli::{ChainSpec, Result, RuntimeVersion, SubstrateCli};
|
||||
use sc_service::PartialComponents;
|
||||
use sp_keyring::Sr25519Keyring;
|
||||
@@ -75,7 +75,7 @@ impl SubstrateCli for Cli {
|
||||
}
|
||||
|
||||
fn native_runtime_version(_: &Box<dyn ChainSpec>) -> &'static RuntimeVersion {
|
||||
&node_runtime::VERSION
|
||||
&kitchensink_runtime::VERSION
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
use codec::Encode;
|
||||
use frame_system_rpc_runtime_api::AccountNonceApi;
|
||||
use futures::prelude::*;
|
||||
use kitchensink_runtime::RuntimeApi;
|
||||
use node_executor::ExecutorDispatch;
|
||||
use node_primitives::Block;
|
||||
use node_runtime::RuntimeApi;
|
||||
use sc_client_api::{BlockBackend, ExecutorProvider};
|
||||
use sc_consensus_babe::{self, SlotProportion};
|
||||
use sc_executor::NativeElseWasmExecutor;
|
||||
@@ -68,41 +68,43 @@ pub fn fetch_nonce(client: &FullClient, account: sp_core::sr25519::Pair) -> u32
|
||||
pub fn create_extrinsic(
|
||||
client: &FullClient,
|
||||
sender: sp_core::sr25519::Pair,
|
||||
function: impl Into<node_runtime::Call>,
|
||||
function: impl Into<kitchensink_runtime::Call>,
|
||||
nonce: Option<u32>,
|
||||
) -> node_runtime::UncheckedExtrinsic {
|
||||
) -> kitchensink_runtime::UncheckedExtrinsic {
|
||||
let function = function.into();
|
||||
let genesis_hash = client.block_hash(0).ok().flatten().expect("Genesis block exists; qed");
|
||||
let best_hash = client.chain_info().best_hash;
|
||||
let best_block = client.chain_info().best_number;
|
||||
let nonce = nonce.unwrap_or_else(|| fetch_nonce(client, sender.clone()));
|
||||
|
||||
let period = node_runtime::BlockHashCount::get()
|
||||
let period = kitchensink_runtime::BlockHashCount::get()
|
||||
.checked_next_power_of_two()
|
||||
.map(|c| c / 2)
|
||||
.unwrap_or(2) as u64;
|
||||
let tip = 0;
|
||||
let extra: node_runtime::SignedExtra = (
|
||||
frame_system::CheckNonZeroSender::<node_runtime::Runtime>::new(),
|
||||
frame_system::CheckSpecVersion::<node_runtime::Runtime>::new(),
|
||||
frame_system::CheckTxVersion::<node_runtime::Runtime>::new(),
|
||||
frame_system::CheckGenesis::<node_runtime::Runtime>::new(),
|
||||
frame_system::CheckEra::<node_runtime::Runtime>::from(generic::Era::mortal(
|
||||
let extra: kitchensink_runtime::SignedExtra = (
|
||||
frame_system::CheckNonZeroSender::<kitchensink_runtime::Runtime>::new(),
|
||||
frame_system::CheckSpecVersion::<kitchensink_runtime::Runtime>::new(),
|
||||
frame_system::CheckTxVersion::<kitchensink_runtime::Runtime>::new(),
|
||||
frame_system::CheckGenesis::<kitchensink_runtime::Runtime>::new(),
|
||||
frame_system::CheckEra::<kitchensink_runtime::Runtime>::from(generic::Era::mortal(
|
||||
period,
|
||||
best_block.saturated_into(),
|
||||
)),
|
||||
frame_system::CheckNonce::<node_runtime::Runtime>::from(nonce),
|
||||
frame_system::CheckWeight::<node_runtime::Runtime>::new(),
|
||||
pallet_asset_tx_payment::ChargeAssetTxPayment::<node_runtime::Runtime>::from(tip, None),
|
||||
frame_system::CheckNonce::<kitchensink_runtime::Runtime>::from(nonce),
|
||||
frame_system::CheckWeight::<kitchensink_runtime::Runtime>::new(),
|
||||
pallet_asset_tx_payment::ChargeAssetTxPayment::<kitchensink_runtime::Runtime>::from(
|
||||
tip, None,
|
||||
),
|
||||
);
|
||||
|
||||
let raw_payload = node_runtime::SignedPayload::from_raw(
|
||||
let raw_payload = kitchensink_runtime::SignedPayload::from_raw(
|
||||
function.clone(),
|
||||
extra.clone(),
|
||||
(
|
||||
(),
|
||||
node_runtime::VERSION.spec_version,
|
||||
node_runtime::VERSION.transaction_version,
|
||||
kitchensink_runtime::VERSION.spec_version,
|
||||
kitchensink_runtime::VERSION.transaction_version,
|
||||
genesis_hash,
|
||||
best_hash,
|
||||
(),
|
||||
@@ -112,10 +114,10 @@ pub fn create_extrinsic(
|
||||
);
|
||||
let signature = raw_payload.using_encoded(|e| sender.sign(e));
|
||||
|
||||
node_runtime::UncheckedExtrinsic::new_signed(
|
||||
kitchensink_runtime::UncheckedExtrinsic::new_signed(
|
||||
function,
|
||||
sp_runtime::AccountId32::from(sender.public()).into(),
|
||||
node_runtime::Signature::Sr25519(signature),
|
||||
kitchensink_runtime::Signature::Sr25519(signature),
|
||||
extra,
|
||||
)
|
||||
}
|
||||
@@ -565,11 +567,11 @@ pub fn new_full(
|
||||
mod tests {
|
||||
use crate::service::{new_full_base, NewFullBase};
|
||||
use codec::Encode;
|
||||
use node_primitives::{Block, DigestItem, Signature};
|
||||
use node_runtime::{
|
||||
use kitchensink_runtime::{
|
||||
constants::{currency::CENTS, time::SLOT_DURATION},
|
||||
Address, BalancesCall, Call, UncheckedExtrinsic,
|
||||
};
|
||||
use node_primitives::{Block, DigestItem, Signature};
|
||||
use sc_client_api::BlockBackend;
|
||||
use sc_consensus::{BlockImport, BlockImportParams, ForkChoiceStrategy};
|
||||
use sc_consensus_babe::{BabeIntermediate, CompatibleDigestItem, INTERMEDIATE_KEY};
|
||||
|
||||
@@ -16,7 +16,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0" }
|
||||
scale-info = { version = "2.1.1", features = ["derive"] }
|
||||
frame-benchmarking = { version = "4.0.0-dev", path = "../../../frame/benchmarking" }
|
||||
node-primitives = { version = "2.0.0", path = "../primitives" }
|
||||
node-runtime = { version = "3.0.0-dev", path = "../runtime" }
|
||||
kitchensink-runtime = { version = "3.0.0-dev", path = "../runtime" }
|
||||
sc-executor = { version = "0.10.0-dev", path = "../../../client/executor" }
|
||||
sp-core = { version = "6.0.0", path = "../../../primitives/core" }
|
||||
sp-keystore = { version = "0.12.0", path = "../../../primitives/keystore" }
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
use codec::{Decode, Encode};
|
||||
use criterion::{criterion_group, criterion_main, BatchSize, Criterion};
|
||||
use frame_support::Hashable;
|
||||
use node_executor::ExecutorDispatch;
|
||||
use node_primitives::{BlockNumber, Hash};
|
||||
use node_runtime::{
|
||||
use kitchensink_runtime::{
|
||||
constants::currency::*, Block, BuildStorage, Call, CheckedExtrinsic, GenesisConfig, Header,
|
||||
UncheckedExtrinsic,
|
||||
};
|
||||
use node_executor::ExecutorDispatch;
|
||||
use node_primitives::{BlockNumber, Hash};
|
||||
use node_testing::keyring::*;
|
||||
#[cfg(feature = "wasmtime")]
|
||||
use sc_executor::WasmtimeInstantiationStrategy;
|
||||
@@ -41,7 +41,7 @@ criterion_main!(benches);
|
||||
|
||||
/// The wasm runtime code.
|
||||
pub fn compact_code_unwrap() -> &'static [u8] {
|
||||
node_runtime::WASM_BINARY.expect(
|
||||
kitchensink_runtime::WASM_BINARY.expect(
|
||||
"Development wasm binary is not available. Testing is only supported with the flag \
|
||||
disabled.",
|
||||
)
|
||||
@@ -49,9 +49,9 @@ pub fn compact_code_unwrap() -> &'static [u8] {
|
||||
|
||||
const GENESIS_HASH: [u8; 32] = [69u8; 32];
|
||||
|
||||
const TRANSACTION_VERSION: u32 = node_runtime::VERSION.transaction_version;
|
||||
const TRANSACTION_VERSION: u32 = kitchensink_runtime::VERSION.transaction_version;
|
||||
|
||||
const SPEC_VERSION: u32 = node_runtime::VERSION.spec_version;
|
||||
const SPEC_VERSION: u32 = kitchensink_runtime::VERSION.spec_version;
|
||||
|
||||
const HEAP_PAGES: u64 = 20;
|
||||
|
||||
|
||||
@@ -28,10 +28,10 @@ impl sc_executor::NativeExecutionDispatch for ExecutorDispatch {
|
||||
type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;
|
||||
|
||||
fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> {
|
||||
node_runtime::api::dispatch(method, data)
|
||||
kitchensink_runtime::api::dispatch(method, data)
|
||||
}
|
||||
|
||||
fn native_version() -> sc_executor::NativeVersion {
|
||||
node_runtime::native_version()
|
||||
kitchensink_runtime::native_version()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,12 +26,12 @@ use sp_runtime::{
|
||||
traits::Hash as HashT, transaction_validity::InvalidTransaction, ApplyExtrinsicResult,
|
||||
};
|
||||
|
||||
use node_primitives::{Balance, Hash};
|
||||
use node_runtime::{
|
||||
use kitchensink_runtime::{
|
||||
constants::{currency::*, time::SLOT_DURATION},
|
||||
Balances, Call, CheckedExtrinsic, Event, Header, Runtime, System, TransactionPayment,
|
||||
UncheckedExtrinsic,
|
||||
};
|
||||
use node_primitives::{Balance, Hash};
|
||||
use node_testing::keyring::*;
|
||||
use wat;
|
||||
|
||||
@@ -44,7 +44,7 @@ use self::common::{sign, *};
|
||||
/// have to execute provided wasm code instead of the native equivalent. This trick is used to
|
||||
/// test code paths that differ between native and wasm versions.
|
||||
pub fn bloaty_code_unwrap() -> &'static [u8] {
|
||||
node_runtime::WASM_BINARY_BLOATY.expect(
|
||||
kitchensink_runtime::WASM_BINARY_BLOATY.expect(
|
||||
"Development wasm binary is not available. \
|
||||
Testing is only supported with the flag disabled.",
|
||||
)
|
||||
|
||||
@@ -35,12 +35,12 @@ use sp_runtime::{
|
||||
};
|
||||
use sp_state_machine::TestExternalities as CoreTestExternalities;
|
||||
|
||||
use node_executor::ExecutorDispatch;
|
||||
use node_primitives::{BlockNumber, Hash};
|
||||
use node_runtime::{
|
||||
use kitchensink_runtime::{
|
||||
constants::currency::*, Block, BuildStorage, CheckedExtrinsic, Header, Runtime,
|
||||
UncheckedExtrinsic,
|
||||
};
|
||||
use node_executor::ExecutorDispatch;
|
||||
use node_primitives::{BlockNumber, Hash};
|
||||
use node_testing::keyring::*;
|
||||
use sp_externalities::Externalities;
|
||||
|
||||
@@ -69,7 +69,7 @@ impl AppCrypto<MultiSigner, MultiSignature> for TestAuthorityId {
|
||||
/// making the binary slimmer. There is a convention to use compact version of the runtime
|
||||
/// as canonical.
|
||||
pub fn compact_code_unwrap() -> &'static [u8] {
|
||||
node_runtime::WASM_BINARY.expect(
|
||||
kitchensink_runtime::WASM_BINARY.expect(
|
||||
"Development wasm binary is not available. Testing is only supported with the flag \
|
||||
disabled.",
|
||||
)
|
||||
@@ -77,9 +77,9 @@ pub fn compact_code_unwrap() -> &'static [u8] {
|
||||
|
||||
pub const GENESIS_HASH: [u8; 32] = [69u8; 32];
|
||||
|
||||
pub const SPEC_VERSION: u32 = node_runtime::VERSION.spec_version;
|
||||
pub const SPEC_VERSION: u32 = kitchensink_runtime::VERSION.spec_version;
|
||||
|
||||
pub const TRANSACTION_VERSION: u32 = node_runtime::VERSION.transaction_version;
|
||||
pub const TRANSACTION_VERSION: u32 = kitchensink_runtime::VERSION.transaction_version;
|
||||
|
||||
pub type TestExternalities<H> = CoreTestExternalities<H>;
|
||||
|
||||
|
||||
@@ -20,11 +20,11 @@ use frame_support::{
|
||||
traits::Currency,
|
||||
weights::{constants::ExtrinsicBaseWeight, GetDispatchInfo, IdentityFee, WeightToFee},
|
||||
};
|
||||
use node_primitives::Balance;
|
||||
use node_runtime::{
|
||||
use kitchensink_runtime::{
|
||||
constants::{currency::*, time::SLOT_DURATION},
|
||||
Balances, Call, CheckedExtrinsic, Multiplier, Runtime, TransactionByteFee, TransactionPayment,
|
||||
};
|
||||
use node_primitives::Balance;
|
||||
use node_testing::keyring::*;
|
||||
use sp_core::NeverNativeValue;
|
||||
use sp_runtime::{traits::One, Perbill};
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
use codec::Decode;
|
||||
use frame_system::offchain::{SendSignedTransaction, Signer, SubmitTransaction};
|
||||
use node_runtime::{Executive, Indices, Runtime, UncheckedExtrinsic};
|
||||
use kitchensink_runtime::{Executive, Indices, Runtime, UncheckedExtrinsic};
|
||||
use sp_application_crypto::AppKey;
|
||||
use sp_core::offchain::{testing::TestTransactionPoolExt, TransactionPoolExt};
|
||||
use sp_keyring::sr25519::Keyring::Alice;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "node-runtime"
|
||||
name = "kitchensink-runtime"
|
||||
version = "3.0.0-dev"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2021"
|
||||
|
||||
@@ -21,7 +21,7 @@ tempfile = "3.1.0"
|
||||
frame-system = { version = "4.0.0-dev", path = "../../../frame/system" }
|
||||
node-executor = { version = "3.0.0-dev", path = "../executor" }
|
||||
node-primitives = { version = "2.0.0", path = "../primitives" }
|
||||
node-runtime = { version = "3.0.0-dev", path = "../runtime" }
|
||||
kitchensink-runtime = { version = "3.0.0-dev", path = "../runtime" }
|
||||
pallet-asset-tx-payment = { version = "4.0.0-dev", path = "../../../frame/transaction-payment/asset-tx-payment" }
|
||||
pallet-transaction-payment = { version = "4.0.0-dev", path = "../../../frame/transaction-payment" }
|
||||
sc-block-builder = { version = "0.10.0-dev", path = "../../../client/block-builder" }
|
||||
|
||||
@@ -34,11 +34,11 @@ use crate::{
|
||||
};
|
||||
use codec::{Decode, Encode};
|
||||
use futures::executor;
|
||||
use node_primitives::Block;
|
||||
use node_runtime::{
|
||||
use kitchensink_runtime::{
|
||||
constants::currency::DOLLARS, AccountId, BalancesCall, Call, CheckedExtrinsic, MinimumPeriod,
|
||||
Signature, SystemCall, UncheckedExtrinsic,
|
||||
};
|
||||
use node_primitives::Block;
|
||||
use sc_block_builder::BlockBuilderProvider;
|
||||
use sc_client_api::{
|
||||
execution_extensions::{ExecutionExtensions, ExecutionStrategies},
|
||||
@@ -304,20 +304,21 @@ impl<'a> Iterator for BlockContentIterator<'a> {
|
||||
CheckedExtrinsic {
|
||||
signed: Some((
|
||||
sender,
|
||||
signed_extra(0, node_runtime::ExistentialDeposit::get() + 1),
|
||||
signed_extra(0, kitchensink_runtime::ExistentialDeposit::get() + 1),
|
||||
)),
|
||||
function: match self.content.block_type {
|
||||
BlockType::RandomTransfersKeepAlive =>
|
||||
Call::Balances(BalancesCall::transfer_keep_alive {
|
||||
dest: sp_runtime::MultiAddress::Id(receiver),
|
||||
value: node_runtime::ExistentialDeposit::get() + 1,
|
||||
value: kitchensink_runtime::ExistentialDeposit::get() + 1,
|
||||
}),
|
||||
BlockType::RandomTransfersReaping => {
|
||||
Call::Balances(BalancesCall::transfer {
|
||||
dest: sp_runtime::MultiAddress::Id(receiver),
|
||||
// Transfer so that ending balance would be 1 less than existential
|
||||
// deposit so that we kill the sender account.
|
||||
value: 100 * DOLLARS - (node_runtime::ExistentialDeposit::get() - 1),
|
||||
value: 100 * DOLLARS -
|
||||
(kitchensink_runtime::ExistentialDeposit::get() - 1),
|
||||
})
|
||||
},
|
||||
BlockType::Noop => Call::System(SystemCall::remark { remark: Vec::new() }),
|
||||
@@ -592,9 +593,9 @@ impl BenchKeyring {
|
||||
}
|
||||
|
||||
/// Generate genesis with accounts from this keyring endowed with some balance.
|
||||
pub fn generate_genesis(&self) -> node_runtime::GenesisConfig {
|
||||
pub fn generate_genesis(&self) -> kitchensink_runtime::GenesisConfig {
|
||||
crate::genesis::config_endowed(
|
||||
Some(node_runtime::wasm_binary_unwrap()),
|
||||
Some(kitchensink_runtime::wasm_binary_unwrap()),
|
||||
self.collect_account_ids(),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
//! Utilities to build a `TestClient` for `node-runtime`.
|
||||
//! Utilities to build a `TestClient` for `kitchensink-runtime`.
|
||||
|
||||
use sc_service::client;
|
||||
use sp_runtime::BuildStorage;
|
||||
/// Re-export test-client utilities.
|
||||
pub use substrate_test_client::*;
|
||||
|
||||
/// Call executor for `node-runtime` `TestClient`.
|
||||
/// Call executor for `kitchensink-runtime` `TestClient`.
|
||||
pub type ExecutorDispatch = sc_executor::NativeElseWasmExecutor<node_executor::ExecutorDispatch>;
|
||||
|
||||
/// Default backend type.
|
||||
@@ -34,10 +34,10 @@ pub type Client = client::Client<
|
||||
Backend,
|
||||
client::LocalCallExecutor<node_primitives::Block, Backend, ExecutorDispatch>,
|
||||
node_primitives::Block,
|
||||
node_runtime::RuntimeApi,
|
||||
kitchensink_runtime::RuntimeApi,
|
||||
>;
|
||||
|
||||
/// Transaction for node-runtime.
|
||||
/// Transaction for kitchensink-runtime.
|
||||
pub type Transaction = sc_client_api::backend::TransactionFor<Backend, node_primitives::Block>;
|
||||
|
||||
/// Genesis configuration parameters for `TestClient`.
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
//! Genesis Configuration.
|
||||
|
||||
use crate::keyring::*;
|
||||
use node_runtime::{
|
||||
use kitchensink_runtime::{
|
||||
constants::currency::*, wasm_binary_unwrap, AccountId, BabeConfig, BalancesConfig,
|
||||
GenesisConfig, GrandpaConfig, IndicesConfig, SessionConfig, SocietyConfig, StakerStatus,
|
||||
StakingConfig, SystemConfig, BABE_GENESIS_EPOCH_CONFIG,
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
//! Test accounts.
|
||||
|
||||
use codec::Encode;
|
||||
use kitchensink_runtime::{CheckedExtrinsic, SessionKeys, SignedExtra, UncheckedExtrinsic};
|
||||
use node_primitives::{AccountId, Balance, Index};
|
||||
use node_runtime::{CheckedExtrinsic, SessionKeys, SignedExtra, UncheckedExtrinsic};
|
||||
use sp_keyring::{AccountKeyring, Ed25519Keyring, Sr25519Keyring};
|
||||
use sp_runtime::generic::Era;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
//! Subkey utility, based on node_runtime.
|
||||
//! Subkey utility, based on kitchensink_runtime.
|
||||
|
||||
fn main() -> Result<(), sc_cli::Error> {
|
||||
subkey::run()
|
||||
|
||||
@@ -445,7 +445,7 @@ pallet-assets, pallet-balances, pallet-consensus, pallet-contracts, pallet-counc
|
||||
frame-executive, pallet-session, pallet-staking, pallet-timestamp, pallet-treasury
|
||||
* Node
|
||||
[source, shell]
|
||||
node-cli, node-consensus, node-executor, node-network, node-primitives, node-runtime
|
||||
node-cli, node-consensus, node-executor, node-network, node-primitives, kitchensink-runtime
|
||||
* Subkey
|
||||
[source, shell]
|
||||
subkey
|
||||
|
||||
@@ -181,13 +181,13 @@ test-deterministic-wasm:
|
||||
script:
|
||||
- rusty-cachier snapshot create
|
||||
# build runtime
|
||||
- cargo build --verbose --release -p node-runtime
|
||||
- cargo build --verbose --release -p kitchensink-runtime
|
||||
# make checksum
|
||||
- sha256sum $CARGO_TARGET_DIR/release/wbuild/node-runtime/target/wasm32-unknown-unknown/release/node_runtime.wasm > checksum.sha256
|
||||
- sha256sum $CARGO_TARGET_DIR/release/wbuild/kitchensink-runtime/target/wasm32-unknown-unknown/release/kitchensink_runtime.wasm > checksum.sha256
|
||||
# clean up
|
||||
- rm -rf $CARGO_TARGET_DIR/release/wbuild
|
||||
# build again
|
||||
- cargo build --verbose --release -p node-runtime
|
||||
- cargo build --verbose --release -p kitchensink-runtime
|
||||
# confirm checksum
|
||||
- sha256sum -c ./checksum.sha256
|
||||
# clean up again, don't put release binaries into the cache
|
||||
|
||||
@@ -6,11 +6,11 @@ edition = "2021"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://substrate.io"
|
||||
repository = "https://github.com/paritytech/substrate/"
|
||||
description = "Bag threshold generation script for pallet-bag-list and node-runtime."
|
||||
description = "Bag threshold generation script for pallet-bag-list and kitchensink-runtime."
|
||||
readme = "README.md"
|
||||
|
||||
[dependencies]
|
||||
node-runtime = { version = "3.0.0-dev", path = "../../../../bin/node/runtime" }
|
||||
kitchensink-runtime = { version = "3.0.0-dev", path = "../../../../bin/node/runtime" }
|
||||
generate-bags = { version = "4.0.0-dev", path = "../" }
|
||||
|
||||
# third-party
|
||||
|
||||
@@ -43,5 +43,10 @@ struct Opt {
|
||||
|
||||
fn main() -> Result<(), std::io::Error> {
|
||||
let Opt { n_bags, output, total_issuance, minimum_balance } = Opt::parse();
|
||||
generate_thresholds::<node_runtime::Runtime>(n_bags, &output, total_issuance, minimum_balance)
|
||||
generate_thresholds::<kitchensink_runtime::Runtime>(
|
||||
n_bags,
|
||||
&output,
|
||||
total_issuance,
|
||||
minimum_balance,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
//!
|
||||
//! Each project can be skipped individually by using the environment variable
|
||||
//! `SKIP_PROJECT_NAME_WASM_BUILD`. Where `PROJECT_NAME` needs to be replaced by the name of the
|
||||
//! cargo project, e.g. `node-runtime` will be `NODE_RUNTIME`.
|
||||
//! cargo project, e.g. `kitchensink-runtime` will be `NODE_RUNTIME`.
|
||||
//!
|
||||
//! ## Prerequisites:
|
||||
//!
|
||||
|
||||
Reference in New Issue
Block a user