Skip to content

Bridge Plugin System — Current Coverage & Limitations

Date: June 2026 (Updated) Audience: Researchers, contributors, and reviewers evaluating Crucible's bridge experimentation capabilities. Purpose: Document Crucible's bridge protocol simulation capabilities — what's covered by the 3 implemented bridge plugins and what are the known limitations.


1. Executive Summary

Crucible now ships with 3 real bridge plugin implementations covering the most significant historical bridge protocols:

Bridge Plugin Solidity Contracts Vulnerability Model Chains
NomadBridge (bridges/nomad_bridge/) NomadReplica committedRoot == 0x00 — forged message accepted ethereum + polygon
PolyNetworkBridge (bridges/poly_network_bridge/) EthCrossChainManager + EthCrossChainData Hash collision in _executeCrossChainTx selector dispatch ethereum + polygon + bsc
WormholeBridge (bridges/wormhole_bridge/) WormholeCore + TokenBridge Guardian bypass — VAAs accepted without real signatures ethereum + polygon

Each plugin: - Deploys real Solidity contracts to forked chains (compiled via forge build) - Configures the vulnerable initial state (zero root, default keeper, bypass mode) - Supports the full BridgePlugin lifecycle: deploy → configure → connect → send_message → reset → destroy - Produces cross-chain artifacts through the existing instrumentation pipeline

These are protocol-simulating plugins, not full protocol replicas. They deploy minimal contracts that model the vulnerability path, enabling L4 experiments without running the complete production protocol (which can require non-EVM components, off-chain relayers, and governance processes).


2. What Exists (The Architecture)

2.1 BridgePlugin ABC

File: crucible/sdk.py

A full lifecycle interface:

Method Purpose Default Implementation
deploy() Deploy bridge contracts to both chains Returns {}
configure() Set validator set, relayer addresses, guardian keys No-op
connect() Start message-passing simulation (relayer process) No-op
send_message() Send a cross-chain message Logs only, returns empty result
reset() Reset bridge state to post-deploy baseline No-op
destroy() Tear down relayer and clean up deployed contracts No-op

Status: [ok] Well-designed ABC — all 3 bridge plugins override every method with real implementations.

2.2 Bridge Lifecycle Wiring

File: crucible/bridge_lifecycle.py

The experiment runner automatically: 1. Loads the bridge plugin from topology config (topology.bridge) 2. Calls deploy() → configure() → connect() before scenario setup 3. Calls destroy() in finally blocks (both run() and resume())

Status: [ok] Production-ready wiring — all 3 bridge plugins benefit from this automatically.

2.3 Scenario Engine Integration

File: crucible/scenario_steps.py

A bridge_action step type with 4 actions:

Action Purpose Current Behavior
send_message Send cross-chain message Delegates to bridge_plugin.send_message()
relay_messages Trigger relayer to process pending messages Calls bridge_plugin.connect()
check_delivery Verify a specific message was delivered Log-only
verify_state Check bridge contract state Log-only

Symbolic address resolution (bridge.ethereum -> hex address from scenario) is wired in.

Status: [ok] Works with all 3 bridge plugins. send_message and relay_messages delegate to real plugin implementations.

2.4 Cross-Chain Observability

File: crucible/logging.py

  • Dedicated bridge subdirectory in log output: logs/<experiment>/<run>/bridge/
  • cross_chain.jsonl stream for message correlation IDs
  • LogManager.bridge() emitter for bridge-specific events

Status: [ok] Production-ready — captures real bridge traffic from all 3 plugins.

2.5 Topology Configuration

Files: topologies/nomad_bridge.yaml, topologies/poly_network_bridge.yaml, topologies/wormhole_bridge.yaml, topologies/bridge.yaml, topologies/harmony_bridge.yaml

name: nomad_bridge
chains: [ethereum, polygon]
bridge: nomad_bridge

Status: [ok] 3 dedicated bridge topology files, each pointing to its respective bridge plugin.

2.6 Evidence Validation

