Skip to content

Commit 109453a

Browse files
feat(load): Connect load tests to prod-testnet (#766)
* feat(load): Add load metrics * fix(lint) * fix(e2e): Fix tests holding minting * feat(e2e): Token Lane Refactor * fix(tests): tests token + lint fix * try fixing tokens holdings issue * raise canton transfer amount * fix setupSend first hold picking * fix lint + unit tests * fix load tests CI * feat(tests): env agnostic boostrapper for e2e/load * fix(load): remove unecessary variable override for devenv * fix(load): add buffer to messages estimation * feat(load): Connect load tests to prod-testnet * fix(load): prod-testnet needs v1_0_0 bindings * fix(load): fix prod-testnet receiver * fix lint issues * feat(load): enable load connectivity to proxy - tailscale * fix(router): use v1_0_0 instead of ledger for router too * fix router * feat(load): pre-approve EVM tokens before load tests, not before every send * refactor(load): move bindings affected code to a single layer * fix(load): remove unecessary action params | use better defaults * fix action
1 parent 8b29423 commit 109453a

42 files changed

Lines changed: 2123 additions & 513 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/ccip-load-test/action.yml

Lines changed: 56 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ inputs:
1616
message_rate:
1717
description: "CANTON_LOAD_MESSAGE_RATE"
1818
required: false
19-
default: "1/45s"
19+
default: "1/10s"
2020
load_duration:
2121
description: "CANTON_LOAD_DURATION"
2222
required: false
@@ -33,10 +33,6 @@ inputs:
3333
description: "Checkout path for chainlink-canton (`.` for PR root, `chainlink-canton` for nested devenv checkout)"
3434
required: false
3535
default: .
36-
canton_ref:
37-
description: "chainlink-canton git ref for devenv setup (empty = workflow SHA)"
38-
required: false
39-
default: ""
4036
skip_exec_confirm:
4137
description: "CANTON_LOAD_SKIP_EXEC_CONFIRM"
4238
required: false
@@ -49,10 +45,26 @@ inputs:
4945
description: "CANTON_PARTY_ID"
5046
required: false
5147
default: "u_d53a15c42af6::1220c250c23c55120f7c758bccc5cbc739629015ab921594e1c29656981f985bffa7"
48+
user_id:
49+
description: "CANTON_USER_ID"
50+
required: false
51+
default: "0oau1l03xrG9NQw9z5d7"
5252
grpc_url:
5353
description: "CANTON_GRPC_URL"
5454
required: false
5555
default: "testnet.cv1.bcy-v.metalhosts.com:443"
56+
router_instance_id:
57+
description: "CANTON_ROUTER_INSTANCE_ID (prod-testnet)"
58+
required: false
59+
default: "gha-load-router"
60+
sender_instance_id:
61+
description: "CANTON_SENDER_INSTANCE_ID (prod-testnet)"
62+
required: false
63+
default: "gha-load-sender"
64+
receiver_instance_id:
65+
description: "CANTON_RECEIVER_INSTANCE_ID (prod-testnet)"
66+
required: false
67+
default: "gha-load-receiver"
5668
CANTON_OKTA_AUTHORIZER_TESTNET:
5769
description: "GitHub secret CANTON_OKTA_AUTHORIZER_TESTNET"
5870
required: false
@@ -65,6 +77,12 @@ inputs:
6577
CCIP_PROD_TESTNET_PRIVATE_KEY:
6678
description: "GitHub secret CCIP_PROD_TESTNET_PRIVATE_KEY"
6779
required: false
80+
TS_OAUTH_CLIENT_ID_CANTON:
81+
description: "GitHub secret TS_OAUTH_CLIENT_ID_CANTON (prod-testnet Tailscale)"
82+
required: false
83+
TS_AUDIENCE_CANTON:
84+
description: "GitHub secret TS_AUDIENCE_CANTON (prod-testnet Tailscale)"
85+
required: false
6886
ccv-iam-role:
6987
description: "AWS IAM role for CCV ECR authentication (devenv only)"
7088
required: false
@@ -78,6 +96,23 @@ inputs:
7896
runs:
7997
using: composite
8098
steps:
99+
- name: Setup CCIP devenv
100+
if: inputs.ccip_env == 'devenv'
101+
uses: ./.github/actions/setup-ccip-devenv
102+
with:
103+
canton-path: ${{ inputs.canton_path }}
104+
ccv-iam-role: ${{ inputs.ccv-iam-role }}
105+
jd-registry: ${{ inputs.jd-registry }}
106+
jd-image: ${{ inputs.jd-image }}
107+
108+
- name: Connect to Tailscale (prod-testnet)
109+
if: inputs.ccip_env == 'prod-testnet'
110+
uses: tailscale/github-action@53acf823325fe9ca47f4cdaa951f90b4b0de5bb9 # v4.1.1
111+
with:
112+
oauth-client-id: ${{ inputs.TS_OAUTH_CLIENT_ID_CANTON }}
113+
audience: ${{ inputs.TS_AUDIENCE_CANTON }}
114+
tags: tag:bcy-validators-gha
115+
81116
- name: Install Go (prod-testnet)
82117
if: inputs.ccip_env == 'prod-testnet'
83118
uses: actions/setup-go@v6
@@ -99,6 +134,7 @@ runs:
99134
env:
100135
CANTON_LOAD_MESSAGE_RATE: ${{ inputs.message_rate }}
101136
CANTON_LOAD_DURATION: ${{ inputs.load_duration }}
137+
CANTON_LOAD_SKIP_EXEC_CONFIRM: ${{ inputs.skip_exec_confirm }}
102138
run: |
103139
case "${{ inputs.direction }}" in
104140
canton2evm) TEST_RUN='^TestCanton2EVM_Load$' ;;
@@ -121,12 +157,17 @@ runs:
121157
CANTON_CLIENT_ID: ${{ inputs.CANTON_OKTA_CLIENT_ID_TESTNET }}
122158
CANTON_CLIENT_SECRET: ${{ inputs.CANTON_OKTA_CLIENT_SECRET_TESTNET }}
123159
CANTON_PARTY_ID: ${{ inputs.party_id }}
160+
CANTON_USER_ID: ${{ inputs.user_id }}
124161
CANTON_GRPC_URL: ${{ inputs.grpc_url }}
162+
CANTON_ROUTER_INSTANCE_ID: ${{ inputs.router_instance_id }}
163+
CANTON_SENDER_INSTANCE_ID: ${{ inputs.sender_instance_id }}
164+
CANTON_RECEIVER_INSTANCE_ID: ${{ inputs.receiver_instance_id }}
125165
CANTON_LOAD_MESSAGE_RATE: ${{ inputs.message_rate }}
126166
CANTON_LOAD_DURATION: ${{ inputs.load_duration }}
127167
CANTON_CONFIRM_EXEC_TIMEOUT: ${{ inputs.confirm_exec_timeout }}
128168
CANTON_LOAD_SKIP_EXEC_CONFIRM: ${{ inputs.skip_exec_confirm }}
129169
PRIVATE_KEY: ${{ inputs.CCIP_PROD_TESTNET_PRIVATE_KEY }}
170+
TEST_TIMEOUT: ${{ inputs.test_timeout }}
130171
run: |
131172
case "${{ inputs.direction }}" in
132173
canton2evm) TEST_RUN='^TestCanton2EVM_Load$' ;;
@@ -135,4 +176,13 @@ runs:
135176
evm2canton-token) TEST_RUN='^TestEVM2Canton_TokenLoad$' ;;
136177
*) echo "unknown direction: ${{ inputs.direction }}" >&2; exit 1 ;;
137178
esac
138-
go test -timeout "${{ inputs.test_timeout }}" -v -count 1 -run "$TEST_RUN"
179+
go test -tags=prodledger -timeout "$TEST_TIMEOUT" -v -count 1 -ccip-env=prod-testnet -run "$TEST_RUN"
180+
181+
- name: Upload devenv logs
182+
if: always() && inputs.ccip_env == 'devenv'
183+
uses: ./.github/actions/upload-ccip-devenv-logs
184+
with:
185+
canton-path: ${{ inputs.canton_path }}
186+
test-package-dir: load
187+
log-dump-suffix: ccip-load-tests
188+
artifact-name: container-logs-ccip-load-tests

