diff --git a/.changeset/big-camels-report.md b/.changeset/big-camels-report.md new file mode 100644 index 00000000000..f81f66b9138 --- /dev/null +++ b/.changeset/big-camels-report.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#bugfix fix non-idempotent loopp registry.Register diff --git a/.changeset/brave-cooks-itch.md b/.changeset/brave-cooks-itch.md new file mode 100644 index 00000000000..1ed3dd7e117 --- /dev/null +++ b/.changeset/brave-cooks-itch.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +#updated feat(job-distributor): support tron chain type on sync diff --git a/.changeset/five-gifts-end.md b/.changeset/five-gifts-end.md new file mode 100644 index 00000000000..dd13fda476d --- /dev/null +++ b/.changeset/five-gifts-end.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#added stream job delete capability diff --git a/.changeset/fuzzy-yaks-deny.md b/.changeset/fuzzy-yaks-deny.md new file mode 100644 index 00000000000..6de0c8d096c --- /dev/null +++ b/.changeset/fuzzy-yaks-deny.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#added Lens Sepolia config diff --git a/.changeset/giant-eels-jump.md b/.changeset/giant-eels-jump.md new file mode 100644 index 00000000000..5ab8ca875ca --- /dev/null +++ b/.changeset/giant-eels-jump.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +Add error handling for Arbitrum RPC server timeouts. #added diff --git a/.changeset/spotty-seals-give.md b/.changeset/spotty-seals-give.md new file mode 100644 index 00000000000..1e3874a783f --- /dev/null +++ b/.changeset/spotty-seals-give.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +Switching CCIP to observed ChainReader for HomeChainReader #internal diff --git a/.changeset/tiny-kangaroos-switch.md b/.changeset/tiny-kangaroos-switch.md new file mode 100644 index 00000000000..000f5b6bde5 --- /dev/null +++ b/.changeset/tiny-kangaroos-switch.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +Added new fatal error cases for transactions to the Solana TXM. #added diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index c2d6208d0e3..9f19d52b7ea 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -13,7 +13,7 @@ # Services /core/services/directrequest @smartcontractkit/foundations -/core/services/feeds @smartcontractkit/deployment-automation @eutopian @yevshev @smartcontractkit/core +/core/services/feeds @smartcontractkit/deployment-automation @eutopian @smartcontractkit/core /core/services/synchronization/telem @smartcontractkit/realtime @smartcontractkit/core /core/capabilities/ @smartcontractkit/keystone @smartcontractkit/capabilities-team /core/capabilities/ccip @smartcontractkit/ccip-offchain @@ -140,8 +140,8 @@ core/scripts/gateway @smartcontractkit/dev-services # Deployment tooling /deployment @smartcontractkit/ccip @smartcontractkit/keystone @smartcontractkit/core @smartcontractkit/deployment-automation -/deployment/ccip @smartcontractkit/ccip @smartcontractkit/core -/deployment/keystone @smartcontractkit/keystone @smartcontractkit/core +/deployment/ccip @smartcontractkit/ccip @smartcontractkit/core @smartcontractkit/deployment-automation +/deployment/keystone @smartcontractkit/keystone @smartcontractkit/core @smartcontractkit/deployment-automation # TODO: As more products add their deployment logic here, add the team as an owner # CI/CD diff --git a/.github/e2e-tests.yml b/.github/e2e-tests.yml index ebe5b62a709..675fa315dfa 100644 --- a/.github/e2e-tests.yml +++ b/.github/e2e-tests.yml @@ -10,7 +10,7 @@ runner-test-matrix: # START: OCR tests # Example of 1 runner for all tests in integration-tests/smoke/ocr_test.go - - id: smoke/ocr_test.go:* + - id: smoke/ocr_test.go:* path: integration-tests/smoke/ocr_test.go test_env_type: docker runs_on: ubuntu-latest @@ -27,7 +27,7 @@ runner-test-matrix: runs_on: ubuntu-latest test_cmd: cd integration-tests/ && go test soak/ocr_test.go -v -test.run ^TestOCRv1Soak$ -test.parallel=1 -timeout 900h -count=1 -json test_cmd_opts: 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false - test_secrets_required: true + test_secrets_required: true test_env_vars: TEST_SUITE: soak @@ -60,7 +60,7 @@ runner-test-matrix: test_config_override_path: integration-tests/testconfig/ocr2/overrides/base_sepolia_quick_smoke_test.toml test_secrets_required: true test_env_vars: - TEST_SUITE: soak + TEST_SUITE: soak - id: soak/ocr_test.go:TestForwarderOCRv1Soak path: integration-tests/soak/ocr_test.go @@ -79,7 +79,7 @@ runner-test-matrix: test_secrets_required: true test_env_vars: TEST_SUITE: soak - + - id: soak/ocr_test.go:TestOCRSoak_GethReorgBelowFinality_FinalityTagDisabled path: integration-tests/soak/ocr_test.go test_env_type: k8s-remote-runner @@ -87,7 +87,7 @@ runner-test-matrix: test_cmd: cd integration-tests/ && go test soak/ocr_test.go -v -test.run TestOCRSoak_GethReorgBelowFinality_FinalityTagDisabled -test.parallel=1 -timeout 900h -count=1 -json test_secrets_required: true test_env_vars: - TEST_SUITE: soak + TEST_SUITE: soak - id: soak/ocr_test.go:TestOCRSoak_GethReorgBelowFinality_FinalityTagEnabled path: integration-tests/soak/ocr_test.go @@ -96,7 +96,7 @@ runner-test-matrix: test_cmd: cd integration-tests/ && go test soak/ocr_test.go -v -test.run ^TestOCRSoak_GethReorgBelowFinality_FinalityTagEnabled$ -test.parallel=1 -timeout 900h -count=1 -json test_secrets_required: true test_env_vars: - TEST_SUITE: soak + TEST_SUITE: soak - id: soak/ocr_test.go:TestOCRSoak_GasSpike path: integration-tests/soak/ocr_test.go @@ -105,7 +105,7 @@ runner-test-matrix: test_cmd: cd integration-tests/ && go test soak/ocr_test.go -v -test.run ^TestOCRSoak_GasSpike$ -test.parallel=1 -timeout 900h -count=1 -json test_secrets_required: true test_env_vars: - TEST_SUITE: soak + TEST_SUITE: soak - id: soak/ocr_test.go:TestOCRSoak_ChangeBlockGasLimit path: integration-tests/soak/ocr_test.go @@ -114,7 +114,7 @@ runner-test-matrix: test_cmd: cd integration-tests/ && go test soak/ocr_test.go -v -test.run ^TestOCRSoak_ChangeBlockGasLimit$ -test.parallel=1 -timeout 900h -count=1 -json test_secrets_required: true test_env_vars: - TEST_SUITE: soak + TEST_SUITE: soak - id: soak/ocr_test.go:TestOCRSoak_RPCDownForAllCLNodes path: integration-tests/soak/ocr_test.go @@ -123,7 +123,7 @@ runner-test-matrix: test_cmd: cd integration-tests/ && go test soak/ocr_test.go -v -test.run ^TestOCRSoak_RPCDownForAllCLNodes$ -test.parallel=1 -timeout 900h -count=1 -json test_secrets_required: true test_env_vars: - TEST_SUITE: soak + TEST_SUITE: soak - id: soak/ocr_test.go:TestOCRSoak_RPCDownForHalfCLNodes path: integration-tests/soak/ocr_test.go @@ -132,7 +132,7 @@ runner-test-matrix: test_cmd: cd integration-tests/ && go test soak/ocr_test.go -v -test.run ^TestOCRSoak_RPCDownForHalfCLNodes$ -test.parallel=1 -timeout 900h -count=1 -json test_secrets_required: true test_env_vars: - TEST_SUITE: soak + TEST_SUITE: soak - id: smoke/forwarder_ocr_test.go:* path: integration-tests/smoke/forwarder_ocr_test.go @@ -168,7 +168,7 @@ runner-test-matrix: pyroscope_env: ci-smoke-ocr2-evm-simulated test_env_vars: E2E_TEST_CHAINLINK_VERSION: '{{ env.DEFAULT_CHAINLINK_PLUGINS_VERSION }}' # This is the chainlink version that has the plugins - + - id: smoke/ocr2_test.go:*-plugins path: integration-tests/smoke/ocr2_test.go test_env_type: docker @@ -193,11 +193,12 @@ runner-test-matrix: test_cmd: cd integration-tests/chaos && DETACH_RUNNER=false go test -test.run "^TestOCRChaos$" -v -test.parallel=10 -timeout 60m -count=1 -json test_env_vars: TEST_SUITE: chaos + CHAINLINK_USER_TEAM: Foundations # END: OCR tests # START: Automation tests - + - id: smoke/automation_test.go:^TestAutomationBasic/registry_2_0|TestAutomationBasic/registry_2_1_conditional|TestAutomationBasic/registry_2_1_logtrigger$ path: integration-tests/smoke/automation_test.go test_env_type: docker @@ -273,7 +274,7 @@ runner-test-matrix: - Merge Queue E2E Core Tests - Nightly E2E Tests test_cmd: cd integration-tests/smoke && go test -test.run "^TestAutomationBasic/registry_2_3_with_mercury_v03_link|TestAutomationBasic/registry_2_3_with_logtrigger_and_mercury_v02_link$" -test.parallel=2 -timeout 30m -count=1 -json - pyroscope_env: ci-smoke-automation-evm-simulated + pyroscope_env: ci-smoke-automation-evm-simulated - id: smoke/automation_test.go:^TestSetUpkeepTriggerConfig$ path: integration-tests/smoke/automation_test.go @@ -284,7 +285,7 @@ runner-test-matrix: - Merge Queue E2E Core Tests - Nightly E2E Tests test_cmd: cd integration-tests/smoke && go test -test.run ^TestSetUpkeepTriggerConfig$ -test.parallel=2 -timeout 30m -count=1 -json - pyroscope_env: ci-smoke-automation-evm-simulated + pyroscope_env: ci-smoke-automation-evm-simulated - id: smoke/automation_test.go:^TestAutomationAddFunds$ path: integration-tests/smoke/automation_test.go @@ -295,7 +296,7 @@ runner-test-matrix: - Merge Queue E2E Core Tests - Nightly E2E Tests test_cmd: cd integration-tests/smoke && go test -test.run ^TestAutomationAddFunds$ -test.parallel=3 -timeout 30m -count=1 -json - pyroscope_env: ci-smoke-automation-evm-simulated + pyroscope_env: ci-smoke-automation-evm-simulated - id: smoke/automation_test.go:^TestAutomationPauseUnPause$ path: integration-tests/smoke/automation_test.go @@ -306,7 +307,7 @@ runner-test-matrix: - Merge Queue E2E Core Tests - Nightly E2E Tests test_cmd: cd integration-tests/smoke && go test -test.run ^TestAutomationPauseUnPause$ -test.parallel=3 -timeout 30m -count=1 -json - pyroscope_env: ci-smoke-automation-evm-simulated + pyroscope_env: ci-smoke-automation-evm-simulated - id: smoke/automation_test.go:^TestAutomationRegisterUpkeep$ path: integration-tests/smoke/automation_test.go @@ -317,7 +318,7 @@ runner-test-matrix: - Merge Queue E2E Core Tests - Nightly E2E Tests test_cmd: cd integration-tests/smoke && go test -test.run ^TestAutomationRegisterUpkeep$ -test.parallel=3 -timeout 30m -count=1 -json - pyroscope_env: ci-smoke-automation-evm-simulated + pyroscope_env: ci-smoke-automation-evm-simulated - id: smoke/automation_test.go:^TestAutomationPauseRegistry$ path: integration-tests/smoke/automation_test.go @@ -328,7 +329,7 @@ runner-test-matrix: - Merge Queue E2E Core Tests - Nightly E2E Tests test_cmd: cd integration-tests/smoke && go test -test.run ^TestAutomationPauseRegistry$ -test.parallel=3 -timeout 30m -count=1 -json - pyroscope_env: ci-smoke-automation-evm-simulated + pyroscope_env: ci-smoke-automation-evm-simulated - id: smoke/automation_test.go:^TestAutomationKeeperNodesDown$ path: integration-tests/smoke/automation_test.go @@ -339,7 +340,7 @@ runner-test-matrix: - Merge Queue E2E Core Tests - Nightly E2E Tests test_cmd: cd integration-tests/smoke && go test -test.run ^TestAutomationKeeperNodesDown$ -test.parallel=3 -timeout 30m -count=1 -json - pyroscope_env: ci-smoke-automation-evm-simulated + pyroscope_env: ci-smoke-automation-evm-simulated - id: smoke/automation_test.go:^TestAutomationPerformSimulation$ path: integration-tests/smoke/automation_test.go @@ -350,7 +351,7 @@ runner-test-matrix: - Merge Queue E2E Core Tests - Nightly E2E Tests test_cmd: cd integration-tests/smoke && go test -test.run ^TestAutomationPerformSimulation$ -test.parallel=3 -timeout 30m -count=1 -json - pyroscope_env: ci-smoke-automation-evm-simulated + pyroscope_env: ci-smoke-automation-evm-simulated - id: smoke/automation_test.go:^TestAutomationCheckPerformGasLimit$ path: integration-tests/smoke/automation_test.go @@ -361,7 +362,7 @@ runner-test-matrix: - Merge Queue E2E Core Tests - Nightly E2E Tests test_cmd: cd integration-tests/smoke && go test -test.run ^TestAutomationCheckPerformGasLimit$ -test.parallel=3 -timeout 30m -count=1 -json - pyroscope_env: ci-smoke-automation-evm-simulated + pyroscope_env: ci-smoke-automation-evm-simulated - id: smoke/automation_test.go:^TestUpdateCheckData$ path: integration-tests/smoke/automation_test.go @@ -372,7 +373,7 @@ runner-test-matrix: - Merge Queue E2E Core Tests - Nightly E2E Tests test_cmd: cd integration-tests/smoke && go test -test.run ^TestUpdateCheckData$ -test.parallel=3 -timeout 30m -count=1 -json - pyroscope_env: ci-smoke-automation-evm-simulated + pyroscope_env: ci-smoke-automation-evm-simulated - id: smoke/automation_test.go:^TestSetOffchainConfigWithMaxGasPrice$ path: integration-tests/smoke/automation_test.go @@ -383,7 +384,7 @@ runner-test-matrix: - Merge Queue E2E Core Tests - Nightly E2E Tests test_cmd: cd integration-tests/smoke && go test -test.run ^TestSetOffchainConfigWithMaxGasPrice$ -test.parallel=2 -timeout 30m -count=1 -json - pyroscope_env: ci-smoke-automation-evm-simulated + pyroscope_env: ci-smoke-automation-evm-simulated - id: smoke/keeper_test.go:^TestKeeperBasicSmoke$ path: integration-tests/smoke/keeper_test.go @@ -393,7 +394,7 @@ runner-test-matrix: - Merge Queue E2E Core Tests - Nightly E2E Tests test_cmd: cd integration-tests/smoke && go test -test.run ^TestKeeperBasicSmoke$ -test.parallel=3 -timeout 30m -count=1 -json - pyroscope_env: ci-smoke-keeper-evm-simulated + pyroscope_env: ci-smoke-keeper-evm-simulated - id: smoke/keeper_test.go:^TestKeeperBlockCountPerTurn$ path: integration-tests/smoke/keeper_test.go @@ -403,7 +404,7 @@ runner-test-matrix: - Merge Queue E2E Core Tests - Nightly E2E Tests test_cmd: cd integration-tests/smoke && go test -test.run ^TestKeeperBlockCountPerTurn$ -test.parallel=3 -timeout 30m -count=1 -json - pyroscope_env: ci-smoke-keeper-evm-simulated + pyroscope_env: ci-smoke-keeper-evm-simulated - id: smoke/keeper_test.go:^TestKeeperSimulation$ path: integration-tests/smoke/keeper_test.go @@ -413,7 +414,7 @@ runner-test-matrix: - Merge Queue E2E Core Tests - Nightly E2E Tests test_cmd: cd integration-tests/smoke && go test -test.run ^TestKeeperSimulation$ -test.parallel=2 -timeout 30m -count=1 -json - pyroscope_env: ci-smoke-keeper-evm-simulated + pyroscope_env: ci-smoke-keeper-evm-simulated - id: smoke/keeper_test.go:^TestKeeperCheckPerformGasLimit$ path: integration-tests/smoke/keeper_test.go @@ -423,7 +424,7 @@ runner-test-matrix: - Merge Queue E2E Core Tests - Nightly E2E Tests test_cmd: cd integration-tests/smoke && go test -test.run ^TestKeeperCheckPerformGasLimit$ -test.parallel=2 -timeout 30m -count=1 -json - pyroscope_env: ci-smoke-keeper-evm-simulated + pyroscope_env: ci-smoke-keeper-evm-simulated - id: smoke/keeper_test.go:^TestKeeperRegisterUpkeep$ path: integration-tests/smoke/keeper_test.go @@ -433,7 +434,7 @@ runner-test-matrix: - Merge Queue E2E Core Tests - Nightly E2E Tests test_cmd: cd integration-tests/smoke && go test -test.run ^TestKeeperRegisterUpkeep$ -test.parallel=3 -timeout 30m -count=1 -json - pyroscope_env: ci-smoke-keeper-evm-simulated + pyroscope_env: ci-smoke-keeper-evm-simulated - id: smoke/keeper_test.go:^TestKeeperAddFunds$ path: integration-tests/smoke/keeper_test.go @@ -443,7 +444,7 @@ runner-test-matrix: - Merge Queue E2E Core Tests - Nightly E2E Tests test_cmd: cd integration-tests/smoke && go test -test.run ^TestKeeperAddFunds$ -test.parallel=3 -timeout 30m -count=1 -json - pyroscope_env: ci-smoke-keeper-evm-simulated + pyroscope_env: ci-smoke-keeper-evm-simulated - id: smoke/keeper_test.go:^TestKeeperRemove$ path: integration-tests/smoke/keeper_test.go @@ -453,8 +454,8 @@ runner-test-matrix: - Merge Queue E2E Core Tests - Nightly E2E Tests test_cmd: cd integration-tests/smoke && go test -test.run ^TestKeeperRemove$ -test.parallel=3 -timeout 30m -count=1 -json - pyroscope_env: ci-smoke-keeper-evm-simulated - + pyroscope_env: ci-smoke-keeper-evm-simulated + - id: smoke/keeper_test.go:^TestKeeperPauseRegistry$ path: integration-tests/smoke/keeper_test.go test_env_type: docker @@ -463,7 +464,7 @@ runner-test-matrix: - Merge Queue E2E Core Tests - Nightly E2E Tests test_cmd: cd integration-tests/smoke && go test -test.run ^TestKeeperPauseRegistry$ -test.parallel=2 -timeout 30m -count=1 -json - pyroscope_env: ci-smoke-keeper-evm-simulated + pyroscope_env: ci-smoke-keeper-evm-simulated - id: smoke/keeper_test.go:^TestKeeperMigrateRegistry$ path: integration-tests/smoke/keeper_test.go @@ -473,7 +474,7 @@ runner-test-matrix: - Merge Queue E2E Core Tests - Nightly E2E Tests test_cmd: cd integration-tests/smoke && go test -test.run ^TestKeeperMigrateRegistry$ -test.parallel=1 -timeout 30m -count=1 -json - pyroscope_env: ci-smoke-keeper-evm-simulated + pyroscope_env: ci-smoke-keeper-evm-simulated - id: smoke/keeper_test.go:^TestKeeperNodeDown$ path: integration-tests/smoke/keeper_test.go @@ -483,7 +484,7 @@ runner-test-matrix: - Merge Queue E2E Core Tests - Nightly E2E Tests test_cmd: cd integration-tests/smoke && go test -test.run ^TestKeeperNodeDown$ -test.parallel=3 -timeout 30m -count=1 -json - pyroscope_env: ci-smoke-keeper-evm-simulated + pyroscope_env: ci-smoke-keeper-evm-simulated - id: smoke/keeper_test.go:^TestKeeperPauseUnPauseUpkeep$ path: integration-tests/smoke/keeper_test.go @@ -493,7 +494,7 @@ runner-test-matrix: - Merge Queue E2E Core Tests - Nightly E2E Tests test_cmd: cd integration-tests/smoke && go test -test.run ^TestKeeperPauseUnPauseUpkeep$ -test.parallel=1 -timeout 30m -count=1 -json - pyroscope_env: ci-smoke-keeper-evm-simulated + pyroscope_env: ci-smoke-keeper-evm-simulated - id: smoke/keeper_test.go:^TestKeeperUpdateCheckData$ path: integration-tests/smoke/keeper_test.go @@ -503,7 +504,7 @@ runner-test-matrix: - Merge Queue E2E Core Tests - Nightly E2E Tests test_cmd: cd integration-tests/smoke && go test -test.run ^TestKeeperUpdateCheckData$ -test.parallel=1 -timeout 30m -count=1 -json - pyroscope_env: ci-smoke-keeper-evm-simulated + pyroscope_env: ci-smoke-keeper-evm-simulated - id: smoke/keeper_test.go:^TestKeeperJobReplacement$ path: integration-tests/smoke/keeper_test.go @@ -513,7 +514,7 @@ runner-test-matrix: - Merge Queue E2E Core Tests - Nightly E2E Tests test_cmd: cd integration-tests/smoke && go test -test.run ^TestKeeperJobReplacement$ -test.parallel=1 -timeout 30m -count=1 -json - pyroscope_env: ci-smoke-keeper-evm-simulated + pyroscope_env: ci-smoke-keeper-evm-simulated - id: load/automationv2_1/automationv2_1_test.go:TestLogTrigger path: integration-tests/load/automationv2_1/automationv2_1_test.go @@ -546,7 +547,7 @@ runner-test-matrix: test_env_type: docker runs_on: ubuntu22.04-8cores-32GB triggers: - - Automation Nightly Tests + - Automation Nightly Tests test_cmd: cd integration-tests/smoke && go test -test.run ^TestAutomationNodeUpgrade/registry_2_1 -test.parallel=5 -timeout 60m -count=1 -json test_env_vars: E2E_TEST_CHAINLINK_IMAGE: public.ecr.aws/chainlink/chainlink @@ -624,6 +625,7 @@ runner-test-matrix: pyroscope_env: ci-automation-on-demand-chaos test_env_vars: TEST_SUITE: chaos + CHAINLINK_USER_TEAM: Automation - id: benchmark/automation_test.go:TestAutomationBenchmark path: integration-tests/benchmark/automation_test.go @@ -676,7 +678,7 @@ runner-test-matrix: test_env_vars: TEST_TYPE: Smoke triggers: - - On Demand VRFV2 Plus Performance Test + - On Demand VRFV2 Plus Performance Test - id: load/vrfv2plus/vrfv2plus_test.go:^TestVRFV2PlusBHSPerformance$Smoke path: integration-tests/load/vrfv2plus/vrfv2plus_test.go @@ -688,7 +690,7 @@ runner-test-matrix: test_env_vars: TEST_TYPE: Smoke triggers: - - On Demand VRFV2 Plus Performance Test + - On Demand VRFV2 Plus Performance Test - id: load/vrfv2/vrfv2_test.go:^TestVRFV2Performance$Smoke path: integration-tests/load/vrfv2/vrfv2_test.go @@ -698,9 +700,9 @@ runner-test-matrix: test_config_override_required: true test_secrets_required: true test_env_vars: - TEST_TYPE: Smoke + TEST_TYPE: Smoke triggers: - - On Demand VRFV2 Performance Test + - On Demand VRFV2 Performance Test - id: load/vrfv2/vrfv2_test.go:^TestVRFV2PlusBHSPerformance$Smoke path: integration-tests/load/vrfv2/vrfv2_test.go @@ -892,7 +894,7 @@ runner-test-matrix: - Merge Queue E2E Core Tests - Nightly E2E Tests test_cmd: cd integration-tests/ && go test smoke/flux_test.go -timeout 30m -count=1 -json - pyroscope_env: ci-smoke-flux-evm-simulated + pyroscope_env: ci-smoke-flux-evm-simulated - id: smoke/reorg_above_finality_test.go:* path: integration-tests/smoke/reorg_above_finality_test.go @@ -904,7 +906,7 @@ runner-test-matrix: - Nightly E2E Tests test_cmd: cd integration-tests/ && go test smoke/reorg_above_finality_test.go -timeout 30m -count=1 -json pyroscope_env: ci-smoke-reorg-above-finality-evm-simulated - + - id: migration/upgrade_version_test.go:* path: integration-tests/migration/upgrade_version_test.go test_env_type: docker @@ -935,19 +937,6 @@ runner-test-matrix: # START: CCIPv1.6 tests - - id: smoke/ccip/ccip_message_limitations_test.go:* - path: integration-tests/smoke/ccip/ccip_message_limitations_test.go - test_env_type: docker - runs_on: ubuntu-latest - triggers: - - PR E2E Core Tests - - Nightly E2E Tests - test_cmd: cd integration-tests/smoke/ccip && go test -run '^Test_CCIPMessageLimitations' -timeout 18m -test.parallel=1 -count=1 -json ./... - pyroscope_env: ci-smoke-ccipv1_6-evm-simulated - test_env_vars: - E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2 - E2E_JD_VERSION: 0.6.0 - - id: smoke/ccip/ccip_token_price_updates_test.go:* path: integration-tests/smoke/ccip/ccip_token_price_updates_test.go test_env_type: docker @@ -960,6 +949,7 @@ runner-test-matrix: test_env_vars: E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2 E2E_JD_VERSION: 0.6.0 + CCIP_V16_TEST_ENV: docker - id: smoke/ccip/ccip_gas_price_updates_test.go:* path: integration-tests/smoke/ccip/ccip_gas_price_updates_test.go @@ -973,11 +963,12 @@ runner-test-matrix: test_env_vars: E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2 E2E_JD_VERSION: 0.6.0 + CCIP_V16_TEST_ENV: docker - id: smoke/ccip/ccip_rmn_test.go:^TestRMN_TwoMessagesOnTwoLanesIncludingBatching$ path: integration-tests/smoke/ccip/ccip_rmn_test.go test_env_type: docker - runs_on: ubuntu-latest + runs_on: ubuntu20.04-8cores-32GB triggers: - PR E2E Core Tests - Nightly E2E Tests @@ -988,11 +979,12 @@ runner-test-matrix: E2E_JD_VERSION: 0.6.0 E2E_RMN_RAGEPROXY_VERSION: master-f461a9e E2E_RMN_AFN2PROXY_VERSION: master-f461a9e + CCIP_V16_TEST_ENV: docker - id: smoke/ccip/ccip_rmn_test.go:^TestRMN_MultipleMessagesOnOneLaneNoWaitForExec$ path: integration-tests/smoke/ccip/ccip_rmn_test.go test_env_type: docker - runs_on: ubuntu-latest + runs_on: ubuntu20.04-8cores-32GB triggers: - PR E2E Core Tests - Nightly E2E Tests @@ -1003,11 +995,12 @@ runner-test-matrix: E2E_JD_VERSION: 0.6.0 E2E_RMN_RAGEPROXY_VERSION: master-f461a9e E2E_RMN_AFN2PROXY_VERSION: master-f461a9e + CCIP_V16_TEST_ENV: docker - id: smoke/ccip/ccip_rmn_test.go:^TestRMN_NotEnoughObservers$ path: integration-tests/smoke/ccip/ccip_rmn_test.go test_env_type: docker - runs_on: ubuntu-latest + runs_on: ubuntu20.04-8cores-32GB triggers: - PR E2E Core Tests - Nightly E2E Tests @@ -1018,11 +1011,12 @@ runner-test-matrix: E2E_JD_VERSION: 0.6.0 E2E_RMN_RAGEPROXY_VERSION: master-f461a9e E2E_RMN_AFN2PROXY_VERSION: master-f461a9e + CCIP_V16_TEST_ENV: docker - id: smoke/ccip/ccip_rmn_test.go:^TestRMN_DifferentSigners$ path: integration-tests/smoke/ccip/ccip_rmn_test.go test_env_type: docker - runs_on: ubuntu-latest + runs_on: ubuntu20.04-8cores-32GB triggers: - PR E2E Core Tests - Nightly E2E Tests @@ -1033,11 +1027,12 @@ runner-test-matrix: E2E_JD_VERSION: 0.6.0 E2E_RMN_RAGEPROXY_VERSION: master-f461a9e E2E_RMN_AFN2PROXY_VERSION: master-f461a9e + CCIP_V16_TEST_ENV: docker - id: smoke/ccip/ccip_rmn_test.go:^TestRMN_NotEnoughSigners$ path: integration-tests/smoke/ccip/ccip_rmn_test.go test_env_type: docker - runs_on: ubuntu-latest + runs_on: ubuntu20.04-8cores-32GB triggers: - PR E2E Core Tests - Nightly E2E Tests @@ -1048,11 +1043,12 @@ runner-test-matrix: E2E_JD_VERSION: 0.6.0 E2E_RMN_RAGEPROXY_VERSION: master-f461a9e E2E_RMN_AFN2PROXY_VERSION: master-f461a9e + CCIP_V16_TEST_ENV: docker - id: smoke/ccip/ccip_rmn_test.go:^TestRMN_DifferentRmnNodesForDifferentChains$ path: integration-tests/smoke/ccip/ccip_rmn_test.go test_env_type: docker - runs_on: ubuntu-latest + runs_on: ubuntu20.04-8cores-32GB triggers: - PR E2E Core Tests - Nightly E2E Tests @@ -1063,11 +1059,12 @@ runner-test-matrix: E2E_JD_VERSION: 0.6.0 E2E_RMN_RAGEPROXY_VERSION: master-f461a9e E2E_RMN_AFN2PROXY_VERSION: master-f461a9e + CCIP_V16_TEST_ENV: docker - id: smoke/ccip/ccip_rmn_test.go:^TestRMN_TwoMessagesOneSourceChainCursed$ path: integration-tests/smoke/ccip/ccip_rmn_test.go test_env_type: docker - runs_on: ubuntu-latest + runs_on: ubuntu20.04-8cores-32GB triggers: - PR E2E Core Tests - Nightly E2E Tests @@ -1078,11 +1075,12 @@ runner-test-matrix: E2E_JD_VERSION: 0.6.0 E2E_RMN_RAGEPROXY_VERSION: master-f461a9e E2E_RMN_AFN2PROXY_VERSION: master-f461a9e + CCIP_V16_TEST_ENV: docker - id: smoke/ccip/ccip_rmn_test.go:^TestRMN_GlobalCurseTwoMessagesOnTwoLanes$ path: integration-tests/smoke/ccip/ccip_rmn_test.go test_env_type: docker - runs_on: ubuntu-latest + runs_on: ubuntu20.04-8cores-32GB triggers: - PR E2E Core Tests - Nightly E2E Tests @@ -1093,6 +1091,7 @@ runner-test-matrix: E2E_JD_VERSION: 0.6.0 E2E_RMN_RAGEPROXY_VERSION: master-f461a9e E2E_RMN_AFN2PROXY_VERSION: master-f461a9e + CCIP_V16_TEST_ENV: docker # END: CCIPv1.6 tests @@ -1109,7 +1108,8 @@ runner-test-matrix: test_cmd: cd integration-tests/ccip-tests/smoke && go test ccip_test.go -test.run ^TestSmokeCCIPForBidirectionalLane$ -timeout 30m -count=1 -test.parallel=1 -json test_env_vars: E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2 - + CHAINLINK_USER_TEAM: CCIP + - id: ccip-smoke-usdc path: integration-tests/ccip-tests/smoke/ccip_test.go test_env_type: docker @@ -1121,6 +1121,7 @@ runner-test-matrix: test_cmd: cd integration-tests/ccip-tests/smoke && go test ccip_test.go -test.run ^TestSmokeCCIPForBidirectionalLane$ -timeout 30m -count=1 -test.parallel=1 -json test_env_vars: E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2 + CHAINLINK_USER_TEAM: CCIP test_config_override_path: integration-tests/ccip-tests/testconfig/tomls/usdc_mock_deployment.toml - id: ccip-smoke-db-compatibility @@ -1134,6 +1135,7 @@ runner-test-matrix: test_cmd: cd integration-tests/ccip-tests/smoke && go test ccip_test.go -test.run ^TestSmokeCCIPForBidirectionalLane$ -timeout 30m -count=1 -test.parallel=1 -json test_env_vars: E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2 + CHAINLINK_USER_TEAM: CCIP test_config_override_path: integration-tests/ccip-tests/testconfig/tomls/db-compatibility.toml - id: ccip-smoke-leader-lane @@ -1160,6 +1162,7 @@ runner-test-matrix: test_cmd: cd integration-tests/ccip-tests/smoke && go test ccip_test.go -test.run ^TestSmokeCCIPTokenPoolRateLimits$ -timeout 30m -count=1 -test.parallel=1 -json test_env_vars: E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2 + CHAINLINK_USER_TEAM: CCIP - id: ccip-tests/smoke/ccip_test.go:^TestSmokeCCIPMulticall$ path: integration-tests/ccip-tests/smoke/ccip_test.go @@ -1172,6 +1175,7 @@ runner-test-matrix: test_cmd: cd integration-tests/ccip-tests/smoke && go test ccip_test.go -test.run ^TestSmokeCCIPMulticall$ -timeout 30m -count=1 -test.parallel=1 -json test_env_vars: E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2 + CHAINLINK_USER_TEAM: CCIP - id: ccip-tests/smoke/ccip_test.go:^TestSmokeCCIPManuallyExecuteAfterExecutionFailingDueToInsufficientGas$ path: integration-tests/ccip-tests/smoke/ccip_test.go @@ -1184,6 +1188,7 @@ runner-test-matrix: test_cmd: cd integration-tests/ccip-tests/smoke && go test ccip_test.go -test.run ^TestSmokeCCIPManuallyExecuteAfterExecutionFailingDueToInsufficientGas$ -timeout 30m -count=1 -test.parallel=1 -json test_env_vars: E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2 + CHAINLINK_USER_TEAM: CCIP - id: ccip-tests/smoke/ccip_test.go:^TestSmokeCCIPOnRampLimits$ path: integration-tests/ccip-tests/smoke/ccip_test.go @@ -1196,6 +1201,7 @@ runner-test-matrix: test_cmd: cd integration-tests/ccip-tests/smoke && go test ccip_test.go -test.run ^TestSmokeCCIPOnRampLimits$ -timeout 30m -count=1 -test.parallel=1 -json test_env_vars: E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2 + CHAINLINK_USER_TEAM: CCIP - id: ccip-tests/smoke/ccip_test.go:^TestSmokeCCIPOffRampCapacityLimit$ path: integration-tests/ccip-tests/smoke/ccip_test.go @@ -1205,7 +1211,8 @@ runner-test-matrix: - Nightly E2E Tests test_cmd: cd integration-tests/ccip-tests/smoke && go test ccip_test.go -test.run ^TestSmokeCCIPOffRampCapacityLimit$ -timeout 30m -count=1 -test.parallel=1 -json test_env_vars: - E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2 + E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2 + CHAINLINK_USER_TEAM: CCIP - id: ccip-tests/smoke/ccip_test.go:^TestSmokeCCIPOffRampAggRateLimit$ path: integration-tests/ccip-tests/smoke/ccip_test.go @@ -1216,6 +1223,7 @@ runner-test-matrix: test_cmd: cd integration-tests/ccip-tests/smoke && go test ccip_test.go -test.run ^TestSmokeCCIPOffRampAggRateLimit$ -timeout 30m -count=1 -test.parallel=1 -json test_env_vars: E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2 + CHAINLINK_USER_TEAM: CCIP - id: ccip-tests/smoke/ccip_test.go:^TestSmokeCCIPReorgBelowFinality$ path: integration-tests/ccip-tests/smoke/ccip_test.go @@ -1228,6 +1236,7 @@ runner-test-matrix: test_cmd: cd integration-tests/ccip-tests/smoke && go test ccip_test.go -test.run ^TestSmokeCCIPReorgBelowFinality$ -timeout 30m -count=1 -test.parallel=1 -json test_env_vars: E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2 + CHAINLINK_USER_TEAM: CCIP test_config_override_path: integration-tests/ccip-tests/testconfig/tomls/ccip-reorg.toml - id: ccip-tests/smoke/ccip_test.go:^TestSmokeCCIPReorgAboveFinalityAtDestination$ @@ -1241,6 +1250,7 @@ runner-test-matrix: test_cmd: cd integration-tests/ccip-tests/smoke && go test ccip_test.go -test.run ^TestSmokeCCIPReorgAboveFinalityAtDestination$ -timeout 30m -count=1 -test.parallel=1 -json test_env_vars: E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2 + CHAINLINK_USER_TEAM: CCIP test_config_override_path: integration-tests/ccip-tests/testconfig/tomls/ccip-reorg.toml - id: ccip-tests/smoke/ccip_test.go:^TestSmokeCCIPReorgAboveFinalityAtSource$ @@ -1254,6 +1264,7 @@ runner-test-matrix: test_cmd: cd integration-tests/ccip-tests/smoke && go test ccip_test.go -test.run ^TestSmokeCCIPReorgAboveFinalityAtSource$ -timeout 30m -count=1 -test.parallel=1 -json test_env_vars: E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2 + CHAINLINK_USER_TEAM: CCIP test_config_override_path: integration-tests/ccip-tests/testconfig/tomls/ccip-reorg.toml - id: integration-tests/ccip-tests/load/ccip_test.go:TestLoadCCIPStableRPS @@ -1265,8 +1276,8 @@ runner-test-matrix: TEST_SUITE: ccip-load E2E_TEST_GRAFANA_DASHBOARD_URL: "/d/6vjVx-1V8/ccip-long-running-tests" triggers: - - E2E CCIP Load Tests - test_artifacts_on_failure: + - E2E CCIP Load Tests + test_artifacts_on_failure: - ./integration-tests/load/logs/payload_ccip.json # Enable when CCIP-2277 is resolved @@ -1280,8 +1291,8 @@ runner-test-matrix: # test_env_vars: # E2E_TEST_GRAFANA_DASHBOARD_URL: "/d/6vjVx-1V8/ccip-long-running-tests" # triggers: - # - E2E CCIP Load Tests - # test_artifacts_on_failure: + # - E2E CCIP Load Tests + # test_artifacts_on_failure: # - ./integration-tests/load/logs/payload_ccip.json - id: ccip-tests/chaos/ccip_test.go @@ -1309,5 +1320,5 @@ runner-test-matrix: TEST_TRIGGERED_BY: ccip-cron-chaos-eth TEST_LOG_LEVEL: debug E2E_TEST_GRAFANA_DASHBOARD_URL: /d/6vjVx-1V8/ccip-long-running-tests - + # END: CCIP tests diff --git a/.github/integration-in-memory-tests.yml b/.github/integration-in-memory-tests.yml index b7522274d85..9550d74f21f 100644 --- a/.github/integration-in-memory-tests.yml +++ b/.github/integration-in-memory-tests.yml @@ -23,6 +23,14 @@ runner-test-matrix: triggers: - PR Integration CCIP Tests test_cmd: cd integration-tests/smoke/ccip && go test ccip_messaging_test.go -timeout 12m -test.parallel=2 -count=1 -json + + - id: smoke/ccip/ccip_message_limitations_test.go:* + path: integration-tests/smoke/ccip/ccip_message_limitations_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 -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 diff --git a/.github/workflows/ci-core-partial.yml b/.github/workflows/ci-core-partial.yml index c9752d4e1e4..35f689090e8 100644 --- a/.github/workflows/ci-core-partial.yml +++ b/.github/workflows/ci-core-partial.yml @@ -46,6 +46,7 @@ jobs: permissions: id-token: write contents: write + actions: write strategy: fail-fast: false matrix: @@ -86,7 +87,7 @@ jobs: go-mod-download-directory: ${{ matrix.type.test-suite == 'ccip-deployment' && matrix.type.module-directory || '' }} - name: Build Tests - uses: smartcontractkit/.github/apps/go-conditional-tests@37882e110590e636627a26371bdbd56ddfcce821 # go-conditional-tests@0.1.0 + uses: smartcontractkit/.github/apps/go-conditional-tests@57f99fbea73056c490c766d50ef582a13ec4f3bb # go-conditional-tests@0.2.0 timeout-minutes: 10 with: pipeline-step: "build" @@ -98,7 +99,7 @@ jobs: build-flags: ${{ matrix.type.build-flags }} - name: Run Tests - uses: smartcontractkit/.github/apps/go-conditional-tests@37882e110590e636627a26371bdbd56ddfcce821 # go-conditional-tests@0.1.0 + uses: smartcontractkit/.github/apps/go-conditional-tests@57f99fbea73056c490c766d50ef582a13ec4f3bb # go-conditional-tests@0.2.0 timeout-minutes: 15 env: CL_DATABASE_URL: ${{ env.DB_URL }} @@ -112,7 +113,7 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} - name: Update Test Index - uses: smartcontractkit/.github/apps/go-conditional-tests@37882e110590e636627a26371bdbd56ddfcce821 # go-conditional-tests@0.1.0 + uses: smartcontractkit/.github/apps/go-conditional-tests@57f99fbea73056c490c766d50ef582a13ec4f3bb # go-conditional-tests@0.2.0 with: pipeline-step: "update" collect-coverage: ${{ needs.filter.outputs.should-collect-coverage }} @@ -130,7 +131,7 @@ jobs: if: ${{ needs.filter.outputs.should-collect-coverage == 'true' }} runs-on: ubuntu-latest steps: - - name: Checkout the repo + - name: Checkout the repo uses: actions/checkout@v4.2.1 with: # fetches all history for all tags and branches to provide more metadata for sonar reports diff --git a/.github/workflows/ci-core.yml b/.github/workflows/ci-core.yml index c38ecd918ae..726b6b14074 100644 --- a/.github/workflows/ci-core.yml +++ b/.github/workflows/ci-core.yml @@ -463,9 +463,10 @@ jobs: findByTestFilesDiff: true findByAffectedPackages: false slackNotificationAfterTestsChannelId: 'C07TRF65CNS' #flaky-test-detector-notifications - extraArgs: '{ "skipped_tests": "TestChainComponents", "run_with_race": "true", "print_failed_tests": "true", "test_repeat_count": "3", "min_pass_ratio": "0.01" }' + extraArgs: '{ "skipped_tests": "TestChainComponents", "run_with_race": "true", "print_failed_tests": "true", "test_repeat_count": "3", "omit_test_outputs_on_success": "true" }' secrets: SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} trigger-flaky-test-detection-for-deployment-project: name: Flakeguard Deployment Project @@ -481,9 +482,10 @@ jobs: findByTestFilesDiff: true findByAffectedPackages: false slackNotificationAfterTestsChannelId: 'C07TRF65CNS' #flaky-test-detector-notifications - extraArgs: '{ "skipped_tests": "TestAddLane", "run_with_race": "true", "print_failed_tests": "true", "test_repeat_count": "3", "min_pass_ratio": "0.01" }' + extraArgs: '{ "skipped_tests": "TestAddLane", "run_with_race": "true", "print_failed_tests": "true", "test_repeat_count": "3", "omit_test_outputs_on_success": "true" }' secrets: SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} clean: name: Clean Go Tidy & Generate diff --git a/.github/workflows/client-compatibility-tests.yml b/.github/workflows/client-compatibility-tests.yml index 03c5b893cca..5f986ccf16c 100644 --- a/.github/workflows/client-compatibility-tests.yml +++ b/.github/workflows/client-compatibility-tests.yml @@ -668,9 +668,6 @@ jobs: E2E_TEST_PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }} E2E_TEST_PYROSCOPE_ENVIRONMENT: ci-client-compatability-${{ matrix.eth_client }}-testnet E2E_TEST_PYROSCOPE_ENABLED: "true" - E2E_TEST_LOGGING_RUN_ID: ${{ github.run_id }} - E2E_TEST_LOG_COLLECT: ${{ vars.TEST_LOG_COLLECT }} - E2E_TEST_LOG_STREAM_LOG_TARGETS: ${{ vars.LOGSTREAM_LOG_TARGETS }} E2E_TEST_PRIVATE_ETHEREUM_EXECUTION_LAYER: ${{ matrix.evm_node.eth_implementation || 'geth' }} E2E_TEST_PRIVATE_ETHEREUM_ETHEREUM_VERSION: auto_fill # Auto fill the version based on the docker image E2E_TEST_PRIVATE_ETHEREUM_CUSTOM_DOCKER_IMAGE: ${{ matrix.evm_node.docker_image }} diff --git a/.github/workflows/flakeguard-nightly.yml b/.github/workflows/flakeguard-nightly.yml index 37c00fa0a8f..178d43d809a 100644 --- a/.github/workflows/flakeguard-nightly.yml +++ b/.github/workflows/flakeguard-nightly.yml @@ -20,3 +20,5 @@ jobs: slackNotificationAfterTestsChannelId: 'C07TRF65CNS' #flaky-test-detector-notifications secrets: SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + diff --git a/.github/workflows/flakeguard-on-demand.yml b/.github/workflows/flakeguard-on-demand.yml index fe972894594..4508da30e6b 100644 --- a/.github/workflows/flakeguard-on-demand.yml +++ b/.github/workflows/flakeguard-on-demand.yml @@ -14,14 +14,13 @@ on: description: 'The path to the project to run the flaky test detection.' default: '.' baseRef: - required: true + required: false type: string - description: 'The base reference or branch to compare changes for detecting flaky tests.' - default: 'origin/develop' + description: 'The base reference or branch to compare changes for detecting flaky tests. Set only when running diffs between branches. E.g. (develop)' headRef: required: false type: string - description: 'The head reference or branch to compare changes for detecting flaky tests. Default is the current branch.' + description: 'The head reference or branch to compare changes for detecting flaky tests. Default is the current branch. E.g. (develop)' runAllTests: required: false type: boolean @@ -69,4 +68,5 @@ jobs: extraArgs: ${{ inputs.extraArgs }} secrets: SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index ecc56e2f291..3951c356a3b 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -15,11 +15,11 @@ on: baseRef: required: false type: string - description: 'The base reference or branch to compare changes for detecting flaky tests.' + description: 'The base reference or branch to compare changes for detecting flaky tests. Set only when running diffs between branches. E.g. (develop)' headRef: required: false type: string - description: 'The head reference or branch to compare changes for detecting flaky tests. Default is the current branch.' + description: 'The head reference or branch to compare changes for detecting flaky tests. Default is the current branch. E.g. (develop)' runAllTests: required: false type: boolean @@ -52,21 +52,23 @@ on: secrets: SLACK_BOT_TOKEN: required: false + GH_TOKEN: + required: true env: + GIT_BASE_REF: ${{ inputs.baseRef }} GIT_HEAD_REF: ${{ inputs.headRef || github.ref }} - SKIPPED_TESTS: ${{ fromJson(inputs.extraArgs)['skipped_tests'] || '' }} # Comma separated list of test names to skip running in the flaky detector. Related issue: TT-1823 - DEFAULT_MAX_RUNNER_COUNT: ${{ fromJson(inputs.extraArgs)['default_max_runner_count'] || '8' }} # The default maximum number of GitHub runners to use for parallel test execution. - ALL_TESTS_RUNNER_COUNT: ${{ fromJson(inputs.extraArgs)['all_tests_runner_count'] || '2' }} # The number of GitHub runners to use when running all tests `runAllTests=true`. - TEST_REPEAT_COUNT: ${{ fromJson(inputs.extraArgs)['test_repeat_count'] || '5' }} # The number of times each runner should run a test to detect flaky tests. - RUN_WITH_RACE: ${{ fromJson(inputs.extraArgs)['run_with_race'] || 'true' }} # Whether to run tests with -race flag. - RUN_WITH_SHUFFLE: ${{ fromJson(inputs.extraArgs)['run_with_shuffle'] || 'false' }} # Whether to run tests with -shuffle flag. - SHUFFLE_SEED: ${{ fromJson(inputs.extraArgs)['shuffle_seed'] || '999' }} # The seed to use when -shuffle flag is enabled. Requires RUN_WITH_SHUFFLE to be true. - ALL_TESTS_RUNNER: ${{ fromJson(inputs.extraArgs)['all_tests_runner'] || 'ubuntu22.04-32cores-128GB' }} # The runner to use for running all tests. + SKIPPED_TESTS: ${{ fromJSON(inputs.extraArgs)['skipped_tests'] || '' }} # Comma separated list of test names to skip running in the flaky detector. Related issue: TT-1823 + DEFAULT_MAX_RUNNER_COUNT: ${{ fromJSON(inputs.extraArgs)['default_max_runner_count'] || '8' }} # The default maximum number of GitHub runners to use for parallel test execution. + ALL_TESTS_RUNNER_COUNT: ${{ fromJSON(inputs.extraArgs)['all_tests_runner_count'] || '2' }} # The number of GitHub runners to use when running all tests `runAllTests=true`. + TEST_REPEAT_COUNT: ${{ fromJSON(inputs.extraArgs)['test_repeat_count'] || '5' }} # The number of times each runner should run a test to detect flaky tests. + RUN_WITH_RACE: ${{ fromJSON(inputs.extraArgs)['run_with_race'] || 'true' }} # Whether to run tests with -race flag. + RUN_WITH_SHUFFLE: ${{ fromJSON(inputs.extraArgs)['run_with_shuffle'] || 'false' }} # Whether to run tests with -shuffle flag. + SHUFFLE_SEED: ${{ fromJSON(inputs.extraArgs)['shuffle_seed'] || '999' }} # The seed to use when -shuffle flag is enabled. Requires RUN_WITH_SHUFFLE to be true. + ALL_TESTS_RUNNER: ${{ fromJSON(inputs.extraArgs)['all_tests_runner'] || 'ubuntu22.04-32cores-128GB' }} # The runner to use for running all tests. DEFAULT_RUNNER: 'ubuntu-latest' # The default runner to use for running tests. - UPLOAD_ALL_TEST_RESULTS: ${{ fromJson(inputs.extraArgs)['upload_all_test_results'] || 'false' }} # Whether to upload all test results as artifacts. - PRINT_FAILED_TESTS: ${{ fromJson(inputs.extraArgs)['print_failed_tests'] || 'false' }} # Whether to print failed tests in the GitHub console. - + UPLOAD_ALL_TEST_RESULTS: ${{ fromJSON(inputs.extraArgs)['upload_all_test_results'] || 'false' }} # Whether to upload all test results as artifacts. + OMIT_TEST_OUTPUTS_ON_SUCCESS: ${{ fromJSON(inputs.extraArgs)['omit_test_outputs_on_success'] || 'true' }} jobs: get-tests: @@ -79,6 +81,7 @@ jobs: affected_test_packages: ${{ steps.get-tests.outputs.packages }} git_head_sha: ${{ steps.get_commit_sha.outputs.git_head_sha }} git_head_short_sha: ${{ steps.get_commit_sha.outputs.git_head_short_sha }} + git_base_sha: ${{ steps.get_commit_sha.outputs.git_base_sha }} steps: - name: Checkout repository uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 @@ -86,14 +89,33 @@ jobs: fetch-depth: 0 ref: ${{ env.GIT_HEAD_REF }} - - name: Get commit SHA + - name: Get SHA id: get_commit_sha run: | + # Resolve HEAD SHA git_head_sha=$(git rev-parse HEAD) git_head_short_sha=$(git rev-parse --short HEAD) echo "git_head_sha=$git_head_sha" >> $GITHUB_OUTPUT echo "git_head_short_sha=$git_head_short_sha" >> $GITHUB_OUTPUT + # Print HEAD SHAs to the console + echo "HEAD SHA: $git_head_sha" + echo "HEAD Short SHA: $git_head_short_sha" + + # Conditionally resolve BASE SHA + if [ -n "${{ env.GIT_BASE_REF }}" ]; then + git fetch origin ${{ env.GIT_BASE_REF }} --quiet + + git_base_sha=$(git rev-parse origin/${{ env.GIT_BASE_REF }}) + echo "git_base_sha=$git_base_sha" >> $GITHUB_OUTPUT + + # Print BASE SHA to the console + echo "BASE SHA: $git_base_sha" + else + echo "BASE SHA not provided." + echo "git_base_sha=" >> $GITHUB_OUTPUT + fi + - name: Set up Go 1.21.9 uses: actions/setup-go@v5.0.2 with: @@ -101,7 +123,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@9e40f2765df01f20b3bf53f0fb3ead920e3a1f4a # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@ea4ffd8c51ce02efebf5ea6bca503fe10b6cee92 # flakguard@0.1.0 - name: Find new or updated test packages if: ${{ inputs.runAllTests == false }} @@ -114,7 +136,7 @@ jobs: PATH=$PATH:$(go env GOPATH)/bin export PATH - PACKAGES=$(flakeguard find --find-by-test-files-diff=${{ inputs.findByTestFilesDiff }} --find-by-affected-packages=${{ inputs.findByAffectedPackages }} --base-ref=origin/${{ inputs.baseRef }} --project-path=${{ inputs.projectPath }}) + PACKAGES=$(flakeguard find --find-by-test-files-diff=${{ inputs.findByTestFilesDiff }} --find-by-affected-packages=${{ inputs.findByAffectedPackages }} --base-ref=origin/${{ env.GIT_BASE_REF }} --project-path=${{ inputs.projectPath }}) echo $PACKAGES echo "packages=$PACKAGES" >> $GITHUB_OUTPUT @@ -129,7 +151,7 @@ jobs: PATH=$PATH:$(go env GOPATH)/bin export PATH - TEST_FILES=$(flakeguard find --only-show-changed-test-files=true --base-ref=origin/${{ inputs.baseRef }} --project-path=${{ inputs.projectPath }}) + TEST_FILES=$(flakeguard find --only-show-changed-test-files=true --base-ref=origin/${{ env.GIT_BASE_REF }} --project-path=${{ inputs.projectPath }}) echo $TEST_FILES echo "test_files=$TEST_FILES" >> $GITHUB_OUTPUT @@ -196,11 +218,11 @@ jobs: needs: get-tests runs-on: ${{ matrix.runs_on }} if: ${{ needs.get-tests.outputs.matrix != '' && needs.get-tests.outputs.matrix != '[]' }} - timeout-minutes: 90 + timeout-minutes: 180 strategy: fail-fast: false matrix: - include: ${{ fromJson(needs.get-tests.outputs.matrix) }} + include: ${{ fromJSON(needs.get-tests.outputs.matrix) }} env: DB_URL: postgresql://postgres:postgres@localhost:5432/chainlink_test?sslmode=disable steps: @@ -260,11 +282,11 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@9e40f2765df01f20b3bf53f0fb3ead920e3a1f4a # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@ea4ffd8c51ce02efebf5ea6bca503fe10b6cee92 # flakguard@0.1.0 - name: Run tests with flakeguard shell: bash - run: flakeguard run --project-path=${{ inputs.projectPath }} --test-packages=${{ matrix.testPackages }} --run-count=${{ env.TEST_REPEAT_COUNT }} --max-pass-ratio=${{ inputs.maxPassRatio }} --race=${{ env.RUN_WITH_RACE }} --shuffle=${{ env.RUN_WITH_SHUFFLE }} --shuffle-seed=${{ env.SHUFFLE_SEED }} --skip-tests=${{ env.SKIPPED_TESTS }} --print-failed-tests=${{ env.PRINT_FAILED_TESTS }} --output-json=test-result.json + run: flakeguard run --project-path=${{ inputs.projectPath }} --test-packages=${{ matrix.testPackages }} --run-count=${{ env.TEST_REPEAT_COUNT }} --max-pass-ratio=${{ inputs.maxPassRatio }} --race=${{ env.RUN_WITH_RACE }} --shuffle=${{ env.RUN_WITH_SHUFFLE }} --shuffle-seed=${{ env.SHUFFLE_SEED }} --skip-tests=${{ env.SKIPPED_TESTS }} --output-json=test-result.json --omit-test-outputs-on-success=${{ env.OMIT_TEST_OUTPUTS_ON_SUCCESS }} env: CL_DATABASE_URL: ${{ env.DB_URL }} @@ -282,7 +304,7 @@ jobs: name: Report runs-on: ubuntu-latest outputs: - test_results: ${{ steps.set_test_results.outputs.results }} + test_results: ${{ steps.results.outputs.results }} steps: - name: Checkout repository uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 @@ -307,136 +329,131 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@9e40f2765df01f20b3bf53f0fb3ead920e3a1f4a # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@ea4ffd8c51ce02efebf5ea6bca503fe10b6cee92 # flakguard@0.1.0 - - name: Set combined test results - id: set_test_results + - name: Aggregate Flakeguard Results + id: results shell: bash run: | set -e # Exit immediately if a command exits with a non-zero status. - - if [ -d "ci_test_results" ]; then - cd ci_test_results - ls -R . - - # Fix flakeguard binary path - PATH=$PATH:$(go env GOPATH)/bin - export PATH - - # Use flakeguard to aggregate all test results - flakeguard aggregate-results --results-path . --output-results ../all_tests.json --project-path=${{ github.workspace }}/${{ inputs.projectPath }} --codeowners-path=${{ github.workspace }}/.github/CODEOWNERS - - # Count all tests - ALL_TESTS_COUNT=$(jq '.Results | length' ../all_tests.json) - echo "All tests count: $ALL_TESTS_COUNT" - echo "all_tests_count=$ALL_TESTS_COUNT" >> "$GITHUB_OUTPUT" - - # Use flakeguard to filter and output failed tests based on MaxPassRatio - flakeguard aggregate-results --filter-failed=true --max-pass-ratio=${{ inputs.maxPassRatio }} --results-path . --output-results ../failed_tests.json --output-logs ../failed_test_logs.json --project-path=${{ github.workspace }}/${{ inputs.projectPath }} --codeowners-path=${{ github.workspace }}/.github/CODEOWNERS - - # Count failed tests - if [ -f "../failed_tests.json" ]; then - FAILED_TESTS_COUNT=$(jq '.Results | length' ../failed_tests.json) - else - FAILED_TESTS_COUNT=0 - fi - echo "Failed tests count: $FAILED_TESTS_COUNT" - echo "failed_tests_count=$FAILED_TESTS_COUNT" >> "$GITHUB_OUTPUT" - - # Calculate failed ratio (failed / non-failed tests ratio in %) - if [ "$ALL_TESTS_COUNT" -gt 0 ]; then - NON_FAILED_COUNT=$((ALL_TESTS_COUNT - FAILED_TESTS_COUNT)) - - if [ "$NON_FAILED_COUNT" -gt 0 ]; then - FAILED_RATIO=$(awk "BEGIN {printf \"%.2f\", ($FAILED_TESTS_COUNT / $NON_FAILED_COUNT) * 100}") - else - FAILED_RATIO=0 - fi - else - NON_FAILED_COUNT=0 - FAILED_RATIO=0 - fi - echo "Failed tests ratio: $FAILED_RATIO%" - echo "failed_ratio=$FAILED_RATIO" >> "$GITHUB_OUTPUT" - else - echo "No test results directory found." - echo "all_tests_count=0" >> "$GITHUB_OUTPUT" - echo "failed_tests_count=0" >> "$GITHUB_OUTPUT" - echo "failed_ratio=0" >> "$GITHUB_OUTPUT" - fi - - - name: Tests Summary - if: ${{ fromJson(steps.set_test_results.outputs.all_tests_count) > 0 }} - run: | - FILE_SIZE=$(wc -c < all_tests.md) - echo "File size: $FILE_SIZE bytes" - SIZE_LIMIT=$((1024 * 1024)) - - if [ "$FILE_SIZE" -le "$SIZE_LIMIT" ]; then - cat all_tests.md >> $GITHUB_STEP_SUMMARY - else - echo "**We found flaky tests, so many flaky tests that the summary is too large for github actions step summaries!**" >> $GITHUB_STEP_SUMMARY - echo "**Please see logs, or the attached `all-summary.md` artifact**" >> $GITHUB_STEP_SUMMARY - cat all_tests.md - fi - - - name: Upload All Tests Summary as Artifact - if: ${{ fromJson(steps.set_test_results.outputs.all_tests_count) > 0 }} - uses: actions/upload-artifact@v4.4.3 - with: - path: all_tests.md - name: all-summary.md - retention-days: 90 + + # Create test results folder if it doesn't exist + mkdir -p ci_test_results + + # Fix flakeguard binary path + PATH=$PATH:$(go env GOPATH)/bin + export PATH + + # Aggregate Flakeguard test results + flakeguard aggregate-results \ + --results-path ./ci_test_results \ + --output-path ./flakeguard-report \ + --repo-path "${{ github.workspace }}" \ + --codeowners-path "${{ github.workspace }}/.github/CODEOWNERS" \ + --max-pass-ratio "${{ inputs.maxPassRatio }}" \ + --repo-url "${{ inputs.repoUrl }}" \ + --base-sha "${{ needs.get-tests.outputs.git_base_sha }}" \ + --head-sha "${{ needs.get-tests.outputs.git_head_sha }}" \ + --github-workflow-name "${{ github.workflow }}" + + # Print out the summary file + echo -e "\nFlakeguard Summary:" + jq . ./flakeguard-report/all-test-summary.json + + # Read the summary from the generated report + summary=$(jq -c '.' ./flakeguard-report/all-test-summary.json) + echo "summary=$summary" >> $GITHUB_OUTPUT - name: Upload All Test Results as Artifact - if: ${{ fromJson(steps.set_test_results.outputs.all_tests_count) > 0 }} + if: ${{ fromJSON(steps.results.outputs.summary).total_tests > 0 }} uses: actions/upload-artifact@v4.4.3 with: - path: all_tests.json + path: ./flakeguard-report/all-test-results.json name: all-test-results.json retention-days: 90 - - name: Upload Failed Tests Summary as Artifact - if: ${{ fromJson(steps.set_test_results.outputs.all_tests_count) > 0 }} - uses: actions/upload-artifact@v4.4.3 - with: - path: failed_tests.md - name: failed-summary.md - retention-days: 90 - - name: Upload Failed Test Results as Artifact - if: ${{ fromJson(steps.set_test_results.outputs.failed_tests_count) > 0 }} + if: ${{ fromJSON(steps.results.outputs.summary).failed_runs > 0 }} uses: actions/upload-artifact@v4.4.3 with: - path: failed_tests.json + path: ./flakeguard-report/failed-test-results.json name: failed-test-results.json - retention-days: 90 - - - name: Upload Failed Test Logs as Artifact - if: ${{ fromJson(steps.set_test_results.outputs.failed_tests_count) > 0 }} - uses: actions/upload-artifact@v4.4.3 - with: - path: failed_test_logs.json - name: failed-test-logs.json - retention-days: 90 - - - name: Upload All Test Results as Artifact - if: ${{ fromJson(steps.set_test_results.outputs.all_tests_count) > 0 && env.UPLOAD_ALL_TEST_RESULTS == 'true' }} + retention-days: 90 + + - name: Upload Failed Test Results With Logs as Artifact + if: ${{ fromJSON(steps.results.outputs.summary).failed_runs > 0 }} uses: actions/upload-artifact@v4.4.3 with: - path: all_tests.json - name: all-test-results.json + path: ./flakeguard-report/failed-test-results-with-logs.json + name: failed-test-results-with-logs.json retention-days: 90 + - name: Generate Flakeguard Reports + shell: bash + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + run: | + set -e # Exit immediately if a command exits with a non-zero status. + + # Fix flakeguard binary path + PATH=$PATH:$(go env GOPATH)/bin + export PATH + + # Check if the event is a pull request + if [ "${{ github.event_name }}" = "pull_request" ]; then + flakeguard generate-report \ + --aggregated-results-path ./flakeguard-report/all-test-results.json \ + --summary-path ./flakeguard-report/all-test-summary.json \ + --output-path ./flakeguard-report \ + --github-repository "${{ github.repository }}" \ + --github-run-id "${{ github.run_id }}" \ + --failed-tests-artifact-name "failed-test-results-with-logs.json" \ + --generate-pr-comment \ + --base-branch "${{ github.event.pull_request.base.ref }}" \ + --current-branch "${{ github.head_ref }}" \ + --current-commit-sha "${{ github.event.pull_request.head.sha }}" \ + --repo-url "https://github.com/${{ github.repository }}" \ + --action-run-id "${{ github.run_id }}" \ + --max-pass-ratio "${{ inputs.maxPassRatio }}" + else + flakeguard generate-report \ + --aggregated-results-path ./flakeguard-report/all-test-results.json \ + --summary-path ./flakeguard-report/all-test-summary.json \ + --output-path ./flakeguard-report \ + --github-repository "${{ github.repository }}" \ + --github-run-id "${{ github.run_id }}" \ + --failed-tests-artifact-name "failed-test-results-with-logs.json" \ + --base-branch "${{ github.event.pull_request.base.ref }}" \ + --current-branch "${{ github.head_ref }}" \ + --current-commit-sha "${{ github.event.pull_request.head.sha }}" \ + --repo-url "https://github.com/${{ github.repository }}" \ + --action-run-id "${{ github.run_id }}" \ + --max-pass-ratio "${{ inputs.maxPassRatio }}" + fi + + - name: Add Github Summary + run: | + FILE_SIZE=$(wc -c < ./flakeguard-report/all-test-summary.md) + echo "File size: $FILE_SIZE bytes" + SIZE_LIMIT=$((1024 * 1024)) + + if [ "$FILE_SIZE" -le "$SIZE_LIMIT" ]; then + cat ./flakeguard-report/all-test-summary.md >> $GITHUB_STEP_SUMMARY + else + echo "**We found flaky tests, so many flaky tests that the summary is too large for github actions step summaries!**" >> $GITHUB_STEP_SUMMARY + echo "**Please see logs, or the attached `all-test-summary.md` artifact**" >> $GITHUB_STEP_SUMMARY + cat ./flakeguard-report/all-test-summary.md + fi + - name: Post comment on PR if flaky tests found - if: ${{ fromJson(steps.set_test_results.outputs.failed_tests_count) > 0 && github.event_name == 'pull_request' }} + if: ${{ fromJSON(steps.results.outputs.summary).flaky_tests > 0 && github.event_name == 'pull_request' }} uses: actions/github-script@v7 continue-on-error: true with: script: | const fs = require('fs'); const prNumber = context.payload.pull_request.number; - const commentBody = fs.readFileSync('all_tests.md', 'utf8'); + const commentBody = fs.readFileSync('./flakeguard-report/all-test-pr-comment.md', 'utf8'); await github.rest.issues.createComment({ owner: context.repo.owner, @@ -446,7 +463,7 @@ jobs: }); - name: Send Slack message for failed tests - if: ${{ inputs.slackNotificationAfterTestsChannelId != '' && fromJson(steps.set_test_results.outputs.failed_tests_count) > 0 }} + if: ${{ inputs.slackNotificationAfterTestsChannelId != '' && fromJSON(steps.results.outputs.summary).flaky_tests > 0 }} uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0 env: SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} @@ -469,7 +486,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "${{ inputs.runAllTests == true && format('Ran all tests for `{0}` branch.', inputs.headRef) || format('Ran changed tests between `{0}` and `{1}` (`{2}`).', inputs.baseRef, needs.get-tests.outputs.git_head_short_sha, env.GIT_HEAD_REF) }}" + "text": "${{ inputs.runAllTests == true && format('Ran all tests for `{0}` branch.', env.GIT_HEAD_REF) || format('Ran changed tests between `{0}` and `{1}` (`{2}`).', env.GIT_BASE_REF, needs.get-tests.outputs.git_head_short_sha, env.GIT_HEAD_REF) }}" } }, { @@ -477,11 +494,11 @@ jobs: "fields": [ { "type": "mrkdwn", - "text": "Total Failed Tests: ${{ steps.set_test_results.outputs.failed_tests_count }}" + "text": "Total Flaky Tests: ${{ fromJSON(steps.results.outputs.summary).flaky_tests }}" }, { "type": "mrkdwn", - "text": "Failed to Non-Failed Ratio: ${{ steps.set_test_results.outputs.failed_ratio }}%" + "text": "Flaky Tests Ratio: ${{ fromJSON(steps.results.outputs.summary).flaky_test_ratio }}" } ] }, @@ -489,7 +506,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "${{ format('<{0}/{1}/actions/runs/{2}|View Flaky Detector Details> | <{3}/compare/{4}...{5}#files_bucket|Compare Changes>{6}', github.server_url, github.repository, github.run_id, inputs.repoUrl, inputs.baseRef, needs.get-tests.outputs.git_head_sha, github.event_name == 'pull_request' && format(' | <{0}|View PR>', github.event.pull_request.html_url) || '') }}" + "text": "${{ format('<{0}/{1}/actions/runs/{2}|View Flaky Detector Details> | <{3}/compare/{4}...{5}#files_bucket|Compare Changes>{6}', github.server_url, github.repository, github.run_id, inputs.repoUrl, env.GIT_BASE_REF, needs.get-tests.outputs.git_head_sha, github.event_name == 'pull_request' && format(' | <{0}|View PR>', github.event.pull_request.html_url) || '') }}" } } ] @@ -499,7 +516,7 @@ jobs: - name: Send general Slack message uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0 - if: ${{ inputs.slackNotificationAfterTestsChannelId != '' && fromJson(steps.set_test_results.outputs.failed_tests_count) == 0 && fromJson(steps.set_test_results.outputs.all_tests_count) > 0 }} + if: ${{ inputs.slackNotificationAfterTestsChannelId != '' && fromJSON(steps.results.outputs.summary).flaky_tests == 0 && fromJSON(steps.results.outputs.summary).total_tests > 0 }} id: slack env: SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} @@ -522,7 +539,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "${{ inputs.runAllTests == true && format('Ran all tests for `{0}` branch.', env.GIT_HEAD_REF) || format('Ran changed tests between `{0}` and `{1}` (`{2}`).', inputs.baseRef, needs.get-tests.outputs.git_head_short_sha, env.GIT_HEAD_REF) }}" + "text": "${{ inputs.runAllTests == true && format('Ran all tests for `{0}` branch.', env.GIT_HEAD_REF) || format('Ran changed tests between `{0}` and `{1}` (`{2}`).', env.GIT_BASE_REF, needs.get-tests.outputs.git_head_short_sha, env.GIT_HEAD_REF) }}" } }, { diff --git a/.github/workflows/integration-chaos-tests.yml b/.github/workflows/integration-chaos-tests.yml index 314e54a1ab8..c9f7f2661ec 100644 --- a/.github/workflows/integration-chaos-tests.yml +++ b/.github/workflows/integration-chaos-tests.yml @@ -6,11 +6,49 @@ on: tags: - "*" workflow_dispatch: + inputs: + team: + description: Team to run the tests for (e.g. BIX, CCIP) + required: true + type: string jobs: + run-e2e-tests-workflow-dispatch: + name: Run E2E Tests (Workflow Dispatch) + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@0d4a2b2b009c87b5c366d0b97f7a8d7de2f60760 + if: github.event_name == 'workflow_dispatch' + with: + test_path: .github/e2e-tests.yml + chainlink_version: ${{ github.sha }} + require_chainlink_image_versions_in_qa_ecr: ${{ github.sha }} + test_trigger: E2E Chaos Tests + test_log_level: debug + team: ${{ inputs.team }} + secrets: + QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} + QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} + QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} + PROD_AWS_ACCOUNT_NUMBER: ${{ secrets.AWS_ACCOUNT_ID_PROD }} + QA_PYROSCOPE_INSTANCE: ${{ secrets.QA_PYROSCOPE_INSTANCE }} + QA_PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }} + QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} + GRAFANA_INTERNAL_TENANT_ID: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + GRAFANA_INTERNAL_BASIC_AUTH: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} + GRAFANA_INTERNAL_HOST: ${{ secrets.GRAFANA_INTERNAL_HOST }} + GRAFANA_INTERNAL_URL_SHORTENER_TOKEN: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} + LOKI_TENANT_ID: ${{ secrets.LOKI_TENANT_ID }} + LOKI_URL: ${{ secrets.LOKI_URL }} + LOKI_BASIC_AUTH: ${{ secrets.LOKI_BASIC_AUTH }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + AWS_REGION: ${{ secrets.QA_AWS_REGION }} + AWS_OIDC_IAM_ROLE_VALIDATION_PROD_ARN: ${{ secrets.AWS_OIDC_IAM_ROLE_VALIDATION_PROD_ARN }} + AWS_API_GW_HOST_GRAFANA: ${{ secrets.AWS_API_GW_HOST_GRAFANA }} + SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} + run-e2e-tests-workflow: - name: Run E2E Tests - uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@5412507526722a7b1c5d719fa686eed5a1bc4035 # ctf-run-tests@0.2.0 + name: Run E2E Tests (Push and Sechedule) + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@0d4a2b2b009c87b5c366d0b97f7a8d7de2f60760 + if: github.event_name != 'workflow_dispatch' with: test_path: .github/e2e-tests.yml chainlink_version: ${{ github.sha }} @@ -32,8 +70,9 @@ jobs: LOKI_TENANT_ID: ${{ secrets.LOKI_TENANT_ID }} LOKI_URL: ${{ secrets.LOKI_URL }} LOKI_BASIC_AUTH: ${{ secrets.LOKI_BASIC_AUTH }} - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} AWS_REGION: ${{ secrets.QA_AWS_REGION }} AWS_OIDC_IAM_ROLE_VALIDATION_PROD_ARN: ${{ secrets.AWS_OIDC_IAM_ROLE_VALIDATION_PROD_ARN }} - AWS_API_GW_HOST_GRAFANA: ${{ secrets.AWS_API_GW_HOST_GRAFANA }} + AWS_API_GW_HOST_GRAFANA: ${{ secrets.AWS_API_GW_HOST_GRAFANA }} SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} + diff --git a/.github/workflows/integration-in-memory-tests.yml b/.github/workflows/integration-in-memory-tests.yml index 8d777b41ea1..341d66f641e 100644 --- a/.github/workflows/integration-in-memory-tests.yml +++ b/.github/workflows/integration-in-memory-tests.yml @@ -73,7 +73,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@57112554b9e5cfae79e795a8b1c36acf7e9dead7 + uses: smartcontractkit/.github/.github/workflows/run-integration-tests.yml@0632b5652dd5eb03bfa87e23a2b3e2911484fe59 with: workflow_name: Run CCIP Integration Tests For PR test_path: .github/integration-in-memory-tests.yml @@ -95,7 +95,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@57112554b9e5cfae79e795a8b1c36acf7e9dead7 + uses: smartcontractkit/.github/.github/workflows/run-integration-tests.yml@0632b5652dd5eb03bfa87e23a2b3e2911484fe59 with: workflow_name: Run CCIP Integration Tests For Merge Queue test_path: .github/integration-in-memory-tests.yml diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index bac453eb044..27bdfa52243 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -210,7 +210,7 @@ jobs: contents: read needs: [build-chainlink, changes] if: github.event_name == 'pull_request' && ( needs.changes.outputs.core_changes == 'true' || needs.changes.outputs.github_ci_changes == 'true') - uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@27467f0073162e0ca77d33ce26f649b3d0f4c188 #ctf-run-tests@0.2.0 + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@0632b5652dd5eb03bfa87e23a2b3e2911484fe59 with: workflow_name: Run Core E2E Tests For PR chainlink_version: ${{ inputs.evm-ref || github.sha }} @@ -251,7 +251,7 @@ jobs: contents: read needs: [build-chainlink, changes] if: github.event_name == 'merge_group' && ( needs.changes.outputs.core_changes == 'true' || needs.changes.outputs.github_ci_changes == 'true') - uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@27467f0073162e0ca77d33ce26f649b3d0f4c188 #ctf-run-tests@1.0.0 + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@0632b5652dd5eb03bfa87e23a2b3e2911484fe59 with: workflow_name: Run Core E2E Tests For Merge Queue chainlink_version: ${{ inputs.evm-ref || github.sha }} @@ -296,7 +296,7 @@ jobs: contents: read needs: [build-chainlink, changes] if: github.event_name == 'pull_request' && (needs.changes.outputs.ccip_changes == 'true' || needs.changes.outputs.github_ci_changes == 'true') - uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@0d4a2b2b009c87b5c366d0b97f7a8d7de2f60760 + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@0632b5652dd5eb03bfa87e23a2b3e2911484fe59 with: workflow_name: Run CCIP E2E Tests For PR chainlink_version: ${{ inputs.evm-ref || github.sha }} @@ -338,7 +338,7 @@ jobs: contents: read needs: [build-chainlink, changes] if: github.event_name == 'merge_group' && (needs.changes.outputs.ccip_changes == 'true' || needs.changes.outputs.github_ci_changes == 'true') - uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@0d4a2b2b009c87b5c366d0b97f7a8d7de2f60760 + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@0632b5652dd5eb03bfa87e23a2b3e2911484fe59 with: workflow_name: Run CCIP E2E Tests For Merge Queue chainlink_version: ${{ inputs.evm-ref || github.sha }} @@ -382,7 +382,7 @@ jobs: results='${{ needs.run-core-e2e-tests-for-pr.outputs.test_results }}' echo "Core test results:" echo "$results" | jq . - + node_migration_tests_failed=$(echo $results | jq '[.[] | select(.id == "integration-tests/migration/upgrade_version_test.go:*" ) | select(.result != "success")] | length > 0') echo "node_migration_tests_failed=$node_migration_tests_failed" >> $GITHUB_OUTPUT @@ -730,6 +730,7 @@ jobs: env: E2E_TEST_CHAINLINK_IMAGE: ${{ env.CHAINLINK_IMAGE }} E2E_TEST_SOLANA_SECRET: thisisatestingonlysecret + CHAINLINK_USER_TEAM: "BIX" - name: Upload Coverage Data uses: actions/upload-artifact@v4.4.3 diff --git a/.github/workflows/on-demand-vrfv2-performance-test.yml b/.github/workflows/on-demand-vrfv2-performance-test.yml index aadef377718..f9aeaa0fa1f 100644 --- a/.github/workflows/on-demand-vrfv2-performance-test.yml +++ b/.github/workflows/on-demand-vrfv2-performance-test.yml @@ -67,7 +67,7 @@ jobs: run-e2e-tests-workflow: name: Run E2E Tests needs: set-tests-to-run - uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@5412507526722a7b1c5d719fa686eed5a1bc4035 # ctf-run-tests@0.2.0 + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@0632b5652dd5eb03bfa87e23a2b3e2911484fe59 with: custom_test_list_json: ${{ needs.set-tests-to-run.outputs.test_list }} chainlink_version: ${{ inputs.chainlink_version }} diff --git a/.github/workflows/on-demand-vrfv2-smoke-tests.yml b/.github/workflows/on-demand-vrfv2-smoke-tests.yml index 4ebc38a8081..ad616dea744 100644 --- a/.github/workflows/on-demand-vrfv2-smoke-tests.yml +++ b/.github/workflows/on-demand-vrfv2-smoke-tests.yml @@ -70,7 +70,7 @@ jobs: run-e2e-tests-workflow: name: Run E2E Tests needs: set-tests-to-run - uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@5412507526722a7b1c5d719fa686eed5a1bc4035 # ctf-run-tests@0.2.0 + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@0632b5652dd5eb03bfa87e23a2b3e2911484fe59 with: custom_test_list_json: ${{ needs.set-tests-to-run.outputs.test_list }} chainlink_version: ${{ inputs.chainlink_version }} diff --git a/.github/workflows/on-demand-vrfv2plus-performance-test.yml b/.github/workflows/on-demand-vrfv2plus-performance-test.yml index f6d120ac178..b3a820e25a0 100644 --- a/.github/workflows/on-demand-vrfv2plus-performance-test.yml +++ b/.github/workflows/on-demand-vrfv2plus-performance-test.yml @@ -67,7 +67,7 @@ jobs: run-e2e-tests-workflow: name: Run E2E Tests needs: set-tests-to-run - uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@5412507526722a7b1c5d719fa686eed5a1bc4035 # ctf-run-tests@0.2.0 + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@0632b5652dd5eb03bfa87e23a2b3e2911484fe59 with: custom_test_list_json: ${{ needs.set-tests-to-run.outputs.test_list }} chainlink_version: ${{ inputs.chainlink_version }} diff --git a/.github/workflows/on-demand-vrfv2plus-smoke-tests.yml b/.github/workflows/on-demand-vrfv2plus-smoke-tests.yml index af26c527988..8561034b103 100644 --- a/.github/workflows/on-demand-vrfv2plus-smoke-tests.yml +++ b/.github/workflows/on-demand-vrfv2plus-smoke-tests.yml @@ -70,7 +70,7 @@ jobs: run-e2e-tests-workflow: name: Run E2E Tests needs: set-tests-to-run - uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@5412507526722a7b1c5d719fa686eed5a1bc4035 # ctf-run-tests@0.2.0 + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@0632b5652dd5eb03bfa87e23a2b3e2911484fe59 with: custom_test_list_json: ${{ needs.set-tests-to-run.outputs.test_list }} chainlink_version: ${{ inputs.chainlink_version }} diff --git a/.github/workflows/run-nightly-e2e-tests.yml b/.github/workflows/run-nightly-e2e-tests.yml index eba1108f89f..712fb088181 100644 --- a/.github/workflows/run-nightly-e2e-tests.yml +++ b/.github/workflows/run-nightly-e2e-tests.yml @@ -20,7 +20,7 @@ on: jobs: call-run-e2e-tests-workflow: name: Run E2E Tests - uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@5412507526722a7b1c5d719fa686eed5a1bc4035 # ctf-run-tests@0.2.0 + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@0632b5652dd5eb03bfa87e23a2b3e2911484fe59 with: chainlink_version: ${{ inputs.chainlink_version || 'develop' }} test_path: .github/e2e-tests.yml diff --git a/.github/workflows/run-selected-e2e-tests.yml b/.github/workflows/run-selected-e2e-tests.yml index 0e7c97c67fc..e95ce1cef19 100644 --- a/.github/workflows/run-selected-e2e-tests.yml +++ b/.github/workflows/run-selected-e2e-tests.yml @@ -35,7 +35,7 @@ run-name: ${{ inputs.workflow_run_name }} jobs: call-run-e2e-tests-workflow: name: Run E2E Tests - uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@5412507526722a7b1c5d719fa686eed5a1bc4035 # ctf-run-tests@0.2.0 + uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@0632b5652dd5eb03bfa87e23a2b3e2911484fe59 with: chainlink_version: ${{ github.event.inputs.chainlink_version }} test_path: .github/e2e-tests.yml diff --git a/.github/workflows/solidity-foundry.yml b/.github/workflows/solidity-foundry.yml index 850374b0cd3..f94ef29a3b8 100644 --- a/.github/workflows/solidity-foundry.yml +++ b/.github/workflows/solidity-foundry.yml @@ -34,7 +34,7 @@ jobs: { "name": "functions", "setup": { "run-coverage": false, "min-coverage": 98.5, "run-gas-snapshot": true, "run-forge-fmt": false }}, { "name": "keystone", "setup": { "run-coverage": true, "min-coverage": 72.8, "run-gas-snapshot": false, "run-forge-fmt": false }}, { "name": "l2ep", "setup": { "run-coverage": true, "min-coverage": 65.0, "run-gas-snapshot": true, "run-forge-fmt": false }}, - { "name": "liquiditymanager", "setup": { "run-coverage": true, "min-coverage": 44, "run-gas-snapshot": true, "run-forge-fmt": false }}, + { "name": "liquiditymanager", "setup": { "run-coverage": true, "min-coverage": 40, "run-gas-snapshot": true, "run-forge-fmt": false }}, { "name": "llo-feeds", "setup": { "run-coverage": true, "min-coverage": 49.3, "run-gas-snapshot": true, "run-forge-fmt": false }}, { "name": "operatorforwarder", "setup": { "run-coverage": true, "min-coverage": 55.7, "run-gas-snapshot": true, "run-forge-fmt": false }}, { "name": "shared", "setup": { "run-coverage": true, "extra-coverage-params": "--no-match-path='*CallWithExactGas*' --ir-minimum", "min-coverage": 32.6, "run-gas-snapshot": true, "run-forge-fmt": false }}, diff --git a/.mockery.yaml b/.mockery.yaml index dd9024cc066..5777ca1da92 100644 --- a/.mockery.yaml +++ b/.mockery.yaml @@ -583,12 +583,6 @@ packages: github.com/smartcontractkit/chainlink/v2/core/services/workflows/syncer: interfaces: ORM: - ContractReader: - config: - mockname: "Mock{{ .InterfaceName }}" - filename: contract_reader_mock.go - inpackage: true - dir: "{{ .InterfaceDir }}" Handler: config: mockname: "Mock{{ .InterfaceName }}" diff --git a/GNUmakefile b/GNUmakefile index 592183923e2..b765c63a3f4 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -133,17 +133,16 @@ testdb-force: ## Prepares the test database, drops any pesky user connections th testdb-user-only: ## Prepares the test database with user only. go run . local db preparetest --user-only -# Format for CI -.PHONY: presubmit -presubmit: ## Format go files and imports. - goimports -w . - gofmt -w . - go mod tidy - .PHONY: gomods gomods: ## Install gomods go install github.com/jmank88/gomods@v0.1.4 +.PHONY: gomodslocalupdate +gomodslocalupdate: gomods ## Run gomod-local-update + go install ./tools/gomod-local-update/cmd/gomod-local-update + gomods -w gomod-local-update + gomods tidy + .PHONY: mockery mockery: $(mockery) ## Install mockery. go install github.com/vektra/mockery/v2@v2.46.3 diff --git a/ccip/config/evm/Lens_Sepolia.toml b/ccip/config/evm/Lens_Sepolia.toml new file mode 100644 index 00000000000..3f41f2eeeae --- /dev/null +++ b/ccip/config/evm/Lens_Sepolia.toml @@ -0,0 +1,34 @@ +ChainID = "37111" +ChainType = "zksync" +# finality depth for this chain is very inconsistent due to low network traffic. in testing blocks every ~1-2minutes were seen +# confirmed this value with product +FinalityDepth = 40 +FinalityTagEnabled = false +# block rate is dynamic, have seen block times as low as 1s +LogPollInterval = "5s" +# sufficient time for RPC to be labelled out of sync +NoNewHeadsThreshold = "10m" + +[GasEstimator] +EIP1559DynamicFees = false +# limit default set for zk based chains +LimitDefault = 2_500_000_000 +# value given by ds&a +FeeCapDefault = "2000 gwei" +# estimators typically estimated with min of 75 with median of 86 +PriceDefault = "70 gwei" +PriceMax = "2000 gwei" +PriceMin = "70 gwei" +# bump gas aggressively to avoid high amounts of transmit errors +BumpThreshold = 1 +BumpPercent = 40 + +[GasEstimator.DAOracle] +OracleType = 'zksync' + +[Transactions] +ResendAfterThreshold = '7m0s' + +[HeadTracker] +# l1 batching is done every 8hrs with low network activity setting this value to a rough calculation of ~1tx / 2min * 8hrs +HistoryDepth = 250 \ No newline at end of file diff --git a/contracts/.changeset/yellow-mugs-explode.md b/contracts/.changeset/yellow-mugs-explode.md new file mode 100644 index 00000000000..bd488e559ef --- /dev/null +++ b/contracts/.changeset/yellow-mugs-explode.md @@ -0,0 +1,9 @@ +--- +'@chainlink/contracts': minor +--- + +#internal make gas for call exact check immutable + +PR issue: CCIP-4477 + +Solidity Review issue: CCIP-3966 \ No newline at end of file diff --git a/contracts/.changeset/young-bats-rhyme.md b/contracts/.changeset/young-bats-rhyme.md new file mode 100644 index 00000000000..e68a646b78e --- /dev/null +++ b/contracts/.changeset/young-bats-rhyme.md @@ -0,0 +1,10 @@ +--- +'@chainlink/contracts': patch +--- + +add getChainConfig to ccipHome + + +PR issue: CCIP-4517 + +Solidity Review issue: CCIP-3966 \ No newline at end of file diff --git a/contracts/GNUmakefile b/contracts/GNUmakefile index 4066c76037e..673198bb1e2 100644 --- a/contracts/GNUmakefile +++ b/contracts/GNUmakefile @@ -43,7 +43,7 @@ mockery: $(mockery) ## Install mockery. .PHONY: foundry foundry: ## Install foundry. - foundryup --version nightly-fb5f0e1c4d9b9b0861be3e3bd07963524c5ac08e + foundryup --version nightly-aa69ed1e46dd61fbf9d73399396a4db4dd527431 .PHONY: foundry-refresh foundry-refresh: foundry diff --git a/contracts/README.md b/contracts/README.md index 182891ceef7..f87f196e5dc 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -24,7 +24,7 @@ $ npm install @chainlink/contracts --save The solidity smart contracts themselves can be imported via the `src` directory of `@chainlink/contracts`: ```solidity -import '@chainlink/contracts/src/v0.8/AutomationCompatibleInterface.sol'; +import {AutomationCompatibleInterface} from '@chainlink/contracts/src/v0.8/AutomationCompatibleInterface.sol'; ``` ## Local Development @@ -42,7 +42,7 @@ $ pnpm test ## Contributing -Please try to adhere to [Solidity Style Guide](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/STYLE.md). +Please adhere to the [Solidity Style Guide](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/STYLE.md). Contributions are welcome! Please refer to [Chainlink's contributing guidelines](https://github.com/smartcontractkit/chainlink/blob/develop/docs/CONTRIBUTING.md) for detailed @@ -70,6 +70,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Most of the contracts are licensed under the [MIT](https://choosealicense.com/licenses/mit/) license. An exception to this is the ccip folder, which defaults to be licensed under the [BUSL-1.1](./src/v0.8/ccip/LICENSE.md) license, however, there are a few exceptions -- `src/v0.8/ccip/applications/*` is licensed under the [MIT](./src/v0.8/ccip/LICENSE-MIT.md) license -- `src/v0.8/ccip/interfaces/*` is licensed under the [MIT](./src/v0.8/ccip/LICENSE-MIT.md) license -- `src/v0.8/ccip/libraries/{Client.sol, Internal.sol}` is licensed under the [MIT](./src/v0.8/ccip/LICENSE-MIT.md) license \ No newline at end of file +- `src/v0.8/ccip/applications/*` is licensed under the [MIT](https://choosealicense.com/licenses/mit/) license +- `src/v0.8/ccip/interfaces/*` is licensed under the [MIT](https://choosealicense.com/licenses/mit/) license +- `src/v0.8/ccip/libraries/{Client.sol, Internal.sol}` is licensed under the [MIT](https://choosealicense.com/licenses/mit/) license \ No newline at end of file diff --git a/contracts/gas-snapshots/ccip.gas-snapshot b/contracts/gas-snapshots/ccip.gas-snapshot index 4ed7d38afd6..d655e886262 100644 --- a/contracts/gas-snapshots/ccip.gas-snapshot +++ b/contracts/gas-snapshots/ccip.gas-snapshot @@ -38,30 +38,30 @@ CCIPHome__validateConfig:test__validateConfig_Success() (gas: 299797) CCIPHome__validateConfig:test__validateConfig_TooManySigners_Reverts() (gas: 773105) CCIPHome__validateConfig:test__validateConfig_ZeroP2PId_Reverts() (gas: 293455) CCIPHome__validateConfig:test__validateConfig_ZeroSignerKey_Reverts() (gas: 293503) -CCIPHome_applyChainConfigUpdates:test__applyChainConfigUpdates_FChainNotPositive_Reverts() (gas: 187738) -CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_addChainConfigs_Success() (gas: 349623) -CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_nodeNotInRegistry_Reverts() (gas: 18065) -CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_removeChainConfigs_Success() (gas: 272742) -CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_selectorNotFound_Reverts() (gas: 14952) -CCIPHome_applyChainConfigUpdates:test_getPaginatedCCIPHomes_Success() (gas: 372561) +CCIPHome_applyChainConfigUpdates:test__applyChainConfigUpdates_FChainNotPositive_Reverts() (gas: 187822) +CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_addChainConfigs_Success() (gas: 350051) +CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_nodeNotInRegistry_Reverts() (gas: 18089) +CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_removeChainConfigs_Success() (gas: 282212) +CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_selectorNotFound_Reverts() (gas: 14976) +CCIPHome_applyChainConfigUpdates:test_getPaginatedCCIPHomes_Success() (gas: 373475) CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_DONIdMismatch_reverts() (gas: 38098) -CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_InnerCallReverts_reverts() (gas: 11827) +CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_InnerCallReverts_reverts() (gas: 11783) CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_InvalidSelector_reverts() (gas: 11015) CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_OnlyCapabilitiesRegistryCanCall_reverts() (gas: 37072) -CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_success() (gas: 1455716) -CCIPHome_constructor:test_constructor_CapabilitiesRegistryAddressZero_reverts() (gas: 63767) -CCIPHome_constructor:test_constructor_success() (gas: 3455841) -CCIPHome_getAllConfigs:test_getAllConfigs_success() (gas: 2773000) -CCIPHome_getCapabilityConfiguration:test_getCapabilityConfiguration_success() (gas: 9138) -CCIPHome_getConfigDigests:test_getConfigDigests_success() (gas: 2547397) -CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_CanOnlySelfCall_reverts() (gas: 9087) -CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_ConfigDigestMismatch_reverts() (gas: 23005) -CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_NoOpStateTransitionNotAllowed_reverts() (gas: 8817) -CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_multiplePlugins_success() (gas: 5113570) -CCIPHome_revokeCandidate:test_revokeCandidate_CanOnlySelfCall_reverts() (gas: 9068) -CCIPHome_revokeCandidate:test_revokeCandidate_ConfigDigestMismatch_reverts() (gas: 19105) -CCIPHome_revokeCandidate:test_revokeCandidate_RevokingZeroDigestNotAllowed_reverts() (gas: 8817) -CCIPHome_revokeCandidate:test_revokeCandidate_success() (gas: 30674) +CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_success() (gas: 1455674) +CCIPHome_constructor:test_constructor_CapabilitiesRegistryAddressZero_reverts() (gas: 63865) +CCIPHome_constructor:test_constructor_success() (gas: 3531036) +CCIPHome_getAllConfigs:test_getAllConfigs_success() (gas: 2773023) +CCIPHome_getCapabilityConfiguration:test_getCapabilityConfiguration_success() (gas: 9116) +CCIPHome_getConfigDigests:test_getConfigDigests_success() (gas: 2547513) +CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_CanOnlySelfCall_reverts() (gas: 9110) +CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_ConfigDigestMismatch_reverts() (gas: 23074) +CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_NoOpStateTransitionNotAllowed_reverts() (gas: 8840) +CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_multiplePlugins_success() (gas: 5113754) +CCIPHome_revokeCandidate:test_revokeCandidate_CanOnlySelfCall_reverts() (gas: 9024) +CCIPHome_revokeCandidate:test_revokeCandidate_ConfigDigestMismatch_reverts() (gas: 19084) +CCIPHome_revokeCandidate:test_revokeCandidate_RevokingZeroDigestNotAllowed_reverts() (gas: 8773) +CCIPHome_revokeCandidate:test_revokeCandidate_success() (gas: 30676) CCIPHome_setCandidate:test_setCandidate_CanOnlySelfCall_reverts() (gas: 29383) CCIPHome_setCandidate:test_setCandidate_ConfigDigestMismatch_reverts() (gas: 1395154) CCIPHome_setCandidate:test_setCandidate_success() (gas: 1365439) @@ -347,29 +347,25 @@ MultiOCR3Base_transmit:test_UnAuthorizedTransmitter_Revert() (gas: 24193) MultiOCR3Base_transmit:test_UnauthorizedSigner_Revert() (gas: 60994) MultiOCR3Base_transmit:test_UnconfiguredPlugin_Revert() (gas: 39824) MultiOCR3Base_transmit:test_ZeroSignatures_Revert() (gas: 32920) -NonceManager_NonceIncrementation:test_getIncrementedOutboundNonce_Success() (gas: 37956) -NonceManager_NonceIncrementation:test_incrementInboundNonce_Skip() (gas: 23706) -NonceManager_NonceIncrementation:test_incrementInboundNonce_Success() (gas: 38778) -NonceManager_NonceIncrementation:test_incrementNoncesInboundAndOutbound_Success() (gas: 71901) -NonceManager_OffRampUpgrade:test_NoPrevOffRampForChain_Success() (gas: 185810) -NonceManager_OffRampUpgrade:test_UpgradedNonceNewSenderStartsAtZero_Success() (gas: 189263) -NonceManager_OffRampUpgrade:test_UpgradedNonceStartsAtV1Nonce_Success() (gas: 252318) -NonceManager_OffRampUpgrade:test_UpgradedOffRampNonceSkipsIfMsgInFlight_Success() (gas: 220605) -NonceManager_OffRampUpgrade:test_UpgradedSenderNoncesReadsPreviousRamp_Success() (gas: 60497) -NonceManager_OffRampUpgrade:test_Upgraded_Success() (gas: 152975) -NonceManager_OnRampUpgrade:test_UpgradeNonceNewSenderStartsAtZero_Success() (gas: 166167) -NonceManager_OnRampUpgrade:test_UpgradeNonceStartsAtV1Nonce_Success() (gas: 195938) -NonceManager_OnRampUpgrade:test_UpgradeSenderNoncesReadsPreviousRamp_Success() (gas: 139164) -NonceManager_OnRampUpgrade:test_Upgrade_Success() (gas: 105212) -NonceManager_applyPreviousRampsUpdates:test_MultipleRampsUpdates_success() (gas: 123604) -NonceManager_applyPreviousRampsUpdates:test_PreviousRampAlreadySetOffRamp_Revert() (gas: 43403) -NonceManager_applyPreviousRampsUpdates:test_PreviousRampAlreadySetOnRampAndOffRamp_Revert() (gas: 64752) -NonceManager_applyPreviousRampsUpdates:test_PreviousRampAlreadySetOnRamp_Revert() (gas: 43245) -NonceManager_applyPreviousRampsUpdates:test_PreviousRampAlreadySet_overrideAllowed_success() (gas: 45941) +NonceManager_applyPreviousRampsUpdates:test_MultipleRampsUpdates() (gas: 123604) +NonceManager_applyPreviousRampsUpdates:test_PreviousRampAlreadySet_overrideAllowed() (gas: 45986) NonceManager_applyPreviousRampsUpdates:test_SingleRampUpdate_success() (gas: 66889) -NonceManager_applyPreviousRampsUpdates:test_ZeroInput_success() (gas: 12213) -NonceManager_typeAndVersion:test_typeAndVersion() (gas: 9705) -OffRamp_afterOC3ConfigSet:test_afterOCR3ConfigSet_SignatureVerificationDisabled_Revert() (gas: 5872422) +NonceManager_applyPreviousRampsUpdates:test_ZeroInput() (gas: 12169) +NonceManager_getInboundNonce:test_getInboundNonce_NoPrevOffRampForChain() (gas: 185821) +NonceManager_getInboundNonce:test_getInboundNonce_Upgraded() (gas: 152976) +NonceManager_getInboundNonce:test_getInboundNonce_UpgradedNonceNewSenderStartsAtZero() (gas: 189296) +NonceManager_getInboundNonce:test_getInboundNonce_UpgradedNonceStartsAtV1Nonce() (gas: 252384) +NonceManager_getInboundNonce:test_getInboundNonce_UpgradedOffRampNonceSkipsIfMsgInFlight() (gas: 220672) +NonceManager_getInboundNonce:test_getInboundNonce_UpgradedSenderNoncesReadsPreviousRamp() (gas: 60520) +NonceManager_getIncrementedOutboundNonce:test_getIncrementedOutboundNonce() (gas: 37979) +NonceManager_getIncrementedOutboundNonce:test_incrementInboundNonce() (gas: 38756) +NonceManager_getIncrementedOutboundNonce:test_incrementInboundNonce_SkippedIncorrectNonce() (gas: 23759) +NonceManager_getIncrementedOutboundNonce:test_incrementNoncesInboundAndOutbound() (gas: 71901) +NonceManager_getOutboundNonce:test_getOutboundNonce_Upgrade() (gas: 105300) +NonceManager_getOutboundNonce:test_getOutboundNonce_UpgradeNonceNewSenderStartsAtZero() (gas: 166146) +NonceManager_getOutboundNonce:test_getOutboundNonce_UpgradeNonceStartsAtV1Nonce() (gas: 195937) +NonceManager_getOutboundNonce:test_getOutboundNonce_UpgradeSenderNoncesReadsPreviousRamp() (gas: 140158) +OffRamp_afterOC3ConfigSet:test_afterOCR3ConfigSet_SignatureVerificationDisabled_Revert() (gas: 5903354) OffRamp_applySourceChainConfigUpdates:test_AddMultipleChains_Success() (gas: 626094) OffRamp_applySourceChainConfigUpdates:test_AddNewChain_Success() (gas: 166505) OffRamp_applySourceChainConfigUpdates:test_ApplyZeroUpdates_Success() (gas: 16719) @@ -393,8 +389,8 @@ OffRamp_commit:test_FailedRMNVerification_Reverts() (gas: 63117) OffRamp_commit:test_InvalidIntervalMinLargerThanMax_Revert() (gas: 69655) OffRamp_commit:test_InvalidInterval_Revert() (gas: 65803) OffRamp_commit:test_InvalidRootRevert() (gas: 64898) -OffRamp_commit:test_NoConfigWithOtherConfigPresent_Revert() (gas: 6633259) -OffRamp_commit:test_NoConfig_Revert() (gas: 6216677) +OffRamp_commit:test_NoConfigWithOtherConfigPresent_Revert() (gas: 6664144) +OffRamp_commit:test_NoConfig_Revert() (gas: 6247562) OffRamp_commit:test_OnlyGasPriceUpdates_Success() (gas: 112728) OffRamp_commit:test_OnlyPriceUpdateStaleReport_Revert() (gas: 120561) OffRamp_commit:test_OnlyTokenPriceUpdates_Success() (gas: 112660) @@ -409,23 +405,23 @@ OffRamp_commit:test_UnauthorizedTransmitter_Revert() (gas: 125027) OffRamp_commit:test_Unhealthy_Revert() (gas: 60177) OffRamp_commit:test_ValidPriceUpdateThenStaleReportWithRoot_Success() (gas: 206221) OffRamp_commit:test_ZeroEpochAndRound_Revert() (gas: 53305) -OffRamp_constructor:test_Constructor_Success() (gas: 6179080) -OffRamp_constructor:test_SourceChainSelector_Revert() (gas: 136555) -OffRamp_constructor:test_ZeroChainSelector_Revert() (gas: 103592) -OffRamp_constructor:test_ZeroNonceManager_Revert() (gas: 101441) -OffRamp_constructor:test_ZeroOnRampAddress_Revert() (gas: 162036) -OffRamp_constructor:test_ZeroRMNRemote_Revert() (gas: 101358) -OffRamp_constructor:test_ZeroTokenAdminRegistry_Revert() (gas: 101362) +OffRamp_constructor:test_Constructor_Success() (gas: 6210339) +OffRamp_constructor:test_SourceChainSelector_Revert() (gas: 137118) +OffRamp_constructor:test_ZeroChainSelector_Revert() (gas: 103828) +OffRamp_constructor:test_ZeroNonceManager_Revert() (gas: 101677) +OffRamp_constructor:test_ZeroOnRampAddress_Revert() (gas: 162599) +OffRamp_constructor:test_ZeroRMNRemote_Revert() (gas: 101597) +OffRamp_constructor:test_ZeroTokenAdminRegistry_Revert() (gas: 101598) OffRamp_execute:test_IncorrectArrayType_Revert() (gas: 17532) OffRamp_execute:test_LargeBatch_Success() (gas: 3378447) OffRamp_execute:test_MultipleReportsWithPartialValidationFailures_Success() (gas: 371209) OffRamp_execute:test_MultipleReports_Success() (gas: 298806) -OffRamp_execute:test_NoConfigWithOtherConfigPresent_Revert() (gas: 7041684) -OffRamp_execute:test_NoConfig_Revert() (gas: 6266154) +OffRamp_execute:test_NoConfigWithOtherConfigPresent_Revert() (gas: 7072622) +OffRamp_execute:test_NoConfig_Revert() (gas: 6297092) OffRamp_execute:test_NonArray_Revert() (gas: 27572) OffRamp_execute:test_SingleReport_Success() (gas: 175631) OffRamp_execute:test_UnauthorizedTransmitter_Revert() (gas: 147790) -OffRamp_execute:test_WrongConfigWithSigners_Revert() (gas: 6933352) +OffRamp_execute:test_WrongConfigWithSigners_Revert() (gas: 6964290) OffRamp_execute:test_ZeroReports_Revert() (gas: 17248) OffRamp_executeSingleMessage:test_executeSingleMessage_NoTokens() (gas: 56213) OffRamp_executeSingleMessage:test_executeSingleMessage_NonContract() (gas: 20508) @@ -614,10 +610,8 @@ RegistryModuleOwnerCustom_registerAdminViaGetCCIPAdmin:test_registerAdminViaGetC RegistryModuleOwnerCustom_registerAdminViaGetCCIPAdmin:test_registerAdminViaGetCCIPAdmin_Success() (gas: 130126) RegistryModuleOwnerCustom_registerAdminViaOwner:test_registerAdminViaOwner_Revert() (gas: 19602) RegistryModuleOwnerCustom_registerAdminViaOwner:test_registerAdminViaOwner_Success() (gas: 129930) -Router_applyRampUpdates:test_OffRampMismatch_Revert() (gas: 89591) -Router_applyRampUpdates:test_OffRampUpdatesWithRouting() (gas: 10750087) -Router_applyRampUpdates:test_OnRampDisable() (gas: 56445) -Router_applyRampUpdates:test_OnlyOwner_Revert() (gas: 12414) +Router_applyRampUpdates:test_applyRampUpdates_OffRampUpdatesWithRouting() (gas: 10749731) +Router_applyRampUpdates:test_applyRampUpdates_OnRampDisable() (gas: 56422) Router_ccipSend:test_CCIPSendLinkFeeNoTokenSuccess_gas() (gas: 131447) Router_ccipSend:test_CCIPSendLinkFeeOneTokenSuccess_gas() (gas: 221710) Router_ccipSend:test_FeeTokenAmountTooLow_Revert() (gas: 71858) diff --git a/contracts/gas-snapshots/workflow.gas-snapshot b/contracts/gas-snapshots/workflow.gas-snapshot index 73fdfbf7187..bdfd2b24aec 100644 --- a/contracts/gas-snapshots/workflow.gas-snapshot +++ b/contracts/gas-snapshots/workflow.gas-snapshot @@ -17,9 +17,9 @@ WorkflowRegistryManager_getVersion:test_WhenVersionNumberIsRegistered() (gas: 28 WorkflowRegistryManager_getVersionNumberByContractAddressAndChainID:test_WhenAVersionIsRegisteredForTheContractAddressAndChainIDCombination() (gas: 285022) WorkflowRegistryManager_getVersionNumberByContractAddressAndChainID:test_WhenNoVersionIsRegisteredForTheContractAddressAndChainIDCombination() (gas: 286634) WorkflowRegistryManager_getVersionNumberByContractAddressAndChainID:test_WhenTheContractAddressIsInvalid() (gas: 284604) -WorkflowRegistry_activateWorkflow:test_WhenTheCallerIsAnAuthorizedAddress() (gas: 495029) -WorkflowRegistry_deleteWorkflow:test_WhenTheCallerIsAnAuthorizedAddress_AndTheDonIDIsAllowed() (gas: 403945) -WorkflowRegistry_deleteWorkflow:test_WhenTheCallerIsAnAuthorizedAddress_AndTheDonIDIsNotAllowed() (gas: 421748) +WorkflowRegistry_activateWorkflow:test_WhenTheCallerIsAnAuthorizedAddress() (gas: 517416) +WorkflowRegistry_deleteWorkflow:test_WhenTheCallerIsAnAuthorizedAddress_AndTheDonIDIsAllowed() (gas: 422157) +WorkflowRegistry_deleteWorkflow:test_WhenTheCallerIsAnAuthorizedAddress_AndTheDonIDIsNotAllowed() (gas: 439960) WorkflowRegistry_getAllAllowedDONs:test_WhenTheRegistryIsLocked() (gas: 47473) WorkflowRegistry_getAllAllowedDONs:test_WhenTheSetOfAllowedDONsIsEmpty() (gas: 25780) WorkflowRegistry_getAllAllowedDONs:test_WhenThereAreMultipleAllowedDONs() (gas: 75437) @@ -28,9 +28,9 @@ WorkflowRegistry_getAllAuthorizedAddresses:test_WhenTheRegistryIsLocked() (gas: WorkflowRegistry_getAllAuthorizedAddresses:test_WhenTheSetOfAuthorizedAddressesIsEmpty() (gas: 26152) WorkflowRegistry_getAllAuthorizedAddresses:test_WhenThereAreMultipleAuthorizedAddresses() (gas: 78270) WorkflowRegistry_getAllAuthorizedAddresses:test_WhenThereIsASingleAuthorizedAddress() (gas: 16832) -WorkflowRegistry_getWorkflowMetadata:test_WhenTheRegistryIsLocked() (gas: 519145) +WorkflowRegistry_getWorkflowMetadata:test_WhenTheRegistryIsLocked() (gas: 541532) WorkflowRegistry_getWorkflowMetadata:test_WhenTheWorkflowDoesNotExist() (gas: 17543) -WorkflowRegistry_getWorkflowMetadata:test_WhenTheWorkflowExistsWithTheOwnerAndName() (gas: 490001) +WorkflowRegistry_getWorkflowMetadata:test_WhenTheWorkflowExistsWithTheOwnerAndName() (gas: 512388) WorkflowRegistry_getWorkflowMetadataListByDON:test_WhenLimitExceedsTotalWorkflows() (gas: 128146) WorkflowRegistry_getWorkflowMetadataListByDON:test_WhenLimitIsEqualToTotalWorkflows() (gas: 128035) WorkflowRegistry_getWorkflowMetadataListByDON:test_WhenLimitIsLessThanTotalWorkflows() (gas: 90141) @@ -48,17 +48,17 @@ WorkflowRegistry_getWorkflowMetadataListByOwner:test_WhenStartIsGreaterThanOrEqu WorkflowRegistry_getWorkflowMetadataListByOwner:test_WhenTheOwnerHasNoWorkflows() (gas: 14006) WorkflowRegistry_getWorkflowMetadataListByOwner:test_WhenTheRegistryIsLocked() (gas: 165968) WorkflowRegistry_lockRegistry:test_WhenTheCallerIsTheContractOwner() (gas: 38758) -WorkflowRegistry_pauseWorkflow:test_WhenTheDonIDIsAllowed_AndTheCallerIsAnAuthorizedAddress() (gas: 494993) -WorkflowRegistry_pauseWorkflow:test_WhenTheDonIDIsAllowed_AndTheCallerIsAnUnauthorizedAddress() (gas: 502796) -WorkflowRegistry_pauseWorkflow:test_WhenTheDonIDIsNotAllowed_AndTheCallerIsAnAuthorizedAddress() (gas: 502555) -WorkflowRegistry_pauseWorkflow:test_WhenTheDonIDIsNotAllowed_AndTheCallerIsAnUnauthorizedAddress() (gas: 506966) -WorkflowRegistry_registerWorkflow:test_WhenTheWorkflowInputsAreAllValid() (gas: 549769) -WorkflowRegistry_requestForceUpdateSecrets:test_WhenTheCallerIsAnAuthorizedAddress_AndTheWorkflowIsInAnAllowedDON() (gas: 891242) -WorkflowRegistry_requestForceUpdateSecrets:test_WhenTheCallerIsAnAuthorizedAddress_AndTheWorkflowIsNotInAnAllowedDON() (gas: 488397) -WorkflowRegistry_requestForceUpdateSecrets:test_WhenTheCallerIsNotAnAuthorizedAddress() (gas: 486751) +WorkflowRegistry_pauseWorkflow:test_WhenTheDonIDIsAllowed_AndTheCallerIsAnAuthorizedAddress() (gas: 517380) +WorkflowRegistry_pauseWorkflow:test_WhenTheDonIDIsAllowed_AndTheCallerIsAnUnauthorizedAddress() (gas: 525183) +WorkflowRegistry_pauseWorkflow:test_WhenTheDonIDIsNotAllowed_AndTheCallerIsAnAuthorizedAddress() (gas: 524942) +WorkflowRegistry_pauseWorkflow:test_WhenTheDonIDIsNotAllowed_AndTheCallerIsAnUnauthorizedAddress() (gas: 529353) +WorkflowRegistry_registerWorkflow:test_WhenTheWorkflowInputsAreAllValid() (gas: 572178) +WorkflowRegistry_requestForceUpdateSecrets:test_WhenTheCallerIsAnAuthorizedAddress_AndTheWorkflowIsInAnAllowedDON() (gas: 936016) +WorkflowRegistry_requestForceUpdateSecrets:test_WhenTheCallerIsAnAuthorizedAddress_AndTheWorkflowIsNotInAnAllowedDON() (gas: 510784) +WorkflowRegistry_requestForceUpdateSecrets:test_WhenTheCallerIsNotAnAuthorizedAddress() (gas: 509138) WorkflowRegistry_unlockRegistry:test_WhenTheCallerIsTheContractOwner() (gas: 30325) WorkflowRegistry_updateAllowedDONs:test_WhenTheBoolInputIsFalse() (gas: 29739) WorkflowRegistry_updateAllowedDONs:test_WhenTheBoolInputIsTrue() (gas: 170296) WorkflowRegistry_updateAuthorizedAddresses:test_WhenTheBoolInputIsFalse() (gas: 30278) WorkflowRegistry_updateAuthorizedAddresses:test_WhenTheBoolInputIsTrue() (gas: 175515) -WorkflowRegistry_updateWorkflow:test_WhenTheWorkflowInputsAreAllValid() (gas: 479601) +WorkflowRegistry_updateWorkflow:test_WhenTheWorkflowInputsAreAllValid() (gas: 515666) diff --git a/contracts/src/v0.8/ccip/FeeQuoter.sol b/contracts/src/v0.8/ccip/FeeQuoter.sol index 58261eff499..b312e732e61 100644 --- a/contracts/src/v0.8/ccip/FeeQuoter.sol +++ b/contracts/src/v0.8/ccip/FeeQuoter.sol @@ -103,12 +103,12 @@ contract FeeQuoter is AuthorizedCallers, IFeeQuoter, ITypeAndVersion, IReceiver, // The following three properties are defaults, they can be overridden by setting the TokenTransferFeeConfig for a token. uint16 defaultTokenFeeUSDCents; // │ Default token fee charged per token transfer. uint32 defaultTokenDestGasOverhead; // ──────╯ Default gas charged to execute a token transfer on the destination chain. - uint32 defaultTxGasLimit; //─────────────────╮ Default gas limit for a tx. - uint64 gasMultiplierWeiPerEth; // │ Multiplier for gas costs, 1e18 based so 11e17 = 10% extra cost. - uint32 networkFeeUSDCents; // │ Flat network fee to charge for messages, multiples of 0.01 USD. - uint32 gasPriceStalenessThreshold; // │ The amount of time a gas price can be stale before it is considered invalid (0 means disabled). - bool enforceOutOfOrder; // │ Whether to enforce the allowOutOfOrderExecution extraArg value to be true. - bytes4 chainFamilySelector; // ──────────────╯ Selector that identifies the destination chain's family. Used to determine the correct validations to perform for the dest chain. + uint32 defaultTxGasLimit; //──────────╮ Default gas limit for a tx. + uint64 gasMultiplierWeiPerEth; // │ Multiplier for gas costs, 1e18 based so 11e17 = 10% extra cost. + uint32 networkFeeUSDCents; // │ Flat network fee to charge for messages, multiples of 0.01 USD. + uint32 gasPriceStalenessThreshold; // │ The amount of time a gas price can be stale before it is considered invalid (0 means disabled). + bool enforceOutOfOrder; // │ Whether to enforce the allowOutOfOrderExecution extraArg value to be true. + bytes4 chainFamilySelector; // ───────╯ Selector that identifies the destination chain's family. Used to determine the correct validations to perform for the dest chain. } /// @dev Struct to hold the configs and its destination chain selector. Same as DestChainConfig but with the @@ -121,13 +121,13 @@ contract FeeQuoter is AuthorizedCallers, IFeeQuoter, ITypeAndVersion, IReceiver, /// @dev Struct with transfer fee configuration for token transfers. struct TokenTransferFeeConfig { - uint32 minFeeUSDCents; // ────╮ Minimum fee to charge per token transfer, multiples of 0.01 USD. - uint32 maxFeeUSDCents; // │ Maximum fee to charge per token transfer, multiples of 0.01 USD. - uint16 deciBps; // │ Basis points charged on token transfers, multiples of 0.1bps, or 1e-5. - uint32 destGasOverhead; // │ Gas charged to execute the token transfer on the destination chain. - // │ Extra data availability bytes that are returned from the source pool and sent to - uint32 destBytesOverhead; // │ the destination pool. Must be >= Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES. - bool isEnabled; // ───────────╯ Whether this token has custom transfer fees. + uint32 minFeeUSDCents; // ───╮ Minimum fee to charge per token transfer, multiples of 0.01 USD. + uint32 maxFeeUSDCents; // │ Maximum fee to charge per token transfer, multiples of 0.01 USD. + uint16 deciBps; // │ Basis points charged on token transfers, multiples of 0.1bps, or 1e-5. + uint32 destGasOverhead; // │ Gas charged to execute the token transfer on the destination chain. + // │ Data availability bytes that are returned from the source pool and sent to the dest + uint32 destBytesOverhead; // │ pool. Must be >= Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES. Set as multiple of 32 bytes. + bool isEnabled; // ──────────╯ Whether this token has custom transfer fees. } /// @dev Struct with token transfer fee configurations for a token, same as TokenTransferFeeConfig but with the token @@ -517,6 +517,7 @@ contract FeeQuoter is AuthorizedCallers, IFeeQuoter, ITypeAndVersion, IReceiver, for (uint256 i = 0; i < feeds.length; ++i) { TokenPriceFeedConfig memory feedConfig = s_usdPriceFeedsPerToken[feeds[i].token]; + // If the token is not enabled we revert the entire report as that indicates some type of misconfiguration. if (!feedConfig.isEnabled) { revert TokenNotSupported(feeds[i].token); } @@ -710,6 +711,8 @@ contract FeeQuoter is AuthorizedCallers, IFeeQuoter, ITypeAndVersion, IReceiver, continue; } + // In the case where bpsFeeUSDWei, minFeeUSDWei, and maxFeeUSDWei are all 0, we skip the fee. This is intended + // to allow for a fee of 0 to be set. tokenTransferFeeUSDWei += bpsFeeUSDWei; } @@ -863,7 +866,9 @@ contract FeeQuoter is AuthorizedCallers, IFeeQuoter, ITypeAndVersion, IReceiver, if (evmExtraArgs.gasLimit > uint256(destChainConfig.maxPerMsgGasLimit)) revert MessageGasLimitTooHigh(); - // If the chain enforces out of order execution, the extra args must allow it, otherwise revert. + // If the chain enforces out of order execution, the extra args must allow it, otherwise revert. We cannot assume + // the user intended to use OOO on any chain that requires it as it may lead to unexpected behavior. Therefore we + // revert instead of assuming the user intended to use OOO. if (destChainConfig.enforceOutOfOrder && !evmExtraArgs.allowOutOfOrderExecution) { revert ExtraArgOutOfOrderExecutionMustBeTrue(); } diff --git a/contracts/src/v0.8/ccip/LICENSE-MIT.md b/contracts/src/v0.8/ccip/LICENSE-MIT.md deleted file mode 100644 index 812debd8e9b..00000000000 --- a/contracts/src/v0.8/ccip/LICENSE-MIT.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018 SmartContract ChainLink, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/contracts/src/v0.8/ccip/NonceManager.sol b/contracts/src/v0.8/ccip/NonceManager.sol index f95380b23b2..382844c27d9 100644 --- a/contracts/src/v0.8/ccip/NonceManager.sol +++ b/contracts/src/v0.8/ccip/NonceManager.sol @@ -33,9 +33,9 @@ contract NonceManager is INonceManager, AuthorizedCallers, ITypeAndVersion { /// @dev The previous on/off ramps per chain selector. mapping(uint64 chainSelector => PreviousRamps previousRamps) private s_previousRamps; - /// @dev The current outbound nonce per sender used on the onramp. + /// @dev The current outbound nonce per sender used on the onRamp. mapping(uint64 destChainSelector => mapping(address sender => uint64 outboundNonce)) private s_outboundNonces; - /// @dev The current inbound nonce per sender used on the offramp. + /// @dev The current inbound nonce per sender used on the offRamp. /// Eventually in sync with the outbound nonce in the remote source chain NonceManager, used to enforce that messages /// are executed in the same order they are sent (assuming they are DON). mapping(uint64 sourceChainSelector => mapping(bytes sender => uint64 inboundNonce)) private s_inboundNonces; @@ -71,6 +71,8 @@ contract NonceManager is INonceManager, AuthorizedCallers, ITypeAndVersion { if (outboundNonce == 0) { address prevOnRamp = s_previousRamps[destChainSelector].prevOnRamp; if (prevOnRamp != address(0)) { + // This gets the current nonce for a sender, not the already incremented nonce like getIncrementedOutboundNonce + // would return. return IEVM2AnyOnRamp(prevOnRamp).getSenderNonce(sender); } } diff --git a/contracts/src/v0.8/ccip/capability/CCIPHome.sol b/contracts/src/v0.8/ccip/capability/CCIPHome.sol index e43e4b0d03f..829c54c5b62 100644 --- a/contracts/src/v0.8/ccip/capability/CCIPHome.sol +++ b/contracts/src/v0.8/ccip/capability/CCIPHome.sol @@ -2,7 +2,6 @@ pragma solidity 0.8.24; import {ICapabilityConfiguration} from "../../keystone/interfaces/ICapabilityConfiguration.sol"; - import {INodeInfoProvider} from "../../keystone/interfaces/INodeInfoProvider.sol"; import {ITypeAndVersion} from "../../shared/interfaces/ITypeAndVersion.sol"; @@ -111,7 +110,7 @@ contract CCIPHome is Ownable2StepMsgSender, ITypeAndVersion, ICapabilityConfigur uint64 chainSelector; // │ The (remote) chain that the configuration is for. uint8 FRoleDON; // │ The "big F" parameter for the role DON. uint64 offchainConfigVersion; // ──────╯ The version of the exec offchain configuration. - bytes offrampAddress; // The remote chain offramp address. + bytes offrampAddress; // The remote chain offRamp address. bytes rmnHomeAddress; // The home chain RMN home address. OCR3Node[] nodes; // Keys & IDs of nodes part of the role DON. bytes offchainConfig; // The offchain configuration for the OCR3 plugin. Protobuf encoded. @@ -241,10 +240,9 @@ contract CCIPHome is Ownable2StepMsgSender, ITypeAndVersion, ICapabilityConfigur } /// @inheritdoc ICapabilityConfiguration - /// @dev The CCIP capability will fetch the configuration needed directly from this contract. - /// The offchain syncer will call this function, so its important that it doesn't revert. + /// @dev This function is not used in the CCIPHome contract but the interface requires it to be implemented. function getCapabilityConfiguration( - uint32 /* donId */ + uint32 ) external pure override returns (bytes memory configuration) { return bytes(""); } @@ -533,6 +531,15 @@ contract CCIPHome is Ownable2StepMsgSender, ITypeAndVersion, ICapabilityConfigur return s_remoteChainSelectors.length(); } + /// @notice Returns the chain configuration for a given chain selector. + /// @param chainSelector The chain selector. + /// @return chainConfig The chain configuration. + function getChainConfig( + uint64 chainSelector + ) external view returns (ChainConfig memory) { + return s_chainConfigurations[chainSelector]; + } + /// @notice Returns all the chain configurations. /// @param pageIndex The page index. /// @param pageSize The page size. diff --git a/contracts/src/v0.8/ccip/interfaces/IEVM2AnyOnRamp.sol b/contracts/src/v0.8/ccip/interfaces/IEVM2AnyOnRamp.sol index 2d27bd3a25c..e40b186dda4 100644 --- a/contracts/src/v0.8/ccip/interfaces/IEVM2AnyOnRamp.sol +++ b/contracts/src/v0.8/ccip/interfaces/IEVM2AnyOnRamp.sol @@ -8,9 +8,9 @@ interface IEVM2AnyOnRamp is IEVM2AnyOnRampClient { /// @return the next sequence number to be used. function getExpectedNextSequenceNumber() external view returns (uint64); - /// @notice Get the next nonce for a given sender. + /// @notice Get the current nonce for a given sender. /// @param sender The sender to get the nonce for. - /// @return nonce The next nonce for the sender. + /// @return nonce The current nonce for the sender. function getSenderNonce( address sender ) external view returns (uint64 nonce); diff --git a/contracts/src/v0.8/ccip/libraries/Internal.sol b/contracts/src/v0.8/ccip/libraries/Internal.sol index f5bcdd434f7..25d923ee1ed 100644 --- a/contracts/src/v0.8/ccip/libraries/Internal.sol +++ b/contracts/src/v0.8/ccip/libraries/Internal.sol @@ -3,14 +3,14 @@ pragma solidity ^0.8.4; import {MerkleMultiProof} from "../libraries/MerkleMultiProof.sol"; -// Library for CCIP internal definitions common to multiple contracts. +/// @notice Library for CCIP internal definitions common to multiple contracts. +/// @dev The following is a non-exhaustive list of "known issues" for CCIP: +/// - We could implement yield claiming for Blast. This is not worth the custom code path on non-blast chains. +/// - uint32 is used for timestamps, which will overflow in 2106. This is not a concern for the current use case, as we +/// expect to have migrated to a new version by then. library Internal { error InvalidEVMAddress(bytes encodedAddress); - /// @dev The minimum amount of gas to perform the call with exact gas. - /// We include this in the offramp so that we can redeploy to adjust it should a hardfork change the gas costs of - /// relevant opcodes in callWithExactGas. - uint16 internal constant GAS_FOR_CALL_EXACT_CHECK = 5_000; /// @dev We limit return data to a selector plus 4 words. This is to avoid malicious contracts from returning /// large amounts of data and causing repeated out-of-gas scenarios. uint16 internal constant MAX_RET_BYTES = 4 + 4 * 32; @@ -40,8 +40,8 @@ library Internal { /// @notice A timestamped uint224 value that can contain several tightly packed fields. struct TimestampedPackedUint224 { - uint224 value; // ──────╮ Value in uint224, packed. - uint32 timestamp; // ───╯ Timestamp of the most recent price update. + uint224 value; // ────╮ Value in uint224, packed. + uint32 timestamp; // ─╯ Timestamp of the most recent price update. } /// @dev Gas price is stored in 112-bit unsigned int. uint224 can pack 2 prices. @@ -196,10 +196,10 @@ library Internal { /// The messageId is not expected to match hash(message), since it may originate from another ramp family. struct RampMessageHeader { bytes32 messageId; // Unique identifier for the message, generated with the source chain's encoding scheme (i.e. not necessarily abi.encoded). - uint64 sourceChainSelector; // ──╮ the chain selector of the source chain, note: not chainId. - uint64 destChainSelector; // │ the chain selector of the destination chain, note: not chainId. - uint64 sequenceNumber; // │ sequence number, not unique across lanes. - uint64 nonce; // ────────────────╯ nonce for this lane for this sender, not unique across senders/lanes. + uint64 sourceChainSelector; // ─╮ the chain selector of the source chain, note: not chainId. + uint64 destChainSelector; // │ the chain selector of the destination chain, note: not chainId. + uint64 sequenceNumber; // │ sequence number, not unique across lanes. + uint64 nonce; // ───────────────╯ nonce for this lane for this sender, not unique across senders/lanes. } struct EVM2AnyTokenTransfer { @@ -268,7 +268,7 @@ library Internal { // solhint-disable-next-line gas-struct-packing struct MerkleRoot { uint64 sourceChainSelector; // Remote source chain selector that the Merkle Root is scoped to - bytes onRampAddress; // Generic onramp address, to support arbitrary sources; for EVM, use abi.encode + bytes onRampAddress; // Generic onRamp address, to support arbitrary sources; for EVM, use abi.encode uint64 minSeqNr; // ─────────╮ Minimum sequence number, inclusive uint64 maxSeqNr; // ─────────╯ Maximum sequence number, inclusive bytes32 merkleRoot; // Merkle root covering the interval & source chain messages diff --git a/contracts/src/v0.8/ccip/offRamp/OffRamp.sol b/contracts/src/v0.8/ccip/offRamp/OffRamp.sol index d276ce26a96..76424b4e2a7 100644 --- a/contracts/src/v0.8/ccip/offRamp/OffRamp.sol +++ b/contracts/src/v0.8/ccip/offRamp/OffRamp.sol @@ -92,8 +92,9 @@ contract OffRamp is ITypeAndVersion, MultiOCR3Base { /// @dev RMN depends on this struct, if changing, please notify the RMN maintainers. // solhint-disable-next-line gas-struct-packing struct StaticConfig { - uint64 chainSelector; // ────╮ Destination chainSelector - IRMNRemote rmnRemote; // ────╯ RMN Verification Contract + uint64 chainSelector; // ───────╮ Destination chainSelector + uint16 gasForCallExactCheck; // | Gas for call exact check + IRMNRemote rmnRemote; // ───────╯ RMN Verification Contract address tokenAdminRegistry; // Token admin registry address address nonceManager; // Nonce manager address } @@ -151,6 +152,10 @@ contract OffRamp is ITypeAndVersion, MultiOCR3Base { address internal immutable i_tokenAdminRegistry; /// @dev The address of the nonce manager. address internal immutable i_nonceManager; + /// @dev The minimum amount of gas to perform the call with exact gas. + /// We include this in the offramp so that we can redeploy to adjust it should a hardfork change the gas costs of + /// relevant opcodes in callWithExactGas. + uint16 internal immutable i_gasForCallExactCheck; // DYNAMIC CONFIG DynamicConfig internal s_dynamicConfig; @@ -193,6 +198,7 @@ contract OffRamp is ITypeAndVersion, MultiOCR3Base { i_rmnRemote = staticConfig.rmnRemote; i_tokenAdminRegistry = staticConfig.tokenAdminRegistry; i_nonceManager = staticConfig.nonceManager; + i_gasForCallExactCheck = staticConfig.gasForCallExactCheck; emit StaticConfigSet(staticConfig); _setDynamicConfig(dynamicConfig); @@ -356,6 +362,8 @@ contract OffRamp is ITypeAndVersion, MultiOCR3Base { /// @param manualExecGasExecOverrides An array of gas limits to use for manual execution. /// @dev If called from the DON, this array is always empty. /// @dev If called from manual execution, this array is always same length as messages. + /// @dev This function can fully revert in some cases, reverting potentially valid other reports with it. The reasons + /// for these reverts are so severe that we prefer to revert the entire batch instead of silently failing. function _executeSingleReport( Internal.ExecutionReport memory report, GasLimitOverride[] memory manualExecGasExecOverrides @@ -577,6 +585,8 @@ contract OffRamp is ITypeAndVersion, MultiOCR3Base { destTokenAmounts: destTokenAmounts }); + // The main message interceptor is the aggregate rate limiter, but we also allow for a custom interceptor. This is + // why we always have to call into the contract when it's enabled, even when there are no tokens in the message. address messageInterceptor = s_dynamicConfig.messageInterceptor; if (messageInterceptor != address(0)) { try IMessageInterceptor(messageInterceptor).onInboundMessage(any2EvmMessage) {} @@ -601,7 +611,7 @@ contract OffRamp is ITypeAndVersion, MultiOCR3Base { (bool success, bytes memory returnData,) = s_sourceChainConfigs[message.header.sourceChainSelector] .router - .routeMessage(any2EvmMessage, Internal.GAS_FOR_CALL_EXACT_CHECK, message.gasLimit, message.receiver); + .routeMessage(any2EvmMessage, i_gasForCallExactCheck, message.gasLimit, message.receiver); // If CCIP receiver execution is not successful, revert the call including token transfers. if (!success) revert ReceiverError(returnData); } @@ -665,7 +675,7 @@ contract OffRamp is ITypeAndVersion, MultiOCR3Base { ), localPoolAddress, gasLeft, - Internal.GAS_FOR_CALL_EXACT_CHECK, + i_gasForCallExactCheck, Internal.MAX_RET_BYTES ); @@ -705,11 +715,7 @@ contract OffRamp is ITypeAndVersion, MultiOCR3Base { uint256 gasLimit ) internal returns (uint256 balance, uint256 gasLeft) { (bool success, bytes memory returnData, uint256 gasUsed) = CallWithExactGas._callWithExactGasSafeReturnData( - abi.encodeCall(IERC20.balanceOf, (receiver)), - token, - gasLimit, - Internal.GAS_FOR_CALL_EXACT_CHECK, - Internal.MAX_RET_BYTES + abi.encodeCall(IERC20.balanceOf, (receiver)), token, gasLimit, i_gasForCallExactCheck, Internal.MAX_RET_BYTES ); if (!success) revert TokenHandlingError(token, returnData); @@ -906,6 +912,7 @@ contract OffRamp is ITypeAndVersion, MultiOCR3Base { function getStaticConfig() external view returns (StaticConfig memory) { return StaticConfig({ chainSelector: i_chainSelector, + gasForCallExactCheck: i_gasForCallExactCheck, rmnRemote: i_rmnRemote, tokenAdminRegistry: i_tokenAdminRegistry, nonceManager: i_nonceManager diff --git a/contracts/src/v0.8/ccip/test/BaseTest.t.sol b/contracts/src/v0.8/ccip/test/BaseTest.t.sol index dfc9e4e1eb1..1e9fcdd2fa5 100644 --- a/contracts/src/v0.8/ccip/test/BaseTest.t.sol +++ b/contracts/src/v0.8/ccip/test/BaseTest.t.sol @@ -41,7 +41,7 @@ contract BaseTest is Test { // OffRamp uint32 internal constant MAX_DATA_SIZE = 30_000; uint16 internal constant MAX_TOKENS_LENGTH = 5; - uint16 internal constant GAS_FOR_CALL_EXACT_CHECK = 5000; + uint16 internal constant GAS_FOR_CALL_EXACT_CHECK = 5_000; uint32 internal constant MAX_GAS_LIMIT = 4_000_000; MockRMN internal s_mockRMN; diff --git a/contracts/src/v0.8/ccip/test/NonceManager.t.sol b/contracts/src/v0.8/ccip/test/NonceManager.t.sol deleted file mode 100644 index b5c3ee6bd99..00000000000 --- a/contracts/src/v0.8/ccip/test/NonceManager.t.sol +++ /dev/null @@ -1,568 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.24; - -import {IEVM2AnyOnRamp} from "../interfaces/IEVM2AnyOnRamp.sol"; - -import {NonceManager} from "../NonceManager.sol"; -import {Client} from "../libraries/Client.sol"; -import {Internal} from "../libraries/Internal.sol"; -import {OffRamp} from "../offRamp/OffRamp.sol"; -import {OnRamp} from "../onRamp/OnRamp.sol"; -import {BaseTest} from "./BaseTest.t.sol"; -import {EVM2EVMOffRampHelper} from "./helpers/EVM2EVMOffRampHelper.sol"; -import {OnRampHelper} from "./helpers/OnRampHelper.sol"; -import {OffRampSetup} from "./offRamp/OffRamp/OffRampSetup.t.sol"; -import {OnRampSetup} from "./onRamp/OnRamp/OnRampSetup.t.sol"; - -import {Test} from "forge-std/Test.sol"; - -contract NonceManager_typeAndVersion is Test { - NonceManager private s_nonceManager; - - function setUp() public { - s_nonceManager = new NonceManager(new address[](0)); - } - - function test_typeAndVersion() public view { - assertEq(s_nonceManager.typeAndVersion(), "NonceManager 1.6.0-dev"); - } -} - -contract NonceManager_NonceIncrementation is BaseTest { - NonceManager private s_nonceManager; - - function setUp() public override { - address[] memory authorizedCallers = new address[](1); - authorizedCallers[0] = address(this); - s_nonceManager = new NonceManager(authorizedCallers); - } - - function test_getIncrementedOutboundNonce_Success() public { - address sender = address(this); - - assertEq(s_nonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, sender), 0); - - uint64 outboundNonce = s_nonceManager.getIncrementedOutboundNonce(DEST_CHAIN_SELECTOR, sender); - assertEq(outboundNonce, 1); - } - - function test_incrementInboundNonce_Success() public { - address sender = address(this); - - s_nonceManager.incrementInboundNonce(SOURCE_CHAIN_SELECTOR, 1, abi.encode(sender)); - - assertEq(s_nonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR, abi.encode(sender)), 1); - } - - function test_incrementInboundNonce_Skip() public { - address sender = address(this); - uint64 expectedNonce = 2; - - vm.expectEmit(); - emit NonceManager.SkippedIncorrectNonce(SOURCE_CHAIN_SELECTOR, expectedNonce, abi.encode(sender)); - - s_nonceManager.incrementInboundNonce(SOURCE_CHAIN_SELECTOR, expectedNonce, abi.encode(sender)); - - assertEq(s_nonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR, abi.encode(sender)), 0); - } - - function test_incrementNoncesInboundAndOutbound_Success() public { - address sender = address(this); - - assertEq(s_nonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, sender), 0); - uint64 outboundNonce = s_nonceManager.getIncrementedOutboundNonce(DEST_CHAIN_SELECTOR, sender); - assertEq(outboundNonce, 1); - - // Inbound nonce unchanged - assertEq(s_nonceManager.getInboundNonce(DEST_CHAIN_SELECTOR, abi.encode(sender)), 0); - - s_nonceManager.incrementInboundNonce(DEST_CHAIN_SELECTOR, 1, abi.encode(sender)); - assertEq(s_nonceManager.getInboundNonce(DEST_CHAIN_SELECTOR, abi.encode(sender)), 1); - - // Outbound nonce unchanged - assertEq(s_nonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, sender), 1); - } -} - -contract NonceManager_applyPreviousRampsUpdates is OnRampSetup { - function test_SingleRampUpdate_success() public { - address prevOnRamp = makeAddr("prevOnRamp"); - address prevOffRamp = makeAddr("prevOffRamp"); - NonceManager.PreviousRampsArgs[] memory previousRamps = new NonceManager.PreviousRampsArgs[](1); - previousRamps[0] = NonceManager.PreviousRampsArgs({ - remoteChainSelector: DEST_CHAIN_SELECTOR, - prevRamps: NonceManager.PreviousRamps(prevOnRamp, prevOffRamp), - overrideExistingRamps: false - }); - - vm.expectEmit(); - emit NonceManager.PreviousRampsUpdated(DEST_CHAIN_SELECTOR, previousRamps[0].prevRamps); - - s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); - - _assertPreviousRampsEqual(s_outboundNonceManager.getPreviousRamps(DEST_CHAIN_SELECTOR), previousRamps[0].prevRamps); - } - - function test_MultipleRampsUpdates_success() public { - address prevOnRamp1 = makeAddr("prevOnRamp1"); - address prevOnRamp2 = makeAddr("prevOnRamp2"); - address prevOffRamp1 = makeAddr("prevOffRamp1"); - address prevOffRamp2 = makeAddr("prevOffRamp2"); - NonceManager.PreviousRampsArgs[] memory previousRamps = new NonceManager.PreviousRampsArgs[](2); - previousRamps[0] = NonceManager.PreviousRampsArgs({ - remoteChainSelector: DEST_CHAIN_SELECTOR, - prevRamps: NonceManager.PreviousRamps(prevOnRamp1, prevOffRamp1), - overrideExistingRamps: false - }); - previousRamps[1] = NonceManager.PreviousRampsArgs({ - remoteChainSelector: DEST_CHAIN_SELECTOR + 1, - prevRamps: NonceManager.PreviousRamps(prevOnRamp2, prevOffRamp2), - overrideExistingRamps: false - }); - - vm.expectEmit(); - emit NonceManager.PreviousRampsUpdated(DEST_CHAIN_SELECTOR, previousRamps[0].prevRamps); - vm.expectEmit(); - emit NonceManager.PreviousRampsUpdated(DEST_CHAIN_SELECTOR + 1, previousRamps[1].prevRamps); - - s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); - - _assertPreviousRampsEqual(s_outboundNonceManager.getPreviousRamps(DEST_CHAIN_SELECTOR), previousRamps[0].prevRamps); - _assertPreviousRampsEqual( - s_outboundNonceManager.getPreviousRamps(DEST_CHAIN_SELECTOR + 1), previousRamps[1].prevRamps - ); - } - - function test_PreviousRampAlreadySet_overrideAllowed_success() public { - NonceManager.PreviousRampsArgs[] memory previousRamps = new NonceManager.PreviousRampsArgs[](1); - address prevOffRamp = makeAddr("prevOffRamp"); - previousRamps[0] = NonceManager.PreviousRampsArgs({ - remoteChainSelector: DEST_CHAIN_SELECTOR, - prevRamps: NonceManager.PreviousRamps(address(0), prevOffRamp), - overrideExistingRamps: true - }); - - s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); - - previousRamps[0] = NonceManager.PreviousRampsArgs({ - remoteChainSelector: DEST_CHAIN_SELECTOR, - prevRamps: NonceManager.PreviousRamps(address(0), prevOffRamp), - overrideExistingRamps: true - }); - - s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); - } - - function test_ZeroInput_success() public { - vm.recordLogs(); - s_outboundNonceManager.applyPreviousRampsUpdates(new NonceManager.PreviousRampsArgs[](0)); - - assertEq(vm.getRecordedLogs().length, 0); - } - - function test_PreviousRampAlreadySetOnRamp_Revert() public { - NonceManager.PreviousRampsArgs[] memory previousRamps = new NonceManager.PreviousRampsArgs[](1); - address prevOnRamp = makeAddr("prevOnRamp"); - previousRamps[0] = NonceManager.PreviousRampsArgs({ - remoteChainSelector: DEST_CHAIN_SELECTOR, - prevRamps: NonceManager.PreviousRamps(prevOnRamp, address(0)), - overrideExistingRamps: false - }); - - s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); - - previousRamps[0] = NonceManager.PreviousRampsArgs({ - remoteChainSelector: DEST_CHAIN_SELECTOR, - prevRamps: NonceManager.PreviousRamps(prevOnRamp, address(0)), - overrideExistingRamps: false - }); - - vm.expectRevert(NonceManager.PreviousRampAlreadySet.selector); - s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); - } - - function test_PreviousRampAlreadySetOffRamp_Revert() public { - NonceManager.PreviousRampsArgs[] memory previousRamps = new NonceManager.PreviousRampsArgs[](1); - address prevOffRamp = makeAddr("prevOffRamp"); - previousRamps[0] = NonceManager.PreviousRampsArgs({ - remoteChainSelector: DEST_CHAIN_SELECTOR, - prevRamps: NonceManager.PreviousRamps(address(0), prevOffRamp), - overrideExistingRamps: false - }); - - s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); - - previousRamps[0] = NonceManager.PreviousRampsArgs({ - remoteChainSelector: DEST_CHAIN_SELECTOR, - prevRamps: NonceManager.PreviousRamps(address(0), prevOffRamp), - overrideExistingRamps: false - }); - - vm.expectRevert(NonceManager.PreviousRampAlreadySet.selector); - s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); - } - - function test_PreviousRampAlreadySetOnRampAndOffRamp_Revert() public { - NonceManager.PreviousRampsArgs[] memory previousRamps = new NonceManager.PreviousRampsArgs[](1); - address prevOnRamp = makeAddr("prevOnRamp"); - address prevOffRamp = makeAddr("prevOffRamp"); - previousRamps[0] = NonceManager.PreviousRampsArgs({ - remoteChainSelector: DEST_CHAIN_SELECTOR, - prevRamps: NonceManager.PreviousRamps(prevOnRamp, prevOffRamp), - overrideExistingRamps: false - }); - - s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); - - previousRamps[0] = NonceManager.PreviousRampsArgs({ - remoteChainSelector: DEST_CHAIN_SELECTOR, - prevRamps: NonceManager.PreviousRamps(prevOnRamp, prevOffRamp), - overrideExistingRamps: false - }); - - vm.expectRevert(NonceManager.PreviousRampAlreadySet.selector); - s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); - } - - function _assertPreviousRampsEqual( - NonceManager.PreviousRamps memory a, - NonceManager.PreviousRamps memory b - ) internal pure { - assertEq(a.prevOnRamp, b.prevOnRamp); - assertEq(a.prevOffRamp, b.prevOffRamp); - } -} - -contract NonceManager_OnRampUpgrade is OnRampSetup { - uint256 internal constant FEE_AMOUNT = 1234567890; - OnRampHelper internal s_prevOnRamp; - - function setUp() public virtual override { - super.setUp(); - - (s_prevOnRamp,) = _deployOnRamp( - SOURCE_CHAIN_SELECTOR, s_sourceRouter, address(s_outboundNonceManager), address(s_tokenAdminRegistry) - ); - - // Since the previous onRamp is not a 1.5 ramp it doesn't have the getSenderNonce function. We mock it to return 0 - vm.mockCall(address(s_prevOnRamp), abi.encodeWithSelector(IEVM2AnyOnRamp.getSenderNonce.selector), abi.encode(0)); - - NonceManager.PreviousRampsArgs[] memory previousRamps = new NonceManager.PreviousRampsArgs[](1); - previousRamps[0] = NonceManager.PreviousRampsArgs({ - remoteChainSelector: DEST_CHAIN_SELECTOR, - prevRamps: NonceManager.PreviousRamps(address(s_prevOnRamp), address(0)), - overrideExistingRamps: false - }); - s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); - - (s_onRamp, s_metadataHash) = _deployOnRamp( - SOURCE_CHAIN_SELECTOR, s_sourceRouter, address(s_outboundNonceManager), address(s_tokenAdminRegistry) - ); - - vm.startPrank(address(s_sourceRouter)); - } - - function test_Upgrade_Success() public { - Client.EVM2AnyMessage memory message = _generateEmptyMessage(); - - vm.expectEmit(); - emit OnRamp.CCIPMessageSent(DEST_CHAIN_SELECTOR, 1, _messageToEvent(message, 1, 1, FEE_AMOUNT, OWNER)); - - s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, FEE_AMOUNT, OWNER); - } - - function test_UpgradeSenderNoncesReadsPreviousRamp_Success() public { - Client.EVM2AnyMessage memory message = _generateEmptyMessage(); - uint64 startNonce = s_outboundNonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER); - - for (uint64 i = 1; i < 4; ++i) { - s_prevOnRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 0, OWNER); - - assertEq(startNonce + i, s_outboundNonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER)); - } - } - - function test_UpgradeNonceStartsAtV1Nonce_Success() public { - Client.EVM2AnyMessage memory message = _generateEmptyMessage(); - - uint64 startNonce = s_outboundNonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER); - - // send 1 message from previous onramp - s_prevOnRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, FEE_AMOUNT, OWNER); - - assertEq(startNonce + 1, s_outboundNonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER)); - - // new onramp nonce should start from 2, while sequence number start from 1 - vm.expectEmit(); - emit OnRamp.CCIPMessageSent(DEST_CHAIN_SELECTOR, 1, _messageToEvent(message, 1, startNonce + 2, FEE_AMOUNT, OWNER)); - s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, FEE_AMOUNT, OWNER); - - assertEq(startNonce + 2, s_outboundNonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER)); - - // after another send, nonce should be 3, and sequence number be 2 - vm.expectEmit(); - emit OnRamp.CCIPMessageSent(DEST_CHAIN_SELECTOR, 2, _messageToEvent(message, 2, startNonce + 3, FEE_AMOUNT, OWNER)); - s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, FEE_AMOUNT, OWNER); - - assertEq(startNonce + 3, s_outboundNonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER)); - } - - function test_UpgradeNonceNewSenderStartsAtZero_Success() public { - Client.EVM2AnyMessage memory message = _generateEmptyMessage(); - - // send 1 message from previous onramp from OWNER - s_prevOnRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, FEE_AMOUNT, OWNER); - - address newSender = address(1234567); - // new onramp nonce should start from 1 for new sender - vm.expectEmit(); - emit OnRamp.CCIPMessageSent(DEST_CHAIN_SELECTOR, 1, _messageToEvent(message, 1, 1, FEE_AMOUNT, newSender)); - - s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, FEE_AMOUNT, newSender); - } -} - -contract NonceManager_OffRampUpgrade is OffRampSetup { - EVM2EVMOffRampHelper internal s_prevOffRamp; - - address internal constant SINGLE_LANE_ON_RAMP_ADDRESS_1 = abi.decode(ON_RAMP_ADDRESS_1, (address)); - address internal constant SINGLE_LANE_ON_RAMP_ADDRESS_2 = abi.decode(ON_RAMP_ADDRESS_2, (address)); - address internal constant SINGLE_LANE_ON_RAMP_ADDRESS_3 = abi.decode(ON_RAMP_ADDRESS_3, (address)); - - function setUp() public virtual override { - super.setUp(); - - s_prevOffRamp = new EVM2EVMOffRampHelper(); - - NonceManager.PreviousRampsArgs[] memory previousRamps = new NonceManager.PreviousRampsArgs[](1); - previousRamps[0] = NonceManager.PreviousRampsArgs({ - remoteChainSelector: SOURCE_CHAIN_SELECTOR_1, - prevRamps: NonceManager.PreviousRamps(address(0), address(s_prevOffRamp)), - overrideExistingRamps: false - }); - - s_inboundNonceManager.applyPreviousRampsUpdates(previousRamps); - - OffRamp.SourceChainConfigArgs[] memory sourceChainConfigs = new OffRamp.SourceChainConfigArgs[](3); - sourceChainConfigs[0] = OffRamp.SourceChainConfigArgs({ - router: s_destRouter, - sourceChainSelector: SOURCE_CHAIN_SELECTOR_1, - isEnabled: true, - onRamp: ON_RAMP_ADDRESS_1 - }); - sourceChainConfigs[1] = OffRamp.SourceChainConfigArgs({ - router: s_destRouter, - sourceChainSelector: SOURCE_CHAIN_SELECTOR_2, - isEnabled: true, - onRamp: ON_RAMP_ADDRESS_2 - }); - sourceChainConfigs[2] = OffRamp.SourceChainConfigArgs({ - router: s_destRouter, - sourceChainSelector: SOURCE_CHAIN_SELECTOR_3, - isEnabled: true, - onRamp: ON_RAMP_ADDRESS_3 - }); - - _setupMultipleOffRampsFromConfigs(sourceChainConfigs); - - s_offRamp.setVerifyOverrideResult(SOURCE_CHAIN_SELECTOR_1, 1); - s_offRamp.setVerifyOverrideResult(SOURCE_CHAIN_SELECTOR_3, 1); - } - - function test_Upgraded_Success() public { - Internal.Any2EVMRampMessage[] memory messages = - _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); - - vm.recordLogs(); - s_offRamp.executeSingleReport( - _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new OffRamp.GasLimitOverride[](0) - ); - _assertExecutionStateChangedEventLogs( - SOURCE_CHAIN_SELECTOR_1, - messages[0].header.sequenceNumber, - messages[0].header.messageId, - _hashMessage(messages[0], ON_RAMP_ADDRESS_1), - Internal.MessageExecutionState.SUCCESS, - "" - ); - } - - function test_NoPrevOffRampForChain_Success() public { - address[] memory senders = new address[](1); - senders[0] = OWNER; - - uint64 startNonceChain3 = s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_3, abi.encode(senders[0])); - s_prevOffRamp.execute(senders); - - // Nonce unchanged for chain 3 - assertEq(startNonceChain3, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_3, abi.encode(senders[0]))); - - Internal.Any2EVMRampMessage[] memory messagesChain3 = - _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_3, ON_RAMP_ADDRESS_3); - - vm.recordLogs(); - - s_offRamp.executeSingleReport( - _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_3, messagesChain3), new OffRamp.GasLimitOverride[](0) - ); - _assertExecutionStateChangedEventLogs( - SOURCE_CHAIN_SELECTOR_3, - messagesChain3[0].header.sequenceNumber, - messagesChain3[0].header.messageId, - _hashMessage(messagesChain3[0], ON_RAMP_ADDRESS_3), - Internal.MessageExecutionState.SUCCESS, - "" - ); - - assertEq( - startNonceChain3 + 1, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_3, messagesChain3[0].sender) - ); - } - - function test_UpgradedSenderNoncesReadsPreviousRamp_Success() public { - address[] memory senders = new address[](1); - senders[0] = OWNER; - - uint64 startNonce = s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, abi.encode(senders[0])); - - for (uint64 i = 1; i < 4; ++i) { - s_prevOffRamp.execute(senders); - - assertEq(startNonce + i, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, abi.encode(senders[0]))); - } - } - - function test_UpgradedNonceStartsAtV1Nonce_Success() public { - address[] memory senders = new address[](1); - senders[0] = OWNER; - - uint64 startNonce = s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, abi.encode(senders[0])); - s_prevOffRamp.execute(senders); - - assertEq(startNonce + 1, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, abi.encode(senders[0]))); - - Internal.Any2EVMRampMessage[] memory messagesMultiRamp = - _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); - - messagesMultiRamp[0].header.nonce++; - messagesMultiRamp[0].header.messageId = _hashMessage(messagesMultiRamp[0], ON_RAMP_ADDRESS_1); - - vm.recordLogs(); - - s_offRamp.executeSingleReport( - _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messagesMultiRamp), new OffRamp.GasLimitOverride[](0) - ); - - _assertExecutionStateChangedEventLogs( - SOURCE_CHAIN_SELECTOR_1, - messagesMultiRamp[0].header.sequenceNumber, - messagesMultiRamp[0].header.messageId, - _hashMessage(messagesMultiRamp[0], ON_RAMP_ADDRESS_1), - Internal.MessageExecutionState.SUCCESS, - "" - ); - - assertEq( - startNonce + 2, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messagesMultiRamp[0].sender) - ); - - messagesMultiRamp[0].header.nonce++; - messagesMultiRamp[0].header.sequenceNumber++; - messagesMultiRamp[0].header.messageId = _hashMessage(messagesMultiRamp[0], ON_RAMP_ADDRESS_1); - - vm.recordLogs(); - s_offRamp.executeSingleReport( - _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messagesMultiRamp), new OffRamp.GasLimitOverride[](0) - ); - _assertExecutionStateChangedEventLogs( - SOURCE_CHAIN_SELECTOR_1, - messagesMultiRamp[0].header.sequenceNumber, - messagesMultiRamp[0].header.messageId, - _hashMessage(messagesMultiRamp[0], ON_RAMP_ADDRESS_1), - Internal.MessageExecutionState.SUCCESS, - "" - ); - - assertEq( - startNonce + 3, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messagesMultiRamp[0].sender) - ); - } - - function test_UpgradedNonceNewSenderStartsAtZero_Success() public { - address[] memory senders = new address[](1); - senders[0] = OWNER; - - s_prevOffRamp.execute(senders); - - Internal.Any2EVMRampMessage[] memory messagesMultiRamp = - _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); - - bytes memory newSender = abi.encode(address(1234567)); - messagesMultiRamp[0].sender = newSender; - messagesMultiRamp[0].header.messageId = _hashMessage(messagesMultiRamp[0], ON_RAMP_ADDRESS_1); - - // new sender nonce in new offramp should go from 0 -> 1 - assertEq(s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, newSender), 0); - vm.recordLogs(); - s_offRamp.executeSingleReport( - _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messagesMultiRamp), new OffRamp.GasLimitOverride[](0) - ); - _assertExecutionStateChangedEventLogs( - SOURCE_CHAIN_SELECTOR_1, - messagesMultiRamp[0].header.sequenceNumber, - messagesMultiRamp[0].header.messageId, - _hashMessage(messagesMultiRamp[0], ON_RAMP_ADDRESS_1), - Internal.MessageExecutionState.SUCCESS, - "" - ); - assertEq(s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, newSender), 1); - } - - function test_UpgradedOffRampNonceSkipsIfMsgInFlight_Success() public { - Internal.Any2EVMRampMessage[] memory messages = - _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); - - address newSender = address(1234567); - messages[0].sender = abi.encode(newSender); - messages[0].header.nonce = 2; - messages[0].header.messageId = _hashMessage(messages[0], ON_RAMP_ADDRESS_1); - - uint64 startNonce = s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender); - - // new offramp sees msg nonce higher than senderNonce - // it waits for previous offramp to execute - vm.expectEmit(); - emit NonceManager.SkippedIncorrectNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].header.nonce, messages[0].sender); - s_offRamp.executeSingleReport( - _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new OffRamp.GasLimitOverride[](0) - ); - assertEq(startNonce, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender)); - - address[] memory senders = new address[](1); - senders[0] = newSender; - - // previous offramp executes msg and increases nonce - s_prevOffRamp.execute(senders); - assertEq(startNonce + 1, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, abi.encode(senders[0]))); - - messages[0].header.nonce = 2; - messages[0].header.messageId = _hashMessage(messages[0], ON_RAMP_ADDRESS_1); - - // new offramp is able to execute - vm.recordLogs(); - s_offRamp.executeSingleReport( - _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new OffRamp.GasLimitOverride[](0) - ); - - _assertExecutionStateChangedEventLogs( - SOURCE_CHAIN_SELECTOR_1, - messages[0].header.sequenceNumber, - messages[0].header.messageId, - _hashMessage(messages[0], ON_RAMP_ADDRESS_1), - Internal.MessageExecutionState.SUCCESS, - "" - ); - - assertEq(startNonce + 2, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender)); - } -} diff --git a/contracts/src/v0.8/ccip/test/NonceManager/NonceManager.applyPreviousRampsUpdates.t.sol b/contracts/src/v0.8/ccip/test/NonceManager/NonceManager.applyPreviousRampsUpdates.t.sol new file mode 100644 index 00000000000..fe4316423ec --- /dev/null +++ b/contracts/src/v0.8/ccip/test/NonceManager/NonceManager.applyPreviousRampsUpdates.t.sol @@ -0,0 +1,154 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {NonceManager} from "../../NonceManager.sol"; +import {OnRampSetup} from "../onRamp/OnRamp/OnRampSetup.t.sol"; + +contract NonceManager_applyPreviousRampsUpdates is OnRampSetup { + function test_SingleRampUpdate_success() public { + address prevOnRamp = makeAddr("prevOnRamp"); + address prevOffRamp = makeAddr("prevOffRamp"); + NonceManager.PreviousRampsArgs[] memory previousRamps = new NonceManager.PreviousRampsArgs[](1); + previousRamps[0] = NonceManager.PreviousRampsArgs({ + remoteChainSelector: DEST_CHAIN_SELECTOR, + prevRamps: NonceManager.PreviousRamps(prevOnRamp, prevOffRamp), + overrideExistingRamps: false + }); + + vm.expectEmit(); + emit NonceManager.PreviousRampsUpdated(DEST_CHAIN_SELECTOR, previousRamps[0].prevRamps); + + s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); + + _assertPreviousRampsEqual(s_outboundNonceManager.getPreviousRamps(DEST_CHAIN_SELECTOR), previousRamps[0].prevRamps); + } + + function test_MultipleRampsUpdates() public { + address prevOnRamp1 = makeAddr("prevOnRamp1"); + address prevOnRamp2 = makeAddr("prevOnRamp2"); + address prevOffRamp1 = makeAddr("prevOffRamp1"); + address prevOffRamp2 = makeAddr("prevOffRamp2"); + NonceManager.PreviousRampsArgs[] memory previousRamps = new NonceManager.PreviousRampsArgs[](2); + previousRamps[0] = NonceManager.PreviousRampsArgs({ + remoteChainSelector: DEST_CHAIN_SELECTOR, + prevRamps: NonceManager.PreviousRamps(prevOnRamp1, prevOffRamp1), + overrideExistingRamps: false + }); + previousRamps[1] = NonceManager.PreviousRampsArgs({ + remoteChainSelector: DEST_CHAIN_SELECTOR + 1, + prevRamps: NonceManager.PreviousRamps(prevOnRamp2, prevOffRamp2), + overrideExistingRamps: false + }); + + vm.expectEmit(); + emit NonceManager.PreviousRampsUpdated(DEST_CHAIN_SELECTOR, previousRamps[0].prevRamps); + vm.expectEmit(); + emit NonceManager.PreviousRampsUpdated(DEST_CHAIN_SELECTOR + 1, previousRamps[1].prevRamps); + + s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); + + _assertPreviousRampsEqual(s_outboundNonceManager.getPreviousRamps(DEST_CHAIN_SELECTOR), previousRamps[0].prevRamps); + _assertPreviousRampsEqual( + s_outboundNonceManager.getPreviousRamps(DEST_CHAIN_SELECTOR + 1), previousRamps[1].prevRamps + ); + } + + function test_PreviousRampAlreadySet_overrideAllowed() public { + NonceManager.PreviousRampsArgs[] memory previousRamps = new NonceManager.PreviousRampsArgs[](1); + address prevOffRamp = makeAddr("prevOffRamp"); + previousRamps[0] = NonceManager.PreviousRampsArgs({ + remoteChainSelector: DEST_CHAIN_SELECTOR, + prevRamps: NonceManager.PreviousRamps(address(0), prevOffRamp), + overrideExistingRamps: true + }); + + s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); + + previousRamps[0] = NonceManager.PreviousRampsArgs({ + remoteChainSelector: DEST_CHAIN_SELECTOR, + prevRamps: NonceManager.PreviousRamps(address(0), prevOffRamp), + overrideExistingRamps: true + }); + + s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); + } + + function test_ZeroInput() public { + vm.recordLogs(); + s_outboundNonceManager.applyPreviousRampsUpdates(new NonceManager.PreviousRampsArgs[](0)); + + assertEq(vm.getRecordedLogs().length, 0); + } + + function test_applyPreviousRampsUpdates_RevertWhen_PreviousRampAlreadySetOnRamp() public { + NonceManager.PreviousRampsArgs[] memory previousRamps = new NonceManager.PreviousRampsArgs[](1); + address prevOnRamp = makeAddr("prevOnRamp"); + previousRamps[0] = NonceManager.PreviousRampsArgs({ + remoteChainSelector: DEST_CHAIN_SELECTOR, + prevRamps: NonceManager.PreviousRamps(prevOnRamp, address(0)), + overrideExistingRamps: false + }); + + s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); + + previousRamps[0] = NonceManager.PreviousRampsArgs({ + remoteChainSelector: DEST_CHAIN_SELECTOR, + prevRamps: NonceManager.PreviousRamps(prevOnRamp, address(0)), + overrideExistingRamps: false + }); + + vm.expectRevert(NonceManager.PreviousRampAlreadySet.selector); + s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); + } + + function test_applyPreviousRampsUpdates_RevertWhen_PreviousRampAlreadySetOffRamp() public { + NonceManager.PreviousRampsArgs[] memory previousRamps = new NonceManager.PreviousRampsArgs[](1); + address prevOffRamp = makeAddr("prevOffRamp"); + previousRamps[0] = NonceManager.PreviousRampsArgs({ + remoteChainSelector: DEST_CHAIN_SELECTOR, + prevRamps: NonceManager.PreviousRamps(address(0), prevOffRamp), + overrideExistingRamps: false + }); + + s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); + + previousRamps[0] = NonceManager.PreviousRampsArgs({ + remoteChainSelector: DEST_CHAIN_SELECTOR, + prevRamps: NonceManager.PreviousRamps(address(0), prevOffRamp), + overrideExistingRamps: false + }); + + vm.expectRevert(NonceManager.PreviousRampAlreadySet.selector); + s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); + } + + function test_applyPreviousRampsUpdates_RevertWhen_PreviousRampAlreadySetOnRampAndOffRamp_Revert() public { + NonceManager.PreviousRampsArgs[] memory previousRamps = new NonceManager.PreviousRampsArgs[](1); + address prevOnRamp = makeAddr("prevOnRamp"); + address prevOffRamp = makeAddr("prevOffRamp"); + previousRamps[0] = NonceManager.PreviousRampsArgs({ + remoteChainSelector: DEST_CHAIN_SELECTOR, + prevRamps: NonceManager.PreviousRamps(prevOnRamp, prevOffRamp), + overrideExistingRamps: false + }); + + s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); + + previousRamps[0] = NonceManager.PreviousRampsArgs({ + remoteChainSelector: DEST_CHAIN_SELECTOR, + prevRamps: NonceManager.PreviousRamps(prevOnRamp, prevOffRamp), + overrideExistingRamps: false + }); + + vm.expectRevert(NonceManager.PreviousRampAlreadySet.selector); + s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); + } + + function _assertPreviousRampsEqual( + NonceManager.PreviousRamps memory a, + NonceManager.PreviousRamps memory b + ) internal pure { + assertEq(a.prevOnRamp, b.prevOnRamp); + assertEq(a.prevOffRamp, b.prevOffRamp); + } +} diff --git a/contracts/src/v0.8/ccip/test/NonceManager/NonceManager.getInboundNonce.t.sol b/contracts/src/v0.8/ccip/test/NonceManager/NonceManager.getInboundNonce.t.sol new file mode 100644 index 00000000000..4078c3c0d01 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/NonceManager/NonceManager.getInboundNonce.t.sol @@ -0,0 +1,253 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {NonceManager} from "../../NonceManager.sol"; +import {Internal} from "../../libraries/Internal.sol"; +import {OffRamp} from "../../offRamp/OffRamp.sol"; +import {EVM2EVMOffRampHelper} from "../helpers/EVM2EVMOffRampHelper.sol"; +import {OffRampSetup} from "../offRamp/OffRamp/OffRampSetup.t.sol"; + +contract NonceManager_getInboundNonce is OffRampSetup { + EVM2EVMOffRampHelper internal s_prevOffRamp; + + address internal constant SINGLE_LANE_ON_RAMP_ADDRESS_1 = abi.decode(ON_RAMP_ADDRESS_1, (address)); + address internal constant SINGLE_LANE_ON_RAMP_ADDRESS_2 = abi.decode(ON_RAMP_ADDRESS_2, (address)); + address internal constant SINGLE_LANE_ON_RAMP_ADDRESS_3 = abi.decode(ON_RAMP_ADDRESS_3, (address)); + + function setUp() public virtual override { + super.setUp(); + + s_prevOffRamp = new EVM2EVMOffRampHelper(); + + NonceManager.PreviousRampsArgs[] memory previousRamps = new NonceManager.PreviousRampsArgs[](1); + previousRamps[0] = NonceManager.PreviousRampsArgs({ + remoteChainSelector: SOURCE_CHAIN_SELECTOR_1, + prevRamps: NonceManager.PreviousRamps(address(0), address(s_prevOffRamp)), + overrideExistingRamps: false + }); + + s_inboundNonceManager.applyPreviousRampsUpdates(previousRamps); + + OffRamp.SourceChainConfigArgs[] memory sourceChainConfigs = new OffRamp.SourceChainConfigArgs[](3); + sourceChainConfigs[0] = OffRamp.SourceChainConfigArgs({ + router: s_destRouter, + sourceChainSelector: SOURCE_CHAIN_SELECTOR_1, + isEnabled: true, + onRamp: ON_RAMP_ADDRESS_1 + }); + sourceChainConfigs[1] = OffRamp.SourceChainConfigArgs({ + router: s_destRouter, + sourceChainSelector: SOURCE_CHAIN_SELECTOR_2, + isEnabled: true, + onRamp: ON_RAMP_ADDRESS_2 + }); + sourceChainConfigs[2] = OffRamp.SourceChainConfigArgs({ + router: s_destRouter, + sourceChainSelector: SOURCE_CHAIN_SELECTOR_3, + isEnabled: true, + onRamp: ON_RAMP_ADDRESS_3 + }); + + _setupMultipleOffRampsFromConfigs(sourceChainConfigs); + + s_offRamp.setVerifyOverrideResult(SOURCE_CHAIN_SELECTOR_1, 1); + s_offRamp.setVerifyOverrideResult(SOURCE_CHAIN_SELECTOR_3, 1); + } + + function test_getInboundNonce_Upgraded() public { + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + + vm.recordLogs(); + s_offRamp.executeSingleReport( + _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new OffRamp.GasLimitOverride[](0) + ); + _assertExecutionStateChangedEventLogs( + SOURCE_CHAIN_SELECTOR_1, + messages[0].header.sequenceNumber, + messages[0].header.messageId, + _hashMessage(messages[0], ON_RAMP_ADDRESS_1), + Internal.MessageExecutionState.SUCCESS, + "" + ); + } + + function test_getInboundNonce_NoPrevOffRampForChain() public { + address[] memory senders = new address[](1); + senders[0] = OWNER; + + uint64 startNonceChain3 = s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_3, abi.encode(senders[0])); + s_prevOffRamp.execute(senders); + + // Nonce unchanged for chain 3 + assertEq(startNonceChain3, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_3, abi.encode(senders[0]))); + + Internal.Any2EVMRampMessage[] memory messagesChain3 = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_3, ON_RAMP_ADDRESS_3); + + vm.recordLogs(); + + s_offRamp.executeSingleReport( + _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_3, messagesChain3), new OffRamp.GasLimitOverride[](0) + ); + _assertExecutionStateChangedEventLogs( + SOURCE_CHAIN_SELECTOR_3, + messagesChain3[0].header.sequenceNumber, + messagesChain3[0].header.messageId, + _hashMessage(messagesChain3[0], ON_RAMP_ADDRESS_3), + Internal.MessageExecutionState.SUCCESS, + "" + ); + + assertEq( + startNonceChain3 + 1, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_3, messagesChain3[0].sender) + ); + } + + function test_getInboundNonce_UpgradedSenderNoncesReadsPreviousRamp() public { + address[] memory senders = new address[](1); + senders[0] = OWNER; + + uint64 startNonce = s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, abi.encode(senders[0])); + + for (uint64 i = 1; i < 4; ++i) { + s_prevOffRamp.execute(senders); + + assertEq(startNonce + i, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, abi.encode(senders[0]))); + } + } + + function test_getInboundNonce_UpgradedNonceStartsAtV1Nonce() public { + address[] memory senders = new address[](1); + senders[0] = OWNER; + + uint64 startNonce = s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, abi.encode(senders[0])); + s_prevOffRamp.execute(senders); + + assertEq(startNonce + 1, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, abi.encode(senders[0]))); + + Internal.Any2EVMRampMessage[] memory messagesMultiRamp = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + + messagesMultiRamp[0].header.nonce++; + messagesMultiRamp[0].header.messageId = _hashMessage(messagesMultiRamp[0], ON_RAMP_ADDRESS_1); + + vm.recordLogs(); + + s_offRamp.executeSingleReport( + _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messagesMultiRamp), new OffRamp.GasLimitOverride[](0) + ); + + _assertExecutionStateChangedEventLogs( + SOURCE_CHAIN_SELECTOR_1, + messagesMultiRamp[0].header.sequenceNumber, + messagesMultiRamp[0].header.messageId, + _hashMessage(messagesMultiRamp[0], ON_RAMP_ADDRESS_1), + Internal.MessageExecutionState.SUCCESS, + "" + ); + + assertEq( + startNonce + 2, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messagesMultiRamp[0].sender) + ); + + messagesMultiRamp[0].header.nonce++; + messagesMultiRamp[0].header.sequenceNumber++; + messagesMultiRamp[0].header.messageId = _hashMessage(messagesMultiRamp[0], ON_RAMP_ADDRESS_1); + + vm.recordLogs(); + s_offRamp.executeSingleReport( + _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messagesMultiRamp), new OffRamp.GasLimitOverride[](0) + ); + _assertExecutionStateChangedEventLogs( + SOURCE_CHAIN_SELECTOR_1, + messagesMultiRamp[0].header.sequenceNumber, + messagesMultiRamp[0].header.messageId, + _hashMessage(messagesMultiRamp[0], ON_RAMP_ADDRESS_1), + Internal.MessageExecutionState.SUCCESS, + "" + ); + + assertEq( + startNonce + 3, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messagesMultiRamp[0].sender) + ); + } + + function test_getInboundNonce_UpgradedNonceNewSenderStartsAtZero() public { + address[] memory senders = new address[](1); + senders[0] = OWNER; + + s_prevOffRamp.execute(senders); + + Internal.Any2EVMRampMessage[] memory messagesMultiRamp = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + + bytes memory newSender = abi.encode(address(1234567)); + messagesMultiRamp[0].sender = newSender; + messagesMultiRamp[0].header.messageId = _hashMessage(messagesMultiRamp[0], ON_RAMP_ADDRESS_1); + + // new sender nonce in new offRamp should go from 0 -> 1 + assertEq(s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, newSender), 0); + vm.recordLogs(); + s_offRamp.executeSingleReport( + _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messagesMultiRamp), new OffRamp.GasLimitOverride[](0) + ); + _assertExecutionStateChangedEventLogs( + SOURCE_CHAIN_SELECTOR_1, + messagesMultiRamp[0].header.sequenceNumber, + messagesMultiRamp[0].header.messageId, + _hashMessage(messagesMultiRamp[0], ON_RAMP_ADDRESS_1), + Internal.MessageExecutionState.SUCCESS, + "" + ); + assertEq(s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, newSender), 1); + } + + function test_getInboundNonce_UpgradedOffRampNonceSkipsIfMsgInFlight() public { + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + + address newSender = address(1234567); + messages[0].sender = abi.encode(newSender); + messages[0].header.nonce = 2; + messages[0].header.messageId = _hashMessage(messages[0], ON_RAMP_ADDRESS_1); + + uint64 startNonce = s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender); + + // new offRamp sees msg nonce higher than senderNonce + // it waits for previous offRamp to execute + vm.expectEmit(); + emit NonceManager.SkippedIncorrectNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].header.nonce, messages[0].sender); + s_offRamp.executeSingleReport( + _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new OffRamp.GasLimitOverride[](0) + ); + assertEq(startNonce, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender)); + + address[] memory senders = new address[](1); + senders[0] = newSender; + + // previous offRamp executes msg and increases nonce + s_prevOffRamp.execute(senders); + assertEq(startNonce + 1, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, abi.encode(senders[0]))); + + messages[0].header.nonce = 2; + messages[0].header.messageId = _hashMessage(messages[0], ON_RAMP_ADDRESS_1); + + // new offRamp is able to execute + vm.recordLogs(); + s_offRamp.executeSingleReport( + _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new OffRamp.GasLimitOverride[](0) + ); + + _assertExecutionStateChangedEventLogs( + SOURCE_CHAIN_SELECTOR_1, + messages[0].header.sequenceNumber, + messages[0].header.messageId, + _hashMessage(messages[0], ON_RAMP_ADDRESS_1), + Internal.MessageExecutionState.SUCCESS, + "" + ); + + assertEq(startNonce + 2, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender)); + } +} diff --git a/contracts/src/v0.8/ccip/test/NonceManager/NonceManager.getIncrementedOutboundNonce.t.sol b/contracts/src/v0.8/ccip/test/NonceManager/NonceManager.getIncrementedOutboundNonce.t.sol new file mode 100644 index 00000000000..1ac25d6c31f --- /dev/null +++ b/contracts/src/v0.8/ccip/test/NonceManager/NonceManager.getIncrementedOutboundNonce.t.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {NonceManager} from "../../NonceManager.sol"; +import {BaseTest} from "../BaseTest.t.sol"; + +contract NonceManager_getIncrementedOutboundNonce is BaseTest { + NonceManager private s_nonceManager; + + function setUp() public override { + address[] memory authorizedCallers = new address[](1); + authorizedCallers[0] = address(this); + s_nonceManager = new NonceManager(authorizedCallers); + } + + function test_getIncrementedOutboundNonce() public { + address sender = address(this); + + assertEq(s_nonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, sender), 0); + + uint64 outboundNonce = s_nonceManager.getIncrementedOutboundNonce(DEST_CHAIN_SELECTOR, sender); + assertEq(outboundNonce, 1); + } + + function test_incrementInboundNonce() public { + address sender = address(this); + + s_nonceManager.incrementInboundNonce(SOURCE_CHAIN_SELECTOR, 1, abi.encode(sender)); + + assertEq(s_nonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR, abi.encode(sender)), 1); + } + + function test_incrementInboundNonce_SkippedIncorrectNonce() public { + address sender = address(this); + uint64 expectedNonce = 2; + + vm.expectEmit(); + emit NonceManager.SkippedIncorrectNonce(SOURCE_CHAIN_SELECTOR, expectedNonce, abi.encode(sender)); + + s_nonceManager.incrementInboundNonce(SOURCE_CHAIN_SELECTOR, expectedNonce, abi.encode(sender)); + + assertEq(s_nonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR, abi.encode(sender)), 0); + } + + function test_incrementNoncesInboundAndOutbound() public { + address sender = address(this); + + assertEq(s_nonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, sender), 0); + uint64 outboundNonce = s_nonceManager.getIncrementedOutboundNonce(DEST_CHAIN_SELECTOR, sender); + assertEq(outboundNonce, 1); + + // Inbound nonce unchanged + assertEq(s_nonceManager.getInboundNonce(DEST_CHAIN_SELECTOR, abi.encode(sender)), 0); + + s_nonceManager.incrementInboundNonce(DEST_CHAIN_SELECTOR, 1, abi.encode(sender)); + assertEq(s_nonceManager.getInboundNonce(DEST_CHAIN_SELECTOR, abi.encode(sender)), 1); + + // Outbound nonce unchanged + assertEq(s_nonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, sender), 1); + } +} diff --git a/contracts/src/v0.8/ccip/test/NonceManager/NonceManager.getOutboundNonce.t.sol b/contracts/src/v0.8/ccip/test/NonceManager/NonceManager.getOutboundNonce.t.sol new file mode 100644 index 00000000000..2fe02bfb59d --- /dev/null +++ b/contracts/src/v0.8/ccip/test/NonceManager/NonceManager.getOutboundNonce.t.sol @@ -0,0 +1,102 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {IEVM2AnyOnRamp} from "../../interfaces/IEVM2AnyOnRamp.sol"; + +import {NonceManager} from "../../NonceManager.sol"; +import {Client} from "../../libraries/Client.sol"; +import {OnRamp} from "../../onRamp/OnRamp.sol"; +import {OnRampHelper} from "../helpers/OnRampHelper.sol"; +import {OnRampSetup} from "../onRamp/OnRamp/OnRampSetup.t.sol"; + +contract NonceManager_getOutboundNonce is OnRampSetup { + uint256 internal constant FEE_AMOUNT = 1234567890; + OnRampHelper internal s_prevOnRamp; + + function setUp() public virtual override { + super.setUp(); + + (s_prevOnRamp,) = _deployOnRamp( + SOURCE_CHAIN_SELECTOR, s_sourceRouter, address(s_outboundNonceManager), address(s_tokenAdminRegistry) + ); + + // Since the previous onRamp is not a 1.5 ramp it doesn't have the getSenderNonce function. We mock it to return 0 + vm.mockCall(address(s_prevOnRamp), abi.encodeWithSelector(IEVM2AnyOnRamp.getSenderNonce.selector), abi.encode(0)); + + NonceManager.PreviousRampsArgs[] memory previousRamps = new NonceManager.PreviousRampsArgs[](1); + previousRamps[0] = NonceManager.PreviousRampsArgs({ + remoteChainSelector: DEST_CHAIN_SELECTOR, + prevRamps: NonceManager.PreviousRamps(address(s_prevOnRamp), address(0)), + overrideExistingRamps: false + }); + s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); + + (s_onRamp, s_metadataHash) = _deployOnRamp( + SOURCE_CHAIN_SELECTOR, s_sourceRouter, address(s_outboundNonceManager), address(s_tokenAdminRegistry) + ); + + vm.startPrank(address(s_sourceRouter)); + } + + function test_getOutboundNonce_Upgrade() public { + Client.EVM2AnyMessage memory message = _generateEmptyMessage(); + + vm.expectEmit(); + emit OnRamp.CCIPMessageSent(DEST_CHAIN_SELECTOR, 1, _messageToEvent(message, 1, 1, FEE_AMOUNT, OWNER)); + + s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, FEE_AMOUNT, OWNER); + } + + function test_getOutboundNonce_UpgradeSenderNoncesReadsPreviousRamp() public { + Client.EVM2AnyMessage memory message = _generateEmptyMessage(); + uint64 startNonce = s_outboundNonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER); + uint64 prevRampNextOutboundNonce = IEVM2AnyOnRamp(address(s_prevOnRamp)).getSenderNonce(OWNER); + + assertEq(startNonce, prevRampNextOutboundNonce); + + for (uint64 i = 1; i < 4; ++i) { + s_prevOnRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 0, OWNER); + + assertEq(startNonce + i, s_outboundNonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER)); + } + } + + function test_getOutboundNonce_UpgradeNonceStartsAtV1Nonce() public { + Client.EVM2AnyMessage memory message = _generateEmptyMessage(); + + uint64 startNonce = s_outboundNonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER); + + // send 1 message from previous onRamp + s_prevOnRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, FEE_AMOUNT, OWNER); + + assertEq(startNonce + 1, s_outboundNonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER)); + + // new onRamp nonce should start from 2, while sequence number start from 1 + vm.expectEmit(); + emit OnRamp.CCIPMessageSent(DEST_CHAIN_SELECTOR, 1, _messageToEvent(message, 1, startNonce + 2, FEE_AMOUNT, OWNER)); + s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, FEE_AMOUNT, OWNER); + + assertEq(startNonce + 2, s_outboundNonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER)); + + // after another send, nonce should be 3, and sequence number be 2 + vm.expectEmit(); + emit OnRamp.CCIPMessageSent(DEST_CHAIN_SELECTOR, 2, _messageToEvent(message, 2, startNonce + 3, FEE_AMOUNT, OWNER)); + s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, FEE_AMOUNT, OWNER); + + assertEq(startNonce + 3, s_outboundNonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER)); + } + + function test_getOutboundNonce_UpgradeNonceNewSenderStartsAtZero() public { + Client.EVM2AnyMessage memory message = _generateEmptyMessage(); + + // send 1 message from previous onRamp from OWNER + s_prevOnRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, FEE_AMOUNT, OWNER); + + address newSender = address(1234567); + // new onRamp nonce should start from 1 for new sender + vm.expectEmit(); + emit OnRamp.CCIPMessageSent(DEST_CHAIN_SELECTOR, 1, _messageToEvent(message, 1, 1, FEE_AMOUNT, newSender)); + + s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, FEE_AMOUNT, newSender); + } +} diff --git a/contracts/src/v0.8/ccip/test/capability/CCIPHome/CCIPHome.applyChainConfigUpdates.t.sol b/contracts/src/v0.8/ccip/test/capability/CCIPHome/CCIPHome.applyChainConfigUpdates.t.sol index 1d2c3a70895..9bf096b9551 100644 --- a/contracts/src/v0.8/ccip/test/capability/CCIPHome/CCIPHome.applyChainConfigUpdates.t.sol +++ b/contracts/src/v0.8/ccip/test/capability/CCIPHome/CCIPHome.applyChainConfigUpdates.t.sol @@ -109,6 +109,7 @@ contract CCIPHome_applyChainConfigUpdates is CCIPHomeTestSetup { function test_applyChainConfigUpdates_removeChainConfigs_Success() public { bytes32[] memory chainReaders = new bytes32[](1); chainReaders[0] = keccak256(abi.encode(1)); + CCIPHome.ChainConfigArgs[] memory adds = new CCIPHome.ChainConfigArgs[](2); adds[0] = CCIPHome.ChainConfigArgs({ chainSelector: 1, @@ -130,6 +131,7 @@ contract CCIPHome_applyChainConfigUpdates is CCIPHomeTestSetup { workflowDONId: uint32(1), capabilitiesDONIds: new uint256[](0) }); + vm.mockCall( CAPABILITIES_REGISTRY, abi.encodeWithSelector(INodeInfoProvider.getNodesByP2PIds.selector, chainReaders), @@ -140,10 +142,14 @@ contract CCIPHome_applyChainConfigUpdates is CCIPHomeTestSetup { emit CCIPHome.ChainConfigSet(1, adds[0].chainConfig); vm.expectEmit(); emit CCIPHome.ChainConfigSet(2, adds[1].chainConfig); + s_ccipHome.applyChainConfigUpdates(new uint64[](0), adds); assertEq(s_ccipHome.getNumChainConfigurations(), 2, "total chain configs must be 2"); + assertEq(s_ccipHome.getChainConfig(adds[0].chainSelector).config, adds[0].chainConfig.config); + assertEq(s_ccipHome.getChainConfig(adds[1].chainSelector).config, adds[1].chainConfig.config); + uint64[] memory removes = new uint64[](1); removes[0] = uint64(1); diff --git a/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRamp.afterOC3ConfigSet.t.sol b/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRamp.afterOC3ConfigSet.t.sol index 91694dbcb05..d2edb7a261a 100644 --- a/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRamp.afterOC3ConfigSet.t.sol +++ b/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRamp.afterOC3ConfigSet.t.sol @@ -12,6 +12,7 @@ contract OffRamp_afterOC3ConfigSet is OffRampSetup { s_offRamp = new OffRampHelper( OffRamp.StaticConfig({ chainSelector: DEST_CHAIN_SELECTOR, + gasForCallExactCheck: GAS_FOR_CALL_EXACT_CHECK, rmnRemote: s_mockRMNRemote, tokenAdminRegistry: address(s_tokenAdminRegistry), nonceManager: address(s_inboundNonceManager) diff --git a/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRamp.constructor.t.sol b/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRamp.constructor.t.sol index bd7bb94344c..d31b7939d9c 100644 --- a/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRamp.constructor.t.sol +++ b/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRamp.constructor.t.sol @@ -13,6 +13,7 @@ contract OffRamp_constructor is OffRampSetup { function test_Constructor_Success() public { OffRamp.StaticConfig memory staticConfig = OffRamp.StaticConfig({ chainSelector: DEST_CHAIN_SELECTOR, + gasForCallExactCheck: GAS_FOR_CALL_EXACT_CHECK, rmnRemote: s_mockRMNRemote, tokenAdminRegistry: address(s_tokenAdminRegistry), nonceManager: address(s_inboundNonceManager) @@ -142,6 +143,7 @@ contract OffRamp_constructor is OffRampSetup { s_offRamp = new OffRampHelper( OffRamp.StaticConfig({ chainSelector: DEST_CHAIN_SELECTOR, + gasForCallExactCheck: GAS_FOR_CALL_EXACT_CHECK, rmnRemote: s_mockRMNRemote, tokenAdminRegistry: address(s_tokenAdminRegistry), nonceManager: address(s_inboundNonceManager) @@ -168,6 +170,7 @@ contract OffRamp_constructor is OffRampSetup { s_offRamp = new OffRampHelper( OffRamp.StaticConfig({ chainSelector: DEST_CHAIN_SELECTOR, + gasForCallExactCheck: GAS_FOR_CALL_EXACT_CHECK, rmnRemote: s_mockRMNRemote, tokenAdminRegistry: address(s_tokenAdminRegistry), nonceManager: address(s_inboundNonceManager) @@ -188,6 +191,7 @@ contract OffRamp_constructor is OffRampSetup { s_offRamp = new OffRampHelper( OffRamp.StaticConfig({ chainSelector: DEST_CHAIN_SELECTOR, + gasForCallExactCheck: GAS_FOR_CALL_EXACT_CHECK, rmnRemote: IRMNRemote(address(0)), tokenAdminRegistry: address(s_tokenAdminRegistry), nonceManager: address(s_inboundNonceManager) @@ -208,6 +212,7 @@ contract OffRamp_constructor is OffRampSetup { s_offRamp = new OffRampHelper( OffRamp.StaticConfig({ chainSelector: 0, + gasForCallExactCheck: GAS_FOR_CALL_EXACT_CHECK, rmnRemote: s_mockRMNRemote, tokenAdminRegistry: address(s_tokenAdminRegistry), nonceManager: address(s_inboundNonceManager) @@ -228,6 +233,7 @@ contract OffRamp_constructor is OffRampSetup { s_offRamp = new OffRampHelper( OffRamp.StaticConfig({ chainSelector: DEST_CHAIN_SELECTOR, + gasForCallExactCheck: GAS_FOR_CALL_EXACT_CHECK, rmnRemote: s_mockRMNRemote, tokenAdminRegistry: address(0), nonceManager: address(s_inboundNonceManager) @@ -248,6 +254,7 @@ contract OffRamp_constructor is OffRampSetup { s_offRamp = new OffRampHelper( OffRamp.StaticConfig({ chainSelector: DEST_CHAIN_SELECTOR, + gasForCallExactCheck: GAS_FOR_CALL_EXACT_CHECK, rmnRemote: s_mockRMNRemote, tokenAdminRegistry: address(s_tokenAdminRegistry), nonceManager: address(0) diff --git a/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRamp.executeSingleMessage.t.sol b/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRamp.executeSingleMessage.t.sol index 727a7c63bb1..20b711f529e 100644 --- a/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRamp.executeSingleMessage.t.sol +++ b/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRamp.executeSingleMessage.t.sol @@ -36,7 +36,7 @@ contract OffRamp_executeSingleMessage is OffRampSetup { abi.encodeWithSelector( IRouter.routeMessage.selector, expectedAny2EvmMessage, - Internal.GAS_FOR_CALL_EXACT_CHECK, + GAS_FOR_CALL_EXACT_CHECK, message.gasLimit, message.receiver ) diff --git a/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRampSetup.t.sol b/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRampSetup.t.sol index 858ee9e4a45..f8b70ebf283 100644 --- a/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRampSetup.t.sol +++ b/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRampSetup.t.sol @@ -70,6 +70,7 @@ contract OffRampSetup is FeeQuoterSetup, MultiOCR3BaseSetup { OffRamp.StaticConfig({ chainSelector: DEST_CHAIN_SELECTOR, rmnRemote: rmnRemote, + gasForCallExactCheck: GAS_FOR_CALL_EXACT_CHECK, tokenAdminRegistry: address(s_tokenAdminRegistry), nonceManager: address(nonceManager) }), @@ -348,6 +349,7 @@ contract OffRampSetup is FeeQuoterSetup, MultiOCR3BaseSetup { s_offRamp = new OffRampHelper( OffRamp.StaticConfig({ chainSelector: DEST_CHAIN_SELECTOR, + gasForCallExactCheck: GAS_FOR_CALL_EXACT_CHECK, rmnRemote: s_mockRMNRemote, tokenAdminRegistry: address(s_tokenAdminRegistry), nonceManager: address(s_inboundNonceManager) diff --git a/contracts/src/v0.8/ccip/test/router/Router/Router.applyRampUpdates.t.sol b/contracts/src/v0.8/ccip/test/router/Router/Router.applyRampUpdates.t.sol index 9b46741f96d..be0999542ea 100644 --- a/contracts/src/v0.8/ccip/test/router/Router/Router.applyRampUpdates.t.sol +++ b/contracts/src/v0.8/ccip/test/router/Router/Router.applyRampUpdates.t.sol @@ -38,7 +38,7 @@ contract Router_applyRampUpdates is RouterSetup { ); } - function testFuzz_OffRampUpdates( + function testFuzz_applyRampUpdates_OffRampUpdates( address[20] memory offRampsInput ) public { Router.OffRamp[] memory offRamps = new Router.OffRamp[](20); @@ -72,7 +72,7 @@ contract Router_applyRampUpdates is RouterSetup { } } - function test_OffRampUpdatesWithRouting() public { + function test_applyRampUpdates_OffRampUpdatesWithRouting() public { // Explicitly construct chain selectors and ramp addresses so we have ramp uniqueness for the various test scenarios. uint256 numberOfSelectors = 10; uint64[] memory sourceChainSelectors = new uint64[](numberOfSelectors); @@ -219,7 +219,7 @@ contract Router_applyRampUpdates is RouterSetup { } } - function testFuzz_OnRampUpdates( + function testFuzz_applyRampUpdates_OnRampUpdates( Router.OnRamp[] memory onRamps ) public { // Test adding onRamps @@ -244,7 +244,7 @@ contract Router_applyRampUpdates is RouterSetup { } } - function test_OnRampDisable() public { + function test_applyRampUpdates_OnRampDisable() public { // Add onRamp Router.OnRamp[] memory onRampUpdates = new Router.OnRamp[](1); Router.OffRamp[] memory offRampUpdates = new Router.OffRamp[](0); @@ -267,7 +267,7 @@ contract Router_applyRampUpdates is RouterSetup { assertTrue(s_sourceRouter.isChainSupported(DEST_CHAIN_SELECTOR)); } - function test_OnlyOwner_Revert() public { + function test_applyRampUpdates_RevertWhen_OnlyOwner() public { vm.stopPrank(); vm.expectRevert("Only callable by owner"); Router.OnRamp[] memory onRampUpdates = new Router.OnRamp[](0); @@ -275,7 +275,7 @@ contract Router_applyRampUpdates is RouterSetup { s_sourceRouter.applyRampUpdates(onRampUpdates, offRampUpdates, offRampUpdates); } - function test_OffRampMismatch_Revert() public { + function test_applyRampUpdates_RevertWhen_OffRampMismatch() public { address offRamp = address(uint160(2)); Router.OnRamp[] memory onRampUpdates = new Router.OnRamp[](0); diff --git a/contracts/src/v0.8/shared/token/ERC20/BurnMintERC20.sol b/contracts/src/v0.8/shared/token/ERC20/BurnMintERC20.sol index 946a6623b49..ea11dc08798 100644 --- a/contracts/src/v0.8/shared/token/ERC20/BurnMintERC20.sol +++ b/contracts/src/v0.8/shared/token/ERC20/BurnMintERC20.sol @@ -13,7 +13,6 @@ import {IERC165} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/ut /// @notice A basic ERC20 compatible token contract with burn and minting roles. /// @dev The total supply can be limited during deployment. -/// @dev This contract has not been audited and is not yet approved for production use. contract BurnMintERC20 is IBurnMintERC20, IGetCCIPAdmin, IERC165, ERC20Burnable, AccessControl { error MaxSupplyExceeded(uint256 supplyAfterMint); error InvalidRecipient(address recipient); @@ -153,7 +152,7 @@ contract BurnMintERC20 is IBurnMintERC20, IGetCCIPAdmin, IERC165, ERC20Burnable, /// @dev only the owner can call this function, NOT the current ccipAdmin, and 1-step ownership transfer is used. /// @param newAdmin The address to transfer the CCIPAdmin role to. Setting to address(0) is a valid way to revoke /// the role - function setCCIPAdmin(address newAdmin) public onlyRole(DEFAULT_ADMIN_ROLE) { + function setCCIPAdmin(address newAdmin) external onlyRole(DEFAULT_ADMIN_ROLE) { address currentAdmin = s_ccipAdmin; s_ccipAdmin = newAdmin; diff --git a/contracts/src/v0.8/workflow/dev/WorkflowRegistry.sol b/contracts/src/v0.8/workflow/dev/WorkflowRegistry.sol index 0e6ae3450ac..2454374b2fb 100644 --- a/contracts/src/v0.8/workflow/dev/WorkflowRegistry.sol +++ b/contracts/src/v0.8/workflow/dev/WorkflowRegistry.sol @@ -43,6 +43,8 @@ contract WorkflowRegistry is Ownable2StepMsgSender, ITypeAndVersion { /// @dev Mapping to track workflows by secretsURL hash (owner + secretsURL). /// This is used to find all workflows that have the same secretsURL when a force secrets update event is requested. mapping(bytes32 secretsURLHash => EnumerableSet.Bytes32Set workflowKeys) private s_secretsHashToWorkflows; + /// @dev Keep track of all workflowIDs to ensure uniqueness. + mapping(bytes32 workflowID => bool inUse) private s_workflowIDs; /// @dev List of all authorized EOAs/contracts allowed to access this contract's state functions. All view functions are open access. EnumerableSet.AddressSet private s_authorizedAddresses; @@ -203,13 +205,15 @@ contract WorkflowRegistry is Ownable2StepMsgSender, ITypeAndVersion { ) external registryNotLocked { _validatePermissions(donID, msg.sender); _validateWorkflowName(bytes(workflowName).length); - _validateWorkflowMetadata(workflowID, bytes(binaryURL).length, bytes(configURL).length, bytes(secretsURL).length); + _validateWorkflowURLs(bytes(binaryURL).length, bytes(configURL).length, bytes(secretsURL).length); bytes32 workflowKey = computeHashKey(msg.sender, workflowName); if (s_workflows[workflowKey].owner != address(0)) { revert WorkflowAlreadyRegistered(); } + _requireUniqueWorkflowID(workflowID); + // Create new workflow entry s_workflows[workflowKey] = WorkflowMetadata({ workflowID: workflowID, @@ -272,7 +276,7 @@ contract WorkflowRegistry is Ownable2StepMsgSender, ITypeAndVersion { string calldata configURL, string calldata secretsURL ) external registryNotLocked { - _validateWorkflowMetadata(newWorkflowID, bytes(binaryURL).length, bytes(configURL).length, bytes(secretsURL).length); + _validateWorkflowURLs(bytes(binaryURL).length, bytes(configURL).length, bytes(secretsURL).length); WorkflowMetadata storage workflow = _getWorkflowFromStorage(msg.sender, workflowKey); @@ -295,6 +299,12 @@ contract WorkflowRegistry is Ownable2StepMsgSender, ITypeAndVersion { revert WorkflowContentNotUpdated(); } + // Ensure the new workflowID is unique + _requireUniqueWorkflowID(newWorkflowID); + + // Free the old workflowID + s_workflowIDs[currentWorkflowID] = false; + // Update all fields that have changed and the relevant sets workflow.workflowID = newWorkflowID; if (!sameBinaryURL) { @@ -387,6 +397,9 @@ contract WorkflowRegistry is Ownable2StepMsgSender, ITypeAndVersion { revert AddressNotAuthorized(msg.sender); } + // Release the workflowID for reuse + s_workflowIDs[workflow.workflowID] = false; + // Remove the workflow from the owner and DON mappings s_ownerWorkflowKeys[msg.sender].remove(workflowKey); s_donWorkflowKeys[workflow.donID].remove(workflowKey); @@ -508,6 +521,20 @@ contract WorkflowRegistry is Ownable2StepMsgSender, ITypeAndVersion { return workflow; } + /// @notice Ensures the given workflowID is unique and marks it as used. + /// @param workflowID The workflowID to validate and consume. + function _requireUniqueWorkflowID( + bytes32 workflowID + ) internal { + if (workflowID == bytes32(0)) revert InvalidWorkflowID(); + + if (s_workflowIDs[workflowID]) { + revert WorkflowIDAlreadyExists(); + } + + s_workflowIDs[workflowID] = true; + } + // ================================================================ // | Workflow Queries | // ================================================================ @@ -636,16 +663,12 @@ contract WorkflowRegistry is Ownable2StepMsgSender, ITypeAndVersion { // | Validation | // ================================================================ - /// @dev Internal function to validate the metadata for a workflow. - /// @param workflowID The unique identifier for the workflow. - function _validateWorkflowMetadata( - bytes32 workflowID, + /// @dev Internal function to validate the urls for a workflow. + function _validateWorkflowURLs( uint256 binaryURLLength, uint256 configURLLength, uint256 secretsURLLength ) internal pure { - if (workflowID == bytes32(0)) revert InvalidWorkflowID(); - if (binaryURLLength > MAX_URL_LENGTH) { revert URLTooLong(binaryURLLength, MAX_URL_LENGTH); } diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.registerWorkflow.t.sol b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.registerWorkflow.t.sol index 426fbfcc502..859437196cd 100644 --- a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.registerWorkflow.t.sol +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.registerWorkflow.t.sol @@ -138,6 +138,35 @@ contract WorkflowRegistry_registerWorkflow is WorkflowRegistrySetup { ); } + // whenTheCallerIsAnAuthorizedAddress whenTheRegistryIsNotLocked whenTheDonIDIsAllowed + function test_RevertWhen_TheWorkflowIDIsAlreadyInUsedByAnotherWorkflow() external { + vm.startPrank(s_authorizedAddress); + + // Register a valid workflow first + s_registry.registerWorkflow( + s_validWorkflowName, + s_validWorkflowID, + s_allowedDonID, + WorkflowRegistry.WorkflowStatus.ACTIVE, + s_validBinaryURL, + s_validConfigURL, + s_validSecretsURL + ); + + vm.expectRevert(WorkflowRegistry.WorkflowIDAlreadyExists.selector); + s_registry.registerWorkflow( + "ValidWorkflow2", + s_validWorkflowID, + s_allowedDonID, + WorkflowRegistry.WorkflowStatus.ACTIVE, + s_validBinaryURL, + s_validConfigURL, + s_validSecretsURL + ); + + vm.stopPrank(); + } + // whenTheCallerIsAnAuthorizedAddress whenTheRegistryIsNotLocked whenTheDonIDIsAllowed function test_RevertWhen_TheWorkflowNameIsAlreadyUsedByTheOwner() external { vm.startPrank(s_authorizedAddress); diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.registerWorkflow.tree b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.registerWorkflow.tree index 75cdf940575..eabbf58d464 100644 --- a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.registerWorkflow.tree +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.registerWorkflow.tree @@ -18,6 +18,8 @@ WorkflowRegistry.registerWorkflow │ └── it should revert ├── when the workflowID is invalid │ └── it should revert + ├── when the workflowID is already in used by another workflow + │ └── it should revert ├── when the workflow name is already used by the owner │ └── it should revert └── when the workflow inputs are all valid diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.updateWorkflow.t.sol b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.updateWorkflow.t.sol index 5058512ba7b..4082874a91e 100644 --- a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.updateWorkflow.t.sol +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.updateWorkflow.t.sol @@ -158,6 +158,32 @@ contract WorkflowRegistry_updateWorkflow is WorkflowRegistrySetup { s_registry.updateWorkflow(s_validWorkflowKey, bytes32(0), s_validBinaryURL, s_validConfigURL, s_newValidSecretsURL); } + // whenTheCallerIsAnAuthorizedAddress whenTheRegistryIsNotLocked whenTheDonIDIsAllowed whenTheCallerIsTheWorkflowOwner + function test_RevertWhen_TheWorkflowIDIsAlreadyInUsedByAnotherWorkflow() external { + // Register a workflow first + _registerValidWorkflow(); + + // Register another workflow with another workflow ID + vm.startPrank(s_authorizedAddress); + s_registry.registerWorkflow( + "ValidWorkflow2", + s_newValidWorkflowID, + s_allowedDonID, + WorkflowRegistry.WorkflowStatus.ACTIVE, + s_validBinaryURL, + s_validConfigURL, + s_validSecretsURL + ); + + // Update the workflow with a workflow ID that is already in use by another workflow. + vm.expectRevert(WorkflowRegistry.WorkflowIDAlreadyExists.selector); + s_registry.updateWorkflow( + s_validWorkflowKey, s_newValidWorkflowID, s_validBinaryURL, s_validConfigURL, s_newValidSecretsURL + ); + + vm.stopPrank(); + } + // whenTheCallerIsAnAuthorizedAddress whenTheRegistryIsNotLocked whenTheDonIDIsAllowed whenTheCallerIsTheWorkflowOwner function test_WhenTheWorkflowInputsAreAllValid() external { // Register a workflow first. diff --git a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.updateWorkflow.tree b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.updateWorkflow.tree index 0d4da7cb32e..9b8243a8672 100644 --- a/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.updateWorkflow.tree +++ b/contracts/src/v0.8/workflow/test/WorkflowRegistry/WorkflowRegistry.updateWorkflow.tree @@ -25,6 +25,8 @@ WorkflowRegistry.updateWorkflow │ └── it should revert ├── when the workflowID is invalid │ └── it should revert + ├── when the workflowID is already in used by another workflow + │ └── it should revert └── when the workflow inputs are all valid ├── it should update the existing workflow in s_workflows with the new values ├── it should emit {WorkflowUpdatedV1} diff --git a/core/capabilities/ccip/ccip_integration_tests/integrationhelpers/integration_helpers.go b/core/capabilities/ccip/ccip_integration_tests/integrationhelpers/integration_helpers.go index 13d2b8f4d5c..ea52438edad 100644 --- a/core/capabilities/ccip/ccip_integration_tests/integrationhelpers/integration_helpers.go +++ b/core/capabilities/ccip/ccip_integration_tests/integrationhelpers/integration_helpers.go @@ -8,6 +8,7 @@ import ( "fmt" "math/big" "sort" + "strconv" "testing" "time" @@ -137,7 +138,7 @@ func NewTestUniverse(ctx context.Context, t *testing.T, lggr logger.Logger) Test t.Cleanup(func() { require.NoError(t, lp.Close()) }) cr := NewReader(t, lp, headTracker, cl, ccAddress, configsevm.HomeChainReaderConfigRaw) - hcr := NewHomeChainReader(t, cr, ccAddress) + hcr := NewHomeChainReader(t, cr, ccAddress, strconv.Itoa(chainID)) return TestUniverse{ Transactor: transactor, Backend: backend, @@ -237,11 +238,22 @@ func (t *TestUniverse) AddCapability(p2pIDs [][32]byte) { } } -func NewHomeChainReader(t *testing.T, cr types.ContractReader, ccAddress common.Address) ccipreader.HomeChain { - hcr := ccipreader.NewHomeChainReader(cr, logger.TestLogger(t), 50*time.Millisecond, types.BoundContract{ - Address: ccAddress.String(), - Name: consts.ContractNameCCIPConfig, - }) +func NewHomeChainReader( + t *testing.T, + cr types.ContractReader, + ccAddress common.Address, + chainID string, +) ccipreader.HomeChain { + hcr := ccipreader.NewObservedHomeChainReader( + cr, + logger.TestLogger(t), + 50*time.Millisecond, + types.BoundContract{ + Address: ccAddress.String(), + Name: consts.ContractNameCCIPConfig, + }, + chainID, + ) require.NoError(t, hcr.Start(testutils.Context(t))) t.Cleanup(func() { require.NoError(t, hcr.Close()) }) diff --git a/core/capabilities/ccip/configs/evm/contract_reader.go b/core/capabilities/ccip/configs/evm/contract_reader.go index f4942943ec4..dca590094f8 100644 --- a/core/capabilities/ccip/configs/evm/contract_reader.go +++ b/core/capabilities/ccip/configs/evm/contract_reader.go @@ -89,6 +89,10 @@ var DestReaderConfig = evmrelaytypes.ChainReaderConfig{ ChainSpecificName: mustGetMethodName("getAllSourceChainConfigs", offrampABI), ReadType: evmrelaytypes.Method, }, + consts.MethodNameOffRampLatestConfigDetails: { + ChainSpecificName: mustGetMethodName("latestConfigDetails", offrampABI), + ReadType: evmrelaytypes.Method, + }, consts.EventNameCommitReportAccepted: { ChainSpecificName: mustGetEventName(consts.EventNameCommitReportAccepted, offrampABI), ReadType: evmrelaytypes.Event, diff --git a/core/capabilities/ccip/delegate.go b/core/capabilities/ccip/delegate.go index 09e3769627e..1af4f44cd4a 100644 --- a/core/capabilities/ccip/delegate.go +++ b/core/capabilities/ccip/delegate.go @@ -167,11 +167,12 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, spec job.Job) (services return nil, fmt.Errorf("failed to get home chain contract reader: %w", err) } - hcr := ccipreaderpkg.NewHomeChainReader( + hcr := ccipreaderpkg.NewObservedHomeChainReader( homeChainContractReader, d.lggr.Named("HomeChainReader"), 100*time.Millisecond, ccipConfigBinding, + d.capabilityConfig.ExternalRegistry().ChainID(), ) // get the chain selector for the home chain diff --git a/core/capabilities/compute/cache.go b/core/capabilities/compute/cache.go index 7b7cd78aaab..dbcc42c1606 100644 --- a/core/capabilities/compute/cache.go +++ b/core/capabilities/compute/cache.go @@ -38,8 +38,9 @@ type moduleCache struct { timeout time.Duration evictAfterSize int - clock clockwork.Clock - onReaper chan struct{} + clock clockwork.Clock + reapTicker <-chan time.Time + onReaper chan struct{} } func newModuleCache(clock clockwork.Clock, tick, timeout time.Duration, evictAfterSize int) *moduleCache { @@ -49,6 +50,7 @@ func newModuleCache(clock clockwork.Clock, tick, timeout time.Duration, evictAft timeout: timeout, evictAfterSize: evictAfterSize, clock: clock, + reapTicker: clock.NewTicker(tick).Chan(), stopChan: make(chan struct{}), } } @@ -67,10 +69,9 @@ func (mc *moduleCache) close() { } func (mc *moduleCache) reapLoop() { - ticker := mc.clock.NewTicker(mc.tickInterval) for { select { - case <-ticker.Chan(): + case <-mc.reapTicker: mc.evictOlderThan(mc.timeout) if mc.onReaper != nil { mc.onReaper <- struct{}{} @@ -84,7 +85,7 @@ func (mc *moduleCache) reapLoop() { func (mc *moduleCache) add(id string, mod *module) { mc.mu.Lock() defer mc.mu.Unlock() - mod.lastFetchedAt = time.Now() + mod.lastFetchedAt = mc.clock.Now() mc.m[id] = mod moduleCacheAddition.Inc() } diff --git a/core/capabilities/compute/cache_test.go b/core/capabilities/compute/cache_test.go index 3b38cc23001..ad075f493b5 100644 --- a/core/capabilities/compute/cache_test.go +++ b/core/capabilities/compute/cache_test.go @@ -20,14 +20,17 @@ const ( binaryCmd = "core/capabilities/compute/test/simple/cmd" ) +// Verify that cache evicts an expired module. func TestCache(t *testing.T) { t.Parallel() clock := clockwork.NewFakeClock() tick := 1 * time.Second timeout := 1 * time.Second + reapTicker := make(chan time.Time) cache := newModuleCache(clock, tick, timeout, 0) cache.onReaper = make(chan struct{}, 1) + cache.reapTicker = reapTicker cache.start() defer cache.close() @@ -50,20 +53,24 @@ func TestCache(t *testing.T) { assert.Equal(t, got, mod) clock.Advance(15 * time.Second) + reapTicker <- time.Now() <-cache.onReaper _, ok = cache.get(id) assert.False(t, ok) } +// Verify that an expired module is not evicted because evictAfterSize is 1 func TestCache_EvictAfterSize(t *testing.T) { t.Parallel() ctx := tests.Context(t) clock := clockwork.NewFakeClock() tick := 1 * time.Second timeout := 1 * time.Second + reapTicker := make(chan time.Time) cache := newModuleCache(clock, tick, timeout, 1) cache.onReaper = make(chan struct{}, 1) + cache.reapTicker = reapTicker cache.start() defer cache.close() @@ -79,6 +86,7 @@ func TestCache_EvictAfterSize(t *testing.T) { module: hmod, } cache.add(id, mod) + assert.Len(t, cache.m, 1) got, ok := cache.get(id) assert.True(t, ok) @@ -86,6 +94,7 @@ func TestCache_EvictAfterSize(t *testing.T) { assert.Equal(t, got, mod) clock.Advance(15 * time.Second) + reapTicker <- time.Now() select { case <-ctx.Done(): return diff --git a/core/capabilities/compute/compute.go b/core/capabilities/compute/compute.go index 316e4f00eea..2ba5daefaa6 100644 --- a/core/capabilities/compute/compute.go +++ b/core/capabilities/compute/compute.go @@ -318,18 +318,13 @@ func (c *Compute) createFetcher() func(ctx context.Context, req *wasmpb.FetchReq headersReq[k] = v.String() } - payloadBytes, err := json.Marshal(ghcapabilities.Request{ + resp, err := c.outgoingConnectorHandler.HandleSingleNodeRequest(ctx, messageID, ghcapabilities.Request{ URL: req.Url, Method: req.Method, Headers: headersReq, Body: req.Body, TimeoutMs: req.TimeoutMs, }) - if err != nil { - return nil, fmt.Errorf("failed to marshal fetch request: %w", err) - } - - resp, err := c.outgoingConnectorHandler.HandleSingleNodeRequest(ctx, messageID, payloadBytes) if err != nil { return nil, err } diff --git a/core/capabilities/compute/compute_test.go b/core/capabilities/compute/compute_test.go index c4146b7408e..3e5f501fa61 100644 --- a/core/capabilities/compute/compute_test.go +++ b/core/capabilities/compute/compute_test.go @@ -14,6 +14,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/capabilities" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/wasmtest" "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink/v2/core/utils/matches" cappkg "github.com/smartcontractkit/chainlink-common/pkg/capabilities" "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" @@ -188,6 +189,7 @@ func TestComputeFetch(t *testing.T) { th := setup(t, defaultConfig) th.connector.EXPECT().DonID().Return("don-id") + th.connector.EXPECT().AwaitConnection(matches.AnyContext, "gateway1").Return(nil) th.connector.EXPECT().GatewayIDs().Return([]string{"gateway1", "gateway2"}) msgID := strings.Join([]string{ diff --git a/core/capabilities/launcher.go b/core/capabilities/launcher.go index 27c43fe0a53..98318853e2a 100644 --- a/core/capabilities/launcher.go +++ b/core/capabilities/launcher.go @@ -398,7 +398,8 @@ func (w *launcher) addToRegistryAndSetDispatcher(ctx context.Context, capability } var ( - defaultTargetRequestTimeout = time.Minute + // TODO: make this configurable + defaultTargetRequestTimeout = 8 * time.Minute ) func (w *launcher) exposeCapabilities(ctx context.Context, myPeerID p2ptypes.PeerID, don registrysyncer.DON, state *registrysyncer.LocalRegistry, remoteWorkflowDONs []registrysyncer.DON) error { diff --git a/core/capabilities/remote/executable/client.go b/core/capabilities/remote/executable/client.go index 9af32eb5f8e..776ddb692ad 100644 --- a/core/capabilities/remote/executable/client.go +++ b/core/capabilities/remote/executable/client.go @@ -41,6 +41,8 @@ var _ commoncap.ExecutableCapability = &client{} var _ types.Receiver = &client{} var _ services.Service = &client{} +const expiryCheckInterval = 30 * time.Second + func NewClient(remoteCapabilityInfo commoncap.CapabilityInfo, localDonInfo commoncap.DON, dispatcher types.Dispatcher, requestTimeout time.Duration, lggr logger.Logger) *client { return &client{ @@ -98,7 +100,11 @@ func (c *client) checkDispatcherReady() { } func (c *client) checkForExpiredRequests() { - ticker := time.NewTicker(c.requestTimeout) + tickerInterval := expiryCheckInterval + if c.requestTimeout < tickerInterval { + tickerInterval = c.requestTimeout + } + ticker := time.NewTicker(tickerInterval) defer ticker.Stop() for { select { @@ -116,7 +122,7 @@ func (c *client) expireRequests() { for messageID, req := range c.requestIDToCallerRequest { if req.Expired() { - req.Cancel(errors.New("request expired")) + req.Cancel(errors.New("request expired by executable client")) delete(c.requestIDToCallerRequest, messageID) } diff --git a/core/capabilities/remote/executable/client_test.go b/core/capabilities/remote/executable/client_test.go index 5c4da350b9e..f4e6add82b0 100644 --- a/core/capabilities/remote/executable/client_test.go +++ b/core/capabilities/remote/executable/client_test.go @@ -12,7 +12,9 @@ import ( commoncap "github.com/smartcontractkit/chainlink-common/pkg/capabilities" "github.com/smartcontractkit/chainlink-common/pkg/capabilities/pb" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-common/pkg/values" + "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/executable" remotetypes "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types" "github.com/smartcontractkit/chainlink/v2/core/capabilities/transmission" @@ -29,6 +31,7 @@ const ( ) func Test_Client_DonTopologies(t *testing.T) { + tests.SkipFlakey(t, "https://smartcontract-it.atlassian.net/browse/CAPPL-363") ctx := testutils.Context(t) transmissionSchedule, err := values.NewMap(map[string]any{ @@ -87,6 +90,7 @@ func Test_Client_DonTopologies(t *testing.T) { } func Test_Client_TransmissionSchedules(t *testing.T) { + tests.SkipFlakey(t, "https://smartcontract-it.atlassian.net/browse/CAPPL-363") ctx := testutils.Context(t) responseTest := func(t *testing.T, response commoncap.CapabilityResponse, responseError error) { diff --git a/core/capabilities/remote/executable/endtoend_test.go b/core/capabilities/remote/executable/endtoend_test.go index 4e78fead87e..5f445db4235 100644 --- a/core/capabilities/remote/executable/endtoend_test.go +++ b/core/capabilities/remote/executable/endtoend_test.go @@ -78,7 +78,7 @@ func Test_RemoteExecutionCapability_CapabilityError(t *testing.T) { methods = append(methods, func(ctx context.Context, caller commoncap.ExecutableCapability) { executeCapability(ctx, t, caller, transmissionSchedule, func(t *testing.T, responseCh commoncap.CapabilityResponse, responseError error) { - assert.Equal(t, "error executing request: failed to execute capability: an error", responseError.Error()) + assert.Equal(t, "error executing request: failed to execute capability", responseError.Error()) }) }) @@ -102,12 +102,12 @@ func Test_RemoteExecutableCapability_RandomCapabilityError(t *testing.T) { methods = append(methods, func(ctx context.Context, caller commoncap.ExecutableCapability) { executeCapability(ctx, t, caller, transmissionSchedule, func(t *testing.T, responseCh commoncap.CapabilityResponse, responseError error) { - assert.Equal(t, "error executing request: request expired", responseError.Error()) + assert.Equal(t, "error executing request: failed to execute capability", responseError.Error()) }) }) for _, method := range methods { - testRemoteExecutableCapability(ctx, t, capability, 10, 9, 10*time.Millisecond, 10, 9, 10*time.Minute, + testRemoteExecutableCapability(ctx, t, capability, 10, 9, 1*time.Second, 10, 9, 10*time.Minute, method) } } diff --git a/core/capabilities/remote/executable/request/server_request.go b/core/capabilities/remote/executable/request/server_request.go index a4662e93987..629622494a4 100644 --- a/core/capabilities/remote/executable/request/server_request.go +++ b/core/capabilities/remote/executable/request/server_request.go @@ -2,6 +2,7 @@ package request import ( "context" + "errors" "fmt" "sync" "time" @@ -48,6 +49,8 @@ type ServerRequest struct { lggr logger.Logger } +var errExternalErrorMsg = errors.New("failed to execute capability") + func NewServerRequest(capability capabilities.ExecutableCapability, method string, capabilityID string, capabilityDonID uint32, capabilityPeerID p2ptypes.PeerID, callingDon commoncap.DON, requestID string, @@ -228,20 +231,22 @@ func executeCapabilityRequest(ctx context.Context, lggr logger.Logger, capabilit payload []byte) ([]byte, error) { capabilityRequest, err := pb.UnmarshalCapabilityRequest(payload) if err != nil { - return nil, fmt.Errorf("failed to unmarshal capability request: %w", err) + lggr.Errorw("failed to unmarshal capability request", "err", err) + return nil, errExternalErrorMsg } lggr.Debugw("executing capability", "metadata", capabilityRequest.Metadata) capResponse, err := capability.Execute(ctx, capabilityRequest) if err != nil { - lggr.Debugw("received execution error", "workflowExecutionID", capabilityRequest.Metadata.WorkflowExecutionID, "error", err) - return nil, fmt.Errorf("failed to execute capability: %w", err) + lggr.Errorw("received execution error", "workflowExecutionID", capabilityRequest.Metadata.WorkflowExecutionID, "error", err) + return nil, errExternalErrorMsg } responsePayload, err := pb.MarshalCapabilityResponse(capResponse) if err != nil { - return nil, fmt.Errorf("failed to marshal capability response: %w", err) + lggr.Errorw("failed to marshal capability request", "err", err) + return nil, errExternalErrorMsg } lggr.Debugw("received execution results", "workflowExecutionID", capabilityRequest.Metadata.WorkflowExecutionID) diff --git a/core/capabilities/remote/executable/request/server_request_test.go b/core/capabilities/remote/executable/request/server_request_test.go index cbeec833a1f..ce539154d93 100644 --- a/core/capabilities/remote/executable/request/server_request_test.go +++ b/core/capabilities/remote/executable/request/server_request_test.go @@ -136,9 +136,9 @@ func Test_ServerRequest_MessageValidation(t *testing.T) { require.NoError(t, err) assert.Len(t, dispatcher.msgs, 2) assert.Equal(t, types.Error_INTERNAL_ERROR, dispatcher.msgs[0].Error) - assert.Equal(t, "failed to execute capability: an error", dispatcher.msgs[0].ErrorMsg) + assert.Equal(t, "failed to execute capability", dispatcher.msgs[0].ErrorMsg) assert.Equal(t, types.Error_INTERNAL_ERROR, dispatcher.msgs[1].Error) - assert.Equal(t, "failed to execute capability: an error", dispatcher.msgs[1].ErrorMsg) + assert.Equal(t, "failed to execute capability", dispatcher.msgs[1].ErrorMsg) }) t.Run("Execute capability", func(t *testing.T) { diff --git a/core/capabilities/remote/executable/server.go b/core/capabilities/remote/executable/server.go index b767a2d7030..d43c7ab5c41 100644 --- a/core/capabilities/remote/executable/server.go +++ b/core/capabilities/remote/executable/server.go @@ -87,7 +87,11 @@ func (r *server) Start(ctx context.Context) error { r.wg.Add(1) go func() { defer r.wg.Done() - ticker := time.NewTicker(r.requestTimeout) + tickerInterval := expiryCheckInterval + if r.requestTimeout < tickerInterval { + tickerInterval = r.requestTimeout + } + ticker := time.NewTicker(tickerInterval) defer ticker.Stop() r.lggr.Info("executable capability server started") for { @@ -118,7 +122,7 @@ func (r *server) expireRequests() { for requestID, executeReq := range r.requestIDToRequest { if executeReq.request.Expired() { - err := executeReq.request.Cancel(types.Error_TIMEOUT, "request expired") + err := executeReq.request.Cancel(types.Error_TIMEOUT, "request expired by executable server") if err != nil { r.lggr.Errorw("failed to cancel request", "request", executeReq, "err", err) } diff --git a/core/capabilities/triggers/logevent/trigger.go b/core/capabilities/triggers/logevent/trigger.go index 7ee76c6f44a..334c3c3f30e 100644 --- a/core/capabilities/triggers/logevent/trigger.go +++ b/core/capabilities/triggers/logevent/trigger.go @@ -67,6 +67,11 @@ func newLogEventTrigger(ctx context.Context, return nil, nil, err } + err = contractReader.Start(ctx) + if err != nil { + return nil, nil, err + } + // Get current block HEAD/tip of the blockchain to start polling from latestHead, err := relayer.LatestHead(ctx) if err != nil { diff --git a/core/capabilities/webapi/outgoing_connector_handler.go b/core/capabilities/webapi/outgoing_connector_handler.go index d18ee971d1a..a9ff9ee3aae 100644 --- a/core/capabilities/webapi/outgoing_connector_handler.go +++ b/core/capabilities/webapi/outgoing_connector_handler.go @@ -6,6 +6,7 @@ import ( "fmt" "sort" "sync" + "time" "github.com/pkg/errors" @@ -17,6 +18,10 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/gateway/handlers/common" ) +const ( + defaultFetchTimeoutMs = 20_000 +) + var _ connector.GatewayConnectorHandler = &OutgoingConnectorHandler{} type OutgoingConnectorHandler struct { @@ -51,8 +56,24 @@ func NewOutgoingConnectorHandler(gc connector.GatewayConnector, config ServiceCo } // HandleSingleNodeRequest sends a request to first available gateway node and blocks until response is received -// TODO: handle retries and timeouts -func (c *OutgoingConnectorHandler) HandleSingleNodeRequest(ctx context.Context, messageID string, payload []byte) (*api.Message, error) { +// TODO: handle retries +func (c *OutgoingConnectorHandler) HandleSingleNodeRequest(ctx context.Context, messageID string, req capabilities.Request) (*api.Message, error) { + // set default timeout if not provided for all outgoing requests + if req.TimeoutMs == 0 { + req.TimeoutMs = defaultFetchTimeoutMs + } + + // Create a subcontext with the timeout plus some margin for the gateway to process the request + timeoutDuration := time.Duration(req.TimeoutMs) * time.Millisecond + margin := 100 * time.Millisecond + ctx, cancel := context.WithTimeout(ctx, timeoutDuration+margin) + defer cancel() + + payload, err := json.Marshal(req) + if err != nil { + return nil, fmt.Errorf("failed to marshal fetch request: %w", err) + } + ch := make(chan *api.Message, 1) c.responseChsMu.Lock() c.responseChs[messageID] = ch @@ -75,8 +96,15 @@ func (c *OutgoingConnectorHandler) HandleSingleNodeRequest(ctx context.Context, } sort.Strings(gatewayIDs) - err := c.gc.SignAndSendToGateway(ctx, gatewayIDs[0], body) - if err != nil { + selectedGateway := gatewayIDs[0] + + l.Infow("selected gateway, awaiting connection", "gatewayID", selectedGateway) + + if err := c.gc.AwaitConnection(ctx, selectedGateway); err != nil { + return nil, errors.Wrap(err, "await connection canceled") + } + + if err := c.gc.SignAndSendToGateway(ctx, selectedGateway, body); err != nil { return nil, errors.Wrap(err, "failed to send request to gateway") } diff --git a/core/capabilities/webapi/outgoing_connector_handler_test.go b/core/capabilities/webapi/outgoing_connector_handler_test.go new file mode 100644 index 00000000000..4a8c425d4f1 --- /dev/null +++ b/core/capabilities/webapi/outgoing_connector_handler_test.go @@ -0,0 +1,135 @@ +package webapi + +import ( + "context" + "encoding/json" + "testing" + + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" + "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink/v2/core/utils/matches" + + "github.com/smartcontractkit/chainlink/v2/core/services/gateway/api" + gcmocks "github.com/smartcontractkit/chainlink/v2/core/services/gateway/connector/mocks" + ghcapabilities "github.com/smartcontractkit/chainlink/v2/core/services/gateway/handlers/capabilities" + "github.com/smartcontractkit/chainlink/v2/core/services/gateway/handlers/common" +) + +func TestHandleSingleNodeRequest(t *testing.T) { + t.Run("OK-timeout_is_not_specify_default_timeout_is_expected", func(t *testing.T) { + ctx := tests.Context(t) + log := logger.TestLogger(t) + connector := gcmocks.NewGatewayConnector(t) + var defaultConfig = ServiceConfig{ + RateLimiter: common.RateLimiterConfig{ + GlobalRPS: 100.0, + GlobalBurst: 100, + PerSenderRPS: 100.0, + PerSenderBurst: 100, + }, + } + connectorHandler, err := NewOutgoingConnectorHandler(connector, defaultConfig, ghcapabilities.MethodComputeAction, log) + require.NoError(t, err) + + msgID := "msgID" + testURL := "http://localhost:8080" + connector.EXPECT().DonID().Return("donID") + connector.EXPECT().AwaitConnection(matches.AnyContext, "gateway1").Return(nil) + connector.EXPECT().GatewayIDs().Return([]string{"gateway1"}) + + // build the expected body with the default timeout + req := ghcapabilities.Request{ + URL: testURL, + TimeoutMs: defaultFetchTimeoutMs, + } + payload, err := json.Marshal(req) + require.NoError(t, err) + + expectedBody := &api.MessageBody{ + MessageId: msgID, + DonId: connector.DonID(), + Method: ghcapabilities.MethodComputeAction, + Payload: payload, + } + + // expect the request body to contain the default timeout + connector.EXPECT().SignAndSendToGateway(mock.Anything, "gateway1", expectedBody).Run(func(ctx context.Context, gatewayID string, msg *api.MessageBody) { + connectorHandler.HandleGatewayMessage(ctx, "gateway1", gatewayResponse(t, msgID)) + }).Return(nil).Times(1) + + _, err = connectorHandler.HandleSingleNodeRequest(ctx, msgID, ghcapabilities.Request{ + URL: testURL, + }) + require.NoError(t, err) + }) + + t.Run("OK-timeout_is_specified", func(t *testing.T) { + ctx := tests.Context(t) + log := logger.TestLogger(t) + connector := gcmocks.NewGatewayConnector(t) + var defaultConfig = ServiceConfig{ + RateLimiter: common.RateLimiterConfig{ + GlobalRPS: 100.0, + GlobalBurst: 100, + PerSenderRPS: 100.0, + PerSenderBurst: 100, + }, + } + connectorHandler, err := NewOutgoingConnectorHandler(connector, defaultConfig, ghcapabilities.MethodComputeAction, log) + require.NoError(t, err) + + msgID := "msgID" + testURL := "http://localhost:8080" + connector.EXPECT().DonID().Return("donID") + connector.EXPECT().AwaitConnection(matches.AnyContext, "gateway1").Return(nil) + connector.EXPECT().GatewayIDs().Return([]string{"gateway1"}) + + // build the expected body with the defined timeout + req := ghcapabilities.Request{ + URL: testURL, + TimeoutMs: 40000, + } + payload, err := json.Marshal(req) + require.NoError(t, err) + + expectedBody := &api.MessageBody{ + MessageId: msgID, + DonId: connector.DonID(), + Method: ghcapabilities.MethodComputeAction, + Payload: payload, + } + + // expect the request body to contain the defined timeout + connector.EXPECT().SignAndSendToGateway(mock.Anything, "gateway1", expectedBody).Run(func(ctx context.Context, gatewayID string, msg *api.MessageBody) { + connectorHandler.HandleGatewayMessage(ctx, "gateway1", gatewayResponse(t, msgID)) + }).Return(nil).Times(1) + + _, err = connectorHandler.HandleSingleNodeRequest(ctx, msgID, ghcapabilities.Request{ + URL: testURL, + TimeoutMs: 40000, + }) + require.NoError(t, err) + }) +} + +func gatewayResponse(t *testing.T, msgID string) *api.Message { + headers := map[string]string{"Content-Type": "application/json"} + body := []byte("response body") + responsePayload, err := json.Marshal(ghcapabilities.Response{ + StatusCode: 200, + Headers: headers, + Body: body, + ExecutionError: false, + }) + require.NoError(t, err) + return &api.Message{ + Body: api.MessageBody{ + MessageId: msgID, + Method: ghcapabilities.MethodWebAPITarget, + Payload: responsePayload, + }, + } +} diff --git a/core/capabilities/webapi/target/target.go b/core/capabilities/webapi/target/target.go index b211e0fe837..4934ab382d5 100644 --- a/core/capabilities/webapi/target/target.go +++ b/core/capabilities/webapi/target/target.go @@ -135,18 +135,13 @@ func (c *Capability) Execute(ctx context.Context, req capabilities.CapabilityReq return capabilities.CapabilityResponse{}, err } - payloadBytes, err := json.Marshal(payload) - if err != nil { - return capabilities.CapabilityResponse{}, err - } - // Default to SingleNode delivery mode deliveryMode := defaultIfNil(workflowCfg.DeliveryMode, webapi.SingleNode) switch deliveryMode { case webapi.SingleNode: // blocking call to handle single node request. waits for response from gateway - resp, err := c.connectorHandler.HandleSingleNodeRequest(ctx, messageID, payloadBytes) + resp, err := c.connectorHandler.HandleSingleNodeRequest(ctx, messageID, payload) if err != nil { return capabilities.CapabilityResponse{}, err } diff --git a/core/capabilities/webapi/target/target_test.go b/core/capabilities/webapi/target/target_test.go index f51cdcd0d70..1af9a107054 100644 --- a/core/capabilities/webapi/target/target_test.go +++ b/core/capabilities/webapi/target/target_test.go @@ -194,7 +194,7 @@ func TestCapability_Execute(t *testing.T) { require.NoError(t, err) gatewayResp := gatewayResponse(t, msgID) - + th.connector.EXPECT().AwaitConnection(mock.Anything, "gateway1").Return(nil) th.connector.On("SignAndSendToGateway", mock.Anything, "gateway1", mock.Anything).Return(nil).Run(func(args mock.Arguments) { th.connectorHandler.HandleGatewayMessage(ctx, "gateway1", gatewayResp) }).Once() diff --git a/core/chains/evm/client/errors.go b/core/chains/evm/client/errors.go index d47d97660b1..bde97185580 100644 --- a/core/chains/evm/client/errors.go +++ b/core/chains/evm/client/errors.go @@ -64,6 +64,7 @@ const ( ServiceUnavailable TerminallyStuck TooManyResults + ServiceTimeout ) type ClientErrors map[int]*regexp.Regexp @@ -160,7 +161,8 @@ var arbitrum = ClientErrors{ Fatal: arbitrumFatal, L2FeeTooLow: regexp.MustCompile(`(: |^)max fee per gas less than block base fee(:|$)`), L2Full: regexp.MustCompile(`(: |^)(queue full|sequencer pending tx pool full, please try again)(:|$)`), - ServiceUnavailable: regexp.MustCompile(`(: |^)502 Bad Gateway: [\s\S]*$|network is unreachable|i/o timeout`), + ServiceUnavailable: regexp.MustCompile(`(: |^)502 Bad Gateway: [\s\S]*$|network is unreachable|i/o timeout|(: |^)503 Service Temporarily Unavailable(:|$)`), + ServiceTimeout: regexp.MustCompile(`(: |^)408 Request Timeout(:|$)`), } // Treasure @@ -240,7 +242,7 @@ var harmony = ClientErrors{ var zkSync = ClientErrors{ NonceTooLow: regexp.MustCompile(`(?:: |^)nonce too low\..+actual: \d*$`), NonceTooHigh: regexp.MustCompile(`(?:: |^)nonce too high\..+actual: \d*$`), - TerminallyUnderpriced: regexp.MustCompile(`(?:: |^)(max fee per gas less than block base fee|virtual machine entered unexpected state. please contact developers and provide transaction details that caused this error. Error description: The operator included transaction with an unacceptable gas price)$`), + TerminallyUnderpriced: regexp.MustCompile(`(?:: |^)(max fee per gas less than block base fee|virtual machine entered unexpected state. (?:P|p)lease contact developers and provide transaction details that caused this error. Error description: (?:The operator included transaction with an unacceptable gas price|Assertion error: Fair pubdata price too high))$`), InsufficientEth: regexp.MustCompile(`(?:: |^)(?:insufficient balance for transfer$|insufficient funds for gas + value)`), TxFeeExceedsCap: regexp.MustCompile(`(?:: |^)max priority fee per gas higher than max fee per gas$`), // intrinsic gas too low - gas limit less than 14700 @@ -398,6 +400,11 @@ func (s *SendError) IsServiceUnavailable(configErrors *ClientErrors) bool { return s.is(ServiceUnavailable, configErrors) || pkgerrors.Is(s.err, commonclient.ErroringNodeError) } +// IsServiceTimeout indicates if the error was caused by a service timeout +func (s *SendError) IsServiceTimeout(configErrors *ClientErrors) bool { + return s.is(ServiceTimeout, configErrors) +} + // IsTerminallyStuck indicates if a transaction was stuck without any chance of inclusion func (s *SendError) IsTerminallyStuckConfigError(configErrors *ClientErrors) bool { return s.is(TerminallyStuck, configErrors) @@ -619,6 +626,10 @@ func ClassifySendError(err error, clientErrors config.ClientErrors, lggr logger. lggr.Errorw(fmt.Sprintf("service unavailable while sending transaction %x", tx.Hash()), "err", sendError, "etx", tx) return commonclient.Retryable } + if sendError.IsServiceTimeout(configErrors) { + lggr.Errorw(fmt.Sprintf("service timed out while sending transaction %x", tx.Hash()), "err", sendError, "etx", tx) + return commonclient.Retryable + } if sendError.IsTimeout() { lggr.Errorw(fmt.Sprintf("timeout while sending transaction %x", tx.Hash()), "err", sendError, "etx", tx) return commonclient.Retryable @@ -666,7 +677,7 @@ var drpc = ClientErrors{ // Linkpool, Blockdaemon, and Chainstack all return "request timed out" if the log results are too large for them to process var defaultClient = ClientErrors{ - TooManyResults: regexp.MustCompile(`request timed out`), + TooManyResults: regexp.MustCompile(`request timed out|408 Request Timed Out`), } // JSON-RPC error codes which can indicate a refusal of the server to process an eth_getLogs request because the result set is too large diff --git a/core/chains/evm/client/errors_test.go b/core/chains/evm/client/errors_test.go index 7bdc87840d0..1f9aaa53365 100644 --- a/core/chains/evm/client/errors_test.go +++ b/core/chains/evm/client/errors_test.go @@ -172,6 +172,7 @@ func Test_Eth_Errors(t *testing.T) { {"intrinsic gas too low", true, "Klaytn"}, {"max fee per gas less than block base fee", true, "zkSync"}, {"virtual machine entered unexpected state. please contact developers and provide transaction details that caused this error. Error description: The operator included transaction with an unacceptable gas price", true, "zkSync"}, + {"failed to validate the transaction. reason: Validation revert: virtual machine entered unexpected state. Please contact developers and provide transaction details that caused this error. Error description: Assertion error: Fair pubdata price too high", true, "zkSync"}, {"client error terminally underpriced", true, "tomlConfig"}, {"gas price less than block base fee", true, "aStar"}, {"[Request ID: e4d09e44-19a4-4eb7-babe-270db4c2ebc9] Gas price '830000000000' is below configured minimum gas price '950000000000'", true, "hedera"}, @@ -244,6 +245,7 @@ func Test_Eth_Errors(t *testing.T) { {"network is unreachable", true, "Arbitrum"}, {"client error service unavailable", true, "tomlConfig"}, {"[Request ID: 825608a8-fd8a-4b5b-aea7-92999509306d] Error invoking RPC: [Request ID: 825608a8-fd8a-4b5b-aea7-92999509306d] Transaction execution returns a null value for transaction", true, "hedera"}, + {"call failed: 503 Service Temporarily Unavailable: \r\n
+ +```toml +AutoCreateKey = true +BlockBackfillDepth = 10 +BlockBackfillSkip = false +FinalityDepth = 50 +FinalityTagEnabled = true +LinkContractAddress = '0x3902228D6A3d2Dc44731fD9d45FeE6a61c722D0b' +LogBackfillBatchSize = 1000 +LogPollInterval = '3s' +LogKeepBlocksDepth = 100000 +LogPrunePageSize = 0 +BackupLogPollerBlockDelay = 100 +MinIncomingConfirmations = 3 +MinContractPayment = '0.00001 link' +NonceAutoSync = true +NoNewHeadsThreshold = '3m0s' +LogBroadcasterEnabled = true +RPCDefaultBatchSize = 250 +RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 +NoNewFinalizedHeadsThreshold = '0s' + +[Transactions] +ForwardersEnabled = false +MaxInFlight = 16 +MaxQueued = 250 +ReaperInterval = '1h0m0s' +ReaperThreshold = '168h0m0s' +ResendAfterThreshold = '1m0s' + +[Transactions.AutoPurge] +Enabled = false + +[BalanceMonitor] +Enabled = true + +[GasEstimator] +Mode = 'FeeHistory' +PriceDefault = '20 gwei' +PriceMax = '1 micro' +PriceMin = '1 gwei' +LimitDefault = 500000 +LimitMax = 500000 +LimitMultiplier = '1' +LimitTransfer = 21000 +EstimateLimit = false +BumpMin = '5 gwei' +BumpPercent = 20 +BumpThreshold = 3 +EIP1559DynamicFees = false +FeeCapDefault = '100 gwei' +TipCapDefault = '1 wei' +TipCapMin = '1 wei' + +[GasEstimator.BlockHistory] +BatchSize = 25 +BlockHistorySize = 8 +CheckInclusionBlocks = 12 +CheckInclusionPercentile = 90 +TransactionPercentile = 60 + +[GasEstimator.FeeHistory] +CacheTimeout = '10s' + +[HeadTracker] +HistoryDepth = 100 +MaxBufferSize = 3 +SamplingInterval = '1s' +MaxAllowedFinalityDepth = 10000 +FinalityTagBypass = true +PersistenceEnabled = true + +[NodePool] +PollFailureThreshold = 5 +PollInterval = '10s' +SelectionMode = 'HighestHead' +SyncThreshold = 5 +LeaseDuration = '0s' +NodeIsSyncingEnabled = false +FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = true +DeathDeclarationDelay = '1m0s' +NewHeadsPollInterval = '0s' + +[OCR] +ContractConfirmations = 4 +ContractTransmitterTransmitTimeout = '10s' +DatabaseTimeout = '10s' +DeltaCOverride = '168h0m0s' +DeltaCJitterOverride = '1h0m0s' +ObservationGracePeriod = '1s' + +[OCR2] +[OCR2.Automation] +GasLimit = 5400000 + +[Workflow] +GasLimitDefault = 400000 +``` + +
+ +```toml +AutoCreateKey = true +BlockBackfillDepth = 10 +BlockBackfillSkip = false +FinalityDepth = 50 +FinalityTagEnabled = true +LinkContractAddress = '0x5bB50A6888ee6a67E22afFDFD9513be7740F1c15' +LogBackfillBatchSize = 1000 +LogPollInterval = '3s' +LogKeepBlocksDepth = 100000 +LogPrunePageSize = 0 +BackupLogPollerBlockDelay = 100 +MinIncomingConfirmations = 3 +MinContractPayment = '0.00001 link' +NonceAutoSync = true +NoNewHeadsThreshold = '3m0s' +LogBroadcasterEnabled = true +RPCDefaultBatchSize = 250 +RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 +NoNewFinalizedHeadsThreshold = '0s' + +[Transactions] +ForwardersEnabled = false +MaxInFlight = 16 +MaxQueued = 250 +ReaperInterval = '1h0m0s' +ReaperThreshold = '168h0m0s' +ResendAfterThreshold = '1m0s' + +[Transactions.AutoPurge] +Enabled = false + +[BalanceMonitor] +Enabled = true + +[GasEstimator] +Mode = 'FeeHistory' +PriceDefault = '20 gwei' +PriceMax = '1 micro' +PriceMin = '1 gwei' +LimitDefault = 500000 +LimitMax = 500000 +LimitMultiplier = '1' +LimitTransfer = 21000 +EstimateLimit = false +BumpMin = '5 gwei' +BumpPercent = 20 +BumpThreshold = 3 +EIP1559DynamicFees = false +FeeCapDefault = '100 gwei' +TipCapDefault = '1 wei' +TipCapMin = '1 wei' + +[GasEstimator.BlockHistory] +BatchSize = 25 +BlockHistorySize = 8 +CheckInclusionBlocks = 12 +CheckInclusionPercentile = 90 +TransactionPercentile = 60 + +[GasEstimator.FeeHistory] +CacheTimeout = '10s' + +[HeadTracker] +HistoryDepth = 100 +MaxBufferSize = 3 +SamplingInterval = '1s' +MaxAllowedFinalityDepth = 10000 +FinalityTagBypass = true +PersistenceEnabled = true + +[NodePool] +PollFailureThreshold = 5 +PollInterval = '10s' +SelectionMode = 'HighestHead' +SyncThreshold = 5 +LeaseDuration = '0s' +NodeIsSyncingEnabled = false +FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = true +DeathDeclarationDelay = '1m0s' +NewHeadsPollInterval = '0s' + +[OCR] +ContractConfirmations = 4 +ContractTransmitterTransmitTimeout = '10s' +DatabaseTimeout = '10s' +DeltaCOverride = '168h0m0s' +DeltaCJitterOverride = '1h0m0s' +ObservationGracePeriod = '1s' + +[OCR2] +[OCR2.Automation] +GasLimit = 5400000 + +[Workflow] +GasLimitDefault = 400000 +``` + +
```toml
diff --git a/go.mod b/go.mod
index 2dd7d3fcfe5..1767da64153 100644
--- a/go.mod
+++ b/go.mod
@@ -11,7 +11,7 @@ require (
github.com/NethermindEth/juno v0.3.1
github.com/NethermindEth/starknet.go v0.7.1-0.20240401080518-34a506f3cfdb
github.com/XSAM/otelsql v0.27.0
- github.com/andybalholm/brotli v1.1.0
+ github.com/andybalholm/brotli v1.1.1
github.com/avast/retry-go/v4 v4.6.0
github.com/btcsuite/btcd/btcec/v2 v2.3.4
github.com/cometbft/cometbft v0.37.5
@@ -25,7 +25,7 @@ require (
github.com/fxamacker/cbor/v2 v2.7.0
github.com/gagliardetto/solana-go v1.8.4
github.com/getsentry/sentry-go v0.27.0
- github.com/gin-contrib/cors v1.5.0
+ github.com/gin-contrib/cors v1.7.2
github.com/gin-contrib/expvar v0.0.1
github.com/gin-contrib/sessions v0.0.5
github.com/gin-contrib/size v0.0.0-20230212012657-e14a14094dc4
@@ -78,13 +78,13 @@ require (
github.com/shopspring/decimal v1.4.0
github.com/smartcontractkit/chain-selectors v1.0.34
github.com/smartcontractkit/chainlink-automation v0.8.1
- github.com/smartcontractkit/chainlink-ccip v0.0.0-20241204015713-8956bb614e9e
- github.com/smartcontractkit/chainlink-common v0.3.1-0.20241209151352-70300ddcc776
+ github.com/smartcontractkit/chainlink-ccip v0.0.0-20241213122413-5e8f65dd6b1b
+ github.com/smartcontractkit/chainlink-common v0.3.1-0.20241214155818-b403079b2805
github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20241202195413-82468150ac1e
- github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20241202141438-a90db35252db
+ github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20241216163550-fa030d178ba3
github.com/smartcontractkit/chainlink-feeds v0.1.1
- github.com/smartcontractkit/chainlink-protos/orchestrator v0.3.2
- github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241204153209-c3a71b0eef99
+ github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0
+ github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241210172617-6fd1891d0fbc
github.com/smartcontractkit/chainlink-starknet/relayer v0.1.1-0.20241202202529-2033490e77b8
github.com/smartcontractkit/libocr v0.0.0-20241007185508-adbe57025f12
github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de
@@ -110,12 +110,12 @@ require (
go.opentelemetry.io/otel/trace v1.31.0
go.uber.org/multierr v1.11.0
go.uber.org/zap v1.27.0
- golang.org/x/crypto v0.28.0
+ golang.org/x/crypto v0.31.0
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c
golang.org/x/mod v0.21.0
- golang.org/x/sync v0.8.0
- golang.org/x/term v0.25.0
- golang.org/x/text v0.19.0
+ golang.org/x/sync v0.10.0
+ golang.org/x/term v0.27.0
+ golang.org/x/text v0.21.0
golang.org/x/time v0.7.0
golang.org/x/tools v0.26.0
gonum.org/v1/gonum v0.15.1
@@ -148,6 +148,7 @@ require (
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/VictoriaMetrics/fastcache v1.12.2 // indirect
+ github.com/apache/arrow-go/v18 v18.0.0 // indirect
github.com/armon/go-metrics v0.4.1 // indirect
github.com/atombender/go-jsonschema v0.16.1-0.20240916205339-a74cd4e2851c // indirect
github.com/bahlo/generic-list-go v0.2.0 // indirect
@@ -158,13 +159,14 @@ require (
github.com/blendle/zapdriver v1.3.1 // indirect
github.com/buger/jsonparser v1.1.1 // indirect
github.com/bytecodealliance/wasmtime-go/v23 v23.0.0 // indirect
- github.com/bytedance/sonic v1.10.1 // indirect
+ github.com/bytedance/sonic v1.11.6 // indirect
+ github.com/bytedance/sonic/loader v0.1.1 // indirect
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
- github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
- github.com/chenzhuoyu/iasm v0.9.0 // indirect
+ github.com/cloudwego/base64x v0.1.4 // indirect
+ github.com/cloudwego/iasm v0.2.0 // indirect
github.com/cockroachdb/errors v1.11.3 // indirect
github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
@@ -219,7 +221,7 @@ require (
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.22.0 // indirect
github.com/go-webauthn/x v0.1.5 // indirect
- github.com/goccy/go-json v0.10.2 // indirect
+ github.com/goccy/go-json v0.10.3 // indirect
github.com/goccy/go-yaml v1.12.0 // indirect
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
github.com/gofrs/flock v0.8.1 // indirect
@@ -232,6 +234,7 @@ require (
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/google/btree v1.1.2 // indirect
+ github.com/google/flatbuffers v24.3.25+incompatible // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-tpm v0.9.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
@@ -269,8 +272,8 @@ require (
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
- github.com/klauspost/compress v1.17.9 // indirect
- github.com/klauspost/cpuid/v2 v2.2.5 // indirect
+ github.com/klauspost/compress v1.17.11 // indirect
+ github.com/klauspost/cpuid/v2 v2.2.8 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
@@ -279,6 +282,7 @@ require (
github.com/logrusorgru/aurora v2.0.3+incompatible // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
+ github.com/marcboeker/go-duckdb v1.8.3 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
@@ -302,6 +306,7 @@ require (
github.com/opencontainers/runc v1.1.10 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect
+ github.com/pierrec/lz4/v4 v4.1.21 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/prometheus/procfs v0.15.1 // indirect
@@ -343,6 +348,7 @@ require (
github.com/x448/float16 v0.8.4 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
+ github.com/zeebo/xxh3 v1.0.2 // indirect
github.com/zondax/hid v0.9.2 // indirect
github.com/zondax/ledger-go v0.14.3 // indirect
go.dedis.ch/protobuf v1.0.11 // indirect
@@ -369,7 +375,7 @@ require (
go.uber.org/ratelimit v0.3.1 // indirect
golang.org/x/arch v0.11.0 // indirect
golang.org/x/net v0.30.0 // indirect
- golang.org/x/sys v0.26.0 // indirect
+ golang.org/x/sys v0.28.0 // indirect
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
google.golang.org/api v0.202.0 // indirect
google.golang.org/genproto v0.0.0-20241021214115-324edc3d5d38 // indirect
diff --git a/go.sum b/go.sum
index b8941bc7d01..8c7327b4997 100644
--- a/go.sum
+++ b/go.sum
@@ -144,9 +144,13 @@ github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax
github.com/allegro/bigcache v1.2.1 h1:hg1sY1raCwic3Vnsvje6TT7/pnZba83LeFck5NrFKSc=
github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=
github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129/go.mod h1:rFgpPQZYZ8vdbc+48xibu8ALc3yeyd64IhHS+PU6Yyg=
-github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M=
-github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY=
+github.com/andybalholm/brotli v1.1.1 h1:PR2pgnyFznKEugtsUo0xLdDop5SKXd5Qf5ysW+7XdTA=
+github.com/andybalholm/brotli v1.1.1/go.mod h1:05ib4cKhjx3OQYUY22hTVd34Bc8upXjOLL2rKwwZBoA=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
+github.com/apache/arrow-go/v18 v18.0.0 h1:1dBDaSbH3LtulTyOVYaBCHO3yVRwjV+TZaqn3g6V7ZM=
+github.com/apache/arrow-go/v18 v18.0.0/go.mod h1:t6+cWRSmKgdQ6HsxisQjok+jBpKGhRDiqcf3p0p/F+A=
+github.com/apache/thrift v0.21.0 h1:tdPmh/ptjE1IJnhbhrcl2++TauVjy242rkV/UzJChnE=
+github.com/apache/thrift v0.21.0/go.mod h1:W1H8aR/QRtYNvrPeFXBtobyRkd0/YVhTc6i07XIAgDw=
github.com/appleboy/gofight/v2 v2.1.2 h1:VOy3jow4vIK8BRQJoC/I9muxyYlJ2yb9ht2hZoS3rf4=
github.com/appleboy/gofight/v2 v2.1.2/go.mod h1:frW+U1QZEdDgixycTj4CygQ48yLTUhplt43+Wczp3rw=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
@@ -196,10 +200,10 @@ github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMU
github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
github.com/bytecodealliance/wasmtime-go/v23 v23.0.0 h1:NJvU4S8KEk1GnF6+FvlnzMD/8wXTj/mYJSG6Q4yu3Pw=
github.com/bytecodealliance/wasmtime-go/v23 v23.0.0/go.mod h1:5YIL+Ouiww2zpO7u+iZ1U1G5NvmwQYaXdmCZQGjQM0U=
-github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
-github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM=
-github.com/bytedance/sonic v1.10.1 h1:7a1wuFXL1cMy7a3f7/VFcEtriuXQnUBhtoVfOZiaysc=
-github.com/bytedance/sonic v1.10.1/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4=
+github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0=
+github.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4=
+github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM=
+github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4=
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
@@ -215,12 +219,6 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
-github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY=
-github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk=
-github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0=
-github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA=
-github.com/chenzhuoyu/iasm v0.9.0 h1:9fhXjVzq5hUy2gkhhgHl95zG2cEAhw9OSGs8toWWAwo=
-github.com/chenzhuoyu/iasm v0.9.0/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI=
@@ -229,6 +227,10 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn
github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag=
github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
+github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y=
+github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w=
+github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg=
+github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
@@ -411,8 +413,8 @@ github.com/gedex/inflector v0.0.0-20170307190818-16278e9db813/go.mod h1:P+oSoE9y
github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps=
github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
-github.com/gin-contrib/cors v1.5.0 h1:DgGKV7DDoOn36DFkNtbHrjoRiT5ExCe+PC9/xp7aKvk=
-github.com/gin-contrib/cors v1.5.0/go.mod h1:TvU7MAZ3EwrPLI2ztzTt3tqgvBCq+wn8WpZmfADjupI=
+github.com/gin-contrib/cors v1.7.2 h1:oLDHxdg8W/XDoN/8zamqk/Drgt4oVZDvaV0YmvVICQw=
+github.com/gin-contrib/cors v1.7.2/go.mod h1:SUJVARKgQ40dmrzgXEVxj2m7Ig1v1qIboQkPDTQ9t2E=
github.com/gin-contrib/expvar v0.0.1 h1:IuU5ArEgihz50vG8Onrwz22kJr7Mcvgv9xSSpfU5g+w=
github.com/gin-contrib/expvar v0.0.1/go.mod h1:8o2CznfQi1JjktORdHr2/abg3wSV6OCnXh0yGypvvVw=
github.com/gin-contrib/sessions v0.0.5 h1:CATtfHmLMQrMNpJRgzjWXD7worTh7g7ritsQfmF+0jE=
@@ -484,8 +486,8 @@ github.com/go-webauthn/webauthn v0.9.4/go.mod h1:LqupCtzSef38FcxzaklmOn7AykGKhAh
github.com/go-webauthn/x v0.1.5 h1:V2TCzDU2TGLd0kSZOXdrqDVV5JB9ILnKxA9S53CSBw0=
github.com/go-webauthn/x v0.1.5/go.mod h1:qbzWwcFcv4rTwtCLOZd+icnr6B7oSsAGZJqlt8cukqY=
github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
-github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
-github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
+github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA=
+github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
github.com/goccy/go-yaml v1.12.0 h1:/1WHjnMsI1dlIBQutrvSMGZRQufVO3asrHfTwfACoPM=
github.com/goccy/go-yaml v1.12.0/go.mod h1:wKnAMd44+9JAAnGQpWVEgBzGt3YuTaQ4uXoHvE4m7WU=
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0=
@@ -550,6 +552,8 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU=
github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
+github.com/google/flatbuffers v24.3.25+incompatible h1:CX395cjN9Kke9mmalRoL3d81AtFUxJM+yDthflgJGkI=
+github.com/google/flatbuffers v24.3.25+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
@@ -814,14 +818,16 @@ github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfV
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
+github.com/klauspost/asmfmt v1.3.2 h1:4Ri7ox3EwapiOjCki+hw14RyKk201CN4rzyCJRFLpK4=
+github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE=
github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg=
github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
-github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA=
-github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
+github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc=
+github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
-github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg=
-github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
+github.com/klauspost/cpuid/v2 v2.2.8 h1:+StwCXwm9PdpiEkPyzBXIy+M9KUb4ODm0Zarf1kS5BM=
+github.com/klauspost/cpuid/v2 v2.2.8/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
@@ -868,6 +874,8 @@ github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYt
github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg=
github.com/manyminds/api2go v0.0.0-20171030193247-e7b693844a6f h1:tVvGiZQFjOXP+9YyGqSA6jE55x1XVxmoPYudncxrZ8U=
github.com/manyminds/api2go v0.0.0-20171030193247-e7b693844a6f/go.mod h1:Z60vy0EZVSu0bOugCHdcN5ZxFMKSpjRgsnh0XKPFqqk=
+github.com/marcboeker/go-duckdb v1.8.3 h1:ZkYwiIZhbYsT6MmJsZ3UPTHrTZccDdM4ztoqSlEMXiQ=
+github.com/marcboeker/go-duckdb v1.8.3/go.mod h1:C9bYRE1dPYb1hhfu/SSomm78B0FXmNgRvv6YBW/Hooc=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
@@ -900,6 +908,10 @@ github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3N
github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM=
github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94=
github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM=
+github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 h1:AMFGa4R4MiIpspGNG7Z948v4n35fFGB3RR3G/ry4FWs=
+github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY=
+github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 h1:+n/aFZefKZp7spd8DFdX7uMikMLXX4oubIzJF4kv/wI=
+github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE=
github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g=
github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
@@ -1002,6 +1014,8 @@ github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xl
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o=
github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 h1:hDSdbBuw3Lefr6R18ax0tZ2BJeNB3NehB3trOwYBsdU=
github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4=
+github.com/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ=
+github.com/pierrec/lz4/v4 v4.1.21/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
@@ -1123,20 +1137,20 @@ github.com/smartcontractkit/chain-selectors v1.0.34 h1:MJ17OGu8+jjl426pcKrJkCf3f
github.com/smartcontractkit/chain-selectors v1.0.34/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-20241204015713-8956bb614e9e h1:GnM6ZWV6vlk2+n6c6o+v/R1LtXzBGVVx7r37nt/h6Uc=
-github.com/smartcontractkit/chainlink-ccip v0.0.0-20241204015713-8956bb614e9e/go.mod h1:80vGBbOfertJig0xFKsRfm+i17FkjdKkk1dAaGE45Os=
-github.com/smartcontractkit/chainlink-common v0.3.1-0.20241209151352-70300ddcc776 h1:NATQA1LfrEPXCdtEed9/G4SxaVuF8EZp5O2ucOK5C98=
-github.com/smartcontractkit/chainlink-common v0.3.1-0.20241209151352-70300ddcc776/go.mod h1:bQktEJf7sJ0U3SmIcXvbGUox7SmXcnSEZ4kUbT8R5Nk=
+github.com/smartcontractkit/chainlink-ccip v0.0.0-20241213122413-5e8f65dd6b1b h1:iSQJ6ng4FhEswf8SXunGkaJlVP3E3JlgLB8Oo2f3Ud4=
+github.com/smartcontractkit/chainlink-ccip v0.0.0-20241213122413-5e8f65dd6b1b/go.mod h1:F8xQAIW0ymb2BZhqn89sWZLXreJhM5KDVF6Qb4y44N0=
+github.com/smartcontractkit/chainlink-common v0.3.1-0.20241214155818-b403079b2805 h1:Pz8jB/6qe10xT10h2S3LFYJrnebNpG5rJ/w16HZGwPQ=
+github.com/smartcontractkit/chainlink-common v0.3.1-0.20241214155818-b403079b2805/go.mod h1:yti7e1+G9hhkYhj+L5sVUULn9Bn3bBL5/AxaNqdJ5YQ=
github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20241202195413-82468150ac1e h1:PRoeby6ZlTuTkv2f+7tVU4+zboTfRzI+beECynF4JQ0=
github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20241202195413-82468150ac1e/go.mod h1:mUh5/woemsVaHgTorA080hrYmO3syBCmPdnWc/5dOqk=
-github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20241202141438-a90db35252db h1:N1RH1hSr2ACzOFc9hkCcjE8pRBTdcU3p8nsTJByaLes=
-github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20241202141438-a90db35252db/go.mod h1:yjb9d4q7+m8aGbjfTbkNoNuA4PeSxcUszsSZHDrvS0E=
+github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20241216163550-fa030d178ba3 h1:aeiBdBHGY8QNftps+VqrIk6OnfeeOD5z4jrAabW4ZSc=
+github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20241216163550-fa030d178ba3/go.mod h1:AS6zY2BkcRwfiGzNabGbHhfrLSrXrcI/GmjnT4jQ5/s=
github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c=
github.com/smartcontractkit/chainlink-feeds v0.1.1/go.mod h1:55EZ94HlKCfAsUiKUTNI7QlE/3d3IwTlsU3YNa/nBb4=
-github.com/smartcontractkit/chainlink-protos/orchestrator v0.3.2 h1:onBe3DqNrbtOAzKS4PrPIiJX65BGo1aYiYZxFVEW+jc=
-github.com/smartcontractkit/chainlink-protos/orchestrator v0.3.2/go.mod h1:m/A3lqD7ms/RsQ9BT5P2uceYY0QX5mIt4KQxT2G6qEo=
-github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241204153209-c3a71b0eef99 h1:lvn9Yxah+QD1/PcgijLO0dNRa28HuQWZl8Kkxh46KJc=
-github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241204153209-c3a71b0eef99/go.mod h1:p8aUDfJeley6oer7y+Ucd3edOtRlMTnWg3mN6rhaLWo=
+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-solana v1.1.1-0.20241210172617-6fd1891d0fbc h1:dssRwJhmzJkUN/OajaDj2GsxBn+Tupk3bI1BkPEoJg0=
+github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241210172617-6fd1891d0fbc/go.mod h1:p8aUDfJeley6oer7y+Ucd3edOtRlMTnWg3mN6rhaLWo=
github.com/smartcontractkit/chainlink-starknet/relayer v0.1.1-0.20241202202529-2033490e77b8 h1:tNS7U9lrxkFvEuyxQv11HHOiV9LPDGC9wYEy+yM/Jv4=
github.com/smartcontractkit/chainlink-starknet/relayer v0.1.1-0.20241202202529-2033490e77b8/go.mod h1:EBrEgcdIbwepqguClkv8Ohy7CbyWSJaE4EC9aBJlQK0=
github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 h1:12ijqMM9tvYVEm+nR826WsrNi6zCKpwBhuApq127wHs=
@@ -1280,6 +1294,8 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
+github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU=
+github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E=
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
@@ -1289,6 +1305,10 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
+github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ=
+github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0=
+github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0=
+github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA=
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U=
github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM=
@@ -1425,8 +1445,8 @@ golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
-golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw=
-golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U=
+golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U=
+golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -1551,8 +1571,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
-golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
+golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
+golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -1636,8 +1656,8 @@ golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
-golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=
-golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
+golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
@@ -1647,8 +1667,8 @@ golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
-golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24=
-golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M=
+golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q=
+golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -1663,8 +1683,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
-golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM=
-golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
+golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
+golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
diff --git a/integration-tests/ccip-tests/testconfig/README.md b/integration-tests/ccip-tests/testconfig/README.md
index ff57ecaa220..d614ed62ea4 100644
--- a/integration-tests/ccip-tests/testconfig/README.md
+++ b/integration-tests/ccip-tests/testconfig/README.md
@@ -430,32 +430,6 @@ Example usage:
TTL = "11h"
```
-### CCIP.Env.Logging
-
-Specifies the logging configuration for the test. Imported from [LoggingConfig](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/config/logging.go#L11) in chainlink-testing-framework.
-Example usage:
-
-```toml
-[CCIP.Env.Logging]
-test_log_collect = false # if set to true will save logs even if test did not fail
-
-[CCIP.Env.Logging.LogStream]
-# supported targets: file, loki, in-memory. if empty no logs will be persistet
-log_targets = ["file"]
-# context timeout for starting log producer and also time-frame for requesting logs
-log_producer_timeout = "10s"
-# number of retries before log producer gives up and stops listening to logs
-log_producer_retry_limit = 10
-
-[CCIP.Env.Logging.Loki]
-tenant_id = "..."
-endpoint = "https://loki...."
-
-[CCIP.Env.Logging.Grafana]
-base_url = "https://grafana..../"
-dashboard_url = "/d/6vjVx-1V8/ccip-long-running-tests"
-```
-
### CCIP.Env.Lane.LeaderLaneEnabled
Specifies whether to enable the leader lane feature. This setting is only applicable for new deployments.
diff --git a/integration-tests/ccip-tests/testconfig/global.go b/integration-tests/ccip-tests/testconfig/global.go
index 4caa8a9ac00..8866d31705a 100644
--- a/integration-tests/ccip-tests/testconfig/global.go
+++ b/integration-tests/ccip-tests/testconfig/global.go
@@ -175,120 +175,6 @@ type Common struct {
func (p *Common) ReadFromEnvVar() error {
logger := logging.GetTestLogger(nil)
- testLogCollect := ctfconfig.MustReadEnvVar_Boolean(ctfconfig.E2E_TEST_LOG_COLLECT_ENV)
- if testLogCollect != nil {
- if p.Logging == nil {
- p.Logging = &ctfconfig.LoggingConfig{}
- }
- logger.Debug().Msgf("Using %s env var to override Logging.TestLogCollect", ctfconfig.E2E_TEST_LOG_COLLECT_ENV)
- p.Logging.TestLogCollect = testLogCollect
- }
-
- loggingRunID := ctfconfig.MustReadEnvVar_String(ctfconfig.E2E_TEST_LOGGING_RUN_ID_ENV)
- if loggingRunID != "" {
- if p.Logging == nil {
- p.Logging = &ctfconfig.LoggingConfig{}
- }
- logger.Debug().Msgf("Using %s env var to override Logging.RunID", ctfconfig.E2E_TEST_LOGGING_RUN_ID_ENV)
- p.Logging.RunId = &loggingRunID
- }
-
- logstreamLogTargets := ctfconfig.MustReadEnvVar_Strings(ctfconfig.E2E_TEST_LOG_STREAM_LOG_TARGETS_ENV, ",")
- if len(logstreamLogTargets) > 0 {
- if p.Logging == nil {
- p.Logging = &ctfconfig.LoggingConfig{}
- }
- if p.Logging.LogStream == nil {
- p.Logging.LogStream = &ctfconfig.LogStreamConfig{}
- }
- logger.Debug().Msgf("Using %s env var to override Logging.LogStream.LogTargets", ctfconfig.E2E_TEST_LOG_STREAM_LOG_TARGETS_ENV)
- p.Logging.LogStream.LogTargets = logstreamLogTargets
- }
-
- lokiTenantID := ctfconfig.MustReadEnvVar_String(ctfconfig.E2E_TEST_LOKI_TENANT_ID_ENV)
- if lokiTenantID != "" {
- if p.Logging == nil {
- p.Logging = &ctfconfig.LoggingConfig{}
- }
- if p.Logging.Loki == nil {
- p.Logging.Loki = &ctfconfig.LokiConfig{}
- }
- logger.Debug().Msgf("Using %s env var to override Logging.Loki.TenantId", ctfconfig.E2E_TEST_LOKI_TENANT_ID_ENV)
- p.Logging.Loki.TenantId = &lokiTenantID
- }
-
- lokiEndpoint := ctfconfig.MustReadEnvVar_String(ctfconfig.E2E_TEST_LOKI_ENDPOINT_ENV)
- if lokiEndpoint != "" {
- if p.Logging == nil {
- p.Logging = &ctfconfig.LoggingConfig{}
- }
- if p.Logging.Loki == nil {
- p.Logging.Loki = &ctfconfig.LokiConfig{}
- }
- logger.Debug().Msgf("Using %s env var to override Logging.Loki.Endpoint", ctfconfig.E2E_TEST_LOKI_ENDPOINT_ENV)
- p.Logging.Loki.Endpoint = &lokiEndpoint
- }
-
- lokiBasicAuth := ctfconfig.MustReadEnvVar_String(ctfconfig.E2E_TEST_LOKI_BASIC_AUTH_ENV)
- if lokiBasicAuth != "" {
- if p.Logging == nil {
- p.Logging = &ctfconfig.LoggingConfig{}
- }
- if p.Logging.Loki == nil {
- p.Logging.Loki = &ctfconfig.LokiConfig{}
- }
- logger.Debug().Msgf("Using %s env var to override Logging.Loki.BasicAuth", ctfconfig.E2E_TEST_LOKI_BASIC_AUTH_ENV)
- p.Logging.Loki.BasicAuth = &lokiBasicAuth
- }
-
- lokiBearerToken := ctfconfig.MustReadEnvVar_String(ctfconfig.E2E_TEST_LOKI_BEARER_TOKEN_ENV)
- if lokiBearerToken != "" {
- if p.Logging == nil {
- p.Logging = &ctfconfig.LoggingConfig{}
- }
- if p.Logging.Loki == nil {
- p.Logging.Loki = &ctfconfig.LokiConfig{}
- }
- logger.Debug().Msgf("Using %s env var to override Logging.Loki.BearerToken", ctfconfig.E2E_TEST_LOKI_BEARER_TOKEN_ENV)
- p.Logging.Loki.BearerToken = &lokiBearerToken
- }
-
- grafanaBaseUrl := ctfconfig.MustReadEnvVar_String(ctfconfig.E2E_TEST_GRAFANA_BASE_URL_ENV)
- if grafanaBaseUrl != "" {
- if p.Logging == nil {
- p.Logging = &ctfconfig.LoggingConfig{}
- }
- if p.Logging.Grafana == nil {
- p.Logging.Grafana = &ctfconfig.GrafanaConfig{}
- }
- logger.Debug().Msgf("Using %s env var to override Logging.Grafana.BaseUrl", ctfconfig.E2E_TEST_GRAFANA_BASE_URL_ENV)
- p.Logging.Grafana.BaseUrl = &grafanaBaseUrl
- }
-
- grafanaDashboardUrl := ctfconfig.MustReadEnvVar_String(ctfconfig.E2E_TEST_GRAFANA_DASHBOARD_URL_ENV)
- if grafanaDashboardUrl != "" {
- if p.Logging == nil {
- p.Logging = &ctfconfig.LoggingConfig{}
- }
- if p.Logging.Grafana == nil {
- p.Logging.Grafana = &ctfconfig.GrafanaConfig{}
- }
- logger.Debug().Msgf("Using %s env var to override Logging.Grafana.DashboardUrl", ctfconfig.E2E_TEST_GRAFANA_DASHBOARD_URL_ENV)
- p.Logging.Grafana.DashboardUrl = &grafanaDashboardUrl
- }
-
- grafanaBearerToken := ctfconfig.MustReadEnvVar_String(ctfconfig.E2E_TEST_GRAFANA_BEARER_TOKEN_ENV)
- if grafanaBearerToken != "" {
- if p.Logging == nil {
- p.Logging = &ctfconfig.LoggingConfig{}
- }
- if p.Logging.Grafana == nil {
- p.Logging.Grafana = &ctfconfig.GrafanaConfig{}
- }
- logger.Debug().Msgf("Using %s env var to override Logging.Grafana.BearerToken", ctfconfig.E2E_TEST_GRAFANA_BEARER_TOKEN_ENV)
- p.Logging.Grafana.BearerToken = &grafanaBearerToken
- }
-
selectedNetworks := ctfconfig.MustReadEnvVar_Strings(ctfconfig.E2E_TEST_SELECTED_NETWORK_ENV, ",")
if len(selectedNetworks) > 0 {
if p.Network == nil {
@@ -421,9 +307,6 @@ func (p *Common) GetSethConfig() *seth.Config {
}
func (p *Common) Validate() error {
- if err := p.Logging.Validate(); err != nil {
- return fmt.Errorf("error validating logging config %w", err)
- }
if p.Network == nil {
return errors.New("no networks specified")
}
diff --git a/integration-tests/ccip-tests/testconfig/tomls/ccip-default.toml b/integration-tests/ccip-tests/testconfig/tomls/ccip-default.toml
index c82e2f930be..89858a94ddb 100644
--- a/integration-tests/ccip-tests/testconfig/tomls/ccip-default.toml
+++ b/integration-tests/ccip-tests/testconfig/tomls/ccip-default.toml
@@ -73,17 +73,6 @@ addresses_to_fund = [
[CCIP.Env.PrivateEthereumNetworks.SIMULATED_2.EthereumChainConfig.HardForkEpochs]
Deneb = 500
-[CCIP.Env.Logging]
-test_log_collect = false # if set to true will save logs even if test did not fail
-
-[CCIP.Env.Logging.LogStream]
-# supported targets: file, loki, in-memory. if empty no logs will be persistet
-log_targets = ["file"]
-# context timeout for starting log producer and also time-frame for requesting logs
-log_producer_timeout = "10s"
-# number of retries before log producer gives up and stops listening to logs
-log_producer_retry_limit = 10
-
# these values will be used to set up chainlink DON
# along with these values, the secrets needs to be specified as part of .env variables
#
diff --git a/integration-tests/ccip-tests/testsetups/test_env.go b/integration-tests/ccip-tests/testsetups/test_env.go
index 263d291453d..3c3406a3e5a 100644
--- a/integration-tests/ccip-tests/testsetups/test_env.go
+++ b/integration-tests/ccip-tests/testsetups/test_env.go
@@ -352,7 +352,6 @@ func DeployLocalCluster(
pointer.GetString(clNode.ChainlinkImage.Image),
pointer.GetString(clNode.ChainlinkImage.Version),
toml,
- env.LogStream,
test_env.WithPgDBOptions(
ctftestenv.WithPostgresImageName(clNode.DBImage),
ctftestenv.WithPostgresImageVersion(clNode.DBTag),
@@ -381,7 +380,6 @@ func DeployLocalCluster(
pointer.GetString(testInputs.EnvInput.NewCLCluster.Common.ChainlinkImage.Image),
pointer.GetString(testInputs.EnvInput.NewCLCluster.Common.ChainlinkImage.Version),
toml,
- env.LogStream,
test_env.WithPgDBOptions(
ctftestenv.WithPostgresImageName(testInputs.EnvInput.NewCLCluster.Common.DBImage),
ctftestenv.WithPostgresImageVersion(testInputs.EnvInput.NewCLCluster.Common.DBTag),
diff --git a/integration-tests/contracts/ccipreader_test.go b/integration-tests/contracts/ccipreader_test.go
index 3028f4707a4..3b0ac1d79a1 100644
--- a/integration-tests/contracts/ccipreader_test.go
+++ b/integration-tests/contracts/ccipreader_test.go
@@ -183,6 +183,123 @@ func emitCommitReports(ctx context.Context, t *testing.T, s *testSetupData, numR
return firstReportTs
}
+func TestCCIPReader_GetOffRampConfigDigest(t *testing.T) {
+ t.Parallel()
+ ctx := tests.Context(t)
+ sb, auth := setupSimulatedBackendAndAuth(t)
+
+ addr, _, _, err := offramp.DeployOffRamp(auth, sb.Client(), offramp.OffRampStaticConfig{
+ ChainSelector: uint64(chainD),
+ GasForCallExactCheck: 5_000,
+ RmnRemote: utils.RandomAddress(),
+ TokenAdminRegistry: utils.RandomAddress(),
+ NonceManager: utils.RandomAddress(),
+ }, offramp.OffRampDynamicConfig{
+ FeeQuoter: utils.RandomAddress(),
+ PermissionLessExecutionThresholdSeconds: 1,
+ IsRMNVerificationDisabled: true,
+ MessageInterceptor: utils.RandomAddress(),
+ }, []offramp.OffRampSourceChainConfigArgs{})
+ require.NoError(t, err)
+ sb.Commit()
+
+ offRamp, err := offramp.NewOffRamp(addr, sb.Client())
+ require.NoError(t, err)
+
+ commitConfigDigest := utils.RandomBytes32()
+ execConfigDigest := utils.RandomBytes32()
+
+ _, err = offRamp.SetOCR3Configs(auth, []offramp.MultiOCR3BaseOCRConfigArgs{
+ {
+ ConfigDigest: commitConfigDigest,
+ OcrPluginType: consts.PluginTypeCommit,
+ F: 1,
+ IsSignatureVerificationEnabled: true,
+ Signers: []common.Address{utils.RandomAddress(), utils.RandomAddress(), utils.RandomAddress(), utils.RandomAddress()},
+ Transmitters: []common.Address{utils.RandomAddress(), utils.RandomAddress(), utils.RandomAddress(), utils.RandomAddress()},
+ },
+ {
+ ConfigDigest: execConfigDigest,
+ OcrPluginType: consts.PluginTypeExecute,
+ F: 1,
+ IsSignatureVerificationEnabled: false,
+ Signers: []common.Address{utils.RandomAddress(), utils.RandomAddress(), utils.RandomAddress(), utils.RandomAddress()},
+ Transmitters: []common.Address{utils.RandomAddress(), utils.RandomAddress(), utils.RandomAddress(), utils.RandomAddress()},
+ },
+ })
+ require.NoError(t, err)
+ sb.Commit()
+
+ commitConfigDetails, err := offRamp.LatestConfigDetails(&bind.CallOpts{
+ Context: ctx,
+ }, consts.PluginTypeCommit)
+ require.NoError(t, err)
+ require.Equal(t, commitConfigDigest, commitConfigDetails.ConfigInfo.ConfigDigest)
+
+ execConfigDetails, err := offRamp.LatestConfigDetails(&bind.CallOpts{
+ Context: ctx,
+ }, consts.PluginTypeExecute)
+ require.NoError(t, err)
+ require.Equal(t, execConfigDigest, execConfigDetails.ConfigInfo.ConfigDigest)
+
+ db := pgtest.NewSqlxDB(t)
+ lggr := logger.TestLogger(t)
+ lggr.SetLogLevel(zapcore.ErrorLevel)
+ lpOpts := logpoller.Opts{
+ PollPeriod: time.Millisecond,
+ FinalityDepth: 1,
+ BackfillBatchSize: 10,
+ RpcBatchSize: 10,
+ KeepFinalizedBlocksDepth: 100000,
+ }
+ cl := client.NewSimulatedBackendClient(t, sb, big.NewInt(1337))
+ headTracker := headtracker.NewSimulatedHeadTracker(cl, lpOpts.UseFinalityTag, lpOpts.FinalityDepth)
+ orm := logpoller.NewORM(big.NewInt(1337), db, lggr)
+ lp := logpoller.NewLogPoller(
+ orm,
+ cl,
+ lggr,
+ headTracker,
+ lpOpts,
+ )
+ require.NoError(t, lp.Start(ctx))
+ t.Cleanup(func() { require.NoError(t, lp.Close()) })
+
+ cr, err := evm.NewChainReaderService(ctx, lggr, lp, headTracker, cl, evmconfig.DestReaderConfig)
+ require.NoError(t, err)
+ err = cr.Start(ctx)
+ require.NoError(t, err)
+ t.Cleanup(func() { require.NoError(t, cr.Close()) })
+
+ extendedCr := contractreader.NewExtendedContractReader(cr)
+ err = extendedCr.Bind(ctx, []types.BoundContract{
+ {
+ Address: addr.Hex(),
+ Name: consts.ContractNameOffRamp,
+ },
+ })
+ require.NoError(t, err)
+
+ reader := ccipreaderpkg.NewCCIPReaderWithExtendedContractReaders(
+ ctx,
+ lggr,
+ map[cciptypes.ChainSelector]contractreader.Extended{
+ chainD: extendedCr,
+ },
+ nil,
+ chainD,
+ addr.Bytes(),
+ )
+
+ ccipReaderCommitDigest, err := reader.GetOffRampConfigDigest(ctx, consts.PluginTypeCommit)
+ require.NoError(t, err)
+ require.Equal(t, commitConfigDigest, ccipReaderCommitDigest)
+
+ ccipReaderExecDigest, err := reader.GetOffRampConfigDigest(ctx, consts.PluginTypeExecute)
+ require.NoError(t, err)
+ require.Equal(t, execConfigDigest, ccipReaderExecDigest)
+}
+
func TestCCIPReader_CommitReportsGTETimestamp(t *testing.T) {
t.Parallel()
ctx := tests.Context(t)
@@ -473,11 +590,7 @@ func TestCCIPReader_GetExpectedNextSequenceNumber(t *testing.T) {
t.Parallel()
ctx := tests.Context(t)
//env := NewMemoryEnvironmentContractsOnly(t, logger.TestLogger(t), 2, 4, nil)
- env := changeset.NewMemoryEnvironmentWithJobsAndContracts(t, logger.TestLogger(t), memory.MemoryEnvironmentConfig{
- Chains: 2,
- Nodes: 4,
- Bootstraps: 1,
- }, nil)
+ env := changeset.NewMemoryEnvironment(t)
state, err := changeset.LoadOnchainState(env.Env)
require.NoError(t, err)
@@ -587,11 +700,7 @@ func TestCCIPReader_Nonces(t *testing.T) {
func Test_GetChainFeePriceUpdates(t *testing.T) {
t.Parallel()
ctx := tests.Context(t)
- env := changeset.NewMemoryEnvironmentWithJobsAndContracts(t, logger.TestLogger(t), memory.MemoryEnvironmentConfig{
- Chains: 2,
- Nodes: 4,
- Bootstraps: 1,
- }, nil)
+ env := changeset.NewMemoryEnvironment(t)
state, err := changeset.LoadOnchainState(env.Env)
require.NoError(t, err)
@@ -647,11 +756,7 @@ func Test_GetChainFeePriceUpdates(t *testing.T) {
func Test_LinkPriceUSD(t *testing.T) {
t.Parallel()
ctx := tests.Context(t)
- env := changeset.NewMemoryEnvironmentWithJobsAndContracts(t, logger.TestLogger(t), memory.MemoryEnvironmentConfig{
- Chains: 2,
- Nodes: 4,
- Bootstraps: 1,
- }, nil)
+ env := changeset.NewMemoryEnvironment(t)
state, err := changeset.LoadOnchainState(env.Env)
require.NoError(t, err)
@@ -686,11 +791,7 @@ func Test_LinkPriceUSD(t *testing.T) {
func Test_GetMedianDataAvailabilityGasConfig(t *testing.T) {
t.Parallel()
ctx := tests.Context(t)
- env := changeset.NewMemoryEnvironmentWithJobsAndContracts(t, logger.TestLogger(t), memory.MemoryEnvironmentConfig{
- Chains: 4,
- Nodes: 4,
- Bootstraps: 1,
- }, nil)
+ env := changeset.NewMemoryEnvironment(t, changeset.WithChains(4))
state, err := changeset.LoadOnchainState(env.Env)
require.NoError(t, err)
@@ -749,11 +850,7 @@ func Test_GetMedianDataAvailabilityGasConfig(t *testing.T) {
func Test_GetWrappedNativeTokenPriceUSD(t *testing.T) {
t.Parallel()
ctx := tests.Context(t)
- env := changeset.NewMemoryEnvironmentWithJobsAndContracts(t, logger.TestLogger(t), memory.MemoryEnvironmentConfig{
- Chains: 2,
- Nodes: 4,
- Bootstraps: 1,
- }, nil)
+ env := changeset.NewMemoryEnvironment(t)
state, err := changeset.LoadOnchainState(env.Env)
require.NoError(t, err)
diff --git a/integration-tests/docker/test_env/cl_node.go b/integration-tests/docker/test_env/cl_node.go
index b5c2505b252..8ebaf579d0a 100644
--- a/integration-tests/docker/test_env/cl_node.go
+++ b/integration-tests/docker/test_env/cl_node.go
@@ -24,7 +24,6 @@ import (
"github.com/smartcontractkit/chainlink-testing-framework/lib/docker"
"github.com/smartcontractkit/chainlink-testing-framework/lib/docker/test_env"
"github.com/smartcontractkit/chainlink-testing-framework/lib/logging"
- "github.com/smartcontractkit/chainlink-testing-framework/lib/logstream"
"github.com/smartcontractkit/chainlink-testing-framework/lib/utils/testcontext"
"github.com/smartcontractkit/chainlink/v2/core/services/chainlink"
@@ -126,11 +125,11 @@ func WithPgDBOptions(opts ...test_env.PostgresDbOption) ClNodeOption {
}
}
-func NewClNode(networks []string, imageName, imageVersion string, nodeConfig *chainlink.Config, logStream *logstream.LogStream, opts ...ClNodeOption) (*ClNode, error) {
+func NewClNode(networks []string, imageName, imageVersion string, nodeConfig *chainlink.Config, opts ...ClNodeOption) (*ClNode, error) {
nodeDefaultCName := fmt.Sprintf("%s-%s", "cl-node", uuid.NewString()[0:8])
pgDefaultCName := fmt.Sprintf("pg-%s", nodeDefaultCName)
- pgDb, err := test_env.NewPostgresDb(networks, test_env.WithPostgresDbContainerName(pgDefaultCName), test_env.WithPostgresDbLogStream(logStream))
+ pgDb, err := test_env.NewPostgresDb(networks, test_env.WithPostgresDbContainerName(pgDefaultCName))
if err != nil {
return nil, err
}
@@ -140,7 +139,6 @@ func NewClNode(networks []string, imageName, imageVersion string, nodeConfig *ch
ContainerImage: imageName,
ContainerVersion: imageVersion,
Networks: networks,
- LogStream: logStream,
StartupTimeout: 3 * time.Minute,
},
UserEmail: "local@local.com",
@@ -490,28 +488,6 @@ func (n *ClNode) getContainerRequest(secrets string) (
FileMode: 0644,
},
},
- LifecycleHooks: []tc.ContainerLifecycleHooks{
- {
- PostStarts: []tc.ContainerHook{
- func(ctx context.Context, c tc.Container) error {
- if n.LogStream != nil {
- return n.LogStream.ConnectContainer(ctx, c, "")
- }
- return nil
- },
- },
- PreStops: []tc.ContainerHook{
- func(ctx context.Context, c tc.Container) error {
- if n.LogStream != nil {
- return n.LogStream.DisconnectContainer(c)
- }
- return nil
- },
- },
- PostStops: n.PostStopsHooks,
- PreTerminates: n.PreTerminatesHooks,
- },
- },
}, nil
}
diff --git a/integration-tests/docker/test_env/test_env.go b/integration-tests/docker/test_env/test_env.go
index 1ca50760d17..a37b7f813a7 100644
--- a/integration-tests/docker/test_env/test_env.go
+++ b/integration-tests/docker/test_env/test_env.go
@@ -20,8 +20,6 @@ import (
"github.com/smartcontractkit/chainlink-testing-framework/lib/docker"
"github.com/smartcontractkit/chainlink-testing-framework/lib/docker/test_env"
"github.com/smartcontractkit/chainlink-testing-framework/lib/logging"
- "github.com/smartcontractkit/chainlink-testing-framework/lib/logstream"
- "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/runid"
"github.com/smartcontractkit/chainlink/integration-tests/testconfig/ccip"
"github.com/smartcontractkit/chainlink/v2/core/services/chainlink"
@@ -36,7 +34,6 @@ var (
type CLClusterTestEnv struct {
Cfg *TestEnvConfig
DockerNetwork *tc.DockerNetwork
- LogStream *logstream.LogStream
TestConfig ctf_config.GlobalTestConfig
/* components */
@@ -69,7 +66,7 @@ func (te *CLClusterTestEnv) WithTestEnvConfig(cfg *TestEnvConfig) *CLClusterTest
te.Cfg = cfg
if cfg.MockAdapter.ContainerName != "" {
n := []string{te.DockerNetwork.Name}
- te.MockAdapter = test_env.NewKillgrave(n, te.Cfg.MockAdapter.ImpostersPath, test_env.WithContainerName(te.Cfg.MockAdapter.ContainerName), test_env.WithLogStream(te.LogStream))
+ te.MockAdapter = test_env.NewKillgrave(n, te.Cfg.MockAdapter.ImpostersPath, test_env.WithContainerName(te.Cfg.MockAdapter.ContainerName))
}
return te
}
@@ -99,7 +96,6 @@ func (te *CLClusterTestEnv) StartEthereumNetwork(cfg *ctf_config.EthereumNetwork
builder := test_env.NewEthereumNetworkBuilder()
c, err := builder.WithExistingConfig(*cfg).
WithTest(te.t).
- WithLogStream(te.LogStream).
Build()
if err != nil {
return blockchain.EVMNetwork{}, test_env.RpcProvider{}, err
@@ -132,7 +128,6 @@ func (te *CLClusterTestEnv) StartJobDistributor(cfg *ccip.JDConfig) error {
job_distributor.WithVersion(cfg.GetJDVersion()),
job_distributor.WithDBURL(jdDB.InternalURL.String()),
)
- jd.LogStream = te.LogStream
err = jd.StartContainer()
if err != nil {
return fmt.Errorf("failed to start job-distributor: %w", err)
@@ -160,7 +155,7 @@ func (te *CLClusterTestEnv) StartClCluster(nodeConfig *chainlink.Config, count i
opts = append(opts, WithSecrets(secretsConfig))
te.ClCluster = &ClCluster{}
for i := 0; i < count; i++ {
- ocrNode, err := NewClNode([]string{te.DockerNetwork.Name}, *testconfig.GetChainlinkImageConfig().Image, *testconfig.GetChainlinkImageConfig().Version, nodeConfig, te.LogStream, opts...)
+ ocrNode, err := NewClNode([]string{te.DockerNetwork.Name}, *testconfig.GetChainlinkImageConfig().Image, *testconfig.GetChainlinkImageConfig().Version, nodeConfig, opts...)
if err != nil {
return err
}
@@ -193,11 +188,6 @@ type CleanupOpts struct {
func (te *CLClusterTestEnv) Cleanup(opts CleanupOpts) error {
te.l.Info().Msg("Cleaning up test environment")
- runIdErr := runid.RemoveLocalRunId(te.TestConfig.GetLoggingConfig().RunId)
- if runIdErr != nil {
- te.l.Warn().Msgf("Failed to remove .run.id file due to: %s (not a big deal, you can still remove it manually)", runIdErr.Error())
- }
-
if te.t == nil {
return fmt.Errorf("cannot cleanup test environment without a testing.T")
}
diff --git a/integration-tests/docker/test_env/test_env_builder.go b/integration-tests/docker/test_env/test_env_builder.go
index cdce826f2c2..e11a3c96095 100644
--- a/integration-tests/docker/test_env/test_env_builder.go
+++ b/integration-tests/docker/test_env/test_env_builder.go
@@ -2,28 +2,25 @@ package test_env
import (
"fmt"
- "math"
"os"
"path/filepath"
- "slices"
"strings"
+ "sync"
"testing"
"time"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"go.uber.org/zap/zapcore"
-
- "github.com/smartcontractkit/chainlink-testing-framework/seth"
+ "golang.org/x/sync/errgroup"
"github.com/smartcontractkit/chainlink-testing-framework/lib/blockchain"
ctf_config "github.com/smartcontractkit/chainlink-testing-framework/lib/config"
+ ctf_docker "github.com/smartcontractkit/chainlink-testing-framework/lib/docker"
"github.com/smartcontractkit/chainlink-testing-framework/lib/docker/test_env"
"github.com/smartcontractkit/chainlink-testing-framework/lib/logging"
- "github.com/smartcontractkit/chainlink-testing-framework/lib/logstream"
"github.com/smartcontractkit/chainlink-testing-framework/lib/networks"
"github.com/smartcontractkit/chainlink-testing-framework/lib/testreporters"
- "github.com/smartcontractkit/chainlink-testing-framework/lib/testsummary"
"github.com/smartcontractkit/chainlink-testing-framework/lib/utils/osutil"
"github.com/smartcontractkit/chainlink/integration-tests/testconfig/ccip"
@@ -46,7 +43,6 @@ type ChainlinkNodeLogScannerSettings struct {
}
type CLTestEnvBuilder struct {
- hasLogStream bool
hasKillgrave bool
jdConfig *ccip.JDConfig
clNodeConfig *chainlink.Config
@@ -90,7 +86,6 @@ func GetDefaultChainlinkNodeLogScannerSettingsWithExtraAllowedMessages(extraAllo
func NewCLTestEnvBuilder() *CLTestEnvBuilder {
return &CLTestEnvBuilder{
l: log.Logger,
- hasLogStream: true,
isEVM: true,
chainlinkNodeLogScannerSettings: &DefaultChainlinkNodeLogScannerSettings,
}
@@ -134,12 +129,6 @@ func (b *CLTestEnvBuilder) WithTestInstance(t *testing.T) *CLTestEnvBuilder {
return b
}
-// WithoutLogStream disables LogStream logging component
-func (b *CLTestEnvBuilder) WithoutLogStream() *CLTestEnvBuilder {
- b.hasLogStream = false
- return b
-}
-
func (b *CLTestEnvBuilder) WithoutChainlinkNodeLogScanner() *CLTestEnvBuilder {
b.chainlinkNodeLogScannerSettings = &ChainlinkNodeLogScannerSettings{}
return b
@@ -250,102 +239,105 @@ func (b *CLTestEnvBuilder) Build() (*CLClusterTestEnv, error) {
b.te.WithTestInstance(b.t)
}
- if b.hasLogStream {
- loggingConfig := b.testConfig.GetLoggingConfig()
- // we need to enable logging to file if we want to scan logs
- if b.chainlinkNodeLogScannerSettings != nil && !slices.Contains(loggingConfig.LogStream.LogTargets, string(logstream.File)) {
- b.l.Debug().Msg("Enabling logging to file in order to support Chainlink node log scanning")
- loggingConfig.LogStream.LogTargets = append(loggingConfig.LogStream.LogTargets, string(logstream.File))
- }
- b.te.LogStream, err = logstream.NewLogStream(b.te.t, b.testConfig.GetLoggingConfig())
- if err != nil {
- return nil, err
- }
-
- // this clean up has to be added as the FIRST one, because cleanup functions are executed in reverse order (LIFO)
- if b.t != nil && b.cleanUpType != CleanUpTypeNone {
- b.t.Cleanup(func() {
- b.l.Info().Msg("Shutting down LogStream")
- logPath, err := osutil.GetAbsoluteFolderPath("logs")
- if err == nil {
- b.l.Info().Str("Absolute path", logPath).Msg("LogStream logs folder location")
- }
-
- // flush logs when test failed or when we are explicitly told to collect logs
- flushLogStream := b.t.Failed() || *b.testConfig.GetLoggingConfig().TestLogCollect
+ // this clean up has to be added as the FIRST one, because cleanup functions are executed in reverse order (LIFO)
+ if b.t != nil && b.cleanUpType != CleanUpTypeNone {
+ b.t.Cleanup(func() {
+ logsDir := fmt.Sprintf("logs/%s-%s", b.t.Name(), time.Now().Format("2006-01-02T15-04-05"))
+ loggingErr := ctf_docker.WriteAllContainersLogs(b.l, logsDir)
+ if loggingErr != nil {
+ b.l.Error().Err(loggingErr).Msg("Error writing all Docker containers logs")
+ }
- // run even if test has failed, as we might be able to catch additional problems without running the test again
- if b.chainlinkNodeLogScannerSettings != nil {
- logProcessor := logstream.NewLogProcessor[int](b.te.LogStream)
+ if b == nil || b.te == nil || b.te.ClCluster == nil || b.te.ClCluster.Nodes == nil {
+ log.Warn().Msg("Won't dump container and postgres logs, because test environment doesn't have any nodes")
+ return
+ }
- processFn := func(log logstream.LogContent, count *int) error {
- countSoFar := count
- if *countSoFar < 0 {
- return fmt.Errorf("negative count: %d", *countSoFar)
- }
- newCount, err := testreporters.ScanLogLine(b.l, string(log.Content), b.chainlinkNodeLogScannerSettings.FailingLogLevel, uint(*countSoFar), b.chainlinkNodeLogScannerSettings.Threshold, b.chainlinkNodeLogScannerSettings.AllowedMessages)
- if err != nil {
- return err
- }
- if newCount > math.MaxInt {
- return fmt.Errorf("new count overflows int: %d", newCount)
- }
- *count = int(newCount)
- return nil
- }
+ if b.chainlinkNodeLogScannerSettings != nil {
+ var logFiles []*os.File
- // we cannot do parallel processing here, because ProcessContainerLogs() locks a mutex that controls whether
- // new logs can be added to the log stream, so parallel processing would get stuck on waiting for it to be unlocked
- LogScanningLoop:
- for i := 0; i < b.clNodesCount; i++ {
- // if something went wrong during environment setup we might not have all nodes, and we don't want an NPE
- if b == nil || b.te == nil || b.te.ClCluster == nil || b.te.ClCluster.Nodes == nil || len(b.te.ClCluster.Nodes)-1 < i || b.te.ClCluster.Nodes[i] == nil {
+ // when tests run in parallel, we need to make sure that we only process logs that belong to nodes created by the current test
+ // that is required, because some tests might have custom log messages that are allowed, but only for that test (e.g. because they restart the CL node)
+ var belongsToCurrentEnv = func(filePath string) bool {
+ for _, clNode := range b.te.ClCluster.Nodes {
+ if clNode == nil {
continue
}
- // ignore count return, because we are only interested in the error
- _, err := logProcessor.ProcessContainerLogs(b.te.ClCluster.Nodes[i].ContainerName, processFn)
- if err != nil && !strings.Contains(err.Error(), testreporters.MultipleLogsAtLogLevelErr) && !strings.Contains(err.Error(), testreporters.OneLogAtLogLevelErr) {
- b.l.Error().Err(err).Msg("Error processing CL node logs")
- continue
- } else if err != nil && (strings.Contains(err.Error(), testreporters.MultipleLogsAtLogLevelErr) || strings.Contains(err.Error(), testreporters.OneLogAtLogLevelErr)) {
- flushLogStream = true
- b.t.Errorf("Found a concerning log in Chainklink Node logs: %v", err)
- break LogScanningLoop
+ if strings.EqualFold(filePath, clNode.ContainerName+".log") {
+ return true
}
}
- b.l.Info().Msg("Finished scanning Chainlink Node logs for concerning errors")
+ return false
}
- if flushLogStream {
- b.l.Info().Msg("Flushing LogStream logs")
- // we can't do much if this fails, so we just log the error in LogStream
- if err := b.te.LogStream.FlushAndShutdown(); err != nil {
- b.l.Error().Err(err).Msg("Error flushing and shutting down LogStream")
+ fileWalkErr := filepath.Walk(logsDir, func(path string, info os.FileInfo, err error) error {
+ if err != nil {
+ return err
}
- b.te.LogStream.PrintLogTargetsLocations()
- b.te.LogStream.SaveLogLocationInTestSummary()
- }
- b.l.Info().Msg("Finished shutting down LogStream")
+ if !info.IsDir() && belongsToCurrentEnv(info.Name()) {
+ file, fileErr := os.Open(path)
+ if fileErr != nil {
+ return fmt.Errorf("failed to open file %s: %w", path, fileErr)
+ }
+ logFiles = append(logFiles, file)
+ }
+ return nil
+ })
- if b.t.Failed() || *b.testConfig.GetLoggingConfig().TestLogCollect {
- b.l.Info().Msg("Dump state of all Postgres DBs used by Chainlink Nodes")
+ if len(logFiles) != len(b.te.ClCluster.Nodes) {
+ b.l.Warn().Int("Expected", len(b.te.ClCluster.Nodes)).Int("Got", len(logFiles)).Msg("Number of log files does not match number of nodes. Some logs might be missing.")
+ }
- dbDumpFolder := "db_dumps"
- dbDumpPath := fmt.Sprintf("%s/%s-%s", dbDumpFolder, b.t.Name(), time.Now().Format("2006-01-02T15-04-05"))
- if err := os.MkdirAll(dbDumpPath, os.ModePerm); err != nil {
- b.l.Error().Err(err).Msg("Error creating folder for Postgres DB dump")
- return
+ if fileWalkErr != nil {
+ b.l.Error().Err(fileWalkErr).Msg("Error walking through log files. Skipping log verification.")
+ } else {
+ verifyLogsGroup := &errgroup.Group{}
+ for _, f := range logFiles {
+ file := f
+ verifyLogsGroup.Go(func() error {
+ verifyErr := testreporters.VerifyLogFile(file, b.chainlinkNodeLogScannerSettings.FailingLogLevel, b.chainlinkNodeLogScannerSettings.Threshold, b.chainlinkNodeLogScannerSettings.AllowedMessages...)
+ _ = file.Close()
+ // ignore processing errors
+ if verifyErr != nil && !strings.Contains(verifyErr.Error(), testreporters.MultipleLogsAtLogLevelErr) && !strings.Contains(verifyErr.Error(), testreporters.OneLogAtLogLevelErr) {
+ b.l.Error().Err(verifyErr).Msg("Error processing CL node logs")
+
+ return nil
+
+ // if it's not a processing error, we want to fail the test; we also can stop processing logs all together at this point
+ } else if verifyErr != nil && (strings.Contains(verifyErr.Error(), testreporters.MultipleLogsAtLogLevelErr) || strings.Contains(verifyErr.Error(), testreporters.OneLogAtLogLevelErr)) {
+
+ return verifyErr
+ }
+ return nil
+ })
}
- absDbDumpPath, err := osutil.GetAbsoluteFolderPath(dbDumpFolder)
- if err == nil {
- b.l.Info().Str("Absolute path", absDbDumpPath).Msg("PostgresDB dump folder location")
+ if logVerificationErr := verifyLogsGroup.Wait(); logVerificationErr != nil {
+ b.t.Errorf("Found a concerning log in Chainklink Node logs: %v", logVerificationErr)
}
+ }
+ }
- for i := 0; i < b.clNodesCount; i++ {
+ b.l.Info().Msg("Staring to dump state of all Postgres DBs used by Chainlink Nodes")
+
+ dbDumpFolder := "db_dumps"
+ dbDumpPath := fmt.Sprintf("%s/%s-%s", dbDumpFolder, b.t.Name(), time.Now().Format("2006-01-02T15-04-05"))
+ if err := os.MkdirAll(dbDumpPath, os.ModePerm); err != nil {
+ b.l.Error().Err(err).Msg("Error creating folder for Postgres DB dump")
+ } else {
+ absDbDumpPath, err := osutil.GetAbsoluteFolderPath(dbDumpFolder)
+ if err == nil {
+ b.l.Info().Str("Absolute path", absDbDumpPath).Msg("PostgresDB dump folder location")
+ }
+
+ dbDumpGroup := sync.WaitGroup{}
+ for i := 0; i < b.clNodesCount; i++ {
+ dbDumpGroup.Add(1)
+ go func() {
+ defer dbDumpGroup.Done()
// if something went wrong during environment setup we might not have all nodes, and we don't want an NPE
if b == nil || b.te == nil || b.te.ClCluster == nil || b.te.ClCluster.Nodes == nil || len(b.te.ClCluster.Nodes)-1 < i || b.te.ClCluster.Nodes[i] == nil || b.te.ClCluster.Nodes[i].PostgresDb == nil {
- continue
+ return
}
filePath := filepath.Join(dbDumpPath, fmt.Sprintf("postgres_db_dump_%s.sql", b.te.ClCluster.Nodes[i].ContainerName))
@@ -353,24 +345,23 @@ func (b *CLTestEnvBuilder) Build() (*CLClusterTestEnv, error) {
if err != nil {
b.l.Error().Err(err).Msg("Error creating localDbDumpFile for Postgres DB dump")
_ = localDbDumpFile.Close()
- continue
+ return
}
if err := b.te.ClCluster.Nodes[i].PostgresDb.ExecPgDumpFromContainer(localDbDumpFile); err != nil {
b.l.Error().Err(err).Msg("Error dumping Postgres DB")
}
_ = localDbDumpFile.Close()
- }
- b.l.Info().Msg("Finished dumping state of all Postgres DBs used by Chainlink Nodes")
+ }()
}
- if b.testConfig.GetSethConfig() != nil && ((b.t.Failed() && slices.Contains(b.testConfig.GetSethConfig().TraceOutputs, seth.TraceOutput_DOT) && b.testConfig.GetSethConfig().TracingLevel != seth.TracingLevel_None) || (!b.t.Failed() && slices.Contains(b.testConfig.GetSethConfig().TraceOutputs, seth.TraceOutput_DOT) && b.testConfig.GetSethConfig().TracingLevel == seth.TracingLevel_All)) {
- _ = testsummary.AddEntry(b.t.Name(), "dot_graphs", "true")
- }
- })
- } else {
- b.l.Warn().Msg("LogStream won't be cleaned up, because either test instance is not set or cleanup type is set to none")
- }
+ dbDumpGroup.Wait()
+
+ b.l.Info().Msg("Finished dumping state of all Postgres DBs used by Chainlink Nodes")
+ }
+ })
+ } else {
+ b.l.Warn().Msg("Won't dump container and postgres logs, because either test instance is not set or cleanup type is set to none")
}
if b.hasKillgrave {
@@ -378,7 +369,7 @@ func (b *CLTestEnvBuilder) Build() (*CLClusterTestEnv, error) {
return nil, fmt.Errorf("test environment builder failed: %w", fmt.Errorf("cannot start mock adapter without a network"))
}
- b.te.MockAdapter = test_env.NewKillgrave([]string{b.te.DockerNetwork.Name}, "", test_env.WithLogStream(b.te.LogStream))
+ b.te.MockAdapter = test_env.NewKillgrave([]string{b.te.DockerNetwork.Name}, "")
err = b.te.StartMockAdapter()
if err != nil {
@@ -406,10 +397,6 @@ func (b *CLTestEnvBuilder) Build() (*CLClusterTestEnv, error) {
return b.te, fmt.Errorf("test environment builder failed: %w", fmt.Errorf("explicit cleanup type must be set when building test environment"))
}
- if b.te.LogStream == nil && b.chainlinkNodeLogScannerSettings != nil {
- log.Warn().Msg("Chainlink node log scanner settings provided, but LogStream is not enabled. Ignoring Chainlink node log scanner settings, as no logs will be available.")
- }
-
if b.jdConfig != nil {
err := b.te.StartJobDistributor(b.jdConfig)
if err != nil {
diff --git a/integration-tests/go.mod b/integration-tests/go.mod
index 58b2a6fa1c4..b5da0a24d2d 100644
--- a/integration-tests/go.mod
+++ b/integration-tests/go.mod
@@ -9,6 +9,13 @@ replace github.com/smartcontractkit/chainlink/v2 => ../
replace github.com/smartcontractkit/chainlink/deployment => ../deployment
+// Using a separate `require` here to avoid surrounding line changes
+// creating potential merge conflicts.
+require (
+ github.com/smartcontractkit/chainlink/deployment v0.0.0-20241206210521-125d98cdaf66
+ github.com/smartcontractkit/chainlink/v2 v2.0.0-20241206210521-125d98cdaf66
+)
+
require (
dario.cat/mergo v1.0.1
github.com/AlekSi/pointer v1.1.0
@@ -37,19 +44,16 @@ require (
github.com/segmentio/ksuid v1.0.4
github.com/shopspring/decimal v1.4.0
github.com/slack-go/slack v0.15.0
- github.com/smartcontractkit/ccip-owner-contracts v0.0.0-20240926212305-a6deabdfce86
github.com/smartcontractkit/chain-selectors v1.0.34
github.com/smartcontractkit/chainlink-automation v0.8.1
- github.com/smartcontractkit/chainlink-ccip v0.0.0-20241204015713-8956bb614e9e
- github.com/smartcontractkit/chainlink-common v0.3.1-0.20241209151352-70300ddcc776
+ github.com/smartcontractkit/chainlink-ccip v0.0.0-20241213122413-5e8f65dd6b1b
+ github.com/smartcontractkit/chainlink-common v0.3.1-0.20241214155818-b403079b2805
github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0
github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.2
- github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.18
+ github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.19
github.com/smartcontractkit/chainlink-testing-framework/lib/grafana v1.50.0
github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.9
github.com/smartcontractkit/chainlink-testing-framework/wasp v1.50.2
- github.com/smartcontractkit/chainlink/deployment v0.0.0-00010101000000-000000000000
- github.com/smartcontractkit/chainlink/v2 v2.14.0-mercury-20240807.0.20241120195829-bd7a1943ad07
github.com/smartcontractkit/libocr v0.0.0-20241007185508-adbe57025f12
github.com/spf13/cobra v1.8.1
github.com/stretchr/testify v1.9.0
@@ -60,10 +64,10 @@ require (
go.uber.org/atomic v1.11.0
go.uber.org/multierr v1.11.0
go.uber.org/zap v1.27.0
- golang.org/x/crypto v0.28.0
+ golang.org/x/crypto v0.31.0
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c
- golang.org/x/sync v0.8.0
- golang.org/x/text v0.19.0
+ golang.org/x/sync v0.10.0
+ golang.org/x/text v0.21.0
google.golang.org/grpc v1.67.1
gopkg.in/guregu/null.v4 v4.0.0
k8s.io/apimachinery v0.31.2
@@ -101,7 +105,7 @@ require (
github.com/VictoriaMetrics/fastcache v1.12.2 // indirect
github.com/XSAM/otelsql v0.27.0 // indirect
github.com/alecthomas/units v0.0.0-20240626203959-61d1e3462e30 // indirect
- github.com/andybalholm/brotli v1.1.0 // indirect
+ github.com/andybalholm/brotli v1.1.1 // indirect
github.com/armon/go-metrics v0.4.1 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/atombender/go-jsonschema v0.16.1-0.20240916205339-a74cd4e2851c // indirect
@@ -241,7 +245,7 @@ require (
github.com/go-viper/mapstructure/v2 v2.1.0 // indirect
github.com/go-webauthn/webauthn v0.9.4 // indirect
github.com/go-webauthn/x v0.1.5 // indirect
- github.com/goccy/go-json v0.10.2 // indirect
+ github.com/goccy/go-json v0.10.3 // indirect
github.com/goccy/go-yaml v1.12.0 // indirect
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
github.com/gofrs/flock v0.8.1 // indirect
@@ -333,8 +337,8 @@ require (
github.com/json-iterator/go v1.1.12 // indirect
github.com/julienschmidt/httprouter v1.3.0 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
- github.com/klauspost/compress v1.17.9 // indirect
- github.com/klauspost/cpuid/v2 v2.2.7 // indirect
+ github.com/klauspost/compress v1.17.11 // indirect
+ github.com/klauspost/cpuid/v2 v2.2.8 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
@@ -419,11 +423,12 @@ require (
github.com/shirou/gopsutil/v3 v3.24.3 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
+ github.com/smartcontractkit/ccip-owner-contracts v0.0.0-salt-fix // indirect
github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20241202195413-82468150ac1e // indirect
- github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20241202141438-a90db35252db // indirect
+ github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20241216163550-fa030d178ba3 // indirect
github.com/smartcontractkit/chainlink-feeds v0.1.1 // indirect
- github.com/smartcontractkit/chainlink-protos/orchestrator v0.3.2 // indirect
- github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241204153209-c3a71b0eef99 // indirect
+ github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0 // indirect
+ github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241210172617-6fd1891d0fbc // indirect
github.com/smartcontractkit/chainlink-starknet/relayer v0.1.1-0.20241202202529-2033490e77b8 // indirect
github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 // indirect
github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de // indirect
@@ -504,8 +509,8 @@ require (
golang.org/x/mod v0.21.0 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/oauth2 v0.23.0 // indirect
- golang.org/x/sys v0.26.0 // indirect
- golang.org/x/term v0.25.0 // indirect
+ golang.org/x/sys v0.28.0 // indirect
+ golang.org/x/term v0.27.0 // indirect
golang.org/x/time v0.7.0 // indirect
golang.org/x/tools v0.26.0 // indirect
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
diff --git a/integration-tests/go.sum b/integration-tests/go.sum
index 4f31dd61871..71bf4dc9ccb 100644
--- a/integration-tests/go.sum
+++ b/integration-tests/go.sum
@@ -180,9 +180,11 @@ github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2uc
github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129/go.mod h1:rFgpPQZYZ8vdbc+48xibu8ALc3yeyd64IhHS+PU6Yyg=
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ=
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
-github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M=
-github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY=
+github.com/andybalholm/brotli v1.1.1 h1:PR2pgnyFznKEugtsUo0xLdDop5SKXd5Qf5ysW+7XdTA=
+github.com/andybalholm/brotli v1.1.1/go.mod h1:05ib4cKhjx3OQYUY22hTVd34Bc8upXjOLL2rKwwZBoA=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
+github.com/apache/arrow-go/v18 v18.0.0 h1:1dBDaSbH3LtulTyOVYaBCHO3yVRwjV+TZaqn3g6V7ZM=
+github.com/apache/arrow-go/v18 v18.0.0/go.mod h1:t6+cWRSmKgdQ6HsxisQjok+jBpKGhRDiqcf3p0p/F+A=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
@@ -550,8 +552,8 @@ github.com/gedex/inflector v0.0.0-20170307190818-16278e9db813/go.mod h1:P+oSoE9y
github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps=
github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
-github.com/gin-contrib/cors v1.5.0 h1:DgGKV7DDoOn36DFkNtbHrjoRiT5ExCe+PC9/xp7aKvk=
-github.com/gin-contrib/cors v1.5.0/go.mod h1:TvU7MAZ3EwrPLI2ztzTt3tqgvBCq+wn8WpZmfADjupI=
+github.com/gin-contrib/cors v1.7.2 h1:oLDHxdg8W/XDoN/8zamqk/Drgt4oVZDvaV0YmvVICQw=
+github.com/gin-contrib/cors v1.7.2/go.mod h1:SUJVARKgQ40dmrzgXEVxj2m7Ig1v1qIboQkPDTQ9t2E=
github.com/gin-contrib/expvar v0.0.1 h1:IuU5ArEgihz50vG8Onrwz22kJr7Mcvgv9xSSpfU5g+w=
github.com/gin-contrib/expvar v0.0.1/go.mod h1:8o2CznfQi1JjktORdHr2/abg3wSV6OCnXh0yGypvvVw=
github.com/gin-contrib/sessions v0.0.5 h1:CATtfHmLMQrMNpJRgzjWXD7worTh7g7ritsQfmF+0jE=
@@ -642,8 +644,8 @@ github.com/go-webauthn/x v0.1.5 h1:V2TCzDU2TGLd0kSZOXdrqDVV5JB9ILnKxA9S53CSBw0=
github.com/go-webauthn/x v0.1.5/go.mod h1:qbzWwcFcv4rTwtCLOZd+icnr6B7oSsAGZJqlt8cukqY=
github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg=
github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw=
-github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
-github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
+github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA=
+github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
github.com/goccy/go-yaml v1.12.0 h1:/1WHjnMsI1dlIBQutrvSMGZRQufVO3asrHfTwfACoPM=
github.com/goccy/go-yaml v1.12.0/go.mod h1:wKnAMd44+9JAAnGQpWVEgBzGt3YuTaQ4uXoHvE4m7WU=
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0=
@@ -711,6 +713,8 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU=
github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
+github.com/google/flatbuffers v24.3.25+incompatible h1:CX395cjN9Kke9mmalRoL3d81AtFUxJM+yDthflgJGkI=
+github.com/google/flatbuffers v24.3.25+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8=
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 h1:0VpGH+cDhbDtdcweoyCVsF3fhN8kejK6rFe/2FFX2nU=
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49/go.mod h1:BkkQ4L1KS1xMt2aWSPStnn55ChGC0DPOn2FQYj+f25M=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
@@ -1039,11 +1043,11 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o
github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg=
github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
-github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA=
-github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
+github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc=
+github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
-github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM=
-github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
+github.com/klauspost/cpuid/v2 v2.2.8 h1:+StwCXwm9PdpiEkPyzBXIy+M9KUb4ODm0Zarf1kS5BM=
+github.com/klauspost/cpuid/v2 v2.2.8/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M=
github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b h1:udzkj9S/zlT5X367kqJis0QP7YMxobob6zhzq6Yre00=
github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM=
@@ -1100,6 +1104,8 @@ github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYt
github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg=
github.com/manyminds/api2go v0.0.0-20171030193247-e7b693844a6f h1:tVvGiZQFjOXP+9YyGqSA6jE55x1XVxmoPYudncxrZ8U=
github.com/manyminds/api2go v0.0.0-20171030193247-e7b693844a6f/go.mod h1:Z60vy0EZVSu0bOugCHdcN5ZxFMKSpjRgsnh0XKPFqqk=
+github.com/marcboeker/go-duckdb v1.8.3 h1:ZkYwiIZhbYsT6MmJsZ3UPTHrTZccDdM4ztoqSlEMXiQ=
+github.com/marcboeker/go-duckdb v1.8.3/go.mod h1:C9bYRE1dPYb1hhfu/SSomm78B0FXmNgRvv6YBW/Hooc=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
@@ -1279,8 +1285,8 @@ github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o=
github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 h1:hDSdbBuw3Lefr6R18ax0tZ2BJeNB3NehB3trOwYBsdU=
github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4=
-github.com/pierrec/lz4/v4 v4.1.18 h1:xaKrnTkyoqfh1YItXl56+6KJNVYWlEEPuAQW9xsplYQ=
-github.com/pierrec/lz4/v4 v4.1.18/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
+github.com/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ=
+github.com/pierrec/lz4/v4 v4.1.21/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ=
@@ -1424,34 +1430,34 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/slack-go/slack v0.15.0 h1:LE2lj2y9vqqiOf+qIIy0GvEoxgF1N5yLGZffmEZykt0=
github.com/slack-go/slack v0.15.0/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQdlMQKOw=
-github.com/smartcontractkit/ccip-owner-contracts v0.0.0-20240926212305-a6deabdfce86 h1:qQH6fZZe31nBAG6INHph3z5ysDTPptyu0TR9uoJ1+ok=
-github.com/smartcontractkit/ccip-owner-contracts v0.0.0-20240926212305-a6deabdfce86/go.mod h1:WtWOoVQQEHxRHL2hNmuRrvDfYfQG/CioFNoa9Rr2mBE=
+github.com/smartcontractkit/ccip-owner-contracts v0.0.0-salt-fix h1:DPJD++yKLSx0EfT+U14P8vLVxjXFmoIETiCO9lVwQo8=
+github.com/smartcontractkit/ccip-owner-contracts v0.0.0-salt-fix/go.mod h1:NnT6w4Kj42OFFXhSx99LvJZWPpMjmo4+CpDEWfw61xY=
github.com/smartcontractkit/chain-selectors v1.0.34 h1:MJ17OGu8+jjl426pcKrJkCf3fePb3eCreuAnUA3RBj4=
github.com/smartcontractkit/chain-selectors v1.0.34/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-20241204015713-8956bb614e9e h1:GnM6ZWV6vlk2+n6c6o+v/R1LtXzBGVVx7r37nt/h6Uc=
-github.com/smartcontractkit/chainlink-ccip v0.0.0-20241204015713-8956bb614e9e/go.mod h1:80vGBbOfertJig0xFKsRfm+i17FkjdKkk1dAaGE45Os=
-github.com/smartcontractkit/chainlink-common v0.3.1-0.20241209151352-70300ddcc776 h1:NATQA1LfrEPXCdtEed9/G4SxaVuF8EZp5O2ucOK5C98=
-github.com/smartcontractkit/chainlink-common v0.3.1-0.20241209151352-70300ddcc776/go.mod h1:bQktEJf7sJ0U3SmIcXvbGUox7SmXcnSEZ4kUbT8R5Nk=
+github.com/smartcontractkit/chainlink-ccip v0.0.0-20241213122413-5e8f65dd6b1b h1:iSQJ6ng4FhEswf8SXunGkaJlVP3E3JlgLB8Oo2f3Ud4=
+github.com/smartcontractkit/chainlink-ccip v0.0.0-20241213122413-5e8f65dd6b1b/go.mod h1:F8xQAIW0ymb2BZhqn89sWZLXreJhM5KDVF6Qb4y44N0=
+github.com/smartcontractkit/chainlink-common v0.3.1-0.20241214155818-b403079b2805 h1:Pz8jB/6qe10xT10h2S3LFYJrnebNpG5rJ/w16HZGwPQ=
+github.com/smartcontractkit/chainlink-common v0.3.1-0.20241214155818-b403079b2805/go.mod h1:yti7e1+G9hhkYhj+L5sVUULn9Bn3bBL5/AxaNqdJ5YQ=
github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20241202195413-82468150ac1e h1:PRoeby6ZlTuTkv2f+7tVU4+zboTfRzI+beECynF4JQ0=
github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20241202195413-82468150ac1e/go.mod h1:mUh5/woemsVaHgTorA080hrYmO3syBCmPdnWc/5dOqk=
-github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20241202141438-a90db35252db h1:N1RH1hSr2ACzOFc9hkCcjE8pRBTdcU3p8nsTJByaLes=
-github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20241202141438-a90db35252db/go.mod h1:yjb9d4q7+m8aGbjfTbkNoNuA4PeSxcUszsSZHDrvS0E=
+github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20241216163550-fa030d178ba3 h1:aeiBdBHGY8QNftps+VqrIk6OnfeeOD5z4jrAabW4ZSc=
+github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20241216163550-fa030d178ba3/go.mod h1:AS6zY2BkcRwfiGzNabGbHhfrLSrXrcI/GmjnT4jQ5/s=
github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c=
github.com/smartcontractkit/chainlink-feeds v0.1.1/go.mod h1:55EZ94HlKCfAsUiKUTNI7QlE/3d3IwTlsU3YNa/nBb4=
github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0 h1:0ewLMbAz3rZrovdRUCgd028yOXX8KigB4FndAUdI2kM=
github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0/go.mod h1:/dVVLXrsp+V0AbcYGJo3XMzKg3CkELsweA/TTopCsKE=
-github.com/smartcontractkit/chainlink-protos/orchestrator v0.3.2 h1:onBe3DqNrbtOAzKS4PrPIiJX65BGo1aYiYZxFVEW+jc=
-github.com/smartcontractkit/chainlink-protos/orchestrator v0.3.2/go.mod h1:m/A3lqD7ms/RsQ9BT5P2uceYY0QX5mIt4KQxT2G6qEo=
-github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241204153209-c3a71b0eef99 h1:lvn9Yxah+QD1/PcgijLO0dNRa28HuQWZl8Kkxh46KJc=
-github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241204153209-c3a71b0eef99/go.mod h1:p8aUDfJeley6oer7y+Ucd3edOtRlMTnWg3mN6rhaLWo=
+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-solana v1.1.1-0.20241210172617-6fd1891d0fbc h1:dssRwJhmzJkUN/OajaDj2GsxBn+Tupk3bI1BkPEoJg0=
+github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241210172617-6fd1891d0fbc/go.mod h1:p8aUDfJeley6oer7y+Ucd3edOtRlMTnWg3mN6rhaLWo=
github.com/smartcontractkit/chainlink-starknet/relayer v0.1.1-0.20241202202529-2033490e77b8 h1:tNS7U9lrxkFvEuyxQv11HHOiV9LPDGC9wYEy+yM/Jv4=
github.com/smartcontractkit/chainlink-starknet/relayer v0.1.1-0.20241202202529-2033490e77b8/go.mod h1:EBrEgcdIbwepqguClkv8Ohy7CbyWSJaE4EC9aBJlQK0=
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.50.18 h1:a3xetGZh2nFO1iX5xd9OuqiCkgbWLvW6fTN6fgVubPo=
-github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.18/go.mod h1:NwmlNKqrb02v4Sci4b5KW644nfH2BW+FrKbWwTN5r6M=
+github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.19 h1:9PMwKNqFKc5FXf4VchyD3CGzZelnSgi13fgVdT2X7T4=
+github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.19/go.mod h1:ag7LEgejsVtPXaUNkcoFPpAoDkl1J8V2HSbqVUxfEtk=
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.9 h1:yB1x5UXvpZNka+5h57yo1/GrKfXKCqMzChCISpldZx4=
@@ -1614,6 +1620,8 @@ github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4=
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM=
+github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU=
+github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E=
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
@@ -1625,6 +1633,8 @@ github.com/yuin/gopher-lua v1.1.0 h1:BojcDhfyDWgU2f2TOzYK/g5p2gxMrku8oupLDqlnSqE
github.com/yuin/gopher-lua v1.1.0/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw=
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
+github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0=
+github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA=
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U=
github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM=
@@ -1772,8 +1782,8 @@ golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
-golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw=
-golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U=
+golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U=
+golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -1903,8 +1913,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
-golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
+golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
+golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -2000,8 +2010,8 @@ golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
-golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=
-golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
+golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
@@ -2012,8 +2022,8 @@ golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
-golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24=
-golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M=
+golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q=
+golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -2028,8 +2038,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
-golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM=
-golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
+golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
+golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod
index 47b128c7f60..96c3bb1dbce 100644
--- a/integration-tests/load/go.mod
+++ b/integration-tests/load/go.mod
@@ -11,6 +11,14 @@ replace github.com/smartcontractkit/chainlink/deployment => ../../deployment
replace github.com/smartcontractkit/chainlink/integration-tests => ../
+// Using a separate `require` here to avoid surrounding line changes
+// creating potential merge conflicts.
+require (
+ github.com/smartcontractkit/chainlink/deployment v0.0.0-20241206210521-125d98cdaf66
+ github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20241206210521-125d98cdaf66
+ github.com/smartcontractkit/chainlink/v2 v2.0.0-20241206210521-125d98cdaf66
+)
+
require (
github.com/K-Phoen/grabana v0.22.2
github.com/ethereum/go-ethereum v1.14.11
@@ -19,13 +27,10 @@ require (
github.com/pkg/errors v0.9.1
github.com/rs/zerolog v1.33.0
github.com/slack-go/slack v0.15.0
- github.com/smartcontractkit/chainlink-common v0.3.1-0.20241209151352-70300ddcc776
- github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.18
+ github.com/smartcontractkit/chainlink-common v0.3.1-0.20241214155818-b403079b2805
+ github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.19
github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.9
github.com/smartcontractkit/chainlink-testing-framework/wasp v1.50.2
- github.com/smartcontractkit/chainlink/deployment v0.0.0-20241120141814-47da13e86197
- github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20241030133659-9ec788e78b4f
- github.com/smartcontractkit/chainlink/v2 v2.14.0-mercury-20240807.0.20241120195829-bd7a1943ad07
github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20241009055228-33d0c0bf38de
github.com/stretchr/testify v1.9.0
github.com/wiremock/go-wiremock v1.9.0
@@ -67,7 +72,7 @@ require (
github.com/VictoriaMetrics/fastcache v1.12.2 // indirect
github.com/XSAM/otelsql v0.27.0 // indirect
github.com/alecthomas/units v0.0.0-20240626203959-61d1e3462e30 // indirect
- github.com/andybalholm/brotli v1.1.0 // indirect
+ github.com/andybalholm/brotli v1.1.1 // indirect
github.com/armon/go-metrics v0.4.1 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/atombender/go-jsonschema v0.16.1-0.20240916205339-a74cd4e2851c // indirect
@@ -211,7 +216,7 @@ require (
github.com/go-viper/mapstructure/v2 v2.1.0 // indirect
github.com/go-webauthn/webauthn v0.9.4 // indirect
github.com/go-webauthn/x v0.1.5 // indirect
- github.com/goccy/go-json v0.10.2 // indirect
+ github.com/goccy/go-json v0.10.3 // indirect
github.com/goccy/go-yaml v1.12.0 // indirect
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
github.com/gofrs/flock v0.8.1 // indirect
@@ -307,8 +312,8 @@ require (
github.com/json-iterator/go v1.1.12 // indirect
github.com/julienschmidt/httprouter v1.3.0 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
- github.com/klauspost/compress v1.17.9 // indirect
- github.com/klauspost/cpuid/v2 v2.2.7 // indirect
+ github.com/klauspost/compress v1.17.11 // indirect
+ github.com/klauspost/cpuid/v2 v2.2.8 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
@@ -393,6 +398,7 @@ require (
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect
github.com/segmentio/ksuid v1.0.4 // indirect
github.com/sercand/kuberesolver/v5 v5.1.1 // indirect
+ github.com/sethvargo/go-retry v0.2.4 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/shirou/gopsutil/v3 v3.24.3 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
@@ -401,12 +407,12 @@ require (
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/smartcontractkit/chain-selectors v1.0.34 // indirect
github.com/smartcontractkit/chainlink-automation v0.8.1 // indirect
- github.com/smartcontractkit/chainlink-ccip v0.0.0-20241204015713-8956bb614e9e // indirect
+ github.com/smartcontractkit/chainlink-ccip v0.0.0-20241213122413-5e8f65dd6b1b // indirect
github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20241202195413-82468150ac1e // indirect
- github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20241202141438-a90db35252db // indirect
+ github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20241216163550-fa030d178ba3 // indirect
github.com/smartcontractkit/chainlink-feeds v0.1.1 // indirect
- github.com/smartcontractkit/chainlink-protos/orchestrator v0.3.2 // indirect
- github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241204153209-c3a71b0eef99 // indirect
+ github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0 // indirect
+ github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241210172617-6fd1891d0fbc // indirect
github.com/smartcontractkit/chainlink-starknet/relayer v0.1.1-0.20241202202529-2033490e77b8 // indirect
github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.2 // indirect
github.com/smartcontractkit/chainlink-testing-framework/lib/grafana v1.50.0 // indirect
@@ -493,14 +499,14 @@ require (
go.uber.org/zap v1.27.0 // indirect
go4.org/netipx v0.0.0-20230125063823-8449b0a6169f // indirect
golang.org/x/arch v0.11.0 // indirect
- golang.org/x/crypto v0.28.0 // indirect
+ golang.org/x/crypto v0.31.0 // indirect
golang.org/x/mod v0.21.0 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/oauth2 v0.23.0 // indirect
- golang.org/x/sync v0.8.0 // indirect
- golang.org/x/sys v0.26.0 // indirect
- golang.org/x/term v0.25.0 // indirect
- golang.org/x/text v0.19.0 // indirect
+ golang.org/x/sync v0.10.0 // indirect
+ golang.org/x/sys v0.28.0 // indirect
+ golang.org/x/term v0.27.0 // indirect
+ golang.org/x/text v0.21.0 // indirect
golang.org/x/time v0.7.0 // indirect
golang.org/x/tools v0.26.0 // indirect
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum
index 59a4e9e64ad..79817cf4311 100644
--- a/integration-tests/load/go.sum
+++ b/integration-tests/load/go.sum
@@ -184,9 +184,11 @@ github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2uc
github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129/go.mod h1:rFgpPQZYZ8vdbc+48xibu8ALc3yeyd64IhHS+PU6Yyg=
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ=
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
-github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M=
-github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY=
+github.com/andybalholm/brotli v1.1.1 h1:PR2pgnyFznKEugtsUo0xLdDop5SKXd5Qf5ysW+7XdTA=
+github.com/andybalholm/brotli v1.1.1/go.mod h1:05ib4cKhjx3OQYUY22hTVd34Bc8upXjOLL2rKwwZBoA=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
+github.com/apache/arrow-go/v18 v18.0.0 h1:1dBDaSbH3LtulTyOVYaBCHO3yVRwjV+TZaqn3g6V7ZM=
+github.com/apache/arrow-go/v18 v18.0.0/go.mod h1:t6+cWRSmKgdQ6HsxisQjok+jBpKGhRDiqcf3p0p/F+A=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
@@ -544,8 +546,8 @@ github.com/gedex/inflector v0.0.0-20170307190818-16278e9db813/go.mod h1:P+oSoE9y
github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps=
github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
-github.com/gin-contrib/cors v1.5.0 h1:DgGKV7DDoOn36DFkNtbHrjoRiT5ExCe+PC9/xp7aKvk=
-github.com/gin-contrib/cors v1.5.0/go.mod h1:TvU7MAZ3EwrPLI2ztzTt3tqgvBCq+wn8WpZmfADjupI=
+github.com/gin-contrib/cors v1.7.2 h1:oLDHxdg8W/XDoN/8zamqk/Drgt4oVZDvaV0YmvVICQw=
+github.com/gin-contrib/cors v1.7.2/go.mod h1:SUJVARKgQ40dmrzgXEVxj2m7Ig1v1qIboQkPDTQ9t2E=
github.com/gin-contrib/expvar v0.0.1 h1:IuU5ArEgihz50vG8Onrwz22kJr7Mcvgv9xSSpfU5g+w=
github.com/gin-contrib/expvar v0.0.1/go.mod h1:8o2CznfQi1JjktORdHr2/abg3wSV6OCnXh0yGypvvVw=
github.com/gin-contrib/sessions v0.0.5 h1:CATtfHmLMQrMNpJRgzjWXD7worTh7g7ritsQfmF+0jE=
@@ -636,8 +638,8 @@ github.com/go-webauthn/x v0.1.5 h1:V2TCzDU2TGLd0kSZOXdrqDVV5JB9ILnKxA9S53CSBw0=
github.com/go-webauthn/x v0.1.5/go.mod h1:qbzWwcFcv4rTwtCLOZd+icnr6B7oSsAGZJqlt8cukqY=
github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg=
github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw=
-github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
-github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
+github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA=
+github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
github.com/goccy/go-yaml v1.12.0 h1:/1WHjnMsI1dlIBQutrvSMGZRQufVO3asrHfTwfACoPM=
github.com/goccy/go-yaml v1.12.0/go.mod h1:wKnAMd44+9JAAnGQpWVEgBzGt3YuTaQ4uXoHvE4m7WU=
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0=
@@ -705,6 +707,8 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU=
github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
+github.com/google/flatbuffers v24.3.25+incompatible h1:CX395cjN9Kke9mmalRoL3d81AtFUxJM+yDthflgJGkI=
+github.com/google/flatbuffers v24.3.25+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8=
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 h1:0VpGH+cDhbDtdcweoyCVsF3fhN8kejK6rFe/2FFX2nU=
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49/go.mod h1:BkkQ4L1KS1xMt2aWSPStnn55ChGC0DPOn2FQYj+f25M=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
@@ -1035,11 +1039,11 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o
github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg=
github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
-github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA=
-github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
+github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc=
+github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
-github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM=
-github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
+github.com/klauspost/cpuid/v2 v2.2.8 h1:+StwCXwm9PdpiEkPyzBXIy+M9KUb4ODm0Zarf1kS5BM=
+github.com/klauspost/cpuid/v2 v2.2.8/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M=
github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b h1:udzkj9S/zlT5X367kqJis0QP7YMxobob6zhzq6Yre00=
github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM=
@@ -1094,6 +1098,8 @@ github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYt
github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg=
github.com/manyminds/api2go v0.0.0-20171030193247-e7b693844a6f h1:tVvGiZQFjOXP+9YyGqSA6jE55x1XVxmoPYudncxrZ8U=
github.com/manyminds/api2go v0.0.0-20171030193247-e7b693844a6f/go.mod h1:Z60vy0EZVSu0bOugCHdcN5ZxFMKSpjRgsnh0XKPFqqk=
+github.com/marcboeker/go-duckdb v1.8.3 h1:ZkYwiIZhbYsT6MmJsZ3UPTHrTZccDdM4ztoqSlEMXiQ=
+github.com/marcboeker/go-duckdb v1.8.3/go.mod h1:C9bYRE1dPYb1hhfu/SSomm78B0FXmNgRvv6YBW/Hooc=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
@@ -1269,8 +1275,8 @@ github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o=
github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 h1:hDSdbBuw3Lefr6R18ax0tZ2BJeNB3NehB3trOwYBsdU=
github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4=
-github.com/pierrec/lz4/v4 v4.1.18 h1:xaKrnTkyoqfh1YItXl56+6KJNVYWlEEPuAQW9xsplYQ=
-github.com/pierrec/lz4/v4 v4.1.18/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
+github.com/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ=
+github.com/pierrec/lz4/v4 v4.1.21/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ=
@@ -1415,34 +1421,34 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/slack-go/slack v0.15.0 h1:LE2lj2y9vqqiOf+qIIy0GvEoxgF1N5yLGZffmEZykt0=
github.com/slack-go/slack v0.15.0/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQdlMQKOw=
-github.com/smartcontractkit/ccip-owner-contracts v0.0.0-20240926212305-a6deabdfce86 h1:qQH6fZZe31nBAG6INHph3z5ysDTPptyu0TR9uoJ1+ok=
-github.com/smartcontractkit/ccip-owner-contracts v0.0.0-20240926212305-a6deabdfce86/go.mod h1:WtWOoVQQEHxRHL2hNmuRrvDfYfQG/CioFNoa9Rr2mBE=
+github.com/smartcontractkit/ccip-owner-contracts v0.0.0-salt-fix h1:DPJD++yKLSx0EfT+U14P8vLVxjXFmoIETiCO9lVwQo8=
+github.com/smartcontractkit/ccip-owner-contracts v0.0.0-salt-fix/go.mod h1:NnT6w4Kj42OFFXhSx99LvJZWPpMjmo4+CpDEWfw61xY=
github.com/smartcontractkit/chain-selectors v1.0.34 h1:MJ17OGu8+jjl426pcKrJkCf3fePb3eCreuAnUA3RBj4=
github.com/smartcontractkit/chain-selectors v1.0.34/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-20241204015713-8956bb614e9e h1:GnM6ZWV6vlk2+n6c6o+v/R1LtXzBGVVx7r37nt/h6Uc=
-github.com/smartcontractkit/chainlink-ccip v0.0.0-20241204015713-8956bb614e9e/go.mod h1:80vGBbOfertJig0xFKsRfm+i17FkjdKkk1dAaGE45Os=
-github.com/smartcontractkit/chainlink-common v0.3.1-0.20241209151352-70300ddcc776 h1:NATQA1LfrEPXCdtEed9/G4SxaVuF8EZp5O2ucOK5C98=
-github.com/smartcontractkit/chainlink-common v0.3.1-0.20241209151352-70300ddcc776/go.mod h1:bQktEJf7sJ0U3SmIcXvbGUox7SmXcnSEZ4kUbT8R5Nk=
+github.com/smartcontractkit/chainlink-ccip v0.0.0-20241213122413-5e8f65dd6b1b h1:iSQJ6ng4FhEswf8SXunGkaJlVP3E3JlgLB8Oo2f3Ud4=
+github.com/smartcontractkit/chainlink-ccip v0.0.0-20241213122413-5e8f65dd6b1b/go.mod h1:F8xQAIW0ymb2BZhqn89sWZLXreJhM5KDVF6Qb4y44N0=
+github.com/smartcontractkit/chainlink-common v0.3.1-0.20241214155818-b403079b2805 h1:Pz8jB/6qe10xT10h2S3LFYJrnebNpG5rJ/w16HZGwPQ=
+github.com/smartcontractkit/chainlink-common v0.3.1-0.20241214155818-b403079b2805/go.mod h1:yti7e1+G9hhkYhj+L5sVUULn9Bn3bBL5/AxaNqdJ5YQ=
github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20241202195413-82468150ac1e h1:PRoeby6ZlTuTkv2f+7tVU4+zboTfRzI+beECynF4JQ0=
github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20241202195413-82468150ac1e/go.mod h1:mUh5/woemsVaHgTorA080hrYmO3syBCmPdnWc/5dOqk=
-github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20241202141438-a90db35252db h1:N1RH1hSr2ACzOFc9hkCcjE8pRBTdcU3p8nsTJByaLes=
-github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20241202141438-a90db35252db/go.mod h1:yjb9d4q7+m8aGbjfTbkNoNuA4PeSxcUszsSZHDrvS0E=
+github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20241216163550-fa030d178ba3 h1:aeiBdBHGY8QNftps+VqrIk6OnfeeOD5z4jrAabW4ZSc=
+github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20241216163550-fa030d178ba3/go.mod h1:AS6zY2BkcRwfiGzNabGbHhfrLSrXrcI/GmjnT4jQ5/s=
github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c=
github.com/smartcontractkit/chainlink-feeds v0.1.1/go.mod h1:55EZ94HlKCfAsUiKUTNI7QlE/3d3IwTlsU3YNa/nBb4=
github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0 h1:0ewLMbAz3rZrovdRUCgd028yOXX8KigB4FndAUdI2kM=
github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0/go.mod h1:/dVVLXrsp+V0AbcYGJo3XMzKg3CkELsweA/TTopCsKE=
-github.com/smartcontractkit/chainlink-protos/orchestrator v0.3.2 h1:onBe3DqNrbtOAzKS4PrPIiJX65BGo1aYiYZxFVEW+jc=
-github.com/smartcontractkit/chainlink-protos/orchestrator v0.3.2/go.mod h1:m/A3lqD7ms/RsQ9BT5P2uceYY0QX5mIt4KQxT2G6qEo=
-github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241204153209-c3a71b0eef99 h1:lvn9Yxah+QD1/PcgijLO0dNRa28HuQWZl8Kkxh46KJc=
-github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241204153209-c3a71b0eef99/go.mod h1:p8aUDfJeley6oer7y+Ucd3edOtRlMTnWg3mN6rhaLWo=
+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-solana v1.1.1-0.20241210172617-6fd1891d0fbc h1:dssRwJhmzJkUN/OajaDj2GsxBn+Tupk3bI1BkPEoJg0=
+github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241210172617-6fd1891d0fbc/go.mod h1:p8aUDfJeley6oer7y+Ucd3edOtRlMTnWg3mN6rhaLWo=
github.com/smartcontractkit/chainlink-starknet/relayer v0.1.1-0.20241202202529-2033490e77b8 h1:tNS7U9lrxkFvEuyxQv11HHOiV9LPDGC9wYEy+yM/Jv4=
github.com/smartcontractkit/chainlink-starknet/relayer v0.1.1-0.20241202202529-2033490e77b8/go.mod h1:EBrEgcdIbwepqguClkv8Ohy7CbyWSJaE4EC9aBJlQK0=
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.50.18 h1:a3xetGZh2nFO1iX5xd9OuqiCkgbWLvW6fTN6fgVubPo=
-github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.18/go.mod h1:NwmlNKqrb02v4Sci4b5KW644nfH2BW+FrKbWwTN5r6M=
+github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.19 h1:9PMwKNqFKc5FXf4VchyD3CGzZelnSgi13fgVdT2X7T4=
+github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.19/go.mod h1:ag7LEgejsVtPXaUNkcoFPpAoDkl1J8V2HSbqVUxfEtk=
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.9 h1:yB1x5UXvpZNka+5h57yo1/GrKfXKCqMzChCISpldZx4=
@@ -1605,6 +1611,8 @@ github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4=
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM=
+github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU=
+github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E=
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
@@ -1616,6 +1624,8 @@ github.com/yuin/gopher-lua v1.1.0 h1:BojcDhfyDWgU2f2TOzYK/g5p2gxMrku8oupLDqlnSqE
github.com/yuin/gopher-lua v1.1.0/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw=
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
+github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0=
+github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA=
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U=
github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM=
@@ -1763,8 +1773,8 @@ golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
-golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw=
-golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U=
+golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U=
+golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -1894,8 +1904,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
-golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
+golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
+golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -1989,8 +1999,8 @@ golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
-golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=
-golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
+golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
@@ -2001,8 +2011,8 @@ golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
-golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24=
-golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M=
+golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q=
+golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -2017,8 +2027,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
-golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM=
-golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
+golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
+golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
diff --git a/integration-tests/smoke/ccip/ccip_batching_test.go b/integration-tests/smoke/ccip/ccip_batching_test.go
index 8c3615fbb20..58f4e922ac5 100644
--- a/integration-tests/smoke/ccip/ccip_batching_test.go
+++ b/integration-tests/smoke/ccip/ccip_batching_test.go
@@ -14,7 +14,8 @@ import (
"github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3"
"github.com/smartcontractkit/chainlink-common/pkg/merklemulti"
- "github.com/smartcontractkit/chainlink/deployment/environment/memory"
+
+ testsetups "github.com/smartcontractkit/chainlink/integration-tests/testsetups/ccip"
"github.com/smartcontractkit/chainlink/deployment"
"github.com/smartcontractkit/chainlink/deployment/ccip/changeset"
@@ -22,7 +23,6 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/onramp"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/shared/generated/multicall3"
- "github.com/smartcontractkit/chainlink/v2/core/logger"
)
const (
@@ -39,18 +39,11 @@ type batchTestSetup struct {
func newBatchTestSetup(t *testing.T) batchTestSetup {
// Setup 3 chains, with 2 lanes going to the dest.
- e := changeset.NewMemoryEnvironmentWithJobsAndContracts(
+ e, _ := testsetups.NewIntegrationEnvironment(
t,
- logger.TestLogger(t),
- memory.MemoryEnvironmentConfig{
- Chains: 3,
- Nodes: 4,
- Bootstraps: 1,
- NumOfUsersPerChain: 2,
- },
- &changeset.TestConfigs{
- IsMultiCall3: true,
- },
+ changeset.WithMultiCall3(),
+ changeset.WithChains(3),
+ changeset.WithUsersPerChain(2),
)
state, err := changeset.LoadOnchainState(e.Env)
diff --git a/integration-tests/smoke/ccip/ccip_fee_boosting_test.go b/integration-tests/smoke/ccip/ccip_fee_boosting_test.go
index 1fe9d5817c9..48d9061ec63 100644
--- a/integration-tests/smoke/ccip/ccip_fee_boosting_test.go
+++ b/integration-tests/smoke/ccip/ccip_fee_boosting_test.go
@@ -9,8 +9,8 @@ import (
"github.com/pkg/errors"
- "github.com/smartcontractkit/chainlink-common/pkg/config"
commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset"
+ testsetups "github.com/smartcontractkit/chainlink/integration-tests/testsetups/ccip"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
@@ -20,7 +20,6 @@ import (
"github.com/smartcontractkit/chainlink-common/pkg/utils/tests"
"github.com/smartcontractkit/chainlink-testing-framework/lib/utils/testcontext"
- "github.com/smartcontractkit/chainlink/deployment/environment/memory"
"github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/ccipevm"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/fee_quoter"
@@ -30,7 +29,6 @@ import (
"github.com/smartcontractkit/chainlink/deployment/ccip/changeset"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/onramp"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router"
- "github.com/smartcontractkit/chainlink/v2/core/logger"
)
var (
@@ -39,13 +37,10 @@ var (
)
func Test_CCIPFeeBoosting(t *testing.T) {
- e := changeset.NewMemoryEnvironmentWithJobsAndContracts(t, logger.TestLogger(t),
- memory.MemoryEnvironmentConfig{
- Chains: 2,
- Nodes: 4,
- Bootstraps: 1,
- }, &changeset.TestConfigs{
- OCRConfigOverride: func(params changeset.CCIPOCRParams) changeset.CCIPOCRParams {
+ e, _ := testsetups.NewIntegrationEnvironment(
+ t,
+ // TODO check if test should use these overrides
+ /* changeset.WithOCRConfigOverride(func(params changeset.CCIPOCRParams) changeset.CCIPOCRParams {
// Only 1 boost (=OCR round) is enough to cover the fee
params.ExecuteOffChainConfig.RelativeBoostPerWaitHour = 10
// Disable token price updates
@@ -55,8 +50,10 @@ func Test_CCIPFeeBoosting(t *testing.T) {
// Disable token price updates
params.CommitOffChainConfig.TokenInfo = nil
return params
- },
- })
+ }),
+
+ */
+ )
state, err := changeset.LoadOnchainState(e.Env)
require.NoError(t, err)
diff --git a/integration-tests/smoke/ccip/ccip_fees_test.go b/integration-tests/smoke/ccip/ccip_fees_test.go
index 791ba8f2619..55788a4aa5f 100644
--- a/integration-tests/smoke/ccip/ccip_fees_test.go
+++ b/integration-tests/smoke/ccip/ccip_fees_test.go
@@ -14,7 +14,7 @@ import (
"github.com/smartcontractkit/chainlink/deployment"
"github.com/smartcontractkit/chainlink/deployment/ccip/changeset"
- "github.com/smartcontractkit/chainlink/deployment/environment/memory"
+ testsetups "github.com/smartcontractkit/chainlink/integration-tests/testsetups/ccip"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/weth9_wrapper"
@@ -101,11 +101,10 @@ func setupTokens(
func Test_CCIPFees(t *testing.T) {
t.Parallel()
- tenv := changeset.NewMemoryEnvironmentWithJobsAndContracts(t, logger.TestLogger(t), memory.MemoryEnvironmentConfig{
- Chains: 2,
- Nodes: 4,
- Bootstraps: 1,
- }, nil)
+ tenv, _ := testsetups.NewIntegrationEnvironment(
+ t,
+ changeset.WithMultiCall3(),
+ )
e := tenv.Env
allChains := tenv.Env.AllChainSelectors()
diff --git a/integration-tests/smoke/ccip/ccip_gas_price_updates_test.go b/integration-tests/smoke/ccip/ccip_gas_price_updates_test.go
index 221d35bd992..d11e4304366 100644
--- a/integration-tests/smoke/ccip/ccip_gas_price_updates_test.go
+++ b/integration-tests/smoke/ccip/ccip_gas_price_updates_test.go
@@ -12,27 +12,26 @@ import (
"github.com/smartcontractkit/chainlink-common/pkg/config"
"github.com/smartcontractkit/chainlink-common/pkg/utils/tests"
+
"github.com/smartcontractkit/chainlink/deployment"
"github.com/smartcontractkit/chainlink/deployment/ccip/changeset"
testsetups "github.com/smartcontractkit/chainlink/integration-tests/testsetups/ccip"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/fee_quoter"
- "github.com/smartcontractkit/chainlink/v2/core/logger"
)
// Test_CCIPGasPriceUpdates tests that chain fee price updates are propagated correctly when
// price reaches some deviation threshold or when the price has expired.
func Test_CCIPGasPriceUpdates(t *testing.T) {
- lggr := logger.TestLogger(t)
ctx := changeset.Context(t)
callOpts := &bind.CallOpts{Context: ctx}
var gasPriceExpiry = 5 * time.Second
- e, _, _ := testsetups.NewLocalDevEnvironmentWithDefaultPrice(t, lggr, &changeset.TestConfigs{
- OCRConfigOverride: func(params changeset.CCIPOCRParams) changeset.CCIPOCRParams {
+ e, _ := testsetups.NewIntegrationEnvironment(t,
+ changeset.WithOCRConfigOverride(func(params changeset.CCIPOCRParams) changeset.CCIPOCRParams {
params.CommitOffChainConfig.RemoteGasPriceBatchWriteFrequency = *config.MustNewDuration(gasPriceExpiry)
return params
- },
- })
+ }),
+ )
state, err := changeset.LoadOnchainState(e.Env)
require.NoError(t, err)
require.NoError(t, changeset.AddLanesForAll(e.Env, state))
diff --git a/integration-tests/smoke/ccip/ccip_message_limitations_test.go b/integration-tests/smoke/ccip/ccip_message_limitations_test.go
index 902d07aec5c..9398fd9f932 100644
--- a/integration-tests/smoke/ccip/ccip_message_limitations_test.go
+++ b/integration-tests/smoke/ccip/ccip_message_limitations_test.go
@@ -17,15 +17,13 @@ import (
"github.com/smartcontractkit/chainlink/deployment/ccip/changeset"
testsetups "github.com/smartcontractkit/chainlink/integration-tests/testsetups/ccip"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router"
- "github.com/smartcontractkit/chainlink/v2/core/logger"
)
func Test_CCIPMessageLimitations(t *testing.T) {
- lggr := logger.TestLogger(t)
ctx := testcontext.Get(t)
callOpts := &bind.CallOpts{Context: ctx}
- testEnv, _, _ := testsetups.NewLocalDevEnvironmentWithDefaultPrice(t, lggr, &changeset.TestConfigs{})
+ testEnv, _ := testsetups.NewIntegrationEnvironment(t)
chains := maps.Keys(testEnv.Env.Chains)
onChainState, err := changeset.LoadOnchainState(testEnv.Env)
diff --git a/integration-tests/smoke/ccip/ccip_messaging_test.go b/integration-tests/smoke/ccip/ccip_messaging_test.go
index 07e237451c8..13f14fcda16 100644
--- a/integration-tests/smoke/ccip/ccip_messaging_test.go
+++ b/integration-tests/smoke/ccip/ccip_messaging_test.go
@@ -18,11 +18,10 @@ import (
"github.com/smartcontractkit/chainlink/deployment"
"github.com/smartcontractkit/chainlink/deployment/ccip/changeset"
- "github.com/smartcontractkit/chainlink/deployment/environment/memory"
+ testsetups "github.com/smartcontractkit/chainlink/integration-tests/testsetups/ccip"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/offramp"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/onramp"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router"
- "github.com/smartcontractkit/chainlink/v2/core/logger"
)
type testCaseSetup struct {
@@ -48,11 +47,7 @@ type messagingTestCaseOutput struct {
func Test_CCIPMessaging(t *testing.T) {
// Setup 2 chains and a single lane.
ctx := changeset.Context(t)
- e := changeset.NewMemoryEnvironmentWithJobsAndContracts(t, logger.TestLogger(t), memory.MemoryEnvironmentConfig{
- Chains: 2,
- Nodes: 4,
- Bootstraps: 1,
- }, nil)
+ e, _ := testsetups.NewIntegrationEnvironment(t)
state, err := changeset.LoadOnchainState(e.Env)
require.NoError(t, err)
diff --git a/integration-tests/smoke/ccip/ccip_ooo_execution_test.go b/integration-tests/smoke/ccip/ccip_ooo_execution_test.go
index 86ddd07ec85..19c36c6e021 100644
--- a/integration-tests/smoke/ccip/ccip_ooo_execution_test.go
+++ b/integration-tests/smoke/ccip/ccip_ooo_execution_test.go
@@ -12,9 +12,10 @@ import (
"github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3"
"github.com/smartcontractkit/chainlink-common/pkg/utils/tests"
+
"github.com/smartcontractkit/chainlink/deployment"
"github.com/smartcontractkit/chainlink/deployment/ccip/changeset"
- "github.com/smartcontractkit/chainlink/deployment/environment/memory"
+ testsetups "github.com/smartcontractkit/chainlink/integration-tests/testsetups/ccip"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router"
"github.com/smartcontractkit/chainlink/v2/core/logger"
@@ -32,16 +33,12 @@ import (
func Test_OutOfOrderExecution(t *testing.T) {
lggr := logger.TestLogger(t)
ctx := tests.Context(t)
- config := &changeset.TestConfigs{
- IsUSDC: true,
- IsUSDCAttestationMissing: true,
- }
- tenv := changeset.NewMemoryEnvironmentWithJobsAndContracts(t, logger.TestLogger(t), memory.MemoryEnvironmentConfig{
- Chains: 2,
- Nodes: 4,
- Bootstraps: 1,
- NumOfUsersPerChain: 2,
- }, config)
+ tenv, _ := testsetups.NewIntegrationEnvironment(
+ t,
+ changeset.WithUSDC(),
+ changeset.WithUSDCAttestationMissing(),
+ changeset.WithUsersPerChain(2),
+ )
e := tenv.Env
state, err := changeset.LoadOnchainState(e)
diff --git a/integration-tests/smoke/ccip/ccip_rmn_test.go b/integration-tests/smoke/ccip/ccip_rmn_test.go
index 6cd6bd9d63f..166f4422fe6 100644
--- a/integration-tests/smoke/ccip/ccip_rmn_test.go
+++ b/integration-tests/smoke/ccip/ccip_rmn_test.go
@@ -18,13 +18,14 @@ import (
"github.com/rs/zerolog"
"github.com/stretchr/testify/require"
- "github.com/smartcontractkit/chainlink-ccip/pkg/reader"
"github.com/smartcontractkit/chainlink-protos/job-distributor/v1/node"
"github.com/smartcontractkit/chainlink-testing-framework/lib/utils/osutil"
"github.com/smartcontractkit/chainlink-testing-framework/lib/utils/testcontext"
- "github.com/smartcontractkit/chainlink/deployment/environment/devenv"
+
+ "github.com/smartcontractkit/chainlink-ccip/pkg/reader"
"github.com/smartcontractkit/chainlink/deployment/ccip/changeset"
+ "github.com/smartcontractkit/chainlink/deployment/environment/devenv"
"github.com/smartcontractkit/chainlink/deployment"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/rmn_home"
@@ -32,7 +33,6 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router"
testsetups "github.com/smartcontractkit/chainlink/integration-tests/testsetups/ccip"
- "github.com/smartcontractkit/chainlink/v2/core/logger"
)
func TestRMN_TwoMessagesOnTwoLanesIncludingBatching(t *testing.T) {
@@ -179,11 +179,14 @@ func TestRMN_DifferentRmnNodesForDifferentChains(t *testing.T) {
func TestRMN_TwoMessagesOneSourceChainCursed(t *testing.T) {
runRmnTestCase(t, rmnTestCase{
- name: "two messages, one source chain is cursed",
+ name: "two messages, one source chain is cursed the other chain was cursed but curse is revoked",
passIfNoCommitAfter: 15 * time.Second,
cursedSubjectsPerChain: map[int][]int{
chain1: {chain0},
},
+ revokedCursedSubjectsPerChain: map[int]map[int]time.Duration{
+ chain0: {globalCurse: 5 * time.Second}, // chain0 will be globally cursed and curse will be revoked later
+ },
homeChainConfig: homeChainConfig{
f: map[int]int{chain0: 1, chain1: 1},
},
@@ -244,7 +247,9 @@ func runRmnTestCase(t *testing.T, tc rmnTestCase) {
ctx := testcontext.Get(t)
t.Logf("Running RMN test case: %s", tc.name)
- envWithRMN, rmnCluster := testsetups.NewLocalDevEnvironmentWithRMN(t, logger.TestLogger(t), len(tc.rmnNodes))
+ envWithRMN, rmnCluster := testsetups.NewIntegrationEnvironment(t,
+ changeset.WithRMNEnabled(len(tc.rmnNodes)),
+ )
t.Logf("envWithRmn: %#v", envWithRMN)
tc.populateFields(t, envWithRMN, rmnCluster)
@@ -253,9 +258,6 @@ func runRmnTestCase(t *testing.T, tc rmnTestCase) {
require.NoError(t, err)
t.Logf("onChainState: %#v", onChainState)
- homeChain, ok := envWithRMN.Env.Chains[envWithRMN.HomeChainSel]
- require.True(t, ok)
-
homeChainState, ok := onChainState.Chains[envWithRMN.HomeChainSel]
require.True(t, ok)
@@ -269,23 +271,28 @@ func runRmnTestCase(t *testing.T, tc rmnTestCase) {
dynamicConfig := rmn_home.RMNHomeDynamicConfig{SourceChains: tc.pf.rmnHomeSourceChains, OffchainConfig: []byte{}}
t.Logf("Setting RMNHome candidate with staticConfig: %+v, dynamicConfig: %+v, current candidateDigest: %x",
staticConfig, dynamicConfig, allDigests.CandidateConfigDigest[:])
- tx, err := homeChainState.RMNHome.SetCandidate(homeChain.DeployerKey, staticConfig, dynamicConfig, allDigests.CandidateConfigDigest)
+
+ candidateDigest, err := homeChainState.RMNHome.GetCandidateDigest(&bind.CallOpts{Context: ctx})
require.NoError(t, err)
- _, err = deployment.ConfirmIfNoError(homeChain, tx, err)
+ _, err = changeset.NewSetRMNHomeCandidateConfigChangeset(envWithRMN.Env, changeset.SetRMNHomeCandidateConfig{
+ HomeChainSelector: envWithRMN.HomeChainSel,
+ RMNStaticConfig: staticConfig,
+ RMNDynamicConfig: dynamicConfig,
+ DigestToOverride: candidateDigest,
+ })
require.NoError(t, err)
- candidateDigest, err := homeChainState.RMNHome.GetCandidateDigest(&bind.CallOpts{Context: ctx})
+ candidateDigest, err = homeChainState.RMNHome.GetCandidateDigest(&bind.CallOpts{Context: ctx})
require.NoError(t, err)
t.Logf("RMNHome candidateDigest after setting new candidate: %x", candidateDigest[:])
t.Logf("Promoting RMNHome candidate with candidateDigest: %x", candidateDigest[:])
- tx, err = homeChainState.RMNHome.PromoteCandidateAndRevokeActive(
- homeChain.DeployerKey, candidateDigest, allDigests.ActiveConfigDigest)
- require.NoError(t, err)
-
- _, err = deployment.ConfirmIfNoError(homeChain, tx, err)
+ _, err = changeset.NewPromoteCandidateConfigChangeset(envWithRMN.Env, changeset.PromoteRMNHomeCandidateConfig{
+ HomeChainSelector: envWithRMN.HomeChainSel,
+ DigestToPromote: candidateDigest,
+ })
require.NoError(t, err)
// check the active digest is the same as the candidate digest
@@ -295,7 +302,23 @@ func runRmnTestCase(t *testing.T, tc rmnTestCase) {
"active digest should be the same as the previously candidate digest after promotion, previous candidate: %x, active: %x",
candidateDigest[:], activeDigest[:])
- tc.setRmnRemoteConfig(ctx, t, onChainState, activeDigest, envWithRMN)
+ rmnRemoteConfig := make(map[uint64]changeset.RMNRemoteConfig)
+ for _, remoteCfg := range tc.remoteChainsConfig {
+ selector := tc.pf.chainSelectors[remoteCfg.chainIdx]
+ if remoteCfg.f < 0 {
+ t.Fatalf("remoteCfg.f is negative: %d", remoteCfg.f)
+ }
+ rmnRemoteConfig[selector] = changeset.RMNRemoteConfig{
+ F: uint64(remoteCfg.f),
+ Signers: tc.pf.rmnRemoteSigners,
+ }
+ }
+
+ _, err = changeset.NewSetRMNRemoteConfigChangeset(envWithRMN.Env, changeset.SetRMNRemoteConfig{
+ HomeChainSelector: envWithRMN.HomeChainSel,
+ RMNRemoteConfigs: rmnRemoteConfig,
+ })
+ require.NoError(t, err)
tc.killMarkedRmnNodes(t, rmnCluster)
@@ -307,6 +330,7 @@ func runRmnTestCase(t *testing.T, tc rmnTestCase) {
t.Logf("Sent all messages, seqNumCommit: %v seqNumExec: %v", seqNumCommit, seqNumExec)
tc.callContractsToCurseChains(ctx, t, onChainState, envWithRMN)
+ tc.callContractsToCurseAndRevokeCurse(ctx, t, onChainState, envWithRMN)
tc.enableOracles(ctx, t, envWithRMN, disabledNodes)
@@ -419,22 +443,25 @@ type rmnTestCase struct {
// If set to a positive value, the test will wait for that duration and will assert that commit report was not delivered.
passIfNoCommitAfter time.Duration
cursedSubjectsPerChain map[int][]int
- waitForExec bool
- homeChainConfig homeChainConfig
- remoteChainsConfig []remoteChainConfig
- rmnNodes []rmnNode
- messagesToSend []messageToSend
+ // revokedCursedSubjectsPerChain is used to revoke this specific curses after a timer expires
+ revokedCursedSubjectsPerChain map[int]map[int]time.Duration // chainIdx -> subjectIdx -> timer to revoke
+ waitForExec bool
+ homeChainConfig homeChainConfig
+ remoteChainsConfig []remoteChainConfig
+ rmnNodes []rmnNode
+ messagesToSend []messageToSend
// populated fields after environment setup
pf testCasePopulatedFields
}
type testCasePopulatedFields struct {
- chainSelectors []uint64
- rmnHomeNodes []rmn_home.RMNHomeNode
- rmnRemoteSigners []rmn_remote.RMNRemoteSigner
- rmnHomeSourceChains []rmn_home.RMNHomeSourceChain
- cursedSubjectsPerChainSel map[uint64][]uint64
+ chainSelectors []uint64
+ rmnHomeNodes []rmn_home.RMNHomeNode
+ rmnRemoteSigners []rmn_remote.RMNRemoteSigner
+ rmnHomeSourceChains []rmn_home.RMNHomeSourceChain
+ cursedSubjectsPerChainSel map[uint64][]uint64
+ revokedCursedSubjectsPerChainSel map[uint64]map[uint64]time.Duration
}
func (tc *rmnTestCase) populateFields(t *testing.T, envWithRMN changeset.DeployedEnv, rmnCluster devenv.RMNCluster) {
@@ -489,6 +516,22 @@ func (tc *rmnTestCase) populateFields(t *testing.T, envWithRMN changeset.Deploye
tc.pf.cursedSubjectsPerChainSel[chainSel] = append(tc.pf.cursedSubjectsPerChainSel[chainSel], subjSel)
}
}
+
+ // populate revoked cursed subjects with actual chain selectors
+ tc.pf.revokedCursedSubjectsPerChainSel = make(map[uint64]map[uint64]time.Duration)
+ for chainIdx, subjects := range tc.revokedCursedSubjectsPerChain {
+ chainSel := tc.pf.chainSelectors[chainIdx]
+ for subject, revokeAfter := range subjects {
+ subjSel := uint64(globalCurse)
+ if subject != globalCurse {
+ subjSel = tc.pf.chainSelectors[subject]
+ }
+ if _, ok := tc.pf.revokedCursedSubjectsPerChainSel[chainSel]; !ok {
+ tc.pf.revokedCursedSubjectsPerChainSel[chainSel] = make(map[uint64]time.Duration)
+ }
+ tc.pf.revokedCursedSubjectsPerChainSel[chainSel][subjSel] = revokeAfter
+ }
+ }
}
func (tc rmnTestCase) validate() error {
@@ -499,46 +542,6 @@ func (tc rmnTestCase) validate() error {
return nil
}
-func (tc rmnTestCase) setRmnRemoteConfig(
- ctx context.Context,
- t *testing.T,
- onChainState changeset.CCIPOnChainState,
- activeDigest [32]byte,
- envWithRMN changeset.DeployedEnv) {
- for _, remoteCfg := range tc.remoteChainsConfig {
- remoteSel := tc.pf.chainSelectors[remoteCfg.chainIdx]
- chState, ok := onChainState.Chains[remoteSel]
- require.True(t, ok)
- if remoteCfg.f < 0 {
- t.Fatalf("negative F: %d", remoteCfg.f)
- }
- rmnRemoteConfig := rmn_remote.RMNRemoteConfig{
- RmnHomeContractConfigDigest: activeDigest,
- Signers: tc.pf.rmnRemoteSigners,
- F: uint64(remoteCfg.f),
- }
-
- chain := envWithRMN.Env.Chains[tc.pf.chainSelectors[remoteCfg.chainIdx]]
-
- t.Logf("Setting RMNRemote config with RMNHome active digest: %x, cfg: %+v", activeDigest[:], rmnRemoteConfig)
- tx2, err2 := chState.RMNRemote.SetConfig(chain.DeployerKey, rmnRemoteConfig)
- require.NoError(t, err2)
- _, err2 = deployment.ConfirmIfNoError(chain, tx2, err2)
- require.NoError(t, err2)
-
- // confirm the config is set correctly
- config, err2 := chState.RMNRemote.GetVersionedConfig(&bind.CallOpts{Context: ctx})
- require.NoError(t, err2)
- require.Equalf(t,
- activeDigest,
- config.Config.RmnHomeContractConfigDigest,
- "RMNRemote config digest should be the same as the active digest of RMNHome after setting, RMNHome active: %x, RMNRemote config: %x",
- activeDigest[:], config.Config.RmnHomeContractConfigDigest[:])
-
- t.Logf("RMNRemote config digest after setting: %x", config.Config.RmnHomeContractConfigDigest[:])
- }
-}
-
func (tc rmnTestCase) killMarkedRmnNodes(t *testing.T, rmnCluster devenv.RMNCluster) {
for _, n := range tc.rmnNodes {
if n.forceExit {
@@ -636,6 +639,44 @@ func (tc rmnTestCase) callContractsToCurseChains(ctx context.Context, t *testing
}
}
+func (tc rmnTestCase) callContractsToCurseAndRevokeCurse(ctx context.Context, t *testing.T, onChainState changeset.CCIPOnChainState, envWithRMN changeset.DeployedEnv) {
+ for _, remoteCfg := range tc.remoteChainsConfig {
+ remoteSel := tc.pf.chainSelectors[remoteCfg.chainIdx]
+ chState, ok := onChainState.Chains[remoteSel]
+ require.True(t, ok)
+ chain, ok := envWithRMN.Env.Chains[remoteSel]
+ require.True(t, ok)
+
+ cursedSubjects, ok := tc.revokedCursedSubjectsPerChain[remoteCfg.chainIdx]
+ if !ok {
+ continue // nothing to curse on this chain
+ }
+
+ for subjectDescription, revokeAfter := range cursedSubjects {
+ subj := reader.GlobalCurseSubject
+ if subjectDescription != globalCurse {
+ subj = chainSelectorToBytes16(tc.pf.chainSelectors[subjectDescription])
+ }
+ t.Logf("cursing subject %d (%d)", subj, subjectDescription)
+ txCurse, errCurse := chState.RMNRemote.Curse(chain.DeployerKey, subj)
+ _, errConfirm := deployment.ConfirmIfNoError(chain, txCurse, errCurse)
+ require.NoError(t, errConfirm)
+
+ go func() {
+ <-time.NewTimer(revokeAfter).C
+ t.Logf("revoking curse on subject %d (%d)", subj, subjectDescription)
+ txUncurse, errUncurse := chState.RMNRemote.Uncurse(chain.DeployerKey, subj)
+ _, errConfirm = deployment.ConfirmIfNoError(chain, txUncurse, errUncurse)
+ require.NoError(t, errConfirm)
+ }()
+ }
+
+ cs, err := chState.RMNRemote.GetCursedSubjects(&bind.CallOpts{Context: ctx})
+ require.NoError(t, err)
+ t.Logf("Cursed subjects: %v", cs)
+ }
+}
+
func (tc rmnTestCase) enableOracles(ctx context.Context, t *testing.T, envWithRMN changeset.DeployedEnv, nodeIDs []string) {
for _, n := range nodeIDs {
_, err := envWithRMN.Env.Offchain.EnableNode(ctx, &node.EnableNodeRequest{Id: n})
diff --git a/integration-tests/smoke/ccip/ccip_token_price_updates_test.go b/integration-tests/smoke/ccip/ccip_token_price_updates_test.go
index 6a193397d7e..e3496b6f407 100644
--- a/integration-tests/smoke/ccip/ccip_token_price_updates_test.go
+++ b/integration-tests/smoke/ccip/ccip_token_price_updates_test.go
@@ -16,25 +16,23 @@ import (
"github.com/smartcontractkit/chainlink-common/pkg/config"
"github.com/smartcontractkit/chainlink-common/pkg/utils/tests"
"github.com/smartcontractkit/chainlink-protos/job-distributor/v1/node"
+
"github.com/smartcontractkit/chainlink/deployment"
"github.com/smartcontractkit/chainlink/deployment/ccip/changeset"
testsetups "github.com/smartcontractkit/chainlink/integration-tests/testsetups/ccip"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/fee_quoter"
- "github.com/smartcontractkit/chainlink/v2/core/logger"
)
func Test_CCIPTokenPriceUpdates(t *testing.T) {
- lggr := logger.TestLogger(t)
ctx := changeset.Context(t)
callOpts := &bind.CallOpts{Context: ctx}
var tokenPriceExpiry = 5 * time.Second
- e, _, _ := testsetups.NewLocalDevEnvironmentWithDefaultPrice(t, lggr, &changeset.TestConfigs{
- OCRConfigOverride: func(params changeset.CCIPOCRParams) changeset.CCIPOCRParams {
+ e, _ := testsetups.NewIntegrationEnvironment(t,
+ changeset.WithOCRConfigOverride(func(params changeset.CCIPOCRParams) changeset.CCIPOCRParams {
params.CommitOffChainConfig.TokenPriceBatchWriteFrequency = *config.MustNewDuration(tokenPriceExpiry)
return params
- },
- })
+ }))
state, err := changeset.LoadOnchainState(e.Env)
require.NoError(t, err)
require.NoError(t, changeset.AddLanesForAll(e.Env, state))
diff --git a/integration-tests/smoke/ccip/ccip_token_transfer_test.go b/integration-tests/smoke/ccip/ccip_token_transfer_test.go
index 13abe33fe7c..2088960639e 100644
--- a/integration-tests/smoke/ccip/ccip_token_transfer_test.go
+++ b/integration-tests/smoke/ccip/ccip_token_transfer_test.go
@@ -10,8 +10,9 @@ import (
"github.com/stretchr/testify/require"
"github.com/smartcontractkit/chainlink-common/pkg/utils/tests"
+
"github.com/smartcontractkit/chainlink/deployment/ccip/changeset"
- "github.com/smartcontractkit/chainlink/deployment/environment/memory"
+ testsetups "github.com/smartcontractkit/chainlink/integration-tests/testsetups/ccip"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router"
"github.com/smartcontractkit/chainlink/v2/core/logger"
@@ -20,14 +21,9 @@ import (
func TestTokenTransfer(t *testing.T) {
lggr := logger.TestLogger(t)
ctx := tests.Context(t)
- config := &changeset.TestConfigs{}
- tenv := changeset.NewMemoryEnvironmentWithJobsAndContracts(t, logger.TestLogger(t), memory.MemoryEnvironmentConfig{
- Chains: 2,
- Nodes: 4,
- Bootstraps: 1,
- NumOfUsersPerChain: 3,
- }, config)
+ tenv, _ := testsetups.NewIntegrationEnvironment(t,
+ changeset.WithUsersPerChain(3))
e := tenv.Env
state, err := changeset.LoadOnchainState(e)
@@ -214,7 +210,7 @@ func TestTokenTransfer(t *testing.T) {
t,
e,
state,
- changeset.SeqNumberRageToSlice(expectedSeqNums),
+ changeset.SeqNumberRangeToSlice(expectedSeqNums),
startBlocks,
)
require.Equal(t, expectedExecutionStates, execStates)
diff --git a/integration-tests/smoke/ccip/ccip_usdc_test.go b/integration-tests/smoke/ccip/ccip_usdc_test.go
index 2dae3f3c48e..174ab941387 100644
--- a/integration-tests/smoke/ccip/ccip_usdc_test.go
+++ b/integration-tests/smoke/ccip/ccip_usdc_test.go
@@ -11,9 +11,10 @@ import (
"golang.org/x/sync/errgroup"
"github.com/smartcontractkit/chainlink-common/pkg/utils/tests"
+
"github.com/smartcontractkit/chainlink/deployment"
"github.com/smartcontractkit/chainlink/deployment/ccip/changeset"
- "github.com/smartcontractkit/chainlink/deployment/environment/memory"
+ testsetups "github.com/smartcontractkit/chainlink/integration-tests/testsetups/ccip"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/shared/generated/burn_mint_erc677"
@@ -31,15 +32,11 @@ import (
func TestUSDCTokenTransfer(t *testing.T) {
lggr := logger.TestLogger(t)
ctx := tests.Context(t)
- config := &changeset.TestConfigs{
- IsUSDC: true,
- }
- tenv := changeset.NewMemoryEnvironmentWithJobsAndContracts(t, lggr, memory.MemoryEnvironmentConfig{
- Chains: 3,
- NumOfUsersPerChain: 3,
- Nodes: 4,
- Bootstraps: 1,
- }, config)
+ tenv, _ := testsetups.NewIntegrationEnvironment(t,
+ changeset.WithUsersPerChain(3),
+ changeset.WithChains(3),
+ changeset.WithUSDC(),
+ )
e := tenv.Env
state, err := changeset.LoadOnchainState(e)
@@ -228,7 +225,7 @@ func TestUSDCTokenTransfer(t *testing.T) {
t,
e,
state,
- changeset.SeqNumberRageToSlice(expectedSeqNums),
+ changeset.SeqNumberRangeToSlice(expectedSeqNums),
startBlocks,
)
require.Equal(t, expectedExecutionStates, execStates)
diff --git a/integration-tests/smoke/ocr2_test.go b/integration-tests/smoke/ocr2_test.go
index a011dfdffc6..8416ec05c7e 100644
--- a/integration-tests/smoke/ocr2_test.go
+++ b/integration-tests/smoke/ocr2_test.go
@@ -1,14 +1,19 @@
package smoke
import (
+ "bufio"
"fmt"
"math/big"
"net/http"
+ "os"
+ "path/filepath"
+ "regexp"
"strings"
+ "sync"
"testing"
"time"
- "github.com/smartcontractkit/chainlink/integration-tests/utils"
+ "github.com/onsi/gomega"
"github.com/ethereum/go-ethereum/common"
"github.com/rs/zerolog"
@@ -16,8 +21,8 @@ import (
"github.com/smartcontractkit/chainlink-testing-framework/seth"
+ ctf_docker "github.com/smartcontractkit/chainlink-testing-framework/lib/docker"
"github.com/smartcontractkit/chainlink-testing-framework/lib/logging"
- "github.com/smartcontractkit/chainlink-testing-framework/lib/logstream"
"github.com/smartcontractkit/chainlink-testing-framework/lib/utils/testcontext"
"github.com/smartcontractkit/chainlink/v2/core/config/env"
@@ -26,6 +31,7 @@ import (
"github.com/smartcontractkit/chainlink/integration-tests/contracts"
"github.com/smartcontractkit/chainlink/integration-tests/docker/test_env"
tc "github.com/smartcontractkit/chainlink/integration-tests/testconfig"
+ "github.com/smartcontractkit/chainlink/integration-tests/utils"
)
type ocr2test struct {
@@ -224,33 +230,150 @@ func prepareORCv2SmokeTestEnv(t *testing.T, testData ocr2test, l zerolog.Logger,
}
func assertCorrectNodeConfiguration(t *testing.T, l zerolog.Logger, totalNodeCount int, testData ocr2test, testEnv *test_env.CLClusterTestEnv) {
- expectedNodesWithConfiguration := totalNodeCount - 1 // minus bootstrap node
- var expectedPatterns []string
+ l.Info().Msg("Checking if all nodes have correct plugin configuration applied")
- if testData.env[string(env.MedianPlugin.Cmd)] != "" {
- expectedPatterns = append(expectedPatterns, "Registered loopp.*OCR2.*Median.*")
- }
+ // we have to use gomega here, because sometimes there's a delay in the logs being written (especially in the CI)
+ // and this check fails on the first execution, and we don't want to add any hardcoded sleeps
- if testData.chainReaderAndCodec {
- expectedPatterns = append(expectedPatterns, "relayConfig\\.chainReader")
- } else {
- expectedPatterns = append(expectedPatterns, "ChainReader missing from RelayConfig; falling back to internal MedianContract")
- }
+ gom := gomega.NewGomegaWithT(t)
+ gom.Eventually(func(g gomega.Gomega) {
+ allNodesHaveCorrectConfig := false
+
+ var expectedPatterns []string
+ expectedNodeCount := totalNodeCount - 1
+
+ if testData.env[string(env.MedianPlugin.Cmd)] != "" {
+ expectedPatterns = append(expectedPatterns, `Registered loopp.*OCR2.*Median.*`)
+ }
+
+ if testData.chainReaderAndCodec {
+ expectedPatterns = append(expectedPatterns, `relayConfig.chainReader`)
+ } else {
+ expectedPatterns = append(expectedPatterns, "ChainReader missing from RelayConfig; falling back to internal MedianContract")
+ }
+
+ logFilePaths := make(map[string]string)
+ tempLogsDir := os.TempDir()
+
+ var nodesToInclude []string
+ for i := 1; i < totalNodeCount; i++ {
+ nodesToInclude = append(nodesToInclude, testEnv.ClCluster.Nodes[i].ContainerName+".log")
+ }
+
+ // save all log files in temp dir
+ loggingErr := ctf_docker.WriteAllContainersLogs(l, tempLogsDir)
+ if loggingErr != nil {
+ l.Debug().Err(loggingErr).Msg("Error writing all containers logs. Trying again...")
+
+ // try again
+ return
+ }
+
+ var fileNameIncludeFilter = func(name string) bool {
+ for _, n := range nodesToInclude {
+ if strings.EqualFold(name, n) {
+ return true
+ }
+ }
+ return false
+ }
+
+ // find log files for CL nodes
+ fileWalkErr := filepath.Walk(tempLogsDir, func(path string, info os.FileInfo, err error) error {
+ if err != nil {
+ if os.IsPermission(err) {
+ return nil
+ }
+ return err
+ }
+ if !info.IsDir() && fileNameIncludeFilter(info.Name()) {
+ absPath, err := filepath.Abs(path)
+ if err != nil {
+ return err
+ }
+ logFilePaths[strings.TrimSuffix(info.Name(), ".log")] = absPath
+ }
+ return nil
+ })
+
+ if fileWalkErr != nil {
+ l.Debug().Err(fileWalkErr).Msg("Error walking through log files. Trying again...")
+
+ return
+ }
+
+ if len(logFilePaths) != expectedNodeCount {
+ l.Debug().Msgf("Expected number of log files to match number of nodes (excluding bootstrap node). Expected: %d, Found: %d. Trying again...", expectedNodeCount, len(logFilePaths))
+
+ return
+ }
+
+ // search for expected pattern in log file
+ var searchForLineInFile = func(filePath string, pattern string) bool {
+ file, fileErr := os.Open(filePath)
+ if fileErr != nil {
+ return false
+ }
+
+ defer func(file *os.File) {
+ _ = file.Close()
+ }(file)
+
+ scanner := bufio.NewScanner(file)
+ scanner.Split(bufio.ScanLines)
+ pc := regexp.MustCompile(pattern)
+
+ for scanner.Scan() {
+ jsonLogLine := scanner.Text()
+ if pc.MatchString(jsonLogLine) {
+ return true
+ }
+
+ }
+ return false
+ }
+
+ wg := sync.WaitGroup{}
+ resultsCh := make(chan map[string][]string, len(logFilePaths))
+
+ // process all logs in parallel
+ for nodeName, logFilePath := range logFilePaths {
+ wg.Add(1)
+ filePath := logFilePath
+ go func() {
+ defer wg.Done()
+ var patternsFound []string
+ for _, pattern := range expectedPatterns {
+ found := searchForLineInFile(filePath, pattern)
+ if found {
+ patternsFound = append(patternsFound, pattern)
+ }
+ }
+ resultsCh <- map[string][]string{nodeName: patternsFound}
+ }()
+ }
+
+ wg.Wait()
+ close(resultsCh)
- // make sure that nodes are correctly configured by scanning the logs
- for _, pattern := range expectedPatterns {
- l.Info().Msgf("Checking for pattern: '%s' in CL node logs", pattern)
var correctlyConfiguredNodes []string
- for i := 1; i < len(testEnv.ClCluster.Nodes); i++ {
- logProcessor, processFn, err := logstream.GetRegexMatchingProcessor(testEnv.LogStream, pattern)
- require.NoError(t, err, "Error getting regex matching processor")
-
- count, err := logProcessor.ProcessContainerLogs(testEnv.ClCluster.Nodes[i].ContainerName, processFn)
- require.NoError(t, err, "Error processing container logs")
- if *count >= 1 {
- correctlyConfiguredNodes = append(correctlyConfiguredNodes, testEnv.ClCluster.Nodes[i].ContainerName)
+ var incorrectlyConfiguredNodes []string
+
+ // check results
+ for result := range resultsCh {
+ for nodeName, patternsFound := range result {
+ if len(patternsFound) == len(expectedPatterns) {
+ correctlyConfiguredNodes = append(correctlyConfiguredNodes, nodeName)
+ } else {
+ incorrectlyConfiguredNodes = append(incorrectlyConfiguredNodes, nodeName)
+ }
}
}
- require.Equal(t, expectedNodesWithConfiguration, len(correctlyConfiguredNodes), "expected correct plugin config to be applied to %d cl-nodes, but only following ones had it: %s; regexp used: %s", expectedNodesWithConfiguration, strings.Join(correctlyConfiguredNodes, ", "), string(pattern))
- }
+
+ allNodesHaveCorrectConfig = len(correctlyConfiguredNodes) == expectedNodeCount
+
+ g.Expect(allNodesHaveCorrectConfig).To(gomega.BeTrue(), "%d nodes' logs were missing expected plugin configuration entries. Correctly configured nodes: %s. Nodes with missing configuration: %s. Expected log patterns: %s", expectedNodeCount-len(correctlyConfiguredNodes), strings.Join(correctlyConfiguredNodes, ", "), strings.Join(incorrectlyConfiguredNodes, ", "), strings.Join(expectedPatterns, ", "))
+ }, "1m", "10s").Should(gomega.Succeed())
+
+ l.Info().Msg("All nodes have correct plugin configuration applied")
}
diff --git a/integration-tests/testconfig/automation/example.toml b/integration-tests/testconfig/automation/example.toml
index 3bbe78d693d..c239e5a3966 100644
--- a/integration-tests/testconfig/automation/example.toml
+++ b/integration-tests/testconfig/automation/example.toml
@@ -7,14 +7,6 @@ version="2.7.0"
# if set to true will save logs even if test did not fail
test_log_collect=false
-[Logging.LogStream]
-# supported targets: file, loki, in-memory. if empty no logs will be persistet
-log_targets=["file"]
-# context timeout for starting log producer and also time-frame for requesting logs
-log_producer_timeout="10s"
-# number of retries before log producer gives up and stops listening to logs
-log_producer_retry_limit=10
-
# if you want to use polygon_mumbial
[Network]
selected_networks=["polygon_mumbai"]
diff --git a/integration-tests/testconfig/ccip/config.go b/integration-tests/testconfig/ccip/config.go
index 72c81f05f47..70c850fd591 100644
--- a/integration-tests/testconfig/ccip/config.go
+++ b/integration-tests/testconfig/ccip/config.go
@@ -147,6 +147,9 @@ func (o *JDConfig) GetJDDBVersion() string {
func (o *Config) Validate() error {
var chainIds []int64
for _, net := range o.PrivateEthereumNetworks {
+ if net.EthereumChainConfig.ChainID < 0 {
+ return fmt.Errorf("negative chain ID found for network %d", net.EthereumChainConfig.ChainID)
+ }
chainIds = append(chainIds, int64(net.EthereumChainConfig.ChainID))
}
homeChainSelector, err := strconv.ParseUint(pointer.GetString(o.HomeChainSelector), 10, 64)
@@ -189,14 +192,21 @@ func IsSelectorValid(selector uint64, chainIds []int64) (bool, error) {
if err != nil {
return false, err
}
- if chainId >= math.MaxInt64 {
- return false, fmt.Errorf("chain id overflows int64: %d", chainId)
- }
- expId := int64(chainId)
- for _, id := range chainIds {
- if id == expId {
+
+ for _, cID := range chainIds {
+ if isEqualUint64AndInt64(chainId, cID) {
return true, nil
}
}
return false, nil
}
+
+func isEqualUint64AndInt64(u uint64, i int64) bool {
+ if i < 0 {
+ return false // uint64 cannot be equal to a negative int64
+ }
+ if u > math.MaxInt64 {
+ return false // uint64 cannot be equal to an int64 if it exceeds the maximum int64 value
+ }
+ return u == uint64(i)
+}
diff --git a/integration-tests/testconfig/ccip/overrides/sepolia_avax_binance.toml b/integration-tests/testconfig/ccip/overrides/sepolia_avax_binance.toml
index 06af64d5d91..72c43b12da5 100644
--- a/integration-tests/testconfig/ccip/overrides/sepolia_avax_binance.toml
+++ b/integration-tests/testconfig/ccip/overrides/sepolia_avax_binance.toml
@@ -5,10 +5,6 @@ chainlink_node_funding = 2
[Logging]
test_log_collect = true
-[Logging.LogStream]
-# supported targets: file, loki, in-memory. if empty no logs will be persisted
-log_targets = ["loki"]
-
[Network]
selected_networks = ['SEPOLIA', 'AVALANCHE_FUJI', 'BSC_TESTNET']
diff --git a/integration-tests/testconfig/default.toml b/integration-tests/testconfig/default.toml
index b9987d4571d..8180b40ae21 100644
--- a/integration-tests/testconfig/default.toml
+++ b/integration-tests/testconfig/default.toml
@@ -2,19 +2,6 @@
# set to true to flush logs to selected target regardless of test result; otherwise logs are only flushed if test failed
test_log_collect = false
-[Logging.Grafana]
-base_url = "https://grafana.ops.prod.cldev.sh"
-base_url_github_ci = "http://localhost:8080/primary"
-dashboard_url = "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs"
-
-[Logging.LogStream]
-# supported targets: file, loki, in-memory. if empty no logs will be persisted
-log_targets = ["file"]
-# context timeout for starting log producer and also time-frame for requesting logs
-log_producer_timeout = "10s"
-# number of retries before log producer gives up and stops listening to logs
-log_producer_retry_limit = 10
-
[ChainlinkImage]
# postgres version to use
postgres_version = "12.0"
diff --git a/integration-tests/testconfig/forwarder_ocr/example.toml b/integration-tests/testconfig/forwarder_ocr/example.toml
index 517a341f803..6ca4b8bbcc3 100644
--- a/integration-tests/testconfig/forwarder_ocr/example.toml
+++ b/integration-tests/testconfig/forwarder_ocr/example.toml
@@ -7,33 +7,6 @@ version="2.7.0"
# if set to true will save logs even if test did not fail
test_log_collect=false
-[Logging.LogStream]
-# supported targets: file, loki, in-memory. if empty no logs will be persistet
-log_targets=["file"]
-# context timeout for starting log producer and also time-frame for requesting logs
-log_producer_timeout="10s"
-# number of retries before log producer gives up and stops listening to logs
-log_producer_retry_limit=10
-
-[Logging.Loki]
-tenant_id="tenant_id"
-# full URL of Loki ingest endpoint
-endpoint="https://loki.url/api/v3/push"
-# currently only needed when using public instance
-basic_auth_secret="loki-basic-auth"
-# only needed for cloud grafana
-bearer_token_secret="bearer_token"
-
-# LogStream will try to shorten Grafana URLs by default (if all 3 variables are set)
-[Logging.Grafana]
-# grafana url (trailing "/" will be stripped)
-base_url="http://grafana.url"
-# url of your grafana dashboard (prefix and suffix "/" are stirpped), example: /d/ad61652-2712-1722/my-dashboard
-dashboard_url="/d/your-dashboard"
-# Grafana dashboard uid to annotate. Find it in Dashboard Settings -> JSON Model
-dashboard_uid="dashboard-uid-to-annotate"
-bearer_token_secret="my-awesome-token"
-
# if you want to use polygon_mumbial
[Network]
selected_networks=["polygon_mumbai"]
diff --git a/integration-tests/testconfig/forwarder_ocr2/example.toml b/integration-tests/testconfig/forwarder_ocr2/example.toml
index 3ec3e4c690a..e3fb66a0f3a 100644
--- a/integration-tests/testconfig/forwarder_ocr2/example.toml
+++ b/integration-tests/testconfig/forwarder_ocr2/example.toml
@@ -8,33 +8,6 @@ version="2.7.0"
# if set to true will save logs even if test did not fail
test_log_collect=false
-[Logging.LogStream]
-# supported targets: file, loki, in-memory. if empty no logs will be persistet
-log_targets=["file"]
-# context timeout for starting log producer and also time-frame for requesting logs
-log_producer_timeout="10s"
-# number of retries before log producer gives up and stops listening to logs
-log_producer_retry_limit=10
-
-[Logging.Loki]
-tenant_id="tenant_id"
-# full URL of Loki ingest endpoint
-endpoint="https://loki.url/api/v3/push"
-# currently only needed when using public instance
-basic_auth_secret="loki-basic-auth"
-# only needed for cloud grafana
-bearer_token_secret="bearer_token"
-
-# LogStream will try to shorten Grafana URLs by default (if all 3 variables are set)
-[Logging.Grafana]
-# grafana url (trailing "/" will be stripped)
-base_url="http://grafana.url"
-# url of your grafana dashboard (prefix and suffix "/" are stirpped), example: /d/ad61652-2712-1722/my-dashboard
-dashboard_url="/d/your-dashboard"
-# Grafana dashboard uid to annotate. Find it in Dashboard Settings -> JSON Model
-dashboard_uid="dashboard-uid-to-annotate"
-bearer_token_secret="my-awesome-token"
-
# if you want to use polygon_mumbial
[Network]
selected_networks=["polygon_mumbai"]
diff --git a/integration-tests/testconfig/functions/example.toml b/integration-tests/testconfig/functions/example.toml
index 74d931632a8..ec7076fa9f9 100644
--- a/integration-tests/testconfig/functions/example.toml
+++ b/integration-tests/testconfig/functions/example.toml
@@ -7,14 +7,6 @@ version="2.7.0"
# if set to true will save logs even if test did not fail
test_log_collect=false
-[Logging.LogStream]
-# supported targets: file, loki, in-memory. if empty no logs will be persistet
-log_targets=["file"]
-# context timeout for starting log producer and also time-frame for requesting logs
-log_producer_timeout="10s"
-# number of retries before log producer gives up and stops listening to logs
-log_producer_retry_limit=10
-
# if you want to use simulated network
[Network]
selected_networks=["polygon_mumbai"]
diff --git a/integration-tests/testconfig/keeper/example.toml b/integration-tests/testconfig/keeper/example.toml
index 4efbf974827..7fe3bf26d0a 100644
--- a/integration-tests/testconfig/keeper/example.toml
+++ b/integration-tests/testconfig/keeper/example.toml
@@ -7,14 +7,6 @@ version="2.7.0"
# if set to true will save logs even if test did not fail
test_log_collect=false
-[Logging.LogStream]
-# supported targets: file, loki, in-memory. if empty no logs will be persistet
-log_targets=["file"]
-# context timeout for starting log producer and also time-frame for requesting logs
-log_producer_timeout="10s"
-# number of retries before log producer gives up and stops listening to logs
-log_producer_retry_limit=10
-
# if you want to use polygon_mumbial
[Network]
selected_networks=["polygon_mumbai"]
diff --git a/integration-tests/testconfig/log_poller/example.toml b/integration-tests/testconfig/log_poller/example.toml
index 78f3b5482d9..b94b6e0e202 100644
--- a/integration-tests/testconfig/log_poller/example.toml
+++ b/integration-tests/testconfig/log_poller/example.toml
@@ -7,14 +7,6 @@ version="2.7.0"
# if set to true will save logs even if test did not fail
test_log_collect=false
-[Logging.LogStream]
-# supported targets: file, loki, in-memory. if empty no logs will be persistet
-log_targets=["file"]
-# context timeout for starting log producer and also time-frame for requesting logs
-log_producer_timeout="10s"
-# number of retries before log producer gives up and stops listening to logs
-log_producer_retry_limit=10
-
# if you want to use polygon_mumbial
[Network]
selected_networks=["polygon_mumbai"]
diff --git a/integration-tests/testconfig/node/example.toml b/integration-tests/testconfig/node/example.toml
index bc5628e46b3..4635e40c037 100644
--- a/integration-tests/testconfig/node/example.toml
+++ b/integration-tests/testconfig/node/example.toml
@@ -7,14 +7,6 @@ version="2.7.0"
# if set to true will save logs even if test did not fail
test_log_collect=false
-[Logging.LogStream]
-# supported targets: file, loki, in-memory. if empty no logs will be persistet
-log_targets=["file"]
-# context timeout for starting log producer and also time-frame for requesting logs
-log_producer_timeout="10s"
-# number of retries before log producer gives up and stops listening to logs
-log_producer_retry_limit=10
-
# if you want to use polygon_mumbial
[Network]
selected_networks=["polygon_mumbai"]
diff --git a/integration-tests/testconfig/ocr/example.toml b/integration-tests/testconfig/ocr/example.toml
index 7c1c755567f..d1edd3a67fd 100644
--- a/integration-tests/testconfig/ocr/example.toml
+++ b/integration-tests/testconfig/ocr/example.toml
@@ -7,33 +7,6 @@ version="2.7.0"
# if set to true will save logs even if test did not fail
test_log_collect=false
-[Logging.LogStream]
-# supported targets: file, loki, in-memory. if empty no logs will be persistet
-log_targets=["file"]
-# context timeout for starting log producer and also time-frame for requesting logs
-log_producer_timeout="10s"
-# number of retries before log producer gives up and stops listening to logs
-log_producer_retry_limit=10
-
-[Logging.Loki]
-tenant_id="tenant_id"
-# full URL of Loki ingest endpoint
-endpoint="https://loki.url/api/v3/push"
-# currently only needed when using public instance
-basic_auth_secret="loki-basic-auth"
-# only needed for cloud grafana
-bearer_token_secret="bearer_token"
-
-# LogStream will try to shorten Grafana URLs by default (if all 3 variables are set)
-[Logging.Grafana]
-# grafana url (trailing "/" will be stripped)
-base_url="http://grafana.url"
-# url of your grafana dashboard (prefix and suffix "/" are stirpped), example: /d/ad61652-2712-1722/my-dashboard
-dashboard_url="/d/your-dashboard"
-# Grafana dashboard uid to annotate. Find it in Dashboard Settings -> JSON Model
-dashboard_uid="dashboard-uid-to-annotate"
-bearer_token_secret="my-awesome-token"
-
# if you want to use polygon_mumbial
[Network]
selected_networks=["polygon_mumbai"]
diff --git a/integration-tests/testconfig/ocr2/example.toml b/integration-tests/testconfig/ocr2/example.toml
index 319f64d2580..679e4527a31 100644
--- a/integration-tests/testconfig/ocr2/example.toml
+++ b/integration-tests/testconfig/ocr2/example.toml
@@ -7,33 +7,6 @@ version="2.7.0"
# if set to true will save logs even if test did not fail
test_log_collect=false
-[Logging.LogStream]
-# supported targets: file, loki, in-memory. if empty no logs will be persistet
-log_targets=["file"]
-# context timeout for starting log producer and also time-frame for requesting logs
-log_producer_timeout="10s"
-# number of retries before log producer gives up and stops listening to logs
-log_producer_retry_limit=10
-
-[Logging.Loki]
-tenant_id="tenant_id"
-# full URL of Loki ingest endpoint
-endpoint="https://loki.url/api/v3/push"
-# currently only needed when using public instance
-basic_auth_secret="loki-basic-auth"
-# only needed for cloud grafana
-bearer_token_secret="bearer_token"
-
-# LogStream will try to shorten Grafana URLs by default (if all 3 variables are set)
-[Logging.Grafana]
-# grafana url (trailing "/" will be stripped)
-base_url="http://grafana.url"
-# url of your grafana dashboard (prefix and suffix "/" are stirpped), example: /d/ad61652-2712-1722/my-dashboard
-dashboard_url="/d/your-dashboard"
-# Grafana dashboard uid to annotate. Find it in Dashboard Settings -> JSON Model
-dashboard_uid="dashboard-uid-to-annotate"
-bearer_token_secret="my-awesome-token"
-
# if you want to use polygon_mumbial
[Network]
selected_networks=["polygon_mumbai"]
diff --git a/integration-tests/testconfig/testconfig.go b/integration-tests/testconfig/testconfig.go
index 545818e3348..19e3f0b7ada 100644
--- a/integration-tests/testconfig/testconfig.go
+++ b/integration-tests/testconfig/testconfig.go
@@ -6,7 +6,6 @@ import (
"fmt"
"math/big"
"os"
- "slices"
"strings"
"github.com/barkimedes/go-deepcopy"
@@ -631,26 +630,6 @@ func (c *TestConfig) Validate() error {
return fmt.Errorf("logging config must be set")
}
- if err := c.Logging.Validate(); err != nil {
- return errors.Wrapf(err, "logging config validation failed")
- }
-
- if c.Logging.Loki != nil {
- if err := c.Logging.Loki.Validate(); err != nil {
- return errors.Wrapf(err, "loki config validation failed")
- }
- }
-
- if c.Logging.LogStream != nil && slices.Contains(c.Logging.LogStream.LogTargets, "loki") {
- if c.Logging.Loki == nil {
- return fmt.Errorf("in order to use Loki as logging target you must set Loki config in logging config")
- }
-
- if err := c.Logging.Loki.Validate(); err != nil {
- return errors.Wrapf(err, "loki config validation failed")
- }
- }
-
if c.Pyroscope != nil {
if err := c.Pyroscope.Validate(); err != nil {
return errors.Wrapf(err, "pyroscope config validation failed")
diff --git a/integration-tests/testconfig/vrfv2/example.toml b/integration-tests/testconfig/vrfv2/example.toml
index 13af6dee620..3665c2f43cf 100644
--- a/integration-tests/testconfig/vrfv2/example.toml
+++ b/integration-tests/testconfig/vrfv2/example.toml
@@ -7,14 +7,6 @@ version="2.7.0"
# if set to true will save logs even if test did not fail
test_log_collect=false
-[Logging.LogStream]
-# supported targets: file, loki, in-memory. if empty no logs will be persistet
-log_targets=["file"]
-# context timeout for starting log producer and also time-frame for requesting logs
-log_producer_timeout="10s"
-# number of retries before log producer gives up and stops listening to logs
-log_producer_retry_limit=10
-
# if you want to use polygon_mumbial
[Network]
selected_networks=["polygon_mumbai"]
diff --git a/integration-tests/testconfig/vrfv2plus/example.toml b/integration-tests/testconfig/vrfv2plus/example.toml
index 160e9ba03a9..a45d53f67b8 100644
--- a/integration-tests/testconfig/vrfv2plus/example.toml
+++ b/integration-tests/testconfig/vrfv2plus/example.toml
@@ -7,14 +7,6 @@ version="2.7.0"
# if set to true will save logs even if test did not fail
test_log_collect=false
-[Logging.LogStream]
-# supported targets: file, loki, in-memory. if empty no logs will be persistet
-log_targets=["file"]
-# context timeout for starting log producer and also time-frame for requesting logs
-log_producer_timeout="10s"
-# number of retries before log producer gives up and stops listening to logs
-log_producer_retry_limit=10
-
# if you want to use polygon_mumbial
[Network]
selected_networks=["polygon_mumbai"]
diff --git a/integration-tests/testsetups/ccip/test_helpers.go b/integration-tests/testsetups/ccip/test_helpers.go
index 3112d738869..514a232bb80 100644
--- a/integration-tests/testsetups/ccip/test_helpers.go
+++ b/integration-tests/testsetups/ccip/test_helpers.go
@@ -8,20 +8,18 @@ import (
"os"
"strconv"
"testing"
- "time"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
- "github.com/smartcontractkit/ccip-owner-contracts/pkg/gethwrappers"
chainsel "github.com/smartcontractkit/chain-selectors"
+ "go.uber.org/zap/zapcore"
- cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3"
- "github.com/smartcontractkit/chainlink-ccip/pluginconfig"
commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config"
"github.com/smartcontractkit/chainlink-testing-framework/lib/blockchain"
ctfconfig "github.com/smartcontractkit/chainlink-testing-framework/lib/config"
ctftestenv "github.com/smartcontractkit/chainlink-testing-framework/lib/docker/test_env"
"github.com/smartcontractkit/chainlink-testing-framework/lib/logging"
"github.com/smartcontractkit/chainlink-testing-framework/lib/networks"
+ "github.com/smartcontractkit/chainlink-testing-framework/lib/testreporters"
"github.com/smartcontractkit/chainlink-testing-framework/lib/utils/conversions"
"github.com/smartcontractkit/chainlink-testing-framework/lib/utils/ptr"
"github.com/smartcontractkit/chainlink-testing-framework/lib/utils/testcontext"
@@ -29,8 +27,6 @@ import (
"github.com/smartcontractkit/chainlink/deployment"
"github.com/smartcontractkit/chainlink/deployment/ccip/changeset"
- commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset"
- commontypes "github.com/smartcontractkit/chainlink/deployment/common/types"
integrationnodes "github.com/smartcontractkit/chainlink/integration-tests/types/config/node"
evmcfg "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml"
corechainlink "github.com/smartcontractkit/chainlink/v2/core/services/chainlink"
@@ -57,235 +53,145 @@ import (
// DeployedLocalDevEnvironment is a helper struct for setting up a local dev environment with docker
type DeployedLocalDevEnvironment struct {
changeset.DeployedEnv
- testEnv *test_env.CLClusterTestEnv
- DON *devenv.DON
+ testEnv *test_env.CLClusterTestEnv
+ DON *devenv.DON
+ devEnvTestCfg tc.TestConfig
+ devEnvCfg *devenv.EnvironmentConfig
}
-func (d DeployedLocalDevEnvironment) RestartChainlinkNodes(t *testing.T) error {
- errGrp := errgroup.Group{}
- for _, n := range d.testEnv.ClCluster.Nodes {
- n := n
- errGrp.Go(func() error {
- if err := n.Container.Terminate(testcontext.Get(t)); err != nil {
- return err
- }
- err := n.RestartContainer()
- if err != nil {
- return err
- }
- return nil
- })
-
- }
- return errGrp.Wait()
+func (l *DeployedLocalDevEnvironment) DeployedEnvironment() changeset.DeployedEnv {
+ return l.DeployedEnv
}
-func NewLocalDevEnvironmentWithDefaultPrice(t *testing.T, lggr logger.Logger, tCfg *changeset.TestConfigs) (changeset.DeployedEnv, *test_env.CLClusterTestEnv, tc.TestConfig) {
- return NewLocalDevEnvironment(t, lggr, changeset.MockLinkPrice, changeset.MockWethPrice, tCfg)
-}
-
-func NewLocalDevEnvironment(
- t *testing.T,
- lggr logger.Logger,
- linkPrice, wethPrice *big.Int,
- tCfg *changeset.TestConfigs,
-) (changeset.DeployedEnv, *test_env.CLClusterTestEnv, tc.TestConfig) {
- if tCfg == nil {
- // set to the default constructed value
- tCfg = &changeset.TestConfigs{}
- }
-
+func (l *DeployedLocalDevEnvironment) StartChains(t *testing.T, _ *changeset.TestConfigs) {
+ lggr := logger.TestLogger(t)
ctx := testcontext.Get(t)
- // create a local docker environment with simulated chains and job-distributor
- // we cannot create the chainlink nodes yet as we need to deploy the capability registry first
envConfig, testEnv, cfg := CreateDockerEnv(t)
- require.NotNil(t, envConfig)
- require.NotEmpty(t, envConfig.Chains, "chainConfigs should not be empty")
- require.NotEmpty(t, envConfig.JDConfig, "jdUrl should not be empty")
+ l.devEnvTestCfg = cfg
+ l.testEnv = testEnv
+ l.devEnvCfg = envConfig
users := make(map[uint64][]*bind.TransactOpts)
for _, chain := range envConfig.Chains {
- sel, err := chainsel.SelectorFromChainId(chain.ChainID)
- require.NoError(t, err)
- users[sel] = chain.Users
+ details, found := chainsel.ChainByEvmChainID(chain.ChainID)
+ require.Truef(t, found, "chain not found")
+ users[details.Selector] = chain.Users
}
- chains, err := devenv.NewChains(lggr, envConfig.Chains)
- require.NoError(t, err)
- // locate the home chain
- homeChainSel := cfg.CCIP.GetHomeChainSelector()
+ homeChainSel := l.devEnvTestCfg.CCIP.GetHomeChainSelector()
require.NotEmpty(t, homeChainSel, "homeChainSel should not be empty")
- feedSel := cfg.CCIP.GetFeedChainSelector()
+ feedSel := l.devEnvTestCfg.CCIP.GetFeedChainSelector()
require.NotEmpty(t, feedSel, "feedSel should not be empty")
+ chains, err := devenv.NewChains(lggr, envConfig.Chains)
+ require.NoError(t, err)
replayBlocks, err := changeset.LatestBlocksByChain(ctx, chains)
require.NoError(t, err)
+ l.DeployedEnv.Users = users
+ l.DeployedEnv.Env.Chains = chains
+ l.DeployedEnv.FeedChainSel = feedSel
+ l.DeployedEnv.HomeChainSel = homeChainSel
+ l.DeployedEnv.ReplayBlocks = replayBlocks
+}
- ab := deployment.NewMemoryAddressBook()
- crConfig := changeset.DeployTestContracts(t, lggr, ab, homeChainSel, feedSel, chains, linkPrice, wethPrice)
-
- // start the chainlink nodes with the CR address
- err = StartChainlinkNodes(t, envConfig,
+func (l *DeployedLocalDevEnvironment) StartNodes(t *testing.T, _ *changeset.TestConfigs, crConfig deployment.CapabilityRegistryConfig) {
+ require.NotNil(t, l.testEnv, "docker env is empty, start chains first")
+ require.NotEmpty(t, l.devEnvTestCfg, "integration test config is empty, start chains first")
+ require.NotNil(t, l.devEnvCfg, "dev environment config is empty, start chains first")
+ err := StartChainlinkNodes(t, l.devEnvCfg,
crConfig,
- testEnv, cfg)
+ l.testEnv, l.devEnvTestCfg)
require.NoError(t, err)
-
- e, don, err := devenv.NewEnvironment(func() context.Context { return ctx }, lggr, *envConfig)
+ ctx := testcontext.Get(t)
+ lggr := logger.TestLogger(t)
+ e, don, err := devenv.NewEnvironment(func() context.Context { return ctx }, lggr, *l.devEnvCfg)
require.NoError(t, err)
require.NotNil(t, e)
- e.ExistingAddresses = ab
+ l.DON = don
+ l.DeployedEnv.Env = *e
// fund the nodes
zeroLogLggr := logging.GetTestLogger(t)
- FundNodes(t, zeroLogLggr, testEnv, cfg, don.PluginNodes())
+ FundNodes(t, zeroLogLggr, l.testEnv, l.devEnvTestCfg, don.PluginNodes())
+}
- env := *e
- envNodes, err := deployment.NodeInfo(env.NodeIDs, env.Offchain)
- require.NoError(t, err)
- allChains := env.AllChainSelectors()
- var usdcChains []uint64
- if tCfg.IsUSDC {
- usdcChains = allChains
- }
- mcmsCfg := make(map[uint64]commontypes.MCMSWithTimelockConfig)
- for _, c := range env.AllChainSelectors() {
- mcmsCfg[c] = commontypes.MCMSWithTimelockConfig{
- Canceller: commonchangeset.SingleGroupMCMS(t),
- Bypasser: commonchangeset.SingleGroupMCMS(t),
- Proposer: commonchangeset.SingleGroupMCMS(t),
- TimelockExecutors: env.AllDeployerKeys(),
- TimelockMinDelay: big.NewInt(0),
- }
- }
- // Need to deploy prerequisites first so that we can form the USDC config
- // no proposals to be made, timelock can be passed as nil here
- env, err = commonchangeset.ApplyChangesets(t, env, nil, []commonchangeset.ChangesetApplication{
- {
- Changeset: commonchangeset.WrapChangeSet(changeset.DeployHomeChain),
- Config: changeset.DeployHomeChainConfig{
- HomeChainSel: homeChainSel,
- RMNStaticConfig: changeset.NewTestRMNStaticConfig(),
- RMNDynamicConfig: changeset.NewTestRMNDynamicConfig(),
- NodeOperators: changeset.NewTestNodeOperator(chains[homeChainSel].DeployerKey.From),
- NodeP2PIDsPerNodeOpAdmin: map[string][][32]byte{
- "NodeOperator": envNodes.NonBootstraps().PeerIDs(),
- },
- },
- },
- {
- Changeset: commonchangeset.WrapChangeSet(commonchangeset.DeployLinkToken),
- Config: allChains,
- },
- {
- Changeset: commonchangeset.WrapChangeSet(changeset.DeployPrerequisites),
- Config: changeset.DeployPrerequisiteConfig{
- ChainSelectors: allChains,
- Opts: []changeset.PrerequisiteOpt{
- changeset.WithUSDCChains(usdcChains),
- changeset.WithMulticall3(tCfg.IsMultiCall3),
- },
- },
- },
- {
- Changeset: commonchangeset.WrapChangeSet(commonchangeset.DeployMCMSWithTimelock),
- Config: mcmsCfg,
- },
- {
- Changeset: commonchangeset.WrapChangeSet(changeset.DeployChainContracts),
- Config: changeset.DeployChainContractsConfig{
- ChainSelectors: allChains,
- HomeChainSelector: homeChainSel,
- },
- },
- })
- require.NoError(t, err)
- state, err := changeset.LoadOnchainState(env)
+func (l *DeployedLocalDevEnvironment) MockUSDCAttestationServer(t *testing.T, isUSDCAttestationMissing bool) string {
+ err := ccipactions.SetMockServerWithUSDCAttestation(l.testEnv.MockAdapter, nil, isUSDCAttestationMissing)
require.NoError(t, err)
+ return l.testEnv.MockAdapter.InternalEndpoint
+}
- var tokenDataProviders []pluginconfig.TokenDataObserverConfig
- if len(usdcChains) > 0 {
- var endpoint string
- err = ccipactions.SetMockServerWithUSDCAttestation(testEnv.MockAdapter, nil, tCfg.IsUSDCAttestationMissing)
- require.NoError(t, err)
- endpoint = testEnv.MockAdapter.InternalEndpoint
- cctpContracts := make(map[cciptypes.ChainSelector]pluginconfig.USDCCCTPTokenConfig)
- for _, usdcChain := range usdcChains {
- cctpContracts[cciptypes.ChainSelector(usdcChain)] = pluginconfig.USDCCCTPTokenConfig{
- SourcePoolAddress: state.Chains[usdcChain].USDCTokenPool.Address().String(),
- SourceMessageTransmitterAddr: state.Chains[usdcChain].MockUSDCTransmitter.Address().String(),
+func (l *DeployedLocalDevEnvironment) RestartChainlinkNodes(t *testing.T) error {
+ errGrp := errgroup.Group{}
+ for _, n := range l.testEnv.ClCluster.Nodes {
+ n := n
+ errGrp.Go(func() error {
+ if err := n.Container.Terminate(testcontext.Get(t)); err != nil {
+ return err
}
- }
- tokenDataProviders = append(tokenDataProviders, pluginconfig.TokenDataObserverConfig{
- Type: pluginconfig.USDCCCTPHandlerType,
- Version: "1.0",
- USDCCCTPObserverConfig: &pluginconfig.USDCCCTPObserverConfig{
- Tokens: cctpContracts,
- AttestationAPI: endpoint,
- AttestationAPITimeout: commonconfig.MustNewDuration(time.Second),
- AttestationAPIInterval: commonconfig.MustNewDuration(500 * time.Millisecond),
- }})
- }
+ err := n.RestartContainer()
+ if err != nil {
+ return err
+ }
+ return nil
+ })
- // Build the per chain config.
- tokenConfig := changeset.NewTestTokenConfig(state.Chains[feedSel].USDFeeds)
- chainConfigs := make(map[uint64]changeset.CCIPOCRParams)
- timelocksPerChain := make(map[uint64]*gethwrappers.RBACTimelock)
- for _, chain := range allChains {
- timelocksPerChain[chain] = state.Chains[chain].Timelock
- tokenInfo := tokenConfig.GetTokenInfo(e.Logger, state.Chains[chain].LinkToken, state.Chains[chain].Weth9)
- ocrParams := changeset.DefaultOCRParams(feedSel, tokenInfo, tokenDataProviders)
- if tCfg.OCRConfigOverride != nil {
- ocrParams = tCfg.OCRConfigOverride(ocrParams)
- }
- chainConfigs[chain] = ocrParams
}
-
- // Deploy second set of changesets to deploy and configure the CCIP contracts.
- env, err = commonchangeset.ApplyChangesets(t, env, timelocksPerChain, []commonchangeset.ChangesetApplication{
- {
- Changeset: commonchangeset.WrapChangeSet(changeset.ConfigureNewChains),
- Config: changeset.NewChainsConfig{
- HomeChainSel: homeChainSel,
- FeedChainSel: feedSel,
- ChainConfigByChain: chainConfigs,
- },
- },
- {
- Changeset: commonchangeset.WrapChangeSet(changeset.CCIPCapabilityJobspec),
- },
- })
- require.NoError(t, err)
-
- // Ensure capreg logs are up to date.
- changeset.ReplayLogs(t, e.Offchain, replayBlocks)
-
- return changeset.DeployedEnv{
- Env: env,
- HomeChainSel: homeChainSel,
- FeedChainSel: feedSel,
- ReplayBlocks: replayBlocks,
- Users: users,
- }, testEnv, cfg
+ return errGrp.Wait()
}
-func NewLocalDevEnvironmentWithRMN(
- t *testing.T,
- lggr logger.Logger,
- numRmnNodes int,
-) (changeset.DeployedEnv, devenv.RMNCluster) {
- tenv, dockerenv, testCfg := NewLocalDevEnvironmentWithDefaultPrice(t, lggr, nil)
- l := logging.GetTestLogger(t)
- config := GenerateTestRMNConfig(t, numRmnNodes, tenv, MustNetworksToRPCMap(dockerenv.EVMNetworks))
- require.NotNil(t, testCfg.CCIP)
- rmnCluster, err := devenv.NewRMNCluster(
- t, l,
- []string{dockerenv.DockerNetwork.ID},
- config,
- testCfg.CCIP.RMNConfig.GetProxyImage(),
- testCfg.CCIP.RMNConfig.GetProxyVersion(),
- testCfg.CCIP.RMNConfig.GetAFN2ProxyImage(),
- testCfg.CCIP.RMNConfig.GetAFN2ProxyVersion(),
- dockerenv.LogStream,
- )
- require.NoError(t, err)
- return tenv, *rmnCluster
+// NewIntegrationEnvironment creates a new integration test environment based on the provided test config
+// It can create a memory environment or a docker environment based on env var CCIP_V16_TEST_ENV
+// By default, it creates a memory environment if env var CCIP_V16_TEST_ENV is not set
+// if CCIP_V16_TEST_ENV is set to 'docker', it creates a docker environment with test config provided under testconfig/ccip/ccip.toml
+// It also creates a RMN cluster if the test config has RMN enabled
+// It returns the deployed environment and RMN cluster ( in case of RMN enabled)
+func NewIntegrationEnvironment(t *testing.T, opts ...changeset.TestOps) (changeset.DeployedEnv, devenv.RMNCluster) {
+ testCfg := changeset.DefaultTestConfigs()
+ for _, opt := range opts {
+ opt(testCfg)
+ }
+ // check for EnvType env var
+ testCfg.MustSetEnvTypeOrDefault(t)
+ require.NoError(t, testCfg.Validate(), "invalid test config")
+ switch testCfg.Type {
+ case changeset.Memory:
+ memEnv := changeset.NewMemoryEnvironment(t, opts...)
+ return memEnv, devenv.RMNCluster{}
+ case changeset.Docker:
+ dockerEnv := &DeployedLocalDevEnvironment{}
+ if testCfg.RMNEnabled {
+ deployedEnv := changeset.NewEnvironmentWithJobsAndContracts(t, testCfg, dockerEnv)
+ l := logging.GetTestLogger(t)
+ require.NotNil(t, dockerEnv.testEnv, "empty docker environment")
+ config := GenerateTestRMNConfig(t, testCfg.NumOfRMNNodes, deployedEnv, MustNetworksToRPCMap(dockerEnv.testEnv.EVMNetworks))
+ require.NotNil(t, dockerEnv.devEnvTestCfg.CCIP)
+ rmnCluster, err := devenv.NewRMNCluster(
+ t, l,
+ []string{dockerEnv.testEnv.DockerNetwork.ID},
+ config,
+ dockerEnv.devEnvTestCfg.CCIP.RMNConfig.GetProxyImage(),
+ dockerEnv.devEnvTestCfg.CCIP.RMNConfig.GetProxyVersion(),
+ dockerEnv.devEnvTestCfg.CCIP.RMNConfig.GetAFN2ProxyImage(),
+ dockerEnv.devEnvTestCfg.CCIP.RMNConfig.GetAFN2ProxyVersion(),
+ )
+ require.NoError(t, err)
+ return deployedEnv, *rmnCluster
+ }
+ if testCfg.CreateJobAndContracts {
+ deployedEnv := changeset.NewEnvironmentWithJobsAndContracts(t, testCfg, dockerEnv)
+ require.NotNil(t, dockerEnv.testEnv, "empty docker environment")
+ return deployedEnv, devenv.RMNCluster{}
+ }
+ if testCfg.CreateJob {
+ deployedEnv := changeset.NewEnvironmentWithJobs(t, testCfg, dockerEnv)
+ require.NotNil(t, dockerEnv.testEnv, "empty docker environment")
+ return deployedEnv, devenv.RMNCluster{}
+ }
+ deployedEnv := changeset.NewEnvironment(t, testCfg, dockerEnv)
+ require.NotNil(t, dockerEnv.testEnv, "empty docker environment")
+ return deployedEnv, devenv.RMNCluster{}
+ default:
+ require.Failf(t, "Type %s not supported in integration tests choose between %s and %s", string(testCfg.Type), changeset.Memory, changeset.Docker)
+ }
+ return changeset.DeployedEnv{}, devenv.RMNCluster{}
}
func MustNetworksToRPCMap(evmNetworks []*blockchain.EVMNetwork) map[uint64]string {
@@ -418,11 +324,30 @@ func CreateDockerEnv(t *testing.T) (
}
}
+ // ignore critical CL node logs until they are fixed, as otherwise tests will fail
+ var logScannerSettings = test_env.GetDefaultChainlinkNodeLogScannerSettingsWithExtraAllowedMessages(testreporters.NewAllowedLogMessage(
+ "No live RPC nodes available",
+ "CL nodes are started before simulated chains, so this is expected",
+ zapcore.DPanicLevel,
+ testreporters.WarnAboutAllowedMsgs_No),
+ testreporters.NewAllowedLogMessage(
+ "Error stopping job service",
+ "Possible lifecycle bug in chainlink: failed to close RMN home reader: has already been stopped: already stopped",
+ zapcore.DPanicLevel,
+ testreporters.WarnAboutAllowedMsgs_No),
+ testreporters.NewAllowedLogMessage(
+ "Shutdown grace period of 5s exceeded, closing DB and exiting...",
+ "Possible lifecycle bug in chainlink.",
+ zapcore.DPanicLevel,
+ testreporters.WarnAboutAllowedMsgs_No),
+ )
+
builder := test_env.NewCLTestEnvBuilder().
WithTestConfig(&cfg).
WithTestInstance(t).
WithMockAdapter().
WithJobDistributor(cfg.CCIP.JobDistributorConfig).
+ WithChainlinkNodeLogScanner(logScannerSettings).
WithStandardCleanup()
// if private ethereum networks are provided, we will use them to create the test environment
@@ -528,7 +453,6 @@ func StartChainlinkNodes(
pointer.GetString(cfg.GetChainlinkImageConfig().Image),
pointer.GetString(cfg.GetChainlinkImageConfig().Version),
toml,
- env.LogStream,
test_env.WithPgDBOptions(
ctftestenv.WithPostgresImageVersion(pointer.GetString(cfg.GetChainlinkImageConfig().PostgresVersion)),
),
diff --git a/integration-tests/utils/pgtest/pgtest.go b/integration-tests/utils/pgtest/pgtest.go
index 8b11f9ef424..3baccc791b6 100644
--- a/integration-tests/utils/pgtest/pgtest.go
+++ b/integration-tests/utils/pgtest/pgtest.go
@@ -3,33 +3,18 @@ package pgtest
import (
"testing"
- "github.com/google/uuid"
"github.com/jmoiron/sqlx"
- "github.com/scylladb/go-reflectx"
- "github.com/stretchr/testify/assert"
- "github.com/stretchr/testify/require"
- "github.com/smartcontractkit/chainlink-common/pkg/sqlutil"
- "github.com/smartcontractkit/chainlink-common/pkg/utils"
- "github.com/smartcontractkit/chainlink-common/pkg/utils/tests"
- "github.com/smartcontractkit/chainlink/v2/core/store/dialects"
+ "github.com/smartcontractkit/chainlink-common/pkg/sqlutil/pg"
+
+ "github.com/smartcontractkit/chainlink/v2/core/config/env"
)
func NewSqlxDB(t testing.TB) *sqlx.DB {
- db, err := sqlx.Open(string(dialects.TransactionWrappedPostgres), uuid.New().String())
- require.NoError(t, err)
- t.Cleanup(func() { assert.NoError(t, db.Close()) })
- db.MapperFunc(reflectx.CamelToSnakeASCII)
-
- return db
-}
-
-func MustExec(t *testing.T, ds sqlutil.DataSource, stmt string, args ...interface{}) {
- ctx := tests.Context(t)
- require.NoError(t, utils.JustError(ds.ExecContext(ctx, stmt, args...)))
-}
-
-func MustCount(t *testing.T, db *sqlx.DB, stmt string, args ...interface{}) (cnt int) {
- require.NoError(t, db.Get(&cnt, stmt, args...))
- return
+ dbURL := string(env.DatabaseURL.Get())
+ if dbURL == "" {
+ t.Errorf("you must provide a CL_DATABASE_URL environment variable")
+ return nil
+ }
+ return pg.NewTestDB(t, dbURL)
}
diff --git a/integration-tests/utils/pgtest/txdb.go b/integration-tests/utils/pgtest/txdb.go
deleted file mode 100644
index f28b6f95f2b..00000000000
--- a/integration-tests/utils/pgtest/txdb.go
+++ /dev/null
@@ -1,510 +0,0 @@
-package pgtest
-
-import (
- "context"
- "database/sql"
- "database/sql/driver"
- "flag"
- "fmt"
- "io"
- "net/url"
- "strings"
- "sync"
- "testing"
-
- "github.com/jmoiron/sqlx"
- "go.uber.org/multierr"
-
- "github.com/smartcontractkit/chainlink/v2/core/config/env"
- "github.com/smartcontractkit/chainlink/v2/core/store/dialects"
-)
-
-// txdb is a simplified version of https://github.com/DATA-DOG/go-txdb
-//
-// The original lib has various problems and is hard to understand because it
-// tries to be more general. The version in this file is more tightly focused
-// to our needs and should be easier to reason about and less likely to have
-// subtle bugs/races.
-//
-// It doesn't currently support savepoints but could be made to if necessary.
-//
-// Transaction BEGIN/ROLLBACK effectively becomes a no-op, this should have no
-// negative impact on normal test operation.
-//
-// If you MUST test BEGIN/ROLLBACK behaviour, you will have to configure your
-// store to use the raw DialectPostgres dialect and setup a one-use database.
-// See heavyweight.FullTestDB() as a convenience function to help you do this,
-// but please use sparingly because as it's name implies, it is expensive.
-func init() {
- testing.Init()
- if !flag.Parsed() {
- flag.Parse()
- }
- if testing.Short() {
- // -short tests don't need a DB
- return
- }
- dbURL := string(env.DatabaseURL.Get())
- if dbURL == "" {
- panic("you must provide a CL_DATABASE_URL environment variable")
- }
-
- parsed, err := url.Parse(dbURL)
- if err != nil {
- panic(err)
- }
- if parsed.Path == "" {
- msg := fmt.Sprintf("invalid %[1]s: `%[2]s`. You must set %[1]s env var to point to your test database. Note that the test database MUST end in `_test` to differentiate from a possible production DB. HINT: Try %[1]s=postgresql://postgres@localhost:5432/chainlink_test?sslmode=disable", env.DatabaseURL, parsed.String())
- panic(msg)
- }
- if !strings.HasSuffix(parsed.Path, "_test") {
- msg := fmt.Sprintf("cannot run tests against database named `%s`. Note that the test database MUST end in `_test` to differentiate from a possible production DB. HINT: Try %s=postgresql://postgres@localhost:5432/chainlink_test?sslmode=disable", parsed.Path[1:], env.DatabaseURL)
- panic(msg)
- }
- name := string(dialects.TransactionWrappedPostgres)
- sql.Register(name, &txDriver{
- dbURL: dbURL,
- conns: make(map[string]*conn),
- })
- sqlx.BindDriver(name, sqlx.DOLLAR)
-}
-
-var _ driver.Conn = &conn{}
-
-var _ driver.Validator = &conn{}
-var _ driver.SessionResetter = &conn{}
-
-// txDriver is an sql driver which runs on a single transaction.
-// When `Close` is called, transaction is rolled back.
-type txDriver struct {
- sync.Mutex
- db *sql.DB
- conns map[string]*conn
-
- dbURL string
-}
-
-func (d *txDriver) Open(dsn string) (driver.Conn, error) {
- d.Lock()
- defer d.Unlock()
- // Open real db connection if its the first call
- if d.db == nil {
- db, err := sql.Open(string(dialects.Postgres), d.dbURL)
- if err != nil {
- return nil, err
- }
- d.db = db
- }
- c, exists := d.conns[dsn]
- if !exists || !c.tryOpen() {
- tx, err := d.db.Begin()
- if err != nil {
- return nil, err
- }
- c = &conn{tx: tx, opened: 1, dsn: dsn}
- c.removeSelf = func() error {
- return d.deleteConn(c)
- }
- d.conns[dsn] = c
- }
- return c, nil
-}
-
-// deleteConn is called by a connection when it is closed via the `close` method.
-// It also auto-closes the DB when the last checked out connection is closed.
-func (d *txDriver) deleteConn(c *conn) error {
- // must lock here to avoid racing with Open
- d.Lock()
- defer d.Unlock()
-
- if d.conns[c.dsn] != c {
- return nil // already been replaced
- }
- delete(d.conns, c.dsn)
- if len(d.conns) == 0 && d.db != nil {
- if err := d.db.Close(); err != nil {
- return err
- }
- d.db = nil
- }
- return nil
-}
-
-type conn struct {
- sync.Mutex
- dsn string
- tx *sql.Tx // tx may be shared by many conns, definitive one lives in the map keyed by DSN on the txDriver. Do not modify from conn
- closed bool
- opened int
- removeSelf func() error
-}
-
-func (c *conn) Begin() (driver.Tx, error) {
- c.Lock()
- defer c.Unlock()
- if c.closed {
- panic("conn is closed")
- }
- // Begin is a noop because the transaction was already opened
- return tx{c.tx}, nil
-}
-
-// Implement the "ConnBeginTx" interface
-func (c *conn) BeginTx(_ context.Context, opts driver.TxOptions) (driver.Tx, error) {
- // Context is ignored, because single transaction is shared by all callers, thus caller should not be able to
- // control it with local context
- return c.Begin()
-}
-
-// Prepare returns a prepared statement, bound to this connection.
-func (c *conn) Prepare(query string) (driver.Stmt, error) {
- return c.PrepareContext(context.Background(), query)
-}
-
-// Implement the "ConnPrepareContext" interface
-func (c *conn) PrepareContext(ctx context.Context, query string) (driver.Stmt, error) {
- c.Lock()
- defer c.Unlock()
- if c.closed {
- panic("conn is closed")
- }
-
- // TODO: Fix context handling
- // FIXME: It is not safe to give the passed in context to the tx directly
- // because the tx is shared by many conns and cancelling the context will
- // destroy the tx which can affect other conns
- st, err := c.tx.PrepareContext(context.Background(), query)
- if err != nil {
- return nil, err
- }
- return &stmt{st, c}, nil
-}
-
-// IsValid is called prior to placing the connection into the
-// connection pool by database/sql. The connection will be discarded if false is returned.
-func (c *conn) IsValid() bool {
- c.Lock()
- defer c.Unlock()
- return !c.closed
-}
-
-func (c *conn) ResetSession(ctx context.Context) error {
- // Ensure bad connections are reported: From database/sql/driver:
- // If a connection is never returned to the connection pool but immediately reused, then
- // ResetSession is called prior to reuse but IsValid is not called.
- c.Lock()
- defer c.Unlock()
- if c.closed {
- return driver.ErrBadConn
- }
-
- return nil
-}
-
-// pgx returns nil
-func (c *conn) CheckNamedValue(nv *driver.NamedValue) error {
- return nil
-}
-
-// Implement the "QueryerContext" interface
-func (c *conn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error) {
- c.Lock()
- defer c.Unlock()
- if c.closed {
- panic("conn is closed")
- }
-
- // TODO: Fix context handling
- rs, err := c.tx.QueryContext(context.Background(), query, mapNamedArgs(args)...)
- if err != nil {
- return nil, err
- }
- defer rs.Close()
-
- return buildRows(rs)
-}
-
-// Implement the "ExecerContext" interface
-func (c *conn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error) {
- c.Lock()
- defer c.Unlock()
- if c.closed {
- panic("conn is closed")
- }
- // TODO: Fix context handling
- return c.tx.ExecContext(context.Background(), query, mapNamedArgs(args)...)
-}
-
-// tryOpen attempts to increment the open count, but returns false if closed.
-func (c *conn) tryOpen() bool {
- c.Lock()
- defer c.Unlock()
- if c.closed {
- return false
- }
- c.opened++
- return true
-}
-
-// Close invalidates and potentially stops any current
-// prepared statements and transactions, marking this
-// connection as no longer in use.
-//
-// Because the sql package maintains a free pool of
-// connections and only calls Close when there's a surplus of
-// idle connections, it shouldn't be necessary for drivers to
-// do their own connection caching.
-//
-// Drivers must ensure all network calls made by Close
-// do not block indefinitely (e.g. apply a timeout).
-func (c *conn) Close() (err error) {
- if !c.close() {
- return
- }
- // Wait to remove self to avoid nesting locks.
- if err := c.removeSelf(); err != nil {
- panic(err)
- }
- return
-}
-
-//nolint:revive
-func (c *conn) close() bool {
- c.Lock()
- defer c.Unlock()
- if c.closed {
- // Double close, should be a safe to make this a noop
- // PGX allows double close
- // See: https://github.com/jackc/pgx/blob/a457da8bffa4f90ad672fa093ee87f20cf06687b/conn.go#L249
- return false
- }
-
- c.opened--
- if c.opened > 0 {
- return false
- }
- if c.tx != nil {
- if err := c.tx.Rollback(); err != nil {
- panic(err)
- }
- c.tx = nil
- }
- c.closed = true
- return true
-}
-
-type tx struct {
- tx *sql.Tx
-}
-
-func (tx tx) Commit() error {
- // Commit is a noop because the transaction will be rolled back at the end
- return nil
-}
-
-func (tx tx) Rollback() error {
- // Rollback is a noop because the transaction will be rolled back at the end
- return nil
-}
-
-type stmt struct {
- st *sql.Stmt
- conn *conn
-}
-
-func (s stmt) Exec(args []driver.Value) (driver.Result, error) {
- s.conn.Lock()
- defer s.conn.Unlock()
- if s.conn.closed {
- panic("conn is closed")
- }
- return s.st.Exec(mapArgs(args)...)
-}
-
-// Implement the "StmtExecContext" interface
-func (s *stmt) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error) {
- s.conn.Lock()
- defer s.conn.Unlock()
- if s.conn.closed {
- panic("conn is closed")
- }
- // TODO: Fix context handling
- return s.st.ExecContext(context.Background(), mapNamedArgs(args)...)
-}
-
-func mapArgs(args []driver.Value) (res []interface{}) {
- res = make([]interface{}, len(args))
- for i := range args {
- res[i] = args[i]
- }
- return
-}
-
-func (s stmt) NumInput() int {
- return -1
-}
-
-func (s stmt) Query(args []driver.Value) (driver.Rows, error) {
- s.conn.Lock()
- defer s.conn.Unlock()
- if s.conn.closed {
- panic("conn is closed")
- }
- rows, err := s.st.Query(mapArgs(args)...)
- defer func() {
- err = multierr.Combine(err, rows.Close())
- }()
- if err != nil {
- return nil, err
- }
- return buildRows(rows)
-}
-
-// Implement the "StmtQueryContext" interface
-func (s *stmt) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error) {
- s.conn.Lock()
- defer s.conn.Unlock()
- if s.conn.closed {
- panic("conn is closed")
- }
- // TODO: Fix context handling
- rows, err := s.st.QueryContext(context.Background(), mapNamedArgs(args)...)
- if err != nil {
- return nil, err
- }
- return buildRows(rows)
-}
-
-func (s stmt) Close() error {
- s.conn.Lock()
- defer s.conn.Unlock()
- return s.st.Close()
-}
-
-func buildRows(r *sql.Rows) (driver.Rows, error) {
- set := &rowSets{}
- rs := &rows{}
- if err := rs.read(r); err != nil {
- return set, err
- }
- set.sets = append(set.sets, rs)
- for r.NextResultSet() {
- rss := &rows{}
- if err := rss.read(r); err != nil {
- return set, err
- }
- set.sets = append(set.sets, rss)
- }
- return set, nil
-}
-
-// Implement the "RowsNextResultSet" interface
-func (rs *rowSets) HasNextResultSet() bool {
- return rs.pos+1 < len(rs.sets)
-}
-
-// Implement the "RowsNextResultSet" interface
-func (rs *rowSets) NextResultSet() error {
- if !rs.HasNextResultSet() {
- return io.EOF
- }
-
- rs.pos++
- return nil
-}
-
-type rows struct {
- rows [][]driver.Value
- pos int
- cols []string
- colTypes []*sql.ColumnType
-}
-
-func (r *rows) Columns() []string {
- return r.cols
-}
-
-func (r *rows) ColumnTypeDatabaseTypeName(index int) string {
- return r.colTypes[index].DatabaseTypeName()
-}
-
-func (r *rows) Next(dest []driver.Value) error {
- r.pos++
- if r.pos > len(r.rows) {
- return io.EOF
- }
-
- for i, val := range r.rows[r.pos-1] {
- dest[i] = *(val.(*interface{}))
- }
-
- return nil
-}
-
-func (r *rows) Close() error {
- return nil
-}
-
-func (r *rows) read(rs *sql.Rows) error {
- var err error
- r.cols, err = rs.Columns()
- if err != nil {
- return err
- }
-
- r.colTypes, err = rs.ColumnTypes()
- if err != nil {
- return err
- }
-
- for rs.Next() {
- values := make([]interface{}, len(r.cols))
- for i := range values {
- values[i] = new(interface{})
- }
- if err := rs.Scan(values...); err != nil {
- return err
- }
- row := make([]driver.Value, len(r.cols))
- for i, v := range values {
- row[i] = driver.Value(v)
- }
- r.rows = append(r.rows, row)
- }
- return rs.Err()
-}
-
-type rowSets struct {
- sets []*rows
- pos int
-}
-
-func (rs *rowSets) Columns() []string {
- return rs.sets[rs.pos].cols
-}
-
-func (rs *rowSets) ColumnTypeDatabaseTypeName(index int) string {
- return rs.sets[rs.pos].ColumnTypeDatabaseTypeName(index)
-}
-
-func (rs *rowSets) Close() error {
- return nil
-}
-
-// advances to next row
-func (rs *rowSets) Next(dest []driver.Value) error {
- return rs.sets[rs.pos].Next(dest)
-}
-
-func mapNamedArgs(args []driver.NamedValue) (res []interface{}) {
- res = make([]interface{}, len(args))
- for i := range args {
- name := args[i].Name
- if name != "" {
- res[i] = sql.Named(name, args[i].Value)
- } else {
- res[i] = args[i].Value
- }
- }
- return
-}
diff --git a/internal/testdb/testdb.go b/internal/testdb/testdb.go
index 88251ae2c6f..1a52b1173e3 100644
--- a/internal/testdb/testdb.go
+++ b/internal/testdb/testdb.go
@@ -7,7 +7,7 @@ import (
"net/url"
"strings"
- "github.com/smartcontractkit/chainlink/v2/core/store/dialects"
+ pgcommon "github.com/smartcontractkit/chainlink-common/pkg/sqlutil/pg"
)
const (
@@ -33,7 +33,7 @@ func CreateOrReplace(parsed url.URL, suffix string, withTemplate bool) (string,
// Cannot drop test database if we are connected to it, so we must connect
// to a different one. 'postgres' should be present on all postgres installations
parsed.Path = "/postgres"
- db, err := sql.Open(string(dialects.Postgres), parsed.String())
+ db, err := sql.Open(string(pgcommon.Postgres), parsed.String())
if err != nil {
return "", fmt.Errorf("in order to drop the test database, we need to connect to a separate database"+
" called 'postgres'. But we are unable to open 'postgres' database: %+v\n", err)
@@ -66,7 +66,7 @@ func Drop(dbURL url.URL) error {
// Cannot drop test database if we are connected to it, so we must connect
// to a different one. 'postgres' should be present on all postgres installations
dbURL.Path = "/postgres"
- db, err := sql.Open(string(dialects.Postgres), dbURL.String())
+ db, err := sql.Open(string(pgcommon.Postgres), dbURL.String())
if err != nil {
return fmt.Errorf("in order to drop the test database, we need to connect to a separate database"+
" called 'postgres'. But we are unable to open 'postgres' database: %+v\n", err)
diff --git a/plugins/registrar.go b/plugins/registrar.go
index 2a82f2a6204..8523d3980cc 100644
--- a/plugins/registrar.go
+++ b/plugins/registrar.go
@@ -6,7 +6,7 @@ import (
"github.com/smartcontractkit/chainlink-common/pkg/loop"
)
-// RegistrarConfig generates contains static configuration inher
+// RegistrarConfig generates contains static configuration
type RegistrarConfig interface {
RegisterLOOP(config CmdConfig) (func() *exec.Cmd, loop.GRPCOpts, error)
UnregisterLOOP(ID string)
diff --git a/testdata/scripts/chains/cosmos/help.txtar b/testdata/scripts/chains/cosmos/help.txtar
index edef6f7345c..4fe0a930ac0 100644
--- a/testdata/scripts/chains/cosmos/help.txtar
+++ b/testdata/scripts/chains/cosmos/help.txtar
@@ -3,13 +3,13 @@ cmp stdout out.txt
-- out.txt --
NAME:
- chainlink chains cosmos - Commands for handling Cosmos chains
+ chainlink chains cosmos - Commands for handling cosmos chains
USAGE:
chainlink chains cosmos command [command options] [arguments...]
COMMANDS:
- list List all existing Cosmos chains
+ list List all existing cosmos chains
OPTIONS:
--help, -h show help
diff --git a/testdata/scripts/chains/cosmos/list/help.txtar b/testdata/scripts/chains/cosmos/list/help.txtar
index 7e9be2efb00..d1f2d166374 100644
--- a/testdata/scripts/chains/cosmos/list/help.txtar
+++ b/testdata/scripts/chains/cosmos/list/help.txtar
@@ -3,7 +3,7 @@ cmp stdout out.txt
-- out.txt --
NAME:
- chainlink chains cosmos list - List all existing Cosmos chains
+ chainlink chains cosmos list - List all existing cosmos chains
USAGE:
chainlink chains cosmos list [arguments...]
diff --git a/testdata/scripts/chains/evm/help.txtar b/testdata/scripts/chains/evm/help.txtar
index e15dde5ecd2..b3e9e366810 100644
--- a/testdata/scripts/chains/evm/help.txtar
+++ b/testdata/scripts/chains/evm/help.txtar
@@ -3,13 +3,13 @@ cmp stdout out.txt
-- out.txt --
NAME:
- chainlink chains evm - Commands for handling EVM chains
+ chainlink chains evm - Commands for handling evm chains
USAGE:
chainlink chains evm command [command options] [arguments...]
COMMANDS:
- list List all existing EVM chains
+ list List all existing evm chains
OPTIONS:
--help, -h show help
diff --git a/testdata/scripts/chains/evm/list/help.txtar b/testdata/scripts/chains/evm/list/help.txtar
index 154ee110ad5..bb5eec199b7 100644
--- a/testdata/scripts/chains/evm/list/help.txtar
+++ b/testdata/scripts/chains/evm/list/help.txtar
@@ -3,7 +3,7 @@ cmp stdout out.txt
-- out.txt --
NAME:
- chainlink chains evm list - List all existing EVM chains
+ chainlink chains evm list - List all existing evm chains
USAGE:
chainlink chains evm list [arguments...]
diff --git a/testdata/scripts/chains/help.txtar b/testdata/scripts/chains/help.txtar
index 83a342925e1..ccfb54d2928 100644
--- a/testdata/scripts/chains/help.txtar
+++ b/testdata/scripts/chains/help.txtar
@@ -9,10 +9,11 @@ USAGE:
chainlink chains command [command options] [arguments...]
COMMANDS:
- evm Commands for handling EVM chains
- cosmos Commands for handling Cosmos chains
- solana Commands for handling Solana chains
- starknet Commands for handling StarkNet chains
+ aptos Commands for handling aptos chains
+ cosmos Commands for handling cosmos chains
+ evm Commands for handling evm chains
+ solana Commands for handling solana chains
+ starknet Commands for handling starknet chains
OPTIONS:
--help, -h show help
diff --git a/testdata/scripts/chains/solana/help.txtar b/testdata/scripts/chains/solana/help.txtar
index be3ab9b343b..ddc27fed18f 100644
--- a/testdata/scripts/chains/solana/help.txtar
+++ b/testdata/scripts/chains/solana/help.txtar
@@ -3,13 +3,13 @@ cmp stdout out.txt
-- out.txt --
NAME:
- chainlink chains solana - Commands for handling Solana chains
+ chainlink chains solana - Commands for handling solana chains
USAGE:
chainlink chains solana command [command options] [arguments...]
COMMANDS:
- list List all existing Solana chains
+ list List all existing solana chains
OPTIONS:
--help, -h show help
diff --git a/testdata/scripts/chains/solana/list/help.txtar b/testdata/scripts/chains/solana/list/help.txtar
index 794085d43d9..ed8a857529d 100644
--- a/testdata/scripts/chains/solana/list/help.txtar
+++ b/testdata/scripts/chains/solana/list/help.txtar
@@ -3,7 +3,7 @@ cmp stdout out.txt
-- out.txt --
NAME:
- chainlink chains solana list - List all existing Solana chains
+ chainlink chains solana list - List all existing solana chains
USAGE:
chainlink chains solana list [arguments...]
diff --git a/testdata/scripts/chains/starknet/help.txtar b/testdata/scripts/chains/starknet/help.txtar
index 992623d842c..5cb8fe93746 100644
--- a/testdata/scripts/chains/starknet/help.txtar
+++ b/testdata/scripts/chains/starknet/help.txtar
@@ -3,13 +3,13 @@ cmp stdout out.txt
-- out.txt --
NAME:
- chainlink chains starknet - Commands for handling StarkNet chains
+ chainlink chains starknet - Commands for handling starknet chains
USAGE:
chainlink chains starknet command [command options] [arguments...]
COMMANDS:
- list List all existing StarkNet chains
+ list List all existing starknet chains
OPTIONS:
--help, -h show help
diff --git a/testdata/scripts/chains/starknet/list/help.txtar b/testdata/scripts/chains/starknet/list/help.txtar
index 723318bf098..67315ce6c1e 100644
--- a/testdata/scripts/chains/starknet/list/help.txtar
+++ b/testdata/scripts/chains/starknet/list/help.txtar
@@ -3,7 +3,7 @@ cmp stdout out.txt
-- out.txt --
NAME:
- chainlink chains starknet list - List all existing StarkNet chains
+ chainlink chains starknet list - List all existing starknet chains
USAGE:
chainlink chains starknet list [arguments...]
diff --git a/testdata/scripts/help-all/help-all.txtar b/testdata/scripts/help-all/help-all.txtar
index 372b149bd19..078853ef6a5 100644
--- a/testdata/scripts/help-all/help-all.txtar
+++ b/testdata/scripts/help-all/help-all.txtar
@@ -24,14 +24,16 @@ bridges destroy # Destroys the Bridge for an External Adapter
bridges list # List all Bridges to External Adapters
bridges show # Show a Bridge's details
chains # Commands for handling chain configuration
-chains cosmos # Commands for handling Cosmos chains
-chains cosmos list # List all existing Cosmos chains
-chains evm # Commands for handling EVM chains
-chains evm list # List all existing EVM chains
-chains solana # Commands for handling Solana chains
-chains solana list # List all existing Solana chains
-chains starknet # Commands for handling StarkNet chains
-chains starknet list # List all existing StarkNet chains
+chains aptos # Commands for handling aptos chains
+chains aptos list # List all existing aptos chains
+chains cosmos # Commands for handling cosmos chains
+chains cosmos list # List all existing cosmos chains
+chains evm # Commands for handling evm chains
+chains evm list # List all existing evm chains
+chains solana # Commands for handling solana chains
+chains solana list # List all existing solana chains
+chains starknet # Commands for handling starknet chains
+chains starknet list # List all existing starknet chains
config # Commands for the node's configuration
config loglevel # Set log level
config logsql # Enable/disable SQL statement logging
@@ -132,14 +134,16 @@ node start # Run the Chainlink node
node status # Displays the health of various services running inside the node.
node validate # Validate the TOML configuration and secrets that are passed as flags to the `node` command. Prints the full effective configuration, with defaults included
nodes # Commands for handling node configuration
-nodes cosmos # Commands for handling Cosmos node configuration
-nodes cosmos list # List all existing Cosmos nodes
-nodes evm # Commands for handling EVM node configuration
-nodes evm list # List all existing EVM nodes
-nodes solana # Commands for handling Solana node configuration
-nodes solana list # List all existing Solana nodes
-nodes starknet # Commands for handling StarkNet node configuration
-nodes starknet list # List all existing StarkNet nodes
+nodes aptos # Commands for handling aptos node configuration
+nodes aptos list # List all existing aptos nodes
+nodes cosmos # Commands for handling cosmos node configuration
+nodes cosmos list # List all existing cosmos nodes
+nodes evm # Commands for handling evm node configuration
+nodes evm list # List all existing evm nodes
+nodes solana # Commands for handling solana node configuration
+nodes solana list # List all existing solana nodes
+nodes starknet # Commands for handling starknet node configuration
+nodes starknet list # List all existing starknet nodes
txs # Commands for handling transactions
txs cosmos # Commands for handling Cosmos transactions
txs cosmos create # Send