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

[ADP-3212] DB migration of delegation store to support voting state #4428

Merged
merged 6 commits into from
Feb 7, 2024

Conversation

paolino
Copy link
Collaborator

@paolino paolino commented Feb 2, 2024

  • Refactor the Delegations migrations modules to better track history in a Migrations namespace
    - V2: only contain the historical schema
    - V3: contains the migration from V2 to V3 schema and the V3 schema itself (Lean introduction)
    - V5: contains the migration from V3 to V5 (Conway changes)
    - V5 schema takes place of V3 schema at top level
  • Update the schema by updating the types of delegation state and adding a nullable column to store a DRep
  • Archive V3 (Lean) delegation schema so that migrations from and to it will be using the old code forever (almost)
  • Move database delegation types inside the Store.Delegations namespace

ADP-3212

@paolino paolino self-assigned this Feb 2, 2024
@paolino paolino force-pushed the paolino/ADP-3212/delegation-db-migration branch 2 times, most recently from c4b3770 to 9ba8744 Compare February 2, 2024 19:09
Copy link
Contributor

@HeinrichApfelmus HeinrichApfelmus left a comment

Choose a reason for hiding this comment

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

Thanks! 😊 A couple of suggestions.

One suggestion up for debate: I think it makes sense to rename "active" to "delegating" in order to better disambiguate it from the new "voting" status. 🤔 This would require a migration of the values in the existing table, but with the new migration scheme, I think that we can afford that.

@paweljakubas paweljakubas force-pushed the paweljakubas/ADP-3212/voting-primitives branch from 5f1bc71 to b3fc551 Compare February 5, 2024 12:27
Base automatically changed from paweljakubas/ADP-3212/voting-primitives to master February 5, 2024 16:51
@paolino paolino force-pushed the paolino/ADP-3212/delegation-db-migration branch 2 times, most recently from 105430b to 02a631e Compare February 6, 2024 09:35
@paolino paolino force-pushed the paolino/ADP-3212/delegation-db-migration branch from 02a631e to 92b1cc1 Compare February 6, 2024 12:11
@paolino paolino marked this pull request as ready for review February 6, 2024 12:12
@paolino paolino force-pushed the paolino/ADP-3212/delegation-db-migration branch from 92b1cc1 to dcca782 Compare February 6, 2024 12:15
@paolino paolino force-pushed the paolino/ADP-3212/delegation-db-migration branch from 2f84117 to fe3af5f Compare February 6, 2024 17:35
Copy link
Contributor

@HeinrichApfelmus HeinrichApfelmus left a comment

Choose a reason for hiding this comment

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

Excellent, thank you for the unit test! 😊 Ready to go in my opinion.

@paolino paolino added this pull request to the merge queue Feb 7, 2024
Merged via the queue into master with commit bfd1cb3 Feb 7, 2024
3 checks passed
@paolino paolino deleted the paolino/ADP-3212/delegation-db-migration branch February 7, 2024 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants