Rollup node: augment health RPC with relevant data to assess if running correctly
What
This MR adds data to the rollup node /health
RPC to assess if it is currently operating correctly. This now includes:
-
degraded
to indicate if it is running in degraded mode -
l1.connection
to indicate the connection status to the L1 node ("connected"
,"reconnecting"
, or"disconnected"
) -
l1.blocks_late
for the number of blocks the rollup node needs to catch up on -
l1.last_seen_head
for the last L1 head the rollup node was made aware of -
active_workers
with a list of active workers in the rollup node -
healthy
containstrue
if all above indicators are green.
Why
This information is useful for monitoring the rollup node on a coarse grain scale.
How
This MR exposes the necessary information about workers and the L1 connection.
Manually testing the MR
Run a rollup node and issue an RPC:
curl http://localhost:8932/health
Response should look like
{
"healthy": true,
"degraded": false,
"l1": {
"connection": "connected",
"blocks_late": 0,
"last_seen_head": {
"hash": "BMCL6uQUiNn8Mm2CJoirp8K5RZ7rVuBGEog3jifLvHrpJG2fBLL",
"level": 6026061,
"timestamp": "2024-04-17T12:49:51Z"
}
},
"active_workers": [
[
"publisher",
"running"
],
[
"refutation_coordinator",
"running"
],
[
"injector (cement)",
"running"
],
[
"injector (publish, timeout, refute, execute_outbox_message)",
"running"
]
]
}
Edited by Alain Mebsout