-
Notifications
You must be signed in to change notification settings - Fork 19
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
base: main
Are you sure you want to change the base?
Denylist reload #101
Conversation
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
log.info( | ||
"Registering Linea plugin of type {} with name {}", | ||
this.getClass().getName(), | ||
this.getName()); |
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.
if plugin name == class name this extra logging may not be useful
@@ -124,6 +122,12 @@ public void start() { | |||
} | |||
} | |||
|
|||
@Override | |||
public CompletableFuture<Void> reloadConfiguration() { | |||
loadDenyListAndRegisterPluginTxValidatorFactory(); |
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.
need to look at rejectedTxJsonRpcManager - may need to do something different with that re start/stop lifecycle
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.
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
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.
Nice to learn that we already have a way to trigger a reload of the plugin conf.
Shared a comment with my view on how the conf reload should only touch the deny list
@@ -124,6 +122,12 @@ public void start() { | |||
} | |||
} | |||
|
|||
@Override | |||
public CompletableFuture<Void> reloadConfiguration() { | |||
loadDenyListAndRegisterPluginTxValidatorFactory(); |
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.
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
Signed-off-by: Sally MacFarlane <[email protected]>
allow config reload for LineaTransactionPoolValidatorPlugin.
Simplest possible implementation with no optimization.
Built on top of #99