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

Get rid of store adapters in signer and aggregator #2118

Open
15 tasks done
jpraynaud opened this issue Nov 15, 2024 · 0 comments
Open
15 tasks done

Get rid of store adapters in signer and aggregator #2118

jpraynaud opened this issue Nov 15, 2024 · 0 comments
Assignees
Labels
refactoring 🛠️ Code refactoring and enhancements

Comments

@jpraynaud
Copy link
Member

jpraynaud commented Nov 15, 2024

Why

We want to get rid of the remaining store adapters implementation in the signer and aggregator, and replace them with some repository implementation as for the rest of the storage in the Mithril nodes.

What

Replace the store using the legacy store adapter and replace them with a repository implementation.

How

  • Upgrade the ProtocolInitializerStore in the signer:
    • Update structure of the existing table in a migration (keep epoch and protocol initializer in the same format)
    • Implement a repository instead the store adapter
  • Upgrade the StakeStore in the signer:
    • Update structure of the existing table in a migration (do the same migration as already done in the aggregator)
    • Use this implementation for the stake store in the signer
    • Implement an deletion of all the records for the epoch before saving a new stake distribution
  • Upgrade the Pending Certificate in the aggregator:
    • Update structure of the existing table in a migration
    • Implement a repository instead the store adapter
  • Upgrade the VerificationKeyStore in the aggregator (used only for tests):
    • Migrate pruning of signer registrations in the upkeep service
    • Move tests to the implementation and remove test_verification_key_storer macro
  • Remove the store adapter from the persistence crate
  • Make a backward compatibility test to make sure that pending certificate still works for legacy signers
@jpraynaud jpraynaud added the refactoring 🛠️ Code refactoring and enhancements label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring 🛠️ Code refactoring and enhancements
Projects
None yet
Development

No branches or pull requests

2 participants