-
Notifications
You must be signed in to change notification settings - Fork 78
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
Add high watermark to slashing database #896
Conversation
- high_watermark_epoch and high_watermark_slot - CRUD operations in MetadataDao - find - update (assumes GVR metadata is already inserted) - delete
Blocked - Ready for review but won't merge this until after Holesky support is merged/released. |
.findFirst(); | ||
} | ||
|
||
public int updateHighWatermark(final Handle handle, final HighWatermark highWatermark) { |
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.
Does this need a constraint on the high watermark being height then all of the low watermarks?
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.
I didn't add anything around that because this AC simplifies it:
Web3signer operator is responsible for setting a good high-watermark that is in the future
...but: even though you could still set a HWM such that LWM < HWM < latestSignedData, it's probably not a bad (and cheap?) check to have in place. I will look into it.
...ing-protection/src/main/java/tech/pegasys/web3signer/slashingprotection/dao/MetadataDao.java
Show resolved
Hide resolved
… greater than low_watermarks
…ess than or equal to high_watermarks
…k-metadata Signed-off-by: Simon Dudley <[email protected]>
...g-protection/src/main/resources/migrations/postgresql/V00012__add_highwatermark_metadata.sql
Show resolved
Hide resolved
...g-protection/src/main/resources/migrations/postgresql/V00012__add_highwatermark_metadata.sql
Show resolved
Hide resolved
...g-protection/src/main/resources/migrations/postgresql/V00012__add_highwatermark_metadata.sql
Show resolved
Hide resolved
Tested performance with 100,000 validators:
Min: 27ms
|
No meaningful difference in time for slashing data import. This test exercises the Tested slashing data import of 100,000 validators (one block, one attestation each)
|
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.
LGTM
Signed-off-by: Simon Dudley <[email protected]>
Part of #696 (comment)
watermark-repair
Log example error when using watermark-repair violates the condition:
Log example of partially successful slashing import:
Log example of failed slashing import via key import endpoint:
Documentation
doc-change-required
label to this PR if updates are required.Changelog
Testing