Proto_plugin/RPC: Add is_forbidden RPC for delegates
What
Delegates can be forbidden from participating in the consensus if they misbehave (double (pre)attest/bake). This MR provides an RPC for them to check their forbidden status.
Closes #7046 (closed)
Why
Improve UX for bakers
How
By adding an RPC to the protocol plugin. This allows for the RPC to be upgradable with octez and to be released with the next release of octez without having to wait for the next protocol amendment.
Manually testing the MR
- Run a node
- Observe bootstrap delegates accounts are not forbidden using the RPC
/chains/main/blocks/head/context/delegates/<pkh>/is_forbidden
- Double bake with a delegate
- Denunce the double baking
- Observe the new forbidden status of the delegate
🎉
To ease this, I added a check in tezt/tests/adaptive_issuance.ml to ensure the double baking delegate (already used in the scenario) is forbidden right after the denunciation (using the newly introduced RPC).
running dune exec tezt/tests/main.exe -- --file adaptive_issuance.ml should run the test.
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 Mathias Bourgoin