Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BHK/P alignments #2115

Merged
merged 10 commits into from
May 11, 2023
Merged
2 changes: 0 additions & 2 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion bin/rialto-parachain/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ pub type XcmOriginToTransactDispatchOrigin = (
// using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for
// foreign chains who want to have a local sovereign account on this chain which they control.
SovereignSignedViaLocation<LocationToAccountId, RuntimeOrigin>,
// Native converter for Relay-chain (Parent) location; will converts to a `Relay` origin when
// Native converter for Relay-chain (Parent) location; will convert to a `Relay` origin when
// recognised.
RelayChainAsNative<RelayOrigin, RuntimeOrigin>,
// Native converter for sibling Parachains; will convert to a `SiblingPara` origin when
Expand Down
6 changes: 1 addition & 5 deletions bin/runtime-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@ sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", d
sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }

# Polkadot dependencies
pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false }
xcm = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false }
xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false }
xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false }

[dev-dependencies]
bp-test-utils = { path = "../../primitives/test-utils" }
Expand All @@ -68,7 +66,6 @@ std = [
"pallet-bridge-relayers/std",
"pallet-transaction-payment/std",
"pallet-utility/std",
"pallet-xcm/std",
"scale-info/std",
"sp-api/std",
"sp-core/std",
Expand All @@ -78,13 +75,12 @@ std = [
"sp-trie/std",
"xcm/std",
"xcm-builder/std",
"xcm-executor/std",
]
runtime-benchmarks = [
"pallet-bridge-grandpa/runtime-benchmarks",
"pallet-bridge-messages/runtime-benchmarks",
"pallet-bridge-parachains/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"pallet-bridge-relayers/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
]
integrity-test = [
Expand Down
7 changes: 7 additions & 0 deletions primitives/chain-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,11 @@ pub const PARAS_PALLET_NAME: &str = "Paras";
/// Name of the With-Kusama GRANDPA pallet instance that is deployed at bridged chains.
pub const WITH_KUSAMA_GRANDPA_PALLET_NAME: &str = "BridgeKusamaGrandpa";

/// Maximal size of encoded `bp_parachains::ParaStoredHeaderData` structure among all Polkadot
/// parachains.
///
/// It includes the block number and state root, so it shall be near 40 bytes, but let's have some
/// reserve.
pub const MAX_NESTED_PARACHAIN_HEAD_DATA_SIZE: u32 = 128;

decl_bridge_finality_runtime_apis!(kusama);
7 changes: 7 additions & 0 deletions primitives/chain-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,11 @@ pub const PARAS_PALLET_NAME: &str = "Paras";
/// Name of the With-Polkadot GRANDPA pallet instance that is deployed at bridged chains.
pub const WITH_POLKADOT_GRANDPA_PALLET_NAME: &str = "BridgePolkadotGrandpa";

/// Maximal size of encoded `bp_parachains::ParaStoredHeaderData` structure among all Polkadot
/// parachains.
///
/// It includes the block number and state root, so it shall be near 40 bytes, but let's have some
/// reserve.
pub const MAX_NESTED_PARACHAIN_HEAD_DATA_SIZE: u32 = 128;

decl_bridge_finality_runtime_apis!(polkadot);
1 change: 1 addition & 0 deletions primitives/polkadot-core/src/parachains.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

//! Primitives of polkadot-like chains, that are related to parachains functionality.
//!
//! TODO:check-parameter - fix comment or can we import `ParaId` from polkadot now? does it make sense?
//! Even though this (bridges) repository references polkadot repository, we can't
bkontur marked this conversation as resolved.
Show resolved Hide resolved
//! reference polkadot crates from pallets. That's because bridges repository is
//! included in the polkadot repository and included pallets are used by polkadot
Expand Down
2 changes: 1 addition & 1 deletion primitives/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pub const BRIDGE_HUB_WOCOCO_CHAIN_ID: ChainId = *b"bhwo";
pub const BRIDGE_HUB_KUSAMA_CHAIN_ID: ChainId = *b"bhks";

/// BridgeHubPolkadot chain id.
pub const BRIDGE_HUB_POLKADOT_CHAIN_ID: ChainId = *b"bhwo";
pub const BRIDGE_HUB_POLKADOT_CHAIN_ID: ChainId = *b"bhpd";

/// Generic header Id.
#[derive(
Expand Down