E2E relayer scenarios
The E2E relayer scenario suite checks that IBC Link moves packets between real EVM chains and reports the correct result. It covers delivery, route isolation, relayer and transaction recovery, remote signing and proving, GMP calls, IFT transfers, rate limits, deployment, and attestation safety. This page expands End-to-end validation and relates to E2E harness and matrix and E2E load testing.
Scenario suite
Environment and route setup
Each scenario starts an isolated chain environment with the IBC contract stack, clients, test applications, and a temporary relayer. A route is a directed link from one source chain to one destination chain. It also defines the client pair and timing rules used to judge packet progress. The shared setup in e2e/…/mesh.go builds either a fully connected attested mesh or a fully connected Besu mesh, so tests can use one route or several routes without sharing state.
The traffic layer deploys the applications needed by a scenario and returns a packet locator. This locator joins the route, source client, source transaction, and packet sequence. It lets the suite match relayer status to the exact packet even when one source transaction emits several packets. Transfer checks also capture source and destination balances before submission so later assertions compare effects with the original state.
Deployment scenarios use the public CLI to provision core contracts, clients, GMP, IFT tokens, and bridges. They check that manifests and rendered relayer connections describe the deployed route and that the relay entry points have the expected public access. A repeat deployment reports skipped steps instead of creating duplicate resources. Invalid client settings, such as a trusting period outside the contract limits, are rejected. Mixed client routes can combine Besu header proofs with attestation proofs while preserving the signer and automatic-relay settings for each route end.
An attached chain is caller-owned. The environment can relay through it, but it does not claim mining or node-lifecycle control and does not stop it during cleanup. This lets the suite test live external endpoints without changing their lifetime.
References: e2e/…/mesh.go• L16-55 e2e/…/mesh.go• L122-157 e2e/deploy_test.go• L405-547 e2e/attached_chain_test.go• L26-92 e2e/…/traffic_transfer.go• L73-124
Execution matrix
The execution matrix selects a chain provider that meets each scenario's needs. Scenarios can require controlled mining or node lifecycle control. Fast mode may skip a requirement with no compatible provider. Complete and production modes treat an unresolved requirement as a failure. Matrix discovery records the selected provider and the realized topology without running packet traffic.
The default provider order favors Anvil for fast runs and Besu for production runs. Scenarios that need controlled mining or node lifecycle control require Anvil. The route graph records the chain family and client shape, while the attested and Besu mesh builders keep their authorities and client evidence distinct.
Load scenarios are opt-in and run separately from the normal acceptance suite. They exercise relayer packet flow at burst and long-run scale, while attestor load checks packet and state attestation service capacity. Their explicit gate prevents load traffic from changing normal scenario results.
References: e2e/…/start.go• L44-63 e2e/…/start.go• L143-181 e2e/…/start.go• L229-245 e2e/…/start.go• L262-289 e2e/load_relayer_test.go• L52-67 e2e/load_attestor_test.go• L34-143
Packet lifecycle
The relayer observes packets from a source transaction. It submits the destination receive step and then the source acknowledgement step. If the packet expires, it submits a source timeout instead. The suite checks both the reported packet state and the chain effects that make that state true.
The main lifecycle is:
flowchart LR
A[Source application] --> B[Source SendPacket]
B --> C{Relayer selection}
C -->|selected| D[Destination receive]
D --> E[Source acknowledgement]
E --> F[Succeeded or rejected]
C -->|late or expired| G[Source timeout]
G --> H[Timed out]
C -->|not selected| I[Not selected]
D --> J[Pending while destination is unavailable]
J --> D
Succeeded means the destination action completed and the source accepted a success acknowledgement. Rejected means the destination action produced an error acknowledgement. Timed out means the source accepted a timeout proof. Pending means work remains. Not selected means this relayer has not chosen the packet. A permanent processing error is reported as Relay failed by the relayer API.
References: e2e/…/traffic_relayer.go• L15-50 e2e/…/traffic_relayer.go• L248-319 proto/…/relayer.proto• L58-97
Delivery scenarios
Transfer delivery
The ICS20 transfer scenarios verify the full escrow and voucher path. A source transfer lowers the sender balance and creates a packet commitment. Successful delivery creates the destination voucher and receipt. The acknowledgement then clears the source commitment and records the source acknowledgement action.
The suite covers automatic route handling and explicit manual relay. Manual relay keeps the packet pending until a relay request selects it. Timeout checks use the destination clock and refund the source without creating a destination voucher. The same outcome is required for attestation clients and Besu QBFT or IBFT 2.0 clients, although the proof evidence differs. Besu scenarios also verify delivery through validator turnover by requiring the client to cross the validator changes before the receive.
References: e2e/transfer_test.go• L23-80 e2e/transfer_test.go• L94-149 e2e/transfer_test.go• L192-320 e2e/transfer_test.go• L322-353 e2e/…/traffic_transfer.go• L196-283 e2e/…/traffic_transfer.go• L382-447
Cross-route delivery
Cross-route scenarios prove that packet identity includes the route's client context rather than only a sequence number. Two routes can share a destination chain and use the same sequence value without one packet being mistaken for the other. Each transfer must reach the destination and retain its own status.
This check protects multi-route operation when several source chains send packets to one destination. The packet locator and status lookup must keep those routes separate from submission through final acknowledgement.
References: e2e/cross_route_test.go• L16-54 e2e/…/traffic_relayer.go• L225-277
Recovery scenarios
Relayer lifecycle
Relayer lifecycle scenarios check that a selected packet survives a process stop and restart. The relayer keeps enough packet progress to resume the route instead of losing the request. Startup is complete only after the daemon announces readiness and its health endpoint reports service.
The same lifecycle model supports explicit relay control. A test can discover a packet, select it, stop the relayer, start it again, and wait for a terminal state. Subscription recovery also proves that a packet sent while a chain event stream is disconnected is found after reconnection. Status reads follow all pages so a packet cannot disappear because it is outside the first response page.
References: e2e/relayer_lifecycle_test.go• L19-63 e2e/relayer_lifecycle_test.go• L114-183 e2e/relayer_lifecycle_test.go• L185-225 e2e/…/traffic_relayer.go• L187-246
Pending packets and node recovery
Pending scenarios use controlled interruptions to distinguish delayed chain progress from a failed node. Paused destination mining leaves a packet pending until current blocks appear. A stopped destination node makes chain queries fail. After the node starts again, the relayer resumes delivery and the packet succeeds.
Timeout decisions use the finalized destination header tracked by the client. A source chain that moves far ahead must not cause an early timeout before the destination anchor is final and past the packet timeout.
References: e2e/pending_packet_test.go• L15-52 e2e/node_recovery_test.go• L17-58 e2e/ift_test.go• L206-275 e2e/transfer_test.go• L388-465
Transaction recovery
Transaction recovery checks failures after the relayer has submitted a destination receive transaction but before the chain has finalized it. If the mempool drops the transaction, the relayer submits the receive again with the same nonce. If the base fee rises, it replaces the pending transaction with a higher fee. After a relayer restart, it re-prices the pending receive and keeps its destination, value, and nonce.
The reorg case checks a different boundary. A receive can succeed on a fork and then disappear before finality. The relayer must submit it again on the canonical fork. In each case, the packet completes once, the destination mints the voucher, and the source commitment clears.
References: e2e/transaction_recovery_test.go• L24-188 e2e/transaction_recovery_test.go• L190-235 e2e/transaction_recovery_test.go• L250-307
Environment lifecycle
The environment lifecycle protects the resources used by a scenario. Startup validates the graph and runtime bindings before it acquires chains or deploys protocol resources. Managed chains and attestors belong to the environment. Attached chains remain caller-owned, so closing the environment does not stop them.
The environment waits for active operations before cleanup. It also releases earlier resources when a later acquisition fails. This keeps a failed setup from leaving partial chains, protocol instances, or processes behind.
References: e2e/…/start.go• L262-289 e2e/attached_chain_test.go• L51-92 e2e/…/start_test.go• L21-55 e2e/…/process_test.go• L24-148
Signing scenarios
Remote signing
Remote signing checks that the relayer can keep key material in a signing service while it submits transactions through a route. An IFT transfer must use the configured relayer identity for both the destination receive and the source acknowledgement. The service accepts requests only for its configured key ID.
The suite also checks remote attestor signing. A valid remote signature allows an attested transfer to complete. If the signing service changes to a key with a different on-chain address, the attestor refuses to restart because its configured authority no longer matches. Relayer transaction signing and attestor signing remain separate identities.
References: e2e/remote_signer_test.go• L114-139 e2e/remote_signer_test.go• L141-211 e2e/remote_signer_test.go• L213-269 e2e/…/traffic_signers.go• L24-84
Remote proving
Remote proving checks that the relayer can obtain proof data from a separate proving service over gRPC. The relayer still follows the normal packet lifecycle when proof work runs outside its process.
The suite exercises successful delivery, timeout, and error acknowledgement through the remote prover. A timeout refunds the source without minting on the destination. An invalid GMP call produces a rejected packet and leaves the destination target unchanged. These cases show that remote proof delivery preserves normal packet outcomes beyond the happy path.
References: e2e/remote_prover_test.go• L25-124 e2e/…/relayer_config_test.go• L195-223
Application scenarios
GMP calls
ICS27 GMP scenarios carry a call across a route and execute it on a destination contract. A valid call changes the destination counter once. An account receiver can also move tokens from the derived account and records the account identifier used to derive it.
Expired calls use the timeout path without changing the counter. Invalid call data produces an error acknowledgement and leaves the counter unchanged. These cases distinguish a completed call from a packet that reached the destination but failed its requested action.
References: e2e/gmp_test.go• L15-136 e2e/…/traffic_gmp.go• L22-136
IFT transfers
Interchain Fungible Token (IFT) scenarios check a burn-and-mint transfer model. The source token balance falls when the packet is sent. Successful delivery mints the matching amount and clears the source pending record. A timeout or error acknowledgement refunds the source and leaves destination supply unchanged.
The suite extends this model to multiple packets. It checks separate pending records, distinct token pairs, packets emitted by one source transaction, selective relay, and batched receive, acknowledgement, and timeout actions. Concurrent relay requests must also keep status scoped to the correct source transaction. Packet-level isolation remains the key result: one packet must not complete, refund, or clear another.
References: e2e/ift_test.go• L277-386 e2e/ift_test.go• L467-721 e2e/ift_test.go• L792-938 e2e/…/traffic_ift.go• L48-217 e2e/…/traffic_ift.go• L267-380
IFT rate limits
IFT rate-limit scenarios check how a receive and a refund behave when the token bucket has room for only one packet. A batched receive can deliver one packet and reject the other with a rate-limit error. The rejected packet returns an error acknowledgement and remains tied to its own packet status.
Refunds use the same limit. One timeout or error-acknowledgement refund succeeds. The other stays pending until the rate-limit window refills. The relayer then retries only the outstanding refund without another relay request, and both packet states and balances settle independently.
References: e2e/ift_rate_limit_test.go• L29-119 e2e/ift_rate_limit_test.go• L121-239
Attestation scenarios
Attestation quorum and client safety
Attestation scenarios check that client updates use trusted signed chain state. A quorum is the minimum number of configured attestors needed for an update. Two live attestors can satisfy a two-signature quorum. One live attestor leaves the packet pending until another returns.
The suite also checks attested-client misbehaviour. A conflicting state proof freezes the attested client at its trusted height. Later packets remain pending because the frozen client cannot authorize delivery. The Besu client has the same safety goal: two sealed headers at one height with different state roots, or a later header with non-monotonic time, freeze the client. Later updates are rejected and packets remain pending until a safe recovery path exists.
Startup applies the same safety rule to relayer configuration: too few configured attestors causes startup to fail rather than run in a degraded state. The environment accepts new and existing Solidity IBC instances and clients. It checks that declared attestors match on-chain registration, client IDs remain stable within an instance, and one signer is not reused across clients.
Besu fixture generation captures real headers and packet proofs for each supported consensus type. It also records rejected updates such as low quorum, conflicting state, and low validator overlap. These fixtures support focused client checks without changing the end-to-end route model.
Signed commitment checks cover receive, acknowledgement, and timeout proofs. A valid attestor key with altered packet data is rejected before on-chain submission. When valid data returns, the packet can follow its normal success or timeout path.
References: e2e/ift_test.go• L26-138 e2e/ift_test.go• L140-204 e2e/besu_misbehaviour_test.go• L29-144 e2e/besu_misbehaviour_test.go• L223-247 e2e/…/generate_test.go• L42-130 e2e/…/relayer_attestor_quorum_integration_test.go• L22-190 e2e/attestation_validation_test.go• L133-243
Change checklist
When these files or sections are changed, remember to consider these:
- Changes to route, client, or attestor setup must stay aligned between the environment graph, deployed route clients, relayer connections, and matrix records.
- Changes to packet identity or status fields must preserve the match between source client plus sequence and the relayer status returned for a source transaction.
- Changes to IFT bridge, rate-limit, or pending-record rules must cover success, timeout, error acknowledgement, retry, and multi-packet isolation together.
- Changes to finality or route timing must be checked against pending waits, timeout anchors, transaction retry windows, and stability checks.
- Changes to signer configuration must preserve remote key-ID checks and the signer identity on receive and acknowledgement transactions.
- Changes to remote prover configuration must preserve proof requests for receive, acknowledgement, timeout, and rejected application paths.
- Changes to transaction replacement rules must preserve nonce, destination, value, fee increase, and canonical-fork behavior.
- Changes to environment ownership must preserve the distinction between resources created by the test and attached chains that the caller must keep running.
- Changes to deployment steps or relayer connection rendering must preserve idempotent setup, manifest data, and effective automatic-relay settings in either route direction.
- Changes to process readiness or health checks must preserve startup logs, cancellation, process cleanup, status paging, and the environment-close barrier.
- Changes to attestor declarations must preserve quorum coverage, existing-client membership, stable client identity, and signer uniqueness.
- Changes to packet attestation validation must preserve commitment checks for receive, acknowledgement, and timeout proofs before on-chain submission.
- Changes to Besu header validation or fixture shape must preserve consensus-specific seals, trusted overlap, proof paths, and rejected-update coverage.
- Changes to scenario requirements or topology must update the collected matrix specification and skip behavior for each execution mode.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| Destination mining is paused or the destination node is stopped | The packet stays pending or chain queries fail. | Restore mining or the node before waiting for a terminal state. |
| A receive is dropped from the mempool | The packet cannot complete from the original transaction. | Re-submit at the same nonce and verify delivery. |
| The base fee rises above the pending receive fee | The receive remains unmined. | Replace it with a higher fee and keep the same nonce. |
| A receive is mined on a fork before finality | The receipt disappears from the canonical chain. | Re-submit on the canonical fork and verify the new block. |
| The relayer restarts while a packet or transaction is in flight | Delivery or retry state can be lost. | Reuse stored progress and verify the packet reaches a terminal state. |
| The daemon reports readiness without a serving health endpoint | The harness can send requests to a process that is not ready. | Require readiness output and a serving health response. |
| A paged packet listing is read only once | Packets after the first page appear absent. | Follow every response cursor before deciding which packets are present. |
| A timeout is judged from a non-final destination header | The source can refund before destination state is safe to trust. | Use the finalized destination anchor and wait for its timestamp to pass the packet timeout. |
| Live attestors do not meet the on-chain quorum | Client updates fail and packets remain pending. | Configure the full attestor set and restore enough live signers to meet quorum. |
| The attested or Besu client is frozen by conflicting state | New packets cannot be delivered through that client. | Keep the packet pending and require a safe client recovery path. |
| A valid attestor signs a claim with the wrong packet commitment | The relayer rejects the proof before submission. | Check commitment integrity for receive, acknowledgement, and timeout claims. |
| An IFT receive or refund exceeds the rate limit | One packet is rejected or one refund stays pending. | Assert the rate-limit error, wait for refill, and retry only the outstanding packet. |
| A receiver, IFT bridge, or GMP payload is invalid | The destination returns an error acknowledgement. | Assert Rejected with the matching refund or unchanged target state. |
| A remote signer uses the wrong key ID or address | Signing fails or the attestor refuses to restart. | Require the configured key ID and on-chain signer address to match. |
| The relayer cannot obtain proofs from the remote prover | Receive, acknowledgement, or timeout work cannot complete. | Keep the prover endpoint available and verify success, timeout, and rejected paths. |
| Startup finds an invalid graph, reused signer, or missing runtime binding | Resources may be acquired for an invalid scenario. | Validate before acquisition and verify cleanup after a failed setup. |
| A test asks an attached chain to mine, fund, or restart | The capability is unavailable because the environment does not own that chain. | Use a managed chain for lifecycle faults. |
| A deployment command overwrites unrelated CLI configuration | Existing chain, signer, or route settings disappear. | Update only target router fields and verify the remaining configuration. |
| A client, bridge, or protocol resource is registered twice | Setup creates an invalid duplicate or fails after partial deployment. | Check existing identity and registration before deployment. |
Key files
| File | Why to read it |
|---|---|
| e2e/transfer_test.go | Shows automatic and manual ICS20 delivery, timeout refunds, Besu proof paths, and validator turnover. |
| e2e/cross_route_test.go | Shows why route and client context are part of packet identity. |
| e2e/relayer_lifecycle_test.go | Shows relayer restart, clearing, and subscription recovery for in-progress packets. |
| e2e/pending_packet_test.go and e2e/node_recovery_test.go | Show the difference between delayed chain progress and a stopped chain node. |
| e2e/transaction_recovery_test.go | Shows mempool drop, fee repricing, restart retry, and pre-finality reorg recovery. |
| e2e/remote_signer_test.go | Shows remote relayer signing, key-ID checks, and remote attestor signing. |
| e2e/remote_prover_test.go | Shows delivery, timeout, and rejected application paths with remote proofs. |
| e2e/gmp_test.go | Shows successful, timed-out, account-mediated, and rejected GMP calls. |
| e2e/ift_test.go and e2e/ift_rate_limit_test.go | Show IFT burn and mint behavior, refunds, packet isolation, batching, concurrent relay status, and rate-limit retry. |
| e2e/attestation_validation_test.go | Shows signed commitment rejection before on-chain submission. |
| e2e/besu_misbehaviour_test.go and e2e/…/generate_test.go | Show Besu client freeze evidence and the proof fixtures used for supported consensus types. |
| e2e/deploy_test.go | Shows public CLI provisioning, manifests, idempotent deployment, mixed client routes, public relay access, and rendered connections. |
| e2e/attached_chain_test.go | Shows delivery through a caller-owned chain and the limits on environment control. |
| e2e/…/mesh.go | Defines attested, Besu, and mixed route topology conventions. |
| e2e/…/start.go | Defines provider selection, mode behavior, load-test gating, and environment startup. |
| e2e/…/traffic_relayer.go | Defines packet selection, status observation, stable waits, and terminal-state checks. |
| e2e/…/traffic_transfer.go | Defines transfer preparation, balance baselines, packet identity, and observable escrow, voucher, receipt, acknowledgement, and refund outcomes. |
| e2e/…/traffic_ift.go | Defines IFT pending records, balance and supply checks, batch packets, and transaction grouping. |
| e2e/…/traffic_gmp.go | Defines destination calls and target effects used by GMP scenarios. |
| e2e/load_relayer_test.go and e2e/load_attestor_test.go | Show the opt-in relayer and attestor capacity scenarios. |
| proto/…/relayer.proto | Defines relayer commands, packet selectors, status fields, and packet states used by the suite. |