besu
besu copied to clipboard
Reimplement LivenessCheck and ReadinessCheck as plugins
Description
I noticed, while working on a plugin that required to extend the ReadinessCheck, that this check is implemented not through plugins but hardcoded as an RPC method during initialization. It would be much cleaner if these checks can be implemented as plugins, as in the future if someone needs to do something similar, it would be easier and faster to do it.
- LivenessCheck is a trivial probe to check if process is UP or DOWN
- ReadinessCheck requires 2 checks:
- Make sure that the sync is within a certain distance from the head of the chain. For this, a
numMaxBlocksBehindparameter is used to check for distance. This check could be done in the plugin version by registering anBesuEventforaddSyncStatusListener(SyncStatusListener). - Using a parameter
minPeerscheck that the number of peers connected is higher than that value. In the plugin version, I can't see a way to have access to the number of peers but this could easily be exposed byP2PService.
Acceptance Criteria
Readinees and Liveness checks are re-implemented without side effects. Both probes will be functioning the same as before but now implemented as plugins.
Should this be implemented inside the plugins directory, with a new sub-directory called health-checks, or can they go inside the existing rocksdb directory?
IMO, we should go with a sub-directory inside plugins. health should be enough as a name.
I'm interested in the issue. Can I take it on ?
I'm interested in the issue. Can I take it on ?
Yes all yours
@marianakibuuka any progress on this one?
@macfarla @lu-pinto I would like to work on this issue. Can get it assigned.
yes please... take it on.. Thanks
On Fri, Jun 20, 2025 at 12:17 PM Jevin Jojo @.***> wrote:
jevinjojo left a comment (hyperledger/besu#7704) https://github.com/hyperledger/besu/issues/7704#issuecomment-2990424143
@macfarla https://github.com/macfarla I would like to work on this issue. Can get it assigned.
— Reply to this email directly, view it on GitHub https://github.com/hyperledger/besu/issues/7704#issuecomment-2990424143, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4I2VSXRWFWI6C6XDJRWHBD3EPGTRAVCNFSM6AAAAABPFSFLBWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSOJQGQZDIMJUGM . You are receiving this because you were mentioned.Message ID: @.***>