-
Notifications
You must be signed in to change notification settings - Fork 17
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
base: main
Are you sure you want to change the base?
Feat/db migration #586
Conversation
rolling-shutter/keyperimpl/gnosis/database/sql/migrations/V2_validatorRegistrations.sql
Outdated
Show resolved
Hide resolved
eb93d11
to
34e270f
Compare
|
||
ALTER TABLE validator_registrations | ||
DROP CONSTRAINT validator_registrations_pkey, | ||
ADD PRIMARY KEY (block_number, tx_index, log_index, validator_index); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Co-authored-by: jannikluhn <jannik@brainbot.com>
Co-authored-by: jannikluhn <jannik@brainbot.com>
@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. |
/migrations
dir of the related schemavalidator_registrations
table