mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 10:31:03 +00:00
Update Cumulus for Parachains V1 (#224)
* Start with something * Whatever * Update * MOARE * Make cumulus-network compile and tests work * Update more and fixes * More stuff * More fixes * Make collator build * Make test almost work * Remove contracts runtime * More test work * Make service compile * Fix test-service * Fix test client * More fixes * Fix collator test * Fix network tests (again) * Make everything compile, finally * Fix tests * Update to latest masters * Remove ignore * Switch to different branch in polkadot for now * Update reference * Make it compile with latest changes * Update collator/src/lib.rs Co-authored-by: Robert Habermeier <rphmeier@gmail.com> * Update to latest upstream * Update to latest master * Fix test Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
This commit is contained in:
@@ -8,44 +8,41 @@ edition = '2018'
|
||||
serde = { version = "1.0.101", optional = true, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] }
|
||||
|
||||
cumulus-token-dealer = { path = "../pallets/token-dealer", default-features = false }
|
||||
parachain-info = { path = "../pallets/parachain-info", default-features = false }
|
||||
rococo-parachain-primitives = { path = "../primitives", default-features = false }
|
||||
|
||||
# Substrate dependencies
|
||||
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "rococo-branch" }
|
||||
sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "rococo-branch" }
|
||||
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "rococo-branch" }
|
||||
sp-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "rococo-branch" }
|
||||
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "rococo-branch" }
|
||||
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "rococo-branch" }
|
||||
sp-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "rococo-branch" }
|
||||
sp-offchain = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "rococo-branch" }
|
||||
sp-block-builder = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "rococo-branch" }
|
||||
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "rococo-branch" }
|
||||
sp-inherents = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "rococo-branch" }
|
||||
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
sp-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
sp-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
sp-offchain = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
sp-block-builder = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
sp-inherents = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
|
||||
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "rococo-branch" }
|
||||
frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "rococo-branch" }
|
||||
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "rococo-branch" }
|
||||
pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "rococo-branch" }
|
||||
pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "rococo-branch" }
|
||||
pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "rococo-branch" }
|
||||
pallet-sudo = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "rococo-branch" }
|
||||
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "rococo-branch" }
|
||||
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
pallet-sudo = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
|
||||
# Cumulus dependencies
|
||||
cumulus-runtime = { path = "../../runtime", default-features = false }
|
||||
cumulus-parachain-upgrade = { path = "../../parachain-upgrade", default-features = false }
|
||||
cumulus-message-broker = { path = "../../message-broker", default-features = false }
|
||||
cumulus-upward-message = { path = "../../upward-message", default-features = false }
|
||||
cumulus-primitives = { path = "../../primitives", default-features = false }
|
||||
|
||||
# Polkadot dependencies
|
||||
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "rococo-branch", default-features = false }
|
||||
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "bkchr-adder-collator-integration-test" }
|
||||
|
||||
[build-dependencies]
|
||||
wasm-builder-runner = { package = "substrate-wasm-builder-runner", version = "1.0.6" }
|
||||
wasm-builder-runner = { package = "substrate-wasm-builder-runner", version = "2.0.0" }
|
||||
|
||||
[features]
|
||||
default = [ "std" ]
|
||||
@@ -75,12 +72,5 @@ std = [
|
||||
"rococo-parachain-primitives/std",
|
||||
"cumulus-runtime/std",
|
||||
"cumulus-parachain-upgrade/std",
|
||||
"cumulus-message-broker/std",
|
||||
"cumulus-upward-message/std",
|
||||
"cumulus-primitives/std",
|
||||
"cumulus-token-dealer/std",
|
||||
]
|
||||
# Will be enabled by the `wasm-builder` when building the runtime for WASM.
|
||||
runtime-wasm = [
|
||||
"cumulus-upward-message/runtime-wasm",
|
||||
]
|
||||
|
||||
@@ -36,9 +36,6 @@ use sp_std::prelude::*;
|
||||
use sp_version::NativeVersion;
|
||||
use sp_version::RuntimeVersion;
|
||||
|
||||
/// Import the token dealer pallet.
|
||||
pub use cumulus_token_dealer;
|
||||
|
||||
// A few exports that help ease life for downstream crates.
|
||||
pub use frame_support::{
|
||||
construct_runtime, parameter_types,
|
||||
@@ -142,7 +139,7 @@ impl frame_system::Trait for Runtime {
|
||||
/// Runtime version.
|
||||
type Version = Version;
|
||||
/// Converts a module to an index of this module in the runtime.
|
||||
type ModuleToIndex = ModuleToIndex;
|
||||
type PalletInfo = PalletInfo;
|
||||
type AccountData = pallet_balances::AccountData<Balance>;
|
||||
type OnNewAccount = ();
|
||||
type OnKilledAccount = ();
|
||||
@@ -171,6 +168,7 @@ parameter_types! {
|
||||
pub const TransferFee: u128 = 0;
|
||||
pub const CreationFee: u128 = 0;
|
||||
pub const TransactionByteFee: u128 = 1;
|
||||
pub const MaxLocks: u32 = 50;
|
||||
}
|
||||
|
||||
impl pallet_balances::Trait for Runtime {
|
||||
@@ -182,11 +180,11 @@ impl pallet_balances::Trait for Runtime {
|
||||
type ExistentialDeposit = ExistentialDeposit;
|
||||
type AccountStore = System;
|
||||
type WeightInfo = ();
|
||||
type MaxLocks = MaxLocks;
|
||||
}
|
||||
|
||||
impl pallet_transaction_payment::Trait for Runtime {
|
||||
type Currency = Balances;
|
||||
type OnTransactionPayment = ();
|
||||
type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter<Balances, ()>;
|
||||
type TransactionByteFee = TransactionByteFee;
|
||||
type WeightToFee = IdentityFee<Balance>;
|
||||
type FeeMultiplierUpdate = ();
|
||||
@@ -199,24 +197,7 @@ impl pallet_sudo::Trait for Runtime {
|
||||
|
||||
impl cumulus_parachain_upgrade::Trait for Runtime {
|
||||
type Event = Event;
|
||||
type OnValidationFunctionParams = ();
|
||||
}
|
||||
|
||||
impl cumulus_message_broker::Trait for Runtime {
|
||||
type Event = Event;
|
||||
type DownwardMessageHandlers = TokenDealer;
|
||||
type UpwardMessage = cumulus_upward_message::RococoUpwardMessage;
|
||||
type ParachainId = ParachainInfo;
|
||||
type XCMPMessage = cumulus_token_dealer::XCMPMessage<AccountId, Balance>;
|
||||
type XCMPMessageHandlers = TokenDealer;
|
||||
}
|
||||
|
||||
impl cumulus_token_dealer::Trait for Runtime {
|
||||
type Event = Event;
|
||||
type UpwardMessageSender = MessageBroker;
|
||||
type UpwardMessage = cumulus_upward_message::RococoUpwardMessage;
|
||||
type Currency = Balances;
|
||||
type XCMPMessageSender = MessageBroker;
|
||||
type OnValidationData = ();
|
||||
}
|
||||
|
||||
impl parachain_info::Trait for Runtime {}
|
||||
@@ -233,8 +214,6 @@ construct_runtime! {
|
||||
Sudo: pallet_sudo::{Module, Call, Storage, Config<T>, Event<T>},
|
||||
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage},
|
||||
ParachainUpgrade: cumulus_parachain_upgrade::{Module, Call, Storage, Inherent, Event},
|
||||
MessageBroker: cumulus_message_broker::{Module, Call, Inherent, Event<T>},
|
||||
TokenDealer: cumulus_token_dealer::{Module, Call, Event<T>},
|
||||
TransactionPayment: pallet_transaction_payment::{Module, Storage},
|
||||
ParachainInfo: parachain_info::{Module, Storage, Config},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user