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

Crate Map

GasHammer is organized as a Cargo workspace with 12 crates. Each crate has a single responsibility and well-defined dependency boundaries.

Dependency Graph

                        gashammer-common
                       /    |    |    \
                      /     |    |     \
              nitro  work  tele  scenario  oracle  fault  report  docgen  testenv
               |      |     |       |        |       |      |       |       |
               edge   |     |       |        |       |      |       |       |
               |      |     |       |        |       |      |       |       |
               hive ──┘     |       |        |       |      |       |       |
                            |       |        |       |      |       |       |
                            └───────┴────────┴───────┴──────┘       |       |
                                            |                       |       |
                                       (all share common)           |       |

Rule: All crates depend on gashammer-common. No crate depends on a binary crate. The edge crate depends on nitro and workload. The hive crate depends on common only.

Crate Details

gashammer-common

Shared types, configuration, build info, and the error code registry.

ExportDescription
RunId, EdgeId, ScenarioId, PhaseIdUUID newtype wrappers
GasRate, TxCountNumeric newtype wrappers
ErrorCode, ErrorCategoryStructured error codes
BuildInfo, GASHAMMER_CANARYBuild metadata and DNA
gashammer::v1::*Generated gRPC/protobuf types

gashammer-nitro

Nitro protocol adapters. Wire-protocol-only — never imports Nitro crates.

ExportDescription
NitroRpcProviderJSON-RPC provider with retry
FeedConsumer, FeedConfigWebSocket feed consumer
L1ContractReader, L1ConfigSequencerInbox and RollupCore reader
L1Monitor, L1EventBackground L1 polling task
NitroErrorNitro-specific errors (E100–E102)

gashammer-edge

Edge worker runtime and binary.

ExportDescription
EdgeRuntime, RuntimeStateEdge lifecycle state machine
EdgeConfigEdge configuration
TxPipelineTransaction submission pipeline
FeedCorrelatorFeed-to-tx correlation
Binary: gashammer-edgeEdge entry point with CLI

gashammer-hive

Hive control plane and binary.

ExportDescription
RunOrchestrator, RunStateRun lifecycle state machine
EdgeRegistry, EdgeStatusEdge tracking with reaper
AppState, router()axum REST API
Binary: gashammer-hiveHive entry point with CLI

gashammer-workload

Workload generation engine.

ExportDescription
WorkloadEngine, EngineConfigCore engine with rate control
GasRateModeSustained, Ramped, Bursty, Custom
Parameterizer traitTemplate interface
AccountPool, AccountDeterministic HD wallet accounts
builtin_templates()8 built-in tx templates

gashammer-telemetry

Event model and transport.

ExportDescription
TelemetryEvent, EventPayloadEvent types
PipelineConfig, PipelineMetricsPipeline configuration

gashammer-oracle

Correctness verification.

ExportDescription
Invariant traitCheck interface
Verdict, EvidenceCheck results
CheckSummary, CorrectnessVerdictAggregated results
ObservationSimplified event for checks

gashammer-fault

Fault injection.

ExportDescription
FaultAdapter traitAdapter interface
FaultManagerRouting and lifecycle
NetemAdaptertc netem wrapper
IptablesAdapteriptables wrapper
FaultTimelineScheduled fault events

gashammer-report

Report generation.

ExportDescription
RunReportComplete run report
CapacityEnvelopeSafe operating envelope
BottleneckClassificationBottleneck identification
Regression detectionBaseline comparison

gashammer-scenario

Scenario Definition Language.

ExportDescription
ScenarioDefinitionParsed SDL structure
validate()Scenario validation
CompilerSDL to run configuration

gashammer-docgen

Documentation engine.

ExportDescription
parse_source()Rust source file parser (via syn)
ModuleDoc, ItemDocDocumentation model

gashammer-testenv

Testcontainers-based Nitro devnet.

ExportDescription
NitroDevnetDevnet orchestrator (Minimal/Standard/Full)
LifecycleTestEnd-to-end test builder
TestContractsCompiled test contract bytecode
Container imagesL1 Geth, Sequencer, Feed Relay