.github/actions/setup-ccip-devenv/action.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ inputs:
1212
# that generates their configs. A mismatch across config-format changes (e.g. #1193
1313
# bootstrap monitoring.Config) makes the verifier container exit on startup.
1414
default: f20ea93af3005f17859ca1d7e6529e0121a0430c
15-
canton-ref:
16-
description: >-
17-
chainlink-canton git ref. Leave empty to use the ref that triggered the workflow.
18-
required: false
19-
default: ''
2015
ccv-iam-role:
2116
description: AWS IAM role ARN for CCV ECR authentication
2217
required: true
@@ -41,7 +36,7 @@ inputs:
4136
free-disk-space:
4237
description: Run the free-disk-space action before builds
4338
required: false
44-
default: 'true'
39+
default: "true"
4540

4641
runs:
4742
using: composite
@@ -58,7 +53,7 @@ runs:
5853
with:
5954
repository: smartcontractkit/chainlink-canton
6055
path: ${{ inputs.canton-path }}
61-
ref: ${{ inputs.canton-ref != '' && inputs.canton-ref || github.sha }}
56+
ref: ${{ github.sha }}
6257

6358
- name: Check out chainlink-ccv
6459
uses: actions/checkout@v6

.github/workflows/ccip-load-command.yml

Lines changed: 0 additions & 134 deletions
This file was deleted.

.github/workflows/ccip-load-tests.yml

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ on:
2222
- canton2evm-token
2323
- evm2canton-token
2424
message_rate:
25-
description: "CANTON_LOAD_MESSAGE_RATE (e.g. 1/1s, 1/45s)"
25+
description: "CANTON_LOAD_MESSAGE_RATE (e.g. 1/45s)"
2626
required: false
27-
default: "1/1s"
27+
default: "1/10s"
2828
type: string
2929
load_duration:
30-
description: "CANTON_LOAD_DURATION (Go duration, e.g. 90s, 2m)"
30+
description: "CANTON_LOAD_DURATION (e.g. 90s, 2m)"
3131
required: false
3232
default: "90s"
3333
type: string
@@ -36,20 +36,15 @@ on:
3636
required: false
3737
default: "40m"
3838
type: string
39-
canton_ref:
40-
description: "chainlink-canton git ref (empty = workflow ref; devenv only)"
41-
required: false
42-
default: ""
43-
type: string
4439
config_file:
4540
description: "CCIP_CONFIG_FILE basename under ccip/devenv (prod-testnet only)"
4641
required: false
4742
default: env-prod-testnet.ci.toml
4843
type: string
4944
skip_exec_confirm:
50-
description: "CANTON_LOAD_SKIP_EXEC_CONFIRM (prod-testnet only)"
45+
description: "CANTON_LOAD_SKIP_EXEC_CONFIRM"
5146
required: false
52-
default: "true"
47+
default: "false"
5348
type: string
5449
confirm_exec_timeout:
5550
description: "CANTON_CONFIRM_EXEC_TIMEOUT (prod-testnet only)"
@@ -78,25 +73,27 @@ jobs:
7873
run: |
7974
if [ "${{ inputs.ccip_env }}" = "prod-testnet" ]; then
8075
echo "canton_path=." >> "$GITHUB_OUTPUT"
81-
if [ "${{ inputs.message_rate }}" = "1/1s" ]; then
82-
echo "message_rate=1/45s" >> "$GITHUB_OUTPUT"
83-
else
84-
echo "message_rate=${{ inputs.message_rate }}" >> "$GITHUB_OUTPUT"
85-
fi
76+
echo "message_rate=${{ inputs.message_rate }}" >> "$GITHUB_OUTPUT"
8677
if [ "${{ inputs.load_duration }}" = "90s" ]; then
8778
echo "load_duration=2m" >> "$GITHUB_OUTPUT"
8879
else
8980
echo "load_duration=${{ inputs.load_duration }}" >> "$GITHUB_OUTPUT"
9081
fi
9182
if [ "${{ inputs.test_timeout }}" = "40m" ]; then
92-
if [ "${{ inputs.direction }}" = "evm2canton" ]; then
83+
if [ "${{ inputs.direction }}" = "evm2canton" ] || [ "${{ inputs.direction }}" = "evm2canton-token" ]; then
9384
echo "test_timeout=45m" >> "$GITHUB_OUTPUT"
9485
else
9586
echo "test_timeout=30m" >> "$GITHUB_OUTPUT"
9687
fi
9788
else
9889
echo "test_timeout=${{ inputs.test_timeout }}" >> "$GITHUB_OUTPUT"
9990
fi
91+
direction="${{ inputs.direction }}"
92+
if [ "$direction" = "canton2evm" ]; then
93+
echo "skip_exec_confirm=true" >> "$GITHUB_OUTPUT"
94+
else
95+
echo "skip_exec_confirm=false" >> "$GITHUB_OUTPUT"
96+
fi
10097
else
10198
echo "canton_path=chainlink-canton" >> "$GITHUB_OUTPUT"
10299
echo "message_rate=${{ inputs.message_rate }}" >> "$GITHUB_OUTPUT"
@@ -108,8 +105,21 @@ jobs:
108105
if: inputs.ccip_env == 'devenv'
109106
uses: ./.github/actions/setup-ccip-devenv
110107
with:
111-
canton-ref: ${{ inputs.canton_ref }}
112-
canton-path: ${{ steps.prod_defaults.outputs.canton_path }}
108+
ccip_env: ${{ inputs.ccip_env }}
109+
direction: ${{ inputs.direction }}
110+
message_rate: ${{ steps.prod_defaults.outputs.message_rate }}
111+
load_duration: ${{ steps.prod_defaults.outputs.load_duration }}
112+
test_timeout: ${{ steps.prod_defaults.outputs.test_timeout }}
113+
config_file: ${{ inputs.config_file }}
114+
canton_path: ${{ steps.prod_defaults.outputs.canton_path }}
115+
skip_exec_confirm: ${{ inputs.ccip_env == 'prod-testnet' && steps.prod_defaults.outputs.skip_exec_confirm || inputs.skip_exec_confirm }}
116+
confirm_exec_timeout: ${{ inputs.confirm_exec_timeout }}
117+
CANTON_OKTA_AUTHORIZER_TESTNET: ${{ secrets.CANTON_OKTA_AUTHORIZER_TESTNET }}
118+
CANTON_OKTA_CLIENT_ID_TESTNET: ${{ secrets.CANTON_OKTA_CLIENT_ID_TESTNET }}
119+
CANTON_OKTA_CLIENT_SECRET_TESTNET: ${{ secrets.CANTON_OKTA_CLIENT_SECRET_TESTNET }}
120+
CCIP_PROD_TESTNET_PRIVATE_KEY: ${{ secrets.CCIP_PROD_TESTNET_PRIVATE_KEY }}
121+
TS_OAUTH_CLIENT_ID_CANTON: ${{ secrets.TS_OAUTH_CLIENT_ID_CANTON }}
122+
TS_AUDIENCE_CANTON: ${{ secrets.TS_AUDIENCE_CANTON }}
113123
ccv-iam-role: ${{ secrets.CCV_IAM_ROLE }}
114124
jd-registry: ${{ secrets.JD_REGISTRY }}
115125
jd-image: ${{ secrets.JD_IMAGE }}

.github/workflows/chatops.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,3 @@ jobs:
2626
permission: write
2727
commands: |
2828
auto-fix
29-
ccip-load

0 commit comments

Comments
 (0)