Skip to content

test(celestia-node-fiber): docker-compose 4-val + bridge showcase scaffold#3288

Open
walldiss wants to merge 1 commit intoevstack:julien/fiberfrom
walldiss:feat/fibre-docker-showcase
Open

test(celestia-node-fiber): docker-compose 4-val + bridge showcase scaffold#3288
walldiss wants to merge 1 commit intoevstack:julien/fiberfrom
walldiss:feat/fibre-docker-showcase

Conversation

@walldiss
Copy link
Copy Markdown

Summary

Adds `tools/celestia-node-fiber/testing/docker/`, a self-contained docker-compose stack and Go test driver that exercises the `celestia-node-fiber` adapter end-to-end against a real 4-validator + 1-bridge Fibre network.

The existing in-process `testing/showcase_test.go` (single-validator) proves the adapter wires correctly but doesn't exercise:

  • real consensus 2/3 quorum collection,
  • inter-validator P2P,
  • multiple Fibre servers contributing partial signatures,
  • the `dns:///` host registry resolution path,
  • the bridge syncing real headers off a network it doesn't itself drive.

This stack does. The Go test driver (build-tagged `fibre_docker`) reuses the same Upload → Listen → Download flow as the in-process showcase, just pointed at the running compose endpoints.

Layout

```
tools/celestia-node-fiber/testing/docker/
├── Dockerfile.app celestia-appd + fibre binaries (-tags fibre,ledger)
├── Dockerfile.bridge celestia-node bridge (-tags fibre)
├── compose.yaml bootstrap → val0..val3 → register → bridge
├── scripts/
│ ├── init-genesis.sh 4-val genesis bootstrap
│ ├── start-validator.sh per-val entrypoint (appd + fibre server)
│ ├── register-fsps.sh MsgSetFibreProviderInfo (with dns:/// prefix)
│ │ + MsgDepositToEscrow for the test client
│ └── start-bridge.sh bridge init + JWT export to shared volume
├── docker_test.go TestDockerShowcase — host-side Go driver
└── README.md operator instructions + known rough edges
```

Run

```bash
cd tools/celestia-node-fiber/testing/docker
docker compose up -d --build

wait until `docker compose logs register` writes /shared/setup.done

cd ../..
go test -tags 'fibre fibre_docker' -count=1 -timeout 5m ./testing/docker/...
```

Override host endpoints via `FIBRE_BRIDGE_ADDR` / `FIBRE_CONSENSUS_ADDR` env vars if the default `127.0.0.1:26658` / `127.0.0.1:9090` collide.

Build args

arg Dockerfile default
`CELESTIA_APP_REF` `Dockerfile.app` `main`
`CELESTIA_NODE_REF` `Dockerfile.bridge` `feature/fibre`

Pin to a specific commit via `docker compose build --build-arg CELESTIA_NODE_REF=`.

Honest scope: this is a scaffold

The README lists the iteration points clearly. Each is a known rough edge that the first end-to-end run on your machine will likely surface:

  1. `fibre` binary CLI flags in `start-validator.sh` are illustrative — real flags from `celestia-app/cmd/fibre --help` may differ.
  2. `config.toml`/`app.toml` overrides use `sed` against expected default lines; defaults can drift.
  3. No proper healthchecks on validators (`register` polls `celestia-appd status` instead).
  4. No `make docker-test` wrapper yet — manual `docker compose up` + `go test`.
  5. No build cache for `/go/pkg/mod` / `/root/.cache/go-build` — every `--build` re-clones.

These are documented up front rather than claimed-and-not-true. The value of the scaffold is in unblocking the next iteration step, not in pretending it works flawlessly.

Verified

  • `go build -tags 'fibre fibre_docker' ./...` clean
  • `go vet -tags 'fibre fibre_docker' ./...` clean
  • Existing `TestShowcase` + `TestShowcaseResume` still pass with `-tags fibre` (no regression — new directory is build-tag isolated)
  • Full end-to-end run against the docker stack — not yet validated; iteration items above will likely need fixing on first run

🤖 Generated with Claude Code

…ffold

Adds tools/celestia-node-fiber/testing/docker/, a self-contained
docker-compose stack that brings up four celestia-app validators (each
running an in-process Fibre server), a celestia-node bridge, and a
one-shot init container that registers FSP hosts via valaddr and
funds an escrow. A Go test driver (build tag fibre_docker) connects
to the running stack and exercises the celestia-node-fiber adapter
end-to-end against real 2/3-quorum Fibre.

Why a docker showcase: the in-process testing/showcase_test.go single-
validator setup proves the adapter wires correctly but doesn't
exercise real consensus quorum, inter-validator P2P, multiple Fibre
servers contributing partial signatures, or dns:/// host registry
resolution. The 4-validator docker stack exercises all of those.

Layout:
- Dockerfile.app: celestia-appd + fibre binaries with -tags fibre,ledger
- Dockerfile.bridge: celestia-node bridge with -tags fibre
- compose.yaml: bootstrap → val0..val3 → register → bridge dependency chain
- scripts/init-genesis.sh: 4-validator genesis bootstrap
- scripts/start-validator.sh: per-validator entrypoint (appd + fibre)
- scripts/register-fsps.sh: MsgSetFibreProviderInfo (with dns:/// prefix)
                             + escrow funding for the test client
- scripts/start-bridge.sh: bridge init + JWT export to shared volume
- docker_test.go: TestDockerShowcase — host-side Go driver
- README.md: operator instructions + the known-rough edges

Build tag fibre_docker keeps the test out of the default go test
runs since it requires the external docker stack to be up.

The scaffold is documented honestly: it lays out the architecture,
build args, and the iteration points (fibre CLI flag confirmation,
config.toml override robustness, healthchecks, build-cache speedups).
The point of landing it now is to unblock the next iteration step
rather than to claim flawless first-run behavior.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 26, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e6139b2c-423f-4557-ab17-3c85bfeba3a1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant