Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 5 additions & 23 deletions .github/actions/ccip-load-test/action.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Run CCIP load test
description: >-
Shared setup and execution for CCIP WASP load tests against local devenv or
prod-testnet infrastructure.
Shared execution for CCIP WASP load tests against local devenv or prod-testnet
infrastructure. Call setup-ccip-devenv and upload-ccip-devenv-logs separately
when you want distinct workflow steps (see ccip-load-tests.yml).

inputs:
ccip_env:
Expand Down Expand Up @@ -77,16 +78,6 @@ inputs:
runs:
using: composite
steps:
- name: Setup CCIP devenv
if: inputs.ccip_env == 'devenv'
uses: ./.github/actions/setup-ccip-devenv
with:
canton-ref: ${{ inputs.canton_ref }}
canton-path: ${{ inputs.canton_path }}
ccv-iam-role: ${{ inputs.ccv-iam-role }}
jd-registry: ${{ inputs.jd-registry }}
jd-image: ${{ inputs.jd-image }}

- name: Install Go (prod-testnet)
if: inputs.ccip_env == 'prod-testnet'
uses: actions/setup-go@v6
Expand Down Expand Up @@ -116,7 +107,7 @@ runs:
evm2canton-token) TEST_RUN='^TestEVM2Canton_TokenLoad$' ;;
*) echo "unknown direction: ${{ inputs.direction }}" >&2; exit 1 ;;
esac
go test -timeout "${{ inputs.test_timeout }}" -v -count 1 -ccip-env=devenv -run "$TEST_RUN"
go test -timeout "${{ inputs.test_timeout }}" -v -count 1 -run "$TEST_RUN"

- name: Run load tests (prod-testnet)
if: inputs.ccip_env == 'prod-testnet'
Expand Down Expand Up @@ -144,13 +135,4 @@ runs:
evm2canton-token) TEST_RUN='^TestEVM2Canton_TokenLoad$' ;;
*) echo "unknown direction: ${{ inputs.direction }}" >&2; exit 1 ;;
esac
go test -timeout "${{ inputs.test_timeout }}" -v -count 1 -ccip-env=prod-testnet -run "$TEST_RUN"

- name: Upload devenv logs
if: always() && inputs.ccip_env == 'devenv'
uses: ./.github/actions/upload-ccip-devenv-logs
with:
canton-path: ${{ inputs.canton_path }}
test-package-dir: load
log-dump-suffix: ccip-load-tests
artifact-name: container-logs-ccip-load-tests
go test -timeout "${{ inputs.test_timeout }}" -v -count 1 -run "$TEST_RUN"
18 changes: 18 additions & 0 deletions .github/workflows/ccip-load-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ jobs:
echo "test_timeout=30m" >> "$GITHUB_OUTPUT"
fi

- name: Setup CCIP devenv
if: steps.params.outputs.ccip_env == 'devenv'
uses: ./.github/actions/setup-ccip-devenv
with:
canton-path: .
ccv-iam-role: ${{ secrets.CCV_IAM_ROLE }}
jd-registry: ${{ secrets.JD_REGISTRY }}
jd-image: ${{ secrets.JD_IMAGE }}

- name: Run CCIP load test
uses: ./.github/actions/ccip-load-test
with:
Expand All @@ -98,6 +107,15 @@ jobs:
CANTON_OKTA_CLIENT_SECRET_TESTNET: ${{ secrets.CANTON_OKTA_CLIENT_SECRET_TESTNET }}
CCIP_PROD_TESTNET_PRIVATE_KEY: ${{ secrets.CCIP_PROD_TESTNET_PRIVATE_KEY }}

- name: Upload devenv logs
if: always() && steps.params.outputs.ccip_env == 'devenv'
uses: ./.github/actions/upload-ccip-devenv-logs
with:
canton-path: .
test-package-dir: load
log-dump-suffix: ccip-load-tests
artifact-name: container-logs-ccip-load-tests

- name: Update comment
if: always()
uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2.8.2
Expand Down
69 changes: 53 additions & 16 deletions .github/workflows/ccip-load-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,23 +104,60 @@ jobs:
echo "test_timeout=${{ inputs.test_timeout }}" >> "$GITHUB_OUTPUT"
fi

- name: Run CCIP load test
uses: ./.github/actions/ccip-load-test
- name: Setup CCIP devenv
if: inputs.ccip_env == 'devenv'
uses: ./.github/actions/setup-ccip-devenv
with:
ccip_env: ${{ inputs.ccip_env }}
direction: ${{ inputs.direction }}
message_rate: ${{ steps.prod_defaults.outputs.message_rate }}
load_duration: ${{ steps.prod_defaults.outputs.load_duration }}
test_timeout: ${{ steps.prod_defaults.outputs.test_timeout }}
config_file: ${{ inputs.config_file }}
canton_path: ${{ steps.prod_defaults.outputs.canton_path }}
canton_ref: ${{ inputs.canton_ref }}
skip_exec_confirm: ${{ inputs.skip_exec_confirm }}
confirm_exec_timeout: ${{ inputs.confirm_exec_timeout }}
CANTON_OKTA_AUTHORIZER_TESTNET: ${{ secrets.CANTON_OKTA_AUTHORIZER_TESTNET }}
CANTON_OKTA_CLIENT_ID_TESTNET: ${{ secrets.CANTON_OKTA_CLIENT_ID_TESTNET }}
CANTON_OKTA_CLIENT_SECRET_TESTNET: ${{ secrets.CANTON_OKTA_CLIENT_SECRET_TESTNET }}
CCIP_PROD_TESTNET_PRIVATE_KEY: ${{ secrets.CCIP_PROD_TESTNET_PRIVATE_KEY }}
canton-ref: ${{ inputs.canton_ref }}
canton-path: ${{ steps.prod_defaults.outputs.canton_path }}
ccv-iam-role: ${{ secrets.CCV_IAM_ROLE }}
jd-registry: ${{ secrets.JD_REGISTRY }}
jd-image: ${{ secrets.JD_IMAGE }}

- name: Install Go (prod-testnet)
if: inputs.ccip_env == 'prod-testnet'
uses: actions/setup-go@v6
with:
cache: true
go-version-file: ${{ steps.prod_defaults.outputs.canton_path }}/go.mod
cache-dependency-path: ${{ steps.prod_defaults.outputs.canton_path }}/go.sum

- name: Download Go dependencies (prod-testnet)
if: inputs.ccip_env == 'prod-testnet'
working-directory: ${{ steps.prod_defaults.outputs.canton_path }}
run: go mod download

- name: Run CCIP load test (${{ inputs.direction }})
working-directory: ${{ steps.prod_defaults.outputs.canton_path }}/ccip/devenv/tests/load
env:
CANTON_LOAD_MESSAGE_RATE: ${{ steps.prod_defaults.outputs.message_rate }}
CANTON_LOAD_DURATION: ${{ steps.prod_defaults.outputs.load_duration }}
CCIP_ENV: ${{ inputs.ccip_env == 'prod-testnet' && 'prod-testnet' || '' }}
CCIP_CONFIG_FILE: ${{ inputs.config_file }}
CANTON_AUTH_TYPE: ${{ inputs.ccip_env == 'prod-testnet' && 'clientCredentials' || '' }}
CANTON_AUTH_URL: ${{ inputs.ccip_env == 'prod-testnet' && secrets.CANTON_OKTA_AUTHORIZER_TESTNET || '' }}
CANTON_CLIENT_ID: ${{ inputs.ccip_env == 'prod-testnet' && secrets.CANTON_OKTA_CLIENT_ID_TESTNET || '' }}
CANTON_CLIENT_SECRET: ${{ inputs.ccip_env == 'prod-testnet' && secrets.CANTON_OKTA_CLIENT_SECRET_TESTNET || '' }}
CANTON_PARTY_ID: ${{ inputs.ccip_env == 'prod-testnet' && 'u_d53a15c42af6::1220c250c23c55120f7c758bccc5cbc739629015ab921594e1c29656981f985bffa7' || '' }}
CANTON_GRPC_URL: ${{ inputs.ccip_env == 'prod-testnet' && 'testnet.cv1.bcy-v.metalhosts.com:443' || '' }}
CANTON_CONFIRM_EXEC_TIMEOUT: ${{ inputs.confirm_exec_timeout }}
CANTON_LOAD_SKIP_EXEC_CONFIRM: ${{ inputs.skip_exec_confirm }}
PRIVATE_KEY: ${{ inputs.ccip_env == 'prod-testnet' && secrets.CCIP_PROD_TESTNET_PRIVATE_KEY || '' }}
run: |
case "${{ inputs.direction }}" in
canton2evm) TEST_RUN='^TestCanton2EVM_Load$' ;;
evm2canton) TEST_RUN='^TestEVM2Canton_Load$' ;;
canton2evm-token) TEST_RUN='^TestCanton2EVM_TokenLoad$' ;;
evm2canton-token) TEST_RUN='^TestEVM2Canton_TokenLoad$' ;;
*) echo "unknown direction: ${{ inputs.direction }}" >&2; exit 1 ;;
esac
go test -timeout "${{ steps.prod_defaults.outputs.test_timeout }}" -v -count 1 -run "$TEST_RUN"

- name: Upload devenv logs
if: always() && inputs.ccip_env == 'devenv'
uses: ./.github/actions/upload-ccip-devenv-logs
with:
canton-path: ${{ steps.prod_defaults.outputs.canton_path }}
test-package-dir: load
log-dump-suffix: ccip-load-tests
artifact-name: container-logs-ccip-load-tests
26 changes: 26 additions & 0 deletions ccip/devenv/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package devenv

import "github.com/smartcontractkit/chainlink-ccv/protocol"

// Shared devenv test constants (message and token paths).

const (
// EVMToCantonFinalityConfig is the minimum block-depth FTF (1 confirmation).
EVMToCantonFinalityConfig = protocol.Finality(1)

// CantonToEVMFeeAmount is the per-message CCIP fee budget in Amulet units for
// message-only sends (200k gas). Kept low for prod-testnet compatibility.
CantonToEVMFeeAmount int64 = 50

// CantonToEVMTokenTransferFeeAmount is the per-message fee budget for token transfers
// (500k execution gas), which quote ~127 Amulet per send in devenv. Used only by
// token e2e/load tests; must cover one send and leave enough change for sequential sends.
CantonToEVMTokenTransferFeeAmount int64 = 130

// Canton token amounts use 10-decimal fixed point (e.g. 1_000_000_000 = 0.1).
CantonFixedPointScale int64 = 10_000_000_000
CantonFixedPointToEVMScale int64 = 100_000_000 // fixedPoint * this = EVM wei

// CantonToEVMTokenSequentialSends is how many token transfers the Canton→EVM e2e subtest sends.
CantonToEVMTokenSequentialSends = 2
)
Loading
Loading