-
Notifications
You must be signed in to change notification settings - Fork 803
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
XCM: Deny barrier checks for nested XCMs with specific instructions to be executed on the local chain #7200
base: master
Are you sure you want to change the base?
Conversation
2c6325f
to
9c80770
Compare
/// Applies the `Inner` filter to the nested XCM for the `SetAppendix`, `SetErrorHandler`, and `ExecuteWithOrigin` instructions. | ||
/// | ||
/// Note: The nested XCM is checked recursively! | ||
pub struct DenyInstructionsWithXcm<Inner>(PhantomData<Inner>); |
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.
Regarding the naming, maybe we can use DenyNestedXcmInstructions
, which may be better to state clearly with nested XCMs.
/cmd fmt |
All GitHub workflows were cancelled due to failure one of the required jobs. |
/cmd fmt |
// ok | ||
assert_should_execute(vec![ClearTransactStatus], Location::parent(), Ok(())); | ||
// ok top-level contains `ClearOrigin` | ||
assert_should_execute(vec![ClearOrigin], Location::parent(), Ok(())); |
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.
DenyInstructionsWithXcm
can't reject the top level Deny
barrier. Other two approaches (#7351) can deny earlier.
Resolves (partially): #7148
Depends on: #7169
Description
For context and additional information, please refer to Problem 2 - Barrier vs nested XCM validation.
TODO
DenyInstructionsWithXcmFor
.DenyThenTry
, so we wouldn’t needDenyInstructionsWithXcm
. However, this approach wouldn’t be as general.DenyInstructionsWithXcm::Inner
for the actualmessage
, so we don’t need duplication for top-level and nested (not sure, maybe be explicit is good thing) - see Problem2 - example. Instead of this:DenyInstructionsWithXcmFor
DenyThenTry
, but at first we need to merge xcm: fix for DenyThenTry Barrier #7169 or rebase this branch on the top ofyrong:fix-for-deny-then-try