Skip to content

Fidelity Guide

Purpose: Understand Crucible's 5-level fidelity system — what each level guarantees, when to enforce it, and what to do when enforcement fails. This guide helps researchers decide the right fidelity level for their attack pack and debug fidelity violations.


Quick Summary

Level What It Means When To Use When To Skip (--no-fidelity)
L0 Narrative only — no reproduction code Research notes, incident descriptions N/A (always passes)
L1 Conceptual — attack plugin returns a result Initial attack development, prototype First few iterations of a new attack
L2 Fork-state behavioral — executes on a forked chain Most reproductions — standard benchmark target During early plugin development
L3 Exact transaction replay — replays the exploit tx Formal reproductions, publication Demo/simulation experiments
L4 Multi-chain full — cross-chain with bridge plugin Full bridge exploit reproductions Bridge demo experiments (e.g., nomad_bridge_l4)

Golden rule: Use the LOWEST fidelity level that truthfully describes your experiment. L2 is sufficient for most reproductions. Only use L3/L4 if you actually replay exact transactions or use a multi-chain bridge topology.


What Each Level Checks

L0 — Narrative (always passes)

No runtime checks. The experiment is a description or research note, not a reproduction.

What's enforced: Nothing.

Typical use case: Writing an incident report, documenting research findings, or planning an attack pack.

L1 — Conceptual (attack plugin ran)

What's enforced: - The attack plugin's execute() returned a non-None result

What passes without this level: A plugin that crashes before returning a result.

What's NOT checked: Whether the result was success=True or success=False. L1 only checks that the plugin ran.

AgentPlugin note: LLM-driven agent experiments don't produce AttackResult — the fidelity check will fail for them. Always use --no-fidelity for agent experiments.

L2 — Fork-State Behavioral (standard)

What's enforced: - All L1 checks - historical_scope.chains in evidence.yaml is non-empty - Each declared chain exists in the active topology - Trace artifacts exist (events.jsonl, gas_profile.jsonl, or storage_diffs.jsonl) - No transactions failed auto-instrumentation

Common failure reasons and fixes:

Error Message Cause Fix
Fidelity level L2 requires historical_scope.chains to be non-empty in evidence.yaml Evidence missing chain list Add chains: under historical_scope: in evidence.yaml
Chain 'X' declared in evidence.yaml is not in the active topology Evidence says chain X but topology doesn't have it Either add chain X to topology, or remove from evidence
Fidelity level L2 requires fork-state execution evidence... No artifact streams found — attack did not interact with the forked chain. Attack didn't send any transactions Ensure the plugin calls send_transaction() or eth_call()
Fidelity level L2 requires complete trace artifacts, but N transaction(s) failed auto-instrumentation debug_traceTransaction failed for some txs Check Anvil version; older nightlies may not support the tracer combo

L3 — Exact Transaction Replay

What's enforced: - All L2 checks - historical_scope.exploit_transactions in evidence.yaml is non-empty - reproduction_scope.exact_tx_replay is true - At least one transaction action found in run.jsonl

Common failure reasons and fixes:

Error Message Cause Fix
Fidelity level L3 requires historical_scope.exploit_transactions to be non-empty No exploit tx hashes in evidence Add the real exploit tx hash(es) from Etherscan
Fidelity level L3 requires reproduction_scope.exact_tx_replay to be true Flag not set Set exact_tx_replay: true in evidence.yaml
Fidelity level L3 requires transaction execution evidence. No transaction actions found in run.jsonl. Attack didn't send any txs, or ran in a different run dir Check that the plugin actually calls send_transaction()

L4 — Multi-Chain Full

What's enforced: - All L3 checks - historical_scope.chains has at least 2 chains - reproduction_scope.excluded_components is declared - Topology has a bridge plugin configured

Common failure reasons and fixes:

