Skip to content
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

Denylist reload #101

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
merge main
Signed-off-by: Sally MacFarlane <[email protected]>
macfarla committed Oct 14, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 0414f94d5b88c6bd57c2ee3acf84a299153a1e11
Original file line number Diff line number Diff line change
@@ -127,4 +127,10 @@ public CompletableFuture<Void> reloadConfiguration() {
loadDenyListAndRegisterPluginTxValidatorFactory();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

need to look at rejectedTxJsonRpcManager - may need to do something different with that re start/stop lifecycle

Copy link
Contributor

Choose a reason for hiding this comment

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

factory field in TransactionPoolValidatorServiceImpl is not volatile so the change could not be seen immediately by all thread, said that I prefer that the registration is done one, and the reload only updates the deny list, so for example restricting the moving pieces to a wrap of the deny list in a mutable container that is set at startup and updated on every reload, without having to redo all the initialization of the plugin

return CompletableFuture.completedFuture(null);
}

@Override
public void stop() {
super.stop();
rejectedTxJsonRpcManager.ifPresent(JsonRpcManager::shutdown);
}
}
You are viewing a condensed version of this merge commit. You can view the full changes here.