-
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
feat: Remove stale validator keys during reload #1054
feat: Remove stale validator keys during reload #1054
Conversation
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, just the one comment below
signing/src/main/java/tech/pegasys/web3signer/signing/config/DefaultArtifactSignerProvider.java
Outdated
Show resolved
Hide resolved
signing/src/main/java/tech/pegasys/web3signer/signing/config/DefaultArtifactSignerProvider.java
Outdated
Show resolved
Hide resolved
...src/main/java/tech/pegasys/web3signer/slashingprotection/PostLoadingValidatorsProcessor.java
Outdated
Show resolved
Hide resolved
…ng logic to avoid clearing the map. Also made sure maps are thread-safe by using concurrent maps
CHANGELOG.md
Outdated
The reload API call will remove all in-memory keys before loading them again using configuration files and bulk loading. | ||
This unfortunately results in behaviour change of local configuration files pointing to encrypted keystores. Previously | ||
cached local configuration files were avoided being reloaded during reload API call, now they will be reloaded and | ||
reparsed. To keep the old behavior `--reload-keep-stale-keys=true` option can be used which will not remove stale keys | ||
during reload API call. |
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.
Is this still true after the latest changes?
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.
The wording need to change a bit, but we are still loading all the local keystores during the reload because otherwise we won't be able to figure out which keystores are removed. Let me go through the local keystores logic again.
signing/src/main/java/tech/pegasys/web3signer/signing/config/DefaultArtifactSignerProvider.java
Show resolved
Hide resolved
@@ -45,216 +47,204 @@ | |||
import org.apache.logging.log4j.LogManager; | |||
import org.apache.logging.log4j.Logger; | |||
|
|||
/** | |||
* The SignerLoaded loads the metadata files and converts them to ArtifactSigners. This class keeps |
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.
* The SignerLoaded loads the metadata files and converts them to ArtifactSigners. This class keeps | |
* The SignerLoader loads the metadata files and converts them to ArtifactSigners. This class keeps |
PR Description
Remove stale validator keys during reload API call. The stale keys will not be listed in public keys API call after reload. They are also disabled in slashing database in eth2 mode.
Fixed Issue(s)
Fixes #1018
Documentation
doc-change-required
label to this PR if updates are required.Changelog
Testing