File: crucible/evidence.py

validate_bridge_evidence() checks that bridge plugins declare: - protocol.name and protocol.version - features (list of modeled features) - limitations (what's excluded or simplified) - chains (supported chains)

Status: [ok] Validates metadata correctly. All 3 bridge plugins pass validation.


3. What's Still Missing (Remaining Gaps)

3.1 Relayer Timing Model

All 3 bridge plugins use synchronous connect() — there is no configurable message relay latency. Real bridge exploits often depend on:

  • Relayer latency (minutes to hours across chains)
  • Guardian quorum timing (waiting for N signatures)
  • Message ordering (which message arrives first affects state)

Impact: Cannot simulate timing-dependent attack scenarios (e.g., front-running a relayer, oracle timing attacks).

3.2 L4 Fidelity Enforcement Is Structural

The FidelityEnforcer checks that a bridge plugin is declared in the topology config, but it cannot verify that the bridge plugin actually works (message passing, state synchronization). L4 is currently a structural declaration, not a behavioral guarantee.

Impact: An experiment that declares L4 but never calls send_message() will still pass the gate if a bridge plugin is in the topology.

3.3 Solidity Contracts Are Simplified

The contracts deployed by all 3 plugins are minimal implementations that model only the vulnerability path:

Real Protocol Feature Modeled? Impact
Full Merkle tree verification No (simplified hash-chain) Cannot test advanced proof manipulation
Real guardian/VAA signing No (bypass mode) Signing round simulation not available
Governance / timelock No Cannot test governance-based attacks
Token minting / burning No (log-only) Token supply changes are not modeled

Impact: These plugins are designed for L4 attack reproduction, not production-grade protocol testing.

3.4 No Bridge Protocol Templates

There is no crucible bridge init scaffold generator for creating new bridge plugins. Researchers who want to build a custom bridge must do it from scratch.


4. Researcher Use Case Coverage

[ok] Covered By Current Implementation

Use Case How
Deploy a fresh Nomad Replica on 2+ chains topologies/nomad_bridge.yaml + NomadBridge plugin
Deploy a fresh Wormhole Core + TokenBridge topologies/wormhole_bridge.yaml + WormholeBridge plugin
Deploy Poly Network Manager + Data contracts topologies/poly_network_bridge.yaml + PolyNetworkBridge plugin
Forge a cross-chain message (Nomad) send_message() with forged process() calldata
Replace keeper keys (Poly Network) send_message() with hash-collision calldata
Submit a forged VAA (Wormhole) send_message() with guardian-bypass completeTransfer()
Set up pre-exploit bridge state Use bridge_action scenario steps with real plugins
Reproduce a historical bridge exploit where the bridge is already deployed Fork the chain at the exploit block — the bridge contracts are part of the fork state
Verify that a vulnerable state existed at a specific block L2: use get_code() + get_storage_at() in an AttackPlugin
Replay an exploit transaction against a forked chain L3: forge exact calldata and send via client.send_transaction()
Analyze bridge contract behavior during an exploit Auto-captured in 6 JSONL streams by the RPC proxy
Test an attack plugin against different fork blocks Use experiment run with different fork_block values in testbed.local.yaml

Partially Covered (Architecture Exists, Limited Implementation)

Use Case Limitation
Experiment with relay timing assumptions No relayer timing model — connect() is synchronous
Test what-if scenarios with modified bridge parameters Must manually edit Solidity contracts before forge build
Deploy a custom bridge protocol from scratch Must write full BridgePlugin + Solidity contracts from nothing

Not Covered (Architecture Gap)

Use Case Why
Non-EVM bridge components Crucible is EVM-only by design
Real cross-chain relay with actual finality Anvil auto-mines instantly
Multi-guardian consensus simulation No signing/verification round model
MEV-aware bridge attack sequencing Anvil uses FIFO ordering
Token minting / burning on cross-chain transfer Not modeled in simplified contracts

---|---|---| | optimistic-bridge | Nomad-style fraud-proof bridge | 3-4 days | | light-client-bridge | Wormhole-style guardian/light-client bridge | 3-4 days | | lock-mint-bridge | Simple token bridge (Portal-style) | 2-3 days |

5.3 Phase 3: Behavioral Assertions for L4 (2-3 days)

Upgrade L4 fidelity enforcement to verify actual bridge behavior:

Deliverable: - Bridge plugin declares behavioral assertions in evidence.yaml - L4 gate checks: message delivery confirmed, state synchronized across chains - FidelityEnforcer validates bridge behavior, not just structural presence

5.4 Total Remaining Investment

Phase Effort Timeline (1 person)
Phase 1: Relayer timing 2-3 days Week 1
Phase 2: Bridge templates (3 templates) 8-12 days Weeks 2-3
Phase 3: L4 enforcement 2-3 days Week 4
Total remaining 12-18 days 3-4 weeks

5. How Researchers Can Use The Bridge Plugins

Quick Start

# experiments/my_l4_experiment.yaml
name: my_l4_experiment
scenario: my_bridge_scenario
attack: my_attack_plugin
topology: nomad_bridge               # Use a bridge topology
run:
  traces: true
  storage_diffs: true
  gas_profiling: true

From An Attack Plugin

def execute(self, context: ExperimentContext, phase=None) -> AttackResult:
    # The bridge is already deployed and configured by the lifecycle
    bridge = context.bridge_plugin

    # Send a forged cross-chain message
    result = bridge.send_message(
        source_chain="ethereum",
        dest_chain="polygon",
        data="0xdeadbeef..."  # forged calldata
    )

    # Use the existing RPC for chain-specific operations
    client = JsonRpcClient(context.chains.runtime_for("ethereum").rpc_url)
    # ... exploit logic using both chains and the bridge

From A Scenario

# scenarios/my_bridge_scenario/scenario.yaml
phases:
  - name: setup
    steps:
      - type: log
        message: "Bridge is deployed and configured by the lifecycle"

  - name: attack
    steps:
      - type: log
        message: "Attack runs here (bridges ready)"

  - name: verify
    steps:
      - type: bridge_action
        action: verify_state
        chain: ethereum

Validate The Bridge Plugin

crucible plugin list --type bridge
crucible plugin validate bridges/nomad_bridge
crucible plugin validate bridges/poly_network_bridge
crucible plugin validate bridges/wormhole_bridge

Manual Cross-Chain Simulation (Without Bridge Plugin)

This pattern is still available for custom bridge protocols not covered by the 3 plugins:

# Chain A: call bridge.send_message()
client_a.send_transaction({"to": BRIDGE_A, "data": message_data})
# Chain B: simulate relayer by calling bridge.receive_message()
client_b.send_transaction({"to": BRIDGE_B, "data": message_data})

Crucible's instrumentation proxy captures every interaction automatically.


6. Summary

Area Status
BridgePlugin ABC [ok] Complete, well-designed
Lifecycle wiring (deploy -> destroy) [ok] Production-ready
Scenario step type (bridge_action) [ok] Wired, works with real plugins
Cross-chain logging [ok] Production-ready
Topology configuration [ok] 3 bridge topology files
Evidence validation [ok] Validates metadata
Real bridge plugins [ok] 3 plugins (Nomad, Poly Network, Wormhole)
Solidity contracts for 3 protocols [ok] Compiled via forge build
Integration tests [ok] 17+ unit tests in test_bridge_plugins.py

See Also

Doc What It Covers
docs/ARCHITECTURE.md System architecture, plugin system, data flow
docs/REPRODUCTION_SCOPE.md Fidelity levels, what's in/out of scope
docs/ATTACK_PACK_GUIDE.md Creating attack plugins with bridge topology
docs/SCENARIO_AUTHORING.md bridge_action step type reference
docs/CLI_REFERENCE.md Bridge plugin CLI commands
crucible/sdk.py BridgePlugin ABC source
crucible/bridge_lifecycle.py Bridge lifecycle helpers source