EVM Node: Fix level-related metrics at startup
When monitoring an EVM node through its metrics, it is frequent to see the
latest and confirmed levels set to 0 on startup. This is because the metrics
were not systematically set ahead of starting the RPC server. This changeset
fixes this by (1) moving the initialization of metrics to Evm_context so that
the sequencer, observer and TE sequencer have that value correct, and (2)
fixing the logic directly for the RPC node, which does not start the
Evm_context worker.
This should allow not to see this anymore.
Manually testing the MR
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
