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

pallet-domains storage migration for "Private EVM" #3360

Merged
merged 2 commits into from
Feb 19, 2025

Conversation

teor2345
Copy link
Member

@teor2345 teor2345 commented Jan 28, 2025

TODO

How to review this PR

This PR is part of a series of PRs which add "private EVM" functionality to subspace. It upgrades the existing storage formats for this feature.

The Taurus EVM and AutoId domains need this upgrade. Mainnet doesn't need an upgrade at this time, because it doesn't have any EVM or AutoId domains deployed. But doing the upgrade on mainnet is harmless, because it won't find any EVM/AutoId domains, and therefore won't change anything.

What it does

This PR upgrades the domain registry storage into a new format which stores the EVM type and initial contract creation allow list. (Or the AutoId domain config, which is currently empty.)

Code contributor checklist:

@teor2345 teor2345 added execution Subspace execution breaking-runtime This PR introduces breaking changes to the runtime labels Jan 28, 2025
@teor2345 teor2345 self-assigned this Jan 28, 2025
@teor2345 teor2345 changed the title Taurus migration for "Private EVM" Taurus storage migration for "Private EVM" Jan 28, 2025
@teor2345 teor2345 force-pushed the private-evm-taurus-migration branch from 29655a9 to a425f09 Compare January 28, 2025 21:57
@teor2345 teor2345 force-pushed the private-evm branch 2 times, most recently from ee8c646 to eb4e295 Compare February 4, 2025 02:37
@teor2345 teor2345 force-pushed the private-evm-taurus-migration branch from a425f09 to 8fa2e15 Compare February 4, 2025 02:52
Copy link
Member Author

@teor2345 teor2345 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is up to date, but the diff will be a bit confusing until #3350 merges, and we merge those changes into the taurus-runtime-upgrades

Base automatically changed from private-evm to main February 4, 2025 21:53
@teor2345 teor2345 force-pushed the private-evm-taurus-migration branch from a1a70ee to eb2daee Compare February 5, 2025 05:25
@teor2345 teor2345 changed the base branch from main to evm-obj-minor-cleanups February 5, 2025 05:26
@teor2345 teor2345 force-pushed the evm-obj-minor-cleanups branch from f70a549 to c0aa066 Compare February 6, 2025 03:09
Base automatically changed from evm-obj-minor-cleanups to main February 10, 2025 05:02
@vedhavyas
Copy link
Member

I had a conversation with @dariolina today here is what I have proposed.

Having these migrations specific to taurus defeats the whole purpose of having versioned migrations. We only want the spec_versions to be different from taurus and mainnet for both Consensus and Domains. So whenever we want to upgrade taurus, we can create a temporary branch that just updates the spec_versions.

The rest of the versions such as StorageVersions, Api versions would be part of the main branch.
Since the storage versions of pallet-domains are different in mainnet and taurus, we need to update the domains storage version to latest it needs to be on main and also add these migrations that will be only run taurus.

This will ensure we always write necessary migrations and compatibility code in main itself.

cc: @NingLin-P @teor2345

@teor2345
Copy link
Member Author

I had a conversation with @dariolina today here is what I have proposed.

Having these migrations specific to taurus defeats the whole purpose of having versioned migrations.

Yes, I agree. It also makes it harder for anyone who happens to be running another network like ours (not that there’s anyone yet, but there might be in future).

We only want the spec_versions to be different from taurus and mainnet for both Consensus and Domains. So whenever we want to upgrade taurus, we can create a temporary branch that just updates the spec_versions.

Sounds good.

The rest of the versions such as StorageVersions, Api versions would be part of the main branch. Since the storage versions of pallet-domains are different in mainnet and taurus, we need to update the domains storage version to latest it needs to be on main and also add these migrations that will be only run taurus.

Would you like this version bump as a separate PR? It seems simpler.

This will ensure we always write necessary migrations and compatibility code in main itself.

Yes, I agree, I’ve updated the TODOs on this PR.

@teor2345 teor2345 force-pushed the private-evm-taurus-migration branch from eb2daee to dbb4a8f Compare February 18, 2025 23:18
@teor2345 teor2345 marked this pull request as ready for review February 18, 2025 23:19
@teor2345 teor2345 changed the title Taurus storage migration for "Private EVM" pallet-domains storage migration for "Private EVM" Feb 18, 2025
Copy link
Member

@NingLin-P NingLin-P left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vedhavyas
Copy link
Member

Would you like this version bump as a separate PR? It seems simpler.

These changes are already in.

But would prefer if you take a moment to check current storage versions of taurus and bump them if required accordingly

@teor2345 teor2345 added this pull request to the merge queue Feb 19, 2025
@teor2345
Copy link
Member Author

Would you like this version bump as a separate PR? It seems simpler.

These changes are already in.

But would prefer if you take a moment to check current storage versions of taurus and bump them if required accordingly

pallet-domains is on version 2 in the taurus-runtime-upgrades branch, which will change to version 3 when this PR is merged into that branch (or deployed directly to Taurus).

Merged via the queue into main with commit 3622c72 Feb 19, 2025
10 checks passed
@teor2345 teor2345 deleted the private-evm-taurus-migration branch February 19, 2025 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-runtime This PR introduces breaking changes to the runtime execution Subspace execution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants