Skip to content

Commit

Permalink
fixes after 1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
claravanstaden authored and claravanstaden committed Feb 21, 2024
1 parent 5d9e08a commit 9ba3d6d
Show file tree
Hide file tree
Showing 13 changed files with 293 additions and 37 deletions.
86 changes: 82 additions & 4 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions integration-tests/emulated/chains/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ polkadot-runtime-parachains = { version = "8.0.0" }
polkadot-parachain-primitives = { version = "7.0.0" }

# Cumulus
bridge-hub-common = { version = "0.1.0" }
parachains-common = { version = "8.0.0" }
cumulus-primitives-core = { version = "0.8.0" }
xcm-emulator = { version = "0.6.0" }
Expand Down
10 changes: 8 additions & 2 deletions integration-tests/emulated/chains/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,13 @@ decl_test_parachains! {
XcmpMessageHandler: bridge_hub_polkadot_runtime::XcmpQueue,
LocationToAccountId: bridge_hub_polkadot_runtime::xcm_config::LocationToAccountId,
ParachainInfo: bridge_hub_polkadot_runtime::ParachainInfo,
MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin,
MessageOrigin: bridge_hub_common::AggregateMessageOrigin,
},
pallets = {
PolkadotXcm: bridge_hub_polkadot_runtime::PolkadotXcm,
EthereumSystem: bridge_hub_polkadot_runtime::EthereumSystem,
EthereumInboundQueue: bridge_hub_polkadot_runtime::EthereumInboundQueue,
EthereumOutboundQueue: bridge_hub_polkadot_runtime::EthereumOutboundQueue,
}
},
pub struct PenpalPolkadotA {
Expand Down Expand Up @@ -194,10 +197,13 @@ decl_test_parachains! {
XcmpMessageHandler: bridge_hub_kusama_runtime::XcmpQueue,
LocationToAccountId: bridge_hub_kusama_runtime::xcm_config::LocationToAccountId,
ParachainInfo: bridge_hub_kusama_runtime::ParachainInfo,
MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin,
MessageOrigin: bridge_hub_common::AggregateMessageOrigin,
},
pallets = {
PolkadotXcm: bridge_hub_kusama_runtime::PolkadotXcm,
EthereumSystem: bridge_hub_kusama_runtime::EthereumSystem,
EthereumInboundQueue: bridge_hub_kusama_runtime::EthereumInboundQueue,
EthereumOutboundQueue: bridge_hub_kusama_runtime::EthereumOutboundQueue,
}
},
pub struct PenpalKusamaA {
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/emulated/common/src/xcm_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub fn xcm_transact_paid_execution(
assets: All.into(),
beneficiary: Location {
parents: 0,
interior: X1(AccountId32 { network: None, id: beneficiary.into() }),
interior: [ AccountId32 { network: None, id: beneficiary.into() }].into(),
},
},
]))
Expand Down
10 changes: 5 additions & 5 deletions system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -801,12 +801,12 @@ pub mod bridging {
/// Configure the fee to max Balance so that it is disabled.
pub const DefaultBridgeHubEthereumBaseFee: Balance = Balance::MAX;
pub storage BridgeHubEthereumBaseFee: Balance = DefaultBridgeHubEthereumBaseFee::get();
pub SiblingBridgeHubWithEthereumInboundQueueInstance: MultiLocation = MultiLocation::new(
1,
X2(
pub SiblingBridgeHubWithEthereumInboundQueueInstance: Location = Location::new(
2,
[
Parachain(SiblingBridgeHubParaId::get()),
PalletInstance(system_parachains_constants::kusama::snowbridge::INBOUND_QUEUE_PALLET_INDEX),
)
]
);

/// Set up exporters configuration.
Expand All @@ -824,7 +824,7 @@ pub mod bridging {
];

/// Universal aliases
pub UniversalAliases: BTreeSet<(MultiLocation, Junction)> = BTreeSet::from_iter(
pub UniversalAliases: BTreeSet<(Location, Junction)> = BTreeSet::from_iter(
sp_std::vec![
(SiblingBridgeHubWithEthereumInboundQueueInstance::get(), GlobalConsensus(EthereumNetwork::get())),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -730,12 +730,12 @@ pub mod bridging {
/// Configure the fee to max Balance so that it is disabled.
pub const DefaultBridgeHubEthereumBaseFee: Balance = Balance::MAX;
pub storage BridgeHubEthereumBaseFee: Balance = DefaultBridgeHubEthereumBaseFee::get();
pub SiblingBridgeHubWithEthereumInboundQueueInstance: MultiLocation = MultiLocation::new(
1,
X2(
pub SiblingBridgeHubWithEthereumInboundQueueInstance: Location = Location::new(
2,
[
Parachain(SiblingBridgeHubParaId::get()),
PalletInstance(system_parachains_constants::polkadot::snowbridge::INBOUND_QUEUE_PALLET_INDEX)
)
PalletInstance(system_parachains_constants::polkadot::snowbridge::INBOUND_QUEUE_PALLET_INDEX),
],
);

/// Set up exporters configuration.
Expand All @@ -753,7 +753,7 @@ pub mod bridging {
];

/// Universal aliases
pub UniversalAliases: BTreeSet<(MultiLocation, Junction)> = BTreeSet::from_iter(
pub UniversalAliases: BTreeSet<(Location, Junction)> = BTreeSet::from_iter(
sp_std::vec![
(SiblingBridgeHubWithEthereumInboundQueueInstance::get(), GlobalConsensus(EthereumNetwork::get())),
]
Expand Down
2 changes: 2 additions & 0 deletions system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ bridge-hub-test-utils = { version = "0.8.0" }
bridge-runtime-common = { version = "0.8.0", features = ["integrity-test"] }
sp-keyring = { version = "32.0.0" }
static_assertions = { version = "1.1.0" }
snowbridge-runtime-test-common = { version = "0.1.0" }

[features]
default = [ "std" ]
Expand Down Expand Up @@ -244,6 +245,7 @@ runtime-benchmarks = [
"snowbridge-pallet-outbound-queue/runtime-benchmarks",
"snowbridge-router-primitives/runtime-benchmarks",
"snowbridge-runtime-common/runtime-benchmarks",
"snowbridge-runtime-test-common/runtime-benchmarks",
"snowbridge-pallet-system/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
Expand Down
9 changes: 4 additions & 5 deletions system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ pub mod bridge_to_polkadot_config;
mod weights;
pub mod xcm_config;

use bridge_hub_common::AggregateMessageOrigin;
use bridge_hub_common::message_queue::{AggregateMessageOrigin, NarrowOriginToSibling, ParaIdToSibling};
use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases;
use cumulus_primitives_core::ParaId;
use parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT;
use snowbridge_beacon_primitives::{Fork, ForkVersions};
use snowbridge_core::{
gwei, meth, outbound::Message, AgentId, AllowSiblingsOnly, PricingParameters, Rewards,
Expand Down Expand Up @@ -77,12 +76,12 @@ use xcm_config::{
pub use sp_runtime::BuildStorage;

use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate};
use polkadot_runtime_constants::system_parachain::{ASSET_HUB_ID, BRIDGE_HUB_ID};
use kusama_runtime_constants::{currency::EXISTENTIAL_DEPOSIT, system_parachain::{ASSET_HUB_ID, BRIDGE_HUB_ID}};

use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight};

use parachains_common::{
impls::DealWithFees, message_queue::*, AccountId, Balance, BlockNumber, Hash, Header, Nonce,
impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce,
Signature,
};

Expand Down Expand Up @@ -718,7 +717,7 @@ construct_runtime!(

// Ethereum bridge pallets.
EthereumInboundQueue: snowbridge_pallet_inbound_queue = 80,
EthereumOutboundQueue: snowbridge_pallet_inbound_queue = 81,
EthereumOutboundQueue: snowbridge_pallet_outbound_queue = 81,
EthereumBeaconClient: snowbridge_pallet_ethereum_client = 82,
EthereumSystem: snowbridge_pallet_system = 83,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use super::{
RuntimeOrigin, WeightToFee, XcmpQueue,
};
use frame_support::{
parameter_types,
parameter_types, StoragePrefixedMap,
traits::{ConstU32, Contains, Equals, Everything, Nothing},
};
use frame_system::EnsureRoot;
Expand All @@ -37,7 +37,6 @@ use parachains_common::{
};
use polkadot_parachain_primitives::primitives::Sibling;
use snowbridge_runtime_common::XcmExportFeeToSibling;
use sp_core::Get;
use sp_runtime::traits::AccountIdConversion;
use sp_std::marker::PhantomData;
use system_parachains_constants::{kusama::snowbridge::EthereumNetwork, TREASURY_PALLET_ID};
Expand Down
Loading

0 comments on commit 9ba3d6d

Please sign in to comment.