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

Snowbridge - Fix benchmarks, add fee multipler and move config to Ethereum module #252

Merged
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
198c1e9
fix benchmarks and move config to ethereum bridge config
Mar 22, 2024
ec96ff7
Add genesis config for Snowbridge
vgeddes Mar 22, 2024
c70892f
Update chain-spec-generator/src/system_parachains_specs.rs
vgeddes Mar 22, 2024
b4ac868
move runtime inits to config file
Mar 22, 2024
e8bb09c
move snowbridge config to config file
Mar 22, 2024
9114c04
fix benchmarks and move config to ethereum bridge config
Mar 22, 2024
58d8c88
move runtime inits to config file
Mar 22, 2024
d6fa40c
move snowbridge config to config file
Mar 22, 2024
92c5e46
Merge remote-tracking branch 'origin/fix-snowbridge-benchmarks' into …
Mar 22, 2024
076c9a7
bump snowfork and pallet-xcm deps
acatangiu Mar 23, 2024
c11a7f7
Merge pull request #5 from acatangiu/bump-snowfork-deps
claravanstaden Mar 23, 2024
31599af
Merge branch 'main' into fix-snowbridge-benchmarks
Mar 25, 2024
a50b119
fee multiplier changes
Mar 25, 2024
16a0ec6
update local fee
Mar 25, 2024
86dff7a
fix using polkadot config in kusama constants
Mar 25, 2024
897d272
`create_agent` benchmark fix
bkontur Mar 25, 2024
db924ea
Merge pull request #6 from bkontur/bko-fix-snowbridge-benchmarks
claravanstaden Mar 25, 2024
b72a3bb
Fresh weights for eth stuff
bkontur Mar 25, 2024
73ba2ba
benchmark helper impl for runtime
Mar 25, 2024
0241dd7
Merge remote-tracking branch 'origin/fix-snowbridge-benchmarks' into …
Mar 25, 2024
410f9c3
comment about max execution headers to keep
Mar 25, 2024
f34a2e7
Merge pull request #7 from bkontur/bko-fresh-weights
claravanstaden Mar 25, 2024
e674737
Fix `send_weth_asset_from_asset_hub_to_ethereum` test asserts
bkontur Mar 25, 2024
73c8407
Make emulated tests more resilient
vgeddes Mar 25, 2024
71bb43a
Merge pull request #9 from Snowfork/vincent/fix-snowbridge-benchmarks
vgeddes Mar 25, 2024
3671100
Merge pull request #8 from bkontur/bko-snowbridge-itests
vgeddes Mar 25, 2024
c842fca
bridge-hub-polkadot: Update tests to use RelayTreasuryPalletAccount c…
vgeddes Mar 25, 2024
9d62889
bridge-hub-kusama: Update tests to use RelayTreasuryPalletAccount con…
vgeddes Mar 25, 2024
48c69f3
rustfmt
vgeddes Mar 25, 2024
83e392c
unused import
vgeddes Mar 25, 2024
8364a2c
Merge branch 'main' into fix-snowbridge-benchmarks
claravanstaden Mar 25, 2024
1210322
update pallet-xcm version
Mar 25, 2024
51149f9
Merge branch 'main' into fix-snowbridge-benchmarks
claravanstaden Mar 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions Cargo.lock

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

10 changes: 10 additions & 0 deletions chain-spec-generator/src/system_parachains_specs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,11 @@ fn bridge_hub_polkadot_genesis(
"polkadotXcm": {
"safeXcmVersion": Some(SAFE_XCM_VERSION),
},
"ethereumSystem": bridge_hub_polkadot_runtime::EthereumSystemConfig {
para_id: id,
asset_hub_para_id: polkadot_runtime_constants::system_parachain::ASSET_HUB_ID.into(),
..Default::default()
},
// no need to pass anything to aura, in fact it will panic if we do. Session will take care
// of this. `aura: Default::default()`
})
Expand Down Expand Up @@ -461,6 +466,11 @@ fn bridge_hub_kusama_genesis(
"polkadotXcm": {
"safeXcmVersion": Some(SAFE_XCM_VERSION),
},
"ethereumSystem": bridge_hub_kusama_runtime::EthereumSystemConfig {
para_id: id,
asset_hub_para_id: kusama_runtime_constants::system_parachain::ASSET_HUB_ID.into(),
..Default::default()
},
// no need to pass anything to aura, in fact it will panic if we do. Session will take care
// of this. `aura: Default::default()`
})
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/emulated/helpers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pallet-message-queue = { version = "32.0.0" }

# Polkadot
xcm = { package = "staging-xcm", version = "8.0.1" }
pallet-xcm = { version = "8.0.3" }
pallet-xcm = { version = "8.0.4" }

# Cumulus
xcm-emulator = { version = "0.6.0" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pallet-utility = { version = "29.0.0" }
# Polkadot
xcm = { package = "staging-xcm", version = "8.0.1" }
xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.1" }
pallet-xcm = { version = "8.0.3" }
pallet-xcm = { version = "8.0.4" }
runtime-common = { package = "polkadot-runtime-common", default-features = false, version = "8.0.1" }

# Cumulus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pallet-message-queue = { version = "32.0.0" }
# Polkadot
polkadot-runtime-common = { version = "8.0.1" }
xcm = { package = "staging-xcm", version = "8.0.1" }
pallet-xcm = { version = "8.0.3" }
pallet-xcm = { version = "8.0.4" }
xcm-executor = { package = "staging-xcm-executor", version = "8.0.1" }

# Cumulus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pallet-message-queue = { version = "32.0.0" }

# Polkadot
xcm = { package = "staging-xcm", version = "8.0.1" }
pallet-xcm = { version = "8.0.3" }
pallet-xcm = { version = "8.0.4" }
xcm-executor = { package = "staging-xcm-executor", version = "8.0.1" }

# Cumulus
Expand All @@ -46,8 +46,8 @@ system-parachains-constants = { path = "../../../../../system-parachains/constan

# Snowbridge
snowbridge-beacon-primitives = { version = "0.1.0" }
snowbridge-core = { version = "0.1.0" }
snowbridge-core = { version = "0.1.1" }
snowbridge-router-primitives = { version = "0.1.0" }
snowbridge-pallet-system = { version = "0.1.0" }
snowbridge-pallet-outbound-queue = { version = "0.1.0" }
snowbridge-pallet-system = { version = "0.1.1" }
snowbridge-pallet-outbound-queue = { version = "0.1.1" }
snowbridge-pallet-inbound-queue-fixtures = { version = "0.9.0" }
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ use asset_hub_kusama_runtime::xcm_config::bridging::to_ethereum::{
};
use bp_bridge_hub_kusama::snowbridge::CreateAssetCall;
use bridge_hub_kusama_runtime::{
EthereumBeaconClient, EthereumGatewayAddress, EthereumInboundQueue, Runtime, RuntimeOrigin,
bridge_to_ethereum_config::EthereumGatewayAddress, EthereumBeaconClient, EthereumInboundQueue,
Runtime, RuntimeOrigin,
};
use codec::{Decode, Encode};
use emulated_integration_tests_common::xcm_emulator::ConvertLocation;
Expand Down Expand Up @@ -469,6 +470,7 @@ fn send_weth_asset_from_asset_hub_to_ethereum() {
local: (1 * UNITS / 100).into(), // 0.01 KSM
remote: meth(1),
},
multiplier: FixedU128::from_rational(1, 1),
}
)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pallet-message-queue = { version = "32.0.0" }

# Polkadot
xcm = { package = "staging-xcm", version = "8.0.1" }
pallet-xcm = { version = "8.0.3" }
pallet-xcm = { version = "8.0.4" }
xcm-executor = { package = "staging-xcm-executor", version = "8.0.1" }

# Cumulus
Expand All @@ -46,8 +46,8 @@ system-parachains-constants = { path = "../../../../../system-parachains/constan

# Snowbridge
snowbridge-beacon-primitives = { version = "0.1.0" }
snowbridge-core = { version = "0.1.0" }
snowbridge-core = { version = "0.1.1" }
snowbridge-router-primitives = { version = "0.1.0" }
snowbridge-pallet-system = { version = "0.1.0" }
snowbridge-pallet-outbound-queue = { version = "0.1.0" }
snowbridge-pallet-system = { version = "0.1.1" }
snowbridge-pallet-outbound-queue = { version = "0.1.1" }
snowbridge-pallet-inbound-queue-fixtures = { version = "0.9.0" }
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ use asset_hub_polkadot_runtime::xcm_config::bridging::to_ethereum::{
};
use bp_bridge_hub_polkadot::snowbridge::CreateAssetCall;
use bridge_hub_polkadot_runtime::{
EthereumBeaconClient, EthereumGatewayAddress, EthereumInboundQueue, Runtime, RuntimeOrigin,
bridge_to_ethereum_config::EthereumGatewayAddress, EthereumBeaconClient, EthereumInboundQueue,
Runtime, RuntimeOrigin,
};
use codec::{Decode, Encode};
use emulated_integration_tests_common::xcm_emulator::ConvertLocation;
Expand Down Expand Up @@ -469,6 +470,7 @@ fn send_weth_asset_from_asset_hub_to_ethereum() {
local: (1 * UNITS / 100).into(), // 0.01 DOT
remote: meth(1),
},
multiplier: FixedU128::from_rational(1, 1),
}
)
);
Expand Down
2 changes: 1 addition & 1 deletion relay/kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ pallet-treasury = { default-features = false , version = "28.0.0" }
pallet-utility = { default-features = false , version = "29.0.0" }
pallet-vesting = { default-features = false , version = "29.0.0" }
pallet-whitelist = { default-features = false , version = "28.0.0" }
pallet-xcm = { default-features = false , version = "8.0.3" }
pallet-xcm = { default-features = false, version = "8.0.4" }
pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.2" }
frame-election-provider-support = { default-features = false , version = "29.0.0" }

Expand Down
2 changes: 1 addition & 1 deletion relay/polkadot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ pallet-whitelist = { default-features = false , version = "28.0.0" }
pallet-vesting = { default-features = false , version = "29.0.0" }
pallet-utility = { default-features = false , version = "29.0.0" }
frame-election-provider-support = { default-features = false , version = "29.0.0" }
pallet-xcm = { default-features = false, version = "8.0.3" }
pallet-xcm = { default-features = false, version = "8.0.4" }
pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.2" }

frame-benchmarking = { default-features = false, optional = true , version = "29.0.0" }
Expand Down
2 changes: 1 addition & 1 deletion system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ sp-weights = { default-features = false, version = "28.0.0" }
primitive-types = { version = "0.12.2", default-features = false, features = ["codec", "scale-info", "num-traits"] }

# Polkadot
pallet-xcm = { default-features = false, version = "8.0.3" }
pallet-xcm = { default-features = false, version = "8.0.4" }
pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.2" }
polkadot-core-primitives = { default-features = false, version = "8.0.0" }
polkadot-parachain-primitives = { default-features = false, version = "7.0.0" }
Expand Down
2 changes: 1 addition & 1 deletion system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ sp-weights = { default-features = false, version = "28.0.0" }
primitive-types = { version = "0.12.2", default-features = false, features = ["codec", "scale-info", "num-traits"] }

# Polkadot
pallet-xcm = { default-features = false, version = "8.0.3" }
pallet-xcm = { default-features = false, version = "8.0.4" }
pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.2" }
polkadot-core-primitives = { default-features = false, version = "8.0.0" }
polkadot-parachain-primitives = { default-features = false, version = "7.0.0" }
Expand Down
14 changes: 7 additions & 7 deletions system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ sp-transaction-pool = { default-features = false, version = "27.0.0" }
sp-version = { default-features = false, version = "30.0.0" }

# Polkadot
pallet-xcm = { default-features = false, version = "8.0.3" }
pallet-xcm = { default-features = false, version = "8.0.4" }
pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.2" }
polkadot-core-primitives = { default-features = false, version = "8.0.0" }
polkadot-parachain-primitives = { default-features = false, version = "7.0.0" }
Expand Down Expand Up @@ -103,13 +103,13 @@ pallet-xcm-bridge-hub = { default-features = false , version = "0.3.0" }

# Ethereum Bridge (Snowbridge)
snowbridge-beacon-primitives = { default-features = false , version = "0.1.0" }
snowbridge-pallet-system = { default-features = false , version = "0.1.0" }
snowbridge-pallet-system = { default-features = false , version = "0.1.1" }
snowbridge-system-runtime-api = { default-features = false , version = "0.1.0" }
snowbridge-core = { default-features = false , version = "0.1.0" }
snowbridge-pallet-ethereum-client = { default-features = false , version = "0.1.0" }
snowbridge-pallet-inbound-queue = { default-features = false , version = "0.1.0" }
snowbridge-pallet-outbound-queue = { default-features = false , version = "0.1.0" }
snowbridge-outbound-queue-runtime-api = { default-features = false , version = "0.1.0" }
snowbridge-core = { default-features = false , version = "0.1.1" }
snowbridge-pallet-ethereum-client = { default-features = false , version = "0.1.1" }
snowbridge-pallet-inbound-queue = { default-features = false , version = "0.1.1" }
snowbridge-pallet-outbound-queue = { default-features = false , version = "0.1.1" }
snowbridge-outbound-queue-runtime-api = { default-features = false , version = "0.1.1" }
snowbridge-router-primitives = { default-features = false , version = "0.1.0" }
snowbridge-runtime-common = { default-features = false, version = "0.1.0" }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ system-parachains-constants = { path = "../../../constants", default-features =
bp-bridge-hub-cumulus = { default-features = false , version = "0.8.0" }
bp-runtime = { default-features = false , version = "0.8.0" }
bp-messages = { default-features = false , version = "0.8.0" }
snowbridge-core = { default-features = false , version = "0.1.0" }
snowbridge-core = { default-features = false , version = "0.1.1" }

# Substrate Based Dependencies
frame-support = { default-features = false, version = "29.0.0" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ pub mod snowbridge {
local: 1,
// Reward for submitting a message to the Gateway contract on Ethereum
remote: U256::one(),
}
},
// Safety factor to cover unfavourable fluctuations in the ETH/DOT exchange rate.
multiplier: FixedU128::from_rational(1, 1),
};
/// Network and location for the Ethereum chain. On Kusama, the Ethereum chain bridged
/// to is the Ethereum Main network, with chain ID 1.
Expand Down
Loading
Loading