Skip to content

test: e2e initial setup - #1275

Merged
gjermundgaraba merged 35 commits into
developmentfrom
gjermund/e2e-arch
Jul 27, 2026
Merged

test: e2e initial setup#1275
gjermundgaraba merged 35 commits into
developmentfrom
gjermund/e2e-arch

Conversation

@gjermundgaraba

Copy link
Copy Markdown
Contributor

No description provided.

@gjermundgaraba
gjermundgaraba changed the base branch from main to development July 15, 2026 02:27
@gjermundgaraba gjermundgaraba changed the title ? test: e2e initial setup Jul 15, 2026
@gjermundgaraba
gjermundgaraba marked this pull request as ready for review July 15, 2026 03:39
@gjermundgaraba
gjermundgaraba requested a review from a team as a code owner July 15, 2026 03:39
@greptile-apps

greptile-apps Bot commented Jul 15, 2026

Copy link
Copy Markdown

Too many files changed for review. (182 files found, 100 file limit)

Bypass the limit by tagging @greptile-apps to review.

Replace the mock transport with the real solidity-ibc-eureka contracts.
The harness deploys ICS26Router, ICS20Transfer, ICS27GMP, and their
logic contracts behind ERC1967 proxies on every IBC instance, registers
a permissive DummyLightClient per connection end, and opens the relaying
selectors to the public role. The stub relayer is rewritten as
link/internal/ibcrelay: it scans SendPacket, submits recvPacket with
empty proofs, extracts the ack from the receipt (falling back to a
WriteAcknowledgement scan for Noop races), and completes the ack or
timeout leg on the source.

Traffic coverage now exercises the real applications: ICS20 transfers
with voucher-mint verification, ICS27 GMP calls against a Counter, and
IFT burn/mint transfers (on top of GMP) including timeout refunds. The
MockIFT/MockGMP contracts, the test-apps CLI, and their bindings are
deleted; test-app compilation moves into the harness contracts
workspace with generated bindings checked by make check-test-apps.

go-ethereum aligns at v1.17.4 across modules, the harness go.mod
ignores Go sources vendored under the bun contracts workspace, and the
e2e lane timeout rises to 60m for the slower per-test deploys. All
three lanes pass: anvil 103s, anvil-interval 1257s, besu 1410s.
# Conflicts:
#	link/.mockery.yaml
#	link/Makefile
#	link/api/v2/attestor/attestor.pb.go
#	link/api/v2/client.go
#	link/api/v2/relayer/relayer.pb.go
#	link/api/v2/types.go
#	link/go.mod
#	link/go.sum
#	link/internal/service/attestor/service_test.go
#	link/internal/types/v2/attestor/attestor.mock.go
#	link/internal/types/v2/relayer/relayer.mock.go
#	proto/link/attestor.proto
# Conflicts:
#	link/.mockery.yaml
#	link/cmd/ibc/relayer.go
#	link/go.mod
#	link/internal/service/attestor/service_test.go
#	link/internal/tests/mocks/attestor.go
#	link/internal/tests/mocks/relayerapi.go
The relayer command now boots bootstrap.BuildRelayer (migrate, server on
an ephemeral port, readiness JSON on stdout, dispatch loop, graceful
shutdown) and the ibcrelay stub relayer it replaces is deleted; only the
config-validate piece remains. The e2e harness drives the relayer over
its connect RPCs in dual mode: one local attestor per chain, sqlite in
the workdir, finalityOffset 1, and 1s packet batch timeouts.

Fixes surfaced by relaying through the real stack:
- sqlite WAL was never enabled (journal_mode passed as a bare query
  param the driver ignores) and there was no busy_timeout, so writers
  blocked readers and concurrent statements failed with SQLITE_BUSY
- the state finisher ignored WriteAckStatus, so error acknowledgements
  completed as COMPLETE_WITH_ACK
- PacketStatus gains write_ack_error; Relay of an unknown transaction
  reports CodeNotFound instead of an internal error

The mining-pause tests now assert stable-pending while paused and
completion after resume: the relayer refuses to submit to a chain whose
clock is stale and needs a block past the recv for ack finality. The
transfer timeout shrinks to 15s because the pipeline gates timeouts on
the relayer's own clock, which AdvanceTime cannot move.
Fold ibc config new/validate into cmd/ibc directly, slim the relayer
readiness event to event/chainsConnected/http, and drop the unused
Assess/Requirements machinery from the e2e harness along with the
lint-ibcrelay-tests target and stale dependencies.
The child's stderr only reaches the log writer once cmd.Wait drains the
exec pipe, so building a readiness-failure error immediately after a
stdout EOF could report an empty log tail. Wait (bounded) for the process
handle before snapshotting the tail.
Rename environment/assessment.go to capabilities.go to match its remaining
contents, and drop the stale 'temporary' wording from the e2etest package
and Signers doc comments now that the acceptance tests drive the real
relayer.
The nested Go module duplicated dependency files, lint runs, and CI
wiring while the internal/ path rule already enforces the import
boundary. Fold its requirements into e2e/go.mod, lint once, and key the
harness CI test steps off a matrix flag instead of a module path.

Also drop a stale AGENTS.md reference to a harness-local golangci
config that no longer exists.
Comment thread .github/workflows/link.yml Outdated
@@ -0,0 +1,92 @@
name: Link and E2E

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have ibc-link CI; let's extract only e2e part and name it e2e.yml

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed. done

Comment thread link/CLAUDE.md
Comment thread link/keyfile/keyfile.go
Comment thread link/cmd/relayercmd/command.go Outdated
Comment thread link/internal/config/config.go
Comment thread link/cmd/ibc/attestor.go
Comment thread link/cmd/ibc/relayer.go
Link lint, build, and tests are already covered by ibc-link-ci.yml with
a stronger setup (path filters, concurrency cancellation, merge_group,
postgres-backed tests), and its verify-codegen job subsumes check-proto.
Keep link/** and proto/** as triggers since e2e builds the Link binary.
The handler injection in relayercmd.NewCommand existed so the removed
ibcrelay shim could share the command; with one caller left, define the
relayer commands as plain vars like the attestor does. relayercmd keeps
only the wire contract types the e2e suite imports.
The fallback lookup (auto-append .json, auto-prepend keys/) is existing
behavior whose removal does not belong in this PR; dropping it can be
proposed separately.
@gjermundgaraba
gjermundgaraba requested a review from swift1337 July 27, 2026 21:09
Like the key file fallbacks, removing this operator flag does not belong
in this PR; dropping it can be proposed separately.
Comment thread link/cmd/ibc/config.go Outdated
flagConfigValidateLive bool

// if true, fail on unknown fields in the config file
flagConfigValidateLive bool

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this can be reverted

@gjermundgaraba gjermundgaraba Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, fixed! good catch

An overzealous cleanup pass stripped doc comments, a tracked todo, and
formatting that do not belong in this PR. Keep the one real fix: pass
the --strict flag through to LoadFromFile instead of hardcoding false.
@gjermundgaraba
gjermundgaraba merged commit fedd4ef into development Jul 27, 2026
11 checks passed
@gjermundgaraba
gjermundgaraba deleted the gjermund/e2e-arch branch July 27, 2026 21:37
@linear-code

linear-code Bot commented Jul 29, 2026

Copy link
Copy Markdown

FOU-516

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants