Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Data Flow

This page describes how data moves through GasHammer during a run.

Event Lifecycle

Every significant action produces a telemetry event. Events flow from edges to the hive, where they are stored and analyzed.

Edge                           Network              Hive
────                           ───────              ────

TxSubmitted ──────────────────────────────────────▶ Ring Buffer
  (hash, template, gas,                              │
   account, timestamp)                                │
                                                      ▼
TxConfirmed ──────────────────────────────────────▶ Parquet Writer
  (hash, block, gas_used,                            │
   latency_ms)                                       │
                                                     ▼
FeedCorrelation ──────────────────────────────────▶ Oracle Evaluator
  (hash, inclusion_latency_ms,                       │
   sequence_number)                                  │
                                                     ▼
OracleVerdict ────────────────────────────────────▶ Report Aggregator
  (invariant, pass/fail,                             │
   evidence)                                         │
                                                     ▼
                                               RunReport (JSON/Markdown)

Telemetry Transport

Events are transported from edges to the hive via gRPC streaming:

  1. Edge batches events from its ring buffer (configurable batch size, default 1024)
  2. Edge sends the batch to the hive via a bidirectional gRPC stream
  3. Hive acknowledges receipt (enables backpressure)
  4. Hive writes events to Parquet files partitioned by run_id and hourly time buckets

Parquet Storage

Telemetry data is stored in Apache Parquet format for efficient columnar access:

  • Partitioning: {data_dir}/runs/{run_id}/{hour}.parquet
  • Rotation: by size (default 256 MB) or time (default 1 hour)
  • Metadata: each Parquet file footer includes GasHammer DNA fields:
    • gashammer.version — software version
    • gashammer.build — build SHA
    • gashammer.run_id — associated run
    • gashammer.copyright — BSL-1.1 notice

Report Generation

After a run completes, the report engine reads events from Parquet and computes:

MetricSource EventsOutput
Latency percentilesTxConfirmedp50, p90, p95, p99, p99.9
Throughput time seriesTxSubmitted, TxConfirmedgas/sec and tx/sec over time
Inclusion latencyFeedCorrelationFeed inclusion timing
Revert rateTxConfirmed (status=reverted)% of failed transactions
Correctness verdictsOracleVerdictPass/fail per invariant
Capacity envelopeAll latency eventsSafe operating envelope boundaries

Metrics (Prometheus)

Both hive and edge expose Prometheus metrics on their configured ports. All metrics use the gashammer_ prefix.

Edge Metrics

MetricTypeDescription
gashammer_tx_submitted_totalcounterTransactions submitted
gashammer_tx_confirmed_totalcounterTransactions confirmed
gashammer_tx_failed_totalcounterTransactions failed
gashammer_tx_latency_secondshistogramTransaction confirmation latency
gashammer_feed_messages_totalcounterFeed messages received
gashammer_correlation_latency_secondshistogramFeed inclusion latency
gashammer_events_generated_totalcounterTelemetry events created
gashammer_events_dropped_totalcounterEvents dropped due to buffer full

Hive Metrics

MetricTypeDescription
gashammer_edges_activegaugeCurrently connected edges
gashammer_runs_activegaugeCurrently running tests
gashammer_events_received_totalcounterEvents received from edges
gashammer_oracle_checks_totalcounterInvariant checks performed
gashammer_oracle_violations_totalcounterInvariant violations detected