-
Notifications
You must be signed in to change notification settings - Fork 769
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
Ensure outbound XCMs are decodable with limits + add EnsureDecodableXcm
router (for testing purposes)
#4186
Conversation
EnsureDecodableXcm
router (for testing purposes) to ensure outbound XCMs are decodableEnsureDecodableXcm
router (for testing purposes)
Co-authored-by: Adrian Catangiu <adrian@parity.io>
fe80e39
to
f7e94f4
Compare
@@ -157,15 +155,29 @@ benchmarks_instance_pallet! { | |||
); | |||
let sender_account_balance_before = T::TransactAsset::balance(&sender_account); | |||
|
|||
// generate holding and add possible required fees |
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.
Where do you add the possible required fee?
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.
right bellow - required fees = expected_assets_in_holding
for a in expected_assets_in_holding.into_inner() {
holding.push(a);
}
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.
there was just executor.set_holding(expected_assets_in_holding
) before, which could possibly remove previously executor.set_holding(holding.clone()
/// - `depositable_count` specifies the count of assets we plan to add to the holding on top of | ||
/// those generated by the `worst_case_holding` implementation. |
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.
😄
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.
@franciscoaguirre :), any other suggestion?
…uter` (#4236) This PR: - moves `validate_xcm_nesting` from `XcmpQueue` into the `VersionedXcm` - adds `validate_xcm_nesting` to the `ParentAsUmp` - adds `validate_xcm_nesting` to the `ChildParachainRouter` Based on discussion [here](#4186 (comment)) and/or [here](#4186 (comment)) and/or [here]() ## Question/TODO - [x] To the [comment](#4186 (comment)) - Why was `validate_xcm_nesting` added just to the `XcmpQueue` router and nowhere else? What kind of problem `MAX_XCM_DECODE_DEPTH` is solving? (see [comment](#4236 (comment)))
This PR:
EnsureDecodableXcm
(testing) router that attempts to encode and decode passed XCMmessage
to ensure that the receiving side will be able to decode, at least with the same XCM version.pallet_xcm
/pallet_xcm_benchmarks
assets data generationRelates to investigation of https://substrate.stackexchange.com/questions/11288 and missing fix #2129 which did not get into the fellows 1.1.X release.
Questions/TODOs
BoundedVec exceeds its limit
Fungible asset of zero amount is not allowed
sort
to theprepend_with
as we did for reanchor here? @serban300 (created separate/follow-up PR: [xcm] Assets: sort afterprepend_with
#4235)XcmpQueue
->validate_xcm_nesting
, why not to added to theParentAsUmp
orChildParachainRouter
? @franciscoaguirre (created separate/follow-up PR: Addvalidate_xcm_nesting
to theParentAsUmp
andChildParachainRouter
#4236)SendController::send_blob
replaceVersionedXcm::<()>::decode(
withVersionedXcm::<()>::decode_with_depth_limit(MAX_XCM_DECODE_DEPTH, data)
?