Introducing a new way to review your PRs.

Read the announcement

lfdt-ibc / ibc

The Inter-Blockchain Communication Protocol (IBC) is a neutral, open standard for secure cross-ledger interoperability

View on GitHub

18 documents · Updated Nov 23, 2026

docs / e2e-load-testing

E2E load testing

E2E load testing drives high-volume relayer, IFT, and attestor traffic through a provisioned two-chain environment. It checks that the relayer can process sustained packet load, that Catalyst traffic reaches terminal packet states, and that request and test deadlines stop work in a controlled way.

Load-test scope

Provisioned environment

Each load scenario creates an isolated EVM environment with an attested IBC mesh, deployed IFT applications, a configured relayer, and the attestor process under test. The scenario owns the full path from chain traffic to public relayer or attestor responses. The attestor scenario uses chain A's attestor and one transfer route to create the packets that its requests later inspect. See end-to-end validation for the wider environment model and E2E harness and test matrix for provider selection.

The load tests are deliberately not parallel. One environment must absorb the planned traffic so that packet counts, timing, and resource pressure describe the scenario rather than competition from another load run.

References: e2e/load_relayer_test.go• L23-33 e2e/load_relayer_test.go• L189-224 e2e/load_attestor_test.go• L31-32 e2e/load_attestor_test.go• L158-194

Traffic roles

The load path separates traffic generation from traffic completion. Catalyst submits IFT transactions to the source chains. The relayer observes the resulting packets and submits their receive and acknowledgement work. Attestor scenarios send a small set of real packets first, then use those known packets and chain heights to exercise attestation requests.

RolePurposeCompletion signal
CatalystCreates IFT transactions at a chosen packet rate and block densityExpected transaction count and no run error
RelayerFinds packets from Catalyst transactions and relays them in both directionsEvery discovered packet remains SUCCEEDED
AttestorServes packet and state attestations under request pressureSuccessful response with the requested packet or height

References: e2e/load_relayer_test.go• L92-117 e2e/load_relayer_test.go• L132-154 e2e/load_attestor_test.go• L40-48 e2e/load_attestor_test.go• L50-92

Relayer traffic

Bidirectional IFT load

The relayer load scenario sends IFT traffic from chain A to chain B and from chain B to chain A at the same time. It derives a stable wallet set from one mnemonic, funds those wallets with gas and IFT on both chains, and then runs two Catalyst workloads against the two route-specific IFT contracts.

The suite has two traffic shapes:

  • Burst: 3,000 total packets with 150 packets per block. The relay completion budget is five minutes.
  • Long run: 8,000 total packets with 20 packets per block. The relay completion budget is ten minutes.

Each direction creates half of the total packet count. The packet count must fit the selected packets-per-block shape so Catalyst can form complete blocks of traffic.

References: e2e/load_relayer_test.go• L52-68 e2e/load_relayer_test.go• L92-130 e2e/…/catalyst_ift.go• L47-65 e2e/…/catalyst_ift.go• L74-121

Catalyst completion

Catalyst completion proves that the traffic generator submitted the planned source transactions. The test checks the result for each route before it asks the relayer to finish the packets. This separates a generator or chain-ingress problem from a relay problem.

The load test uses the Catalyst transaction list as the bridge between submission and relay checks. The relayer may index a source transaction after Catalyst returns. The await step therefore discovers packets by source transaction and retries indexing before it begins packet-state waits.

Packet discovery checks source transactions in bounded batches. It polls every two seconds and gives each transaction at most ten lookup attempts. Once packets are found, eight workers wait for their successful relay state in parallel. A lookup that reaches its limit produces an indexing error, while a packet that misses its completion budget produces a relay wait error.

This diagram shows how generated IFT traffic becomes a relayer completion result.

flowchart LR
    A[Fund wallets and IFT] --> B[Run Catalyst A to B]
    A --> C[Run Catalyst B to A]
    B --> D[Record source transactions]
    C --> D
    D --> E[Find packets in relayer status]
    E --> F[Wait for packet success]
    F --> G[Assert every packet succeeded]

References: e2e/load_relayer_test.go• L132-184 e2e/…/catalyst_await.go• L47-112 e2e/…/catalyst_await.go• L114-209

Attestor traffic

Packet attestation

The packet attestation scenario first sends ten real packets and delivers them through the relayer. It uses each emitted packet with its source height to build the request inputs. The load calls then choose from those known packets and ask the chain A attestor for an attestation. A valid response must contain an attestation at the same height as the request.

This scenario measures the attestor service against packet-shaped requests rather than synthetic data. It requires successful calls during a 30-second run at 500 requests per second with 32 concurrent callers.

References: e2e/load_attestor_test.go• L34-92 e2e/load_attestor_test.go• L158-194 e2e/load_attestor_test.go• L210-256

State attestation

The state attestation scenario uses the latest observed source-chain height as its range. Each request selects a height from 1 through that latest height and requires the attestor to return an attestation for that exact height.

This scenario checks historical state access under pressure. It runs for 30 seconds at 100 requests per second with 16 concurrent callers and requires at least one successful response.

References: e2e/load_attestor_test.go• L94-143

Load control

Request pressure

The shared load runner offers calls at a steady rate to a bounded worker pool. A call has one of four outcomes: succeeded, failed, timed out, or dropped because all workers are busy. It records latency for completed success and failure calls and reports average and percentile values for run diagnosis.

The runner keeps calls that are already in progress after the offering window ends. This makes the result describe all work accepted by the workers instead of only work that finished before the rate window closed.

References: e2e/…/simple.go• L16-39 e2e/…/simple.go• L42-135 e2e/…/simple.go• L137-189

