Skip to content

Feat/db migration #586

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Feat/db migration #586

wants to merge 10 commits into from

Conversation

blockchainluffy
Copy link
Contributor

@blockchainluffy blockchainluffy commented Apr 1, 2025

  • Migrations can be created in /migrations dir of the related schema
  • The PR also updates the gnosis keyper db to include pkey change for validator_registrations table
  • The PR updates blst library version 0.3.12 -> 0.3.14, to fix build issues
  • Currently only up migrations are supported

@blockchainluffy blockchainluffy self-assigned this Apr 1, 2025
@blockchainluffy blockchainluffy marked this pull request as ready for review April 1, 2025 10:02
@blockchainluffy blockchainluffy linked an issue Apr 4, 2025 that may be closed by this pull request

ALTER TABLE validator_registrations
DROP CONSTRAINT validator_registrations_pkey,
ADD PRIMARY KEY (block_number, tx_index, log_index, validator_index);
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the motivation for this change? Currently, the primary key is (block_number, tx_index, log_index). The validator registry emits one log per registration (which contains the signature), so adding the validator index does neither constrain it more or less.

Copy link
Contributor Author

@blockchainluffy blockchainluffy May 28, 2025

Choose a reason for hiding this comment

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

We need to integrate AggregateRegistrationMessage, in which more than one validators can submit signatures in a single transaction.
The above constraint was failing as it only allowed one validator index to be added in a single transaction.

@blockchainluffy
Copy link
Contributor Author

@ylembachar not merging this PR, as we might need to release it in later/separate version. Please feel free to merge it when we want to do this release.

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.

Fix issue with multiple validator registration
4 participants