You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ccip/devenv/README.md
+71-3Lines changed: 71 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,20 @@ cd ccip/devenv/tests/load && go test -timeout 15m -v -count 1 -run '^TestCanton2
64
64
65
65
If the out file is missing the test skips with a hint.
66
66
67
+
### Canton → EVM token load (requires devenv)
68
+
69
+
Separate test from message-only load: `TestCanton2EVM_TokenLoad`. Resolves the token lane declared in [`token_transfer_config.toml`](./tests/token_transfer_config.toml) (see [Token lane configuration](#token-lane-configuration)) against the source chain's `GetTokenTransferConfigs`, validating every destination has the lane. Pre-mints Canton fee + transfer holdings, runs WASP, then asserts EVM receiver token balance delta.
70
+
71
+
```bash
72
+
make run-canton2evm-token-load
73
+
```
74
+
75
+
Equivalent:
76
+
77
+
```bash
78
+
cd ccip/devenv/tests/load && go test -timeout 20m -v -count 1 -run '^TestCanton2EVM_TokenLoad$'
79
+
```
80
+
67
81
### EVM → Canton load (requires devenv)
68
82
69
83
Sequential EVM→Canton messages against the Canton destination in the env file. Uses the same schedule env vars as Canton→EVM (`CANTON_LOAD_MESSAGE_RATE`, `CANTON_LOAD_DURATION`). EVM accounts are pre-funded by devenv; no Canton pre-mint.
@@ -85,15 +99,69 @@ Equivalent:
85
99
cd ccip/devenv/tests/load && go test -timeout 15m -v -count 1 -run '^TestEVM2Canton_Load$'
86
100
```
87
101
102
+
### EVM → Canton token load (requires devenv)
103
+
104
+
Separate test from message-only load: `TestEVM2Canton_TokenLoad`. Resolves the token lane declared in [`token_transfer_config.toml`](./tests/token_transfer_config.toml) (see [Token lane configuration](#token-lane-configuration)), logs EVM sender balance vs estimated transfer need (devenv pre-funds sender), runs WASP, logs Canton holdings post-run.
105
+
106
+
```bash
107
+
make run-evm2canton-token-load
108
+
```
109
+
110
+
Equivalent:
111
+
112
+
```bash
113
+
cd ccip/devenv/tests/load && go test -timeout 20m -v -count 1 -run '^TestEVM2Canton_TokenLoad$'
114
+
```
115
+
116
+
### Token lane configuration
117
+
118
+
Token transfer tests (both e2e and load) declare the token lane to send in [`tests/token_transfer_config.toml`](./tests/token_transfer_config.toml). The test resolves the declared **token pool identity** against the source chain's `GetTokenTransferConfigs`, then validates that every destination chain has that lane configured before running. The committed file holds the devenv defaults.
119
+
120
+
Override the file path with `CANTON_TOKEN_TEST_CONFIG`:
121
+
122
+
```bash
123
+
CANTON_TOKEN_TEST_CONFIG=/path/to/custom.toml make run-canton2evm-token-load
124
+
```
125
+
126
+
The file has one block per direction (`[evm_to_canton]`, `[canton_to_evm]`):
127
+
128
+
| Key | Required | Meaning |
129
+
|---|---|---|
130
+
|`pool_type`| yes | token pool contract type on the source chain (e.g. `BurnMintTokenPool`, `LockReleaseTokenPool`) |
131
+
|`pool_version`| yes | semantic version of the token pool (e.g. `2.0.0`) |
132
+
|`pool_qualifier`| yes | datastore qualifier identifying the exact pool |
133
+
|`transfer_amount`| no | per-message token amount (string integer); falls back to a per-direction default |
134
+
|`execution_gas_limit`| no | per-message execution gas limit; falls back to a per-direction default |
135
+
|`finality_config`| no | per-message finality config; falls back to a per-direction default |
136
+
137
+
Token **identity** (`pool_type` / `pool_version` / `pool_qualifier`) is always required and is never defaulted; only the numeric send params have code-level fallbacks. If the qualifier matches zero or multiple pools, or a destination lacks the lane, the test fails fast listing the available pool refs / selectors.
The **CCIP Canton Load Tests** workflow (`ccip-load-tests.yml`) can be triggered manually from GitHub Actions
91
-
(`workflow_dispatch`). It reuses the same devenv setup as the CCIP E2E workflow and runs either
92
-
`TestCanton2EVM_Load` or `TestEVM2Canton_Load` depending on the `direction` input. Inputs:
160
+
(`workflow_dispatch`). It reuses the same devenv setup as the CCIP E2E workflow and runs one of the load tests depending on the `direction` input. Inputs:
t.Run("EOA receiver and default committee verifier token transfer", func(t*testing.T) {
151
142
subtestCtx:=ccv.Plog.WithContext(t.Context())
152
143
144
+
// Send params (transfer amount, gas limit, finality) come from token_transfer_config.toml.
145
+
lane:=devenvtests.ResolveTokenLane(t, in, lib, chainMap, cantonChain.ChainSelector(), []uint64{evmChain.ChainSelector()})
146
+
tokenTransferAmount:=lane.TransferAmount.Uint64()
147
+
153
148
// Setup message send
154
-
require.NoError(t, cantonImpl.MintTokens(ctx, cantonToEVMTokenSequentialSends*uint64(cantonToEVMFeeAmount))) // Holdings for fee
155
-
require.NoError(t, cantonImpl.MintTokens(ctx, cantonToEVMTokenSequentialSends*uint64(cantonToEVMTokenTransferAmount))) // Holdings for token transfer
156
-
require.NoError(t, cantonImpl.SetupSend(ctx, uint64(cantonToEVMFeeAmount), uint64(cantonToEVMTokenTransferAmount))) // Setup with fee and token transfer amounts
0 commit comments