Skip to content

feat(load): Connect load tests to prod-testnet#766

Open
rodrigombsoares wants to merge 8 commits into
pr3-env-bootstrapfrom
pr4-prod-testnet
Open

feat(load): Connect load tests to prod-testnet#766
rodrigombsoares wants to merge 8 commits into
pr3-env-bootstrapfrom
pr4-prod-testnet

Conversation

@rodrigombsoares

@rodrigombsoares rodrigombsoares commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Connects CCIP e2e and WASP load tests to Canton TestNet + Sepolia on top of the pr3 env-bootstrap scaffolding. Adds real Canton auth, compile-time v1_0_0 ledger bindings (-tags=prodledger), contract reuse on prod, all four load directions, and CI that runs them against live infrastructure. Includes a prod receiver fix: CCIPReceiver deploy now wires the required committee-verifier CCV, with a CLI command and test bootstrap auto-resolution so inbound EVM→Canton execution works on prod.


Features

Prod-testnet connectivity & config

  • env-prod-testnet.ci.toml — checked-in config for Canton TestNet + Sepolia (CLDF addresses, RPCs, indexers, Canton gRPC endpoints)
  • Default prod config path changed from env-prod-testnet-out.tomlenv-prod-testnet.ci.toml (overridable via CCIP_CONFIG_FILE)
  • Canton auth for remote ledger (cldf_auth.go): OAuth client credentials / authorization code / static JWT via CANTON_AUTH_*, CANTON_PARTY_ID, CANTON_GRPC_URL, etc.
  • cldf.go refactor — real auth providers, party resolution from env or ledger, optional internal endpoints
  • Connection smoke testTestIntegration_CantonProdTestnet_Connection (gRPC auth + list holdings)
  • .gitignore — local prod/staging env files under ccip/devenv/

Ledger bindings for deployed contracts (-tags=prodledger)

Prod ledger uses bindings/generated/v1_0_0, not latest. New ccip/devenv/ledgerbind/ package:

  • Compile-time switch: devenv (default) vs prod (prodledger)
  • Type exports, input builders, and context adapters for v1_0_0 field-name differences (CcvExtraContext vs Context, etc.)
  • Tag-specific send/execute ops (send_op_prod.go, execute_op_prod.go)
  • Wired through impl.go, manual_execution.go, fee_quoter_limits.go

Contract lifecycle on prod (reuse, don’t redeploy)

  • PerPartyRouter / CCIPSender / CCIPReceiver reuse — find existing contracts on ledger by party + instance ID instead of always creating new ones
  • Configurable instance IDs via CANTON_ROUTER_INSTANCE_ID, CANTON_SENDER_INSTANCE_ID, CANTON_RECEIVER_INSTANCE_ID
  • isRemote() — remote chains skip FeeQuoter ACS lookups (e.g. max data bytes check)

Prod receiver fix (required CCV)

On prod, inbound EVM→Canton messages fail if the party’s CCIPReceiver is deployed without the committee verifier in RequiredCCVs. This PR fixes that in three places:

CLI: canton sync-receiver-ccv

New CLI subcommand to deploy or update a CCIPReceiver with the correct required CCV before running inbound prod load/e2e:

canton sync-receiver-ccv \
  --required-ccv '<committee-verifier-instanceId@owner>' \
  --finality 1
  • Calls cantonops.GetOrCreateReceiver — finds an existing receiver by finality, updates RequiredCCVs if needed, or deploys a new one
  • --required-ccv is the Canton committee verifier raw instance address (instanceId@owner)
  • Intended as a one-shot setup step on prod-testnet

DeployCCIPReceiver now includes CCV

DeployCCIPReceiver in manual_execution.go no longer deploys with RequiredCCVs: nil. It reads CANTON_RECEIVER_REQUIRED_CCV via receiverRequiredCCVsFromEnv() and passes it into the receiver template at deploy time:

Template: ccipreceiver.CCIPReceiver{
    ...
    RequiredCCVs: requiredCCVs,  // from CANTON_RECEIVER_REQUIRED_CCV
    ...
}

Tests and load runs that call SetupReceive / ManuallyExecuteMessage automatically get a correctly configured receiver when the env var is set.

Test bootstrap auto-resolution

SetupCantonReceive in tests/helpers.go auto-populates CANTON_RECEIVER_REQUIRED_CCV from the CLDF datastore (committee verifier address) when unset, so e2e/load tests don’t require manual env wiring on prod. On failure it tells you to set the var explicitly or run sync-receiver-ccv.

Config fix

env-prod-testnet.ci.toml — committee verifier entry updated with the correct raw-instance label (committeeverifier-tqkny@ccvOwner::...) so datastore resolution works.

Related hardening

  • testhelpers.ResolveAddressFromDatastore — clearer error when address ref has no labels (raw instance address missing)

EVM→Canton message path fixes

  • NO_EXECUTION_ADDRESS instead of EVM Executor — Canton execution is manual; EVM executor doesn’t support Canton dest
  • EVMToCantonMessageOptions centralized with correct finality + no-exec executor
  • Verifier observation — indexer required, aggregator optional (prod may lack aggregator)
  • hashInstanceAddress — handles both devenv raw addresses (instanceId@owner) and prod pre-hashed 32-byte addresses
  • ConfirmEVMSendOnSource bypass on prod — uses tx receipt only; avoids broken block-1→latest poller on public Sepolia RPC

Load tests on prod-testnet (all 4 directions)

Test Prod behavior
Canton→EVM message Send-only (CANTON_LOAD_SKIP_EXEC_CONFIRM=true); no EVM exec confirm
EVM→Canton message Full confirm (send → receipt → ConfirmExecOnDest)
Canton→EVM token Full confirm; no balance assert on prod
EVM→Canton token Full confirm; fund TEST + ETH on Sepolia

Makefile targets added: run-*-load-prod, run-*-token-e2e-prod (all use -tags=prodledger -ccip-env=prod-testnet).

Prod-specific test behavior:

  • No Canton minting — logs required Amulet/LINK/TEST balances instead
  • PRIVATE_KEY drives EVM sender/receiver on prod (ResolveEVMReceiver)
  • Fee constants lowered (50→5 Amulet, 130→13) for prod compatibility

Token lane resolution on prod

  • resolveTokenLaneFromDatastore — when on-chain GetTokenTransferConfigs doesn’t match (typical on prod), fall back to TOML + CLDF datastore using remote_pool_* refs
  • Resolves source/dest tokens and Canton transfer instruments from deployed addresses

CI / GitHub Actions

  • ccip-load-test action consolidated — devenv setup, prod Go install, test run, log upload in one action
  • Prod runs use -tags=prodledger -ccip-env=prod-testnet (was missing in pr3)
  • Auto skip_exec_confirm=true for canton2evm direction in prod CI
  • Removed ccip-load-command.yml workflow + chatops reference

Bug fixes

Fix What
v1_0_0 bindings Entire ledgerbind layer — prod template IDs / field names were wrong with latest bindings
Prod receiver Required CCV on receiver deploy; committee verifier label in TOML; CLI sync-receiver-ccv; test auto-resolution
EVM load gun Stop passing executor addr; use shared EVMToCantonMessageOptions
E2E TestMain flag.Parse() so -ccip-env works in e2e package

@rodrigombsoares rodrigombsoares requested a review from a team as a code owner July 8, 2026 16:04
Comment thread ccip/devenv/tests/integration/canton_prod_testnet_connection_test.go Outdated
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