Proto: implement the validation of anonymous operations
Context
This MR is part of the %Pipelining project and follows the work started in !5557 (merged). This MR adds the validation of anonymous (double signing denunciation, account activation, seed_nonce and VDF revelation) operation.
Like !5557 (merged) this MR is mainly about refactoring some code from apply.ml and move it to validate_operation.ml. Each operation kind is handle in a single commit to ease the review.
Manually testing the MR
Check that the CI is green, and integration test can be manually run with the following commands to check the newly added or updated tests.
For Activate_account operation kind:
dune exec src/proto_alpha/lib_protocol/test/integration/operations/main.exe -- test "^activation$"
For Seed_nonce_revelation and Vdf_revelation operations kind:
dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe -- test "seed";
For Double_endorsement_evidence, Double_preendorsement_evidence and Double_baking_evidence operations kind:
dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe -- test "double";
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR