Add tool to check the safety of the network
Context
Closes #6300 (closed).
Manually testing the MR
dune build devtools/testnet_experiment_tools
./_build/default/devtools/testnet_experiment_tools/safety_checker.exe check \
--data-dir <data_dir> \
--protocol <protocol> \
--min-unsafe-round <min_unsafe_round> \
--max-maybe-unsafe-ratio <max_maybe_unsafe_ratio> \
--min-maybe-unsafe-round <min_maybe_unsafe_round>
<data-dir> - directory where the node context is stored
<protocol> - the protocol used for the network
<min-unsafe-round> - all blocks are required to have round less than it
<max-maybe-unsafe-ratio> - no more than this percentage of blocks should have at least [min-maybe-unsafe-round] round
<min-maybe-unsafe-round> - limit the number of blocks with at least this round
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
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
Edited by Gabriel Moise