-
Notifications
You must be signed in to change notification settings - Fork 106
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
Snowbridge - Fix benchmarks, add fee multipler and move config to Ethereum module #252
Conversation
system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_config.rs
Show resolved
Hide resolved
Co-authored-by: Branislav Kontur <[email protected]>
system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_ethereum_config.rs
Outdated
Show resolved
Hide resolved
system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_config.rs
Outdated
Show resolved
Hide resolved
…fix-snowbridge-benchmarks
snowbridge-core v0.1.0 -> v0.1.1 snowbridge-outbound-queue-runtime-api v0.1.0 -> v0.1.1 snowbridge-pallet-ethereum-client v0.1.0 -> v0.1.1 snowbridge-pallet-inbound-queue v0.1.0 -> v0.1.1 snowbridge-pallet-outbound-queue v0.1.0 -> v0.1.1 snowbridge-pallet-system v0.1.0 -> v0.1.1 pallet-xcm v8.0.3 -> v8.0.4
Snowfork#5 for bringing in latest fixes |
bump snowfork and pallet-xcm deps
# Conflicts: # integration-tests/emulated/tests/assets/asset-hub-kusama/Cargo.toml
@bkontur @acatangiu I just need to fix the failing bridge-hub-kusama integration test quick before we merge. |
system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_config.rs
Outdated
Show resolved
Hide resolved
system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_ethereum_config.rs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, left a few nits/remarks.
>; | ||
type WeightToFee = WeightToFee; | ||
type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>; | ||
type MaxMessageSize = ConstU32<2048>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Magic number? At least some docs/comment about the reasoning would be good.
type Hashing = Keccak256; | ||
type MessageQueue = MessageQueue; | ||
type Decimals = ConstU8<12>; | ||
type MaxMessagePayloadSize = ConstU32<2048>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this has to be the same as the MaxMessageSize
, maybe a constant would be good?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely agree that the magic numbers needs to be hoisted into documented constants. Though MaxMessagePayloadSize
does have a different purpose to snowbridge_pallet_inbound_queue::MaxMessageSize
.
- inbound_queue::MaxMessageSize: Worst case message size (including proofs), used as a pricing parameter to ultimately determine bridging fees on the Ethereum side of the bridge.
- outbound_queue::MaxMessagePayloadSize: Maximum allowed size of encoded message payload that is committed for delivery to Ethereum
type MessageQueue = MessageQueue; | ||
type Decimals = ConstU8<12>; | ||
type MaxMessagePayloadSize = ConstU32<2048>; | ||
type MaxMessagesPerBlock = ConstU32<32>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another magic number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, we should make this a documented comment. MaxMessagesPerBlock
refers to the maximum number of outbound messages to Ethereum that can be committed per block.
system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_ethereum_config.rs
Show resolved
Hide resolved
…fix-snowbridge-benchmarks
Fresh weights for Ethereum pallets
@claravanstaden tests are now failing. Are you working on fixing this? |
@claravanstaden @vgeddes my guess is that, these fee amounts here and here are weight-dependent, I would maybe remove those amount checks e.g. (But checking locally, if it is about that) |
About to push a fix, just waiting on tests to run.. |
here is my suggestion with working tests: Snowfork#8 |
We dont have a CI check for benchmarks? We have some on the SDK, should probably have them here as well. |
|
Make emulated tests more resilient
Fix `send_weth_asset_from_asset_hub_to_ethereum` test asserts
@vgeddes please run |
/merge |
Enabled Available commands
For more information see the documentation |
migration CI jobs were automatically cancelled for no apparent reason 🤷 let's see if it goes ahead with the merge or needs manual intervention from some gh polkadot-fellows org member |
bc9491d
into
polkadot-fellows:main
The Snowbridge Inbound Queue pallet benchmarks are failing:
This PR fixes the error (the Ethereum gateway contract address should be set in the benchmarks since it is verified in the inbound queue when a message is submitted) and moves the benchmark config into
bridge_to_ethereum_config.rs
.