Description
Problem
The test/docker-e2e package has accumulated shared setup logic across individual test files. Some helpers are currently methods on CelestiaTestSuite even when they represent reusable infrastructure setup rather than suite-specific behavior.
A concrete example is the bridge node DA network setup used by Hyperlane tests. HyperlaneTestSuite embeds CelestiaTestSuite mostly to access shared fields and helpers like WithBridgeNodeNetwork, even though the Hyperlane suite has its own setup flow and could otherwise be isolated. This is also true for the IBC test suite.
This makes it harder to split tests into smaller packages, compose suites independently, and keep setup semantics close to the components they configure.
Proposal
Move reusable Celestia chain and DA network setup semantics into cleaner helper abstractions, likely under test/docker-e2e/dockerchain.
In particular, consider moving bridge node network setup into dockerchain, since it is tightly coupled to Celestia chain configuration and lifecycle:
- creating DA bridge node configs
- wiring bridge nodes to the Celestia core node
- deriving genesis hash / custom network env
- managing cleanup of DA network resources
- exposing bridge node endpoint information for consumers like EVM sequencers
Suggested Direction
Extract helpers such as:
WithBridgeNodeNetwork
getGenesisHash
- DA network cleanup helpers
- possibly broader DA network builders used by full-stack PFB tests
into reusable functions or builder-style APIs in dockerchain.
This would let tests compose infrastructure directly instead of relying on inheritance from CelestiaTestSuite.
Example shape:
daNetwork, err := dockerchain.NewBridgeNodeNetwork(ctx, chain, dockerClient, networkID)
or:
daNetwork, err := dockerchain.NewDANetworkBuilder(t).
WithChain(chain).
WithDockerClient(client).
WithDockerNetworkID(networkID).
WithBridgeNode().
Build(ctx)
Benefits
- Reduces coupling between unrelated e2e suites.
- Makes test dependencies explicit.
- Allows suites like Hyperlane to live in their own package.
- Keeps Celestia chain and bridge-node setup semantics near
dockerchain, where they naturally belong.
- Improves reuse for future tests that need DA bridge/light node infrastructure.
- Makes
CelestiaTestSuite smaller and more focused on generic suite lifecycle rather than becoming a grab bag of infrastructure helpers.
Acceptance Criteria
- Bridge node DA network setup is available through
dockerchain or a similarly scoped helper package.
- Existing full-stack PFB and Hyperlane tests use the extracted helper.
HyperlaneTestSuite no longer needs to embed CelestiaTestSuite solely for bridge-node setup.
- Existing docker e2e tests continue to pass.
- Cleanup behavior for DA network resources remains automatic and reliable.
Description
Problem
The
test/docker-e2epackage has accumulated shared setup logic across individual test files. Some helpers are currently methods onCelestiaTestSuiteeven when they represent reusable infrastructure setup rather than suite-specific behavior.A concrete example is the bridge node DA network setup used by Hyperlane tests.
HyperlaneTestSuiteembedsCelestiaTestSuitemostly to access shared fields and helpers likeWithBridgeNodeNetwork, even though the Hyperlane suite has its own setup flow and could otherwise be isolated. This is also true for the IBC test suite.This makes it harder to split tests into smaller packages, compose suites independently, and keep setup semantics close to the components they configure.
Proposal
Move reusable Celestia chain and DA network setup semantics into cleaner helper abstractions, likely under
test/docker-e2e/dockerchain.In particular, consider moving bridge node network setup into
dockerchain, since it is tightly coupled to Celestia chain configuration and lifecycle:Suggested Direction
Extract helpers such as:
WithBridgeNodeNetworkgetGenesisHashinto reusable functions or builder-style APIs in
dockerchain.This would let tests compose infrastructure directly instead of relying on inheritance from
CelestiaTestSuite.Example shape:
or:
Benefits
dockerchain, where they naturally belong.CelestiaTestSuitesmaller and more focused on generic suite lifecycle rather than becoming a grab bag of infrastructure helpers.Acceptance Criteria
dockerchainor a similarly scoped helper package.HyperlaneTestSuiteno longer needs to embedCelestiaTestSuitesolely for bridge-node setup.