Skip to content

Comparisons

Comparisons detect correctness drift between endpoints running the same chain.

A comparison run usually includes:

  • one reference endpoint
  • one or more candidate endpoints
  • optional baseline context from previous runs

Outputs are grouped into verdict categories.

Each comparison produces one of three verdicts:

  • pass: candidate responses match reference within configured tolerance
  • warn: non-critical differences detected (e.g. latency approaching threshold)
  • fail: significant mismatch in fields, behavior, or performance

The verdict endpoint provides a CI-friendly exit_code (0 = pass, 1 = fail).

Each comparison run evaluates up to four independent checks. The overall verdict is the worst status across all checks.

CheckWhat it evaluatesWhen it runs
latency_p95Absolute p95 latency against thresholdAlways
latency_vs_referenceCandidate p95 vs reference p95When reference endpoint exists
correctnessResponse match rate between candidate and referenceWhen reference exists and correctness_enabled is true
latency_vs_baselineCandidate p95 vs previous baseline runWhen baseline run exists

Each check produces pass, warn, or fail independently. A check warns at 90% of its threshold and fails when exceeded.

These are independent signals:

  • Run status answers “Did the test execute successfully?”
  • Verdict answers “How does the endpoint perform compared to expectations?”

A run can be success with a fail verdict (endpoint works but regressed), or failed with no verdict at all (test crashed before comparison).

Template-dependent examples:

  • block number consistency
  • RPC method response shapes
  • transaction receipt field agreement
  • latency deltas between reference and candidate

Comparison thresholds control pass/warn/fail boundaries:

ThresholdDefaultDescription
latency_p95_max_ms700Absolute p95 latency ceiling
latency_regression_max_pct20Max regression % vs baseline
latency_vs_reference_max_pct50Max delta % vs reference endpoint
correctness_min_pct100Minimum response match rate
correctness_enabledtrueWhether to run the correctness check

Thresholds can be configured at the suite level and overridden per method via method_overrides.

Comparisons are useful in several scenarios:

  • client diversity checks (reth vs nethermind, geth vs besu)
  • provider parity checks
  • canary validation before traffic shift
  • post-upgrade validation

See Multi-Endpoint Comparison and Upgrade Testing.

Choose reference endpoints that are:

  • stable and well-understood
  • representative of expected production behavior
  • isolated from experimental changes

Avoid switching reference endpoint frequently, or trend analysis becomes noisy.

Keep comparison suites focused and maintainable:

  • keep candidate set small per suite
  • compare similar endpoint classes together
  • separate performance and correctness suites when possible
  • track threshold changes in version control
  1. Confirm reference endpoint health first.
  2. Check which specific checks failed in the verdict.
  3. Filter run samples by method and failing candidate endpoint.
  4. Identify whether mismatch is deterministic across retries.
  5. Separate semantic mismatches (field/value) from timing-related drift.
  6. Consider acknowledging known-benign differences.
  7. Decide whether threshold tuning is justified or behavior is a true regression.
  • blockNumber lag: candidate consistently behind reference
  • null vs object: method output shape divergence
  • field formatting: hex formatting or quantity normalization mismatch
  • revert payload: differing error object/message structures
  • remove unstable endpoint from production candidate set
  • pin client version and retest
  • lower request concurrency in suite parameters
  • split one large compare suite into focused method-specific suites
  • acknowledge known-benign mismatches so they stop triggering failures