Plugin & Shell: improve filter_state initialization
Context
Since the shell uses the new protocol mempool (!6749 (merged)), we need to call both Proto.Mempool.init
and Proto.begin_validation
in prevalidation.ml
, even though both functions do almost the same thing. This is because several functions in the mempool plugin expect a validation_state
, which otherwise isn't useful anymore in the new mempool.
This MR reworks the mempool plugin functions so that they don't require a validation_state
anymore, allowing us to finally remove the Proto.begin_validation
from prevalidation.ml
.
This MR also does some preliminary refactoring in prevalidator_internal.ml
and prevalidation.ml
to reduce the scope of the interface with the plugin and make the aforementioned changes easier.
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) - [N/A] Document any change to the user interface, including configuration parameters (see node configuration)
-
Provide automatic testing (see the testing guide). - [N/A] For new features and bug fixes, add an item in the appropriate changelog (
docs/protocols/alpha.rst
for the protocol and the environment,CHANGES.rst
at the root of the repository for everything else). -
Select suitable reviewers using the Reviewers
field below. -
Select as Assignee
the next person who should take action on that MR
Edited by Diane Gallois-Wong