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.

image

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.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR

Merge request reports

Loading