Skip to content

Commit

Permalink
Merge pull request #70 from centrifuge/polkadot-v0.9.43-xcm-changes
Browse files Browse the repository at this point in the history
Polkadot v0.9.43 xcm changes
  • Loading branch information
cdamian authored Oct 24, 2023
2 parents c5732e4 + 58fb8fb commit e128dc0
Show file tree
Hide file tree
Showing 10 changed files with 2,203 additions and 466 deletions.
999 changes: 741 additions & 258 deletions Cargo.lock

Large diffs are not rendered by default.

372 changes: 372 additions & 0 deletions Cargo.toml

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polk
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
sp-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
Expand Down Expand Up @@ -84,6 +85,8 @@ cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" }

[dev-dependencies]
parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" }

polkadot-runtime = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
Expand All @@ -99,6 +102,11 @@ pallet-session = { git = "https://github.com/paritytech/substrate", features = [
pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }


xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" }
pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" }
pallet-xcm-transactor = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, rev = "7759b616c378b84e920ac56d3977bf9e49bcb1fb" }

[features]
default = []
runtime-benchmarks = ['frame-benchmarking/runtime-benchmarks']
38 changes: 11 additions & 27 deletions core/src/builder/companion/src/expand/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,42 +197,26 @@ pub fn expand(def: CompanionDef) -> SynResult<TokenStream> {
}

pub fn evolve(&mut self) -> Result<(), BuilderError> {
{
__hidden_tracing::enter_span!(sp_tracing::Level::TRACE, std::stringify!(#relay_chain_name - BlockBuilding:));

self.#relay_chain_name.build_block().map_err(|e| BuilderError::Relaychain(e.into())).map(|_| ())?;
self.#relay_chain_name.import_block().map_err(|e| BuilderError::Relaychain(e.into())).map(|_| ())?;
}

{
#(
__hidden_tracing::enter_span!(sp_tracing::Level::TRACE, std::stringify!(#parachain_names - BlockBuilding:));

self.#parachain_names.build_block().map_err(|e| BuilderError::Parachain(e.into())).map(|_| ())?;
self.#parachain_names.import_block().map_err(|e| BuilderError::Parachain(e.into())).map(|_| ())?;
)*
}
let para_head = self.#parachain_names.head().map_err(|e| BuilderError::Parachain(e.into()))?;

{
__hidden_tracing::enter_span!(sp_tracing::Level::TRACE, std::stringify!(#relay_chain_name - BlockBuilding:));
self.#relay_chain_name.update_para_head(
self.#parachain_names.id(),
para_head,
).map_err(|e| BuilderError::Relaychain(e.into())).map(|_| ())?;

self.#relay_chain_name.build_block().map_err(|e| BuilderError::Relaychain(e.into())).map(|_| ())?;
self.#relay_chain_name.import_block().map_err(|e| BuilderError::Relaychain(e.into())).map(|_| ())?;
}
self.#relay_chain_name.build_block().map_err(|e| BuilderError::Relaychain(e.into())).map(|_| ())?;

{
#(
__hidden_tracing::enter_span!(sp_tracing::Level::TRACE, std::stringify!(#relay_chain_name - Onboarding(#parachain_names):));

let para = _hidden_FudgeParaChain {
id: _hidden_ParaId::from(#parachain_ids),
head: self.#parachain_names.head().map_err(|e| BuilderError::Parachain(e.into()))?,
code: self.#parachain_names.code().map_err(|e| BuilderError::Parachain(e.into()))?,
};
self.#parachain_names.build_block().map_err(|e| BuilderError::Parachain(e.into())).map(|_| ())?;

let collator = self.#parachain_names.collator();
self.#relay_chain_name.import_block().map_err(|e| BuilderError::Relaychain(e.into())).map(|_| ())?;
self.#relay_chain_name.build_block().map_err(|e| BuilderError::Relaychain(e.into())).map(|_| ())?;
self.#relay_chain_name.import_block().map_err(|e| BuilderError::Relaychain(e.into())).map(|_| ())?;

self.#relay_chain_name.onboard_para(para, Box::new(collator)).map_err(|e| BuilderError::Relaychain(e.into())).map(|_| ())?;
self.#parachain_names.import_block().map_err(|e| BuilderError::Parachain(e.into())).map(|_| ())?;
)*
}

Expand Down
Loading

0 comments on commit e128dc0

Please sign in to comment.