Request timeout

Each load call has a three-second deadline. A deadline error counts as a timeout rather than a generic failure. A busy worker pool causes a drop before a call starts, so drops show that the offered rate exceeded available concurrency while timeouts show that an accepted call did not finish in time.

The load result therefore distinguishes pressure at the queue from slow or unavailable services. The attestor scenarios require positive success counts, while the relayer scenario requires all Catalyst and packet-completion checks to pass.

References: e2e/…/simple.go• L26-35 e2e/…/simple.go• L57-79 e2e/…/simple_test.go• L44-123

Test deadline

The relayer scenario uses one context for Catalyst submission and post-submit packet waits. Its available time comes from the Go test deadline with a one-minute margin for cleanup. If the test has no deadline, the load runner uses a ten-minute fallback. This prevents the test framework from killing the process while packet waits or environment cleanup are still active.

References: e2e/load_relayer_test.go• L132-148 e2e/…/timeout.go• L10-32

Packet completion wait

Packet completion has a separate budget from request timeout. The await path polls relayer status every two seconds and checks up to 200 source transactions in one poll. It limits each source transaction to ten index lookups. It then waits for every discovered packet with a route-specific completion budget. Eight workers process discovered packets in parallel without turning relayer status into an unbounded request stream.

If a source transaction is not indexed after its lookup attempts, the test reports that transaction as an error. If the context ends while transactions remain undiscovered, the test reports the remaining transactions as an indexing error. If a packet does not reach SUCCEEDED before the shared context ends, the test returns the wait error. These checks make delayed indexing and delayed relay visible as different failures.

References: e2e/…/catalyst_await.go• L19-24 e2e/…/catalyst_await.go• L47-112 e2e/…/catalyst_await.go• L114-209

Run boundary

Load-test activation

Load tests run only when the load flag is enabled through E2E_LOAD=true, E2E_LOAD=1, or the equivalent -e2e.load test flag. The E2E Makefile starts the observability stack when it detects that mode, so the run can be compared with load-test dashboards without changing the test environment itself.

The normal E2E flow remains the entry point. Use E2E relayer scenarios for normal packet outcomes and recovery behavior; this page focuses on traffic volume and service pressure.

References: e2e/load_relayer_test.go• L23-24 e2e/load_attestor_test.go• L31-32 e2e/Makefile• L40-42 e2e/Makefile• L86-90

Change checklist

When these files or sections are changed, remember to consider these:

  • Change the Catalyst packet shape and check packet-count divisibility, wallet funding, route direction, and the expected result count together.
  • Change source transaction or relayer status fields and preserve the link from each Catalyst transaction to every emitted packet.
  • Change load rate or concurrency and review both dropped-call behavior and the three-second per-call timeout.
  • Change the shared test deadline and keep submission, packet discovery, packet completion, and cleanup inside the same context margin.
  • Change packet polling, the per-poll lookup cap, or lookup limits and preserve the distinction between delayed indexing and failed relay completion.
  • Change load activation flags and keep observability-stack startup aligned with the way CI and local runs enable load tests.
  • Change attestor request construction and preserve exact packet and height matching in the response checks.
  • Change the attestor setup or packet seed count and keep the selected attestor, route, delivered packets, and packet source heights aligned.

Important failure modes

TriggerConsequenceGuard
A wallet lacks gas or IFT on one source chainCatalyst cannot submit the planned trafficFund every derived wallet on both chains before the run
Total packets are not divisible by packets per blockCatalyst rejects the load shape before traffic startsChoose a packet count that forms complete blocks
The relayer indexes a source transaction too slowlyThe packet is reported as not indexed after the lookup limitKeep the discovery retries and allow the environment to reach the relayer status service
The discovery context ends with source transactions still pendingThe run reports the remaining transactions as an indexing errorUse the shared deadline and completion budget for the full discovery phase
The offered request rate exceeds worker capacityCalls are dropped before executionIncrease concurrency only with the intended pressure model, or lower the offered rate
An accepted load call exceeds three secondsIt counts as timed out and does not count as a generic failureTreat timeout counts as service-latency pressure and inspect the target service
A packet does not reach SUCCEEDED before its route budgetThe relayer load test fails even if Catalyst submitted all transactionsCheck relayer health, route timing, packet indexing, and chain progress
The outer test deadline expires during packet waitsThe test can stop before completion and cleanupLeave the one-minute deadline margin and use the shared context
Packet or state attestation returns the wrong height or packetThe attestor load request fails its response contractMatch the response identity to the request before counting success
Load mode is enabled without the observability stackLoad results lack the intended dashboard dataLet the Makefile detect the load flag and start observability before tests
The attestor setup does not observe chain A or the seeded packets are not deliveredPacket load cannot build valid request inputsSelect the attestor for the source chain and deliver each seed packet before load starts

Key files

FileWhy to read it
e2e/load_relayer_test.goDefines the bidirectional IFT burst and long-run scenarios and their end-to-end assertions.
e2e/load_attestor_test.goDefines packet and state attestation pressure against a real provisioned attestor.
e2e/…/catalyst_ift.goDefines the IFT traffic shape, deterministic wallets, and Catalyst result boundary.
e2e/…/catalyst_await.goDefines bounded source-transaction discovery and parallel packet completion waits.
e2e/…/simple.goDefines request rate, concurrency, per-call timeout, outcome counts, and latency reporting.
e2e/…/timeout.goDefines the test-deadline budget shared by traffic submission and relay completion.
e2e/…/traffic_setup.goShows the provisioned applications, routes, and relayer configuration used by load scenarios.
e2e/MakefileShows load-test activation and observability-stack startup.