-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Ensure extrinsics in the XCM pallet check for a configurable origin #6442
Comments
Add new associated type, AdminOrigin, bounded by EnsureOrigin trait in XCM-pallet config. Replace ensure_root() with ensure_origin(). Use EnsureRoot<AccountId> in all implementations of XCM pallet to preserve the current behavior until Gov2 specific origins are implemented.
Hi @KiChjang, can you take a look at the PR which I made for this issue? |
This is not meant to be worked on just yet; it's an issued filed specifically for XCM v3. |
Ok, it wasn't obvious for me. I just saw an "easy" tag and thought it was a good issue to start with :) I'll close the PR then. |
Since XCM v3 has just merged, this is free to be worked upon again. |
Rebase against XCMv3 changes. Add new associated type, AdminOrigin, bounded by EnsureOrigin trait in XCM-pallet config. Replace ensure_root() with ensure_origin(). Use EnsureRoot<AccountId> in all implementations of XCM pallet to preserve the current behavior until Gov2 specific origins are implemented.
Rebase against XCM v3 changes. Add new associated type, AdminOrigin, bounded by EnsureOrigin trait in XCM-pallet config. Replace ensure_root() with ensure_origin(). Use EnsureRoot<AccountId> in all implementations of XCM pallet to preserve the current behavior until Gov2 specific origins are implemented.
@KiChjang, I see this issue stopped being "easy". Can I continue to work on it or should I leave it alone? |
It's simply because we've removed that label, so I can't apply it on this issue. You are welcome to work on it. |
after rebasing, there are |
I unfortunately do not have the context of what you're talking about. It is likely to be a rebasing issue. |
Rebase against XCM v3 changes. Add new associated type, AdminOrigin, bounded by EnsureOrigin trait in XCM-pallet config. Replace ensure_root() with ensure_origin(). Use EnsureRoot<AccountId> in all implementations of XCM pallet to preserve the current behavior until Gov2 specific origins are implemented.
You are right, Keith , it was a rebasing issue. I opened a new [PR] (#6632). There are two label checks which fail, I guess, I cannot fix them myself. |
Add new associated type, AdminOrigin, bounded by EnsureOrigin trait in XCM pallet. Replace ensure_root() with ensure_origin() from a EnsureOrigin trait. Set AdminOrigin as EnsureRoot<AccountId> in xcm configs.
5ae05e1 Add new associated type, AdminOrigin, bounded by EnsureOrigin trait in XCM pallet. Replace ensure_root() with ensure_origin() from a EnsureOrigin trait. Set AdminOrigin as EnsureRoot<AccountId> in xcm configs.
* Ensure for a configurable origin in XCM (#6442), cherry picked from 5ae05e1 Add new associated type, AdminOrigin, bounded by EnsureOrigin trait in XCM pallet. Replace ensure_root() with ensure_origin() from a EnsureOrigin trait. Set AdminOrigin as EnsureRoot<AccountId> in xcm configs. * cargo fmt * small stylistic change --------- Co-authored-by: serkul <[email protected]>
Fixed in #6928. |
Code patterns like the following:
are common in the XCM pallet. This is undesirable as only root can call these extrinsics. Instead, going forward, what we should do is create a new config item called
AdminOrigin
, and check for that. This will allow the origin to have its own curve in Gov2.The text was updated successfully, but these errors were encountered: