Skip to content

feat(devenv): E2E and load prod#735

Open
rodrigombsoares wants to merge 22 commits into
mainfrom
e2e-load-prod
Open

feat(devenv): E2E and load prod#735
rodrigombsoares wants to merge 22 commits into
mainfrom
e2e-load-prod

Conversation

@rodrigombsoares

@rodrigombsoares rodrigombsoares commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

This branch extends CCIP devenv e2e and load tests so they can run against Canton TestNet + Sepolia (prod-testnet) in addition to the local Docker devenv. Tests are selected via -ccip-env / CCIP_ENV, with Canton auth wired through env vars and a new CLDF auth layer.
Load gun is refactored to be environment-agnostic, adds structured load metrics (per-message timings and failure counts), and fixes concurrency issues.
Token transfer tests are updated with env-keyed config and prod datastore fallbacks for TEST/LINK lanes.

Features

env Bootstrap

  • Added a BootstrapE2E helper that makes test functions env agnostic

Prod-testnet environment

  • Introduces -ccip-env / CCIP_ENV with devenv (default) and prod-testnet targets (ccip/devenv/tests/env.go).
  • Adds env-prod-testnet.ci.toml for CI against live Canton TestNet + Sepolia RPCs and CCIP indexer endpoints.
  • Enables remote Canton connection via cldf_auth.go (Okta authorization-code / client-credentials / static JWT overrides).
  • Removes hard dependency on an aggregator for verifier observation; indexer is required, aggregator is optional (verifier_observation.go, impl.go).
  • Prod runs reuse existing router/sender/receiver contracts when instance IDs match; second runs do not redeploy.

Load test infrastructure

  • Refactors CCIPLoadGun to be environment-agnostic: no in-gun minting or SetupSend; callers pre-fund before WASP starts.
  • Adds LoadMetricsCollector (metrics.go) with per-message phase timings (send, confirm-send, confirm-exec), percentiles (P90/P95/P99), and failure counts by phase.
  • Logs messageID per successful send; fixes concurrency / single-flight issues in the gun.
  • Pluggable ConfirmSendFunc and SkipExecConfirm for prod vs devenv behavior.

Token lane configuration

  • Restructures token_transfer_config.toml into env-keyed sections ([devenv.*], [prod-testnet.*]).
  • Adds prod fallback resolution via remote_pool_* fields when combo discovery fails on simple TEST/LINK qualifiers.
  • Supports Canton→EVM transfer_instrument_id (e.g. link-token) and documents fixed-point vs wei transfer_amount formats.
  • Expands token_lane.go with prod-aware discovery, validation, and tests (token_lane_test.go).

Supporting changes

  • manual_execution.go: improved prod handling (instance address hashing, confirm-send/exec paths).
  • helpers.go: env-aware confirm timeouts, prod balance logging, PRIVATE_KEY-derived EVM receiver on prod.
  • .gitignore: local prod/staging env files under ccip/devenv/.
  • Smoke tests for env parsing, CLDF auth, token lane resolution, and manual execution.

Testing

Create a test file .env.prod-testnet.local

CCIP_ENV=prod-testnet

# Load test configuration
CANTON_LOAD_MESSAGE_RATE=1/45s
CANTON_LOAD_DURATION=30m
CANTON_CONFIRM_SEND_TIMEOUT=2m
CANTON_CONFIRM_EXEC_TIMEOUT=10m
CANTON_LOAD_SKIP_EXEC_CONFIRM=false

# For debug run
CANTON_GRPC_URL=testnet.cv1.bcy-v.metalhosts.com:443
CANTON_PARTY_ID=<CANTON_PARTY_ID>
CANTON_AUTH_URL=<OKTA_URL>
CANTON_CLIENT_ID=<CANTON_CLIENT_ID>
CANTON_AUTH_TYPE=authorizationCode
PRIVATE_KEY=<PRIVATE_KEY>

set the env in terminal
set -a; source ../../.env.prod-testnet.local; set +a

run the tests one direction at a time
go test -timeout 120m -v -count=1 -run '^TestEVM2Canton_TokenLoad$'
go test -timeout 120m -v -count=1 -run '^TestCanton2EVM_TokenLoad$'

@rodrigombsoares rodrigombsoares requested a review from a team as a code owner July 1, 2026 11:16
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

👋 rodrigombsoares, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

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