Skip to content

[P3] Small cleanups in metrics.go, evnode and evm clients #51

Closed

Description

@auricom

Priority: P3 (refactor) · Effort: S

Small cleanups:

  • pkg/metrics/metrics.go: key lastSubmissionDurations by struct{chainID, typ string} instead of "a:b" plus strings.Split. Moot if option A of the submission-duration issue is chosen.
  • RecordSubmissionDaHeight: collapse the duplicated header and data branches into a map[string]uint64.
  • internal/clients/evnode/client.go: delete the unused GetState and GetGenesisDaHeight.
  • internal/clients/evm/client.go:76: the JSON-RPC duration is measured before io.ReadAll, which contradicts the comment at line 78. Move time.Since(startTime) after the read, and also check for a JSON-RPC error field in the response body.
  • RecordSubmissionAttempt runs once per block on its final outcome, not once per RPC attempt. Rename or clarify it in the README.

Activity

  1. auricom commented on Oct 20, 2026

    @auricom
    CollaboratorAuthor

    Status after #58: the verifier no longer calls evnode.GetBlock directly (only GetBlockWithBlobs, which uses it internally). GetState and GetGenesisDaHeight are still unused. The other items are unchanged.

  2. auricom commented on Oct 20, 2026

    @auricom
    CollaboratorAuthor

    Status after #57–#59:

  3. added 2 commits that reference this issue on Oct 20, 2026
    64d230b
    1e45bfe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions