Conversation
- Add `e2e-deploy` named volume to bootstrap container so the manifest survives until tests read it - Write `/tmp/e2e-deploy.json` in docker-bootstrap.sh with contract addresses and issuer party IDs - Add E2E test architecture design doc
…file targets (#178) - Add tests/e2e/devstack/stack/interfaces.go: Anvil, Canton, APIServer, Relayer, Indexer, Postgres interfaces (build tag: e2e) - Add tests/e2e/devstack/stack/types.go: ServiceManifest, Account, AnvilAccount0/1, all request/response/row types, indexer page types - Add tests/e2e/docker-compose.e2e.yaml: thin include wrapper over root docker-compose.yaml; single entry point for E2E test runs - Extend Makefile with test-e2e, test-e2e-api, test-e2e-bridge, test-e2e-indexer targets (stub: "not yet implemented")
There was a problem hiding this comment.
Code Review
This pull request introduces a devstack framework for E2E testing, featuring Docker Compose orchestration, service discovery, and client shims for all system components including Anvil, Canton, and the API server. Feedback includes a critical bug in the API server shim where string padding for eth_call payloads is incorrectly implemented using fmt.Sprintf, which results in space padding instead of zeros. Additionally, it is recommended to replace the use of http.DefaultClient with a configured client in the Canton shim and to avoid hardcoding magic numbers for gas limits in the Anvil shim.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive set of shim implementations for E2E testing, covering Anvil, the API server, Canton, the indexer, Postgres, and the relayer. These shims provide typed wrappers for service interactions via REST, JSON-RPC, and SQL. The PR also refactors service discovery to remove unused database DSNs and updates the APIServer interface to support direct ethclient access. Feedback was provided to improve error handling when reading HTTP response bodies in the shared shim client.
Summary
Implements #180: Layer 2 of the E2E devstack — concrete implementations of all
stackservice interfaces.Each shim is initialised from a
ServiceManifest(produced by Layer 3ServiceDiscovery) and wraps a real network client.shim/anvil.goAnvilShimERC20Balancevia generatedcontracts.PromptToken;ApproveAndDepositbuilds transactor, callsApprove→DepositToCanton, polls for receiptsshim/canton.goCantonShimIsHealthyvia HTTP GETshim/apiserver.goAPIServerShimX-Signature/X-Messageauth headers on transfer routesshim/relayer.goRelayerShimGET /health,/ready,/api/v1/transfers,/api/v1/statusshim/indexer.goIndexerShim/indexer/v1/admin/…endpoints with pagination query paramsshim/postgres.goPostgresShimdatabase/sql+lib/pq; whitelist insert (idempotent); user SELECTTest plan
go build -tags e2e ./tests/e2e/...compiles cleanlystackinterface (compile-time checked via interface assignments in Layer 4 System)