Error Message Cause Fix
Fidelity level L4 (multi-chain) requires at least 2 chains in historical_scope.chains Only 1 chain declared Add the second chain to chains:
Fidelity level L4 (multi-chain) requires reproduction_scope.excluded_components to be declared in evidence.yaml No excluded_components field Add realistic exclusions (e.g., off-chain relayer, non-EVM state)
Fidelity level L4 (multi-chain) requires a bridge plugin in the topology configuration Topology has no bridge Use a bridge topology: nomad_bridge, poly_network_bridge, or wormhole_bridge

When To Use --no-fidelity

The --no-fidelity flag skips all fidelity enforcement — the experiment runs to completion regardless of whether the runtime behavior matches the declared fidelity level.

Use --no-fidelity when:

Situation Why
Demo experiments (nomad_bridge_l4, demo_agent) Demo experiments are simulations — they don't need to meet formal fidelity requirements
During attack development You're writing a new plugin and iterating quickly — fidelity checks would slow you down
The declared fidelity level is aspirational Your evidence.yaml says L4 but you haven't implemented full multi-chain yet
Archive limitations prevent L2+ Polygon/BSC archives can't serve state for all chains — you get partial results
LLM agent experiments Agent behavior is non-deterministic — fidelity checks on agent runs are meaningless
Skipping baseline on first run First run has no baseline yet — but fidelity is unrelated to baselines

Do NOT use --no-fidelity when:

Situation Why
You're publishing a formal reproduction Reviewers expect the declared fidelity to be verified
Running benchmark comparisons All benchmarks should meet their declared level for fair comparison
Debugging a failing experiment Fidelity failures tell you WHAT went wrong — skipping them hides the root cause

How to specify:

# Skip fidelity enforcement
crucible experiment run experiments/nomad_bridge_l4.yaml --no-fidelity

# Keep fidelity enforcement (default)
crucible experiment run experiments/nomad_replay.yaml

# Keep fidelity enforcement explicitly (enabled by default)
crucible experiment run experiments/nomad_replay.yaml

Output: What A Researcher Sees

When fidelity PASSES

  [ok] runtime fidelity verified

This means the experiment's runtime behavior matches the declared L2/L3/L4 level. The manifest will contain:

"fidelity_check": {
  "passed": true,
  "declared_level": "L2",
  "failures": [],
  "warnings": []
}

When fidelity FAILS

  [fail] runtime fidelity FAILED
         • Fidelity level L4 (multi-chain) requires at least 2 chains in historical_scope.chains
         • Fidelity level L4 (multi-chain) requires a bridge plugin in the topology configuration

The reasons are printed directly below the FAILED line — no need to dig through logs. The manifest also stores the full details:

"fidelity_check": {
  "passed": false,
  "declared_level": "L4",
  "failures": [
    "Fidelity level L4 (multi-chain) requires at least 2 chains in historical_scope.chains",
    "Fidelity level L4 (multi-chain) requires a bridge plugin in the topology configuration"
  ],
  "warnings": []
}

The experiment still writes the manifest — it doesn't crash at fidelity failure. The outcome is set to "failure" with exit code 7 (assertion failed).

When you should read the run.jsonl

If you see [fail] runtime fidelity FAILED, your next action depends on what the error says:

  1. Evidence.yaml is missing fields → Open attacks/<name>/evidence.yaml and add them
  2. No trace artifacts found → Your attack didn't send transactions — is that expected?
  3. Missing chain/topology → Your topology doesn't match what evidence.yaml declares
  4. No transaction actions → The attack ran but didn't interact with the chain

If fidelity fails but you're okay with that (e.g., you're developing the attack), rerun with --no-fidelity.


How Fidelity Differs From Other Checks

Check What It Does When It Runs Can You Skip It?
Fidelity enforcement Validates runtime vs declared level After attack plugin runs --no-fidelity
Baseline verification Validates fork state matches golden fingerprint Before experiment starts --no-baseline
Evidence pre-flight Validates contracts have code on running chains Before attack plugin runs Cannot skip
Publication gates Validates evidence, baseline, and provenance completeness Before experiment (if publication mode) Only without --publication-mode

Key insight: Fidelity is the LAST check before the manifest is written. If everything else passes but fidelity fails, the experiment still completes — it just records a failure.


Designing An Attack Pack's Fidelity Level

When choosing a level, ask:

  1. Is this a full reproduction? → L2+ (need fork state)
  2. Are you replaying the exact exploit transaction? → L3+ (need calldata reconstruction)
  3. Does the exploit span multiple chains? → L4 (need bridge topology)
  4. Is this a simulation or demonstration? → L2 without --no-fidelity, or L0-L1

Retrospective upgrades:

# Convert L2 → L3: Reconstruct exact calldata
crucible attack extract <tx_hash> --name my_attack --chain ethereum --rpc-url <archive_rpc>

# Convert L3 → L4: Add bridge topology
# Use nomad_bridge, poly_network_bridge, or wormhole_bridge topology
# Update evidence.yaml: add bridge chain, excluded_components

Important: Don't claim a higher fidelity than you've actually implemented. Reviewers verify fidelity claims against your code and artifacts.


Reference: All Fidelity Error Messages

Every possible fidelity violation, what it means, and what to do:

L1 Errors (1 possible)

Attack plugin returned no result — cannot verify fidelity
Meaning: The plugin's execute() returned None. Either it crashed, or it's an AgentPlugin. Fix: Ensure execute() returns an AttackResult. For agent experiments, the fidelity check is implicitly skipped.

L2 Errors (4 possible)

"Fidelity level L2 requires historical_scope.chains to be non-empty in evidence.yaml"
Fix: Add chains: [ethereum] (or whatever chain you're using) under historical_scope in evidence.yaml.

"Chain 'X' declared in evidence.yaml is not in the active topology"
Fix: Either add chain X to the topology, or remove it from evidence.yaml's chains list.

"Fidelity level L2 requires fork-state execution evidence (events.jsonl, gas_profile.jsonl, or storage_diffs.jsonl). No artifact streams found"
Fix: Ensure your attack plugin actually sends transactions. The instrumentation proxy creates artifact files when it intercepts RPC calls.

"Fidelity level L2 requires complete trace artifacts, but N transaction(s) failed auto-instrumentation"
Fix: Check run.jsonl for failed auto_trace entries. This is often an Anvil version issue — some nightly builds fail with prestateTracer + diffMode.

L3 Errors (3 possible)

"Fidelity level L3 requires historical_scope.exploit_transactions to be non-empty in evidence.yaml"
Fix: Add the real exploit transaction hash(es) from Etherscan.

"Fidelity level L3 requires reproduction_scope.exact_tx_replay to be true in evidence.yaml"
Fix: Set exact_tx_replay: true under reproduction_scope.

"Fidelity level L3 requires transaction execution evidence. No transaction actions found in run.jsonl."
Fix: Ensure the attack sends at least one transaction that gets recorded in run.jsonl.

L4 Errors (3 possible)

"Fidelity level L4 (multi-chain) requires at least 2 chains in historical_scope.chains"
Fix: Add the second chain (e.g., polygon) to evidence.yaml's chains list.

"Fidelity level L4 (multi-chain) requires reproduction_scope.excluded_components to be declared in evidence.yaml"
Fix: Add excluded_components: with realistic off-chain limitations.

"Fidelity level L4 (multi-chain) requires a bridge plugin in the topology configuration"
Fix: Use a bridge topology (nomad_bridge, poly_network_bridge, wormhole_bridge). Plain single/dual topologies don't have bridge plugins.


See Also

Doc What It Covers
docs/ATTACK_PACK_GUIDE.md Creating attack plugins — including fidelity level setup
docs/CLI_REFERENCE.md Fidelity enforcement and --no-fidelity flag
docs/REPRODUCIBILITY.md Provenance and determinism
docs/TROUBLESHOOTING.md Common errors and fixes