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

OpenGov Call + Preimage data migration and integrity #7577

Open
4 tasks
bkontur opened this issue Feb 14, 2025 · 0 comments
Open
4 tasks

OpenGov Call + Preimage data migration and integrity #7577

bkontur opened this issue Feb 14, 2025 · 0 comments

Comments

@bkontur
Copy link
Contributor

bkontur commented Feb 14, 2025

  • To migrate the calls of ongoing referenda from RC to AH. Needs to consider the fact that some calls might be provided not inline and instead via a preimage.
  • Needs to provide tests to ensure proposals dispatch/execute in the same manner.

To be very pedantic, we can dispatch all proposals pre-migration and post-migration, and inspect the 1. state diff 2. dispatch result. Ideally all would match.

This approach need not be exhaustive. We may let some proposals that are hard to identify, decode, and migrate remain in the RC, and organically fail. Of course, this is not preferred, as for a proposal that has already passed, now it would have to re-gain its approval.

My (@kianenigma) opinion is that we can let most proposals fail as above, and do offchain coordination to help people re-create the same proposals.

In fact, I am not sure what to do about proposals which are only submitted as a hash, but the full call data is not revealed yet.

Other questions, hints

  • When we migrate governance to AssetHub, existing preimages/referenda might contain calls to pallet_xcm::send(child_parachain). If these calls are migrated to AssetHub, they will fail because AssetHub cannot send to Location { parent: 0 }.
    • One option is to change Location { parent: 0 } to Location { parent: 1 }, but it's unclear if this is possible since preimages are stored as BoundedVec. Can we modify the decoding to achieve this?
    • Alternatively, we can introduce another XcmRouter as a wrapper over XcmpQueue, which rewrites (0, [Parachain(id)]) to (1, [Parachain(id)]). Another option is to modify XcmpQueue itself to support both (1, [Parachain(id)]) and (0, [Parachain(id)]), which should work.
      • The only potential issue is routing directly to AssetHub, which is currently Here instead of (0, [Parachain(1000)]). However, this can also be addressed using XcmRouters.
  • The same applies to preimages/referenda that should be executed on the relay chain, likely for all calls that do not start with pallet_xcm::send(. There are multiple ways to handle these, depending on where the call is supposed to be executed:
    • If the call should be executed on the relay chain (e.g., calls to the paras pallet, which remains on the relay chain), we might need to wrap them with pallet_xcm::send(Parent, ...) ?
    • If the call should be executed on migrated AssetHub pallets, how do we ensure the correct pallet_index for these migrated pallets? Should we modify the calls accordingly?
@kianenigma kianenigma added this to AHM Oct 22, 2024
@bkontur bkontur converted this from a draft issue Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant