diff --git a/.changeset/brave-geese-build.md b/.changeset/brave-geese-build.md new file mode 100644 index 00000000000..9b542ad9188 --- /dev/null +++ b/.changeset/brave-geese-build.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +#updated update mcms lib dependency. diff --git a/.changeset/neat-penguins-report.md b/.changeset/neat-penguins-report.md new file mode 100644 index 00000000000..053faa00178 --- /dev/null +++ b/.changeset/neat-penguins-report.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#added add exponential backoff retry to feeds.SyncNodeInfo() diff --git a/.changeset/olive-comics-wave.md b/.changeset/olive-comics-wave.md new file mode 100644 index 00000000000..584d726ed01 --- /dev/null +++ b/.changeset/olive-comics-wave.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +#updated Fix abigen compilation on Mac. diff --git a/.changeset/wet-suits-worry.md b/.changeset/wet-suits-worry.md new file mode 100644 index 00000000000..3ce904a90d3 --- /dev/null +++ b/.changeset/wet-suits-worry.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +#removed Remove bash wrappers and call solidity compilation directly. diff --git a/.github/e2e-tests.yml b/.github/e2e-tests.yml index a2785367763..157306b3dd1 100644 --- a/.github/e2e-tests.yml +++ b/.github/e2e-tests.yml @@ -201,6 +201,24 @@ runner-test-matrix: # Anvil developer key, not a secret PRIVATE_KEY: "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" + - id: system-tests/smoke/capabilities/workflow_test.go:TestKeystoneWithOCR3Workflow_TwoDons + path: system-tests/tests/smoke/capabilities/workflow_test.go + test_env_type: docker + runs_on: ubuntu-latest + triggers: + - PR Workflow Engine E2E Core Tests + - Nightly E2E Tests + test_cmd: cd system-tests/tests && go test github.com/smartcontractkit/chainlink/system-tests/tests/smoke/capabilities -v -run "^(TestKeystoneWithOCR3Workflow_TwoDons_LivePrice)$" -timeout 30m -count=1 -test.parallel=1 -json + pyroscope_env: ci-smoke-capabilities-evm-simulated + test_env_vars: + E2E_TEST_CHAINLINK_VERSION: '{{ env.DEFAULT_CHAINLINK_PLUGINS_VERSION }}' # This is the chainlink version that has the plugins + E2E_JD_VERSION: 0.9.0 # there is no latest tag for this repo, so we need to specify the version + GITHUB_READ_TOKEN: '{{ env.GITHUB_API_TOKEN }}' # GATI-provided token that can read from capabilities and dev-platform repos + CI: "true" + CTF_CONFIGS: "environment-multi-don-ci.toml" + # Anvil developer key, not a secret + PRIVATE_KEY: "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" + - id: chaos/ocr_chaos_test.go path: integration-tests/chaos/ocr_chaos_test.go test_env_type: k8s-remote-runner diff --git a/.github/integration-in-memory-tests.yml b/.github/integration-in-memory-tests.yml index 39d61cd03e7..1dbda1b26ce 100644 --- a/.github/integration-in-memory-tests.yml +++ b/.github/integration-in-memory-tests.yml @@ -38,13 +38,6 @@ runner-test-matrix: - PR Integration CCIP Tests test_cmd: cd integration-tests/smoke/ccip && go test -run "Test_CCIPMessageLimitations" -timeout 12m -test.parallel=2 -count=1 -json - - id: smoke/ccip/ccip_fee_boosting_test.go:* - path: integration-tests/smoke/ccip/ccip_fee_boosting_test.go - test_env_type: in-memory - runs_on: ubuntu-latest - triggers: - - PR Integration CCIP Tests - test_cmd: cd integration-tests/smoke/ccip && go test ccip_fee_boosting_test.go -timeout 12m -test.parallel=2 -count=1 -json - id: smoke/ccip/ccip_batching_test.go:* path: integration-tests/smoke/ccip/ccip_batching_test.go test_env_type: in-memory diff --git a/.github/workflows/integration-in-memory-tests.yml b/.github/workflows/integration-in-memory-tests.yml index dcbe988693d..565e391d235 100644 --- a/.github/workflows/integration-in-memory-tests.yml +++ b/.github/workflows/integration-in-memory-tests.yml @@ -74,7 +74,7 @@ jobs: contents: read needs: changes if: github.event_name == 'pull_request' && ( needs.changes.outputs.ccip_changes == 'true' || needs.changes.outputs.core_changes == 'true' || needs.changes.outputs.github_ci_changes == 'true') - uses: smartcontractkit/.github/.github/workflows/run-integration-tests.yml@bb2d725fba3a42858bcb91e816987ca7cd063488 + uses: smartcontractkit/.github/.github/workflows/run-integration-tests.yml@18ee2276811ff4ad56a2284590c9917bec33b748 with: workflow_name: Run CCIP Integration Tests For PR test_path: .github/integration-in-memory-tests.yml @@ -98,7 +98,7 @@ jobs: contents: read needs: changes if: github.event_name == 'merge_group' && ( needs.changes.outputs.ccip_changes == 'true' || needs.changes.outputs.core_changes == 'true' || needs.changes.outputs.github_ci_changes == 'true') - uses: smartcontractkit/.github/.github/workflows/run-integration-tests.yml@d7f8e299e891eafa428a37b5e856d929232c6e18 + uses: smartcontractkit/.github/.github/workflows/run-integration-tests.yml@18ee2276811ff4ad56a2284590c9917bec33b748 with: workflow_name: Run CCIP Integration Tests For Merge Queue test_path: .github/integration-in-memory-tests.yml diff --git a/core/capabilities/ccip/ocrimpls/contract_transmitter.go b/core/capabilities/ccip/ocrimpls/contract_transmitter.go index 1876ac60b2f..1766ae39865 100644 --- a/core/capabilities/ccip/ocrimpls/contract_transmitter.go +++ b/core/capabilities/ccip/ocrimpls/contract_transmitter.go @@ -100,9 +100,9 @@ func ToExecCalldata( }, nil } -var _ ocr3types.ContractTransmitter[[]byte] = &commitTransmitter{} +var _ ocr3types.ContractTransmitter[[]byte] = &ccipTransmitter{} -type commitTransmitter struct { +type ccipTransmitter struct { cw commontypes.ContractWriter fromAccount ocrtypes.Account contractName string @@ -119,7 +119,7 @@ func XXXNewContractTransmitterTestsOnly( offrampAddress string, toCalldataFn ToCalldataFunc, ) ocr3types.ContractTransmitter[[]byte] { - return &commitTransmitter{ + return &ccipTransmitter{ cw: cw, fromAccount: fromAccount, contractName: contractName, @@ -134,7 +134,7 @@ func NewCommitContractTransmitter( fromAccount ocrtypes.Account, offrampAddress string, ) ocr3types.ContractTransmitter[[]byte] { - return &commitTransmitter{ + return &ccipTransmitter{ cw: cw, fromAccount: fromAccount, contractName: consts.ContractNameOffRamp, @@ -149,7 +149,7 @@ func NewExecContractTransmitter( fromAccount ocrtypes.Account, offrampAddress string, ) ocr3types.ContractTransmitter[[]byte] { - return &commitTransmitter{ + return &ccipTransmitter{ cw: cw, fromAccount: fromAccount, contractName: consts.ContractNameOffRamp, @@ -160,12 +160,12 @@ func NewExecContractTransmitter( } // FromAccount implements ocr3types.ContractTransmitter. -func (c *commitTransmitter) FromAccount(context.Context) (ocrtypes.Account, error) { +func (c *ccipTransmitter) FromAccount(context.Context) (ocrtypes.Account, error) { return c.fromAccount, nil } // Transmit implements ocr3types.ContractTransmitter. -func (c *commitTransmitter) Transmit( +func (c *ccipTransmitter) Transmit( ctx context.Context, configDigest ocrtypes.ConfigDigest, seqNr uint64, diff --git a/core/gethwrappers/generation/compile_contracts.sh b/core/gethwrappers/generation/compile_contracts.sh deleted file mode 100755 index 627e0d52b57..00000000000 --- a/core/gethwrappers/generation/compile_contracts.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash - -echo "compiling contracts" - -CDIR="$(dirname "$0")" -COMPILE_COMMAND="$CDIR/../../../contracts/scripts/native_solc_compile_all" - - -# Only print compilation output on failure. -OUT="$(bash -c "${COMPILE_COMMAND}" 2>&1)" -ERR="$?" - -# shellcheck disable=SC2181 -if [ "$ERR" != "0" ]; then - echo - echo "↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓" - echo "Error while compiling solidity contracts. See below for output." - echo "You can reproduce this error directly by running the command" - echo - echo " " "$COMPILE_COMMAND" - echo - echo "in the directory $SOLIDITY_DIR" - echo - echo "This is probably a problem with a solidity contract, under the" - echo "directory contracts/src/." - echo "↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑" - echo - echo "$OUT" - exit 1 -fi - -echo "finished compilation" diff --git a/core/gethwrappers/generation/compile_event_mock_contract.sh b/core/gethwrappers/generation/compile_event_mock_contract.sh deleted file mode 100755 index a576a16adf6..00000000000 --- a/core/gethwrappers/generation/compile_event_mock_contract.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -echo "compiling contracts" - -CDIR="$(dirname "$0")" -COMPILE_COMMAND="$CDIR/../../../contracts/scripts/native_solc_compile_all_events_mock" - - -# Only print compilation output on failure. -OUT="$(bash -c "${COMPILE_COMMAND}" 2>&1)" -ERR="$?" - -# shellcheck disable=SC2181 -if [ "$ERR" != "0" ]; then - echo - echo "↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓" - echo "Error while compiling solidity contracts. See below for output." - echo "You can reproduce this error directly by running the command" - echo - echo " " "$COMPILE_COMMAND" - echo - echo "in the directory $SOLIDITY_DIR" - echo - echo "This is probably a problem with a solidity contract, under the" - echo "directory contracts/src/." - echo "↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑" - echo - echo "$OUT" - exit 1 -fi - -echo "finished compilation" diff --git a/core/gethwrappers/go_generate.go b/core/gethwrappers/go_generate.go index 339c27d98d5..506a214b5cb 100644 --- a/core/gethwrappers/go_generate.go +++ b/core/gethwrappers/go_generate.go @@ -3,7 +3,7 @@ package gethwrappers // Make sure solidity compiler artifacts are up-to-date. Only output stdout on failure. -//go:generate ./generation/compile_contracts.sh +//go:generate ../../contracts/scripts/native_solc_compile_all //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/Operator/Operator.abi ../../contracts/solc/v0.8.19/Operator/Operator.bin Operator operator_wrapper //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/OperatorFactory/OperatorFactory.abi ../../contracts/solc/v0.8.19/OperatorFactory/OperatorFactory.bin OperatorFactory operator_factory @@ -161,6 +161,6 @@ package gethwrappers // The flow is as follows: // 1. Compile all non events mock contracts. // 2. Generate events mock .sol files based on ABI of compiled contracts. -// 3. Compile events mock contracts. ./generation/compile_event_mock_contract.sh calls contracts/scripts/native_solc_compile_all_events_mock to compile events mock contracts. +// 3. Compile mocks by calling contracts/scripts/native_solc_compile_all_events_mock to compile events mock contracts. // 4. Generate wrappers for events mock contracts. -//go:generate ./generation/compile_event_mock_contract.sh +//go:generate ../../contracts/scripts/native_solc_compile_all_events_mock diff --git a/core/scripts/go.mod b/core/scripts/go.mod index 26490e4fb2e..72bbcfcf04b 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -340,19 +340,19 @@ require ( github.com/sirupsen/logrus v1.9.3 // indirect github.com/smartcontractkit/ccip-owner-contracts v0.1.0 // indirect github.com/smartcontractkit/chain-selectors v1.0.40 // indirect - github.com/smartcontractkit/chainlink-ccip v0.0.0-20250225130625-4a632b0b1e61 // indirect + github.com/smartcontractkit/chainlink-ccip v0.0.0-20250226083129-e596590f48f7 // indirect github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 // indirect github.com/smartcontractkit/chainlink-feeds v0.1.1 // indirect github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250207205350-420ccacab78a // indirect github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250211162441-3d6cea220efb // indirect github.com/smartcontractkit/chainlink-protos/job-distributor v0.9.0 // indirect - github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0 // indirect + github.com/smartcontractkit/chainlink-protos/orchestrator v0.5.0 // indirect github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-15e0d4cde2a6 // indirect github.com/smartcontractkit/chainlink-protos/svr v0.0.0-20250123084029-58cce9b32112 // indirect github.com/smartcontractkit/chainlink-solana v1.1.2-0.20250213203720-e15b1333a14a // indirect github.com/smartcontractkit/chainlink-testing-framework/framework v0.5.3 // indirect github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 // indirect - github.com/smartcontractkit/mcms v0.10.0 // indirect + github.com/smartcontractkit/mcms v0.12.2 // indirect github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de // indirect github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20241009055228-33d0c0bf38de // indirect github.com/smartcontractkit/wsrpc v0.8.3 // indirect @@ -454,6 +454,5 @@ replace ( github.com/btcsuite/btcd/btcec/v2 => github.com/btcsuite/btcd/btcec/v2 v2.3.2 // replicating the replace directive on cosmos SDK github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 - github.com/sourcegraph/sourcegraph/lib => github.com/sourcegraph/sourcegraph-public-snapshot/lib v0.0.0-20240822153003-c864f15af264 ) diff --git a/core/scripts/go.sum b/core/scripts/go.sum index ff891a5050c..c1a570007be 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1089,8 +1089,8 @@ github.com/smartcontractkit/chain-selectors v1.0.40 h1:iLvvoZeehVq6/7F+zzolQLF0D github.com/smartcontractkit/chain-selectors v1.0.40/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20250225130625-4a632b0b1e61 h1:x8GMgtVnW81t//lDpizA+/t225RThOjw8ydtrORFS7Q= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20250225130625-4a632b0b1e61/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20250226083129-e596590f48f7 h1:179ROx6VXwUApnhf7NzqMiCVUwutdLzRxvA10KsQQhQ= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20250226083129-e596590f48f7/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 h1:R3OD6Phi0ULIQ2uvHiKVWYdgpi/O1Mt46CUK1UApcXU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0 h1:BTN2nQgFKBxgas6oqY3ym82O+wT++WlpP1+a6KzIfY0= @@ -1107,8 +1107,8 @@ github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02/go.mod h1:7DbPnG0E39eZaX1CXKxRiJ1NOWHwTZYDWR9ys3kZZuU= github.com/smartcontractkit/chainlink-protos/job-distributor v0.9.0 h1:hfMRj2ny6oNHd8w1rhJHdoX3YkoWJtCkBK6wTlCE4+c= github.com/smartcontractkit/chainlink-protos/job-distributor v0.9.0/go.mod h1:/dVVLXrsp+V0AbcYGJo3XMzKg3CkELsweA/TTopCsKE= -github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0 h1:ZBat8EBvE2LpSQR9U1gEbRV6PfAkiFdINmQ8nVnXIAQ= -github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0/go.mod h1:m/A3lqD7ms/RsQ9BT5P2uceYY0QX5mIt4KQxT2G6qEo= +github.com/smartcontractkit/chainlink-protos/orchestrator v0.5.0 h1:xRgu/kMkxcY4LeDKMBhaXU4khgya7v2wyb4Sa5Nzb+Y= +github.com/smartcontractkit/chainlink-protos/orchestrator v0.5.0/go.mod h1:m/A3lqD7ms/RsQ9BT5P2uceYY0QX5mIt4KQxT2G6qEo= github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-15e0d4cde2a6 h1:L6KJ4kGv/yNNoCk8affk7Y1vAY0qglPMXC/hevV/IsA= github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-15e0d4cde2a6/go.mod h1:FRwzI3hGj4CJclNS733gfcffmqQ62ONCkbGi49s658w= github.com/smartcontractkit/chainlink-protos/svr v0.0.0-20250123084029-58cce9b32112 h1:c77Gi/APraqwbBO8fbd/5JY2wW+MSIpYg8Uma9MEZFE= @@ -1123,8 +1123,8 @@ github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 h1:12i github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7/go.mod h1:FX7/bVdoep147QQhsOPkYsPEXhGZjeYx6lBSaSXtZOA= github.com/smartcontractkit/libocr v0.0.0-20250220133800-f3b940c4f298 h1:PKiqnVOTChlH4a4ljJKL3OKGRgYfIpJS4YD1daAIKks= github.com/smartcontractkit/libocr v0.0.0-20250220133800-f3b940c4f298/go.mod h1:Mb7+/LC4edz7HyHxX4QkE42pSuov4AV68+AxBXAap0o= -github.com/smartcontractkit/mcms v0.10.0 h1:wkBAr8HLyHKwejdwsDOMvIwmzT83tKr3jjB9senLahM= -github.com/smartcontractkit/mcms v0.10.0/go.mod h1:3N7+yvkO3hIFXYRYm3hxKCE6qDWdOC/rZdvIrwzlLKk= +github.com/smartcontractkit/mcms v0.12.2 h1:CTeQmtdYOdqWLuiGHNS67qqEdtJO8r8AygOYN/VpaZM= +github.com/smartcontractkit/mcms v0.12.2/go.mod h1:RKo4v2ClzKPHyllstwVeqdPP7Bb5v+qMMPgO8iMq0Qc= github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de h1:n0w0rKF+SVM+S3WNlup6uabXj2zFlFNfrlsKCMMb/co= github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de/go.mod h1:Sl2MF/Fp3fgJIVzhdGhmZZX2BlnM0oUUyBP4s4xYb6o= github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20241009055228-33d0c0bf38de h1:66VQxXx3lvTaAZrMBkIcdH9VEjujUEvmBQdnyOJnkOc= diff --git a/core/services/feeds/service.go b/core/services/feeds/service.go index 99bbb2e0cbb..06c964130cf 100644 --- a/core/services/feeds/service.go +++ b/core/services/feeds/service.go @@ -5,7 +5,11 @@ import ( "database/sql" "encoding/hex" "fmt" + "strings" + "sync" + "time" + "github.com/avast/retry-go/v4" "github.com/ethereum/go-ethereum/common" "github.com/google/uuid" "github.com/lib/pq" @@ -77,6 +81,10 @@ var ( // Job Proposal status "status", }) + + defaultSyncMinDelay = 10 * time.Second + defaultSyncMaxDelay = 30 * time.Minute + defaultSyncMaxAttempts = uint(48 + 8) // 30m * 48 =~ 24h; plus the initial 8 shorter retries ) // Service represents a behavior of the feeds service @@ -142,6 +150,10 @@ type service struct { lggr logger.Logger version string loopRegistrarConfig plugins.RegistrarConfig + syncNodeInfoCancel atomicCancelFns + syncMinDelay time.Duration + syncMaxDelay time.Duration + syncMaxAttempts uint } // NewService constructs a new feeds service @@ -161,6 +173,7 @@ func NewService( lggr logger.Logger, version string, rc plugins.RegistrarConfig, + opts ...ServiceOption, ) *service { lggr = lggr.Named("Feeds") svc := &service{ @@ -184,6 +197,14 @@ func NewService( lggr: lggr, version: version, loopRegistrarConfig: rc, + syncNodeInfoCancel: atomicCancelFns{fns: map[int64]context.CancelFunc{}}, + syncMinDelay: defaultSyncMinDelay, + syncMaxDelay: defaultSyncMaxDelay, + syncMaxAttempts: defaultSyncMaxAttempts, + } + + for _, opt := range opts { + opt(svc) } return svc @@ -255,8 +276,43 @@ func (s *service) RegisterManager(ctx context.Context, params RegisterManagerPar return id, nil } -// SyncNodeInfo syncs the node's information with FMS +// syncNodeInfoWithRetry syncs the node's information with FMS. In case of failures, +// it retries with an exponential backoff for up to 24h. +func (s *service) syncNodeInfoWithRetry(id int64) { + ctx, cancel := context.WithCancel(context.Background()) + + // cancel the previous context -- and, by extension, the existing goroutine -- + // so that we can start anew + s.syncNodeInfoCancel.callAndSwap(id, cancel) + + retryOpts := []retry.Option{ + retry.Context(ctx), + retry.DelayType(retry.BackOffDelay), + retry.Delay(s.syncMinDelay), + retry.MaxDelay(s.syncMaxDelay), + retry.Attempts(s.syncMaxAttempts), + retry.LastErrorOnly(true), + retry.OnRetry(func(attempt uint, err error) { + s.lggr.Infow("failed to sync node info", "attempt", attempt, "err", err.Error()) + }), + } + + go func() { + err := retry.Do(func() error { return s.SyncNodeInfo(ctx, id) }, retryOpts...) + if err != nil { + s.lggr.Errorw("failed to sync node info; aborting", "err", err) + } else { + s.lggr.Info("successfully synced node info") + } + + s.syncNodeInfoCancel.callAndSwap(id, nil) + }() +} + func (s *service) SyncNodeInfo(ctx context.Context, id int64) error { + ctx, cancel := context.WithTimeout(ctx, 30*time.Second) + defer cancel() + // Get the FMS RPC client fmsClient, err := s.connMgr.GetClient(id) if err != nil { @@ -281,12 +337,22 @@ func (s *service) SyncNodeInfo(ctx context.Context, id int64) error { } workflowKey := s.getWorkflowPublicKey() - if _, err = fmsClient.UpdateNode(ctx, &pb.UpdateNodeRequest{ + + resp, err := fmsClient.UpdateNode(ctx, &pb.UpdateNodeRequest{ Version: s.version, ChainConfigs: cfgMsgs, WorkflowKey: &workflowKey, - }); err != nil { - return err + }) + if err != nil { + return errors.Wrap(err, "SyncNodeInfo.UpdateNode call failed") + } + if len(resp.ChainConfigErrors) > 0 { + errMsgs := make([]string, 0, len(resp.ChainConfigErrors)) + for _, ccErr := range resp.ChainConfigErrors { + errMsgs = append(errMsgs, ccErr.Message) + } + + return errors.Errorf("SyncNodeInfo.UpdateNode call partially failed: %s", strings.Join(errMsgs, "; ")) } return nil @@ -402,9 +468,7 @@ func (s *service) CreateChainConfig(ctx context.Context, cfg ChainConfig) (int64 return 0, errors.Wrap(err, "CreateChainConfig: failed to fetch manager") } - if err := s.SyncNodeInfo(ctx, mgr.ID); err != nil { - s.lggr.Infof("FMS: Unable to sync node info: %v", err) - } + s.syncNodeInfoWithRetry(mgr.ID) return id, nil } @@ -426,9 +490,7 @@ func (s *service) DeleteChainConfig(ctx context.Context, id int64) (int64, error return 0, errors.Wrap(err, "DeleteChainConfig: failed to fetch manager") } - if err := s.SyncNodeInfo(ctx, mgr.ID); err != nil { - s.lggr.Infof("FMS: Unable to sync node info: %v", err) - } + s.syncNodeInfoWithRetry(mgr.ID) return id, nil } @@ -467,9 +529,7 @@ func (s *service) UpdateChainConfig(ctx context.Context, cfg ChainConfig) (int64 return 0, errors.Wrap(err, "UpdateChainConfig failed: could not get chain config") } - if err := s.SyncNodeInfo(ctx, ccfg.FeedsManagerID); err != nil { - s.lggr.Infof("FMS: Unable to sync node info: %v", err) - } + s.syncNodeInfoWithRetry(ccfg.FeedsManagerID) return id, nil } @@ -1031,9 +1091,7 @@ func (s *service) CancelSpec(ctx context.Context, id int64) error { ) err = s.transact(ctx, func(tx datasources) error { - var ( - txerr error - ) + var txerr error if txerr = tx.orm.CancelSpec(ctx, id); txerr != nil { return txerr @@ -1153,6 +1211,8 @@ func (s *service) Start(ctx context.Context) error { // Close shuts down the service func (s *service) Close() error { return s.StopOnce("FeedsService", func() error { + s.syncNodeInfoCancel.callAllAndClear() + // This blocks until it finishes s.connMgr.Close() @@ -1173,10 +1233,7 @@ func (s *service) connectFeedManager(ctx context.Context, mgr FeedsManager, priv }, OnConnect: func(pb.FeedsManagerClient) { // Sync the node's information with FMS once connected - err := s.SyncNodeInfo(ctx, mgr.ID) - if err != nil { - s.lggr.Infof("Error syncing node info: %v", err) - } + s.syncNodeInfoWithRetry(mgr.ID) }, }) } @@ -1220,8 +1277,10 @@ func (s *service) observeJobProposalCounts(ctx context.Context) error { metrics := counts.toMetrics() // Set the prometheus gauge metrics. - for _, status := range []JobProposalStatus{JobProposalStatusPending, JobProposalStatusApproved, - JobProposalStatusCancelled, JobProposalStatusRejected, JobProposalStatusDeleted, JobProposalStatusRevoked} { + for _, status := range []JobProposalStatus{ + JobProposalStatusPending, JobProposalStatusApproved, + JobProposalStatusCancelled, JobProposalStatusRejected, JobProposalStatusDeleted, JobProposalStatusRevoked, + } { status := status promJobProposalCounts.With(prometheus.Labels{"status": string(status)}).Set(metrics[status]) @@ -1565,6 +1624,49 @@ func (s *service) isRevokable(propStatus JobProposalStatus, specStatus SpecStatu return propStatus != JobProposalStatusDeleted && (specStatus == SpecStatusPending || specStatus == SpecStatusCancelled) } +type atomicCancelFns struct { + fns map[int64]context.CancelFunc + mutex sync.Mutex +} + +func (f *atomicCancelFns) callAndSwap(id int64, other func()) { + f.mutex.Lock() + defer f.mutex.Unlock() + + fn, found := f.fns[id] + if found && fn != nil { + fn() + } + + f.fns[id] = other +} + +func (f *atomicCancelFns) callAllAndClear() { + f.mutex.Lock() + defer f.mutex.Unlock() + + for _, fn := range f.fns { + if fn != nil { + fn() + } + } + clear(f.fns) +} + +type ServiceOption func(*service) + +func WithSyncMinDelay(delay time.Duration) ServiceOption { + return func(s *service) { s.syncMinDelay = delay } +} + +func WithSyncMaxDelay(delay time.Duration) ServiceOption { + return func(s *service) { s.syncMaxDelay = delay } +} + +func WithSyncMaxAttempts(attempts uint) ServiceOption { + return func(s *service) { s.syncMaxAttempts = attempts } +} + var _ Service = &NullService{} // NullService defines an implementation of the Feeds Service that is used @@ -1577,24 +1679,31 @@ func (ns NullService) Close() error { return nil } func (ns NullService) ApproveSpec(ctx context.Context, id int64, force bool) error { return ErrFeedsManagerDisabled } + func (ns NullService) CountJobProposalsByStatus(ctx context.Context) (*JobProposalCounts, error) { return nil, ErrFeedsManagerDisabled } + func (ns NullService) CancelSpec(ctx context.Context, id int64) error { return ErrFeedsManagerDisabled } + func (ns NullService) GetJobProposal(ctx context.Context, id int64) (*JobProposal, error) { return nil, ErrFeedsManagerDisabled } + func (ns NullService) ListSpecsByJobProposalIDs(ctx context.Context, ids []int64) ([]JobProposalSpec, error) { return nil, ErrFeedsManagerDisabled } + func (ns NullService) GetManager(ctx context.Context, id int64) (*FeedsManager, error) { return nil, ErrFeedsManagerDisabled } + func (ns NullService) ListManagersByIDs(ctx context.Context, ids []int64) ([]FeedsManager, error) { return nil, ErrFeedsManagerDisabled } + func (ns NullService) GetSpec(ctx context.Context, id int64) (*JobProposalSpec, error) { return nil, ErrFeedsManagerDisabled } @@ -1602,15 +1711,19 @@ func (ns NullService) ListManagers(ctx context.Context) ([]FeedsManager, error) func (ns NullService) CreateChainConfig(ctx context.Context, cfg ChainConfig) (int64, error) { return 0, ErrFeedsManagerDisabled } + func (ns NullService) GetChainConfig(ctx context.Context, id int64) (*ChainConfig, error) { return nil, ErrFeedsManagerDisabled } + func (ns NullService) DeleteChainConfig(ctx context.Context, id int64) (int64, error) { return 0, ErrFeedsManagerDisabled } + func (ns NullService) ListChainConfigsByManagerIDs(ctx context.Context, mgrIDs []int64) ([]ChainConfig, error) { return nil, ErrFeedsManagerDisabled } + func (ns NullService) UpdateChainConfig(ctx context.Context, cfg ChainConfig) (int64, error) { return 0, ErrFeedsManagerDisabled } @@ -1618,18 +1731,23 @@ func (ns NullService) ListJobProposals(ctx context.Context) ([]JobProposal, erro func (ns NullService) ListJobProposalsByManagersIDs(ctx context.Context, ids []int64) ([]JobProposal, error) { return nil, ErrFeedsManagerDisabled } + func (ns NullService) ProposeJob(ctx context.Context, args *ProposeJobArgs) (int64, error) { return 0, ErrFeedsManagerDisabled } + func (ns NullService) DeleteJob(ctx context.Context, args *DeleteJobArgs) (int64, error) { return 0, ErrFeedsManagerDisabled } + func (ns NullService) RevokeJob(ctx context.Context, args *RevokeJobArgs) (int64, error) { return 0, ErrFeedsManagerDisabled } + func (ns NullService) RegisterManager(ctx context.Context, params RegisterManagerParams) (int64, error) { return 0, ErrFeedsManagerDisabled } + func (ns NullService) RejectSpec(ctx context.Context, id int64) error { return ErrFeedsManagerDisabled } @@ -1637,15 +1755,19 @@ func (ns NullService) SyncNodeInfo(ctx context.Context, id int64) error { return func (ns NullService) UpdateManager(ctx context.Context, mgr FeedsManager) error { return ErrFeedsManagerDisabled } + func (ns NullService) EnableManager(ctx context.Context, id int64) (*FeedsManager, error) { return nil, ErrFeedsManagerDisabled } + func (ns NullService) DisableManager(ctx context.Context, id int64) (*FeedsManager, error) { return nil, ErrFeedsManagerDisabled } + func (ns NullService) IsJobManaged(ctx context.Context, jobID int64) (bool, error) { return false, nil } + func (ns NullService) UpdateSpecDefinition(ctx context.Context, id int64, spec string) error { return ErrFeedsManagerDisabled } diff --git a/core/services/feeds/service_test.go b/core/services/feeds/service_test.go index ce0e933df49..1cf14b00ef5 100644 --- a/core/services/feeds/service_test.go +++ b/core/services/feeds/service_test.go @@ -5,7 +5,9 @@ import ( "database/sql" "encoding/hex" "fmt" + "maps" "math/big" + "slices" "testing" "time" @@ -16,6 +18,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "go.uber.org/zap" + "go.uber.org/zap/zaptest/observer" "gopkg.in/guregu/null.v4" commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" @@ -196,15 +200,18 @@ type TestService struct { ocr2Keystore *ksmocks.OCR2 workflowKeystore *ksmocks.Workflow legacyChains legacyevm.LegacyChainContainer + logs *observer.ObservedLogs } -func setupTestService(t *testing.T) *TestService { +func setupTestService(t *testing.T, opts ...feeds.ServiceOption) *TestService { t.Helper() - return setupTestServiceCfg(t, nil) + return setupTestServiceCfg(t, nil, opts...) } -func setupTestServiceCfg(t *testing.T, overrideCfg func(c *chainlink.Config, s *chainlink.Secrets)) *TestService { +func setupTestServiceCfg( + t *testing.T, overrideCfg func(c *chainlink.Config, s *chainlink.Secrets), opts ...feeds.ServiceOption, +) *TestService { t.Helper() var ( @@ -220,7 +227,7 @@ func setupTestServiceCfg(t *testing.T, overrideCfg func(c *chainlink.Config, s * workflowKeystore = ksmocks.NewWorkflow(t) ) - lggr := logger.TestLogger(t) + lggr, observedLogs := logger.TestLoggerObserved(t, zap.DebugLevel) db := pgtest.NewSqlxDB(t) gcfg := configtest.NewGeneralConfig(t, overrideCfg) @@ -241,7 +248,8 @@ func setupTestServiceCfg(t *testing.T, overrideCfg func(c *chainlink.Config, s * keyStore.On("OCR").Return(ocr1Keystore) keyStore.On("OCR2").Return(ocr2Keystore) keyStore.On("Workflow").Return(workflowKeystore) - svc := feeds.NewService(orm, jobORM, db, spawner, keyStore, gcfg, gcfg.Feature(), gcfg.Insecure(), gcfg.JobPipeline(), gcfg.OCR(), gcfg.OCR2(), legacyChains, lggr, "1.0.0", nil) + svc := feeds.NewService(orm, jobORM, db, spawner, keyStore, gcfg, gcfg.Feature(), gcfg.Insecure(), + gcfg.JobPipeline(), gcfg.OCR(), gcfg.OCR2(), legacyChains, lggr, "1.0.0", nil, opts...) svc.SetConnectionsManager(connMgr) return &TestService{ @@ -257,6 +265,7 @@ func setupTestServiceCfg(t *testing.T, overrideCfg func(c *chainlink.Config, s * ocr2Keystore: ocr2Keystore, workflowKeystore: workflowKeystore, legacyChains: legacyChains, + logs: observedLogs, } } @@ -1856,6 +1865,170 @@ func Test_Service_SyncNodeInfo(t *testing.T) { } } +func Test_Service_syncNodeInfoWithRetry(t *testing.T) { + t.Parallel() + + mgr := feeds.FeedsManager{ID: 1} + nodeVersion := &versioning.NodeVersion{Version: "1.0.0"} + cfg := feeds.ChainConfig{ + FeedsManagerID: mgr.ID, + ChainID: "42", + ChainType: feeds.ChainTypeEVM, + AccountAddress: "0x0000000000000000000000000000000000000000", + AccountAddressPublicKey: null.StringFrom("0x0000000000000000000000000000000000000002"), + AdminAddress: "0x0000000000000000000000000000000000000001", + FluxMonitorConfig: feeds.FluxMonitorConfig{Enabled: true}, + OCR1Config: feeds.OCR1Config{Enabled: false}, + OCR2Config: feeds.OCR2ConfigModel{Enabled: false}, + } + workflowKey, err := workflowkey.New() + require.NoError(t, err) + + request := &proto.UpdateNodeRequest{ + Version: nodeVersion.Version, + ChainConfigs: []*proto.ChainConfig{ + { + Chain: &proto.Chain{ + Id: cfg.ChainID, + Type: proto.ChainType_CHAIN_TYPE_EVM, + }, + AccountAddress: cfg.AccountAddress, + AccountAddressPublicKey: &cfg.AccountAddressPublicKey.String, + AdminAddress: cfg.AdminAddress, + FluxMonitorConfig: &proto.FluxMonitorConfig{Enabled: true}, + Ocr1Config: &proto.OCR1Config{Enabled: false}, + Ocr2Config: &proto.OCR2Config{Enabled: false}, + }, + }, + WorkflowKey: func(s string) *string { return &s }(workflowKey.ID()), + } + successResponse := &proto.UpdateNodeResponse{ChainConfigErrors: map[string]*proto.ChainConfigError{}} + failureResponse := func(chainID string) *proto.UpdateNodeResponse { + return &proto.UpdateNodeResponse{ + ChainConfigErrors: map[string]*proto.ChainConfigError{chainID: {Message: "error chain " + chainID}}, + } + } + + tests := []struct { + name string + setup func(t *testing.T, svc *TestService) + run func(svc *TestService) (any, error) + wantLogs []string + }{ + { + name: "create chain", + setup: func(t *testing.T, svc *TestService) { + svc.workflowKeystore.EXPECT().GetAll().Return([]workflowkey.Key{workflowKey}, nil) + svc.orm.EXPECT().CreateChainConfig(mock.Anything, cfg).Return(int64(1), nil) + svc.orm.EXPECT().GetManager(mock.Anything, mgr.ID).Return(&mgr, nil) + svc.orm.EXPECT().ListChainConfigsByManagerIDs(mock.Anything, []int64{mgr.ID}).Return([]feeds.ChainConfig{cfg}, nil) + svc.connMgr.EXPECT().GetClient(mgr.ID).Return(svc.fmsClient, nil) + svc.fmsClient.EXPECT().UpdateNode(mock.Anything, request).Return(nil, errors.New("error-0")).Once() + svc.fmsClient.EXPECT().UpdateNode(mock.Anything, request).Return(failureResponse("1"), nil).Once() + svc.fmsClient.EXPECT().UpdateNode(mock.Anything, request).Return(failureResponse("2"), nil).Once() + svc.fmsClient.EXPECT().UpdateNode(mock.Anything, request).Return(successResponse, nil).Once() + }, + run: func(svc *TestService) (any, error) { + return svc.CreateChainConfig(testutils.Context(t), cfg) + }, + wantLogs: []string{ + `failed to sync node info attempt="0" err="SyncNodeInfo.UpdateNode call failed: error-0"`, + `failed to sync node info attempt="1" err="SyncNodeInfo.UpdateNode call partially failed: error chain 1"`, + `failed to sync node info attempt="2" err="SyncNodeInfo.UpdateNode call partially failed: error chain 2"`, + `successfully synced node info`, + }, + }, + { + name: "update chain", + setup: func(t *testing.T, svc *TestService) { + svc.workflowKeystore.EXPECT().GetAll().Return([]workflowkey.Key{workflowKey}, nil) + svc.orm.EXPECT().UpdateChainConfig(mock.Anything, cfg).Return(int64(1), nil) + svc.orm.EXPECT().GetChainConfig(mock.Anything, cfg.ID).Return(&cfg, nil) + svc.orm.EXPECT().ListChainConfigsByManagerIDs(mock.Anything, []int64{mgr.ID}).Return([]feeds.ChainConfig{cfg}, nil) + svc.connMgr.EXPECT().GetClient(mgr.ID).Return(svc.fmsClient, nil) + svc.fmsClient.EXPECT().UpdateNode(mock.Anything, request).Return(failureResponse("3"), nil).Once() + svc.fmsClient.EXPECT().UpdateNode(mock.Anything, request).Return(nil, errors.New("error-4")).Once() + svc.fmsClient.EXPECT().UpdateNode(mock.Anything, request).Return(failureResponse("5"), nil).Once() + svc.fmsClient.EXPECT().UpdateNode(mock.Anything, request).Return(successResponse, nil).Once() + }, + run: func(svc *TestService) (any, error) { + return svc.UpdateChainConfig(testutils.Context(t), cfg) + }, + wantLogs: []string{ + `failed to sync node info attempt="0" err="SyncNodeInfo.UpdateNode call partially failed: error chain 3"`, + `failed to sync node info attempt="1" err="SyncNodeInfo.UpdateNode call failed: error-4"`, + `failed to sync node info attempt="2" err="SyncNodeInfo.UpdateNode call partially failed: error chain 5"`, + `successfully synced node info`, + }, + }, + { + name: "delete chain", + setup: func(t *testing.T, svc *TestService) { + svc.workflowKeystore.EXPECT().GetAll().Return([]workflowkey.Key{workflowKey}, nil) + svc.orm.EXPECT().GetChainConfig(mock.Anything, cfg.ID).Return(&cfg, nil) + svc.orm.EXPECT().DeleteChainConfig(mock.Anything, cfg.ID).Return(cfg.ID, nil) + svc.orm.EXPECT().GetManager(mock.Anything, mgr.ID).Return(&mgr, nil) + svc.orm.EXPECT().ListChainConfigsByManagerIDs(mock.Anything, []int64{mgr.ID}).Return([]feeds.ChainConfig{cfg}, nil) + svc.connMgr.EXPECT().GetClient(mgr.ID).Return(svc.fmsClient, nil) + svc.fmsClient.EXPECT().UpdateNode(mock.Anything, request).Return(failureResponse("6"), nil).Once() + svc.fmsClient.EXPECT().UpdateNode(mock.Anything, request).Return(failureResponse("7"), nil).Once() + svc.fmsClient.EXPECT().UpdateNode(mock.Anything, request).Return(nil, errors.New("error-8")).Once() + svc.fmsClient.EXPECT().UpdateNode(mock.Anything, request).Return(successResponse, nil).Once() + }, + run: func(svc *TestService) (any, error) { + return svc.DeleteChainConfig(testutils.Context(t), cfg.ID) + }, + wantLogs: []string{ + `failed to sync node info attempt="0" err="SyncNodeInfo.UpdateNode call partially failed: error chain 6"`, + `failed to sync node info attempt="1" err="SyncNodeInfo.UpdateNode call partially failed: error chain 7"`, + `failed to sync node info attempt="2" err="SyncNodeInfo.UpdateNode call failed: error-8"`, + `successfully synced node info`, + }, + }, + { + name: "more errors than MaxAttempts", + setup: func(t *testing.T, svc *TestService) { + svc.workflowKeystore.EXPECT().GetAll().Return([]workflowkey.Key{workflowKey}, nil) + svc.orm.EXPECT().CreateChainConfig(mock.Anything, cfg).Return(int64(1), nil) + svc.orm.EXPECT().GetManager(mock.Anything, mgr.ID).Return(&mgr, nil) + svc.orm.EXPECT().ListChainConfigsByManagerIDs(mock.Anything, []int64{mgr.ID}).Return([]feeds.ChainConfig{cfg}, nil) + svc.connMgr.EXPECT().GetClient(mgr.ID).Return(svc.fmsClient, nil) + svc.fmsClient.EXPECT().UpdateNode(mock.Anything, request).Return(failureResponse("9"), nil).Once() + svc.fmsClient.EXPECT().UpdateNode(mock.Anything, request).Return(failureResponse("10"), nil).Once() + svc.fmsClient.EXPECT().UpdateNode(mock.Anything, request).Return(nil, errors.New("error-11")).Once() + svc.fmsClient.EXPECT().UpdateNode(mock.Anything, request).Return(failureResponse("12"), nil).Once() + }, + run: func(svc *TestService) (any, error) { + return svc.CreateChainConfig(testutils.Context(t), cfg) + }, + wantLogs: []string{ + `failed to sync node info attempt="0" err="SyncNodeInfo.UpdateNode call partially failed: error chain 9"`, + `failed to sync node info attempt="1" err="SyncNodeInfo.UpdateNode call partially failed: error chain 10"`, + `failed to sync node info attempt="2" err="SyncNodeInfo.UpdateNode call failed: error-11"`, + `failed to sync node info attempt="3" err="SyncNodeInfo.UpdateNode call partially failed: error chain 12"`, + `failed to sync node info; aborting err="SyncNodeInfo.UpdateNode call partially failed: error chain 12"`, + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + svc := setupTestService(t, feeds.WithSyncMinDelay(5*time.Millisecond), + feeds.WithSyncMaxDelay(50*time.Millisecond), feeds.WithSyncMaxAttempts(4)) + + tt.setup(t, svc) + _, err := tt.run(svc) + + require.NoError(t, err) + assert.EventuallyWithT(t, func(collect *assert.CollectT) { + assert.Equal(collect, tt.wantLogs, logMessages(svc.logs.All())) + }, 1*time.Second, 50*time.Millisecond) + }) + } +} + func Test_Service_IsJobManaged(t *testing.T) { t.Parallel() @@ -4751,3 +4924,21 @@ func Test_Service_StartStop(t *testing.T) { }) } } + +func logMessages(logEntries []observer.LoggedEntry) []string { + messages := make([]string, 0, len(logEntries)) + for _, entry := range logEntries { + messageWithContext := entry.Message + contextMap := entry.ContextMap() + for _, key := range slices.Sorted(maps.Keys(contextMap)) { + if key == "version" || key == "errVerbose" { + continue + } + messageWithContext += fmt.Sprintf(" %v=\"%v\"", key, entry.ContextMap()[key]) + } + + messages = append(messages, messageWithContext) + } + + return messages +} diff --git a/core/services/workflows/engine.go b/core/services/workflows/engine.go index abf4e59579d..1ac4e11c10b 100644 --- a/core/services/workflows/engine.go +++ b/core/services/workflows/engine.go @@ -1167,10 +1167,11 @@ func (e *Engine) Close() error { // any triggers to ensure no new executions are triggered, // then we'll close down any background goroutines, // and finally, we'll deregister any workflow steps. + for idx, t := range e.workflow.triggers { err := e.deregisterTrigger(ctx, t, idx) if err != nil { - return err + e.logger.Errorf("failed to deregister trigger: %v", err) } } diff --git a/core/services/workflows/engine_test.go b/core/services/workflows/engine_test.go index 59b95c94538..4756975704e 100644 --- a/core/services/workflows/engine_test.go +++ b/core/services/workflows/engine_test.go @@ -10,6 +10,7 @@ import ( "github.com/jonboulle/clockwork" "github.com/shopspring/decimal" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" @@ -1876,6 +1877,86 @@ func TestEngine_CloseHappensOnlyIfWorkflowHasBeenRegistered(t *testing.T) { require.NoError(t, err) } +func TestEngine_CloseUnregisterFails_NotFound(t *testing.T) { + ctx := testutils.Context(t) + reg := coreCap.NewRegistry(logger.TestLogger(t)) + + trigger, _ := mockTrigger(t) + + require.NoError(t, reg.Add(ctx, trigger)) + + require.NoError(t, reg.Add(ctx, mockConsensus(""))) + + target := mockTarget("write_ethereum-testnet-sepolia@1.0.0") + require.NoError(t, reg.Add(ctx, target)) + + action := newMockCapability( + // Create a remote capability so we don't use the local transmission protocol. + capabilities.MustNewRemoteCapabilityInfo( + "custom-compute@1.0.0", + capabilities.CapabilityTypeAction, + "a custom compute action with custom config", + &capabilities.DON{ID: 1}, + ), + func(req capabilities.CapabilityRequest) (capabilities.CapabilityResponse, error) { + return capabilities.CapabilityResponse{ + Value: req.Inputs, + }, nil + }, + ) + require.NoError(t, reg.Add(ctx, action)) + + eng, testHooks := newTestEngineWithYAMLSpec( + t, + reg, + secretsWorkflow, + func(c *Config) { + c.SecretsFetcher = &mockFetcher{ + retval: map[string]string{}, + retErr: errors.New("failed to fetch secrets XXX"), + } + }, + ) + + err := eng.Start(ctx) + require.NoError(t, err) + + // simulate WorkflowUpdatedEvent that calls tryEngineCleanup + <-testHooks.initFailed + + // update trigger to mock + // triggerCapability wraps a capabilities.TriggerCapability + mockedInternalTrigger := newMockRuntimeTrigger(eng.workflow.triggers[0].trigger) + mockedInternalTrigger.On("UnregisterTrigger").Return(errors.New("trigger mock not found")) + eng.workflow.triggers[0].trigger = mockedInternalTrigger + eng.workflow.triggers[0].registered = true + + err = eng.Close() + require.NoError(t, err) +} + +type mockRuntimeTrigger struct { + c capabilities.TriggerCapability + *mock.Mock +} + +func newMockRuntimeTrigger(t capabilities.TriggerCapability) *mockRuntimeTrigger { + return &mockRuntimeTrigger{t, new(mock.Mock)} +} + +func (t mockRuntimeTrigger) Info(ctx context.Context) (capabilities.CapabilityInfo, error) { + return t.c.Info(ctx) +} + +func (t mockRuntimeTrigger) RegisterTrigger(ctx context.Context, request capabilities.TriggerRegistrationRequest) (<-chan capabilities.TriggerResponse, error) { + return t.c.RegisterTrigger(ctx, request) +} + +func (t mockRuntimeTrigger) UnregisterTrigger(ctx context.Context, request capabilities.TriggerRegistrationRequest) error { + args := t.Called() + return args.Error(0) +} + func TestMerge(t *testing.T) { tests := []struct { name string diff --git a/deployment/ccip/changeset/deployer_group.go b/deployment/ccip/changeset/deployer_group.go index e389de0325a..cc35e329846 100644 --- a/deployment/ccip/changeset/deployer_group.go +++ b/deployment/ccip/changeset/deployer_group.go @@ -285,7 +285,7 @@ func (d *DeployerGroup) enactMcms() (deployment.ChangesetOutput, error) { } proposal, err := proposalutils.BuildProposalFromBatchesV2( - d.e.GetContext(), + d.e, timelocks, proposerMcms, inspectors, diff --git a/deployment/ccip/changeset/solana/cs_deploy_chain.go b/deployment/ccip/changeset/solana/cs_deploy_chain.go index 901bbf522ed..d9da9843168 100644 --- a/deployment/ccip/changeset/solana/cs_deploy_chain.go +++ b/deployment/ccip/changeset/solana/cs_deploy_chain.go @@ -174,7 +174,7 @@ func DeployChainContractsChangeset(e deployment.Environment, c DeployChainContra if len(batches) > 0 { proposal, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelocks, proposers, inspectors, diff --git a/deployment/ccip/changeset/solana/transfer_ccip_to_mcms_with_timelock.go b/deployment/ccip/changeset/solana/transfer_ccip_to_mcms_with_timelock.go index 6a71f10f8c8..07da0358659 100644 --- a/deployment/ccip/changeset/solana/transfer_ccip_to_mcms_with_timelock.go +++ b/deployment/ccip/changeset/solana/transfer_ccip_to_mcms_with_timelock.go @@ -203,7 +203,7 @@ func TransferCCIPToMCMSWithTimelockSolana( } proposal, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelocks, proposers, inspectors, diff --git a/deployment/ccip/changeset/solana/utils.go b/deployment/ccip/changeset/solana/utils.go index e79ee3e5f8f..6cb8bb12622 100644 --- a/deployment/ccip/changeset/solana/utils.go +++ b/deployment/ccip/changeset/solana/utils.go @@ -81,7 +81,7 @@ func BuildProposalsForTxns( Transactions: txns, }) proposal, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelocks, proposers, inspectors, diff --git a/deployment/ccip/changeset/v1_5/cs_rmn.go b/deployment/ccip/changeset/v1_5/cs_rmn.go index 7f9e2cdc092..3b3d14af6bb 100644 --- a/deployment/ccip/changeset/v1_5/cs_rmn.go +++ b/deployment/ccip/changeset/v1_5/cs_rmn.go @@ -167,7 +167,7 @@ func PermaBlessCommitStoreChangeset(env deployment.Environment, c PermaBlessComm } timelockProposal, err := proposalutils.BuildProposalFromBatchesV2( - env.GetContext(), + env, timelocks, proposerMcms, inspectors, diff --git a/deployment/ccip/changeset/v1_6/cs_ccip_home.go b/deployment/ccip/changeset/v1_6/cs_ccip_home.go index 01ce9f4224b..ca8fe58e13b 100644 --- a/deployment/ccip/changeset/v1_6/cs_ccip_home.go +++ b/deployment/ccip/changeset/v1_6/cs_ccip_home.go @@ -437,7 +437,7 @@ func PromoteCandidateChangeset( batches := []mcmstypes.BatchOperation{{ChainSelector: mcmstypes.ChainSelector(cfg.HomeChainSelector), Transactions: mcmsTxs}} prop, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelocks, proposers, inspectors, @@ -686,7 +686,7 @@ func AddDonAndSetCandidateChangeset( batches := []mcmstypes.BatchOperation{{ChainSelector: mcmstypes.ChainSelector(cfg.HomeChainSelector), Transactions: donMcmsTxs}} prop, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelocks, proposers, inspectors, @@ -875,7 +875,7 @@ func SetCandidateChangeset( batches := []mcmstypes.BatchOperation{{ChainSelector: mcmstypes.ChainSelector(cfg.HomeChainSelector), Transactions: setCandidateMcmsTxs}} prop, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelocks, proposers, inspectors, @@ -1163,7 +1163,7 @@ func RevokeCandidateChangeset(e deployment.Environment, cfg RevokeCandidateChang batches := []mcmstypes.BatchOperation{{ChainSelector: mcmstypes.ChainSelector(cfg.HomeChainSelector), Transactions: ops}} prop, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelocks, proposers, inspectors, @@ -1369,7 +1369,7 @@ func UpdateChainConfigChangeset(e deployment.Environment, cfg UpdateChainConfigC } prop, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelocks, proposers, inspectors, diff --git a/deployment/ccip/changeset/v1_6/cs_chain_contracts.go b/deployment/ccip/changeset/v1_6/cs_chain_contracts.go index 0d0f6c5f959..a7f1989da35 100644 --- a/deployment/ccip/changeset/v1_6/cs_chain_contracts.go +++ b/deployment/ccip/changeset/v1_6/cs_chain_contracts.go @@ -249,7 +249,7 @@ func UpdateNonceManagersChangeset(e deployment.Environment, cfg UpdateNonceManag } proposal, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelocks, proposers, inspectors, @@ -393,7 +393,7 @@ func UpdateOnRampsDestsChangeset(e deployment.Environment, cfg UpdateOnRampDests } proposal, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelocks, proposers, inspectors, @@ -508,7 +508,7 @@ func UpdateOnRampDynamicConfigChangeset(e deployment.Environment, cfg UpdateOnRa } proposal, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), timelocks, proposers, inspectors, batches, + e, timelocks, proposers, inspectors, batches, "update onramp dynamic config", cfg.MCMS.MinDelay) if err != nil { @@ -666,7 +666,7 @@ func UpdateOnRampAllowListChangeset(e deployment.Environment, cfg UpdateOnRampAl } proposal, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelocks, proposers, inspectors, @@ -768,7 +768,7 @@ func WithdrawOnRampFeeTokensChangeset(e deployment.Environment, cfg WithdrawOnRa } proposal, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelocks, proposers, inspectors, @@ -935,7 +935,7 @@ func UpdateFeeQuoterPricesChangeset(e deployment.Environment, cfg UpdateFeeQuote } proposal, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelocks, proposers, inspectors, @@ -1056,7 +1056,7 @@ func UpdateFeeQuoterDestsChangeset(e deployment.Environment, cfg UpdateFeeQuoter } proposal, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelocks, proposers, inspectors, @@ -1196,7 +1196,7 @@ func UpdateOffRampSourcesChangeset(e deployment.Environment, cfg UpdateOffRampSo } proposal, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelocks, proposers, inspectors, @@ -1376,7 +1376,7 @@ func UpdateRouterRampsChangeset(e deployment.Environment, cfg UpdateRouterRampsC } proposal, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelocks, proposers, inspectors, @@ -1518,7 +1518,7 @@ func SetOCR3OffRampChangeset(e deployment.Environment, cfg SetOCR3OffRampConfig) } proposal, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelocks, proposers, inspectors, @@ -1632,7 +1632,7 @@ func UpdateDynamicConfigOffRampChangeset(e deployment.Environment, cfg UpdateDyn } proposal, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelocks, proposers, inspectors, @@ -1854,7 +1854,7 @@ func ApplyFeeTokensUpdatesFeeQuoterChangeset(e deployment.Environment, cfg Apply return deployment.ChangesetOutput{}, nil } p, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelocks, proposers, inspectorPerChain, @@ -2007,7 +2007,7 @@ func UpdateTokenPriceFeedsFeeQuoterChangeset(e deployment.Environment, cfg Updat return deployment.ChangesetOutput{}, nil } p, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelocks, proposers, inspectorPerChain, @@ -2131,7 +2131,7 @@ func ApplyPremiumMultiplierWeiPerEthUpdatesFeeQuoterChangeset(e deployment.Envir return deployment.ChangesetOutput{}, nil } p, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelocks, proposers, inspectorPerChain, @@ -2311,7 +2311,7 @@ func ApplyTokenTransferFeeConfigUpdatesFeeQuoterChangeset(e deployment.Environme return deployment.ChangesetOutput{}, nil } p, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelocks, proposers, inspectorPerChain, diff --git a/deployment/ccip/changeset/v1_6/cs_home_chain.go b/deployment/ccip/changeset/v1_6/cs_home_chain.go index 62f14432d22..649b25b9848 100644 --- a/deployment/ccip/changeset/v1_6/cs_home_chain.go +++ b/deployment/ccip/changeset/v1_6/cs_home_chain.go @@ -514,7 +514,7 @@ func RemoveDONs(e deployment.Environment, cfg RemoveDONsConfig) (deployment.Chan inspectors := map[uint64]mcmssdk.Inspector{cfg.HomeChainSel: mcmsevmsdk.NewInspector(homeChain.Client)} proposal, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelocks, proposerMcms, inspectors, diff --git a/deployment/ccip/changeset/v1_6/cs_update_rmn_config.go b/deployment/ccip/changeset/v1_6/cs_update_rmn_config.go index e6a452b7d96..257ddf5753e 100644 --- a/deployment/ccip/changeset/v1_6/cs_update_rmn_config.go +++ b/deployment/ccip/changeset/v1_6/cs_update_rmn_config.go @@ -101,7 +101,7 @@ func SetRMNRemoteOnRMNProxyChangeset(e deployment.Environment, cfg SetRMNRemoteO } prop, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelocks, proposerMcms, inspectors, @@ -381,7 +381,7 @@ func SetRMNHomeCandidateConfigChangeset(e deployment.Environment, config SetRMNH } proposal, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelocks, proposerMcms, inspectors, @@ -460,7 +460,7 @@ func PromoteRMNHomeCandidateConfigChangeset(e deployment.Environment, config Pro } proposal, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelocks, proposerMcms, inspectors, @@ -757,7 +757,7 @@ func SetRMNRemoteConfigChangeset(e deployment.Environment, config SetRMNRemoteCo } proposal, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelocks, proposerMcms, inspectors, diff --git a/deployment/common/changeset/deploy_mcms_with_timelock_test.go b/deployment/common/changeset/deploy_mcms_with_timelock_test.go index 77e33ed42a3..b76736bad35 100644 --- a/deployment/common/changeset/deploy_mcms_with_timelock_test.go +++ b/deployment/common/changeset/deploy_mcms_with_timelock_test.go @@ -16,6 +16,7 @@ import ( "go.uber.org/zap/zapcore" timelockBindings "github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings/timelock" + "github.com/smartcontractkit/chainlink/deployment" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" mcmschangesetstate "github.com/smartcontractkit/chainlink/deployment/common/changeset/state" @@ -127,7 +128,7 @@ func TestDeployMCMSWithTimelockV2(t *testing.T) { deployment.CreateLegacyChangeSet(commonchangeset.DeployMCMSWithTimelockV2), changesetConfig, ) - setPreloadedSolanaAddresses(t, env, solanaSelectors[0]) + commonchangeset.SetPreloadedSolanaAddresses(t, env, solanaSelectors[0]) // --- act --- updatedEnv, err := commonchangeset.Apply(t, env, nil, configuredChangeset) @@ -275,20 +276,6 @@ func timelockSignerPDA(programID solana.PublicKey, seed mcmschangesetstate.PDASe return mcmschangesetstate.GetTimelockSignerPDA(programID, seed).String() } -func setPreloadedSolanaAddresses(t *testing.T, env deployment.Environment, selector uint64) { - typeAndVersion := deployment.NewTypeAndVersion(commontypes.ManyChainMultisigProgram, deployment.Version1_0_0) - err := env.ExistingAddresses.Save(selector, memory.SolanaProgramIDs["mcm"], typeAndVersion) - require.NoError(t, err) - - typeAndVersion = deployment.NewTypeAndVersion(commontypes.AccessControllerProgram, deployment.Version1_0_0) - err = env.ExistingAddresses.Save(selector, memory.SolanaProgramIDs["access_controller"], typeAndVersion) - require.NoError(t, err) - - typeAndVersion = deployment.NewTypeAndVersion(commontypes.RBACTimelockProgram, deployment.Version1_0_0) - err = env.ExistingAddresses.Save(selector, memory.SolanaProgramIDs["timelock"], typeAndVersion) - require.NoError(t, err) -} - func solanaTimelockConfig( ctx context.Context, t *testing.T, chain deployment.SolChain, programID solana.PublicKey, seed mcmschangesetstate.PDASeed, ) timelockBindings.Config { diff --git a/deployment/common/changeset/example/link_transfer.go b/deployment/common/changeset/example/link_transfer.go index 5f0de197084..fbdca840ae6 100644 --- a/deployment/common/changeset/example/link_transfer.go +++ b/deployment/common/changeset/example/link_transfer.go @@ -291,7 +291,7 @@ func LinkTransferV2(e deployment.Environment, cfg *LinkTransferConfig) (deployme if cfg.McmsConfig != nil { proposal, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelockAddressesPerChain, proposerAddressPerChain, inspectorPerChain, diff --git a/deployment/common/changeset/example/solana_transfer_mcm.go b/deployment/common/changeset/example/solana_transfer_mcm.go index 6fdc197fe73..8a164099515 100644 --- a/deployment/common/changeset/example/solana_transfer_mcm.go +++ b/deployment/common/changeset/example/solana_transfer_mcm.go @@ -119,7 +119,7 @@ func (f TransferFromTimelock) Apply(e deployment.Environment, config TransferFro }) } proposal, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelocks, proposers, inspectors, diff --git a/deployment/common/changeset/set_config_mcms.go b/deployment/common/changeset/set_config_mcms.go index 01ebe005ed6..b70656a92da 100644 --- a/deployment/common/changeset/set_config_mcms.go +++ b/deployment/common/changeset/set_config_mcms.go @@ -170,7 +170,7 @@ func setConfigOrTxDataV2(ctx context.Context, lggr logger.Logger, chain deployme return nil, err } - transaction := res.RawTransaction.(*types.Transaction) + transaction := res.RawData.(*types.Transaction) if !useMCMS { _, err = deployment.ConfirmIfNoErrorWithABI(chain, transaction, gethwrappers.ManyChainMultiSigABI, err) if err != nil { @@ -357,7 +357,7 @@ func SetConfigMCMSV2(e deployment.Environment, cfg MCMSConfigV2) (deployment.Cha } if useMCMS { - proposal, err := proposalutils.BuildProposalFromBatchesV2(e.GetContext(), timelockAddressesPerChain, + proposal, err := proposalutils.BuildProposalFromBatchesV2(e, timelockAddressesPerChain, proposerMcmsPerChain, inspectorPerChain, batches, "Set config proposal", cfg.ProposalConfig.MinDelay) if err != nil { return deployment.ChangesetOutput{}, fmt.Errorf("failed to build proposal from batch: %w", err) diff --git a/deployment/common/changeset/state/evm.go b/deployment/common/changeset/state/evm.go index 56aec845339..9bac1c4b963 100644 --- a/deployment/common/changeset/state/evm.go +++ b/deployment/common/changeset/state/evm.go @@ -8,7 +8,6 @@ import ( bindings "github.com/smartcontractkit/ccip-owner-contracts/pkg/gethwrappers" "github.com/smartcontractkit/chainlink/deployment" - "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" "github.com/smartcontractkit/chainlink/deployment/common/types" view "github.com/smartcontractkit/chainlink/deployment/common/view/v1_0" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/link_token_interface" @@ -20,7 +19,32 @@ import ( // It is public for use in product specific packages. // Either all fields are nil or all fields are non-nil. type MCMSWithTimelockState struct { - *proposalutils.MCMSWithTimelockContracts + CancellerMcm *bindings.ManyChainMultiSig + BypasserMcm *bindings.ManyChainMultiSig + ProposerMcm *bindings.ManyChainMultiSig + Timelock *bindings.RBACTimelock + CallProxy *bindings.CallProxy +} + +// Validate checks that all fields are non-nil, ensuring it's ready +// for use generating views or interactions. +func (state MCMSWithTimelockState) Validate() error { + if state.Timelock == nil { + return errors.New("timelock not found") + } + if state.CancellerMcm == nil { + return errors.New("canceller not found") + } + if state.ProposerMcm == nil { + return errors.New("proposer not found") + } + if state.BypasserMcm == nil { + return errors.New("bypasser not found") + } + if state.CallProxy == nil { + return errors.New("call proxy not found") + } + return nil } func (state MCMSWithTimelockState) GenerateMCMSWithTimelockView() (view.MCMSWithTimelockView, error) { @@ -61,9 +85,7 @@ func MaybeLoadMCMSWithTimelockState(env deployment.Environment, chainSelectors [ // - It only found part of the bundle of contracts // - If found more than one instance of a contract (we expect one bundle in the given addresses) func MaybeLoadMCMSWithTimelockChainState(chain deployment.Chain, addresses map[string]deployment.TypeAndVersion) (*MCMSWithTimelockState, error) { - state := MCMSWithTimelockState{ - MCMSWithTimelockContracts: &proposalutils.MCMSWithTimelockContracts{}, - } + state := MCMSWithTimelockState{} // We expect one of each contract on the chain. timelock := deployment.NewTypeAndVersion(types.RBACTimelock, deployment.Version1_0_0) callProxy := deployment.NewTypeAndVersion(types.CallProxy, deployment.Version1_0_0) diff --git a/deployment/common/changeset/state/evm_test.go b/deployment/common/changeset/state/evm_test.go index 0a5a639ece8..62e0b457be3 100644 --- a/deployment/common/changeset/state/evm_test.go +++ b/deployment/common/changeset/state/evm_test.go @@ -15,7 +15,6 @@ import ( "go.uber.org/zap/zapcore" "github.com/smartcontractkit/chainlink/deployment" - "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" "github.com/smartcontractkit/chainlink/deployment/environment/memory" "github.com/smartcontractkit/chainlink/v2/core/logger" ) @@ -46,13 +45,13 @@ func TestMCMSWithTimelockState_GenerateMCMSWithTimelockViewV2(t *testing.T) { tests := []struct { name string - contracts *proposalutils.MCMSWithTimelockContracts + contracts *MCMSWithTimelockState want string wantErr string }{ { name: "success", - contracts: &proposalutils.MCMSWithTimelockContracts{ + contracts: &MCMSWithTimelockState{ ProposerMcm: proposerMcm, CancellerMcm: cancellerMcm, BypasserMcm: bypasserMcm, @@ -110,7 +109,7 @@ func TestMCMSWithTimelockState_GenerateMCMSWithTimelockViewV2(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - state := MCMSWithTimelockState{tt.contracts} + state := tt.contracts got, err := state.GenerateMCMSWithTimelockView() diff --git a/deployment/common/changeset/state/solana_test.go b/deployment/common/changeset/state/solana_test.go index fea1a458701..cb87523acee 100644 --- a/deployment/common/changeset/state/solana_test.go +++ b/deployment/common/changeset/state/solana_test.go @@ -14,6 +14,7 @@ import ( "go.uber.org/zap/zapcore" "github.com/smartcontractkit/chainlink/deployment" + "github.com/smartcontractkit/chainlink/deployment/common/changeset" solanainternal "github.com/smartcontractkit/chainlink/deployment/common/changeset/internal/solana" "github.com/smartcontractkit/chainlink/deployment/common/changeset/state" commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" @@ -50,7 +51,7 @@ func TestMCMSWithTimelockState_GenerateMCMSWithTimelockViewSolana(t *testing.T) return chainState } - setPreloadedSolanaAddresses(t, env, chainSelector) + changeset.SetPreloadedSolanaAddresses(t, env, chainSelector) tests := []struct { name string @@ -140,20 +141,6 @@ func toJSON[T any](t *testing.T, value T) string { return string(bytes) } -func setPreloadedSolanaAddresses(t *testing.T, env deployment.Environment, selector uint64) { - typeAndVersion := deployment.NewTypeAndVersion(commontypes.ManyChainMultisigProgram, deployment.Version1_0_0) - err := env.ExistingAddresses.Save(selector, memory.SolanaProgramIDs["mcm"], typeAndVersion) - require.NoError(t, err) - - typeAndVersion = deployment.NewTypeAndVersion(commontypes.AccessControllerProgram, deployment.Version1_0_0) - err = env.ExistingAddresses.Save(selector, memory.SolanaProgramIDs["access_controller"], typeAndVersion) - require.NoError(t, err) - - typeAndVersion = deployment.NewTypeAndVersion(commontypes.RBACTimelockProgram, deployment.Version1_0_0) - err = env.ExistingAddresses.Save(selector, memory.SolanaProgramIDs["timelock"], typeAndVersion) - require.NoError(t, err) -} - func signerPDA(programID solana.PublicKey, seed state.PDASeed) string { return state.GetMCMSignerPDA(programID, seed).String() } diff --git a/deployment/common/changeset/test_helpers.go b/deployment/common/changeset/test_helpers.go index 4b21803b069..45b85a3fd45 100644 --- a/deployment/common/changeset/test_helpers.go +++ b/deployment/common/changeset/test_helpers.go @@ -13,6 +13,7 @@ import ( "github.com/smartcontractkit/chainlink/deployment" commonState "github.com/smartcontractkit/chainlink/deployment/common/changeset/state" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" + commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/environment/memory" ) @@ -236,3 +237,17 @@ func DeployLinkTokenTest(t *testing.T, solChains int) { require.NotEmpty(t, addrs) } } + +func SetPreloadedSolanaAddresses(t *testing.T, env deployment.Environment, selector uint64) { + typeAndVersion := deployment.NewTypeAndVersion(commontypes.ManyChainMultisigProgram, deployment.Version1_0_0) + err := env.ExistingAddresses.Save(selector, memory.SolanaProgramIDs["mcm"], typeAndVersion) + require.NoError(t, err) + + typeAndVersion = deployment.NewTypeAndVersion(commontypes.AccessControllerProgram, deployment.Version1_0_0) + err = env.ExistingAddresses.Save(selector, memory.SolanaProgramIDs["access_controller"], typeAndVersion) + require.NoError(t, err) + + typeAndVersion = deployment.NewTypeAndVersion(commontypes.RBACTimelockProgram, deployment.Version1_0_0) + err = env.ExistingAddresses.Save(selector, memory.SolanaProgramIDs["timelock"], typeAndVersion) + require.NoError(t, err) +} diff --git a/deployment/common/changeset/transfer_to_mcms_with_timelock.go b/deployment/common/changeset/transfer_to_mcms_with_timelock.go index 2387a67e5b4..7b5b43f99d0 100644 --- a/deployment/common/changeset/transfer_to_mcms_with_timelock.go +++ b/deployment/common/changeset/transfer_to_mcms_with_timelock.go @@ -203,7 +203,7 @@ func TransferToMCMSWithTimelockV2( }) } proposal, err := proposalutils.BuildProposalFromBatchesV2( - e.GetContext(), + e, timelockAddressByChain, proposerAddressByChain, inspectorPerChain, batches, "Transfer ownership to timelock", cfg.MinDelay) if err != nil { diff --git a/deployment/common/proposalutils/mcms_helpers.go b/deployment/common/proposalutils/mcms_helpers.go index 2d9f28d7ef9..7fdb40e6f2f 100644 --- a/deployment/common/proposalutils/mcms_helpers.go +++ b/deployment/common/proposalutils/mcms_helpers.go @@ -281,7 +281,7 @@ func MaybeLoadMCMSWithTimelockContracts(chain deployment.Chain, addresses map[st return &state, nil } -func McmsTimelockConverterForChain(env deployment.Environment, chain uint64) (mcmssdk.TimelockConverter, error) { +func McmsTimelockConverterForChain(chain uint64) (mcmssdk.TimelockConverter, error) { chainFamily, err := mcmstypes.GetChainSelectorFamily(mcmstypes.ChainSelector(chain)) if err != nil { return nil, fmt.Errorf("failed to get chain family for chain %d: %w", chain, err) @@ -291,7 +291,7 @@ func McmsTimelockConverterForChain(env deployment.Environment, chain uint64) (mc case chain_selectors.FamilyEVM: return &mcmsevmsdk.TimelockConverter{}, nil case chain_selectors.FamilySolana: - return mcmssolanasdk.NewTimelockConverter(env.SolChains[chain].Client), nil + return mcmssolanasdk.TimelockConverter{}, nil default: return nil, fmt.Errorf("unsupported chain family %s", chainFamily) } @@ -302,7 +302,7 @@ func McmsTimelockConverters(env deployment.Environment) (map[uint64]mcmssdk.Time for _, chain := range env.Chains { var err error - converters[chain.Selector], err = McmsTimelockConverterForChain(env, chain.Selector) + converters[chain.Selector], err = McmsTimelockConverterForChain(chain.Selector) if err != nil { return nil, fmt.Errorf("failed to get mcms inspector for chain %s: %w", chain.String(), err) } @@ -310,7 +310,7 @@ func McmsTimelockConverters(env deployment.Environment) (map[uint64]mcmssdk.Time for _, chain := range env.SolChains { var err error - converters[chain.Selector], err = McmsTimelockConverterForChain(env, chain.Selector) + converters[chain.Selector], err = McmsTimelockConverterForChain(chain.Selector) if err != nil { return nil, fmt.Errorf("failed to get mcms inspector for chain %s: %w", chain.String(), err) } diff --git a/deployment/common/proposalutils/mcms_test_helpers.go b/deployment/common/proposalutils/mcms_test_helpers.go index c5a62193872..4e31011a1d9 100644 --- a/deployment/common/proposalutils/mcms_test_helpers.go +++ b/deployment/common/proposalutils/mcms_test_helpers.go @@ -118,7 +118,7 @@ func SignMCMSTimelockProposal(t *testing.T, env deployment.Environment, proposal _, err := chainsel.SolanaChainIdFromSelector(chainSelector) require.NoError(t, err) chainSel := mcmstypes.ChainSelector(chainSelector) - converters[chainSel] = mcmssolanasdk.NewTimelockConverter(chain.Client) + converters[chainSel] = mcmssolanasdk.TimelockConverter{} inspectorsMap[chainSel] = mcmssolanasdk.NewInspector(chain.Client) } @@ -238,7 +238,7 @@ func ExecuteMCMSProposalV2(t *testing.T, env deployment.Environment, proposal *m // no need to confirm transaction on solana as the MCMS sdk confirms it internally if family == chainsel.FamilyEVM { chain := env.Chains[uint64(chainSelector)] - evmTransaction := root.RawTransaction.(*gethtypes.Transaction) + evmTransaction := root.RawData.(*gethtypes.Transaction) t.Logf("[ExecuteMCMSProposalV2] SetRoot EVM tx hash: %s", evmTransaction.Hash().String()) _, err = chain.Confirm(evmTransaction) if err != nil { @@ -260,7 +260,7 @@ func ExecuteMCMSProposalV2(t *testing.T, env deployment.Environment, proposal *m if family == chainsel.FamilyEVM { chain := env.Chains[uint64(op.ChainSelector)] - evmTransaction := result.RawTransaction.(*gethtypes.Transaction) + evmTransaction := result.RawData.(*gethtypes.Transaction) t.Logf("[ExecuteMCMSProposalV2] Operation %d EVM tx hash: %s", i, evmTransaction.Hash().String()) _, err = chain.Confirm(evmTransaction) if err != nil { @@ -327,7 +327,7 @@ func ExecuteMCMSTimelockProposalV2(t *testing.T, env deployment.Environment, tim // no need to confirm transaction on solana as the MCMS sdk confirms it internally if family == chainsel.FamilyEVM { chain := env.Chains[uint64(op.ChainSelector)] - evmTransaction := tx.RawTransaction.(*gethtypes.Transaction) + evmTransaction := tx.RawData.(*gethtypes.Transaction) _, err = chain.Confirm(evmTransaction) if err != nil { return fmt.Errorf("[ExecuteMCMSTimelockProposalV2] Confirm failed: %w", err) diff --git a/deployment/common/proposalutils/propose.go b/deployment/common/proposalutils/propose.go index 14c1489da9b..3ee1d2490c8 100644 --- a/deployment/common/proposalutils/propose.go +++ b/deployment/common/proposalutils/propose.go @@ -1,7 +1,6 @@ package proposalutils import ( - "context" "errors" "fmt" "time" @@ -11,9 +10,14 @@ import ( "github.com/smartcontractkit/ccip-owner-contracts/pkg/gethwrappers" "github.com/smartcontractkit/ccip-owner-contracts/pkg/proposal/mcms" "github.com/smartcontractkit/ccip-owner-contracts/pkg/proposal/timelock" + chain_selectors "github.com/smartcontractkit/chain-selectors" mcmslib "github.com/smartcontractkit/mcms" - "github.com/smartcontractkit/mcms/sdk" + mcmssdk "github.com/smartcontractkit/mcms/sdk" + mcmssolanasdk "github.com/smartcontractkit/mcms/sdk/solana" "github.com/smartcontractkit/mcms/types" + + "github.com/smartcontractkit/chainlink/deployment" + "github.com/smartcontractkit/chainlink/deployment/common/changeset/state" ) const ( @@ -94,10 +98,11 @@ func BuildProposalFromBatches( // BuildProposalFromBatchesV2 uses the new MCMS library which replaces the implementation in BuildProposalFromBatches. func BuildProposalFromBatchesV2( - ctx context.Context, + e deployment.Environment, timelockAddressPerChain map[uint64]string, proposerAddressPerChain map[uint64]string, - inspectorPerChain map[uint64]sdk.Inspector, + inspectorPerChain map[uint64]mcmssdk.Inspector, + batches []types.BatchOperation, description string, minDelay time.Duration, @@ -110,17 +115,15 @@ func BuildProposalFromBatchesV2( for _, op := range batches { chains.Add(uint64(op.ChainSelector)) } - - mcmsMd, err := buildProposalMetadataV2(ctx, chains.ToSlice(), - inspectorPerChain, proposerAddressPerChain) - if err != nil { - return nil, err - } - tlsPerChainID := make(map[types.ChainSelector]string) for chainID, tl := range timelockAddressPerChain { tlsPerChainID[types.ChainSelector(chainID)] = tl } + mcmsMd, err := buildProposalMetadataV2(e, chains.ToSlice(), inspectorPerChain, proposerAddressPerChain) + if err != nil { + return nil, err + } + validUntil := time.Now().Unix() + int64(DefaultValidUntil.Seconds()) builder := mcmslib.NewTimelockProposalBuilder() @@ -144,9 +147,9 @@ func BuildProposalFromBatchesV2( } func buildProposalMetadataV2( - ctx context.Context, + env deployment.Environment, chainSelectors []uint64, - inspectorPerChain map[uint64]sdk.Inspector, + inspectorPerChain map[uint64]mcmssdk.Inspector, proposerMcmsesPerChain map[uint64]string, ) (map[types.ChainSelector]types.ChainMetadata, error) { metaDataPerChain := make(map[types.ChainSelector]types.ChainMetadata) @@ -156,14 +159,41 @@ func buildProposalMetadataV2( return nil, fmt.Errorf("missing proposer mcm for chain %d", selector) } chainID := types.ChainSelector(selector) - opCount, err := inspectorPerChain[selector].GetOpCount(ctx, proposerMcms) + opCount, err := inspectorPerChain[selector].GetOpCount(env.GetContext(), proposerMcms) if err != nil { return nil, fmt.Errorf("failed to get op count for chain %d: %w", selector, err) } - metaDataPerChain[chainID] = types.ChainMetadata{ - StartingOpCount: opCount, - MCMAddress: proposerMcms, + family, err := chain_selectors.GetSelectorFamily(selector) + if err != nil { + return nil, fmt.Errorf("failed to get family for chain %d: %w", selector, err) + } + switch family { + case chain_selectors.FamilyEVM: + metaDataPerChain[chainID] = types.ChainMetadata{ + StartingOpCount: opCount, + MCMAddress: proposerMcms, + } + case chain_selectors.FamilySolana: + addresses, err := env.ExistingAddresses.AddressesForChain(selector) + if err != nil { + return nil, fmt.Errorf("failed to load addresses for chain %d: %w", selector, err) + } + solanaState, err := state.MaybeLoadMCMSWithTimelockChainStateSolana(env.SolChains[selector], addresses) + if err != nil { + return nil, fmt.Errorf("failed to load solana state: %w", err) + } + metaDataPerChain[chainID], err = mcmssolanasdk.NewChainMetadata( + opCount, + solanaState.McmProgram, + mcmssolanasdk.PDASeed(solanaState.ProposerMcmSeed), + solanaState.ProposerAccessControllerAccount, + solanaState.CancellerAccessControllerAccount, + solanaState.BypasserAccessControllerAccount) + if err != nil { + return nil, fmt.Errorf("failed to create chain metadata: %w", err) + } } } + return metaDataPerChain, nil } diff --git a/deployment/common/proposalutils/propose_test.go b/deployment/common/proposalutils/propose_test.go index 352428ae0ed..a5816fa5f8d 100644 --- a/deployment/common/proposalutils/propose_test.go +++ b/deployment/common/proposalutils/propose_test.go @@ -1,14 +1,13 @@ package proposalutils_test import ( - "context" "encoding/json" "math/big" "testing" "time" - "github.com/smartcontractkit/mcms/sdk" - "github.com/smartcontractkit/mcms/sdk/evm" + solanasdk "github.com/gagliardetto/solana-go" + "github.com/smartcontractkit/mcms/sdk/solana" "github.com/smartcontractkit/mcms/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -16,8 +15,9 @@ import ( "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/common/changeset" + "github.com/smartcontractkit/chainlink/deployment/common/changeset/state" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" - types2 "github.com/smartcontractkit/chainlink/deployment/common/types" + commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/environment/memory" "github.com/smartcontractkit/chainlink/v2/core/logger" ) @@ -25,23 +25,32 @@ import ( func TestBuildProposalFromBatchesV2(t *testing.T) { lggr := logger.TestLogger(t) cfg := memory.MemoryEnvironmentConfig{ - Nodes: 1, - Chains: 2, + Nodes: 1, + SolChains: 1, + Chains: 2, } env := memory.NewMemoryEnvironment(t, lggr, zapcore.DebugLevel, cfg) chainSelector := env.AllChainSelectors()[0] + chainSelectorSolana := env.AllChainSelectorsSolana()[0] config := proposalutils.SingleGroupMCMSV2(t) + changeset.SetPreloadedSolanaAddresses(t, env, chainSelectorSolana) env, err := changeset.Apply(t, env, nil, changeset.Configure( deployment.CreateLegacyChangeSet(changeset.DeployMCMSWithTimelockV2), - map[uint64]types2.MCMSWithTimelockConfigV2{ + map[uint64]commontypes.MCMSWithTimelockConfigV2{ chainSelector: { Canceller: config, Bypasser: config, Proposer: config, TimelockMinDelay: big.NewInt(0), }, + chainSelectorSolana: { + Canceller: config, + Bypasser: config, + Proposer: config, + TimelockMinDelay: big.NewInt(0), + }, }, ), ) @@ -55,19 +64,40 @@ func TestBuildProposalFromBatchesV2(t *testing.T) { timelockAddress := mcmsState.Timelock.Address() require.NoError(t, err) + solChain := env.SolChains[chainSelectorSolana] + addrs, err = env.ExistingAddresses.AddressesForChain(chainSelectorSolana) + require.NoError(t, err) + solState, err := state.MaybeLoadMCMSWithTimelockChainStateSolana(solChain, addrs) + require.NoError(t, err) + + solpk := solanasdk.NewWallet().PublicKey() + timelockAddressPerChain := map[uint64]string{ - chainSelector: timelockAddress.Hex(), + chainSelector: timelockAddress.Hex(), + chainSelectorSolana: solana.ContractAddress(solState.TimelockProgram, solana.PDASeed(solState.TimelockSeed)), } proposerAddressPerChain := map[uint64]string{ - chainSelector: mcmsState.ProposerMcm.Address().Hex(), - } - inspectorPerChain := map[uint64]sdk.Inspector{ - chainSelector: evm.NewInspector(chain.Client), + chainSelector: mcmsState.ProposerMcm.Address().Hex(), + chainSelectorSolana: solana.ContractAddress(solState.McmProgram, solana.PDASeed(solState.ProposerMcmSeed)), } + inspectorPerChain, err := proposalutils.McmsInspectors(env) + require.NoError(t, err) description := "Test Proposal" minDelay := 24 * time.Hour + solTx, err := solana.NewTransaction(solpk.String(), []byte("data1"), big.NewInt(0), []*solanasdk.AccountMeta{}, "", []string{}) + require.NoError(t, err) + + solMetadata, err := solana.NewChainMetadata( + 0, + solState.McmProgram, + solana.PDASeed(solState.ProposerMcmSeed), + solState.ProposerAccessControllerAccount, + solState.CancellerAccessControllerAccount, + solState.BypasserAccessControllerAccount) + require.NoError(t, err) + tests := []struct { name string batches []types.BatchOperation @@ -79,7 +109,17 @@ func TestBuildProposalFromBatchesV2(t *testing.T) { batches: []types.BatchOperation{ { ChainSelector: types.ChainSelector(chainSelector), - Transactions: []types.Transaction{{To: "0xRecipient1", Data: []byte("data1"), AdditionalFields: json.RawMessage(`{"value": 0}`)}}, + Transactions: []types.Transaction{ + { + To: "0xRecipient1", + Data: []byte("data1"), + AdditionalFields: json.RawMessage(`{"value": 0}`), + }, + }, + }, + { + ChainSelector: types.ChainSelector(chainSelectorSolana), + Transactions: []types.Transaction{solTx}, }, }, wantErr: false, @@ -105,7 +145,7 @@ func TestBuildProposalFromBatchesV2(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - proposal, err := proposalutils.BuildProposalFromBatchesV2(context.Background(), timelockAddressPerChain, + proposal, err := proposalutils.BuildProposalFromBatchesV2(env, timelockAddressPerChain, proposerAddressPerChain, inspectorPerChain, tt.batches, description, minDelay) if tt.wantErr { require.Error(t, err) @@ -120,8 +160,21 @@ func TestBuildProposalFromBatchesV2(t *testing.T) { assert.InEpsilon(t, uint32(time.Now().Unix()+int64(proposalutils.DefaultValidUntil.Seconds())), proposal.ValidUntil, 1) assert.Equal(t, description, proposal.Description) assert.InEpsilon(t, minDelay.Seconds(), proposal.Delay.Seconds(), 0) - assert.Equal(t, map[types.ChainSelector]types.ChainMetadata{0xc9f9284461c852b: {StartingOpCount: 0x0, MCMAddress: mcmsState.ProposerMcm.Address().String()}}, proposal.ChainMetadata) - assert.Equal(t, timelockAddress.String(), proposal.TimelockAddresses[types.ChainSelector(chainSelector)]) + assert.Equal(t, map[types.ChainSelector]types.ChainMetadata{ + types.ChainSelector(chainSelector): { + StartingOpCount: 0x0, + MCMAddress: proposerAddressPerChain[chainSelector], + }, + types.ChainSelector(chainSelectorSolana): { + StartingOpCount: 0x0, + MCMAddress: proposerAddressPerChain[chainSelectorSolana], + AdditionalFields: solMetadata.AdditionalFields, + }, + }, proposal.ChainMetadata) + assert.Equal(t, map[types.ChainSelector]string{ + types.ChainSelector(chainSelector): timelockAddressPerChain[chainSelector], + types.ChainSelector(chainSelectorSolana): timelockAddressPerChain[chainSelectorSolana], + }, proposal.TimelockAddresses) assert.Equal(t, tt.batches, proposal.Operations) } }) diff --git a/deployment/go.mod b/deployment/go.mod index 2bd18e5ac37..b89112f0083 100644 --- a/deployment/go.mod +++ b/deployment/go.mod @@ -32,7 +32,7 @@ require ( github.com/sethvargo/go-retry v0.2.4 github.com/smartcontractkit/ccip-owner-contracts v0.1.0 github.com/smartcontractkit/chain-selectors v1.0.40 - github.com/smartcontractkit/chainlink-ccip v0.0.0-20250225130625-4a632b0b1e61 + github.com/smartcontractkit/chainlink-ccip v0.0.0-20250226083129-e596590f48f7 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0 github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250211162441-3d6cea220efb @@ -42,7 +42,7 @@ require ( github.com/smartcontractkit/chainlink-testing-framework/framework v0.5.3 github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.22 github.com/smartcontractkit/libocr v0.0.0-20250220133800-f3b940c4f298 - github.com/smartcontractkit/mcms v0.10.0 + github.com/smartcontractkit/mcms v0.12.2 github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.35.0 go.uber.org/multierr v1.11.0 @@ -358,7 +358,7 @@ require ( github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250224190032-809e4b8cf29e // indirect github.com/smartcontractkit/chainlink-feeds v0.1.1 // indirect github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250207205350-420ccacab78a // indirect - github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0 // indirect + github.com/smartcontractkit/chainlink-protos/orchestrator v0.5.0 // indirect github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-15e0d4cde2a6 // indirect github.com/smartcontractkit/chainlink-protos/svr v0.0.0-20250123084029-58cce9b32112 // indirect github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.10 // indirect diff --git a/deployment/go.sum b/deployment/go.sum index 9953c5ba608..d826718379e 100644 --- a/deployment/go.sum +++ b/deployment/go.sum @@ -1136,8 +1136,8 @@ github.com/smartcontractkit/chain-selectors v1.0.40 h1:iLvvoZeehVq6/7F+zzolQLF0D github.com/smartcontractkit/chain-selectors v1.0.40/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20250225130625-4a632b0b1e61 h1:x8GMgtVnW81t//lDpizA+/t225RThOjw8ydtrORFS7Q= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20250225130625-4a632b0b1e61/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20250226083129-e596590f48f7 h1:179ROx6VXwUApnhf7NzqMiCVUwutdLzRxvA10KsQQhQ= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20250226083129-e596590f48f7/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 h1:R3OD6Phi0ULIQ2uvHiKVWYdgpi/O1Mt46CUK1UApcXU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0 h1:BTN2nQgFKBxgas6oqY3ym82O+wT++WlpP1+a6KzIfY0= @@ -1154,8 +1154,8 @@ github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02/go.mod h1:7DbPnG0E39eZaX1CXKxRiJ1NOWHwTZYDWR9ys3kZZuU= github.com/smartcontractkit/chainlink-protos/job-distributor v0.9.0 h1:hfMRj2ny6oNHd8w1rhJHdoX3YkoWJtCkBK6wTlCE4+c= github.com/smartcontractkit/chainlink-protos/job-distributor v0.9.0/go.mod h1:/dVVLXrsp+V0AbcYGJo3XMzKg3CkELsweA/TTopCsKE= -github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0 h1:ZBat8EBvE2LpSQR9U1gEbRV6PfAkiFdINmQ8nVnXIAQ= -github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0/go.mod h1:m/A3lqD7ms/RsQ9BT5P2uceYY0QX5mIt4KQxT2G6qEo= +github.com/smartcontractkit/chainlink-protos/orchestrator v0.5.0 h1:xRgu/kMkxcY4LeDKMBhaXU4khgya7v2wyb4Sa5Nzb+Y= +github.com/smartcontractkit/chainlink-protos/orchestrator v0.5.0/go.mod h1:m/A3lqD7ms/RsQ9BT5P2uceYY0QX5mIt4KQxT2G6qEo= github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-15e0d4cde2a6 h1:L6KJ4kGv/yNNoCk8affk7Y1vAY0qglPMXC/hevV/IsA= github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-15e0d4cde2a6/go.mod h1:FRwzI3hGj4CJclNS733gfcffmqQ62ONCkbGi49s658w= github.com/smartcontractkit/chainlink-protos/svr v0.0.0-20250123084029-58cce9b32112 h1:c77Gi/APraqwbBO8fbd/5JY2wW+MSIpYg8Uma9MEZFE= @@ -1172,8 +1172,8 @@ github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 h1:12i github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7/go.mod h1:FX7/bVdoep147QQhsOPkYsPEXhGZjeYx6lBSaSXtZOA= github.com/smartcontractkit/libocr v0.0.0-20250220133800-f3b940c4f298 h1:PKiqnVOTChlH4a4ljJKL3OKGRgYfIpJS4YD1daAIKks= github.com/smartcontractkit/libocr v0.0.0-20250220133800-f3b940c4f298/go.mod h1:Mb7+/LC4edz7HyHxX4QkE42pSuov4AV68+AxBXAap0o= -github.com/smartcontractkit/mcms v0.10.0 h1:wkBAr8HLyHKwejdwsDOMvIwmzT83tKr3jjB9senLahM= -github.com/smartcontractkit/mcms v0.10.0/go.mod h1:3N7+yvkO3hIFXYRYm3hxKCE6qDWdOC/rZdvIrwzlLKk= +github.com/smartcontractkit/mcms v0.12.2 h1:CTeQmtdYOdqWLuiGHNS67qqEdtJO8r8AygOYN/VpaZM= +github.com/smartcontractkit/mcms v0.12.2/go.mod h1:RKo4v2ClzKPHyllstwVeqdPP7Bb5v+qMMPgO8iMq0Qc= github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de h1:n0w0rKF+SVM+S3WNlup6uabXj2zFlFNfrlsKCMMb/co= github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de/go.mod h1:Sl2MF/Fp3fgJIVzhdGhmZZX2BlnM0oUUyBP4s4xYb6o= github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20241009055228-33d0c0bf38de h1:66VQxXx3lvTaAZrMBkIcdH9VEjujUEvmBQdnyOJnkOc= diff --git a/deployment/keystone/changeset/add_capabilities.go b/deployment/keystone/changeset/add_capabilities.go index cb792939858..59143b238a0 100644 --- a/deployment/keystone/changeset/add_capabilities.go +++ b/deployment/keystone/changeset/add_capabilities.go @@ -73,7 +73,7 @@ func AddCapabilities(env deployment.Environment, req *AddCapabilitiesRequest) (d } proposal, err := proposalutils.BuildProposalFromBatchesV2( - env.GetContext(), + env, timelocksPerChain, proposerMCMSes, inspectorPerChain, diff --git a/deployment/keystone/changeset/add_nodes.go b/deployment/keystone/changeset/add_nodes.go index b5bd7448026..1291181207d 100644 --- a/deployment/keystone/changeset/add_nodes.go +++ b/deployment/keystone/changeset/add_nodes.go @@ -254,7 +254,7 @@ func AddNodes(env deployment.Environment, req *AddNodesRequest) (deployment.Chan } proposal, err := proposalutils.BuildProposalFromBatchesV2( - env.GetContext(), + env, timelocksPerChain, proposerMCMSes, inspectorPerChain, diff --git a/deployment/keystone/changeset/append_node_capabilities.go b/deployment/keystone/changeset/append_node_capabilities.go index c2c3739a566..a5ebada230e 100644 --- a/deployment/keystone/changeset/append_node_capabilities.go +++ b/deployment/keystone/changeset/append_node_capabilities.go @@ -49,7 +49,7 @@ func AppendNodeCapabilities(env deployment.Environment, req *AppendNodeCapabilit } proposal, err := proposalutils.BuildProposalFromBatchesV2( - env.GetContext(), + env, timelocksPerChain, proposerMCMSes, inspectorPerChain, diff --git a/deployment/keystone/changeset/deploy_ocr3.go b/deployment/keystone/changeset/deploy_ocr3.go index 070c7ef59ce..07d9345030d 100644 --- a/deployment/keystone/changeset/deploy_ocr3.go +++ b/deployment/keystone/changeset/deploy_ocr3.go @@ -107,7 +107,7 @@ func ConfigureOCR3Contract(env deployment.Environment, cfg ConfigureOCR3Config) cfg.ChainSel: inspector, } proposal, err := proposalutils.BuildProposalFromBatchesV2( - env.GetContext(), + env, timelocksPerChain, proposerMCMSes, inspectorPerChain, diff --git a/deployment/keystone/changeset/internal/deploy.go b/deployment/keystone/changeset/internal/deploy.go index 773adfddadd..79df0897e6a 100644 --- a/deployment/keystone/changeset/internal/deploy.go +++ b/deployment/keystone/changeset/internal/deploy.go @@ -660,8 +660,8 @@ func RegisterNodes(lggr logger.Logger, req *RegisterNodesRequest) (*RegisterNode // the enc is the encryption public key func extractSignerEncryptionKeys(n deployment.Node, chainSel uint64) (signer [32]byte, enc [32]byte, err error) { wfKey, err := hex.DecodeString(n.WorkflowKey) - if err != nil || len(wfKey) == 0 || bytes.Equal(wfKey, make([]byte, 32)) { - return signer, enc, fmt.Errorf("invalid workflow key (cannot be empty or zero) with error: %w", err) + if err != nil { + return signer, enc, fmt.Errorf("error decoding workflow key: %w", err) } chainID, err := chainsel.ChainIdFromSelector(chainSel) if err != nil { @@ -763,6 +763,9 @@ func getNodesToRegister( ) if ni, err = registry.GetNode(&bind.CallOpts{}, nodeParams.P2pId); err != nil { if err = deployment.DecodeErr(capabilities_registry.CapabilitiesRegistryABI, err); strings.Contains(err.Error(), "NodeDoesNotExist") { + if nodeParams.EncryptionPublicKey == ([32]byte{}) { + return nil, fmt.Errorf("invalid workflow key (cannot be empty or zero) for nodeID: %s", nodeID) + } nodes2Add = append(nodes2Add, nodeParams) continue } diff --git a/deployment/keystone/changeset/update_node_capabilities.go b/deployment/keystone/changeset/update_node_capabilities.go index 6a9a22a78a9..97816d272ae 100644 --- a/deployment/keystone/changeset/update_node_capabilities.go +++ b/deployment/keystone/changeset/update_node_capabilities.go @@ -136,7 +136,7 @@ func UpdateNodeCapabilities(env deployment.Environment, req *UpdateNodeCapabilit req.RegistryChainSel: inspector, } proposal, err := proposalutils.BuildProposalFromBatchesV2( - env.GetContext(), + env, timelocksPerChain, proposerMCMSes, inspectorPerChain, diff --git a/deployment/keystone/changeset/update_nodes.go b/deployment/keystone/changeset/update_nodes.go index 70857ef41c7..fc6b1cef310 100644 --- a/deployment/keystone/changeset/update_nodes.go +++ b/deployment/keystone/changeset/update_nodes.go @@ -105,7 +105,7 @@ func UpdateNodes(env deployment.Environment, req *UpdateNodesRequest) (deploymen } proposal, err := proposalutils.BuildProposalFromBatchesV2( - env.GetContext(), + env, timelocksPerChain, proposerMCMSes, inspectorPerChain, diff --git a/deployment/keystone/changeset/workflowregistry/strategies.go b/deployment/keystone/changeset/workflowregistry/strategies.go index 12ef748c4ec..91be8d64af1 100644 --- a/deployment/keystone/changeset/workflowregistry/strategies.go +++ b/deployment/keystone/changeset/workflowregistry/strategies.go @@ -70,7 +70,7 @@ func (m *mcmsTransaction) Apply(callFn func(opts *bind.TransactOpts) (*types.Tra } proposal, err := proposalutils.BuildProposalFromBatchesV2( - m.Env.GetContext(), + m.Env, timelocksPerChain, proposerMCMSes, inspectorPerChain, diff --git a/go.mod b/go.mod index 864c836b8b4..c3b52661302 100644 --- a/go.mod +++ b/go.mod @@ -78,7 +78,7 @@ require ( github.com/shopspring/decimal v1.4.0 github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-automation v0.8.1 - github.com/smartcontractkit/chainlink-ccip v0.0.0-20250225130625-4a632b0b1e61 + github.com/smartcontractkit/chainlink-ccip v0.0.0-20250226083129-e596590f48f7 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214231858-f365e2bdecea github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250224190032-809e4b8cf29e @@ -86,7 +86,7 @@ require ( github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250207205350-420ccacab78a github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250211162441-3d6cea220efb github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 - github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0 + github.com/smartcontractkit/chainlink-protos/orchestrator v0.5.0 github.com/smartcontractkit/chainlink-solana v1.1.2-0.20250213203720-e15b1333a14a github.com/smartcontractkit/libocr v0.0.0-20250220133800-f3b940c4f298 github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de diff --git a/go.sum b/go.sum index 21d315cb677..6860ae1bdcb 100644 --- a/go.sum +++ b/go.sum @@ -1016,8 +1016,8 @@ github.com/smartcontractkit/chain-selectors v1.0.40 h1:iLvvoZeehVq6/7F+zzolQLF0D github.com/smartcontractkit/chain-selectors v1.0.40/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20250225130625-4a632b0b1e61 h1:x8GMgtVnW81t//lDpizA+/t225RThOjw8ydtrORFS7Q= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20250225130625-4a632b0b1e61/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20250226083129-e596590f48f7 h1:179ROx6VXwUApnhf7NzqMiCVUwutdLzRxvA10KsQQhQ= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20250226083129-e596590f48f7/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 h1:R3OD6Phi0ULIQ2uvHiKVWYdgpi/O1Mt46CUK1UApcXU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214231858-f365e2bdecea h1:/1f/pWf7vSV9acTR9UPn2exPAwQG/LHGa4l9OywhS00= @@ -1032,8 +1032,8 @@ github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250211162441- github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250211162441-3d6cea220efb/go.mod h1:4JqpgFy01LaqG1yM2iFTzwX3ZgcAvW9WdstBZQgPHzU= github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 h1:3icYNFldKQbs6Qrfai2LE+tKbNcE4tfgPRELF30mnEA= github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02/go.mod h1:7DbPnG0E39eZaX1CXKxRiJ1NOWHwTZYDWR9ys3kZZuU= -github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0 h1:ZBat8EBvE2LpSQR9U1gEbRV6PfAkiFdINmQ8nVnXIAQ= -github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0/go.mod h1:m/A3lqD7ms/RsQ9BT5P2uceYY0QX5mIt4KQxT2G6qEo= +github.com/smartcontractkit/chainlink-protos/orchestrator v0.5.0 h1:xRgu/kMkxcY4LeDKMBhaXU4khgya7v2wyb4Sa5Nzb+Y= +github.com/smartcontractkit/chainlink-protos/orchestrator v0.5.0/go.mod h1:m/A3lqD7ms/RsQ9BT5P2uceYY0QX5mIt4KQxT2G6qEo= github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-15e0d4cde2a6 h1:L6KJ4kGv/yNNoCk8affk7Y1vAY0qglPMXC/hevV/IsA= github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-15e0d4cde2a6/go.mod h1:FRwzI3hGj4CJclNS733gfcffmqQ62ONCkbGi49s658w= github.com/smartcontractkit/chainlink-protos/svr v0.0.0-20250123084029-58cce9b32112 h1:c77Gi/APraqwbBO8fbd/5JY2wW+MSIpYg8Uma9MEZFE= diff --git a/integration-tests/README_SETH.md b/integration-tests/README_SETH.md index 26fbfc1a79f..0329e40c05c 100644 --- a/integration-tests/README_SETH.md +++ b/integration-tests/README_SETH.md @@ -461,4 +461,5 @@ Currently, Seth doesn't support splitting non-native tokens between keys. If you 3. **Prepare payload for Multicall contract** that will call `transfer` function on the token contract for each key. 4. **Execute Multicall contract** with the payload prepared in the previous step. + You can find sample code for doing that for LINK token in [actions](./actions/actions.go) file as `SendLinkFundsToDeploymentAddresses()` method. diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 92df196a65e..df5ffad26d9 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -1,8 +1,6 @@ module github.com/smartcontractkit/chainlink/integration-tests -go 1.24 - -toolchain go1.24.0 +go 1.24.0 // Make sure we're working with the latest chainlink libs replace github.com/smartcontractkit/chainlink/v2 => ../ @@ -46,16 +44,16 @@ require ( github.com/slack-go/slack v0.15.0 github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-automation v0.8.1 - github.com/smartcontractkit/chainlink-ccip v0.0.0-20250225130625-4a632b0b1e61 + github.com/smartcontractkit/chainlink-ccip v0.0.0-20250226083129-e596590f48f7 github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0 github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 github.com/smartcontractkit/chainlink-protos/job-distributor v0.9.0 - github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.2 - github.com/smartcontractkit/chainlink-testing-framework/lib v1.51.0 - github.com/smartcontractkit/chainlink-testing-framework/lib/grafana v1.50.0 + github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.5-0.20250225210020-fc215b29321e + github.com/smartcontractkit/chainlink-testing-framework/lib v1.51.1-0.20250225210020-fc215b29321e + github.com/smartcontractkit/chainlink-testing-framework/lib/grafana v1.50.1-0.20250225210020-fc215b29321e github.com/smartcontractkit/chainlink-testing-framework/sentinel v0.1.2 github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.10 - github.com/smartcontractkit/chainlink-testing-framework/wasp v1.50.6-0.20250224181213-3514fc5f737a + github.com/smartcontractkit/chainlink-testing-framework/wasp v1.50.6-0.20250225210020-fc215b29321e github.com/smartcontractkit/libocr v0.0.0-20250220133800-f3b940c4f298 github.com/spf13/cobra v1.8.1 github.com/stretchr/testify v1.10.0 @@ -446,13 +444,13 @@ require ( github.com/smartcontractkit/chainlink-feeds v0.1.1 // indirect github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250207205350-420ccacab78a // indirect github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250211162441-3d6cea220efb // indirect - github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0 // indirect + github.com/smartcontractkit/chainlink-protos/orchestrator v0.5.0 // indirect github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-15e0d4cde2a6 // indirect github.com/smartcontractkit/chainlink-protos/svr v0.0.0-20250123084029-58cce9b32112 // indirect github.com/smartcontractkit/chainlink-solana v1.1.2-0.20250213203720-e15b1333a14a // indirect - github.com/smartcontractkit/chainlink-testing-framework/framework v0.5.3 // indirect + github.com/smartcontractkit/chainlink-testing-framework/framework v0.5.8-0.20250225210020-fc215b29321e // indirect github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 // indirect - github.com/smartcontractkit/mcms v0.10.0 // indirect + github.com/smartcontractkit/mcms v0.12.2 // indirect github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de // indirect github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20241009055228-33d0c0bf38de // indirect github.com/smartcontractkit/wsrpc v0.8.3 // indirect diff --git a/integration-tests/go.sum b/integration-tests/go.sum index ee04958d3e7..b987c1228e9 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1430,8 +1430,8 @@ github.com/smartcontractkit/chain-selectors v1.0.40 h1:iLvvoZeehVq6/7F+zzolQLF0D github.com/smartcontractkit/chain-selectors v1.0.40/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20250225130625-4a632b0b1e61 h1:x8GMgtVnW81t//lDpizA+/t225RThOjw8ydtrORFS7Q= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20250225130625-4a632b0b1e61/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20250226083129-e596590f48f7 h1:179ROx6VXwUApnhf7NzqMiCVUwutdLzRxvA10KsQQhQ= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20250226083129-e596590f48f7/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 h1:R3OD6Phi0ULIQ2uvHiKVWYdgpi/O1Mt46CUK1UApcXU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0 h1:BTN2nQgFKBxgas6oqY3ym82O+wT++WlpP1+a6KzIfY0= @@ -1448,34 +1448,34 @@ github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02/go.mod h1:7DbPnG0E39eZaX1CXKxRiJ1NOWHwTZYDWR9ys3kZZuU= github.com/smartcontractkit/chainlink-protos/job-distributor v0.9.0 h1:hfMRj2ny6oNHd8w1rhJHdoX3YkoWJtCkBK6wTlCE4+c= github.com/smartcontractkit/chainlink-protos/job-distributor v0.9.0/go.mod h1:/dVVLXrsp+V0AbcYGJo3XMzKg3CkELsweA/TTopCsKE= -github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0 h1:ZBat8EBvE2LpSQR9U1gEbRV6PfAkiFdINmQ8nVnXIAQ= -github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0/go.mod h1:m/A3lqD7ms/RsQ9BT5P2uceYY0QX5mIt4KQxT2G6qEo= +github.com/smartcontractkit/chainlink-protos/orchestrator v0.5.0 h1:xRgu/kMkxcY4LeDKMBhaXU4khgya7v2wyb4Sa5Nzb+Y= +github.com/smartcontractkit/chainlink-protos/orchestrator v0.5.0/go.mod h1:m/A3lqD7ms/RsQ9BT5P2uceYY0QX5mIt4KQxT2G6qEo= github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-15e0d4cde2a6 h1:L6KJ4kGv/yNNoCk8affk7Y1vAY0qglPMXC/hevV/IsA= github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-15e0d4cde2a6/go.mod h1:FRwzI3hGj4CJclNS733gfcffmqQ62ONCkbGi49s658w= github.com/smartcontractkit/chainlink-protos/svr v0.0.0-20250123084029-58cce9b32112 h1:c77Gi/APraqwbBO8fbd/5JY2wW+MSIpYg8Uma9MEZFE= github.com/smartcontractkit/chainlink-protos/svr v0.0.0-20250123084029-58cce9b32112/go.mod h1:TcOliTQU6r59DwG4lo3U+mFM9WWyBHGuFkkxQpvSujo= github.com/smartcontractkit/chainlink-solana v1.1.2-0.20250213203720-e15b1333a14a h1:C+XavZQ0rBOpOrh45LUhdOsvtI8OQ0XZKI5pi+GP6h4= github.com/smartcontractkit/chainlink-solana v1.1.2-0.20250213203720-e15b1333a14a/go.mod h1:aFm1QC/n99mVeBDtv0SE0co56+IECY6Y1fR3OfNYy3c= -github.com/smartcontractkit/chainlink-testing-framework/framework v0.5.3 h1:CeZqFz/si4YBnYE1118mtc4FBLs2Za1qohYAeLZTI+o= -github.com/smartcontractkit/chainlink-testing-framework/framework v0.5.3/go.mod h1:9b5ugzYeKkwbxZ9yMOoxUaPiONDLC/QLCncarDFnhwk= -github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.2 h1:GDGrC5OGiV0RyM1znYWehSQXyZQWTOzrEeJRYmysPCE= -github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.2/go.mod h1:DsT43c1oTBmp3iQkMcoZOoKThwZvt8X3Pz6UmznJ4GY= -github.com/smartcontractkit/chainlink-testing-framework/lib v1.51.0 h1:z7t2OhfE32KK4r5Nt3U0hOnbRwOwIbJs8i7kqKvjAA0= -github.com/smartcontractkit/chainlink-testing-framework/lib v1.51.0/go.mod h1:y6pVvAT/R+YGocAqoQIat+AEaZz2Jdmj/0uUBmwvLCU= -github.com/smartcontractkit/chainlink-testing-framework/lib/grafana v1.50.0 h1:VIxK8u0Jd0Q/VuhmsNm6Bls6Tb31H/sA3A/rbc5hnhg= -github.com/smartcontractkit/chainlink-testing-framework/lib/grafana v1.50.0/go.mod h1:lyAu+oMXdNUzEDScj2DXB2IueY+SDXPPfyl/kb63tMM= +github.com/smartcontractkit/chainlink-testing-framework/framework v0.5.8-0.20250225210020-fc215b29321e h1:6poVaumg1KZYW/K8Aeip2VN2k9TnSjK6ujwfxJnIsoY= +github.com/smartcontractkit/chainlink-testing-framework/framework v0.5.8-0.20250225210020-fc215b29321e/go.mod h1:tnyujVNgajqe67i2/0iwS4Y3mvbA30XBQWLEAArpwfw= +github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.5-0.20250225210020-fc215b29321e h1:2LFrQLx5VoilcbmiDC9+0rENoNLNECEVYYj3c/VDpHs= +github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.5-0.20250225210020-fc215b29321e/go.mod h1:SKBYQvtnl3OqOTr5aQyt9YbIckuNNn40LOJUCR0vlMo= +github.com/smartcontractkit/chainlink-testing-framework/lib v1.51.1-0.20250225210020-fc215b29321e h1:8fgAWzBdPrJcqX/QJMxYB3Xoi3v0IZkML7pOiLyV/tQ= +github.com/smartcontractkit/chainlink-testing-framework/lib v1.51.1-0.20250225210020-fc215b29321e/go.mod h1:jNxIJa9Fl/zM7rFahUFE8E55VGPC/2e6ilqVKoSbr8U= +github.com/smartcontractkit/chainlink-testing-framework/lib/grafana v1.50.1-0.20250225210020-fc215b29321e h1:g1fOH4P+JLU70bpjQVL7viDU7EhB+JKr1SpvpIDce+g= +github.com/smartcontractkit/chainlink-testing-framework/lib/grafana v1.50.1-0.20250225210020-fc215b29321e/go.mod h1:ym1yBKknQkGfgSQF7EGXSevDuex1YZbz+zgDwRvhY3U= github.com/smartcontractkit/chainlink-testing-framework/sentinel v0.1.2 h1:ihRlWrii5nr4RUuMu1hStTbwFvVuHUDoQQwXmCU5IdQ= github.com/smartcontractkit/chainlink-testing-framework/sentinel v0.1.2/go.mod h1:J1Za5EuI/vWDsQSIh6qbPXlVvuEhmHmnvLQBN0XVxqA= github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.10 h1:Yf+n3T/fnUWcYyfe7bsygV4sWAkNo0QhN58APJFIKIc= github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.10/go.mod h1:05duR85P8YHuIfIkA7sn2bvrhKo/pDpFKV2rliYHNOo= -github.com/smartcontractkit/chainlink-testing-framework/wasp v1.50.6-0.20250224181213-3514fc5f737a h1:XRCVgs+3owPjWq35C58wxZyHxdAzSjq5V8BgLF3Ci5U= -github.com/smartcontractkit/chainlink-testing-framework/wasp v1.50.6-0.20250224181213-3514fc5f737a/go.mod h1:AfMr/qKm4WNDlyXjd7ElKYFmoj0u3HCXwI6/f5tqIrg= +github.com/smartcontractkit/chainlink-testing-framework/wasp v1.50.6-0.20250225210020-fc215b29321e h1:Xuulg3EfQdsgO4j+IaMkffpmd0UbIcppB4wsIafKPsA= +github.com/smartcontractkit/chainlink-testing-framework/wasp v1.50.6-0.20250225210020-fc215b29321e/go.mod h1:eqV2n0vpqnY5N51je5/1vC/Qm8MMXVKvOXjLM+53Sog= github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 h1:12ijqMM9tvYVEm+nR826WsrNi6zCKpwBhuApq127wHs= github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7/go.mod h1:FX7/bVdoep147QQhsOPkYsPEXhGZjeYx6lBSaSXtZOA= github.com/smartcontractkit/libocr v0.0.0-20250220133800-f3b940c4f298 h1:PKiqnVOTChlH4a4ljJKL3OKGRgYfIpJS4YD1daAIKks= github.com/smartcontractkit/libocr v0.0.0-20250220133800-f3b940c4f298/go.mod h1:Mb7+/LC4edz7HyHxX4QkE42pSuov4AV68+AxBXAap0o= -github.com/smartcontractkit/mcms v0.10.0 h1:wkBAr8HLyHKwejdwsDOMvIwmzT83tKr3jjB9senLahM= -github.com/smartcontractkit/mcms v0.10.0/go.mod h1:3N7+yvkO3hIFXYRYm3hxKCE6qDWdOC/rZdvIrwzlLKk= +github.com/smartcontractkit/mcms v0.12.2 h1:CTeQmtdYOdqWLuiGHNS67qqEdtJO8r8AygOYN/VpaZM= +github.com/smartcontractkit/mcms v0.12.2/go.mod h1:RKo4v2ClzKPHyllstwVeqdPP7Bb5v+qMMPgO8iMq0Qc= github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de h1:n0w0rKF+SVM+S3WNlup6uabXj2zFlFNfrlsKCMMb/co= github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de/go.mod h1:Sl2MF/Fp3fgJIVzhdGhmZZX2BlnM0oUUyBP4s4xYb6o= github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20241009055228-33d0c0bf38de h1:66VQxXx3lvTaAZrMBkIcdH9VEjujUEvmBQdnyOJnkOc= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index 42d9cfcf831..850d608dfe5 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -1,8 +1,6 @@ module github.com/smartcontractkit/chainlink/load-tests -go 1.24 - -toolchain go1.24.0 +go 1.24.0 // Make sure we're working with the latest chainlink libs replace github.com/smartcontractkit/chainlink/v2 => ../../ @@ -28,12 +26,12 @@ require ( github.com/rs/zerolog v1.33.0 github.com/slack-go/slack v0.15.0 github.com/smartcontractkit/chain-selectors v1.0.40 - github.com/smartcontractkit/chainlink-ccip v0.0.0-20250225130625-4a632b0b1e61 + github.com/smartcontractkit/chainlink-ccip v0.0.0-20250226083129-e596590f48f7 github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0 github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 - github.com/smartcontractkit/chainlink-testing-framework/lib v1.51.0 - github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.10 - github.com/smartcontractkit/chainlink-testing-framework/wasp v1.50.6-0.20250224181213-3514fc5f737a + github.com/smartcontractkit/chainlink-testing-framework/lib v1.51.1-0.20250225210020-fc215b29321e + github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.14-0.20250225174253-0fe1e95e89b2 + github.com/smartcontractkit/chainlink-testing-framework/wasp v1.50.6-0.20250225210020-fc215b29321e github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20241009055228-33d0c0bf38de github.com/stretchr/testify v1.10.0 github.com/wiremock/go-wiremock v1.9.0 @@ -437,16 +435,16 @@ require ( github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250207205350-420ccacab78a // indirect github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250211162441-3d6cea220efb // indirect github.com/smartcontractkit/chainlink-protos/job-distributor v0.9.0 // indirect - github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0 // indirect + github.com/smartcontractkit/chainlink-protos/orchestrator v0.5.0 // indirect github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-15e0d4cde2a6 // indirect github.com/smartcontractkit/chainlink-protos/svr v0.0.0-20250123084029-58cce9b32112 // indirect github.com/smartcontractkit/chainlink-solana v1.1.2-0.20250213203720-e15b1333a14a // indirect - github.com/smartcontractkit/chainlink-testing-framework/framework v0.5.3 // indirect - github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.2 // indirect - github.com/smartcontractkit/chainlink-testing-framework/lib/grafana v1.50.0 // indirect + github.com/smartcontractkit/chainlink-testing-framework/framework v0.5.8-0.20250225210020-fc215b29321e // indirect + github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.5-0.20250225210020-fc215b29321e // indirect + github.com/smartcontractkit/chainlink-testing-framework/lib/grafana v1.50.1-0.20250225210020-fc215b29321e // indirect github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 // indirect github.com/smartcontractkit/libocr v0.0.0-20250220133800-f3b940c4f298 // indirect - github.com/smartcontractkit/mcms v0.10.0 // indirect + github.com/smartcontractkit/mcms v0.12.2 // indirect github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de // indirect github.com/smartcontractkit/wsrpc v0.8.3 // indirect github.com/sony/gobreaker/v2 v2.1.0 // indirect diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index eb923f4966d..65671427faa 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1415,8 +1415,8 @@ github.com/smartcontractkit/chain-selectors v1.0.40 h1:iLvvoZeehVq6/7F+zzolQLF0D github.com/smartcontractkit/chain-selectors v1.0.40/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20250225130625-4a632b0b1e61 h1:x8GMgtVnW81t//lDpizA+/t225RThOjw8ydtrORFS7Q= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20250225130625-4a632b0b1e61/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20250226083129-e596590f48f7 h1:179ROx6VXwUApnhf7NzqMiCVUwutdLzRxvA10KsQQhQ= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20250226083129-e596590f48f7/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 h1:R3OD6Phi0ULIQ2uvHiKVWYdgpi/O1Mt46CUK1UApcXU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0 h1:BTN2nQgFKBxgas6oqY3ym82O+wT++WlpP1+a6KzIfY0= @@ -1433,32 +1433,32 @@ github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02/go.mod h1:7DbPnG0E39eZaX1CXKxRiJ1NOWHwTZYDWR9ys3kZZuU= github.com/smartcontractkit/chainlink-protos/job-distributor v0.9.0 h1:hfMRj2ny6oNHd8w1rhJHdoX3YkoWJtCkBK6wTlCE4+c= github.com/smartcontractkit/chainlink-protos/job-distributor v0.9.0/go.mod h1:/dVVLXrsp+V0AbcYGJo3XMzKg3CkELsweA/TTopCsKE= -github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0 h1:ZBat8EBvE2LpSQR9U1gEbRV6PfAkiFdINmQ8nVnXIAQ= -github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0/go.mod h1:m/A3lqD7ms/RsQ9BT5P2uceYY0QX5mIt4KQxT2G6qEo= +github.com/smartcontractkit/chainlink-protos/orchestrator v0.5.0 h1:xRgu/kMkxcY4LeDKMBhaXU4khgya7v2wyb4Sa5Nzb+Y= +github.com/smartcontractkit/chainlink-protos/orchestrator v0.5.0/go.mod h1:m/A3lqD7ms/RsQ9BT5P2uceYY0QX5mIt4KQxT2G6qEo= github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-15e0d4cde2a6 h1:L6KJ4kGv/yNNoCk8affk7Y1vAY0qglPMXC/hevV/IsA= github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-15e0d4cde2a6/go.mod h1:FRwzI3hGj4CJclNS733gfcffmqQ62ONCkbGi49s658w= github.com/smartcontractkit/chainlink-protos/svr v0.0.0-20250123084029-58cce9b32112 h1:c77Gi/APraqwbBO8fbd/5JY2wW+MSIpYg8Uma9MEZFE= github.com/smartcontractkit/chainlink-protos/svr v0.0.0-20250123084029-58cce9b32112/go.mod h1:TcOliTQU6r59DwG4lo3U+mFM9WWyBHGuFkkxQpvSujo= github.com/smartcontractkit/chainlink-solana v1.1.2-0.20250213203720-e15b1333a14a h1:C+XavZQ0rBOpOrh45LUhdOsvtI8OQ0XZKI5pi+GP6h4= github.com/smartcontractkit/chainlink-solana v1.1.2-0.20250213203720-e15b1333a14a/go.mod h1:aFm1QC/n99mVeBDtv0SE0co56+IECY6Y1fR3OfNYy3c= -github.com/smartcontractkit/chainlink-testing-framework/framework v0.5.3 h1:CeZqFz/si4YBnYE1118mtc4FBLs2Za1qohYAeLZTI+o= -github.com/smartcontractkit/chainlink-testing-framework/framework v0.5.3/go.mod h1:9b5ugzYeKkwbxZ9yMOoxUaPiONDLC/QLCncarDFnhwk= -github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.2 h1:GDGrC5OGiV0RyM1znYWehSQXyZQWTOzrEeJRYmysPCE= -github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.2/go.mod h1:DsT43c1oTBmp3iQkMcoZOoKThwZvt8X3Pz6UmznJ4GY= -github.com/smartcontractkit/chainlink-testing-framework/lib v1.51.0 h1:z7t2OhfE32KK4r5Nt3U0hOnbRwOwIbJs8i7kqKvjAA0= -github.com/smartcontractkit/chainlink-testing-framework/lib v1.51.0/go.mod h1:y6pVvAT/R+YGocAqoQIat+AEaZz2Jdmj/0uUBmwvLCU= -github.com/smartcontractkit/chainlink-testing-framework/lib/grafana v1.50.0 h1:VIxK8u0Jd0Q/VuhmsNm6Bls6Tb31H/sA3A/rbc5hnhg= -github.com/smartcontractkit/chainlink-testing-framework/lib/grafana v1.50.0/go.mod h1:lyAu+oMXdNUzEDScj2DXB2IueY+SDXPPfyl/kb63tMM= -github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.10 h1:Yf+n3T/fnUWcYyfe7bsygV4sWAkNo0QhN58APJFIKIc= -github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.10/go.mod h1:05duR85P8YHuIfIkA7sn2bvrhKo/pDpFKV2rliYHNOo= -github.com/smartcontractkit/chainlink-testing-framework/wasp v1.50.6-0.20250224181213-3514fc5f737a h1:XRCVgs+3owPjWq35C58wxZyHxdAzSjq5V8BgLF3Ci5U= -github.com/smartcontractkit/chainlink-testing-framework/wasp v1.50.6-0.20250224181213-3514fc5f737a/go.mod h1:AfMr/qKm4WNDlyXjd7ElKYFmoj0u3HCXwI6/f5tqIrg= +github.com/smartcontractkit/chainlink-testing-framework/framework v0.5.8-0.20250225210020-fc215b29321e h1:6poVaumg1KZYW/K8Aeip2VN2k9TnSjK6ujwfxJnIsoY= +github.com/smartcontractkit/chainlink-testing-framework/framework v0.5.8-0.20250225210020-fc215b29321e/go.mod h1:tnyujVNgajqe67i2/0iwS4Y3mvbA30XBQWLEAArpwfw= +github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.5-0.20250225210020-fc215b29321e h1:2LFrQLx5VoilcbmiDC9+0rENoNLNECEVYYj3c/VDpHs= +github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.5-0.20250225210020-fc215b29321e/go.mod h1:SKBYQvtnl3OqOTr5aQyt9YbIckuNNn40LOJUCR0vlMo= +github.com/smartcontractkit/chainlink-testing-framework/lib v1.51.1-0.20250225210020-fc215b29321e h1:8fgAWzBdPrJcqX/QJMxYB3Xoi3v0IZkML7pOiLyV/tQ= +github.com/smartcontractkit/chainlink-testing-framework/lib v1.51.1-0.20250225210020-fc215b29321e/go.mod h1:jNxIJa9Fl/zM7rFahUFE8E55VGPC/2e6ilqVKoSbr8U= +github.com/smartcontractkit/chainlink-testing-framework/lib/grafana v1.50.1-0.20250225210020-fc215b29321e h1:g1fOH4P+JLU70bpjQVL7viDU7EhB+JKr1SpvpIDce+g= +github.com/smartcontractkit/chainlink-testing-framework/lib/grafana v1.50.1-0.20250225210020-fc215b29321e/go.mod h1:ym1yBKknQkGfgSQF7EGXSevDuex1YZbz+zgDwRvhY3U= +github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.14-0.20250225174253-0fe1e95e89b2 h1:DFP15nHtZntUnhAsHFxeE40jgHf5qgBX9TvzX49yRdU= +github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.14-0.20250225174253-0fe1e95e89b2/go.mod h1:kHYJnZUqiPF7/xN5273prV+srrLJkS77GbBXHLKQpx0= +github.com/smartcontractkit/chainlink-testing-framework/wasp v1.50.6-0.20250225210020-fc215b29321e h1:Xuulg3EfQdsgO4j+IaMkffpmd0UbIcppB4wsIafKPsA= +github.com/smartcontractkit/chainlink-testing-framework/wasp v1.50.6-0.20250225210020-fc215b29321e/go.mod h1:eqV2n0vpqnY5N51je5/1vC/Qm8MMXVKvOXjLM+53Sog= github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 h1:12ijqMM9tvYVEm+nR826WsrNi6zCKpwBhuApq127wHs= github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7/go.mod h1:FX7/bVdoep147QQhsOPkYsPEXhGZjeYx6lBSaSXtZOA= github.com/smartcontractkit/libocr v0.0.0-20250220133800-f3b940c4f298 h1:PKiqnVOTChlH4a4ljJKL3OKGRgYfIpJS4YD1daAIKks= github.com/smartcontractkit/libocr v0.0.0-20250220133800-f3b940c4f298/go.mod h1:Mb7+/LC4edz7HyHxX4QkE42pSuov4AV68+AxBXAap0o= -github.com/smartcontractkit/mcms v0.10.0 h1:wkBAr8HLyHKwejdwsDOMvIwmzT83tKr3jjB9senLahM= -github.com/smartcontractkit/mcms v0.10.0/go.mod h1:3N7+yvkO3hIFXYRYm3hxKCE6qDWdOC/rZdvIrwzlLKk= +github.com/smartcontractkit/mcms v0.12.2 h1:CTeQmtdYOdqWLuiGHNS67qqEdtJO8r8AygOYN/VpaZM= +github.com/smartcontractkit/mcms v0.12.2/go.mod h1:RKo4v2ClzKPHyllstwVeqdPP7Bb5v+qMMPgO8iMq0Qc= github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de h1:n0w0rKF+SVM+S3WNlup6uabXj2zFlFNfrlsKCMMb/co= github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de/go.mod h1:Sl2MF/Fp3fgJIVzhdGhmZZX2BlnM0oUUyBP4s4xYb6o= github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20241009055228-33d0c0bf38de h1:66VQxXx3lvTaAZrMBkIcdH9VEjujUEvmBQdnyOJnkOc= diff --git a/integration-tests/smoke/ccip/README.md b/integration-tests/smoke/ccip/README.md new file mode 100644 index 00000000000..23057e989b1 --- /dev/null +++ b/integration-tests/smoke/ccip/README.md @@ -0,0 +1,17 @@ +# Run a test + +1. Start a postgres container. +``` +docker run -d --rm --name chainlink-postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_HOST_AUTH_METHOD=trust -v $HOME/chainlink-pg-data/:/var/lib/postgresql/data -p 5432:5432 postgres:14 postgres -N 500 -B 1024MB +``` + +2. From this repo root directory. +``` +export CL_DATABASE_URL="postgresql://postgres:@localhost:5432/chainlink_test?sslmode=disable" +make testdb +``` + +3. From this directory, run a test. +``` +go test -count 1 -v -run "Test_CCIPBatching" . +``` diff --git a/system-tests/lib/cre/environment/environment.go b/system-tests/lib/cre/environment/environment.go index 83f1194860d..9d48bb179ea 100644 --- a/system-tests/lib/cre/environment/environment.go +++ b/system-tests/lib/cre/environment/environment.go @@ -35,6 +35,7 @@ func BuildTopologyAndCLDEnvironment(lgr logger.Logger, nodeSetInput []*types.Cap func buildChainlinkDeploymentEnv(lgr logger.Logger, jdOutput *jd.Output, nodeSetOutput []*types.WrappedNodeOutput, blockchainOutput *blockchain.Output, sethClient *seth.Client) (*deployment.Environment, []*devenv.DON, error) { envs := make([]*deployment.Environment, len(nodeSetOutput)) dons := make([]*devenv.DON, len(nodeSetOutput)) + var allNodesInfo []devenv.NodeInfo for i, nodeOutput := range nodeSetOutput { // assume that each nodeset has only one bootstrap node @@ -42,6 +43,7 @@ func buildChainlinkDeploymentEnv(lgr logger.Logger, jdOutput *jd.Output, nodeSet if err != nil { return nil, nil, errors.Wrap(err, "failed to get node info") } + allNodesInfo = append(allNodesInfo, nodeInfo...) jdConfig := devenv.JDConfig{ GRPC: jdOutput.HostGRPCUrl, @@ -84,6 +86,18 @@ func buildChainlinkDeploymentEnv(lgr logger.Logger, jdOutput *jd.Output, nodeSet nodeIDs = append(nodeIDs, env.NodeIDs...) } + // Create a JD client that can interact with all the nodes, otherwise if it has node IDs of nodes that belong only to one Don, + // it will still propose jobs to unknown nodes, but won't accept them automatically + jd, err := devenv.NewJDClient(context.Background(), devenv.JDConfig{ + GRPC: jdOutput.HostGRPCUrl, + WSRPC: jdOutput.DockerWSRPCUrl, + Creds: insecure.NewCredentials(), + NodeInfo: allNodesInfo, + }) + if err != nil { + return nil, nil, errors.Wrap(err, "failed to create JD client") + } + // we assume that all DONs run on the same chain and that there's only one chain // also, we don't care which instance of offchain client we use, because we have // only one instance of offchain client and we have just configured it to work @@ -93,7 +107,7 @@ func buildChainlinkDeploymentEnv(lgr logger.Logger, jdOutput *jd.Output, nodeSet Logger: envs[0].Logger, ExistingAddresses: envs[0].ExistingAddresses, Chains: envs[0].Chains, - Offchain: envs[0].Offchain, + Offchain: jd, OCRSecrets: envs[0].OCRSecrets, GetContext: envs[0].GetContext, NodeIDs: nodeIDs, diff --git a/system-tests/lib/go.mod b/system-tests/lib/go.mod index ab95c146d37..32efa110bf9 100644 --- a/system-tests/lib/go.mod +++ b/system-tests/lib/go.mod @@ -340,20 +340,20 @@ require ( github.com/smartcontractkit/ccip-owner-contracts v0.1.0 // indirect github.com/smartcontractkit/chain-selectors v1.0.40 // indirect github.com/smartcontractkit/chainlink-automation v0.8.1 // indirect - github.com/smartcontractkit/chainlink-ccip v0.0.0-20250225130625-4a632b0b1e61 // indirect + github.com/smartcontractkit/chainlink-ccip v0.0.0-20250226083129-e596590f48f7 // indirect github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 // indirect github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250224190032-809e4b8cf29e // indirect github.com/smartcontractkit/chainlink-feeds v0.1.1 // indirect github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250207205350-420ccacab78a // indirect github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250211162441-3d6cea220efb // indirect github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 // indirect - github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0 // indirect + github.com/smartcontractkit/chainlink-protos/orchestrator v0.5.0 // indirect github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-15e0d4cde2a6 // indirect github.com/smartcontractkit/chainlink-protos/svr v0.0.0-20250123084029-58cce9b32112 // indirect github.com/smartcontractkit/chainlink-solana v1.1.2-0.20250213203720-e15b1333a14a // indirect github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 // indirect github.com/smartcontractkit/libocr v0.0.0-20250220133800-f3b940c4f298 // indirect - github.com/smartcontractkit/mcms v0.10.0 // indirect + github.com/smartcontractkit/mcms v0.12.2 // indirect github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de // indirect github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20241009055228-33d0c0bf38de // indirect github.com/smartcontractkit/wsrpc v0.8.3 // indirect diff --git a/system-tests/lib/go.sum b/system-tests/lib/go.sum index ee9533a8fdb..64a9a9b9350 100644 --- a/system-tests/lib/go.sum +++ b/system-tests/lib/go.sum @@ -1124,8 +1124,8 @@ github.com/smartcontractkit/chain-selectors v1.0.40 h1:iLvvoZeehVq6/7F+zzolQLF0D github.com/smartcontractkit/chain-selectors v1.0.40/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20250225130625-4a632b0b1e61 h1:x8GMgtVnW81t//lDpizA+/t225RThOjw8ydtrORFS7Q= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20250225130625-4a632b0b1e61/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20250226083129-e596590f48f7 h1:179ROx6VXwUApnhf7NzqMiCVUwutdLzRxvA10KsQQhQ= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20250226083129-e596590f48f7/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 h1:R3OD6Phi0ULIQ2uvHiKVWYdgpi/O1Mt46CUK1UApcXU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0 h1:BTN2nQgFKBxgas6oqY3ym82O+wT++WlpP1+a6KzIfY0= @@ -1142,8 +1142,8 @@ github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02/go.mod h1:7DbPnG0E39eZaX1CXKxRiJ1NOWHwTZYDWR9ys3kZZuU= github.com/smartcontractkit/chainlink-protos/job-distributor v0.9.0 h1:hfMRj2ny6oNHd8w1rhJHdoX3YkoWJtCkBK6wTlCE4+c= github.com/smartcontractkit/chainlink-protos/job-distributor v0.9.0/go.mod h1:/dVVLXrsp+V0AbcYGJo3XMzKg3CkELsweA/TTopCsKE= -github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0 h1:ZBat8EBvE2LpSQR9U1gEbRV6PfAkiFdINmQ8nVnXIAQ= -github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0/go.mod h1:m/A3lqD7ms/RsQ9BT5P2uceYY0QX5mIt4KQxT2G6qEo= +github.com/smartcontractkit/chainlink-protos/orchestrator v0.5.0 h1:xRgu/kMkxcY4LeDKMBhaXU4khgya7v2wyb4Sa5Nzb+Y= +github.com/smartcontractkit/chainlink-protos/orchestrator v0.5.0/go.mod h1:m/A3lqD7ms/RsQ9BT5P2uceYY0QX5mIt4KQxT2G6qEo= github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-15e0d4cde2a6 h1:L6KJ4kGv/yNNoCk8affk7Y1vAY0qglPMXC/hevV/IsA= github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-15e0d4cde2a6/go.mod h1:FRwzI3hGj4CJclNS733gfcffmqQ62ONCkbGi49s658w= github.com/smartcontractkit/chainlink-protos/svr v0.0.0-20250123084029-58cce9b32112 h1:c77Gi/APraqwbBO8fbd/5JY2wW+MSIpYg8Uma9MEZFE= @@ -1160,8 +1160,8 @@ github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 h1:12i github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7/go.mod h1:FX7/bVdoep147QQhsOPkYsPEXhGZjeYx6lBSaSXtZOA= github.com/smartcontractkit/libocr v0.0.0-20250220133800-f3b940c4f298 h1:PKiqnVOTChlH4a4ljJKL3OKGRgYfIpJS4YD1daAIKks= github.com/smartcontractkit/libocr v0.0.0-20250220133800-f3b940c4f298/go.mod h1:Mb7+/LC4edz7HyHxX4QkE42pSuov4AV68+AxBXAap0o= -github.com/smartcontractkit/mcms v0.10.0 h1:wkBAr8HLyHKwejdwsDOMvIwmzT83tKr3jjB9senLahM= -github.com/smartcontractkit/mcms v0.10.0/go.mod h1:3N7+yvkO3hIFXYRYm3hxKCE6qDWdOC/rZdvIrwzlLKk= +github.com/smartcontractkit/mcms v0.12.2 h1:CTeQmtdYOdqWLuiGHNS67qqEdtJO8r8AygOYN/VpaZM= +github.com/smartcontractkit/mcms v0.12.2/go.mod h1:RKo4v2ClzKPHyllstwVeqdPP7Bb5v+qMMPgO8iMq0Qc= github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de h1:n0w0rKF+SVM+S3WNlup6uabXj2zFlFNfrlsKCMMb/co= github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de/go.mod h1:Sl2MF/Fp3fgJIVzhdGhmZZX2BlnM0oUUyBP4s4xYb6o= github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20241009055228-33d0c0bf38de h1:66VQxXx3lvTaAZrMBkIcdH9VEjujUEvmBQdnyOJnkOc= diff --git a/system-tests/tests/go.mod b/system-tests/tests/go.mod index 41cd23bb6bd..b7915ef440b 100644 --- a/system-tests/tests/go.mod +++ b/system-tests/tests/go.mod @@ -343,7 +343,7 @@ require ( github.com/sirupsen/logrus v1.9.3 // indirect github.com/smartcontractkit/ccip-owner-contracts v0.1.0 // indirect github.com/smartcontractkit/chainlink-automation v0.8.1 // indirect - github.com/smartcontractkit/chainlink-ccip v0.0.0-20250225130625-4a632b0b1e61 // indirect + github.com/smartcontractkit/chainlink-ccip v0.0.0-20250226083129-e596590f48f7 // indirect github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 // indirect github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0 // indirect github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250224190032-809e4b8cf29e // indirect @@ -352,13 +352,13 @@ require ( github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250211162441-3d6cea220efb // indirect github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 // indirect github.com/smartcontractkit/chainlink-protos/job-distributor v0.9.0 // indirect - github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0 // indirect + github.com/smartcontractkit/chainlink-protos/orchestrator v0.5.0 // indirect github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-15e0d4cde2a6 // indirect github.com/smartcontractkit/chainlink-protos/svr v0.0.0-20250123084029-58cce9b32112 // indirect github.com/smartcontractkit/chainlink-solana v1.1.2-0.20250213203720-e15b1333a14a // indirect github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 // indirect github.com/smartcontractkit/libocr v0.0.0-20250220133800-f3b940c4f298 // indirect - github.com/smartcontractkit/mcms v0.10.0 // indirect + github.com/smartcontractkit/mcms v0.12.2 // indirect github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de // indirect github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20241009055228-33d0c0bf38de // indirect github.com/smartcontractkit/wsrpc v0.8.3 // indirect diff --git a/system-tests/tests/go.sum b/system-tests/tests/go.sum index 79d3ba1ad86..df065994470 100644 --- a/system-tests/tests/go.sum +++ b/system-tests/tests/go.sum @@ -1124,8 +1124,8 @@ github.com/smartcontractkit/chain-selectors v1.0.40 h1:iLvvoZeehVq6/7F+zzolQLF0D github.com/smartcontractkit/chain-selectors v1.0.40/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20250225130625-4a632b0b1e61 h1:x8GMgtVnW81t//lDpizA+/t225RThOjw8ydtrORFS7Q= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20250225130625-4a632b0b1e61/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20250226083129-e596590f48f7 h1:179ROx6VXwUApnhf7NzqMiCVUwutdLzRxvA10KsQQhQ= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20250226083129-e596590f48f7/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 h1:R3OD6Phi0ULIQ2uvHiKVWYdgpi/O1Mt46CUK1UApcXU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0 h1:BTN2nQgFKBxgas6oqY3ym82O+wT++WlpP1+a6KzIfY0= @@ -1142,8 +1142,8 @@ github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02/go.mod h1:7DbPnG0E39eZaX1CXKxRiJ1NOWHwTZYDWR9ys3kZZuU= github.com/smartcontractkit/chainlink-protos/job-distributor v0.9.0 h1:hfMRj2ny6oNHd8w1rhJHdoX3YkoWJtCkBK6wTlCE4+c= github.com/smartcontractkit/chainlink-protos/job-distributor v0.9.0/go.mod h1:/dVVLXrsp+V0AbcYGJo3XMzKg3CkELsweA/TTopCsKE= -github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0 h1:ZBat8EBvE2LpSQR9U1gEbRV6PfAkiFdINmQ8nVnXIAQ= -github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0/go.mod h1:m/A3lqD7ms/RsQ9BT5P2uceYY0QX5mIt4KQxT2G6qEo= +github.com/smartcontractkit/chainlink-protos/orchestrator v0.5.0 h1:xRgu/kMkxcY4LeDKMBhaXU4khgya7v2wyb4Sa5Nzb+Y= +github.com/smartcontractkit/chainlink-protos/orchestrator v0.5.0/go.mod h1:m/A3lqD7ms/RsQ9BT5P2uceYY0QX5mIt4KQxT2G6qEo= github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-15e0d4cde2a6 h1:L6KJ4kGv/yNNoCk8affk7Y1vAY0qglPMXC/hevV/IsA= github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-15e0d4cde2a6/go.mod h1:FRwzI3hGj4CJclNS733gfcffmqQ62ONCkbGi49s658w= github.com/smartcontractkit/chainlink-protos/svr v0.0.0-20250123084029-58cce9b32112 h1:c77Gi/APraqwbBO8fbd/5JY2wW+MSIpYg8Uma9MEZFE= @@ -1160,8 +1160,8 @@ github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 h1:12i github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7/go.mod h1:FX7/bVdoep147QQhsOPkYsPEXhGZjeYx6lBSaSXtZOA= github.com/smartcontractkit/libocr v0.0.0-20250220133800-f3b940c4f298 h1:PKiqnVOTChlH4a4ljJKL3OKGRgYfIpJS4YD1daAIKks= github.com/smartcontractkit/libocr v0.0.0-20250220133800-f3b940c4f298/go.mod h1:Mb7+/LC4edz7HyHxX4QkE42pSuov4AV68+AxBXAap0o= -github.com/smartcontractkit/mcms v0.10.0 h1:wkBAr8HLyHKwejdwsDOMvIwmzT83tKr3jjB9senLahM= -github.com/smartcontractkit/mcms v0.10.0/go.mod h1:3N7+yvkO3hIFXYRYm3hxKCE6qDWdOC/rZdvIrwzlLKk= +github.com/smartcontractkit/mcms v0.12.2 h1:CTeQmtdYOdqWLuiGHNS67qqEdtJO8r8AygOYN/VpaZM= +github.com/smartcontractkit/mcms v0.12.2/go.mod h1:RKo4v2ClzKPHyllstwVeqdPP7Bb5v+qMMPgO8iMq0Qc= github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de h1:n0w0rKF+SVM+S3WNlup6uabXj2zFlFNfrlsKCMMb/co= github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de/go.mod h1:Sl2MF/Fp3fgJIVzhdGhmZZX2BlnM0oUUyBP4s4xYb6o= github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20241009055228-33d0c0bf38de h1:66VQxXx3lvTaAZrMBkIcdH9VEjujUEvmBQdnyOJnkOc= diff --git a/system-tests/tests/smoke/capabilities/environment-ci.toml b/system-tests/tests/smoke/capabilities/environment-ci.toml index 9d4c8226956..96c63b6800e 100644 --- a/system-tests/tests/smoke/capabilities/environment-ci.toml +++ b/system-tests/tests/smoke/capabilities/environment-ci.toml @@ -4,7 +4,7 @@ docker_cmd_params = ["-b", "5"] [jd] - image = "replace-me" + image = "injected-at-runtime" [fake] port = 8171 @@ -15,7 +15,6 @@ use_cre_cli = true should_compile_new_workflow = false - workflow_folder_location = "not-needed-here" [workflow_config.dependencies] capabilities_version = "v1.0.0-alpha" @@ -41,7 +40,7 @@ [[nodesets.node_specs]] [nodesets.node_specs.node] - image = "replace-me" + image = "injected-at-runtime" user_config_overrides = """ [Feature] LogPoller = true @@ -58,7 +57,7 @@ [[nodesets.node_specs]] [nodesets.node_specs.node] - image = "replace-me" + image = "injected-at-runtime" capabilities = ["./amd64_cron"] user_config_overrides = """ [Feature] @@ -76,7 +75,7 @@ [[nodesets.node_specs]] [nodesets.node_specs.node] - image = "replace-me" + image = "injected-at-runtime" capabilities = ["./amd64_cron"] user_config_overrides = """ [Feature] @@ -94,7 +93,7 @@ [[nodesets.node_specs]] [nodesets.node_specs.node] - image = "replace-me" + image = "injected-at-runtime" capabilities = ["./amd64_cron"] user_config_overrides = """ [Feature] @@ -112,7 +111,7 @@ [[nodesets.node_specs]] [nodesets.node_specs.node] - image = "replace-me" + image = "injected-at-runtime" capabilities = ["./amd64_cron"] user_config_overrides = """ [Feature] diff --git a/system-tests/tests/smoke/capabilities/environment-multi-don-ci.toml b/system-tests/tests/smoke/capabilities/environment-multi-don-ci.toml new file mode 100644 index 00000000000..a5962707ad6 --- /dev/null +++ b/system-tests/tests/smoke/capabilities/environment-multi-don-ci.toml @@ -0,0 +1,184 @@ + +[blockchain_a] + type = "anvil" + docker_cmd_params = ["-b", "5"] + +[jd] + image = "injected-at-runtime" + +[workflow_config] + workflow_name = "abcdefgasd" + feed_id = "018bfe8840700040000000000000000000000000000000000000000000000000" + + use_cre_cli = true + should_compile_new_workflow = false + + [workflow_config.dependencies] + capabilities_version = "v1.0.0-alpha" + cre_cli_version = "v0.0.2" + + [workflow_config.compiled_config] + binary_url = "https://gist.githubusercontent.com/Tofel/73d703157bafe65ab51f7e619c589091/raw/cb7b2a56b37e333fe0bdce07b79538c4ce332f5f/binary.wasm.br" + config_url = "https://gist.githubusercontent.com/Tofel/a261990c5b177fe58f304a52d0998e51/raw/2e28ee10feacf4e451a38fdfbdff8a38cf2628d8/config.json2891974493" + +[[nodesets]] + nodes = 5 + override_mode = "each" + http_port_range_start = 10100 + name = "workflow" + + [nodesets.db] + image = "postgres:12.0" + port = 13000 + volume_name = "workflow_volume" + + [[nodesets.node_specs]] + + [nodesets.node_specs.node] + image = "injected-at-runtime" + user_config_overrides = """ + [Feature] + LogPoller = true + + [OCR2] + Enabled = true + DatabaseTimeout = '1s' + + [P2P.V2] + Enabled = true + ListenAddresses = ['0.0.0.0:5001'] + """ + + [[nodesets.node_specs]] + + [nodesets.node_specs.node] + image = "injected-at-runtime" + capabilities = ["./amd64_cron"] + user_config_overrides = """ + [Feature] + LogPoller = true + + [OCR2] + Enabled = true + DatabaseTimeout = '1s' + + [P2P.V2] + Enabled = true + ListenAddresses = ['0.0.0.0:5001'] + """ + + [[nodesets.node_specs]] + + [nodesets.node_specs.node] + image = "injected-at-runtime" + capabilities = ["./amd64_cron"] + user_config_overrides = """ + [Feature] + LogPoller = true + + [OCR2] + Enabled = true + DatabaseTimeout = '1s' + + [P2P.V2] + Enabled = true + ListenAddresses = ['0.0.0.0:5001'] + """ + + [[nodesets.node_specs]] + + [nodesets.node_specs.node] + image = "injected-at-runtime" + capabilities = ["./amd64_cron"] + user_config_overrides = """ + [Feature] + LogPoller = true + + [OCR2] + Enabled = true + DatabaseTimeout = '1s' + + [P2P.V2] + Enabled = true + ListenAddresses = ['0.0.0.0:5001'] + """ + + [[nodesets.node_specs]] + + [nodesets.node_specs.node] + image = "injected-at-runtime" + capabilities = ["./amd64_cron"] + user_config_overrides = """ + [Feature] + LogPoller = true + + [OCR2] + Enabled = true + DatabaseTimeout = '1s' + + [P2P.V2] + Enabled = true + ListenAddresses = ['0.0.0.0:5001'] + """ + +[[nodesets]] + nodes = 3 + override_mode = "each" + http_port_range_start = 10200 + name = "capabilities" + + [nodesets.db] + image = "postgres:12.0" + port = 13100 + volume_name = "capabilities_volume" + + [[nodesets.node_specs]] + + [nodesets.node_specs.node] + image = "injected-at-runtime" + user_config_overrides = """ + [Feature] + LogPoller = true + + [OCR2] + Enabled = true + DatabaseTimeout = '1s' + + [P2P.V2] + Enabled = true + ListenAddresses = ['0.0.0.0:5001'] + """ + + [[nodesets.node_specs]] + + [nodesets.node_specs.node] + image = "injected-at-runtime" + user_config_overrides = """ + [Feature] + LogPoller = true + + [OCR2] + Enabled = true + DatabaseTimeout = '1s' + + [P2P.V2] + Enabled = true + ListenAddresses = ['0.0.0.0:5001'] + """ + + [[nodesets.node_specs]] + + [nodesets.node_specs.node] + image = "injected-at-runtime" + user_config_overrides = """ + [Feature] + LogPoller = true + + [OCR2] + Enabled = true + DatabaseTimeout = '1s' + + [P2P.V2] + Enabled = true + ListenAddresses = ['0.0.0.0:5001'] + """ \ No newline at end of file diff --git a/system-tests/tests/smoke/capabilities/environment-multi-don.toml b/system-tests/tests/smoke/capabilities/environment-multi-don.toml index cfac5d5ca76..631edf5be94 100644 --- a/system-tests/tests/smoke/capabilities/environment-multi-don.toml +++ b/system-tests/tests/smoke/capabilities/environment-multi-don.toml @@ -5,7 +5,7 @@ [jd] # change to your version - image = "jd-test-1:latest" + image = "job-distributor:latest" [workflow_config] workflow_name = "abcdefgasd" @@ -37,9 +37,8 @@ [[nodesets.node_specs]] [nodesets.node_specs.node] - # docker_ctx = "../../../.." - # docker_file = "plugins/chainlink.Dockerfile" - image = "chainlink-tmp" + docker_ctx = "../../../.." + docker_file = "plugins/chainlink.Dockerfile" user_config_overrides = """ [Feature] LogPoller = true @@ -56,9 +55,8 @@ [[nodesets.node_specs]] [nodesets.node_specs.node] - # docker_ctx = "../../../.." - # docker_file = "plugins/chainlink.Dockerfile" - image = "chainlink-tmp" + docker_ctx = "../../../.." + docker_file = "plugins/chainlink.Dockerfile" capabilities = ["./amd64_cron"] user_config_overrides = """ [Feature] @@ -76,9 +74,8 @@ [[nodesets.node_specs]] [nodesets.node_specs.node] - # docker_ctx = "../../../.." - # docker_file = "plugins/chainlink.Dockerfile" - image = "chainlink-tmp" + docker_ctx = "../../../.." + docker_file = "plugins/chainlink.Dockerfile" capabilities = ["./amd64_cron"] user_config_overrides = """ [Feature] @@ -96,9 +93,8 @@ [[nodesets.node_specs]] [nodesets.node_specs.node] - # docker_ctx = "../../../.." - # docker_file = "plugins/chainlink.Dockerfile" - image = "chainlink-tmp" + docker_ctx = "../../../.." + docker_file = "plugins/chainlink.Dockerfile" capabilities = ["./amd64_cron"] user_config_overrides = """ [Feature] @@ -116,9 +112,8 @@ [[nodesets.node_specs]] [nodesets.node_specs.node] - # docker_ctx = "../../../.." - # docker_file = "plugins/chainlink.Dockerfile" - image = "chainlink-tmp" + docker_ctx = "../../../.." + docker_file = "plugins/chainlink.Dockerfile" capabilities = ["./amd64_cron"] user_config_overrides = """ [Feature] @@ -147,9 +142,8 @@ [[nodesets.node_specs]] [nodesets.node_specs.node] - # docker_ctx = "../../../.." - # docker_file = "plugins/chainlink.Dockerfile" - image = "chainlink-tmp" + docker_ctx = "../../../.." + docker_file = "plugins/chainlink.Dockerfile" user_config_overrides = """ [Feature] LogPoller = true @@ -166,9 +160,8 @@ [[nodesets.node_specs]] [nodesets.node_specs.node] - # docker_ctx = "../../../.." - # docker_file = "plugins/chainlink.Dockerfile" - image = "chainlink-tmp" + docker_ctx = "../../../.." + docker_file = "plugins/chainlink.Dockerfile" user_config_overrides = """ [Feature] LogPoller = true @@ -185,9 +178,8 @@ [[nodesets.node_specs]] [nodesets.node_specs.node] - # docker_ctx = "../../../.." - # docker_file = "plugins/chainlink.Dockerfile" - image = "chainlink-tmp" + docker_ctx = "../../../.." + docker_file = "plugins/chainlink.Dockerfile" user_config_overrides = """ [Feature] LogPoller = true diff --git a/system-tests/tests/smoke/capabilities/environment.toml b/system-tests/tests/smoke/capabilities/environment.toml index 2f7634c48e4..a114520324f 100644 --- a/system-tests/tests/smoke/capabilities/environment.toml +++ b/system-tests/tests/smoke/capabilities/environment.toml @@ -5,7 +5,7 @@ [jd] # change to your version - image = "jd-test-1:latest" + image = "job-distributor:latest" # fake data provider used as a mocked price source [fake] diff --git a/system-tests/tests/smoke/capabilities/guidelines.md b/system-tests/tests/smoke/capabilities/guidelines.md index a6b7d42e9f7..1f4c0a7293f 100644 --- a/system-tests/tests/smoke/capabilities/guidelines.md +++ b/system-tests/tests/smoke/capabilities/guidelines.md @@ -57,9 +57,9 @@ The test requires several environment variables. Below is a launch configuration - **`GITHUB_READ_TOKEN`**: Required for downloading the `cron` capability binary and CRE CLI (if enabled). Requires `content:read` permission for `smartcontractkit/capabilities` and `smartcontractkit/dev-platform` repositories. Use a fine-grained personal access token (PAT) tied to the **organization’s GitHub account**. - **`GIST_WRITE_TOKEN`**: Required only for compiling and uploading a new workflow. It needs `gist:read:write` permissions and should be a fine-grained PAT **tied to your personal GitHub account**. -Test also expects you to have the Job Distributor image available locally. By default, `environment.toml` expects image tagged as `jd-test-1:latest`. The easiest way to get it, is to clone the Job Distributor repository and build it locally with: +Test also expects you to have the Job Distributor image available locally. By default, `environment.toml` expects image tagged as `job-distributor:latest`. The easiest way to get it, is to clone the Job Distributor repository and build it locally with: ```bash -docker build -t jd-test-1 -f e2e/Dockerfile.e2e +docker build -t job-distributor:latest -f e2e/Dockerfile.e2e . ``` Alternatively, if you have access to the Docker image repository where it's stored you can modify `environment.toml` with the name of the image stored there. diff --git a/tools/bin/build_abigen b/tools/bin/build_abigen index f0087c7d800..5f0781ca782 100755 --- a/tools/bin/build_abigen +++ b/tools/bin/build_abigen @@ -34,7 +34,7 @@ pushd "$TMPDIR" git clone --depth=1 --single-branch --branch "$GETH_VERSION" "$GETH_REPO_URL" cd go-ethereum/cmd/abigen -go build +go build -ldflags="-s -w" # necessary on MacOS for code signing (see https://github.com/confluentinc/confluent-kafka-go/issues/1092#issuecomment-2373681430) rm -f "$THIS_DIR/abigen" # necessary on MacOS for code signing cp ./abigen "$THIS_DIR"