Skip to content

P1: verifier scalability, DA cache, client reuse, log format, security bumps - #58

Merged
auricom merged 10 commits into
mainfrom
recur/caramel-omelet
Oct 20, 2026
Merged

auricom merged 10 commits into
mainfrom
recur/caramel-omelet

Conversation

@auricom

@auricom auricom commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

Implements the P1 issues from the optimization roadmap (#53).

Changes

Verifier (#39, #41, plus the verifier parts of #40 and #43): pkg/exporters/verifier/

Celestia per-DA-height cache (#40): internal/clients/celestia/

  • GetBlockTimestamp and GetBlobsAtHeight results are memoized per DA height (and namespace) for 2 minutes. Concurrent lookups for the same key share one in-flight fetch via singleflight.
  • Errors, "not found" and empty results are never cached.
  • One caller cancelling doesn't fail the others: the shared fetch is detached from the caller's cancellation and capped at 30s.
  • Per-block success logs are now Debug.

Drift and balance (#42): pkg/exporters/drift/, pkg/exporters/balance/, internal/clients/cosmos/

  • Clients are created once and reused. Drift closes a client and redials after an error.
  • Each RPC call has a 5s timeout.
  • Drift polls full nodes concurrently.
  • Both exporters run their first poll immediately at startup.
  • Balance: https:// consensus endpoints now use TLS (port 443 by default). Before, they silently failed because the connection was forced to plaintext.
  • Per-poll success logs are now Debug.

Log format (#43): cmd/monitor.go, pkg/exporters/jsonrpc/

  • New --log-format=console|json flag, defaulting to console. Invalid values are rejected at startup.
  • The per-scrape JSON-RPC health-check log is now Debug.

Security bumps (#54): go.mod, go.sum, Dockerfile

  • go-ethereum v1.17.0, grpc v1.83.1, x/net v0.60.0, cometbft v0.38.21 (indirect).
  • govulncheck goes from 11 reachable vulnerabilities to 1. The remaining one is GO-2026-5932 in x/crypto, which has no fix yet.
  • Go 1.26 is required because x/net v0.60.0 needs it. The Dockerfile builder image is bumped to golang:1.26-alpine to match.

Behaviour changes for operators

  • Per-block and per-poll success messages are now Debug level. Use --verbose to see them.
  • Drift and balance check once at startup instead of after the first interval.
  • Blocks missed during a WebSocket reconnect are now verified. unsubmitted_blocks_total may rise where those blocks used to be silently skipped.

Tests

  • New: the verifier with fakes (first try, retry without blocking other blocks, retries running out, cooldown re-queue, backfill gap and cap, shutdown), the Celestia cache (dedup, no caching of errors or empty results, TTL expiry, cancellation), drift with a hung node, balance failover and connection reuse, cosmos endpoint parsing, and the logger format.
  • Results:
    • go build, go vet, go test -race ./..., golangci-lint (0 issues), gofmt and go mod tidy are all clean.
  • Not done: I couldn't test the Docker build locally.

Fixes #39
Fixes #40
Fixes #41
Fixes #42
Fixes #43
Fixes #54

🤖 Generated with Claude Code

auricom and others added 10 commits October 20, 2026 12:08
…og to debug

Fixes #43

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Refs #40
Refs #43

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…e call

- Workers make one verification attempt per job and schedule retries and the
  5-minute cooldown re-queue with time.AfterFunc, so waiting on DA no longer
  holds a worker slot.
- Backfill heights missed while the WebSocket subscription was down (capped
  at the most recent 1000), without recording block time for them.
- verifyAttempt calls only GetBlockWithBlobs instead of GetBlock + GetBlockWithBlobs.
- Per-block success logs moved to Debug.
- Consumer-side interfaces for the ev-node, Celestia and EVM clients, with
  fake-backed tests.

Fixes #39
Fixes #41
Refs #40
Refs #43

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ing, TLS gRPC

Fixes #42
Refs #43

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
golang.org/x/net v0.60.0 requires go 1.26.0, so the go directive and the
Docker builder image move to 1.26.

Fixes #54

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 20, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7867f975-e345-4ade-a9fc-f850e3b92988
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment