-
Notifications
You must be signed in to change notification settings - Fork 80
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 --set-high-watermark and --remove-high-watermark to watermark-repair subcommand #912
Conversation
…ir subcommand Acceptance tests
.parallel() | ||
.forEach( | ||
validator -> | ||
jdbi.useTransaction(h -> setLowWatermark(h, validator, lowWatermarkDao))); |
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.
Note, if the low watermark conflicts with the high watermark, this fails fast (on the first validator). This might seem like different behaviour when compared to the slashing import, which fails per validator.
However, since we're updating all validators to the same low watermark, they should all fail anyway so this is fine.
Carried out some end to end performance testing and can see negligible difference to loading, signing and importing when using high watermark feature. I have not tested pruning. I did several runs and am showing the worst case from each. 1. Importing slashing data: 1 block + 1 attestation for 100K validators
2. Update low watermark for 100K validators
3.
4. Custom AT to load and sign 1 block + 1 attestation for 10000 validators
|
...ptance-tests/src/test/java/tech/pegasys/web3signer/dsl/signer/WatermarkRepairParameters.java
Show resolved
Hide resolved
...sts/src/test/java/tech/pegasys/web3signer/tests/WatermarkRepairSubCommandAcceptanceTest.java
Show resolved
Hide resolved
assertThat(validator1.get("target_epoch")).isEqualTo(BigDecimal.valueOf(6)); | ||
|
||
// validator2 is not imported due to high watermark | ||
assertThat( |
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.
This is only checking that the watermarks didn't get updated. We should check that signed attestations and blocks data are not updated
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.
done
Final part of #696
Set high watermark:
web3signer --config-file=config.yaml eth2 watermark-repair --epoch=1 --slot=3 --set-high-watermark
Remove high watermark:
web3signer --config-file=config.yaml eth2 watermark-repair --remove-high-watermark
Set low watermark remains as:
web3signer --config-file=config.yaml eth2 watermark-repair --epoch=1 --slot=3
but this is also valid:
web3signer --config-file=config.yaml eth2 watermark-repair --epoch=1 --slot=3 --set-high-watermark=false
Documentation
doc-change-required
label to this PR if updates are required.Changelog
Testing