Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
xlc committed Jan 29, 2024
1 parent 97bfc23 commit 83dd7f5
Show file tree
Hide file tree
Showing 10 changed files with 1,154 additions and 913 deletions.
1,770 changes: 1,005 additions & 765 deletions Cargo.lock

Large diffs are not rendered by default.

251 changes: 126 additions & 125 deletions Cargo.toml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion modules/collator-selection/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ pub mod pallet {

pub fn do_register_candidate(who: &T::AccountId, deposit: BalanceOf<T>) -> Result<usize, DispatchError> {
// ensure we are below limit.
let length = <Candidates<T>>::decode_len().unwrap_or_default();
let length = <Candidates<T>>::decode_non_dedup_len().unwrap_or_default();
ensure!(
(length as u32) < Self::desired_candidates(),
Error::<T>::MaxCandidatesExceeded
Expand Down
13 changes: 7 additions & 6 deletions node/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,20 @@ sp-timestamp = { workspace = true, features = ["std"] }
sp-keystore = { workspace = true, features = ["std"] }

cumulus-client-cli = { workspace = true }
cumulus-client-network = { workspace = true }
cumulus-client-service = { workspace = true }
cumulus-client-consensus-aura = { workspace = true }
cumulus-client-consensus-common = { workspace = true }
cumulus-client-consensus-relay-chain = { workspace = true }
cumulus-client-network = { workspace = true }
cumulus-client-parachain-inherent ={ workspace = true }
cumulus-client-service = { workspace = true }
cumulus-pallet-parachain-system = { workspace = true, features = ["std"] }
cumulus-primitives-core = { workspace = true, features = ["std"] }
cumulus-primitives-parachain-inherent = { workspace = true, features = ["std"] }
cumulus-test-relay-sproof-builder = { workspace = true, features = ["std"] }
cumulus-pallet-parachain-system = { workspace = true, features = ["std"] }
cumulus-relay-chain-interface = { workspace = true }
cumulus-relay-chain-inprocess-interface = { workspace = true }
cumulus-relay-chain-rpc-interface = { workspace = true }
cumulus-relay-chain-interface = { workspace = true }
cumulus-relay-chain-minimal-node = { workspace = true }
cumulus-relay-chain-rpc-interface = { workspace = true }
cumulus-test-relay-sproof-builder = { workspace = true, features = ["std"] }

polkadot-cli = { workspace = true }
polkadot-primitives = { workspace = true, features = ["std"] }
Expand Down
10 changes: 5 additions & 5 deletions node/service/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@

use primitives::{AccountId, Balance, Block, BlockNumber, Hash, Header, Nonce};
use sc_client_api::{Backend as BackendT, BlockchainEvents, KeysIter, PairsIter};
use sp_api::{CallApiAt, NumberFor, ProvideRuntimeApi};
use sp_api::{CallApiAt, ProvideRuntimeApi};
use sp_blockchain::HeaderBackend;
use sp_consensus::BlockStatus;
use sp_runtime::{
generic::SignedBlock,
traits::{BlakeTwo256, Block as BlockT},
traits::{BlakeTwo256, Block as BlockT, NumberFor},
Justifications,
};
use sp_storage::{ChildInfo, StorageData, StorageKey};
Expand Down Expand Up @@ -73,7 +73,7 @@ pub trait AbstractClient<Block, Backend>:
where
Block: BlockT,
Backend: BackendT<Block>,
Backend::State: sp_api::StateBackend<BlakeTwo256>,
Backend::State: sc_client_api::StateBackend<BlakeTwo256>,
Self::Api: RuntimeApiCollection,
{
}
Expand All @@ -82,7 +82,7 @@ impl<Block, Backend, Client> AbstractClient<Block, Backend> for Client
where
Block: BlockT,
Backend: BackendT<Block>,
Backend::State: sp_api::StateBackend<BlakeTwo256>,
Backend::State: sc_client_api::StateBackend<BlakeTwo256>,
Client: BlockchainEvents<Block>
+ ProvideRuntimeApi<Block>
+ HeaderBackend<Block>
Expand Down Expand Up @@ -115,7 +115,7 @@ pub trait ExecuteWithClient {
fn execute_with_client<Client, Api, Backend>(self, client: Arc<Client>) -> Self::Output
where
Backend: sc_client_api::Backend<Block>,
Backend::State: sp_api::StateBackend<BlakeTwo256>,
Backend::State: sc_client_api::StateBackend<BlakeTwo256>,
Api: crate::RuntimeApiCollection,
Client: AbstractClient<Block, Backend, Api = Api> + 'static;
}
Expand Down
2 changes: 1 addition & 1 deletion node/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ use cumulus_client_consensus_aura::BuildAuraConsensusParams;
use cumulus_client_consensus_aura::{AuraConsensus, SlotProportion};
use cumulus_client_consensus_common::{ParachainBlockImport as TParachainBlockImport, ParachainConsensus};
use cumulus_client_network::RequireSecondedInBlockAnnounce;
use cumulus_client_parachain_inherent::{MockValidationDataInherentDataProvider, MockXcmConfig};
use cumulus_client_service::{prepare_node_config, StartCollatorParams, StartFullNodeParams};
#[allow(deprecated)]
use cumulus_client_service::{start_collator, start_full_node};
use cumulus_primitives_core::ParaId;
use cumulus_primitives_parachain_inherent::{MockValidationDataInherentDataProvider, MockXcmConfig};
use cumulus_relay_chain_inprocess_interface::build_inprocess_relay_chain;
use cumulus_relay_chain_interface::{RelayChainInterface, RelayChainResult};
use cumulus_relay_chain_minimal_node::build_minimal_relay_chain_node_with_rpc;
Expand Down
2 changes: 1 addition & 1 deletion orml
Submodule orml updated 59 files
+2 −0 .github/workflows/release.yml
+1 −5 .github/workflows/test.yml
+33 −0 .github/workflows/zepter.yml
+38 −75 Cargo.dev.toml
+3 −6 asset-registry/Cargo.toml
+0 −3 asset-registry/src/lib.rs
+0 −44 asset-registry/src/migrations.rs
+13 −16 asset-registry/src/mock/mod.rs
+14 −78 asset-registry/src/mock/para.rs
+6 −33 asset-registry/src/mock/relay.rs
+1 −128 asset-registry/src/tests.rs
+2 −2 auction/Cargo.toml
+2 −24 auction/src/mock.rs
+1 −1 authority/Cargo.toml
+5 −26 authority/src/mock.rs
+1 −1 benchmarking/Cargo.toml
+3 −28 benchmarking/src/tests.rs
+1 −1 build-script-utils/Cargo.toml
+3 −3 currencies/Cargo.toml
+4 −21 currencies/src/mock.rs
+1 −1 gradually-update/Cargo.toml
+3 −22 gradually-update/src/mock.rs
+1 −1 nft/Cargo.toml
+2 −25 nft/src/mock.rs
+3 −3 oracle/Cargo.toml
+1 −1 oracle/runtime-api/Cargo.toml
+4 −27 oracle/src/mock.rs
+2 −2 parameters/Cargo.toml
+2 −25 parameters/src/mock.rs
+3 −3 payments/Cargo.toml
+4 −26 payments/src/mock.rs
+2 −2 rewards/Cargo.toml
+2 −26 rewards/src/mock.rs
+1 −1 rust-toolchain.toml
+2 −2 tokens/Cargo.toml
+1 −1 tokens/runtime-api/Cargo.toml
+3 −0 tokens/src/impls.rs
+3 −1 tokens/src/lib.rs
+3 −23 tokens/src/mock.rs
+2 −2 traits/Cargo.toml
+2 −2 unknown-tokens/Cargo.toml
+0 −3 unknown-tokens/src/lib.rs
+0 −86 unknown-tokens/src/migrations.rs
+2 −25 unknown-tokens/src/mock.rs
+1 −112 unknown-tokens/src/tests.rs
+1 −1 utilities/Cargo.toml
+2 −22 utilities/src/lib.rs
+1 −1 vesting/Cargo.toml
+5 −23 vesting/src/mock.rs
+39 −0 xcm-mock-message-queue/Cargo.toml
+159 −0 xcm-mock-message-queue/src/lib.rs
+2 −2 xcm-support/Cargo.toml
+1 −1 xcm/Cargo.toml
+4 −10 xtokens/Cargo.toml
+18 −24 xtokens/src/mock/mod.rs
+12 −78 xtokens/src/mock/para.rs
+12 −78 xtokens/src/mock/para_relative_view.rs
+12 −78 xtokens/src/mock/para_teleport.rs
+6 −33 xtokens/src/mock/relay.rs
2 changes: 1 addition & 1 deletion runtime/karura/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1906,7 +1906,7 @@ pub type Executive = frame_executive::Executive<
>;

#[allow(unused_parens)]
type Migrations = ();
type Migrations = (cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4<Runtime>,);

#[cfg(feature = "runtime-benchmarks")]
#[macro_use]
Expand Down
14 changes: 7 additions & 7 deletions runtime/karura/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,20 +247,20 @@ impl cumulus_pallet_xcm::Config for Runtime {

impl cumulus_pallet_xcmp_queue::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type XcmExecutor = XcmExecutor;
type ChannelInfo = ParachainSystem;
type VersionWrapper = PolkadotXcm;
type ExecuteOverweightOrigin = EnsureRootOrHalfGeneralCouncil;
type ControllerOrigin = EnsureRootOrHalfGeneralCouncil;
type ControllerOriginConverter = XcmOriginToCallOrigin;
type WeightInfo = cumulus_pallet_xcmp_queue::weights::SubstrateWeight<Self>;
// Enqueue XCMP messages from siblings for later processing.
type XcmpQueue = TransformOrigin<MessageQueue, AggregateMessageOrigin, ParaId, ParaIdToSibling>;
type MaxInboundSuspended = sp_core::ConstU32<1_000>;
type ControllerOrigin =
EitherOfDiverse<EnsureRoot<AccountId>, EnsureXcm<IsVoiceOfBody<FellowshipLocation, FellowsBodyId>>>;
type ControllerOriginConverter = xcm_config::XcmOriginToTransactDispatchOrigin;
type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo<Runtime>;
type PriceForSiblingDelivery = NoPriceForMessageDelivery<ParaId>;
}

impl cumulus_pallet_dmp_queue::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type XcmExecutor = XcmExecutor;
type ExecuteOverweightOrigin = EnsureRootOrHalfGeneralCouncil;
}

parameter_types! {
Expand Down
1 change: 0 additions & 1 deletion runtime/mandala/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ sp-io = { workspace = true, features = ["std"] }
sp-trie = { workspace = true, features = ["std"] }
sp-keyring = { workspace = true }

cumulus-primitives-parachain-inherent = { workspace = true, features = ["std"] }
cumulus-test-relay-sproof-builder = { workspace = true, features = ["std"] }

acala-service = { workspace = true, features = ["std", "with-mandala-runtime"] }
Expand Down

0 comments on commit 83dd7f5

Please sign in to comment.