From 590bce58b9a6fc4899bc47358f71cecdb90c4e49 Mon Sep 17 00:00:00 2001 From: Makram Kamaleddine Date: Tue, 22 Oct 2024 15:24:54 +0400 Subject: [PATCH] Post merge fixes --- .github/actions/golangci-lint/action.yml | 27 +- .github/e2e-tests.yml | 2 +- .github/workflows/ccip-chaos-tests.yml | 255 -- .../ccip-client-compatibility-tests.yml | 4 +- .github/workflows/ccip-live-network-tests.yml | 32 +- .github/workflows/ccip-load-tests.yml | 309 +- .../workflows/ccip-offchain-upgrade-tests.yml | 10 +- .github/workflows/ci-core.yml | 50 +- .github/workflows/integration-tests.yml | 936 ------- .../workflows/solidity-foundry-artifacts.yml | 322 +-- .github/workflows/solidity-foundry.yml | 425 +-- .github/workflows/solidity-hardhat.yml | 143 - .golangci.yml | 13 +- .mockery.yaml | 5 +- contracts/gas-snapshots/ccip.gas-snapshot | 17 +- .../gas-snapshots/functions.gas-snapshot | 18 +- contracts/gas-snapshots/keystone.gas-snapshot | 215 +- .../scripts/native_solc_compile_all_ccip | 1 - .../USDC/HybridLockReleaseUSDCTokenPool.sol | 1 + .../v0.8/ccip/test/e2e/MultiRampsEnd2End.sol | 305 -- .../ccip/test/helpers/USDCReaderTester.sol | 62 - .../test/KeystoneForwarder_ReportTest.t.sol | 32 +- core/capabilities/integration_tests/setup.go | 1 - .../targets/mocks/contract_reader.go | 533 ++++ .../capabilities/targets/write_target_test.go | 12 +- core/chains/evm/gas/rollups/op_l1_oracle.go | 2 + .../ccip/generated/ccip_config/ccip_config.go | 1126 -------- .../ocr3_config_encoder.go | 195 -- .../usdc_reader_tester/usdc_reader_tester.go | 333 --- .../applications/ethsenderreceiver/main.go | 1 + core/scripts/ccip/ccip-revert-reason/main.go | 8 +- core/scripts/ccip/debugreceiver/main.go | 6 +- .../ccip/liquiditymanager/arb/finalize.go | 1 + .../ccip/liquiditymanager/arb/send_to_l2.go | 3 + .../ccip/liquiditymanager/arb/withdraw.go | 1 + .../liquiditymanager/multienv/multienv.go | 19 +- .../ccip/liquiditymanager/opstack/finalize.go | 2 + .../opstack/prove_withdrawal.go | 2 + .../liquiditymanager/opstack/send_to_l2.go | 2 + .../ccip/liquiditymanager/opstack/withdraw.go | 2 + .../ccip/revert-reason/handler/reason.go | 6 +- core/scripts/go.mod | 1 - core/scripts/go.sum | 2 - core/services/chainlink/config_test.go | 12 +- .../llo/evm/report_codec_premium_legacy.go | 8 +- .../llo/onchain_channel_definition_cache.go | 3 +- core/services/ocr/contract_tracker.go | 1 + .../ccip/internal/pricegetter/evm_test.go | 77 +- .../ccip/testhelpers/integration/chainlink.go | 4 +- .../testhelpers_1_4_0/chainlink.go | 4 +- .../internal/integration_test.go | 4 +- .../ocr2/plugins/llo/integration_test.go | 8 +- core/services/relay/evm/functions.go | 2 +- core/services/relay/evm/median_test.go | 4 +- core/services/workflows/delegate.go | 2 +- core/services/workflows/engine.go | 5 +- core/services/workflows/models.go | 2 +- core/services/workflows/models_test.go | 1 - docs/CONFIG.md | 372 +-- go.md | 5 - go.mod | 2 +- go.sum | 4 +- integration-tests/ccip-tests/Makefile | 26 - integration-tests/ccip-tests/README.md | 14 +- .../ccip-tests/actions/ccip_helpers.go | 86 +- .../ccip-tests/load/ccip_loadgen.go | 34 - .../ccip-tests/load/ccip_multicall_loadgen.go | 4 - integration-tests/ccip-tests/load/helper.go | 13 - .../ccip-tests/smoke/ccip_test.go | 44 +- .../ccip-tests/testconfig/README.md | 42 - .../ccip-tests/testconfig/ccip.go | 61 - .../testconfig/examples/.testsecrets.example | 6 +- .../ccip-tests/testconfig/global.go | 20 - .../testconfig/override/mainnet.toml | 88 - .../testconfig/tomls/ccip-default.toml | 13 - .../tomls/ccip1.4-stress/baseline.toml | 43 +- .../tomls/prod-testnet/load-prod-testnet.toml | 901 ------ .../ccip-tests/testsetups/ccip.go | 16 - .../ccip-tests/testsetups/test_env.go | 55 +- integration-tests/crib/chaos.go | 2 - integration-tests/crib/ocr_test.go | 1 - integration-tests/deployment/README.md | 58 - integration-tests/deployment/address_book.go | 163 -- .../deployment/address_book_test.go | 120 - integration-tests/deployment/changeset.go | 12 - .../deployment/devenv/.sample.env | 25 - integration-tests/deployment/devenv/README.md | 45 - .../deployment/devenv/build_env.go | 354 --- integration-tests/deployment/devenv/chain.go | 91 - integration-tests/deployment/devenv/don.go | 282 -- .../deployment/devenv/environment.go | 55 - integration-tests/deployment/devenv/jd.go | 71 - integration-tests/deployment/environment.go | 266 -- integration-tests/deployment/evm_kmsclient.go | 233 -- .../deployment/evm_kmsclient_test.go | 27 - integration-tests/deployment/helpers.go | 82 - .../deployment/jd/csa/v1/csa.pb.go | 418 --- .../deployment/jd/csa/v1/csa_grpc.pb.go | 146 - .../deployment/jd/job/v1/job.pb.go | 1994 ------------- .../deployment/jd/job/v1/job_grpc.pb.go | 384 --- .../deployment/jd/node/v1/node.pb.go | 2492 ----------------- .../deployment/jd/node/v1/node_grpc.pb.go | 343 --- .../deployment/jd/shared/ptypes/label.pb.go | 311 -- integration-tests/deployment/memory/chain.go | 74 - .../deployment/memory/environment.go | 147 - .../deployment/memory/job_client.go | 161 -- integration-tests/deployment/memory/node.go | 291 -- .../deployment/memory/node_test.go | 25 - integration-tests/deployment/multiclient.go | 124 - .../deployment/multiclient_test.go | 36 - integration-tests/go.mod | 20 +- integration-tests/go.sum | 5 +- integration-tests/load/go.mod | 1 - integration-tests/load/go.sum | 2 - integration-tests/smoke/ccip_test.go | 90 - testdata/scripts/node/validate/default.txtar | 1 + .../node/validate/defaults-override.txtar | 468 ---- testdata/scripts/node/validate/invalid.txtar | 12 +- tools/bin/go_core_ccip_deployment_tests | 43 - tools/flakeytests/cmd/runner/main.go | 7 +- tools/flakeytests/reporter.go | 6 +- tools/flakeytests/reporter_test.go | 10 +- 122 files changed, 1030 insertions(+), 15896 deletions(-) delete mode 100644 .github/workflows/solidity-hardhat.yml delete mode 100644 contracts/src/v0.8/ccip/test/e2e/MultiRampsEnd2End.sol delete mode 100644 contracts/src/v0.8/ccip/test/helpers/USDCReaderTester.sol create mode 100644 core/capabilities/targets/mocks/contract_reader.go delete mode 100644 core/gethwrappers/ccip/generated/ccip_config/ccip_config.go delete mode 100644 core/gethwrappers/ccip/generated/ocr3_config_encoder/ocr3_config_encoder.go delete mode 100644 core/gethwrappers/ccip/generated/usdc_reader_tester/usdc_reader_tester.go delete mode 100644 integration-tests/deployment/README.md delete mode 100644 integration-tests/deployment/address_book.go delete mode 100644 integration-tests/deployment/address_book_test.go delete mode 100644 integration-tests/deployment/changeset.go delete mode 100644 integration-tests/deployment/devenv/.sample.env delete mode 100644 integration-tests/deployment/devenv/README.md delete mode 100644 integration-tests/deployment/devenv/build_env.go delete mode 100644 integration-tests/deployment/devenv/chain.go delete mode 100644 integration-tests/deployment/devenv/don.go delete mode 100644 integration-tests/deployment/devenv/environment.go delete mode 100644 integration-tests/deployment/devenv/jd.go delete mode 100644 integration-tests/deployment/environment.go delete mode 100644 integration-tests/deployment/evm_kmsclient.go delete mode 100644 integration-tests/deployment/evm_kmsclient_test.go delete mode 100644 integration-tests/deployment/helpers.go delete mode 100644 integration-tests/deployment/jd/csa/v1/csa.pb.go delete mode 100644 integration-tests/deployment/jd/csa/v1/csa_grpc.pb.go delete mode 100644 integration-tests/deployment/jd/job/v1/job.pb.go delete mode 100644 integration-tests/deployment/jd/job/v1/job_grpc.pb.go delete mode 100644 integration-tests/deployment/jd/node/v1/node.pb.go delete mode 100644 integration-tests/deployment/jd/node/v1/node_grpc.pb.go delete mode 100644 integration-tests/deployment/jd/shared/ptypes/label.pb.go delete mode 100644 integration-tests/deployment/memory/chain.go delete mode 100644 integration-tests/deployment/memory/environment.go delete mode 100644 integration-tests/deployment/memory/job_client.go delete mode 100644 integration-tests/deployment/memory/node.go delete mode 100644 integration-tests/deployment/memory/node_test.go delete mode 100644 integration-tests/deployment/multiclient.go delete mode 100644 integration-tests/deployment/multiclient_test.go delete mode 100644 integration-tests/smoke/ccip_test.go delete mode 100644 testdata/scripts/node/validate/defaults-override.txtar delete mode 100755 tools/bin/go_core_ccip_deployment_tests diff --git a/.github/actions/golangci-lint/action.yml b/.github/actions/golangci-lint/action.yml index a90a764ef2..3ada575877 100644 --- a/.github/actions/golangci-lint/action.yml +++ b/.github/actions/golangci-lint/action.yml @@ -36,9 +36,6 @@ runs: using: composite steps: - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - with: - # We only need a full clone on merge_group events for golangci-lint. - fetch-depth: ${{ github.event_name == 'merge_group' && '0' || '1' }}" - name: Setup Go uses: ./.github/actions/setup-go with: @@ -53,23 +50,17 @@ runs: working-directory: ${{ inputs.go-directory }} shell: bash run: go build ./... - - name: Set golangci-lint working directory - shell: bash - id: set-working-directory - # XXX: Don't use `.` default working directory here due to issues with the golangci-lint-action. - run: | - if [ "${{ inputs.go-directory }}" == "." ]; then - echo "golangci-lint-working-directory=" | tee -a $GITHUB_OUTPUT - else - echo "golangci-lint-working-directory=${{ inputs.go-directory }}" | tee -a $GITHUB_OUTPUT - fi - name: golangci-lint - uses: golangci/golangci-lint-action@38e1018663fa5173f3968ea0777460d3de38f256 # v5.3.0 + uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0.0 with: - version: v1.60.3 - only-new-issues: true + version: v1.59.1 + # We already cache these directories in setup-go + skip-pkg-cache: true + skip-build-cache: true + # only-new-issues is only applicable to PRs, otherwise it is always set to false + only-new-issues: false # disabled for PRs due to unreliability args: --out-format colored-line-number,checkstyle:golangci-lint-report.xml - working-directory: ${{ steps.set-working-directory.outputs.golangci-lint-working-directory }} + working-directory: ${{ inputs.go-directory }} - name: Print lint report artifact if: failure() shell: bash @@ -89,4 +80,4 @@ runs: hostname: ${{ inputs.gc-host }} org-id: ${{ inputs.gc-org-id }} this-job-name: ${{ inputs.name }} - continue-on-error: true + continue-on-error: true \ No newline at end of file diff --git a/.github/e2e-tests.yml b/.github/e2e-tests.yml index 4b2e8fe830..02ab3ee101 100644 --- a/.github/e2e-tests.yml +++ b/.github/e2e-tests.yml @@ -904,7 +904,7 @@ runner-test-matrix: - Nightly E2E Tests test_cmd: cd integration-tests/migration && go test upgrade_version_test.go -timeout 30m -count=1 -test.parallel=2 -json test_env_vars: - E2E_TEST_CHAINLINK_IMAGE: public.ecr.aws/chainlink/chainlink + E2E_TEST_CHAINLINK_IMAGE: public.ecr.aws/w0i8p0z9/chainlink-ccip E2E_TEST_CHAINLINK_VERSION: '{{ env.LATEST_CHAINLINK_RELEASE_VERSION }}' E2E_TEST_CHAINLINK_UPGRADE_IMAGE: '{{ env.QA_CHAINLINK_IMAGE }}' E2E_TEST_CHAINLINK_UPGRADE_VERSION: '{{ env.DEFAULT_CHAINLINK_VERSION }}' diff --git a/.github/workflows/ccip-chaos-tests.yml b/.github/workflows/ccip-chaos-tests.yml index 7c8e718128..6e36e14ef0 100644 --- a/.github/workflows/ccip-chaos-tests.yml +++ b/.github/workflows/ccip-chaos-tests.yml @@ -3,268 +3,14 @@ on: workflow_run: workflows: [ CCIP Load Test ] types: [ completed ] -<<<<<<< HEAD branches: [ ccip-develop ] workflow_dispatch: - - -======= - branches: [ develop ] - workflow_dispatch: - ->>>>>>> v2.17.0 # Only run 1 of this workflow at a time per PR concurrency: group: chaos-ccip-tests-chainlink-${{ github.ref }} cancel-in-progress: true -<<<<<<< HEAD -env: - CL_ECR: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink - ENV_JOB_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-ccip-tests:${{ github.sha }} - MOD_CACHE_VERSION: 1 - -jobs: - build-chainlink: - environment: integration - permissions: - id-token: write - contents: read - name: Build Chainlink Image - runs-on: ubuntu20.04-16cores-64GB - steps: - - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - - name: Check if image exists - id: check-image - uses: smartcontractkit/chainlink-github-actions/docker/image-exists@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17 - with: - repository: chainlink - tag: ${{ github.sha }} - AWS_REGION: ${{ secrets.QA_AWS_REGION }} - AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - - name: Build Image - if: steps.check-image.outputs.exists == 'false' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17 - env: - GH_TOKEN: ${{ github.token }} - with: - cl_repo: smartcontractkit/chainlink-ccip - cl_ref: ${{ github.sha }} - push_tag: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink:${{ github.sha }} - QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} - QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - - name: Collect Metrics - if: always() - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0 - with: - id: ccip-chaos-tests-build-chainlink-image - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: Build Chainlink Image - continue-on-error: true - - build-test-image: - environment: integration - permissions: - id-token: write - contents: read - name: Build Test Image - runs-on: ubuntu20.04-16cores-64GB - steps: - - name: Collect Metrics - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0 - with: - id: ccip-chaos-tests-build-test-image - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: Build Test Image - continue-on-error: true - - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - - name: Build Test Image - uses: ./.github/actions/build-test-image - with: - QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} - QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} - - ccip-chaos-tests: - environment: integration - permissions: - issues: read - checks: write - pull-requests: write - id-token: write - contents: read - name: CCIP Chaos Tests - runs-on: ubuntu-latest - needs: [ build-chainlink, build-test-image ] - env: - TEST_SUITE: chaos - TEST_ARGS: -test.timeout 30m - CHAINLINK_COMMIT_SHA: ${{ github.sha }} - CHAINLINK_ENV_USER: ${{ github.actor }} - TEST_TRIGGERED_BY: ccip-cron-chaos-eth - TEST_LOG_LEVEL: debug - DATABASE_URL: postgresql://postgres:node@localhost:5432/chainlink_test?sslmode=disable - GH_TOKEN: ${{ github.token }} - steps: - - name: Collect Metrics - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0 - with: - id: ccip-chaos-tests - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: CCIP Chaos Tests - test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}' - continue-on-error: true - - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - - name: Prepare Base64 TOML override for CCIP secrets - uses: ./.github/actions/setup-create-base64-config-ccip - id: setup_create_base64_config_ccip - with: - runId: ${{ github.run_id }} - testLogCollect: ${{ vars.TEST_LOG_COLLECT }} - chainlinkVersion: ${{ github.sha }} - logstreamLogTargets: ${{ vars.LOGSTREAM_LOG_TARGETS }} - - name: Run Chaos Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@d38226be720c5ccc1ff4d3cee40608ebf264cd59 # v2.3.26 - env: - BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }} - TEST_BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }} - with: - test_command_to_run: cd ./integration-tests && go test -timeout 1h -count=1 -json -test.parallel 11 -run 'TestChaosCCIP' ./chaos 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci - test_download_vendor_packages_command: make gomod - artifacts_location: ./integration-tests/chaos/logs - publish_check_name: CCIP Chaos Test Results - publish_report_paths: ./tests-chaos-report.xml - triggered_by: ${{ env.TEST_TRIGGERED_BY }} - token: ${{ secrets.GITHUB_TOKEN }} - go_mod_path: ./integration-tests/go.mod - QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} - QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} - CGO_ENABLED: "1" - aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} - cache_key_id: ccip-load-${{ env.MOD_CACHE_VERSION }} - cache_restore_only: "true" - DEFAULT_LOKI_TENANT_ID: ${{ vars.LOKI_TENANT_ID }} - DEFAULT_LOKI_ENDPOINT: ${{ secrets.LOKI_URL }} - DEFAULT_LOKI_BASIC_AUTH: ${{ secrets.LOKI_BASIC_AUTH }} - DEFAULT_CHAINLINK_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink - DEFAULT_GRAFANA_BASE_URL: ${{ vars.GRAFANA_URL }} - DEFAULT_GRAFANA_DASHBOARD_URL: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" - - ## Notify in slack if the job fails - - name: Notify Slack - if: failure() && github.event_name != 'workflow_dispatch' - uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0 - env: - SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} - with: - channel-id: "#ccip-testing" - slack-message: ":x: :mild-panic-intensifies: CCIP chaos tests failed: \n${{ format('https://github.com/{0}/actions/runs/{1}', github.repository, github.run_id) }}" - ## Run Cleanup if the job succeeds - - name: cleanup - if: always() - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/cleanup@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17 - with: - triggered_by: ${{ env.TEST_TRIGGERED_BY }} - - ccip-chaos-with-load-tests: - environment: integration - permissions: - issues: read - checks: write - pull-requests: write - id-token: write - contents: read - name: CCIP Load With Chaos Tests - if: false # Disabled until CCIP-2555 is resolved - runs-on: ubuntu-latest - needs: [ build-chainlink, build-test-image ] - env: - TEST_SUITE: load - TEST_ARGS: -test.timeout 1h - CHAINLINK_COMMIT_SHA: ${{ github.sha }} - CHAINLINK_ENV_USER: ${{ github.actor }} - TEST_TRIGGERED_BY: ccip-cron-chaos-and-load-eth - TEST_LOG_LEVEL: debug - DATABASE_URL: postgresql://postgres:node@localhost:5432/chainlink_test?sslmode=disable - GH_TOKEN: ${{ github.token }} - steps: - - name: Collect Metrics - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0 - with: - id: ccip-chaos-tests-with-load-test - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: CCIP load with chaos test - continue-on-error: true - - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - - name: Prepare Base64 TOML override for CCIP secrests - uses: ./.github/actions/setup-create-base64-config-ccip - id: setup_create_base64_config_ccip - with: - runId: ${{ github.run_id }} - testLogCollect: ${{ vars.TEST_LOG_COLLECT }} - chainlinkVersion: ${{ github.sha }} - logstreamLogTargets: ${{ vars.LOGSTREAM_LOG_TARGETS }} - - name: Run Load With Chaos Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@d38226be720c5ccc1ff4d3cee40608ebf264cd59 # v2.3.26 - env: - BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }} - TEST_BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }} - with: - test_command_to_run: cd ./integration-tests/ccip-tests && go test -timeout 2h -count=1 -json -test.parallel 4 -run '^TestLoadCCIPStableWithPodChaosDiffCommitAndExec' ./load 2>&1 | tee /tmp/gotest.log | gotestfmt - test_download_vendor_packages_command: make gomod - artifacts_location: ./integration-tests/load/logs - publish_check_name: CCIP Chaos With Load Test Results - publish_report_paths: ./tests-chaos-with-load-report.xml - triggered_by: ${{ env.TEST_TRIGGERED_BY }} - token: ${{ secrets.GITHUB_TOKEN }} - go_mod_path: ./integration-tests/go.mod - QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} - QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} - CGO_ENABLED: "1" - aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} - cache_key_id: ccip-load-${{ env.MOD_CACHE_VERSION }} - cache_restore_only: "true" - DEFAULT_LOKI_TENANT_ID: ${{ vars.LOKI_TENANT_ID }} - DEFAULT_LOKI_ENDPOINT: ${{ secrets.LOKI_URL }} - DEFAULT_LOKI_BASIC_AUTH: ${{ secrets.LOKI_BASIC_AUTH }} - DEFAULT_CHAINLINK_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink - DEFAULT_GRAFANA_BASE_URL: ${{ vars.GRAFANA_URL }} - DEFAULT_GRAFANA_DASHBOARD_URL: "/d/6vjVx-1V8/ccip-long-running-tests" - ## Notify in slack if the job fails - - name: Notify Slack - if: failure() && github.event_name != 'workflow_dispatch' - uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0 - env: - SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} - with: - channel-id: "#ccip-testing" - slack-message: ":x: :mild-panic-intensifies: CCIP chaos with load tests failed: \n${{ format('https://github.com/{0}/actions/runs/{1}', github.repository, github.run_id) }}" - ## Run Cleanup if the job succeeds - - name: cleanup - if: always() - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/cleanup@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17 - with: - triggered_by: ${{ env.TEST_TRIGGERED_BY }} -======= jobs: run-e2e-tests-workflow: name: Run E2E Tests @@ -297,4 +43,3 @@ jobs: 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 }} ->>>>>>> v2.17.0 diff --git a/.github/workflows/ccip-client-compatibility-tests.yml b/.github/workflows/ccip-client-compatibility-tests.yml index 58c05f2f72..b21ef82bab 100644 --- a/.github/workflows/ccip-client-compatibility-tests.yml +++ b/.github/workflows/ccip-client-compatibility-tests.yml @@ -534,8 +534,8 @@ jobs: - name: Run Tests uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@d38226be720c5ccc1ff4d3cee40608ebf264cd59 # v2.3.26 env: - BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }} - TEST_BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }} + BASE64_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }} + TEST_BASE64_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }} with: test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json -test.parallel=2 ${{ matrix.evm_node.run }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci test_download_vendor_packages_command: cd ./integration-tests && go mod download diff --git a/.github/workflows/ccip-live-network-tests.yml b/.github/workflows/ccip-live-network-tests.yml index d1789fca74..68f012421f 100644 --- a/.github/workflows/ccip-live-network-tests.yml +++ b/.github/workflows/ccip-live-network-tests.yml @@ -177,14 +177,14 @@ jobs: echo ::add-mask::$SLACK_USER echo "SLACK_USER=$SLACK_USER" >> "$GITHUB_ENV" if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then - BASE64_CCIP_CONFIG_OVERRIDE=$(jq -r '.inputs.base64_test_input' $GITHUB_EVENT_PATH) - echo ::add-mask::$BASE64_CCIP_CONFIG_OVERRIDE - echo "base_64_override=$BASE64_CCIP_CONFIG_OVERRIDE" >> $GITHUB_OUTPUT + BASE64_CONFIG_OVERRIDE=$(jq -r '.inputs.base64_test_input' $GITHUB_EVENT_PATH) + echo ::add-mask::$BASE64_CONFIG_OVERRIDE + echo "base_64_override=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_OUTPUT fi if [[ "${{ github.event_name }}" == "schedule" ]]; then - BASE64_CCIP_CONFIG_OVERRIDE=$(base64 -w 0 -i ./integration-tests/ccip-tests/testconfig/override/${{ matrix.config }}) - echo ::add-mask::$BASE64_CCIP_CONFIG_OVERRIDE - echo "base_64_override=$BASE64_CCIP_CONFIG_OVERRIDE" >> $GITHUB_OUTPUT + BASE64_CONFIG_OVERRIDE=$(base64 -w 0 -i ./integration-tests/ccip-tests/testconfig/override/${{ matrix.config }}) + echo ::add-mask::$BASE64_CONFIG_OVERRIDE + echo "base_64_override=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_OUTPUT echo "SLACK_USER=${{ secrets.QA_SLACK_USER }}" >> $GITHUB_ENV fi - name: step summary @@ -212,8 +212,8 @@ jobs: RR_CPU: 4 DETACH_RUNNER: true TEST_TRIGGERED_BY: ccip-load-test-ci - BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }},${{ steps.set_override_config.outputs.base_64_override }} - TEST_BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }},${{ steps.set_override_config.outputs.base_64_override }} + BASE64_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }},${{ steps.set_override_config.outputs.base_64_override }} + TEST_BASE64_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }},${{ steps.set_override_config.outputs.base_64_override }} E2E_TEST_GRAFANA_DASHBOARD_URL: "/d/6vjVx-1V8/ccip-long-running-tests" with: test_command_to_run: cd ./integration-tests/ccip-tests && go test -v -timeout 70m -count=1 -json -run ^TestLoadCCIPStableRPS$ ./load 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false @@ -338,14 +338,14 @@ jobs: echo ::add-mask::$SLACK_USER echo "SLACK_USER=$SLACK_USER" >> "$GITHUB_ENV" if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then - BASE64_CCIP_CONFIG_OVERRIDE=$(jq -r '.inputs.base64_test_input' $GITHUB_EVENT_PATH) - echo ::add-mask::$BASE64_CCIP_CONFIG_OVERRIDE - echo "base_64_override=$BASE64_CCIP_CONFIG_OVERRIDE" >> $GITHUB_OUTPUT + BASE64_CONFIG_OVERRIDE=$(jq -r '.inputs.base64_test_input' $GITHUB_EVENT_PATH) + echo ::add-mask::$BASE64_CONFIG_OVERRIDE + echo "base_64_override=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_OUTPUT fi if [[ "${{ github.event_name }}" == "schedule" ]]; then - BASE64_CCIP_CONFIG_OVERRIDE=$(base64 -w 0 -i ./integration-tests/ccip-tests/testconfig/override/mainnet.toml) - echo ::add-mask::$BASE64_CCIP_CONFIG_OVERRIDE - echo "base_64_override=$BASE64_CCIP_CONFIG_OVERRIDE" >> $GITHUB_OUTPUT + BASE64_CONFIG_OVERRIDE=$(base64 -w 0 -i ./integration-tests/ccip-tests/testconfig/override/mainnet.toml) + echo ::add-mask::$BASE64_CONFIG_OVERRIDE + echo "base_64_override=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_OUTPUT echo "SLACK_USER=${{ secrets.QA_SLACK_USER }}" >> $GITHUB_ENV fi - name: step summary @@ -374,8 +374,8 @@ jobs: RR_MEM: 8Gi RR_CPU: 4 TEST_TRIGGERED_BY: ccip-smoke-test-ci - BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }},${{ steps.set_override_config.outputs.base_64_override }} - TEST_BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }},${{ steps.set_override_config.outputs.base_64_override }} + BASE64_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }},${{ steps.set_override_config.outputs.base_64_override }} + TEST_BASE64_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }},${{ steps.set_override_config.outputs.base_64_override }} E2E_TEST_GRAFANA_DASHBOARD_URL: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" OVERRIDE_NETWORK_PAIRS: ${{ matrix.lanes.pairs }} OVERRIDE_PHASE_TIMEOUT: ${{ matrix.lanes.phaseTimeout }} diff --git a/.github/workflows/ccip-load-tests.yml b/.github/workflows/ccip-load-tests.yml index 25e0acc005..1b71c044cd 100644 --- a/.github/workflows/ccip-load-tests.yml +++ b/.github/workflows/ccip-load-tests.yml @@ -1,28 +1,12 @@ name: CCIP Load Test on: push: -<<<<<<< HEAD branches: - ccip-develop -======= - paths: - - '**/*ccip*' - - '**/*ccip*/**' - branches: - - develop ->>>>>>> v2.17.0 tags: - '*' workflow_dispatch: inputs: -<<<<<<< HEAD - base64_test_input: # base64 encoded toml for test input - description: 'Base64 encoded toml test input' - required: false - test_secrets_override_key: - description: 'Key to run tests with custom test secrets' - required: false -======= test_config_override_path: description: Path to a test config file used to override the default test config required: false @@ -34,7 +18,6 @@ on: chainlink_version: description: Chainlink image version to use. Commit sha if not provided required: false ->>>>>>> v2.17.0 type: string # Only run 1 of this workflow at a time per PR @@ -42,296 +25,6 @@ concurrency: group: load-ccip-tests-chainlink-${{ github.ref }} cancel-in-progress: true -<<<<<<< HEAD -env: - CHAINLINK_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink - CHAINLINK_VERSION: ${{ github.sha}} - INPUT_CHAINLINK_TEST_VERSION: ${{ github.sha}} - ENV_JOB_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-ccip-tests:${{ github.sha }} - INTERNAL_DOCKER_REPO: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com - AWS_ECR_REPO_PUBLIC_REGISTRY: public.ecr.aws - MOD_CACHE_VERSION: 1 - E2E_TEST_CHAINLINK_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink - E2E_TEST_LOKI_TENANT_ID: ${{ vars.LOKI_TENANT_ID }} - E2E_TEST_LOKI_ENDPOINT: ${{ secrets.LOKI_URL }} - E2E_TEST_LOKI_BASIC_AUTH: ${{ secrets.LOKI_BASIC_AUTH }} - E2E_TEST_GRAFANA_BASE_URL: ${{ vars.GRAFANA_URL }} - # Default private key test secret loaded from Github Secret as only security team has access to it. - # this key secrets.QA_SHARED_803C_KEY has a story behind it. To know more, see CCIP-2875 and SECHD-16575 tickets. - E2E_TEST_ETHEREUM_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} - E2E_TEST_ARBITRUM_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} - E2E_TEST_BASE_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} - E2E_TEST_WEMIX_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} - E2E_TEST_AVALANCHE_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} - E2E_TEST_ZKSYNC_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} - E2E_TEST_MODE_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} - E2E_TEST_METIS_ANDROMEDA_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} - E2E_TEST_OPTIMISM_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} - E2E_TEST_KROMA_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} - E2E_TEST_GNOSIS_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} - E2E_TEST_POLYGON_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} - E2E_TEST_BSC_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} - -jobs: - build-chainlink: - environment: integration - permissions: - id-token: write - contents: read - name: Build Chainlink Image - runs-on: ubuntu20.04-16cores-64GB - steps: - - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - - name: Check if image exists - id: check-image - uses: smartcontractkit/chainlink-github-actions/docker/image-exists@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17 - with: - repository: chainlink - tag: ${{ env.CHAINLINK_VERSION }} - AWS_REGION: ${{ secrets.QA_AWS_REGION }} - AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - - name: Build Image - if: steps.check-image.outputs.exists == 'false' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17 - env: - GH_TOKEN: ${{ github.token }} - with: - cl_repo: smartcontractkit/chainlink-ccip - cl_ref: ${{ env.CHAINLINK_VERSION }} - push_tag: ${{ env.CHAINLINK_IMAGE }}:${{ env.CHAINLINK_VERSION }} - QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} - QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - - name: Collect Metrics - if: always() - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0 - with: - id: ccip-load-test-build-chainlink-image - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: Build Chainlink Image - continue-on-error: true - - build-test-image: - environment: integration - permissions: - id-token: write - contents: read - name: Build Test Image - runs-on: ubuntu20.04-16cores-64GB - steps: - - name: Collect Metrics - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0 - with: - id: ccip-load-test-build-test-image - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: Build Test Image - continue-on-error: true - - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - - name: Build Test Image - uses: ./.github/actions/build-test-image - with: - tag: ${{ env.INPUT_CHAINLINK_TEST_VERSION }} - QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} - QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} - - ccip-load-test: - environment: integration - needs: [ build-chainlink, build-test-image ] - if: ${{ always() && !contains(needs.*.result, 'failure') }} - permissions: - issues: read - checks: write - pull-requests: write - id-token: write - contents: read - env: - CHAINLINK_ENV_USER: ${{ github.actor }} - SLACK_API_KEY: ${{ secrets.QA_SLACK_API_KEY }} - SLACK_CHANNEL: ${{ secrets.QA_SLACK_CHANNEL }} - TEST_LOG_LEVEL: info - REF_NAME: ${{ github.head_ref || github.ref_name }} - strategy: - fail-fast: false - matrix: - type: - - name: stable-load - run: ^TestLoadCCIPStableRPS$ - os: ubuntu-latest - - name: load-with-arm-curse-uncurse - run: ^TestLoadCCIPStableRPSAfterARMCurseAndUncurse$ - config_path: ./integration-tests/ccip-tests/testconfig/tomls/load-with-arm-curse-uncurse.toml - os: ubuntu-latest - runs-on: ${{ matrix.type.os }} - name: CCIP ${{ matrix.type.name }} - steps: - - name: Collect Metrics - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0 - with: - id: ccip-load-test-${{ matrix.type.name }} - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: CCIP ${{ matrix.type.name }} - test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}' - continue-on-error: true - - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - with: - ref: ${{ env.REF_NAME }} - - name: Sets env vars - id: set_override_config - shell: bash - run: | - # if the matrix.type.config_path is set, use it as the override config - if [ -n "${{ matrix.type.config_path }}" ]; then - BASE64_CCIP_CONFIG_OVERRIDE=$(base64 -w 0 -i ${{ matrix.type.config_path }}) - echo ::add-mask::$BASE64_CCIP_CONFIG_OVERRIDE - echo "base_64_override=$BASE64_CCIP_CONFIG_OVERRIDE" >> $GITHUB_OUTPUT - fi - if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then - BASE64_CCIP_CONFIG_OVERRIDE=$(jq -r '.inputs.base64_test_input' $GITHUB_EVENT_PATH) - echo ::add-mask::$BASE64_CCIP_CONFIG_OVERRIDE - echo "base_64_override=$BASE64_CCIP_CONFIG_OVERRIDE" >> $GITHUB_OUTPUT - fi - - name: step summary - shell: bash - run: | - echo "### chainlink image used for this test run :link:" >>$GITHUB_STEP_SUMMARY - echo "\`${{ env.CHAINLINK_VERSION }}\`" >> $GITHUB_STEP_SUMMARY - echo "### chainlink-tests image tag for this test run :ship:" >>$GITHUB_STEP_SUMMARY - echo "\`${{ env.INPUT_CHAINLINK_TEST_VERSION }}\`" >> $GITHUB_STEP_SUMMARY - - name: Prepare Base64 TOML override for CCIP secrets - uses: ./.github/actions/setup-create-base64-config-ccip - id: setup_create_base64_config_ccip - with: - runId: ${{ github.run_id }} - testLogCollect: ${{ vars.TEST_LOG_COLLECT }} - chainlinkVersion: ${{ github.sha }} - logstreamLogTargets: ${{ vars.LOGSTREAM_LOG_TARGETS }} - - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@94cb11f4bd545607a2f221c6685052b3abee723d # v2.3.32 - env: - TEST_SUITE: load - TEST_ARGS: -test.timeout 900h - DATABASE_URL: postgresql://postgres:node@localhost:5432/chainlink_test?sslmode=disable - RR_MEM: 8Gi - RR_CPU: 4 - TEST_TRIGGERED_BY: ccip-load-test-ci-${{ matrix.type.name }} - BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.set_override_config.outputs.base_64_override }},${{ steps.setup_create_base64_config_ccip.outputs.base64_config }} - TEST_BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.set_override_config.outputs.base_64_override }},${{ steps.setup_create_base64_config_ccip.outputs.base64_config }} - E2E_TEST_GRAFANA_DASHBOARD_URL: "/d/6vjVx-1V8/ccip-long-running-tests" - with: - test_command_to_run: cd ./integration-tests/ccip-tests && go test -v -timeout 70m -count=1 -json -run ${{ matrix.type.run }} ./load 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci - test_download_vendor_packages_command: cd ./integration-tests && go mod download - # Load default test secrets - test_secrets_defaults_base64: ${{ secrets.CCIP_DEFAULT_TEST_SECRETS }} - # Override default test secrets with custom test secrets if provided - test_secrets_override_base64: ${{ secrets[inputs.test_secrets_override_key] }} - token: ${{ secrets.GITHUB_TOKEN }} - go_mod_path: ./integration-tests/go.mod - QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} - QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} - triggered_by: ${{ env.TEST_TRIGGERED_BY }} - publish_check_name: ${{ matrix.type.name }} - artifacts_location: ./integration-tests/load/logs/payload_ccip.json - aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} - cache_key_id: ccip-load-${{ env.MOD_CACHE_VERSION }} - cache_restore_only: "true" - should_cleanup: "true" - - # Reporting Jobs - start-slack-thread: - name: Start Slack Thread - if: ${{ failure() && needs.ccip-load-test.result != 'skipped' && needs.ccip-load-test.result != 'cancelled' }} - environment: integration - outputs: - thread_ts: ${{ steps.slack.outputs.thread_ts }} - permissions: - checks: write - pull-requests: write - id-token: write - contents: read - runs-on: ubuntu-latest - needs: [ccip-load-test] - steps: - - name: Debug Result - run: echo ${{ join(needs.*.result, ',') }} - - name: Main Slack Notification - uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0 - id: slack - with: - channel-id: "#ccip-testing" - payload: | - { - "attachments": [ - { - "color": "${{ contains(join(needs.*.result, ','), 'failure') && '#C62828' || '#2E7D32' }}", - "blocks": [ - { - "type": "header", - "text": { - "type": "plain_text", - "text": "CCIP load tests results ${{ contains(join(needs.*.result, ','), 'failure') && ':x:' || ':white_check_mark:'}}", - "emoji": true - } - }, - { - "type": "divider" - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "<${{ github.server_url }}/${{ github.repository }}/${{contains(github.ref_name, 'release') && 'releases/tag' || 'tree'}}/${{ github.ref_name }}|${{ github.ref_name }}> | <${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}> | <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Run>" - } - } - ] - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} - - post-test-results-to-slack: - name: Post Test Results - if: ${{ failure() && needs.start-slack-thread.result != 'skipped' && needs.start-slack-thread.result != 'cancelled' }} - environment: integration - permissions: - checks: write - pull-requests: write - id-token: write - contents: read - runs-on: ubuntu-latest - needs: start-slack-thread - steps: - - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - with: - ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} - - name: Post Test Results - uses: ./.github/actions/notify-slack-jobs-result - with: - github_token: ${{ github.token }} - github_repository: ${{ github.repository }} - workflow_run_id: ${{ github.run_id }} - github_job_name_regex: ^CCIP (.*)$ - message_title: CCIP Jobs - slack_channel_id: "#ccip-testing" - slack_bot_token: ${{ secrets.QA_SLACK_API_KEY }} - slack_thread_ts: ${{ needs.start-slack-thread.outputs.thread_ts }} - - # End Reporting Jobs -======= jobs: run-e2e-tests-workflow: name: Run E2E Tests @@ -366,4 +59,4 @@ jobs: TEST_SECRETS_OVERRIDE_BASE64: ${{ secrets[inputs.test_secrets_override_key] }} SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} SLACK_API_KEY: ${{ secrets.QA_SLACK_API_KEY }} ->>>>>>> v2.17.0 + diff --git a/.github/workflows/ccip-offchain-upgrade-tests.yml b/.github/workflows/ccip-offchain-upgrade-tests.yml index 3fe3c79cdd..7536488eb9 100644 --- a/.github/workflows/ccip-offchain-upgrade-tests.yml +++ b/.github/workflows/ccip-offchain-upgrade-tests.yml @@ -137,7 +137,7 @@ jobs: ref: ${{ github.event.pull_request.head.sha || github.sha }} - name: Build Test Image if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' - uses: ./.github/actions/build-test-image + uses: smartcontractkit/.github/actions/ctf-build-test-image@a5e4f4c8fbb8e15ab2ad131552eca6ac83c4f4b3 # ctf-build-test-image@0.1.0 with: # we just want to build the load tests suites: ccip-tests/load ccip-tests/smoke @@ -247,8 +247,8 @@ jobs: if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@94cb11f4bd545607a2f221c6685052b3abee723d # v2.3.32 env: - BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.set_override_config.outputs.base_64_override }},${{ steps.setup_create_base64_config_ccip.outputs.base64_config }} - TEST_BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.set_override_config.outputs.base_64_override }},${{ steps.setup_create_base64_config_ccip.outputs.base64_config }} + BASE64_CONFIG_OVERRIDE: ${{ steps.set_override_config.outputs.base_64_override }},${{ steps.setup_create_base64_config_ccip.outputs.base64_config }} + TEST_BASE64_CONFIG_OVERRIDE: ${{ steps.set_override_config.outputs.base_64_override }},${{ steps.setup_create_base64_config_ccip.outputs.base64_config }} ENV_JOB_IMAGE: ${{ env.ENV_JOB_IMAGE_BASE }}:${{ github.sha }} TEST_SUITE: smoke TEST_ARGS: -test.timeout 30m @@ -371,8 +371,8 @@ jobs: if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@94cb11f4bd545607a2f221c6685052b3abee723d # v2.3.32 env: - BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.set_override_config.outputs.base_64_override }},${{ steps.setup_create_base64_config_ccip.outputs.base64_config }} - TEST_BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.set_override_config.outputs.base_64_override }},${{ steps.setup_create_base64_config_ccip.outputs.base64_config }} + BASE64_CONFIG_OVERRIDE: ${{ steps.set_override_config.outputs.base_64_override }},${{ steps.setup_create_base64_config_ccip.outputs.base64_config }} + TEST_BASE64_CONFIG_OVERRIDE: ${{ steps.set_override_config.outputs.base_64_override }},${{ steps.setup_create_base64_config_ccip.outputs.base64_config }} ENV_JOB_IMAGE: ${{ env.ENV_JOB_IMAGE_BASE }}:${{ github.sha }} TEST_SUITE: load TEST_ARGS: -test.timeout 1h diff --git a/.github/workflows/ci-core.yml b/.github/workflows/ci-core.yml index 51af6b1927..d7284d2f48 100644 --- a/.github/workflows/ci-core.yml +++ b/.github/workflows/ci-core.yml @@ -101,10 +101,6 @@ jobs: id: core_unit os: ubuntu22.04-32cores-128GB printResults: true - - cmd: go_core_ccip_deployment_tests - id: core_unit - os: ubuntu22.04-32cores-128GB - printResults: true - cmd: go_core_race_tests id: core_race # use 64cores for overnight runs only due to massive number of runs from PRs @@ -262,7 +258,7 @@ jobs: needs: [filter, core] name: Flakey Test Detection runs-on: ubuntu-latest - if: ${{ always() && github.actor != 'dependabot[bot]' }} + if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} env: CL_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/chainlink_test?sslmode=disable permissions: @@ -270,58 +266,45 @@ jobs: contents: read steps: - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + uses: actions/checkout@v4.2.1 - name: Setup node - if: ${{ needs.filter.outputs.changes == 'true' }} - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 + uses: actions/setup-node@v4.0.4 - name: Setup NodeJS - if: ${{ needs.filter.outputs.changes == 'true' }} uses: ./.github/actions/setup-nodejs with: prod: "true" - name: Setup Go - if: ${{ needs.filter.outputs.changes == 'true' }} uses: ./.github/actions/setup-go - name: Setup Postgres - if: ${{ needs.filter.outputs.changes == 'true' }} uses: ./.github/actions/setup-postgres - name: Touching core/web/assets/index.html - if: ${{ needs.filter.outputs.changes == 'true' }} run: mkdir -p core/web/assets && touch core/web/assets/index.html - name: Download Go vendor packages - if: ${{ needs.filter.outputs.changes == 'true' }} run: go mod download - name: Replace chainlink-evm deps - if: ${{ needs.filter.outputs.changes == 'true' && inputs.evm-ref != ''}} + if: ${{ github.event_name == 'workflow_dispatch' && inputs.evm-ref != ''}} shell: bash run: go get github.com/smartcontractkit/chainlink-integrations/evm/relayer@${{ inputs.evm-ref }} - name: Build binary - if: ${{ needs.filter.outputs.changes == 'true' }} run: go build -o chainlink.test . - name: Setup DB - if: ${{ needs.filter.outputs.changes == 'true' }} run: ./chainlink.test local db preparetest - name: Load test outputs - if: ${{ needs.filter.outputs.changes == 'true' }} - uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 + uses: actions/download-artifact@v4.1.8 with: name: go_core_tests_logs path: ./artifacts - name: Delete go_core_tests_logs/coverage.txt - if: ${{ needs.filter.outputs.changes == 'true' }} shell: bash run: | # Need to delete coverage.txt so the disk doesn't fill up rm -f ./artifacts/go_core_tests_logs/coverage.txt - name: Build flakey test runner - if: ${{ needs.filter.outputs.changes == 'true' }} run: go build ./tools/flakeytests/cmd/runner - name: Re-run tests - if: ${{ needs.filter.outputs.changes == 'true' }} env: GRAFANA_INTERNAL_BASIC_AUTH: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} GRAFANA_INTERNAL_HOST: ${{ secrets.GRAFANA_INTERNAL_HOST }} - GRAFANA_INTERNAL_TENANT_ID: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} GITHUB_EVENT_PATH: ${{ github.event_path }} GITHUB_EVENT_NAME: ${{ github.event_name }} GITHUB_REPO: ${{ github.repository }} @@ -330,7 +313,6 @@ jobs: ./runner \ -grafana_auth=$GRAFANA_INTERNAL_BASIC_AUTH \ -grafana_host=$GRAFANA_INTERNAL_HOST \ - -grafana_org_id=$GRAFANA_INTERNAL_TENANT_ID \ -gh_sha=$GITHUB_SHA \ -gh_event_path=$GITHUB_EVENT_PATH \ -gh_event_name=$GITHUB_EVENT_NAME \ @@ -339,12 +321,13 @@ jobs: -command=./tools/bin/go_core_tests \ `ls -R ./artifacts/output.txt` - name: Store logs artifacts - if: ${{ needs.filter.outputs.changes == 'true' && always() }} - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 + if: ${{ always() }} + uses: actions/upload-artifact@v4.4.3 with: name: flakey_test_runner_logs path: | ./output.txt + retention-days: 7 scan: name: SonarQube Scan @@ -353,11 +336,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + uses: actions/checkout@v4.2.1 with: fetch-depth: 0 # fetches all history for all tags and branches to provide more metadata for sonar reports - name: Download all workflow run artifacts - uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 + uses: actions/download-artifact@v4.1.8 - name: Check and Set SonarQube Report Paths shell: bash @@ -412,19 +395,6 @@ jobs: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} SONAR_SCANNER_OPTS: "-Xms6g -Xmx8g" - - - name: Collect Metrics - if: always() - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1 - with: - id: ci-core-sonarqube - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: SonarQube Scan - continue-on-error: true - clean: name: Clean Go Tidy & Generate if: ${{ !contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests') && github.actor != 'dependabot[bot]' }} diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 37b0898e75..8b56b88b70 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -228,288 +228,14 @@ jobs: AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} dep_evm_sha: ${{ inputs.evm-ref }} -<<<<<<< HEAD - build-test-image: - if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'schedule' || contains(join(github.event.pull_request.labels.*.name, ' '), 'build-test-image') - environment: integration - permissions: - id-token: write - contents: read - name: Build Test Image - runs-on: ubuntu22.04-16cores-64GB - needs: [changes] - steps: - - name: Collect Metrics - if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1 - with: - id: ${{ env.COLLECTION_ID }}-build-test-image - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: Build Test Image - continue-on-error: true - - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - with: - repository: smartcontractkit/ccip - ref: ${{ inputs.cl_ref || github.event.pull_request.head.sha || github.event.merge_group.head_sha }} - - name: Build Go Test Command - id: build-go-test-command - run: | - # if the matrix.product.run is set, use it for a different command - if [ "${{ matrix.product.run }}" != "" ]; then - echo "run_command=${{ matrix.product.run }} ./smoke/${{ matrix.product.file }}_test.go" >> "$GITHUB_OUTPUT" - else - echo "run_command=./smoke/${{ matrix.product.name }}_test.go" >> "$GITHUB_OUTPUT" - fi - - name: Setup GAP for Grafana - uses: smartcontractkit/.github/actions/setup-gap@d316f66b2990ea4daa479daa3de6fc92b00f863e # setup-gap@0.3.2 - id: setup-gap - with: - # aws inputs - aws-region: ${{ secrets.AWS_REGION }} - aws-role-arn: ${{ secrets.AWS_OIDC_IAM_ROLE_VALIDATION_PROD_ARN }} - api-gateway-host: ${{ secrets.AWS_API_GW_HOST_GRAFANA }} - # other inputs - duplicate-authorization-header: "true" - - eth-smoke-tests-matrix: - if: ${{ !contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests') }} - environment: integration -======= run-core-e2e-tests-for-pr: name: Run Core E2E Tests For PR ->>>>>>> v2.17.0 permissions: actions: read checks: write pull-requests: write id-token: write contents: read -<<<<<<< HEAD - needs: [build-chainlink, changes, build-lint-integration-tests] - env: - SELECTED_NETWORKS: SIMULATED - CHAINLINK_COMMIT_SHA: ${{ inputs.evm-ref || github.sha }} - CHAINLINK_ENV_USER: ${{ github.actor }} - TEST_LOG_LEVEL: debug - strategy: - fail-fast: false - matrix: - product: -# LM Smoke Test is disabled since project is paused -# - name: ccip-lm-smoke -# nodes: 1 -# os: ubuntu-latest -# file: lm -# dir: ccip-tests/smoke -# run: -run ^TestLmBasic$ - - name: ccip-smoke - nodes: 1 - os: ubuntu-latest - file: ccip - dir: ccip-tests/smoke - run: -run ^TestSmokeCCIPForBidirectionalLane$ - - name: ccip-smoke-1.4-pools - nodes: 1 - os: ubuntu-latest - file: ccip - dir: ccip-tests/smoke - run: -run ^TestSmokeCCIPForBidirectionalLane$ - config_path: ./integration-tests/ccip-tests/testconfig/tomls/contract-version1.4.toml - - name: ccip-smoke-usdc - nodes: 1 - os: ubuntu-latest - file: ccip - dir: ccip-tests/smoke - run: -run ^TestSmokeCCIPForBidirectionalLane$ - config_path: ./integration-tests/ccip-tests/testconfig/tomls/usdc_mock_deployment.toml - - name: ccip-smoke-db-compatibility - nodes: 1 - os: ubuntu-latest - file: ccip - dir: ccip-tests/smoke - run: -run ^TestSmokeCCIPForBidirectionalLane$ - config_path: ./integration-tests/ccip-tests/testconfig/tomls/db-compatibility.toml - - name: ccip-smoke-rate-limit - nodes: 1 - dir: ccip-tests/smoke - os: ubuntu-latest - file: ccip - run: -run ^TestSmokeCCIPRateLimit$ - - name: ccip-smoke-rate-limit - nodes: 1 - dir: ccip-tests/smoke - os: ubuntu-latest - file: ccip - run: -run ^TestSmokeCCIPTokenPoolRateLimits$ - - name: ccip-smoke-multicall - nodes: 1 - dir: ccip-tests/smoke - os: ubuntu-latest - file: ccip - run: -run ^TestSmokeCCIPMulticall$ - - name: ccip-smoke-manual-exec - nodes: 1 - dir: ccip-tests/smoke - os: ubuntu-latest - file: ccip - run: -run ^TestSmokeCCIPManuallyExecuteAfterExecutionFailingDueToInsufficientGas$ - - name: ccip-smoke-on-ramp-limits - nodes: 1 - dir: ccip-tests/smoke - os: ubuntu-latest - file: ccip - run: -run ^TestSmokeCCIPOnRampLimits$ - - name: ccip-smoke-off-ramp-capacity - nodes: 1 - dir: ccip-tests/smoke - os: ubuntu-latest - file: ccip - run: -run ^TestSmokeCCIPOffRampCapacityLimit$ - - name: ccip-smoke-off-ramp-agg-rate-limit - nodes: 1 - dir: ccip-tests/smoke - os: ubuntu-latest - file: ccip - run: -run ^TestSmokeCCIPOffRampAggRateLimit$ - - name: ccip-smoke-leader-lane - nodes: 15 - dir: ccip-tests/smoke - os: ubuntu-latest - file: ccip - run: -run ^TestSmokeCCIPForBidirectionalLane$ - config_path: ./integration-tests/ccip-tests/testconfig/tomls/leader-lane.toml - - name: ccip-smoke-reorg-bidirectional - nodes: 1 - dir: ccip-tests/smoke - os: ubuntu-latest - file: ccip - run: -run ^TestSmokeCCIPReorgBelowFinality$ -v - config_path: ./integration-tests/ccip-tests/testconfig/tomls/ccip-reorg.toml - - name: ccip-smoke-reorg-below-finality - nodes: 1 - dir: ccip-tests/smoke - os: ubuntu-latest - file: ccip - run: -run ^TestSmokeCCIPReorgAboveFinalityAtDestination$ -v - config_path: ./integration-tests/ccip-tests/testconfig/tomls/ccip-reorg.toml - - name: ccip-smoke-reorg-above-finality - nodes: 1 - dir: ccip-tests/smoke - os: ubuntu-latest - file: ccip - run: -run ^TestSmokeCCIPReorgAboveFinalityAtSource$ -v - config_path: ./integration-tests/ccip-tests/testconfig/tomls/ccip-reorg.toml - - name: runlog - id: runlog - nodes: 2 - os: ubuntu-latest - pyroscope_env: "ci-smoke-runlog-evm-simulated" - - name: cron - id: cron - nodes: 2 - os: ubuntu-latest - pyroscope_env: "ci-smoke-cron-evm-simulated" - - name: flux - id: flux - nodes: 1 - os: ubuntu-latest - pyroscope_env: "ci-smoke-flux-evm-simulated" - - name: ocr - id: ocr - nodes: 2 - os: ubuntu-latest - file: ocr - pyroscope_env: ci-smoke-ocr-evm-simulated - - name: reorg_above_finality - id: reorg_above_finality - nodes: 1 - os: ubuntu-latest - file: reorg_above_finality - pyroscope_env: ci-smoke-reorg-above-finality-evm-simulated - - name: ocr2 - id: ocr2 - nodes: 6 - os: ubuntu22.04-16cores-64GB - file: ocr2 - pyroscope_env: ci-smoke-ocr2-evm-simulated - - name: ocr2 - id: ocr2-plugins - nodes: 6 - os: ubuntu22.04-16cores-64GB - pyroscope_env: ci-smoke-ocr2-plugins-evm-simulated - tag_suffix: "-plugins" - - name: vrf - id: vrf - nodes: 2 - os: ubuntu-latest - pyroscope_env: ci-smoke-vrf-evm-simulated - - name: vrfv2 - id: vrfv2 - nodes: 6 - os: ubuntu-latest - pyroscope_env: ci-smoke-vrf2-evm-simulated - - name: vrfv2plus - id: vrfv2plus - nodes: 9 - os: ubuntu-latest - pyroscope_env: ci-smoke-vrf2plus-evm-simulated - - name: forwarder_ocr - id: forwarder_ocr - nodes: 2 - os: ubuntu-latest - pyroscope_env: ci-smoke-forwarder-ocr-evm-simulated - - name: forwarders_ocr2 - id: forwarders_ocr2 - nodes: 2 - os: ubuntu-latest - pyroscope_env: ci-smoke-forwarder-ocr-evm-simulated - runs-on: ${{ matrix.product.os }} - name: ETH Smoke Tests ${{ matrix.product.name }}${{ matrix.product.tag_suffix }} - steps: - # Handy for debugging resource usage - # - name: Collect Workflow Telemetry - # uses: catchpoint/workflow-telemetry-action@94c3c3d9567a0205de6da68a76c428ce4e769af1 # v2.0.0 - - name: Collect Metrics - if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1 - with: - id: ${{ env.COLLECTION_ID }}-matrix-${{ matrix.product.id }} - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: ETH Smoke Tests ${{ matrix.product.name }}${{ matrix.product.tag_suffix }} - test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}' - continue-on-error: true - - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - with: - repository: smartcontractkit/ccip - ref: ${{ inputs.cl_ref || github.event.pull_request.head.sha || github.event.merge_group.head_sha }} - - name: Build Go Test Command - id: build-go-test-command - run: | - # if dir is provided use it, otherwise use the smoke dir - if [ "${{ matrix.product.dir }}" != "" ]; then - dir=${{ matrix.product.dir }} - else - dir=smoke - fi - # if the matrix.product.run is set, use it for a different command - if [ "${{ matrix.product.run }}" != "" ]; then - echo "run_command=${{ matrix.product.run }} ./${dir}/${{ matrix.product.file }}_test.go" >> "$GITHUB_OUTPUT" - else - echo "run_command=./${dir}/${{ matrix.product.name }}_test.go" >> "$GITHUB_OUTPUT" - fi - - name: Check for "enable tracing" label - id: check-label - run: | - label=$(jq -r '.pull_request.labels[]?.name // empty' "$GITHUB_EVENT_PATH") -======= 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@aad83f232743646faa35f5ac03ee3829148d37ce @@ -541,7 +267,6 @@ jobs: 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 }} ->>>>>>> v2.17.0 run-core-e2e-tests-for-merge-queue: name: Run Core E2E Tests For Merge Queue @@ -667,191 +392,9 @@ jobs: AWS_API_GW_HOST_GRAFANA: ${{ secrets.AWS_API_GW_HOST_GRAFANA }} SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} -<<<<<<< HEAD - - name: Setup Grafana and OpenTelemetry - id: docker-setup - if: steps.check-label.outputs.trace == 'true' && matrix.product.name == 'ocr2' && matrix.product.tag_suffix == '-plugins' - run: | - # Create network - docker network create --driver bridge tracing - - # Make trace directory - cd integration-tests/smoke/ - mkdir ./traces - chmod -R 777 ./traces - - # Switch directory - cd ../../.github/tracing - - # Create a Docker volume for traces - # docker volume create otel-traces - - # Start OpenTelemetry Collector - # Note the user must be set to the same user as the runner for the trace data to be accessible - docker run -d --network=tracing --name=otel-collector \ - -v $PWD/otel-collector-ci.yaml:/etc/otel-collector.yaml \ - -v $PWD/../../integration-tests/smoke/traces:/tracing \ - --user "$(id -u):$(id -g)" \ - -p 4317:4317 otel/opentelemetry-collector:0.88.0 --config=/etc/otel-collector.yaml - - - name: Locate Docker Volume - id: locate-volume - if: false - run: | - echo "VOLUME_PATH=$(docker volume inspect --format '{{ .Mountpoint }}' otel-traces)" >> $GITHUB_OUTPUT - - - name: Show Otel-Collector Logs - if: steps.check-label.outputs.trace == 'true' && matrix.product.name == 'ocr2' && matrix.product.tag_suffix == '-plugins' - run: | - docker logs otel-collector - - name: Set Override Config - id: set_override_config - run: | - # if the matrix.product.config_path is set, use it as the override config - if [ "${{ matrix.product.config_path }}" != "" ]; then - echo "base_64_override=$(base64 -w 0 -i ${{ matrix.product.config_path }})" >> "$GITHUB_OUTPUT" - fi - - name: Setup GAP for Grafana - uses: smartcontractkit/.github/actions/setup-gap@d316f66b2990ea4daa479daa3de6fc92b00f863e # setup-gap@0.3.2 - id: setup-gap - with: - # aws inputs - aws-region: ${{ secrets.AWS_REGION }} - aws-role-arn: ${{ secrets.AWS_OIDC_IAM_ROLE_VALIDATION_PROD_ARN }} - api-gateway-host: ${{ secrets.AWS_API_GW_HOST_GRAFANA }} - # other inputs - duplicate-authorization-header: "true" - # metrics inputs - metrics-job-name: "grafana" - gc-host: ${{ secrets.GRAFANA_INTERNAL_HOST }} - gc-basic-auth: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} - gc-org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - - name: Prepare Base64 CCIP TOML secrets - uses: ./.github/actions/setup-create-base64-config-ccip - id: setup_create_base64_config_ccip - with: - runId: ${{ github.run_id }} - pyroscopeServer: ${{ matrix.product.pyroscope_env == '' && '' || !startsWith(github.ref, 'refs/tags/') && '' || secrets.QA_PYROSCOPE_INSTANCE }} # Avoid sending blank envs https://github.com/orgs/community/discussions/25725 - pyroscopeEnvironment: ${{ matrix.product.pyroscope_env }} - pyroscopeKey: ${{ secrets.QA_PYROSCOPE_KEY }} - testLogCollect: ${{ vars.TEST_LOG_COLLECT }} - selectedNetworks: SIMULATED_1,SIMULATED_2 - chainlinkVersion: ${{ inputs.evm-ref || github.sha }} - logstreamLogTargets: ${{ vars.LOGSTREAM_LOG_TARGETS }} - - ## Run this step when changes that require tests to be run are made - - name: Run Tests - if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@aa8eea635029ab8d95abd3c206f56dae1e22e623 # v2.3.28 - env: - BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }},${{ steps.set_override_config.outputs.base_64_override }} - TEST_BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }},${{ steps.set_override_config.outputs.base_64_override }} - DEBUG_RESTY: false - with: - test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json -test.parallel=${{ matrix.product.nodes }} ${{ steps.build-go-test-command.outputs.run_command }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs - test_download_vendor_packages_command: cd ./integration-tests && go mod download - test_config_chainlink_version: ${{ inputs.evm-ref || github.sha }} - test_config_selected_networks: ${{ env.SELECTED_NETWORKS }} - test_config_logging_run_id: ${{ github.run_id }} - test_config_logstream_log_targets: ${{ vars.LOGSTREAM_LOG_TARGETS }} - test_config_test_log_collect: ${{ vars.TEST_LOG_COLLECT }} - cl_repo: ${{ env.CHAINLINK_IMAGE }} - cl_image_tag: ${{ inputs.evm-ref || github.sha }}${{ matrix.product.tag_suffix }} - aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} - artifacts_name: ${{ matrix.product.name }}${{ matrix.product.tag_suffix }}-test-logs - artifacts_location: | - ./integration-tests/smoke/logs/ - ./integration-tests/ccip-tests/smoke/logs/* - /tmp/gotest.log - publish_check_name: ${{ matrix.product.name }} - token: ${{ secrets.GITHUB_TOKEN }} - go_mod_path: ./integration-tests/go.mod - cache_key_id: core-e2e-${{ env.MOD_CACHE_VERSION }} - cache_restore_only: "true" - QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} - QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - QA_KUBECONFIG: "" - should_tidy: "false" - go_coverage_src_dir: /var/tmp/go-coverage - go_coverage_dest_dir: ${{ github.workspace }}/.covdata - DEFAULT_CHAINLINK_IMAGE: ${{ env.CHAINLINK_IMAGE }} - DEFAULT_LOKI_TENANT_ID: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - DEFAULT_LOKI_ENDPOINT: https://${{ secrets.GRAFANA_INTERNAL_HOST }}/loki/api/v1/push - DEFAULT_LOKI_BASIC_AUTH: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - DEFAULT_GRAFANA_BASE_URL: "http://localhost:8080/primary" - DEFAULT_GRAFANA_DASHBOARD_URL: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" - DEFAULT_GRAFANA_BEARER_TOKEN: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} - DEFAULT_PYROSCOPE_SERVER_URL: ${{ matrix.product.pyroscope_env == '' && '' || !startsWith(github.ref, 'refs/tags/') && '' || secrets.QA_PYROSCOPE_INSTANCE }} # Avoid sending blank envs https://github.com/orgs/community/discussions/25725 - DEFAULT_PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }} - DEFAULT_PYROSCOPE_ENVIRONMENT: ${{ matrix.product.pyroscope_env }} - DEFAULT_PYROSCOPE_ENABLED: ${{ matrix.product.pyroscope_env == '' || !startsWith(github.ref, 'refs/tags/') && 'false' || 'true' }} - - - name: Upload Coverage Data - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 - timeout-minutes: 2 - continue-on-error: true - with: - name: cl-node-coverage-data-${{ matrix.product.name }}-${{ matrix.product.tag_suffix }} - path: .covdata - retention-days: 1 - - # Run this step when changes that do not need the test to run are made - - name: Run Setup - if: needs.changes.outputs.src == 'false' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-run-tests-environment@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 - with: - test_download_vendor_packages_command: cd ./integration-tests && go mod download - go_mod_path: ./integration-tests/go.mod - cache_key_id: core-e2e-${{ env.MOD_CACHE_VERSION }} - cache_restore_only: "true" - QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} - QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - QA_KUBECONFIG: "" - should_tidy: "false" - - - name: Show Otel-Collector Logs - if: steps.check-label.outputs.trace == 'true' && matrix.product.name == 'ocr2' && matrix.product.tag_suffix == '-plugins' - run: | - docker logs otel-collector - - - name: Permissions on traces - if: steps.check-label.outputs.trace == 'true' && matrix.product.name == 'ocr2' && matrix.product.tag_suffix == '-plugins' - run: | - ls -l ./integration-tests/smoke/traces - - - name: Upload Trace Data - if: steps.check-label.outputs.trace == 'true' && matrix.product.name == 'ocr2' && matrix.product.tag_suffix == '-plugins' - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - name: trace-data - path: ./integration-tests/smoke/traces/trace-data.json - - - name: Print failed test summary - if: always() - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 - with: - test_directories: ./integration-tests/smoke/,./integration-tests/ccip-tests/smoke/ - - ### Used to check the required checks box when the matrix completes - eth-smoke-tests: -======= check-e2e-test-results: ->>>>>>> v2.17.0 if: always() name: ETH Smoke Tests -<<<<<<< HEAD - needs: [eth-smoke-tests-matrix] - steps: - - name: Check smoke test matrix status - if: needs.eth-smoke-tests-matrix.result != 'success' - run: | - echo "${{ needs.eth-smoke-tests-matrix.result }}" - exit 1 - - name: Collect Metrics - if: always() - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1 -======= runs-on: ubuntu-latest needs: [lint-integration-tests, run-core-e2e-tests-for-pr, run-ccip-e2e-tests-for-pr, run-core-e2e-tests-for-merge-queue, run-ccip-e2e-tests-for-merge-queue] steps: @@ -881,7 +424,6 @@ jobs: uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0 env: SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} ->>>>>>> v2.17.0 with: channel-id: "#team-test-tooling-internal" slack-message: ":x: :mild-panic-intensifies: Node Migration Tests Failed: \n${{ format('https://github.com/{0}/actions/runs/{1}', github.repository, github.run_id) }}\n${{ format('Notifying ', secrets.GUARDIAN_SLACK_NOTIFICATION_HANDLE) }}" @@ -948,482 +490,4 @@ jobs: pattern: cl_node_coverage_data_* merge-multiple: true - name: Show Coverage -<<<<<<< HEAD - run: go run ./integration-tests/scripts/show_coverage.go "${{ github.workspace }}/cl-node-coverage-data/*/merged" - - # Run the setup if the matrix finishes but this time save the cache if we have a cache hit miss - # this will also only run if both of the matrix jobs pass - eth-smoke-go-mod-cache: - environment: integration - needs: [eth-smoke-tests] - runs-on: ubuntu-latest - name: ETH Smoke Tests Go Mod Cache - continue-on-error: true -======= run: go run ./integration-tests/scripts/show_coverage.go "${{ github.workspace }}/cl_node_coverage_data/*/merged" - - ## Solana Section - get_solana_sha: - # We don't directly merge dependabot PRs, so let's not waste the resources - if: ${{ github.actor != 'dependabot[bot]' && inputs.run_solana != 'false' }} - name: Get Solana Sha From Go Mod - environment: Integration - runs-on: ubuntu-latest - outputs: - sha: ${{ steps.getsha.outputs.sha }} ->>>>>>> v2.17.0 - steps: - - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - with: -<<<<<<< HEAD - repository: smartcontractkit/ccip - ref: ${{ inputs.cl_ref || github.event.pull_request.head.sha || github.event.merge_group.head_sha }} - - name: Run Setup - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-go@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 - with: - test_download_vendor_packages_command: | - cd ./integration-tests - go mod download - # force download of test dependencies - go test -run=NonExistentTest ./smoke/... || echo "ignore expected test failure" - go_mod_path: ./integration-tests/go.mod - cache_key_id: core-e2e-${{ env.MOD_CACHE_VERSION }} - cache_restore_only: "false" - - ### Migration tests - node-migration-tests: - name: Version Migration Tests -======= - repository: smartcontractkit/chainlink - ref: ${{ inputs.cl_ref || github.event.pull_request.head.sha || github.event.merge_group.head_sha }} - - name: Setup Go - uses: ./.github/actions/setup-go - with: - only-modules: "true" - - name: Get the sha from go mod - id: getshortsha - run: | - sol_ver=$(go list -m -json github.com/smartcontractkit/chainlink-solana | jq -r .Version) - if [ -z "${sol_ver}" ]; then - echo "Error: could not get the solana version from the go.mod file, look above for error(s)" - exit 1 - fi - short_sha="${sol_ver##*-}" - echo "short sha is: ${short_sha}" - echo "short_sha=${short_sha}" >> "$GITHUB_OUTPUT" - - name: Checkout solana - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - with: - repository: smartcontractkit/chainlink-solana - ref: develop - fetch-depth: 0 - path: solanapath - - name: Get long sha - id: getsha - run: | - cd solanapath - full_sha=$(git rev-parse ${{steps.getshortsha.outputs.short_sha}}^{}) # additional suffix allows handling tagged versions as well - if [ -z "${full_sha}" ]; then - echo "Error: could not get the full sha from the short sha using git, look above for error(s)" - exit 1 - fi - echo "sha is: ${full_sha}" - echo "sha=${full_sha}" >> "$GITHUB_OUTPUT" - - get_projectserum_version: - name: Get ProjectSerum Version - environment: integration - runs-on: ubuntu-latest - needs: [get_solana_sha] - outputs: - projectserum_version: ${{ steps.psversion.outputs.projectserum_version }} - steps: - - name: Checkout the solana repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - with: - repository: smartcontractkit/chainlink-solana - ref: ${{ needs.get_solana_sha.outputs.sha }} - - name: Get ProjectSerum Version - id: psversion - uses: smartcontractkit/chainlink-solana/.github/actions/projectserum_version@4b971869e26b79c7ce3fb7c98005cc2e3f350915 # stable action on Oct 12 2022 - - solana-test-image-exists: ->>>>>>> v2.17.0 - environment: integration - permissions: - checks: write - pull-requests: write - id-token: write - contents: read -<<<<<<< HEAD - runs-on: ubuntu-latest - needs: [build-chainlink, changes] - # Only run migration tests on new tags - if: startsWith(github.ref, 'refs/tags/') - env: - SELECTED_NETWORKS: SIMULATED,SIMULATED_1,SIMULATED_2 - CHAINLINK_COMMIT_SHA: ${{ inputs.evm-ref || github.sha }} - CHAINLINK_ENV_USER: ${{ github.actor }} - CHAINLINK_IMAGE: public.ecr.aws/w0i8p0z9/chainlink-ccip - UPGRADE_VERSION: ${{ inputs.evm-ref || github.sha }} - UPGRADE_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink - TEST_LOG_LEVEL: debug - TEST_SUITE: migration - steps: - - name: Collect Metrics - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1 - with: - id: ${{ env.COLLECTION_ID }}-migration-tests - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: Version Migration Tests -======= - name: Check If Solana Test Image Exists - runs-on: ubuntu-latest - needs: [get_solana_sha] - outputs: - exists: ${{ steps.check-image.outputs.exists }} - steps: - - name: Check if image exists - id: check-image - uses: smartcontractkit/chainlink-github-actions/docker/image-exists@0ce1e67b254a4f041e03cc6f0e3afc987b47c7bd # v2.3.30 - with: - repository: chainlink-solana-tests - tag: ${{ needs.get_solana_sha.outputs.sha }} - AWS_REGION: ${{ secrets.QA_AWS_REGION }} - AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - - solana-build-contracts: - environment: integration - permissions: - checks: write - pull-requests: write - id-token: write - contents: read - name: Solana Build Artifacts - runs-on: ubuntu22.04-8cores-32GB - needs: - [ - changes, - get_projectserum_version, - solana-test-image-exists, - get_solana_sha, - ] - steps: - - name: Collect Metrics - if: needs.changes.outputs.core_changes == 'true' || github.event_name == 'workflow_dispatch' - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1 - with: - id: ${{ env.COLLECTION_ID }}-solana-build-contracts - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: Solana Build Artifacts - continue-on-error: true - - name: Checkout the solana repo - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - with: - repository: smartcontractkit/chainlink-solana - ref: ${{ needs.get_solana_sha.outputs.sha }} - - name: Build contracts - if: (needs.changes.outputs.core_changes == 'true' || github.event_name == 'workflow_dispatch') && needs.solana-test-image-exists.outputs.exists == 'false' - uses: smartcontractkit/chainlink-solana/.github/actions/build_contract_artifacts@46b1311a5a83f33d08ffa8e1e0ab04f9ad51665d # node20 update on may 10, 2024 - with: - ref: ${{ needs.get_solana_sha.outputs.sha }} - image: backpackapp/build - image-version: ${{ needs.get_projectserum_version.outputs.projectserum_version }} - - solana-build-test-image: - environment: integration - permissions: - checks: write - pull-requests: write - id-token: write - contents: read - name: Solana Build Test Image - runs-on: ubuntu22.04-8cores-32GB - needs: - [ - solana-build-contracts, - solana-test-image-exists, - changes, - get_solana_sha, - ] - env: - CONTRACT_ARTIFACTS_PATH: contracts/target/deploy - steps: - - name: Collect Metrics - if: (needs.changes.outputs.core_changes == 'true' || github.event_name == 'workflow_dispatch') && needs.solana-test-image-exists.outputs.exists == 'false' - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1 - with: - id: ${{ env.COLLECTION_ID }}-solana-build-test-image - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: Solana Build Test Image - continue-on-error: true - - name: Checkout the repo - if: (needs.changes.outputs.core_changes == 'true' || github.event_name == 'workflow_dispatch') && needs.solana-test-image-exists.outputs.exists == 'false' - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - with: - repository: smartcontractkit/chainlink-solana - ref: ${{ needs.get_solana_sha.outputs.sha }} - - name: Build Test Image - if: (needs.changes.outputs.core_changes == 'true' || github.event_name == 'workflow_dispatch') && needs.solana-test-image-exists.outputs.exists == 'false' - uses: smartcontractkit/.github/actions/ctf-build-test-image@a5e4f4c8fbb8e15ab2ad131552eca6ac83c4f4b3 # ctf-build-test-image@0.1.0 - with: - tag: ${{ needs.get_solana_sha.outputs.sha }} - QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} - QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} - - run: echo "this exists so we don't have to run anything else if the build is skipped" - if: needs.changes.outputs.core_changes == 'false' || needs.solana-test-image-exists.outputs.exists == 'true' - - solana-smoke-tests: - if: ${{ !contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests') }} - environment: integration - permissions: - checks: write - pull-requests: write - id-token: write - contents: read - name: Solana Smoke Tests - runs-on: ubuntu22.04-8cores-32GB - needs: - [ - build-chainlink, - solana-build-contracts, - solana-build-test-image, - changes, - get_solana_sha, - ] - env: - CHAINLINK_COMMIT_SHA: ${{ inputs.evm-ref || github.sha }} - CHAINLINK_ENV_USER: ${{ github.actor }} - TEST_LOG_LEVEL: debug - CONTRACT_ARTIFACTS_PATH: contracts/target/deploy - steps: - - name: Collect Metrics - if: needs.changes.outputs.core_changes == 'true' || github.event_name == 'workflow_dispatch' - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1 - with: - id: ${{ env.COLLECTION_ID }}-solana-e2e-tests - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: Solana Smoke Tests ->>>>>>> v2.17.0 - test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}' - continue-on-error: true - - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - with: -<<<<<<< HEAD - repository: smartcontractkit/ccip - ref: ${{ inputs.cl_ref || github.event.pull_request.head.sha || github.event.merge_group.head_sha }} - - name: Get Latest Version - id: get_latest_version - run: | - untrimmed_ver=$(curl --header "Authorization: token ${{ secrets.GITHUB_TOKEN }}" --request GET https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r .name) - latest_version="${untrimmed_ver:1}" - # Check if latest_version is empty - if [ -z "$latest_version" ]; then - echo "Error: The latest_version is empty. The migration tests need a verison to run." - exit 1 - fi - # CCIP uses the `-release` suffix for their versions - echo "latest_version=${latest_version}-release" >> "$GITHUB_OUTPUT" - - name: Name Versions - run: | - echo "Running migration tests from version '${{ steps.get_latest_version.outputs.latest_version }}' to: '${{ inputs.evm-ref || github.sha }}'" - - name: Prepare Base64 TOML override - uses: ./.github/actions/setup-create-base64-upgrade-config - with: - selectedNetworks: ${{ env.SELECTED_NETWORKS }} - chainlinkVersion: ${{ steps.get_latest_version.outputs.latest_version }} - upgradeVersion: ${{ env.UPGRADE_VERSION }} - runId: ${{ github.run_id }} - testLogCollect: ${{ vars.TEST_LOG_COLLECT }} - logstreamLogTargets: ${{ vars.LOGSTREAM_LOG_TARGETS }} - - name: Run Migration Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@aa8eea635029ab8d95abd3c206f56dae1e22e623 # v2.3.28 - with: - test_command_to_run: cd ./integration-tests && go test -timeout 20m -count=1 -json ./migration 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs - test_download_vendor_packages_command: cd ./integration-tests && go mod download - test_config_override_base64: ${{ env.BASE64_CONFIG_OVERRIDE }} - cl_repo: ${{ env.CHAINLINK_IMAGE }} - cl_image_tag: ${{ steps.get_latest_version.outputs.latest_version }} - aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} - artifacts_name: node-migration-test-logs - artifacts_location: | - ./integration-tests/migration/logs - /tmp/gotest.log - publish_check_name: Node Migration Test Results - token: ${{ secrets.GITHUB_TOKEN }} - go_mod_path: ./integration-tests/go.mod - cache_key_id: core-e2e-${{ env.MOD_CACHE_VERSION }} - cache_restore_only: "true" - QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} - QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - QA_KUBECONFIG: "" - go_coverage_src_dir: /var/tmp/go-coverage - go_coverage_dest_dir: ${{ github.workspace }}/.covdata - should_tidy: "false" - DEFAULT_CHAINLINK_IMAGE: ${{ env.CHAINLINK_IMAGE }} - DEFAULT_CHAINLINK_UPGRADE_IMAGE: ${{ env.UPGRADE_IMAGE }} - DEFAULT_LOKI_TENANT_ID: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - DEFAULT_LOKI_ENDPOINT: https://${{ secrets.GRAFANA_INTERNAL_HOST }}/loki/api/v1/push - DEFAULT_LOKI_BASIC_AUTH: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - DEFAULT_GRAFANA_BASE_URL: "http://localhost:8080/primary" - DEFAULT_GRAFANA_DASHBOARD_URL: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" - DEFAULT_GRAFANA_BEARER_TOKEN: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} - -======= - repository: smartcontractkit/chainlink-solana - ref: ${{ needs.get_solana_sha.outputs.sha }} - - name: Run Setup - if: needs.changes.outputs.core_changes == 'true' || github.event_name == 'workflow_dispatch' - uses: smartcontractkit/.github/actions/ctf-setup-run-tests-environment@49cb1613e96c9ce17f7290e4dabd38f43aa9bd4d # ctf-setup-run-tests-environment@0.0.0 - with: - go_mod_path: ./integration-tests/go.mod - cache_restore_only: true - cache_key_id: core-solana-e2e-${{ env.MOD_CACHE_VERSION }} - aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} - dockerhub_username: ${{ secrets.DOCKERHUB_READONLY_USERNAME }} - dockerhub_password: ${{ secrets.DOCKERHUB_READONLY_PASSWORD }} - QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} - QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} - - name: Pull Artifacts - if: needs.changes.outputs.core_changes == 'true' || github.event_name == 'workflow_dispatch' - run: | - IMAGE_NAME=${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-solana-tests:${{ needs.get_solana_sha.outputs.sha }} - # Pull the Docker image - docker pull "$IMAGE_NAME" - - # Create a container without starting it - CONTAINER_ID=$(docker create "$IMAGE_NAME") - - # Copy the artifacts from the container - mkdir -p ./${{env.CONTRACT_ARTIFACTS_PATH}}/ - docker cp "$CONTAINER_ID:/go/testdir/${{env.CONTRACT_ARTIFACTS_PATH}}/" "./${{env.CONTRACT_ARTIFACTS_PATH}}/../" - - # Remove the created container - docker rm "$CONTAINER_ID" - - name: Install Solana CLI # required for ensuring the local test validator is configured correctly - run: ./scripts/install-solana-ci.sh - - - name: Install gauntlet - run: | - yarn --cwd ./gauntlet install --frozen-lockfile - yarn --cwd ./gauntlet build - yarn --cwd ./gauntlet gauntlet - - name: Generate config overrides - run: | # https://github.com/smartcontractkit/chainlink-testing-framework/lib/blob/main/config/README.md - cat << EOF > config.toml - [ChainlinkImage] - version="${{ inputs.evm-ref || github.sha }}" - [Common] - user="${{ github.actor }}" - internal_docker_repo = "${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com" - EOF - # shellcheck disable=SC2002 - BASE64_CONFIG_OVERRIDE=$(cat config.toml | base64 -w 0) - # shellcheck disable=SC2086 - echo ::add-mask::$BASE64_CONFIG_OVERRIDE - # shellcheck disable=SC2086 - echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV - - name: Run Tests - if: needs.changes.outputs.core_changes == 'true' || github.event_name == 'workflow_dispatch' - uses: smartcontractkit/.github/actions/ctf-run-tests@b8731364b119e88983e94b0c4da87fc27ddb41b8 # ctf-run-tests@0.0.0 - with: - test_command_to_run: export ENV_JOB_IMAGE=${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-solana-tests:${{ needs.get_solana_sha.outputs.sha }} && make test_smoke - test_config_override_base64: ${{ env.BASE64_CONFIG_OVERRIDE }} - cl_repo: ${{ env.CHAINLINK_IMAGE }} - cl_image_tag: ${{ inputs.evm-ref || github.sha }} - publish_check_name: Solana Smoke Test Results - go_mod_path: ./integration-tests/go.mod - cache_key_id: core-solana-e2e-${{ env.MOD_CACHE_VERSION }} - token: ${{ secrets.GITHUB_TOKEN }} - aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} - artifacts_name: solana-test-artifacts - artifacts_location: | - ./integration-tests/smoke/logs - ./integration-tests/smoke/db_dumps - ./integration-tests/smoke/seth_artifacts - /tmp/gotest.log - QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} - QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - QA_KUBECONFIG: "" - run_setup: false - go_coverage_src_dir: /var/tmp/go-coverage - go_coverage_dest_dir: ${{ github.workspace }}/.covdata - env: - E2E_TEST_CHAINLINK_IMAGE: ${{ env.CHAINLINK_IMAGE }} - E2E_TEST_SOLANA_SECRET: thisisatestingonlysecret - ->>>>>>> v2.17.0 - - name: Upload Coverage Data - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 - timeout-minutes: 2 - continue-on-error: true - with: -<<<<<<< HEAD - name: cl-node-coverage-data-migration-tests - path: .covdata - retention-days: 1 - - name: Notify Slack - if: failure() && github.event_name != 'workflow_dispatch' - uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0 - env: - SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} - with: - channel-id: "C05QQ8Z342V" - slack-message: "CCIP Node Migration Tests Failed :x: \n${{ format('https://github.com/{0}/actions/runs/{1}', github.repository, github.run_id) }}" - payload: | - { - "attachments": [ - { - "color": "${{ contains(join(needs.*.result, ','), 'failure') && '#C62828' || '#2E7D32' }}", - "blocks": [ - { - "type": "header", - "text": { - "type": "plain_text", - "text": "CCIP Version Migration Test Results ${{ contains(join(needs.*.result, ','), 'failure') && ':x:' || ':white_check_mark:'}}", - "emoji": true - } - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "${{ contains(join(needs.*.result, ','), 'failure') && 'Some tests failed! Notifying ' || 'All Good!' }}" - } - }, - { - "type": "divider" - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "<${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.ref_name }}|${{ github.ref_name }}> | <${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}> | <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Run>" - } - } - ] - } - ] - } -======= - name: cl_node_coverage_data_solana_tests - path: .covdata - retention-days: 1 - ->>>>>>> v2.17.0 diff --git a/.github/workflows/solidity-foundry-artifacts.yml b/.github/workflows/solidity-foundry-artifacts.yml index 64014c99f3..90d39f36a0 100644 --- a/.github/workflows/solidity-foundry-artifacts.yml +++ b/.github/workflows/solidity-foundry-artifacts.yml @@ -18,14 +18,6 @@ on: - "shared" - "transmission" - "vrf" -<<<<<<< HEAD - base_ref: - description: 'commit or tag to be used as base reference, when looking for modified Solidity files' - required: true - -env: - FOUNDRY_PROFILE: ci -======= commit_to_use: type: string description: 'commit SHA to use for artifact generation; if empty HEAD will be used' @@ -44,17 +36,12 @@ env: # Unfortunately, we can't use the "default" field in the inputs section, because it does not have # access to the workflow context head_ref: ${{ inputs.commit_to_use || github.sha }} ->>>>>>> v2.17.0 jobs: changes: name: Detect changes runs-on: ubuntu-latest outputs: -<<<<<<< HEAD - changes: ${{ steps.changes.outputs.sol }} -======= ->>>>>>> v2.17.0 product_changes: ${{ steps.changes-transform.outputs.product_changes }} product_files: ${{ steps.changes-transform.outputs.product_files }} changeset_changes: ${{ steps.changes-dorny.outputs.changeset }} @@ -62,14 +49,6 @@ jobs: steps: - name: Checkout the repo uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 -<<<<<<< HEAD - - name: Find modified contracts - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 - id: changes - with: - list-files: 'csv' - base: ${{ inputs.base_ref }} -======= with: ref: ${{ env.head_ref }} - name: Find modified contracts @@ -79,7 +58,6 @@ jobs: list-files: 'csv' base: ${{ inputs.base_ref }} # This is a valid input, see https://github.com/dorny/paths-filter/pull/226 ->>>>>>> v2.17.0 predicate-quantifier: every filters: | ignored: &ignored @@ -97,21 +75,12 @@ jobs: - *ignored sol: - modified|added: 'contracts/src/v0.8/**/*.sol' -<<<<<<< HEAD - - *ignored - product: &product - - modified|added: 'contracts/src/v0.8/${{ inputs.product }}/**/*.sol' - - *ignored - changeset: - - modified|added: 'contracts/.changeset/!(README)*.md' -======= - *ignored product: &product - modified|added: 'contracts/src/v0.8/${{ inputs.product }}/**/*.sol' - *ignored changeset: - modified|added: 'contracts/.changeset/!(README)*.md' ->>>>>>> v2.17.0 # Manual transformation needed, because shared contracts have a different folder structure - name: Transform modified files @@ -120,20 +89,6 @@ jobs: run: | if [ "${{ inputs.product }}" = "shared" ]; then echo "::debug:: Product is shared, transforming changes" -<<<<<<< HEAD - if [[ "${{ steps.changes.outputs.product }}" == "true" && "${{ steps.changes.outputs.other_shared }}" == "true" ]]; then - echo "::debug:: Changes were found in 'shared' folder and in 'interfaces' and root folders" - echo "product_changes=true" >> $GITHUB_OUTPUT - echo "product_files=${{ steps.changes.outputs.product_files }},${{ steps.changes.outputs.other_shared_files }}" >> $GITHUB_OUTPUT - elif [[ "${{ steps.changes.outputs.product }}" == "false" && "${{ steps.changes.outputs.other_shared }}" == "true" ]]; then - echo "::debug:: Only contracts in' interfaces' and root folders were modified" - echo "product_changes=true" >> $GITHUB_OUTPUT - echo "product_files=${{ steps.changes.outputs.other_shared_files }}" >> $GITHUB_OUTPUT - elif [[ "${{ steps.changes.outputs.product }}" == "true" && "${{ steps.changes.outputs.other_shared }}" == "false" ]]; then - echo "::debug:: Only contracts in 'shared' folder were modified" - echo "product_changes=true" >> $GITHUB_OUTPUT - echo "product_files=${{ steps.changes.outputs.product_files }}" >> $GITHUB_OUTPUT -======= if [[ "${{ steps.changes-dorny.outputs.product }}" == "true" && "${{ steps.changes-dorny.outputs.other_shared }}" == "true" ]]; then echo "::debug:: Changes were found in 'shared' folder and in 'interfaces' and root folders" echo "product_changes=true" >> $GITHUB_OUTPUT @@ -146,34 +101,18 @@ jobs: echo "::debug:: Only contracts in 'shared' folder were modified" echo "product_changes=true" >> $GITHUB_OUTPUT echo "product_files=${{ steps.changes-dorny.outputs.product_files }}" >> $GITHUB_OUTPUT ->>>>>>> v2.17.0 else echo "::debug:: No contracts were modified" echo "product_changes=false" >> $GITHUB_OUTPUT echo "product_files=" >> $GITHUB_OUTPUT fi else -<<<<<<< HEAD - echo "product_changes=${{ steps.changes.outputs.product }}" >> $GITHUB_OUTPUT - echo "product_files=${{ steps.changes.outputs.product_files }}" >> $GITHUB_OUTPUT -======= echo "product_changes=${{ steps.changes-dorny.outputs.product }}" >> $GITHUB_OUTPUT echo "product_files=${{ steps.changes-dorny.outputs.product_files }}" >> $GITHUB_OUTPUT ->>>>>>> v2.17.0 fi - name: Check for changes outside of artifact scope uses: ./.github/actions/validate-artifact-scope -<<<<<<< HEAD - if: ${{ steps.changes.outputs.sol == 'true' }} - with: - sol_files: ${{ steps.changes.outputs.sol_files }} - product: ${{ inputs.product }} - - gather-basic-info: - name: Gather basic info - if: ${{ needs.changes.outputs.product_changes == 'true' }} -======= if: ${{ steps.changes-dorny.outputs.sol == 'true' }} with: sol_files: ${{ steps.changes-dorny.outputs.sol_files }} @@ -181,23 +120,14 @@ jobs: prepare-workflow-inputs: name: Prepare workflow inputs ->>>>>>> v2.17.0 runs-on: ubuntu-22.04 needs: [ changes ] outputs: foundry_version: ${{ steps.extract-foundry-version.outputs.foundry-version }} -<<<<<<< HEAD - steps: - - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - with: - fetch-depth: 0 -======= generate_code_coverage: ${{ steps.skip-code-coverage.outputs.generate_code_coverage }} steps: - name: Checkout the repo uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 ->>>>>>> v2.17.0 - name: Extract Foundry version id: extract-foundry-version @@ -205,255 +135,6 @@ jobs: with: working-directory: contracts -<<<<<<< HEAD - - name: Copy modified changesets - if: ${{ needs.changes.outputs.changeset_changes == 'true' }} - run: | - mkdir -p contracts/changesets - files="${{ needs.changes.outputs.changeset_files }}" - IFS=",' - for changeset in $files; do - echo "::debug:: Copying $changeset" - cp $changeset contracts/changesets - done - - - name: Generate basic info and modified contracts list - shell: bash - run: | - echo "Commit SHA used to generate artifacts: ${{ github.sha }}" > contracts/commit_sha_base_ref.txt - echo "Base reference SHA used to find modified contracts: ${{ inputs.base_ref }}" >> contracts/commit_sha_base_ref.txt - - IFS=',' read -r -a modified_files <<< "${{ needs.changes.outputs.product_files }}" - echo "# Modified contracts:" > contracts/modified_contracts.md - for file in "${modified_files[@]}"; do - echo " - [$file](${{ github.server_url }}/${{ github.repository }}/blob/${{ github.sha }}/$file)" >> contracts/modified_contracts.md - echo "$file" >> contracts/modified_contracts.txt - done - - - name: Upload basic info and modified contracts list - uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 - timeout-minutes: 2 - continue-on-error: true - with: - name: tmp-basic-info - path: | - contracts/modified_contracts.md - contracts/modified_contracts.txt - contracts/commit_sha_base_ref.txt - contracts/changesets - retention-days: 7 - - # some of the artifacts can only be generated on product level, and we cannot scope them to single contracts - # some product-level modifications might also require shared contracts changes, so if these happened we need to generate artifacts for shared contracts as well - coverage-and-book: - if: ${{ needs.changes.outputs.product_changes == 'true' }} - name: Generate Docs and Code Coverage reports - runs-on: ubuntu-22.04 - needs: [changes, gather-basic-info] - steps: - - name: Prepare exclusion list - id: prepare-exclusion-list - run: | - cat < coverage_exclusions.json - ["automation", "functions", "vrf"] - EOF - coverage_exclusions=$(cat coverage_exclusions.json | jq -c .) - echo "coverage_exclusions=$coverage_exclusions" >> $GITHUB_OUTPUT - - - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - - - name: Setup NodeJS - uses: ./.github/actions/setup-nodejs - - - name: Create directories - shell: bash - run: | - mkdir -p contracts/code-coverage - - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@8f1998e9878d786675189ef566a2e4bf24869773 # v1.2.0 - with: - version: ${{ needs.gather-basic-info.outputs.foundry_version }} - - # required for code coverage report generation - - name: Setup LCOV - uses: hrishikesh-kadam/setup-lcov@f5da1b26b0dcf5d893077a3c4f29cf78079c841d # v1.0.0 - - - name: Run Forge build for product contracts - if: ${{ needs.changes.outputs.product_changes == 'true' }} - run: | - forge --version - forge build - working-directory: contracts - env: - FOUNDRY_PROFILE: ${{ inputs.product }} - - - name: Run coverage for product contracts - if: ${{ !contains(fromJson(steps.prepare-exclusion-list.outputs.coverage_exclusions), inputs.product) && needs.changes.outputs.product_changes == 'true' }} - working-directory: contracts - run: forge coverage --report lcov --report-file code-coverage/lcov.info - env: - FOUNDRY_PROFILE: ${{ inputs.product }} - - - name: Generate Code Coverage HTML report for product contracts - if: ${{ !contains(fromJson(steps.prepare-exclusion-list.outputs.coverage_exclusions), inputs.product) && needs.changes.outputs.product_changes == 'true' }} - shell: bash - working-directory: contracts - run: genhtml code-coverage/lcov.info --branch-coverage --output-directory code-coverage - - - name: Run Forge doc for product contracts - if: ${{ needs.changes.outputs.product_changes == 'true' }} - run: forge doc --build -o docs - working-directory: contracts - env: - FOUNDRY_PROFILE: ${{ inputs.product }} - - - name: Upload Artifacts for product contracts - if: ${{ needs.changes.outputs.product_changes == 'true' }} - uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 - timeout-minutes: 2 - continue-on-error: true - with: - name: tmp-${{ inputs.product }}-artifacts - path: | - contracts/docs - contracts/code-coverage/lcov-.info - contracts/code-coverage - retention-days: 7 - - # Generates UML diagrams and Slither reports for modified contracts - uml-static-analysis: - if: ${{ needs.changes.outputs.product_changes == 'true' }} - name: Generate UML and Slither reports for modified contracts - runs-on: ubuntu-22.04 - needs: [changes, gather-basic-info] - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - steps: - - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - with: - fetch-depth: 0 - - - name: Setup NodeJS - uses: ./.github/actions/setup-nodejs - - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@8f1998e9878d786675189ef566a2e4bf24869773 # v1.2.0 - with: - version: ${{ needs.gather-basic-info.outputs.foundry_version }} - - - name: Install Sol2uml - run: | - npm link sol2uml --only=production - - - name: Set up Python - uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f #v5.1.1 - with: - python-version: '3.8' - - - name: Install solc-select and solc - uses: ./.github/actions/setup-solc-select - with: - to_install: '0.8.19' - to_use: '0.8.19' - - - name: Install Slither - uses: ./.github/actions/setup-slither - - - name: Generate UML - shell: bash - run: | - contract_list="${{ needs.changes.outputs.product_files }}" - - # modify remappings so that solc can find dependencies - ./contracts/scripts/ci/modify_remappings.sh contracts contracts/remappings.txt - mv remappings_modified.txt remappings.txt - - ./contracts/scripts/ci/generate_uml.sh "./" "contracts/uml-diagrams" "$contract_list" - - - name: Generate Slither Markdown reports - run: | - contract_list="${{ needs.changes.outputs.product_files }}" - - echo "::debug::Processing contracts: $contract_list" - ./contracts/scripts/ci/generate_slither_report.sh "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.sha }}/" contracts/configs/slither/.slither.config-artifacts.json "." "$contract_list" "contracts/slither-reports" "--solc-remaps @=contracts/node_modules/@" - - - name: Upload UMLs and Slither reports - uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 - timeout-minutes: 10 - continue-on-error: true - with: - name: tmp-contracts-artifacts - path: | - contracts/uml-diagrams - contracts/slither-reports - retention-days: 7 - - - name: Validate if all Slither run for all contracts - uses: ./.github/actions/validate-solidity-artifacts - with: - validate_slither_reports: 'true' - validate_uml_diagrams: 'true' - slither_reports_path: 'contracts/slither-reports' - uml_diagrams_path: 'contracts/uml-diagrams' - sol_files: ${{ needs.changes.outputs.product_files }} - - gather-all-artifacts: - name: Gather all artifacts - if: ${{ needs.changes.outputs.product_changes == 'true' }} - runs-on: ubuntu-latest - needs: [coverage-and-book, uml-static-analysis, gather-basic-info, changes] - steps: - - name: Download all artifacts - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 - with: - path: review_artifacts - merge-multiple: true - - - name: Upload all artifacts as single package - uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 - with: - name: review-artifacts-${{ inputs.product }}-${{ github.sha }} - path: review_artifacts - retention-days: 60 - - - name: Remove temporary artifacts - uses: geekyeggo/delete-artifact@24928e75e6e6590170563b8ddae9fac674508aa1 # v5.0 - with: - name: tmp-* - - - name: Print Artifact URL in job summary - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - ARTIFACTS=$(gh api -X GET repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts) - ARTIFACT_ID=$(echo "$ARTIFACTS" | jq '.artifacts[] | select(.name=="review-artifacts-${{ inputs.product }}-${{ github.sha }}") | .id') - echo "Artifact ID: $ARTIFACT_ID" - - echo "# Solidity Review Artifact Generated" >> $GITHUB_STEP_SUMMARY - echo "Base Ref used: **${{ inputs.base_ref }}**" >> $GITHUB_STEP_SUMMARY - echo "Commit SHA used: **${{ github.sha }}**" >> $GITHUB_STEP_SUMMARY - echo "[Artifact URL](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/$ARTIFACT_ID)" >> $GITHUB_STEP_SUMMARY - - notify-no-changes: - if: ${{ needs.changes.outputs.product_changes == 'false' }} - needs: [changes] - runs-on: ubuntu-latest - steps: - - name: Print warning in job summary - shell: bash - run: | - echo "# Solidity Review Artifact NOT Generated" >> $GITHUB_STEP_SUMMARY - echo "Base Ref used: **${{ inputs.base_ref }}**" >> $GITHUB_STEP_SUMMARY - echo "Commit SHA used: **${{ github.sha }}**" >> $GITHUB_STEP_SUMMARY - echo "## Reason: No modified Solidity files found for ${{ inputs.product }}" >> $GITHUB_STEP_SUMMARY - echo "* no modified Solidity files found between ${{ inputs.base_ref }} and ${{ github.sha }} commits" >> $GITHUB_STEP_SUMMARY - echo "* or they are located outside of ./contracts/src/v0.8 folder" >> $GITHUB_STEP_SUMMARY - echo "* or they were limited to test files" >> $GITHUB_STEP_SUMMARY - exit 1 -======= - name: Should skip code coverage report id: skip-code-coverage run: | @@ -485,5 +166,4 @@ jobs: lcov_prune_script_path: 'scripts/lcov_prune' secrets: jira_username: ${{ secrets.JIRA_USERNAME }} - jira_api_token: ${{ secrets.JIRA_API_TOKEN }} ->>>>>>> v2.17.0 + jira_api_token: ${{ secrets.JIRA_API_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/solidity-foundry.yml b/.github/workflows/solidity-foundry.yml index 9b72a195a7..36cfb660e1 100644 --- a/.github/workflows/solidity-foundry.yml +++ b/.github/workflows/solidity-foundry.yml @@ -28,34 +28,19 @@ jobs: cat < matrix.json [ { "name": "automation", "setup": { "run-coverage": false, "min-coverage": 98.5, "run-gas-snapshot": false, "run-forge-fmt": false }}, -<<<<<<< HEAD - { "name": "ccip", "setup": { "run-coverage": true, "min-coverage": 98.5, "run-gas-snapshot": true, "run-forge-fmt": true }}, - { "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": 74.1, "run-gas-snapshot": false, "run-forge-fmt": false }}, - { "name": "l2ep", "setup": { "run-coverage": true, "min-coverage": 65.6, "run-gas-snapshot": true, "run-forge-fmt": false }}, -======= { "name": "ccip", "setup": { "run-coverage": true, "min-coverage": 97.6, "run-gas-snapshot": true, "run-forge-fmt": true }}, { "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": 61.0, "run-gas-snapshot": true, "run-forge-fmt": false }}, ->>>>>>> v2.17.0 { "name": "liquiditymanager", "setup": { "run-coverage": true, "min-coverage": 46.3, "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*'", "min-coverage": 32.6, "run-gas-snapshot": true, "run-forge-fmt": false }}, -<<<<<<< HEAD - { "name": "transmission", "setup": { "run-coverage": true, "min-coverage": 65.6, "run-gas-snapshot": true, "run-forge-fmt": false }}, - { "name": "vrf", "setup": { "run-coverage": false, "min-coverage": 98.5, "run-gas-snapshot": false, "run-forge-fmt": false }} - ] - EOF - -======= { "name": "transmission", "setup": { "run-coverage": true, "min-coverage": 61.5, "run-gas-snapshot": true, "run-forge-fmt": false }}, { "name": "vrf", "setup": { "run-coverage": false, "min-coverage": 98.5, "run-gas-snapshot": false, "run-forge-fmt": false }} ] EOF ->>>>>>> v2.17.0 matrix=$(cat matrix.json | jq -c .) echo "matrix=$matrix" >> $GITHUB_OUTPUT @@ -74,10 +59,6 @@ jobs: outputs: non_src_changes: ${{ steps.changes.outputs.non_src }} sol_modified_added: ${{ steps.changes.outputs.sol }} -<<<<<<< HEAD - sol_modified_added_files: ${{ steps.changes.outputs.sol_files }} -======= ->>>>>>> v2.17.0 sol_mod_only: ${{ steps.changes.outputs.sol_mod_only }} sol_mod_only_files: ${{ steps.changes.outputs.sol_mod_only_files }} not_test_sol_modified: ${{ steps.changes-non-test.outputs.not_test_sol }} @@ -93,18 +74,11 @@ jobs: list-files: 'shell' filters: | non_src: -<<<<<<< HEAD - - '.github/workflows/solidity-foundry.yml' - - 'contracts/foundry.toml' - - 'contracts/gas-snapshots/*.gas-snapshot' - - 'contracts/package.json' -======= - '.github/workflows/solidity-foundry.yml' - 'contracts/foundry.toml' - 'contracts/gas-snapshots/*.gas-snapshot' - 'contracts/package.json' - 'contracts/GNUmakefile' ->>>>>>> v2.17.0 sol: - modified|added: 'contracts/src/v0.8/**/*.sol' sol_mod_only: @@ -156,11 +130,7 @@ jobs: - '!contracts/src/v0.8/*.t.sol' - '!contracts/src/v0.8/**/testhelpers/**' - '!contracts/src/v0.8/testhelpers/**' -<<<<<<< HEAD - - '!contracts/src/v0.8/vendor/**' -======= - '!contracts/src/v0.8/vendor/**' ->>>>>>> v2.17.0 tests: if: ${{ needs.changes.outputs.non_src_changes == 'true' || needs.changes.outputs.sol_modified_added == 'true' }} @@ -278,11 +248,7 @@ jobs: with: update-comment: false coverage-files: ./contracts/lcov.info.pruned -<<<<<<< HEAD - minimum-coverage: ${{ matrix.product.min-coverage }} -======= minimum-coverage: ${{ matrix.product.setup.min-coverage }} ->>>>>>> v2.17.0 artifact-name: code-coverage-report-${{ matrix.product.name }} working-directory: ./contracts @@ -298,8 +264,6 @@ jobs: basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} this-job-name: Foundry Tests ${{ matrix.product.name }} -<<<<<<< HEAD -======= continue-on-error: true # runs only if non-test contracts were modified; scoped only to modified or added contracts @@ -629,391 +593,4 @@ jobs: basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} this-job-name: Forge fmt ${{ matrix.product.name }} ->>>>>>> v2.17.0 - continue-on-error: true - - # runs only if non-test contracts were modified; scoped only to modified or added contracts - analyze: - needs: [ changes, define-matrix ] - name: Run static analysis - if: needs.changes.outputs.not_test_sol_modified == 'true' && false - runs-on: ubuntu-22.04 - steps: - - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - with: - submodules: recursive - - - name: Setup NodeJS - uses: ./.github/actions/setup-nodejs - - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@8f1998e9878d786675189ef566a2e4bf24869773 # v1.2.0 - with: - version: ${{ needs.define-matrix.outputs.foundry-version }} - - - name: Set up Python - uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f #v5.1.1 - with: - python-version: '3.8' - - - name: Install solc-select and solc - uses: ./.github/actions/setup-solc-select - with: - to_install: '0.8.19' - to_use: '0.8.19' - - - name: Install Slither - uses: ./.github/actions/setup-slither - - - name: Run Slither - shell: bash - run: | - # modify remappings so that solc can find dependencies - ./contracts/scripts/ci/modify_remappings.sh contracts contracts/remappings.txt - mv remappings_modified.txt remappings.txt - - # without it Slither sometimes fails to use remappings correctly - cp contracts/foundry.toml foundry.toml - - FILES="${{ needs.changes.outputs.not_test_sol_modified_files }}" - - for FILE in $FILES; do - PRODUCT=$(echo "$FILE" | awk -F'src/[^/]*/' '{print $2}' | cut -d'/' -f1) - echo "::debug::Running Slither for $FILE in $PRODUCT" - SLITHER_CONFIG="contracts/configs/slither/.slither.config-$PRODUCT-pr.json" - if [[ ! -f $SLITHER_CONFIG ]]; then - echo "::debug::No Slither config found for $PRODUCT, using default" - SLITHER_CONFIG="contracts/configs/slither/.slither.config-default-pr.json" - fi - ./contracts/scripts/ci/generate_slither_report.sh "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.sha }}/" "$SLITHER_CONFIG" "." "$FILE" "contracts/slither-reports-current" "--solc-remaps @=contracts/node_modules/@" - done - - # all the actions below, up to printing results, run only if any existing contracts were modified - # in that case we extract new issues introduced by the changes by using an LLM model - - name: Upload Slither results for current branch - if: needs.changes.outputs.sol_mod_only == 'true' - uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 - timeout-minutes: 2 - continue-on-error: true - with: - name: slither-reports-current-${{ github.sha }} - path: contracts/slither-reports-current - retention-days: 7 - - # we need to upload scripts and configuration in case base_ref doesn't have the scripts, or they are in different version - - name: Upload Slither scripts - if: needs.changes.outputs.sol_mod_only == 'true' - uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 - timeout-minutes: 2 - continue-on-error: true - with: - name: tmp-slither-scripts-${{ github.sha }} - path: contracts/scripts/ci - retention-days: 7 - - - name: Upload configs - if: needs.changes.outputs.sol_mod_only == 'true' - uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 - timeout-minutes: 2 - continue-on-error: true - with: - name: tmp-configs-${{ github.sha }} - path: contracts/configs - retention-days: 7 - - - name: Checkout the repo - if: needs.changes.outputs.sol_mod_only == 'true' - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - with: - ref: ${{ github.base_ref }} - - - name: Download Slither scripts - if: needs.changes.outputs.sol_mod_only == 'true' - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 - with: - name: tmp-slither-scripts-${{ github.sha }} - path: contracts/scripts/ci - - - name: Download configs - if: needs.changes.outputs.sol_mod_only == 'true' - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 - with: - name: tmp-configs-${{ github.sha }} - path: contracts/configs - - # since we have just checked out the repository again, we lose NPM dependencies installs previously, we need to install them again to compile contracts - - name: Setup NodeJS - if: needs.changes.outputs.sol_mod_only == 'true' - uses: ./.github/actions/setup-nodejs - - - name: Run Slither for base reference - if: needs.changes.outputs.sol_mod_only == 'true' - shell: bash - run: | - # we need to set file permission again since they are lost during download - for file in contracts/scripts/ci/*.sh; do - chmod +x "$file" - done - - # modify remappings so that solc can find dependencies - ./contracts/scripts/ci/modify_remappings.sh contracts contracts/remappings.txt - mv remappings_modified.txt remappings.txt - - # without it Slither sometimes fails to use remappings correctly - cp contracts/foundry.toml foundry.toml - - FILES="${{ needs.changes.outputs.sol_mod_only_files }}" - - for FILE in $FILES; do - PRODUCT=$(echo "$FILE" | awk -F'src/[^/]*/' '{print $2}' | cut -d'/' -f1) - echo "::debug::Running Slither for $FILE in $PRODUCT" - SLITHER_CONFIG="contracts/configs/slither/.slither.config-$PRODUCT-pr.json" - if [[ ! -f $SLITHER_CONFIG ]]; then - echo "::debug::No Slither config found for $PRODUCT, using default" - SLITHER_CONFIG="contracts/configs/slither/.slither.config-default-pr.json" - fi - ./contracts/scripts/ci/generate_slither_report.sh "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.sha }}/" "$SLITHER_CONFIG" "." "$FILE" "contracts/slither-reports-base-ref" "--solc-remaps @=contracts/node_modules/@" - done - - - name: Upload Slither report - if: needs.changes.outputs.sol_mod_only == 'true' - uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 - timeout-minutes: 10 - continue-on-error: true - with: - name: slither-reports-base-${{ github.sha }} - path: | - contracts/slither-reports-base-ref - retention-days: 7 - - - name: Download Slither results for current branch - if: needs.changes.outputs.sol_mod_only == 'true' - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 - with: - name: slither-reports-current-${{ github.sha }} - path: contracts/slither-reports-current - - - name: Generate diff of Slither reports for modified files - if: needs.changes.outputs.sol_mod_only == 'true' - env: - OPEN_API_KEY: ${{ secrets.OPEN_AI_SLITHER_API_KEY }} - shell: bash - run: | - set -euo pipefail - for base_report in contracts/slither-reports-base-ref/*.md; do - filename=$(basename "$base_report") - current_report="contracts/slither-reports-current/$filename" - new_issues_report="contracts/slither-reports-current/${filename%.md}_new_issues.md" - if [ -f "$current_report" ]; then - if ./contracts/scripts/ci/find_slither_report_diff.sh "$base_report" "$current_report" "$new_issues_report" "contracts/scripts/ci/prompt-difference.md" "contracts/scripts/ci/prompt-validation.md"; then - if [[ -s $new_issues_report ]]; then - awk 'NR==2{print "*This new issues report has been automatically generated by LLM model using two Slither reports. One based on `${{ github.base_ref}}` and another on `${{ github.sha }}` commits.*"}1' $new_issues_report > tmp.md && mv tmp.md $new_issues_report - echo "Replacing full Slither report with diff for $current_report" - rm $current_report && mv $new_issues_report $current_report - else - echo "No difference detected between $base_report and $current_report reports. Won't include any of them." - rm $current_report - fi - else - echo "::warning::Failed to generate a diff report with new issues for $base_report using an LLM model, will use full report." - fi - - else - echo "::warning::Failed to find current commit's equivalent of $base_report (file $current_report doesn't exist, but should have been generated). Please check Slither logs." - fi - done - - # actions that execute only if any existing contracts were modified end here - - name: Print Slither summary - shell: bash - run: | - echo "# Static analysis results " >> $GITHUB_STEP_SUMMARY - for file in "contracts/slither-reports-current"/*.md; do - if [ -e "$file" ]; then - cat "$file" >> $GITHUB_STEP_SUMMARY - fi - done - - - name: Validate if all Slither run for all contracts - uses: ./.github/actions/validate-solidity-artifacts - with: - validate_slither_reports: 'true' - slither_reports_path: 'contracts/slither-reports-current' - sol_files: ${{ needs.changes.outputs.not_test_sol_modified_files }} - - - name: Upload Slither reports - uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 - timeout-minutes: 10 - continue-on-error: true - with: - name: slither-reports-${{ github.sha }} - path: | - contracts/slither-reports-current - retention-days: 7 - - - name: Find Slither comment in the PR - uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3.0.0 - id: find-comment - with: - issue-number: ${{ github.event.pull_request.number }} - comment-author: 'github-actions[bot]' - body-includes: 'Static analysis results' - - - name: Extract job summary URL - id: job-summary-url - uses: pl-strflt/job-summary-url-action@df2d22c5351f73e0a187d20879854b8d98e6e001 # v1.0.0 - with: - job: 'Run static analysis' - - - name: Build Slither reports artifacts URL - id: build-slither-artifact-url - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - ARTIFACTS=$(gh api -X GET repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts) - ARTIFACT_ID=$(echo "$ARTIFACTS" | jq '.artifacts[] | select(.name=="slither-reports-${{ github.sha }}") | .id') - echo "Artifact ID: $ARTIFACT_ID" - - slither_artifact_url="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/$ARTIFACT_ID" - echo "slither_artifact_url=$slither_artifact_url" >> $GITHUB_OUTPUT - - - name: Create or update Slither comment in the PR - uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0 - with: - comment-id: ${{ steps.find-comment.outputs.comment-id }} - issue-number: ${{ github.event.pull_request.number }} - body: | - ## Static analysis results are available - Hey @${{ github.event.push && github.event.push.pusher && github.event.push.pusher.username || github.actor }}, you can view Slither reports in the job summary [here](${{ steps.job-summary-url.outputs.job_summary_url }}) or download them as artifact [here](${{ steps.build-slither-artifact-url.outputs.slither_artifact_url }}). - - Please check them before merging and make sure you have addressed all issues. - edit-mode: replace - - - name: Remove temp artifacts - uses: geekyeggo/delete-artifact@24928e75e6e6590170563b8ddae9fac674508aa1 # v5.0 - with: - name: tmp-* - - - name: Collect Metrics - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0 - with: - id: solidity-foundry-slither - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: Run static analysis - continue-on-error: true - - solidity-forge-fmt: - name: Forge fmt ${{ matrix.product.name }} - if: ${{ needs.changes.outputs.non_src_changes == 'true' || needs.changes.outputs.not_test_sol_modified == 'true' }} - needs: [define-matrix, changes] - strategy: - fail-fast: false - matrix: - product: ${{fromJson(needs.define-matrix.outputs.matrix)}} - runs-on: ubuntu-22.04 - steps: - - name: Checkout the repo - if: ${{ contains(fromJson(needs.changes.outputs.all_changes), matrix.product.name) && matrix.product.setup.run-forge-fmt }} - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - with: - submodules: recursive - - - name: Setup NodeJS - if: ${{ contains(fromJson(needs.changes.outputs.all_changes), matrix.product.name) && matrix.product.setup.run-forge-fmt }} - uses: ./.github/actions/setup-nodejs - - - name: Install Foundry - if: ${{ contains(fromJson(needs.changes.outputs.all_changes), matrix.product.name) && matrix.product.setup.run-forge-fmt }} - uses: foundry-rs/foundry-toolchain@8f1998e9878d786675189ef566a2e4bf24869773 # v1.2.0 - with: - version: ${{ needs.define-matrix.outputs.foundry-version }} - - - name: Run Forge fmt - if: ${{ contains(fromJson(needs.changes.outputs.all_changes), matrix.product.name) && matrix.product.setup.run-forge-fmt }} - run: forge fmt --check - id: fmt - working-directory: contracts - env: - FOUNDRY_PROFILE: ${{ matrix.product.name }} - - - name: Collect Metrics - if: ${{ contains(fromJson(needs.changes.outputs.all_changes), matrix.product.name) && matrix.product.setup.run-forge-fmt }} - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0 - with: - id: solidity-forge-fmt-${{ matrix.product.name }} - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: Forge fmt ${{ matrix.product.name }} - continue-on-error: true - - coverage: - needs: [define-matrix, changes] - name: Coverage - runs-on: ubuntu-latest - env: - FOUNDRY_PROFILE: ccip - - steps: - - name: Collect Metrics - if: ${{ needs.changes.outputs.non_src_changes == 'true' || needs.changes.outputs.sol_modified_added == 'true' }} - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0 - with: - id: ccip-solidity-foundry-coverage - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: Coverage - continue-on-error: true - - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - with: - submodules: recursive - - # Only needed because we use the NPM versions of packages - # and not native Foundry. This is to make sure the dependencies - # stay in sync. - - name: Setup NodeJS - uses: ./.github/actions/setup-nodejs - - - name: Install Foundry - if: ${{ needs.changes.outputs.non_src_changes == 'true' || needs.changes.outputs.sol_modified_added == 'true' }} - uses: foundry-rs/foundry-toolchain@8f1998e9878d786675189ef566a2e4bf24869773 # v1.2.0 - with: - version: ${{ needs.define-matrix.outputs.foundry-version }} - - - name: Run Forge build - if: ${{ needs.changes.outputs.non_src_changes == 'true' || needs.changes.outputs.sol_modified_added == 'true' }} - working-directory: contracts - run: | - forge --version - forge build - id: build - - - name: Run coverage - if: ${{ needs.changes.outputs.non_src_changes == 'true' || needs.changes.outputs.sol_modified_added == 'true' }} - working-directory: contracts - run: forge coverage --report lcov - - - name: Prune report - if: ${{ needs.changes.outputs.non_src_changes == 'true' || needs.changes.outputs.sol_modified_added == 'true' }} - run: | - sudo apt-get install lcov - ./tools/ci/ccip_lcov_prune ./contracts/lcov.info ./lcov.info.pruned - - - name: Report code coverage - if: ${{ needs.changes.outputs.non_src_changes == 'true' || needs.changes.outputs.sol_modified_added == 'true' }} - uses: zgosalvez/github-actions-report-lcov@a546f89a65a0cdcd82a92ae8d65e74d450ff3fbc # v4.1.4 - with: - update-comment: true - coverage-files: lcov.info.pruned - minimum-coverage: 97.6 - artifact-name: code-coverage-report - working-directory: ./contracts - github-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + continue-on-error: true \ No newline at end of file diff --git a/.github/workflows/solidity-hardhat.yml b/.github/workflows/solidity-hardhat.yml deleted file mode 100644 index d4b6a8b44f..0000000000 --- a/.github/workflows/solidity-hardhat.yml +++ /dev/null @@ -1,143 +0,0 @@ -name: Solidity-Hardhat - -on: - merge_group: - push: - -env: - NODE_OPTIONS: --max_old_space_size=8192 - -defaults: - run: - shell: bash - -jobs: - changes: - name: Detect changes - runs-on: ubuntu-latest - outputs: - changes: ${{ steps.changes.outputs.src }} - steps: - - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 - id: changes - with: - filters: | - src: - - 'contracts/src/!(v0.8/(ccip|functions|keystone|l2ep|liquiditymanager|llo-feeds|transmission|vrf)/**)/**/*' - - 'contracts/test/**/*' - - 'contracts/package.json' - - 'contracts/pnpm-lock.yaml' - - 'contracts/hardhat.config.ts' - - '.github/workflows/solidity-hardhat.yml' - -<<<<<<< HEAD -# hardhat-test: -# needs: [changes] -# if: needs.changes.outputs.changes == 'true' -# name: Solidity ${{ fromJSON('["(skipped)", ""]')[needs.changes.outputs.changes == 'true'] }} -# runs-on: ubuntu-latest -# steps: -# - name: Checkout the repo -# uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 -# - name: Setup NodeJS -# uses: ./.github/actions/setup-nodejs -# - name: Setup Hardhat -# uses: ./.github/actions/setup-hardhat -# with: -# namespace: coverage -# - name: Run tests -# working-directory: contracts -# run: pnpm test -# - name: Collect Metrics -# id: collect-gha-metrics -# uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1 -# with: -# id: hardhat-test -# org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} -# basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} -# hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} -# continue-on-error: true -# -# solidity: -# needs: [changes, hardhat-test] -# name: Solidity -# runs-on: ubuntu-latest -# if: always() -# steps: -# - run: echo 'Solidity tests finished!' -# - name: Check test results -# run: | -# if [[ "${{ needs.changes.result }}" = "failure" || "${{ needs.solidity-splits.result }}" = "failure" ]]; then -# echo "One or more changes / solidity-splits jobs failed" -# exit 1 -# else -# echo "All test jobs passed successfully" -# fi -# - name: Collect Metrics -# if: always() -# id: collect-gha-metrics -# uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1 -# with: -# id: solidity-tests -# org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} -# basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} -# hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} -# this-job-name: Solidity -# continue-on-error: true -======= - hardhat-test: - needs: [changes] - if: needs.changes.outputs.changes == 'true' - name: Solidity ${{ fromJSON('["(skipped)", ""]')[needs.changes.outputs.changes == 'true'] }} - runs-on: ubuntu-latest - steps: - - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - - name: Setup NodeJS - uses: ./.github/actions/setup-nodejs - - name: Setup Hardhat - uses: ./.github/actions/setup-hardhat - with: - namespace: coverage - - name: Run tests - working-directory: contracts - run: pnpm test - - name: Collect Metrics - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1 - with: - id: hardhat-test - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - continue-on-error: true - - solidity: - needs: [changes, hardhat-test] - name: Solidity - runs-on: ubuntu-latest - if: always() - steps: - - run: echo 'Solidity tests finished!' - - name: Check test results - run: | - if [[ "${{ needs.changes.result }}" = "failure" || "${{ needs.solidity-splits.result }}" = "failure" ]]; then - echo "One or more changes / solidity-splits jobs failed" - exit 1 - else - echo "All test jobs passed successfully" - fi - - name: Collect Metrics - if: always() - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1 - with: - id: solidity-tests - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: Solidity - continue-on-error: true ->>>>>>> v2.17.0 diff --git a/.golangci.yml b/.golangci.yml index 72f52bd452..0696493075 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -71,10 +71,9 @@ linters-settings: - name: error-return - name: error-strings - name: error-naming - - name: exported - name: if-return - name: increment-decrement - - name: var-naming + # - name: var-naming - name: var-declaration - name: package-comments - name: range @@ -93,7 +92,7 @@ linters-settings: - name: struct-tag # - name: string-format - name: string-of-int - - name: range-val-address + # - name: range-val-address - name: range-val-in-closure - name: modifies-value-receiver - name: modifies-parameter @@ -128,9 +127,9 @@ linters-settings: desc: Use github.com/stretchr/testify/mock instead - pkg: github.com/test-go/testify/require desc: Use github.com/stretchr/testify/require instead -# TODO https://smartcontract-it.atlassian.net/browse/BCI-2589 -# - pkg: go.uber.org/multierr -# desc: Use the standard library instead, for example https://pkg.go.dev/errors#Join + # TODO https://smartcontract-it.atlassian.net/browse/BCI-2589 + # - pkg: go.uber.org/multierr + # desc: Use the standard library instead, for example https://pkg.go.dev/errors#Join - pkg: gopkg.in/guregu/null.v1 desc: Use gopkg.in/guregu/null.v4 instead - pkg: gopkg.in/guregu/null.v2 @@ -166,4 +165,4 @@ issues: - path: test text: "^G404:" linters: - - gosec + - gosec \ No newline at end of file diff --git a/.mockery.yaml b/.mockery.yaml index 9ad9b1d88f..5c15653568 100644 --- a/.mockery.yaml +++ b/.mockery.yaml @@ -43,10 +43,6 @@ packages: github.com/smartcontractkit/chainlink/v2/core/bridges: interfaces: ORM: - github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/types: - interfaces: - CCIPOracle: - OracleCreator: github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types: interfaces: Dispatcher: @@ -349,6 +345,7 @@ packages: config: dir: core/services/relay/evm/mocks ChainWriter: + ContractReader: github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/evm_2_evm_onramp: config: dir: core/gethwrappers/ccip/mocks/ diff --git a/contracts/gas-snapshots/ccip.gas-snapshot b/contracts/gas-snapshots/ccip.gas-snapshot index 7660774812..1d3bb7b294 100644 --- a/contracts/gas-snapshots/ccip.gas-snapshot +++ b/contracts/gas-snapshots/ccip.gas-snapshot @@ -114,13 +114,13 @@ CommitStore_verify:test_Paused_Revert() (gas: 18568) CommitStore_verify:test_TooManyLeaves_Revert() (gas: 36848) DefensiveExampleTest:test_HappyPath_Success() (gas: 200200) DefensiveExampleTest:test_Recovery() (gas: 424476) -E2E:test_E2E_3MessagesSuccess_gas() (gas: 1141917) +E2E:test_E2E_3MessagesSuccess_gas() (gas: 1108425) EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_NotACompatiblePool_Revert() (gas: 38322) EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_Success() (gas: 104438) -EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_TokenHandlingError_transfer_Revert() (gas: 83526) +EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_TokenHandlingError_transfer_Revert() (gas: 86026) EVM2EVMOffRamp__releaseOrMintToken:test_releaseOrMintToken_InvalidDataLength_Revert() (gas: 37365) EVM2EVMOffRamp__releaseOrMintToken:test_releaseOrMintToken_ReleaseOrMintBalanceMismatch_Revert() (gas: 95013) -EVM2EVMOffRamp__releaseOrMintToken:test_releaseOrMintToken_TokenHandlingError_BalanceOf_Revert() (gas: 37841) +EVM2EVMOffRamp__releaseOrMintToken:test_releaseOrMintToken_TokenHandlingError_BalanceOf_Revert() (gas: 40341) EVM2EVMOffRamp__releaseOrMintToken:test_releaseOrMintToken_skip_ReleaseOrMintBalanceMismatch_if_pool_Revert() (gas: 87189) EVM2EVMOffRamp__releaseOrMintTokens:test_OverValueWithARLOff_Success() (gas: 381594) EVM2EVMOffRamp__releaseOrMintTokens:test_PriceNotFoundForToken_Reverts() (gas: 140568) @@ -512,7 +512,7 @@ MultiAggregateRateLimiter_onInboundMessage:test_ValidateMessageWithRateLimitExce MultiAggregateRateLimiter_onInboundMessage:test_ValidateMessageWithRateLimitReset_Success() (gas: 76561) MultiAggregateRateLimiter_onInboundMessage:test_ValidateMessageWithTokensOnDifferentChains_Success() (gas: 308233) MultiAggregateRateLimiter_onInboundMessage:test_ValidateMessageWithTokens_Success() (gas: 50558) -MultiAggregateRateLimiter_onOutboundMessage:test_RateLimitValueDifferentLanes_Success() (gas: 51181) +MultiAggregateRateLimiter_onOutboundMessage:test_RateLimitValueDifferentLanes_Success() (gas: 1073669578) MultiAggregateRateLimiter_onOutboundMessage:test_ValidateMessageWithNoTokens_Success() (gas: 19302) MultiAggregateRateLimiter_onOutboundMessage:test_onOutboundMessage_ValidateMessageFromUnauthorizedCaller_Revert() (gas: 15913) MultiAggregateRateLimiter_onOutboundMessage:test_onOutboundMessage_ValidateMessageWithDifferentTokensOnDifferentChains_Success() (gas: 209885) @@ -566,8 +566,7 @@ MultiOCR3Base_transmit:test_UnauthorizedSigner_Revert() (gas: 61275) MultiOCR3Base_transmit:test_UnconfiguredPlugin_Revert() (gas: 39933) MultiOCR3Base_transmit:test_ZeroSignatures_Revert() (gas: 33049) MultiOnRampTokenPoolReentrancy:test_OnRampTokenPoolReentrancy_Success() (gas: 233732) -MultiRampsE2E:test_E2E_3MessagesMMultiOffRampSuccess_gas() (gas: 1518567) -MultiRampsE2E:test_E2E_3MessagesMMultiOffRampSuccess_gas() (gas: 1518567) +MultiRampsE2E:test_E2E_3MessagesMMultiOffRampSuccess_gas() (gas: 1501821) NonceManager_NonceIncrementation:test_getIncrementedOutboundNonce_Success() (gas: 37934) NonceManager_NonceIncrementation:test_incrementInboundNonce_Skip() (gas: 23706) NonceManager_NonceIncrementation:test_incrementInboundNonce_Success() (gas: 38778) @@ -635,7 +634,7 @@ OffRamp_batchExecute:test_Unhealthy_Success() (gas: 554256) OffRamp_batchExecute:test_ZeroReports_Revert() (gas: 10622) OffRamp_ccipReceive:test_Reverts() (gas: 15407) OffRamp_commit:test_CommitOnRampMismatch_Revert() (gas: 92905) -OffRamp_commit:test_FailedRMNVerification_Reverts() (gas: 61599) +OffRamp_commit:test_FailedRMNVerification_Reverts() (gas: 64099) OffRamp_commit:test_InvalidIntervalMinLargerThanMax_Revert() (gas: 68173) OffRamp_commit:test_InvalidInterval_Revert() (gas: 64291) OffRamp_commit:test_InvalidRootRevert() (gas: 63356) @@ -729,10 +728,10 @@ OffRamp_manuallyExecute:test_manuallyExecute_WithMultiReportGasOverride_Success( OffRamp_manuallyExecute:test_manuallyExecute_WithPartialMessages_Success() (gas: 347346) OffRamp_releaseOrMintSingleToken:test__releaseOrMintSingleToken_NotACompatiblePool_Revert() (gas: 37656) OffRamp_releaseOrMintSingleToken:test__releaseOrMintSingleToken_Success() (gas: 104404) -OffRamp_releaseOrMintSingleToken:test__releaseOrMintSingleToken_TokenHandlingError_transfer_Revert() (gas: 82842) +OffRamp_releaseOrMintSingleToken:test__releaseOrMintSingleToken_TokenHandlingError_transfer_Revert() (gas: 85342) OffRamp_releaseOrMintSingleToken:test_releaseOrMintToken_InvalidDataLength_Revert() (gas: 36752) OffRamp_releaseOrMintSingleToken:test_releaseOrMintToken_ReleaseOrMintBalanceMismatch_Revert() (gas: 94382) -OffRamp_releaseOrMintSingleToken:test_releaseOrMintToken_TokenHandlingError_BalanceOf_Revert() (gas: 37241) +OffRamp_releaseOrMintSingleToken:test_releaseOrMintToken_TokenHandlingError_BalanceOf_Revert() (gas: 39741) OffRamp_releaseOrMintSingleToken:test_releaseOrMintToken_skip_ReleaseOrMintBalanceMismatch_if_pool_Revert() (gas: 86516) OffRamp_releaseOrMintTokens:test_TokenHandlingError_Reverts() (gas: 162381) OffRamp_releaseOrMintTokens:test__releaseOrMintTokens_PoolIsNotAPool_Reverts() (gas: 23903) diff --git a/contracts/gas-snapshots/functions.gas-snapshot b/contracts/gas-snapshots/functions.gas-snapshot index 1e6966fe09..69e0271684 100644 --- a/contracts/gas-snapshots/functions.gas-snapshot +++ b/contracts/gas-snapshots/functions.gas-snapshot @@ -229,13 +229,13 @@ FunctionsTermsOfServiceAllowList_UnblockSender:test_UnblockSender_RevertIfNotOwn FunctionsTermsOfServiceAllowList_UnblockSender:test_UnblockSender_Success() (gas: 96240) FunctionsTermsOfServiceAllowList_UpdateConfig:test_UpdateConfig_RevertIfNotOwner() (gas: 13819) FunctionsTermsOfServiceAllowList_UpdateConfig:test_UpdateConfig_Success() (gas: 22824) -Gas_AcceptTermsOfService:test_AcceptTermsOfService_Gas() (gas: 81752) -Gas_AddConsumer:test_AddConsumer_Gas() (gas: 76167) +Gas_AcceptTermsOfService:test_AcceptTermsOfService_Gas() (gas: 84725) +Gas_AddConsumer:test_AddConsumer_Gas() (gas: 79140) Gas_CreateSubscription:test_CreateSubscription_Gas() (gas: 73419) -Gas_FulfillRequest_DuplicateRequestID:test_FulfillRequest_DuplicateRequestID_MaximumGas() (gas: 17589) -Gas_FulfillRequest_DuplicateRequestID:test_FulfillRequest_DuplicateRequestID_MinimumGas() (gas: 17051) -Gas_FulfillRequest_Success:test_FulfillRequest_Success_MaximumGas() (gas: 498189) -Gas_FulfillRequest_Success:test_FulfillRequest_Success_MinimumGas() (gas: 199381) -Gas_FundSubscription:test_FundSubscription_Gas() (gas: 35545) -Gas_SendRequest:test_SendRequest_MaximumGas() (gas: 981365) -Gas_SendRequest:test_SendRequest_MinimumGas() (gas: 178588) \ No newline at end of file +Gas_FulfillRequest_DuplicateRequestID:test_FulfillRequest_DuplicateRequestID_MaximumGas() (gas: 20562) +Gas_FulfillRequest_DuplicateRequestID:test_FulfillRequest_DuplicateRequestID_MinimumGas() (gas: 20024) +Gas_FulfillRequest_Success:test_FulfillRequest_Success_MaximumGas() (gas: 501184) +Gas_FulfillRequest_Success:test_FulfillRequest_Success_MinimumGas() (gas: 202376) +Gas_FundSubscription:test_FundSubscription_Gas() (gas: 38518) +Gas_SendRequest:test_SendRequest_MaximumGas() (gas: 984338) +Gas_SendRequest:test_SendRequest_MinimumGas() (gas: 181561) \ No newline at end of file diff --git a/contracts/gas-snapshots/keystone.gas-snapshot b/contracts/gas-snapshots/keystone.gas-snapshot index f057cd09ce..3a21b733b0 100644 --- a/contracts/gas-snapshots/keystone.gas-snapshot +++ b/contracts/gas-snapshots/keystone.gas-snapshot @@ -1,116 +1,115 @@ -CapabilitiesRegistry_AddCapabilitiesTest:test_AddCapability_NoConfigurationContract() (gas: 154809) -CapabilitiesRegistry_AddCapabilitiesTest:test_AddCapability_WithConfiguration() (gas: 180379) -CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_CalledByNonAdmin() (gas: 24678) -CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_CapabilityExists() (gas: 145613) -CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_ConfigurationContractDoesNotMatchInterface() (gas: 94543) -CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_ConfigurationContractNotDeployed() (gas: 96326) -CapabilitiesRegistry_AddDONTest:test_AddDON() (gas: 373893) -CapabilitiesRegistry_AddDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19288) -CapabilitiesRegistry_AddDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 169767) -CapabilitiesRegistry_AddDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 239739) -CapabilitiesRegistry_AddDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 250950) -CapabilitiesRegistry_AddDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 116905) -CapabilitiesRegistry_AddDONTest:test_RevertWhen_FaultToleranceIsZero() (gas: 43373) -CapabilitiesRegistry_AddDONTest:test_RevertWhen_NodeAlreadyBelongsToWorkflowDON() (gas: 344037) -CapabilitiesRegistry_AddDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 180165) -CapabilitiesRegistry_AddDONTest_WhenMaliciousCapabilityConfigurationConfigured:test_RevertWhen_MaliciousCapabilitiesConfigContractTriesToRemoveCapabilitiesFromDONNodes() (gas: 340514) -CapabilitiesRegistry_AddNodeOperatorsTest:test_AddNodeOperators() (gas: 184157) -CapabilitiesRegistry_AddNodeOperatorsTest:test_RevertWhen_CalledByNonAdmin() (gas: 17624) -CapabilitiesRegistry_AddNodeOperatorsTest:test_RevertWhen_NodeOperatorAdminAddressZero() (gas: 18520) -CapabilitiesRegistry_AddNodesTest:test_AddsNodeParams() (gas: 358492) -CapabilitiesRegistry_AddNodesTest:test_OwnerCanAddNodes() (gas: 358458) -CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingDuplicateP2PId() (gas: 301273) -CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 55196) -CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidNodeOperator() (gas: 24917) -CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithoutCapabilities() (gas: 27691) -CapabilitiesRegistry_AddNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25130) -CapabilitiesRegistry_AddNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 27430) -CapabilitiesRegistry_AddNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 27069) -CapabilitiesRegistry_AddNodesTest:test_RevertWhen_SignerAddressNotUnique() (gas: 309723) -CapabilitiesRegistry_DeprecateCapabilitiesTest:test_DeprecatesCapability() (gas: 89742) -CapabilitiesRegistry_DeprecateCapabilitiesTest:test_EmitsEvent() (gas: 89870) -CapabilitiesRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CalledByNonAdmin() (gas: 22879) -CapabilitiesRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 16166) -CapabilitiesRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CapabilityIsDeprecated() (gas: 91134) -CapabilitiesRegistry_GetCapabilitiesTest:test_ReturnsCapabilities() (gas: 135488) -CapabilitiesRegistry_GetDONsTest:test_CorrectlyFetchesDONs() (gas: 65468) -CapabilitiesRegistry_GetDONsTest:test_DoesNotIncludeRemovedDONs() (gas: 65016) -CapabilitiesRegistry_GetHashedCapabilityTest:test_CorrectlyGeneratesHashedCapabilityId() (gas: 11428) -CapabilitiesRegistry_GetHashedCapabilityTest:test_DoesNotCauseIncorrectClashes() (gas: 13087) -CapabilitiesRegistry_GetNodeOperatorsTest:test_CorrectlyFetchesNodeOperators() (gas: 36429) -CapabilitiesRegistry_GetNodeOperatorsTest:test_DoesNotIncludeRemovedNodeOperators() (gas: 38714) -CapabilitiesRegistry_GetNodesTest:test_CorrectlyFetchesNodes() (gas: 65288) -CapabilitiesRegistry_GetNodesTest:test_DoesNotIncludeRemovedNodes() (gas: 73497) -CapabilitiesRegistry_RemoveDONsTest:test_RemovesDON() (gas: 54982) -CapabilitiesRegistry_RemoveDONsTest:test_RevertWhen_CalledByNonAdmin() (gas: 15647) -CapabilitiesRegistry_RemoveDONsTest:test_RevertWhen_DONDoesNotExist() (gas: 16550) -CapabilitiesRegistry_RemoveNodeOperatorsTest:test_RemovesNodeOperator() (gas: 36122) -CapabilitiesRegistry_RemoveNodeOperatorsTest:test_RevertWhen_CalledByNonOwner() (gas: 15816) -CapabilitiesRegistry_RemoveNodesTest:test_CanAddNodeWithSameSignerAddressAfterRemoving() (gas: 115150) -CapabilitiesRegistry_RemoveNodesTest:test_CanRemoveWhenDONDeleted() (gas: 287838) -CapabilitiesRegistry_RemoveNodesTest:test_CanRemoveWhenNodeNoLongerPartOfDON() (gas: 561183) -CapabilitiesRegistry_RemoveNodesTest:test_OwnerCanRemoveNodes() (gas: 73358) -CapabilitiesRegistry_RemoveNodesTest:test_RemovesNode() (gas: 75192) -CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25008) -CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 18373) -CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_NodePartOfCapabilitiesDON() (gas: 385422) -CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 18363) -CapabilitiesRegistry_TypeAndVersionTest:test_TypeAndVersion() (gas: 9796) -CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19323) -CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 152958) -CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DONDoesNotExist() (gas: 17749) -CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 222975) -CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 236986) -CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 107687) -CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 163401) -CapabilitiesRegistry_UpdateDONTest:test_UpdatesDON() (gas: 373510) -CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_CalledByNonAdminAndNonOwner() (gas: 20684) -CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorAdminIsZeroAddress() (gas: 20008) -CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorDoesNotExist() (gas: 19746) -CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorIdAndParamLengthsMismatch() (gas: 15386) -CapabilitiesRegistry_UpdateNodeOperatorTest:test_UpdatesNodeOperator() (gas: 36990) -CapabilitiesRegistry_UpdateNodesTest:test_CanUpdateParamsIfNodeSignerAddressNoLongerUsed() (gas: 256437) -CapabilitiesRegistry_UpdateNodesTest:test_OwnerCanUpdateNodes() (gas: 162210) -CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 35895) -CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_CalledByAnotherNodeOperatorAdmin() (gas: 29222) -CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 29399) -CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 29221) -CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_NodeSignerAlreadyAssignedToAnotherNode() (gas: 31348) -CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 29187) -CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_RemovingCapabilityRequiredByCapabilityDON() (gas: 471030) -CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_RemovingCapabilityRequiredByWorkflowDON() (gas: 341311) -CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 29080) -CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_UpdatingNodeWithoutCapabilities() (gas: 27609) -CapabilitiesRegistry_UpdateNodesTest:test_UpdatesNodeParams() (gas: 162264) +CapabilitiesRegistry_AddCapabilitiesTest:test_AddCapability_NoConfigurationContract() (gas: 165160) +CapabilitiesRegistry_AddCapabilitiesTest:test_AddCapability_WithConfiguration() (gas: 191990) +CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_CalledByNonAdmin() (gas: 27250) +CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_CapabilityExists() (gas: 152585) +CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_ConfigurationContractDoesNotMatchInterface() (gas: 99251) +CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_ConfigurationContractNotDeployed() (gas: 100235) +CapabilitiesRegistry_AddDONTest:test_AddDON() (gas: 397662) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 21955) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 173196) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 244098) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 256604) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 120335) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_FaultToleranceIsZero() (gas: 46314) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_NodeAlreadyBelongsToWorkflowDON() (gas: 351528) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 184109) +CapabilitiesRegistry_AddDONTest_WhenMaliciousCapabilityConfigurationConfigured:test_RevertWhen_MaliciousCapabilitiesConfigContractTriesToRemoveCapabilitiesFromDONNodes() (gas: 351499) +CapabilitiesRegistry_AddNodeOperatorsTest:test_AddNodeOperators() (gas: 196412) +CapabilitiesRegistry_AddNodeOperatorsTest:test_RevertWhen_CalledByNonAdmin() (gas: 20517) +CapabilitiesRegistry_AddNodeOperatorsTest:test_RevertWhen_NodeOperatorAdminAddressZero() (gas: 21853) +CapabilitiesRegistry_AddNodesTest:test_AddsNodeParams() (gas: 370469) +CapabilitiesRegistry_AddNodesTest:test_OwnerCanAddNodes() (gas: 370412) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingDuplicateP2PId() (gas: 308840) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 60242) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidNodeOperator() (gas: 29057) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithoutCapabilities() (gas: 31777) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 29369) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 31590) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 30458) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_SignerAddressNotUnique() (gas: 318363) +CapabilitiesRegistry_DeprecateCapabilitiesTest:test_DeprecatesCapability() (gas: 92947) +CapabilitiesRegistry_DeprecateCapabilitiesTest:test_EmitsEvent() (gas: 92416) +CapabilitiesRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CalledByNonAdmin() (gas: 25861) +CapabilitiesRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 17253) +CapabilitiesRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CapabilityIsDeprecated() (gas: 94546) +CapabilitiesRegistry_GetCapabilitiesTest:test_ReturnsCapabilities() (gas: 148509) +CapabilitiesRegistry_GetDONsTest:test_CorrectlyFetchesDONs() (gas: 79258) +CapabilitiesRegistry_GetDONsTest:test_DoesNotIncludeRemovedDONs() (gas: 75791) +CapabilitiesRegistry_GetHashedCapabilityTest:test_CorrectlyGeneratesHashedCapabilityId() (gas: 13678) +CapabilitiesRegistry_GetHashedCapabilityTest:test_DoesNotCauseIncorrectClashes() (gas: 16541) +CapabilitiesRegistry_GetNodeOperatorsTest:test_CorrectlyFetchesNodeOperators() (gas: 43532) +CapabilitiesRegistry_GetNodeOperatorsTest:test_DoesNotIncludeRemovedNodeOperators() (gas: 45407) +CapabilitiesRegistry_GetNodesTest:test_CorrectlyFetchesNodes() (gas: 78072) +CapabilitiesRegistry_GetNodesTest:test_DoesNotIncludeRemovedNodes() (gas: 81113) +CapabilitiesRegistry_RemoveDONsTest:test_RemovesDON() (gas: 65888) +CapabilitiesRegistry_RemoveDONsTest:test_RevertWhen_CalledByNonAdmin() (gas: 17319) +CapabilitiesRegistry_RemoveDONsTest:test_RevertWhen_DONDoesNotExist() (gas: 18221) +CapabilitiesRegistry_RemoveNodeOperatorsTest:test_RemovesNodeOperator() (gas: 42131) +CapabilitiesRegistry_RemoveNodeOperatorsTest:test_RevertWhen_CalledByNonOwner() (gas: 17570) +CapabilitiesRegistry_RemoveNodesTest:test_CanAddNodeWithSameSignerAddressAfterRemoving() (gas: 128198) +CapabilitiesRegistry_RemoveNodesTest:test_CanRemoveWhenDONDeleted() (gas: 304051) +CapabilitiesRegistry_RemoveNodesTest:test_CanRemoveWhenNodeNoLongerPartOfDON() (gas: 580021) +CapabilitiesRegistry_RemoveNodesTest:test_OwnerCanRemoveNodes() (gas: 79607) +CapabilitiesRegistry_RemoveNodesTest:test_RemovesNode() (gas: 81525) +CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 27098) +CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 20122) +CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_NodePartOfCapabilitiesDON() (gas: 391972) +CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 20101) +CapabilitiesRegistry_TypeAndVersionTest:test_TypeAndVersion() (gas: 10699) +CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 21979) +CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 157054) +CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DONDoesNotExist() (gas: 20190) +CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 227956) +CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 243262) +CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 111705) +CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 167967) +CapabilitiesRegistry_UpdateDONTest:test_UpdatesDON() (gas: 399442) +CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_CalledByNonAdminAndNonOwner() (gas: 24121) +CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorAdminIsZeroAddress() (gas: 22970) +CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorDoesNotExist() (gas: 22368) +CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorIdAndParamLengthsMismatch() (gas: 18126) +CapabilitiesRegistry_UpdateNodeOperatorTest:test_UpdatesNodeOperator() (gas: 43652) +CapabilitiesRegistry_UpdateNodesTest:test_CanUpdateParamsIfNodeSignerAddressNoLongerUsed() (gas: 270986) +CapabilitiesRegistry_UpdateNodesTest:test_OwnerCanUpdateNodes() (gas: 172430) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 40754) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_CalledByAnotherNodeOperatorAdmin() (gas: 32851) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 33584) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 33290) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_NodeSignerAlreadyAssignedToAnotherNode() (gas: 35211) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 33256) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_RemovingCapabilityRequiredByCapabilityDON() (gas: 480598) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_RemovingCapabilityRequiredByWorkflowDON() (gas: 350838) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 32442) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_UpdatingNodeWithoutCapabilities() (gas: 31565) +CapabilitiesRegistry_UpdateNodesTest:test_UpdatesNodeParams() (gas: 172552) KeystoneForwarder_ReportTest:test_Report_ConfigVersion() (gas: 2006826) KeystoneForwarder_ReportTest:test_Report_FailedDelieryWhenReportReceiverConsumesAllGas() (gas: 1004827) -KeystoneForwarder_ReportTest:test_Report_FailedDeliveryWhenReceiverInterfaceNotSupported() (gas: 124952) +KeystoneForwarder_ReportTest:test_Report_FailedDeliveryWhenReceiverInterfaceNotSupported() (gas: 124974) KeystoneForwarder_ReportTest:test_Report_FailedDeliveryWhenReceiverNotContract() (gas: 127233) -KeystoneForwarder_ReportTest:test_Report_FailedDeliveryWhenReportReceiverConsumesAllGasAndInterfaceCheckUsesMax() (gas: 1183710) KeystoneForwarder_ReportTest:test_Report_SuccessfulDelivery() (gas: 362832) -KeystoneForwarder_ReportTest:test_Report_SuccessfulRetryWithMoreGas() (gas: 510665) -KeystoneForwarder_ReportTest:test_RevertWhen_AnySignatureIsInvalid() (gas: 86326) +KeystoneForwarder_ReportTest:test_Report_SuccessfulRetryWithMoreGas() (gas: 510687) +KeystoneForwarder_ReportTest:test_RevertWhen_AnySignatureIsInvalid() (gas: 86348) KeystoneForwarder_ReportTest:test_RevertWhen_AnySignerIsInvalid() (gas: 118476) -KeystoneForwarder_ReportTest:test_RevertWhen_AttemptingTransmissionWithInsufficientGas() (gas: 96651) +KeystoneForwarder_ReportTest:test_RevertWhen_AttemptingTransmissionWithInsufficientGas() (gas: 96673) KeystoneForwarder_ReportTest:test_RevertWhen_ReportHasDuplicateSignatures() (gas: 94538) KeystoneForwarder_ReportTest:test_RevertWhen_ReportHasIncorrectDON() (gas: 75930) -KeystoneForwarder_ReportTest:test_RevertWhen_ReportHasInexistentConfigVersion() (gas: 76298) -KeystoneForwarder_ReportTest:test_RevertWhen_ReportIsMalformed() (gas: 45563) -KeystoneForwarder_ReportTest:test_RevertWhen_RetryingInvalidContractTransmission() (gas: 144247) -KeystoneForwarder_ReportTest:test_RevertWhen_RetryingSuccessfulTransmission() (gas: 355970) -KeystoneForwarder_ReportTest:test_RevertWhen_TooFewSignatures() (gas: 55292) +KeystoneForwarder_ReportTest:test_RevertWhen_ReportHasInexistentConfigVersion() (gas: 76320) +KeystoneForwarder_ReportTest:test_RevertWhen_ReportIsMalformed() (gas: 45585) +KeystoneForwarder_ReportTest:test_RevertWhen_RetryingInvalidContractTransmission() (gas: 144181) +KeystoneForwarder_ReportTest:test_RevertWhen_RetryingSuccessfulTransmission() (gas: 355992) +KeystoneForwarder_ReportTest:test_RevertWhen_TooFewSignatures() (gas: 55314) KeystoneForwarder_ReportTest:test_RevertWhen_TooManySignatures() (gas: 56050) -KeystoneForwarder_SetConfigTest:test_RevertWhen_ExcessSigners() (gas: 20184) -KeystoneForwarder_SetConfigTest:test_RevertWhen_FaultToleranceIsZero() (gas: 88057) -KeystoneForwarder_SetConfigTest:test_RevertWhen_InsufficientSigners() (gas: 14533) -KeystoneForwarder_SetConfigTest:test_RevertWhen_NotOwner() (gas: 88766) -KeystoneForwarder_SetConfigTest:test_RevertWhen_ProvidingDuplicateSigners() (gas: 114578) -KeystoneForwarder_SetConfigTest:test_RevertWhen_ProvidingZeroAddressSigner() (gas: 114233) -KeystoneForwarder_SetConfigTest:test_SetConfig_FirstTime() (gas: 1540665) -KeystoneForwarder_SetConfigTest:test_SetConfig_WhenSignersAreRemoved() (gas: 1535361) -KeystoneForwarder_TypeAndVersionTest:test_TypeAndVersion() (gas: 9641) -KeystoneRouter_SetConfigTest:test_AddForwarder_RevertWhen_NotOwner() (gas: 10982) -KeystoneRouter_SetConfigTest:test_RemoveForwarder_RevertWhen_NotOwner() (gas: 10927) -KeystoneRouter_SetConfigTest:test_RemoveForwarder_Success() (gas: 17603) -KeystoneRouter_SetConfigTest:test_Route_RevertWhen_UnauthorizedForwarder() (gas: 18552) -KeystoneRouter_SetConfigTest:test_Route_Success() (gas: 80948) \ No newline at end of file +KeystoneForwarder_SetConfigTest:test_RevertWhen_ExcessSigners() (gas: 36989) +KeystoneForwarder_SetConfigTest:test_RevertWhen_FaultToleranceIsZero() (gas: 96835) +KeystoneForwarder_SetConfigTest:test_RevertWhen_InsufficientSigners() (gas: 17476) +KeystoneForwarder_SetConfigTest:test_RevertWhen_NotOwner() (gas: 97845) +KeystoneForwarder_SetConfigTest:test_RevertWhen_ProvidingDuplicateSigners() (gas: 124504) +KeystoneForwarder_SetConfigTest:test_RevertWhen_ProvidingZeroAddressSigner() (gas: 124123) +KeystoneForwarder_SetConfigTest:test_SetConfig_FirstTime() (gas: 1574325) +KeystoneForwarder_SetConfigTest:test_SetConfig_WhenSignersAreRemoved() (gas: 1580648) +KeystoneForwarder_TypeAndVersionTest:test_TypeAndVersion() (gas: 10619) +KeystoneRouter_SetConfigTest:test_AddForwarder_RevertWhen_NotOwner() (gas: 11782) +KeystoneRouter_SetConfigTest:test_RemoveForwarder_RevertWhen_NotOwner() (gas: 11738) +KeystoneRouter_SetConfigTest:test_RemoveForwarder_Success() (gas: 18831) +KeystoneRouter_SetConfigTest:test_Route_RevertWhen_UnauthorizedForwarder() (gas: 20110) +KeystoneRouter_SetConfigTest:test_Route_Success() (gas: 89986) \ No newline at end of file diff --git a/contracts/scripts/native_solc_compile_all_ccip b/contracts/scripts/native_solc_compile_all_ccip index 195b37872e..2e1072411c 100755 --- a/contracts/scripts/native_solc_compile_all_ccip +++ b/contracts/scripts/native_solc_compile_all_ccip @@ -91,7 +91,6 @@ compileContract ccip/test/helpers/BurnMintERC677Helper.sol compileContract ccip/test/helpers/CommitStoreHelper.sol compileContract ccip/test/helpers/MessageHasher.sol compileContract ccip/test/helpers/CCIPReaderTester.sol -compileContract ccip/test/helpers/USDCReaderTester.sol compileContract ccip/test/helpers/ReportCodec.sol compileContract ccip/test/helpers/receivers/MaybeRevertMessageReceiver.sol compileContract ccip/test/helpers/MultiOCR3Helper.sol diff --git a/contracts/src/v0.8/ccip/pools/USDC/HybridLockReleaseUSDCTokenPool.sol b/contracts/src/v0.8/ccip/pools/USDC/HybridLockReleaseUSDCTokenPool.sol index 1299e9b174..5fbd71bb2c 100644 --- a/contracts/src/v0.8/ccip/pools/USDC/HybridLockReleaseUSDCTokenPool.sol +++ b/contracts/src/v0.8/ccip/pools/USDC/HybridLockReleaseUSDCTokenPool.sol @@ -194,6 +194,7 @@ contract HybridLockReleaseUSDCTokenPool is USDCTokenPool, USDCBridgeMigrator { s_lockedTokensByChainSelector[remoteChainSelector] -= amount; i_token.safeTransfer(msg.sender, amount); + emit ILiquidityContainer.LiquidityRemoved(msg.sender, amount); } diff --git a/contracts/src/v0.8/ccip/test/e2e/MultiRampsEnd2End.sol b/contracts/src/v0.8/ccip/test/e2e/MultiRampsEnd2End.sol deleted file mode 100644 index 48bfa668df..0000000000 --- a/contracts/src/v0.8/ccip/test/e2e/MultiRampsEnd2End.sol +++ /dev/null @@ -1,305 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.24; - -import {IRMN} from "../../interfaces/IRMN.sol"; - -import {AuthorizedCallers} from "../../../shared/access/AuthorizedCallers.sol"; -import {NonceManager} from "../../NonceManager.sol"; -import {IRMNRemote} from "../../interfaces/IRMNRemote.sol"; -import {LockReleaseTokenPool} from "../../pools/LockReleaseTokenPool.sol"; -import {TokenAdminRegistry} from "../../tokenAdminRegistry/TokenAdminRegistry.sol"; -import "../helpers/MerkleHelper.sol"; -import "../offRamp/OffRampSetup.t.sol"; -import "../onRamp/OnRampSetup.t.sol"; - -/// @notice This E2E test implements the following scenario: -/// 1. Send multiple messages from multiple source chains to a single destination chain (2 messages from source chain 1 and 1 from -/// source chain 2). -/// 2. Commit multiple merkle roots (1 for each source chain). -/// 3. Batch execute all the committed messages. -contract MultiRampsE2E is OnRampSetup, OffRampSetup { - using Internal for Internal.Any2EVMRampMessage; - - Router internal s_sourceRouter2; - OnRampHelper internal s_onRamp2; - TokenAdminRegistry internal s_tokenAdminRegistry2; - NonceManager internal s_nonceManager2; - - bytes32 internal s_metadataHash2; - - mapping(address destPool => address sourcePool) internal s_sourcePoolByDestPool; - - function setUp() public virtual override(OnRampSetup, OffRampSetup) { - OnRampSetup.setUp(); - OffRampSetup.setUp(); - - // Deploy new source router for the new source chain - s_sourceRouter2 = new Router(s_sourceRouter.getWrappedNative(), address(s_mockRMN)); - - // Deploy new TokenAdminRegistry for the new source chain - s_tokenAdminRegistry2 = new TokenAdminRegistry(); - - // Deploy new token pools and set them on the new TokenAdminRegistry - for (uint256 i = 0; i < s_sourceTokens.length; ++i) { - address token = s_sourceTokens[i]; - address pool = address( - new LockReleaseTokenPool(IERC20(token), new address[](0), address(s_mockRMN), true, address(s_sourceRouter2)) - ); - - s_sourcePoolByDestPool[s_destPoolBySourceToken[token]] = pool; - - _setPool( - s_tokenAdminRegistry2, token, pool, DEST_CHAIN_SELECTOR, s_destPoolByToken[s_destTokens[i]], s_destTokens[i] - ); - } - - for (uint256 i = 0; i < s_destTokens.length; ++i) { - address token = s_destTokens[i]; - address pool = s_destPoolByToken[token]; - - _setPool( - s_tokenAdminRegistry2, token, pool, SOURCE_CHAIN_SELECTOR + 1, s_sourcePoolByDestPool[pool], s_sourceTokens[i] - ); - } - - s_nonceManager2 = new NonceManager(new address[](0)); - - ( - // Deploy the new source chain onramp - // Outsource to shared helper function with OnRampSetup - s_onRamp2, - s_metadataHash2 - ) = _deployOnRamp( - SOURCE_CHAIN_SELECTOR + 1, s_sourceRouter2, address(s_nonceManager2), address(s_tokenAdminRegistry2) - ); - - address[] memory authorizedCallers = new address[](1); - authorizedCallers[0] = address(s_onRamp2); - s_nonceManager2.applyAuthorizedCallerUpdates( - AuthorizedCallers.AuthorizedCallerArgs({addedCallers: authorizedCallers, removedCallers: new address[](0)}) - ); - - // Enable destination chain on new source chain router - Router.OnRamp[] memory onRampUpdates = new Router.OnRamp[](1); - onRampUpdates[0] = Router.OnRamp({destChainSelector: DEST_CHAIN_SELECTOR, onRamp: address(s_onRamp2)}); - s_sourceRouter2.applyRampUpdates(onRampUpdates, new Router.OffRamp[](0), new Router.OffRamp[](0)); - - // Deploy offramp - _deployOffRamp(s_mockRMNRemote, s_inboundNonceManager); - - // Enable source chains on offramp - OffRamp.SourceChainConfigArgs[] memory sourceChainConfigs = new OffRamp.SourceChainConfigArgs[](2); - sourceChainConfigs[0] = OffRamp.SourceChainConfigArgs({ - router: s_destRouter, - sourceChainSelector: SOURCE_CHAIN_SELECTOR, - isEnabled: true, - // Must match OnRamp address - onRamp: abi.encode(address(s_onRamp)) - }); - sourceChainConfigs[1] = OffRamp.SourceChainConfigArgs({ - router: s_destRouter, - sourceChainSelector: SOURCE_CHAIN_SELECTOR + 1, - isEnabled: true, - onRamp: abi.encode(address(s_onRamp2)) - }); - - _setupMultipleOffRampsFromConfigs(sourceChainConfigs); - } - - function test_E2E_3MessagesMMultiOffRampSuccess_gas() public { - vm.pauseGasMetering(); - - Internal.Any2EVMRampMessage[] memory messages1 = new Internal.Any2EVMRampMessage[](2); - Internal.Any2EVMRampMessage[] memory messages2 = new Internal.Any2EVMRampMessage[](1); - - // Scoped to sending to reduce stack pressure - { - IERC20 token0 = IERC20(s_sourceTokens[0]); - IERC20 token1 = IERC20(s_sourceTokens[1]); - - uint256 balance0Pre = token0.balanceOf(OWNER); - uint256 balance1Pre = token1.balanceOf(OWNER); - - // Send messages - messages1[0] = _sendRequest(1, SOURCE_CHAIN_SELECTOR, 1, s_metadataHash, s_sourceRouter, s_tokenAdminRegistry); - messages1[1] = _sendRequest(2, SOURCE_CHAIN_SELECTOR, 2, s_metadataHash, s_sourceRouter, s_tokenAdminRegistry); - messages2[0] = - _sendRequest(1, SOURCE_CHAIN_SELECTOR + 1, 1, s_metadataHash2, s_sourceRouter2, s_tokenAdminRegistry2); - - uint256 expectedFee = s_sourceRouter.getFee(DEST_CHAIN_SELECTOR, _generateTokenMessage()); - // Asserts that the tokens have been sent and the fee has been paid. - assertEq( - balance0Pre - (messages1.length + messages2.length) * (i_tokenAmount0 + expectedFee), token0.balanceOf(OWNER) - ); - assertEq(balance1Pre - (messages1.length + messages2.length) * i_tokenAmount1, token1.balanceOf(OWNER)); - } - - // Commit - - bytes32[] memory merkleRoots = new bytes32[](2); - - // Scoped to commit to reduce stack pressure - { - bytes32[] memory hashedMessages1 = new bytes32[](2); - hashedMessages1[0] = _hashMessage(messages1[0], abi.encode(address(s_onRamp))); - hashedMessages1[1] = _hashMessage(messages1[1], abi.encode(address(s_onRamp))); - bytes32[] memory hashedMessages2 = new bytes32[](1); - hashedMessages2[0] = _hashMessage(messages2[0], abi.encode(address(s_onRamp2))); - - merkleRoots[0] = MerkleHelper.getMerkleRoot(hashedMessages1); - merkleRoots[1] = MerkleHelper.getMerkleRoot(hashedMessages2); - - // TODO make these real sigs :) - IRMNRemote.Signature[] memory rmnSignatures = new IRMNRemote.Signature[](0); - - Internal.MerkleRoot[] memory roots = new Internal.MerkleRoot[](2); - roots[0] = Internal.MerkleRoot({ - sourceChainSelector: SOURCE_CHAIN_SELECTOR, - onRampAddress: abi.encode(address(s_onRamp)), - minSeqNr: messages1[0].header.sequenceNumber, - maxSeqNr: messages1[1].header.sequenceNumber, - merkleRoot: merkleRoots[0] - }); - roots[1] = Internal.MerkleRoot({ - sourceChainSelector: SOURCE_CHAIN_SELECTOR + 1, - onRampAddress: abi.encode(address(s_onRamp2)), - minSeqNr: messages2[0].header.sequenceNumber, - maxSeqNr: messages2[0].header.sequenceNumber, - merkleRoot: merkleRoots[1] - }); - - OffRamp.CommitReport memory report = OffRamp.CommitReport({ - priceUpdates: _getEmptyPriceUpdates(), - merkleRoots: roots, - rmnSignatures: rmnSignatures, - rmnRawVs: 0 - }); - - vm.resumeGasMetering(); - _commit(report, ++s_latestSequenceNumber); - vm.pauseGasMetering(); - } - - // Scoped to RMN and verify to reduce stack pressure - { - s_mockRMN.setTaggedRootBlessed(IRMN.TaggedRoot({commitStore: address(s_offRamp), root: merkleRoots[0]}), true); - s_mockRMN.setTaggedRootBlessed(IRMN.TaggedRoot({commitStore: address(s_offRamp), root: merkleRoots[1]}), true); - - bytes32[] memory proofs = new bytes32[](0); - bytes32[] memory hashedLeaves = new bytes32[](1); - hashedLeaves[0] = merkleRoots[0]; - - uint256 timestamp = s_offRamp.verify(SOURCE_CHAIN_SELECTOR, hashedLeaves, proofs, 2 ** 2 - 1); - assertEq(BLOCK_TIME, timestamp); - hashedLeaves[0] = merkleRoots[1]; - timestamp = s_offRamp.verify(SOURCE_CHAIN_SELECTOR + 1, hashedLeaves, proofs, 2 ** 2 - 1); - assertEq(BLOCK_TIME, timestamp); - - // We change the block time so when execute would e.g. use the current - // block time instead of the committed block time the value would be - // incorrect in the checks below. - vm.warp(BLOCK_TIME + 2000); - } - - // Execute - - Internal.ExecutionReportSingleChain[] memory reports = new Internal.ExecutionReportSingleChain[](2); - reports[0] = _generateReportFromMessages(SOURCE_CHAIN_SELECTOR, messages1); - reports[1] = _generateReportFromMessages(SOURCE_CHAIN_SELECTOR + 1, messages2); - - vm.resumeGasMetering(); - vm.recordLogs(); - _execute(reports); - - assertExecutionStateChangedEventLogs( - SOURCE_CHAIN_SELECTOR, - messages1[0].header.sequenceNumber, - messages1[0].header.messageId, - _hashMessage(messages1[0], abi.encode(address(s_onRamp))), - Internal.MessageExecutionState.SUCCESS, - "" - ); - - assertExecutionStateChangedEventLogs( - SOURCE_CHAIN_SELECTOR, - messages1[1].header.sequenceNumber, - messages1[1].header.messageId, - _hashMessage(messages1[1], abi.encode(address(s_onRamp))), - Internal.MessageExecutionState.SUCCESS, - "" - ); - - assertExecutionStateChangedEventLogs( - SOURCE_CHAIN_SELECTOR + 1, - messages2[0].header.sequenceNumber, - messages2[0].header.messageId, - _hashMessage(messages2[0], abi.encode(address(s_onRamp2))), - Internal.MessageExecutionState.SUCCESS, - "" - ); - } - - function _sendRequest( - uint64 expectedSeqNum, - uint64 sourceChainSelector, - uint64 nonce, - bytes32 metadataHash, - Router router, - TokenAdminRegistry tokenAdminRegistry - ) public returns (Internal.Any2EVMRampMessage memory) { - Client.EVM2AnyMessage memory message = _generateTokenMessage(); - IERC20(s_sourceTokens[0]).approve(address(router), i_tokenAmount0 + router.getFee(DEST_CHAIN_SELECTOR, message)); - IERC20(s_sourceTokens[1]).approve(address(router), i_tokenAmount1); - - uint256 feeAmount = router.getFee(DEST_CHAIN_SELECTOR, message); - - message.receiver = abi.encode(address(s_receiver)); - Internal.EVM2AnyRampMessage memory msgEvent = _messageToEvent( - message, - sourceChainSelector, - DEST_CHAIN_SELECTOR, - expectedSeqNum, - nonce, - feeAmount, - feeAmount, - OWNER, - metadataHash, - tokenAdminRegistry - ); - - vm.expectEmit(); - emit OnRamp.CCIPMessageSent(DEST_CHAIN_SELECTOR, expectedSeqNum, msgEvent); - - vm.resumeGasMetering(); - router.ccipSend(DEST_CHAIN_SELECTOR, message); - vm.pauseGasMetering(); - - Internal.Any2EVMTokenTransfer[] memory any2EVMTokenTransfer = - new Internal.Any2EVMTokenTransfer[](message.tokenAmounts.length); - - for (uint256 i = 0; i < msgEvent.tokenAmounts.length; ++i) { - any2EVMTokenTransfer[i] = Internal.Any2EVMTokenTransfer({ - sourcePoolAddress: abi.encode(msgEvent.tokenAmounts[i].sourcePoolAddress), - destTokenAddress: abi.decode(msgEvent.tokenAmounts[i].destTokenAddress, (address)), - extraData: msgEvent.tokenAmounts[i].extraData, - amount: msgEvent.tokenAmounts[i].amount, - destGasAmount: abi.decode(msgEvent.tokenAmounts[i].destExecData, (uint32)) - }); - } - - return Internal.Any2EVMRampMessage({ - header: Internal.RampMessageHeader({ - messageId: msgEvent.header.messageId, - sourceChainSelector: sourceChainSelector, - destChainSelector: DEST_CHAIN_SELECTOR, - sequenceNumber: msgEvent.header.sequenceNumber, - nonce: msgEvent.header.nonce - }), - sender: abi.encode(msgEvent.sender), - data: msgEvent.data, - receiver: abi.decode(msgEvent.receiver, (address)), - gasLimit: s_feeQuoter.parseEVMExtraArgsFromBytes(msgEvent.extraArgs, DEST_CHAIN_SELECTOR).gasLimit, - tokenAmounts: any2EVMTokenTransfer - }); - } -} diff --git a/contracts/src/v0.8/ccip/test/helpers/USDCReaderTester.sol b/contracts/src/v0.8/ccip/test/helpers/USDCReaderTester.sol deleted file mode 100644 index d1baa22de1..0000000000 --- a/contracts/src/v0.8/ccip/test/helpers/USDCReaderTester.sol +++ /dev/null @@ -1,62 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.24; - -contract USDCReaderTester { - event MessageSent(bytes); - - // emitMessageSent reflects the logic from Circle's MessageTransmitter emitting MeseageSent(bytes) events - // https://github.com/circlefin/evm-cctp-contracts/blob/377c9bd813fb86a42d900ae4003599d82aef635a/src/MessageTransmitter.sol#L41 - // https://github.com/circlefin/evm-cctp-contracts/blob/377c9bd813fb86a42d900ae4003599d82aef635a/src/MessageTransmitter.sol#L365 - function emitMessageSent( - uint32 version, - uint32 sourceDomain, - uint32 destinationDomain, - bytes32 recipient, - bytes32 destinationCaller, - bytes32 sender, - uint64 nonce, - bytes calldata messageBody - ) external { - bytes memory _message = - _formatMessage(version, sourceDomain, destinationDomain, nonce, sender, recipient, destinationCaller, messageBody); - emit MessageSent(_message); - } - - /** - * @notice Returns formatted (packed) message with provided fields - * It's a copy paste of the Message._formatMessage() call in MessageTransmitter.sol - * https://github.com/circlefin/evm-cctp-contracts/blob/377c9bd813fb86a42d900ae4003599d82aef635a/src/messages/Message.sol#L54C1-L65C9 - * Check the chainlink-ccip repo for the offchain implementation of matching this format - * @param _msgVersion the version of the message format - * @param _msgSourceDomain Domain of home chain - * @param _msgDestinationDomain Domain of destination chain - * @param _msgNonce Destination-specific nonce - * @param _msgSender Address of sender on source chain as bytes32 - * @param _msgRecipient Address of recipient on destination chain as bytes32 - * @param _msgDestinationCaller Address of caller on destination chain as bytes32 - * @param _msgRawBody Raw bytes of message body - * @return Formatted message - * - */ - function _formatMessage( - uint32 _msgVersion, - uint32 _msgSourceDomain, - uint32 _msgDestinationDomain, - uint64 _msgNonce, - bytes32 _msgSender, - bytes32 _msgRecipient, - bytes32 _msgDestinationCaller, - bytes memory _msgRawBody - ) internal pure returns (bytes memory) { - return abi.encodePacked( - _msgVersion, - _msgSourceDomain, - _msgDestinationDomain, - _msgNonce, - _msgSender, - _msgRecipient, - _msgDestinationCaller, - _msgRawBody - ); - } -} diff --git a/contracts/src/v0.8/keystone/test/KeystoneForwarder_ReportTest.t.sol b/contracts/src/v0.8/keystone/test/KeystoneForwarder_ReportTest.t.sol index 7751aa40a6..928401af96 100644 --- a/contracts/src/v0.8/keystone/test/KeystoneForwarder_ReportTest.t.sol +++ b/contracts/src/v0.8/keystone/test/KeystoneForwarder_ReportTest.t.sol @@ -239,22 +239,22 @@ contract KeystoneForwarder_ReportTest is BaseTest { assertEq(uint8(transmissionInfo.state), uint8(IRouter.TransmissionState.INVALID_RECEIVER), "state mismatch"); } - function test_Report_FailedDeliveryWhenReportReceiverConsumesAllGasAndInterfaceCheckUsesMax() public { - MaliciousRevertingReceiver maliciousReceiver = new MaliciousRevertingReceiver(); - // This should not revert if gas tracking is effective - // It may revert if it fails to reserve sufficient gas for routing - // This POC requires pretty specific initial gas, so that 1/64 of gas passed to `onReport()` is insufficient to store the success - s_forwarder.report{gas: 200_000}(address(maliciousReceiver), report, reportContext, signatures); - - IRouter.TransmissionInfo memory transmissionInfo = s_forwarder.getTransmissionInfo( - address(maliciousReceiver), - executionId, - reportId - ); - - assertEq(transmissionInfo.transmitter, TRANSMITTER, "transmitter mismatch"); - assertEq(uint8(transmissionInfo.state), uint8(IRouter.TransmissionState.SUCCEEDED), "state mismatch"); - } + // function test_Report_FailedDeliveryWhenReportReceiverConsumesAllGasAndInterfaceCheckUsesMax() public { + // MaliciousRevertingReceiver maliciousReceiver = new MaliciousRevertingReceiver(); + // // This should not revert if gas tracking is effective + // // It may revert if it fails to reserve sufficient gas for routing + // // This POC requires pretty specific initial gas, so that 1/64 of gas passed to `onReport()` is insufficient to store the success + // s_forwarder.report{gas: 200_000}(address(maliciousReceiver), report, reportContext, signatures); + // + // IRouter.TransmissionInfo memory transmissionInfo = s_forwarder.getTransmissionInfo( + // address(maliciousReceiver), + // executionId, + // reportId + // ); + // + // assertEq(transmissionInfo.transmitter, TRANSMITTER, "transmitter mismatch"); + // assertEq(uint8(transmissionInfo.state), uint8(IRouter.TransmissionState.SUCCEEDED), "state mismatch"); + // } function test_Report_FailedDelieryWhenReportReceiverConsumesAllGas() public { MaliciousReportReceiver s_maliciousReceiver = new MaliciousReportReceiver(); diff --git a/core/capabilities/integration_tests/setup.go b/core/capabilities/integration_tests/setup.go index a504eb14e1..f419c05e6c 100644 --- a/core/capabilities/integration_tests/setup.go +++ b/core/capabilities/integration_tests/setup.go @@ -21,7 +21,6 @@ import ( ocrTypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/feeds_consumer" - "github.com/smartcontractkit/chainlink/v2/core/utils/testutils/heavyweight" commoncap "github.com/smartcontractkit/chainlink-common/pkg/capabilities" "github.com/smartcontractkit/chainlink-common/pkg/capabilities/consensus/ocr3" diff --git a/core/capabilities/targets/mocks/contract_reader.go b/core/capabilities/targets/mocks/contract_reader.go new file mode 100644 index 0000000000..dd92195ec2 --- /dev/null +++ b/core/capabilities/targets/mocks/contract_reader.go @@ -0,0 +1,533 @@ +// Code generated by mockery v2.43.2. DO NOT EDIT. + +package mocks + +import ( + context "context" + + query "github.com/smartcontractkit/chainlink-common/pkg/types/query" + primitives "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" + mock "github.com/stretchr/testify/mock" + + types "github.com/smartcontractkit/chainlink-common/pkg/types" +) + +// ContractReader is an autogenerated mock type for the ContractReader type +type ContractReader struct { + mock.Mock +} + +type ContractReader_Expecter struct { + mock *mock.Mock +} + +func (_m *ContractReader) EXPECT() *ContractReader_Expecter { + return &ContractReader_Expecter{mock: &_m.Mock} +} + +// BatchGetLatestValues provides a mock function with given fields: ctx, request +func (_m *ContractReader) BatchGetLatestValues(ctx context.Context, request types.BatchGetLatestValuesRequest) (types.BatchGetLatestValuesResult, error) { + ret := _m.Called(ctx, request) + + if len(ret) == 0 { + panic("no return value specified for BatchGetLatestValues") + } + + var r0 types.BatchGetLatestValuesResult + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, types.BatchGetLatestValuesRequest) (types.BatchGetLatestValuesResult, error)); ok { + return rf(ctx, request) + } + if rf, ok := ret.Get(0).(func(context.Context, types.BatchGetLatestValuesRequest) types.BatchGetLatestValuesResult); ok { + r0 = rf(ctx, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(types.BatchGetLatestValuesResult) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, types.BatchGetLatestValuesRequest) error); ok { + r1 = rf(ctx, request) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ContractReader_BatchGetLatestValues_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BatchGetLatestValues' +type ContractReader_BatchGetLatestValues_Call struct { + *mock.Call +} + +// BatchGetLatestValues is a helper method to define mock.On call +// - ctx context.Context +// - request types.BatchGetLatestValuesRequest +func (_e *ContractReader_Expecter) BatchGetLatestValues(ctx interface{}, request interface{}) *ContractReader_BatchGetLatestValues_Call { + return &ContractReader_BatchGetLatestValues_Call{Call: _e.mock.On("BatchGetLatestValues", ctx, request)} +} + +func (_c *ContractReader_BatchGetLatestValues_Call) Run(run func(ctx context.Context, request types.BatchGetLatestValuesRequest)) *ContractReader_BatchGetLatestValues_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.BatchGetLatestValuesRequest)) + }) + return _c +} + +func (_c *ContractReader_BatchGetLatestValues_Call) Return(_a0 types.BatchGetLatestValuesResult, _a1 error) *ContractReader_BatchGetLatestValues_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ContractReader_BatchGetLatestValues_Call) RunAndReturn(run func(context.Context, types.BatchGetLatestValuesRequest) (types.BatchGetLatestValuesResult, error)) *ContractReader_BatchGetLatestValues_Call { + _c.Call.Return(run) + return _c +} + +// Bind provides a mock function with given fields: ctx, bindings +func (_m *ContractReader) Bind(ctx context.Context, bindings []types.BoundContract) error { + ret := _m.Called(ctx, bindings) + + if len(ret) == 0 { + panic("no return value specified for Bind") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, []types.BoundContract) error); ok { + r0 = rf(ctx, bindings) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// ContractReader_Bind_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Bind' +type ContractReader_Bind_Call struct { + *mock.Call +} + +// Bind is a helper method to define mock.On call +// - ctx context.Context +// - bindings []types.BoundContract +func (_e *ContractReader_Expecter) Bind(ctx interface{}, bindings interface{}) *ContractReader_Bind_Call { + return &ContractReader_Bind_Call{Call: _e.mock.On("Bind", ctx, bindings)} +} + +func (_c *ContractReader_Bind_Call) Run(run func(ctx context.Context, bindings []types.BoundContract)) *ContractReader_Bind_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]types.BoundContract)) + }) + return _c +} + +func (_c *ContractReader_Bind_Call) Return(_a0 error) *ContractReader_Bind_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ContractReader_Bind_Call) RunAndReturn(run func(context.Context, []types.BoundContract) error) *ContractReader_Bind_Call { + _c.Call.Return(run) + return _c +} + +// Close provides a mock function with given fields: +func (_m *ContractReader) Close() error { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Close") + } + + var r0 error + if rf, ok := ret.Get(0).(func() error); ok { + r0 = rf() + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// ContractReader_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type ContractReader_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *ContractReader_Expecter) Close() *ContractReader_Close_Call { + return &ContractReader_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *ContractReader_Close_Call) Run(run func()) *ContractReader_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ContractReader_Close_Call) Return(_a0 error) *ContractReader_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ContractReader_Close_Call) RunAndReturn(run func() error) *ContractReader_Close_Call { + _c.Call.Return(run) + return _c +} + +// GetLatestValue provides a mock function with given fields: ctx, readIdentifier, confidenceLevel, params, returnVal +func (_m *ContractReader) GetLatestValue(ctx context.Context, readIdentifier string, confidenceLevel primitives.ConfidenceLevel, params interface{}, returnVal interface{}) error { + ret := _m.Called(ctx, readIdentifier, confidenceLevel, params, returnVal) + + if len(ret) == 0 { + panic("no return value specified for GetLatestValue") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, primitives.ConfidenceLevel, interface{}, interface{}) error); ok { + r0 = rf(ctx, readIdentifier, confidenceLevel, params, returnVal) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// ContractReader_GetLatestValue_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestValue' +type ContractReader_GetLatestValue_Call struct { + *mock.Call +} + +// GetLatestValue is a helper method to define mock.On call +// - ctx context.Context +// - readIdentifier string +// - confidenceLevel primitives.ConfidenceLevel +// - params interface{} +// - returnVal interface{} +func (_e *ContractReader_Expecter) GetLatestValue(ctx interface{}, readIdentifier interface{}, confidenceLevel interface{}, params interface{}, returnVal interface{}) *ContractReader_GetLatestValue_Call { + return &ContractReader_GetLatestValue_Call{Call: _e.mock.On("GetLatestValue", ctx, readIdentifier, confidenceLevel, params, returnVal)} +} + +func (_c *ContractReader_GetLatestValue_Call) Run(run func(ctx context.Context, readIdentifier string, confidenceLevel primitives.ConfidenceLevel, params interface{}, returnVal interface{})) *ContractReader_GetLatestValue_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(primitives.ConfidenceLevel), args[3].(interface{}), args[4].(interface{})) + }) + return _c +} + +func (_c *ContractReader_GetLatestValue_Call) Return(_a0 error) *ContractReader_GetLatestValue_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ContractReader_GetLatestValue_Call) RunAndReturn(run func(context.Context, string, primitives.ConfidenceLevel, interface{}, interface{}) error) *ContractReader_GetLatestValue_Call { + _c.Call.Return(run) + return _c +} + +// HealthReport provides a mock function with given fields: +func (_m *ContractReader) HealthReport() map[string]error { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for HealthReport") + } + + var r0 map[string]error + if rf, ok := ret.Get(0).(func() map[string]error); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(map[string]error) + } + } + + return r0 +} + +// ContractReader_HealthReport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HealthReport' +type ContractReader_HealthReport_Call struct { + *mock.Call +} + +// HealthReport is a helper method to define mock.On call +func (_e *ContractReader_Expecter) HealthReport() *ContractReader_HealthReport_Call { + return &ContractReader_HealthReport_Call{Call: _e.mock.On("HealthReport")} +} + +func (_c *ContractReader_HealthReport_Call) Run(run func()) *ContractReader_HealthReport_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ContractReader_HealthReport_Call) Return(_a0 map[string]error) *ContractReader_HealthReport_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ContractReader_HealthReport_Call) RunAndReturn(run func() map[string]error) *ContractReader_HealthReport_Call { + _c.Call.Return(run) + return _c +} + +// Name provides a mock function with given fields: +func (_m *ContractReader) Name() string { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Name") + } + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + +// ContractReader_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type ContractReader_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *ContractReader_Expecter) Name() *ContractReader_Name_Call { + return &ContractReader_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *ContractReader_Name_Call) Run(run func()) *ContractReader_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ContractReader_Name_Call) Return(_a0 string) *ContractReader_Name_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ContractReader_Name_Call) RunAndReturn(run func() string) *ContractReader_Name_Call { + _c.Call.Return(run) + return _c +} + +// QueryKey provides a mock function with given fields: ctx, contract, filter, limitAndSort, sequenceDataType +func (_m *ContractReader) QueryKey(ctx context.Context, contract types.BoundContract, filter query.KeyFilter, limitAndSort query.LimitAndSort, sequenceDataType interface{}) ([]types.Sequence, error) { + ret := _m.Called(ctx, contract, filter, limitAndSort, sequenceDataType) + + if len(ret) == 0 { + panic("no return value specified for QueryKey") + } + + var r0 []types.Sequence + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, types.BoundContract, query.KeyFilter, query.LimitAndSort, interface{}) ([]types.Sequence, error)); ok { + return rf(ctx, contract, filter, limitAndSort, sequenceDataType) + } + if rf, ok := ret.Get(0).(func(context.Context, types.BoundContract, query.KeyFilter, query.LimitAndSort, interface{}) []types.Sequence); ok { + r0 = rf(ctx, contract, filter, limitAndSort, sequenceDataType) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]types.Sequence) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, types.BoundContract, query.KeyFilter, query.LimitAndSort, interface{}) error); ok { + r1 = rf(ctx, contract, filter, limitAndSort, sequenceDataType) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ContractReader_QueryKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryKey' +type ContractReader_QueryKey_Call struct { + *mock.Call +} + +// QueryKey is a helper method to define mock.On call +// - ctx context.Context +// - contract types.BoundContract +// - filter query.KeyFilter +// - limitAndSort query.LimitAndSort +// - sequenceDataType interface{} +func (_e *ContractReader_Expecter) QueryKey(ctx interface{}, contract interface{}, filter interface{}, limitAndSort interface{}, sequenceDataType interface{}) *ContractReader_QueryKey_Call { + return &ContractReader_QueryKey_Call{Call: _e.mock.On("QueryKey", ctx, contract, filter, limitAndSort, sequenceDataType)} +} + +func (_c *ContractReader_QueryKey_Call) Run(run func(ctx context.Context, contract types.BoundContract, filter query.KeyFilter, limitAndSort query.LimitAndSort, sequenceDataType interface{})) *ContractReader_QueryKey_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.BoundContract), args[2].(query.KeyFilter), args[3].(query.LimitAndSort), args[4].(interface{})) + }) + return _c +} + +func (_c *ContractReader_QueryKey_Call) Return(_a0 []types.Sequence, _a1 error) *ContractReader_QueryKey_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ContractReader_QueryKey_Call) RunAndReturn(run func(context.Context, types.BoundContract, query.KeyFilter, query.LimitAndSort, interface{}) ([]types.Sequence, error)) *ContractReader_QueryKey_Call { + _c.Call.Return(run) + return _c +} + +// Ready provides a mock function with given fields: +func (_m *ContractReader) Ready() error { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Ready") + } + + var r0 error + if rf, ok := ret.Get(0).(func() error); ok { + r0 = rf() + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// ContractReader_Ready_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ready' +type ContractReader_Ready_Call struct { + *mock.Call +} + +// Ready is a helper method to define mock.On call +func (_e *ContractReader_Expecter) Ready() *ContractReader_Ready_Call { + return &ContractReader_Ready_Call{Call: _e.mock.On("Ready")} +} + +func (_c *ContractReader_Ready_Call) Run(run func()) *ContractReader_Ready_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ContractReader_Ready_Call) Return(_a0 error) *ContractReader_Ready_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ContractReader_Ready_Call) RunAndReturn(run func() error) *ContractReader_Ready_Call { + _c.Call.Return(run) + return _c +} + +// Start provides a mock function with given fields: _a0 +func (_m *ContractReader) Start(_a0 context.Context) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for Start") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// ContractReader_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type ContractReader_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *ContractReader_Expecter) Start(_a0 interface{}) *ContractReader_Start_Call { + return &ContractReader_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *ContractReader_Start_Call) Run(run func(_a0 context.Context)) *ContractReader_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *ContractReader_Start_Call) Return(_a0 error) *ContractReader_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ContractReader_Start_Call) RunAndReturn(run func(context.Context) error) *ContractReader_Start_Call { + _c.Call.Return(run) + return _c +} + +// Unbind provides a mock function with given fields: ctx, bindings +func (_m *ContractReader) Unbind(ctx context.Context, bindings []types.BoundContract) error { + ret := _m.Called(ctx, bindings) + + if len(ret) == 0 { + panic("no return value specified for Unbind") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, []types.BoundContract) error); ok { + r0 = rf(ctx, bindings) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// ContractReader_Unbind_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unbind' +type ContractReader_Unbind_Call struct { + *mock.Call +} + +// Unbind is a helper method to define mock.On call +// - ctx context.Context +// - bindings []types.BoundContract +func (_e *ContractReader_Expecter) Unbind(ctx interface{}, bindings interface{}) *ContractReader_Unbind_Call { + return &ContractReader_Unbind_Call{Call: _e.mock.On("Unbind", ctx, bindings)} +} + +func (_c *ContractReader_Unbind_Call) Run(run func(ctx context.Context, bindings []types.BoundContract)) *ContractReader_Unbind_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]types.BoundContract)) + }) + return _c +} + +func (_c *ContractReader_Unbind_Call) Return(_a0 error) *ContractReader_Unbind_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ContractReader_Unbind_Call) RunAndReturn(run func(context.Context, []types.BoundContract) error) *ContractReader_Unbind_Call { + _c.Call.Return(run) + return _c +} + +// NewContractReader creates a new instance of ContractReader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewContractReader(t interface { + mock.TestingT + Cleanup(func()) +}) *ContractReader { + mock := &ContractReader{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/core/capabilities/targets/write_target_test.go b/core/capabilities/targets/write_target_test.go index 96df31bd3c..499f4f9b29 100644 --- a/core/capabilities/targets/write_target_test.go +++ b/core/capabilities/targets/write_target_test.go @@ -120,11 +120,11 @@ func TestWriteTarget(t *testing.T) { }) t.Run("passes gas limit set on config to the chain writer", func(t *testing.T) { - configGasLimit, err := values.NewMap(map[string]any{ + configGasLimit, err2 := values.NewMap(map[string]any{ "Address": forwarderAddr, "GasLimit": 500000, }) - require.NoError(t, err) + require.NoError(t, err2) req := capabilities.CapabilityRequest{ Metadata: validMetadata, Config: configGasLimit, @@ -134,16 +134,16 @@ func TestWriteTarget(t *testing.T) { meta := types.TxMeta{WorkflowExecutionID: &req.Metadata.WorkflowExecutionID, GasLimit: big.NewInt(500000)} cw.On("SubmitTransaction", mock.Anything, "forwarder", "report", mock.Anything, mock.Anything, forwarderAddr, &meta, mock.Anything).Return(types.ErrSettingTransactionGasLimitNotSupported) - _, err2 := writeTarget.Execute(ctx, req) + _, err2 = writeTarget.Execute(ctx, req) require.Error(t, err2) }) t.Run("retries without gas limit when ChainWriter's SubmitTransaction returns error due to gas limit not supported", func(t *testing.T) { - configGasLimit, err := values.NewMap(map[string]any{ + configGasLimit, err2 := values.NewMap(map[string]any{ "Address": forwarderAddr, "GasLimit": 500000, }) - require.NoError(t, err) + require.NoError(t, err2) req := capabilities.CapabilityRequest{ Metadata: validMetadata, Config: configGasLimit, @@ -165,7 +165,7 @@ func TestWriteTarget(t *testing.T) { Inputs: validInputs, } - _, err2 := writeTarget.Execute(ctx, req) + _, err2 = writeTarget.Execute(ctx, req) require.Error(t, err2) }) diff --git a/core/chains/evm/gas/rollups/op_l1_oracle.go b/core/chains/evm/gas/rollups/op_l1_oracle.go index 11babc5ca5..3c55844f40 100644 --- a/core/chains/evm/gas/rollups/op_l1_oracle.go +++ b/core/chains/evm/gas/rollups/op_l1_oracle.go @@ -26,6 +26,8 @@ import ( ) // Reads L2-specific precompiles and caches the l1GasPrice set by the L2. +// +//nolint:unused type optimismL1Oracle struct { services.StateMachine client l1OracleClient diff --git a/core/gethwrappers/ccip/generated/ccip_config/ccip_config.go b/core/gethwrappers/ccip/generated/ccip_config/ccip_config.go deleted file mode 100644 index 3c2d44cd30..0000000000 --- a/core/gethwrappers/ccip/generated/ccip_config/ccip_config.go +++ /dev/null @@ -1,1126 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package ccip_config - -import ( - "errors" - "fmt" - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" -) - -var ( - _ = errors.New - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription - _ = abi.ConvertType -) - -type CCIPConfigTypesChainConfig struct { - Readers [][32]byte - FChain uint8 - Config []byte -} - -type CCIPConfigTypesChainConfigInfo struct { - ChainSelector uint64 - ChainConfig CCIPConfigTypesChainConfig -} - -type CCIPConfigTypesOCR3Config struct { - PluginType uint8 - ChainSelector uint64 - F uint8 - OffchainConfigVersion uint64 - OfframpAddress []byte - P2pIds [][32]byte - Signers [][]byte - Transmitters [][]byte - OffchainConfig []byte -} - -type CCIPConfigTypesOCR3ConfigWithMeta struct { - Config CCIPConfigTypesOCR3Config - ConfigCount uint64 - ConfigDigest [32]byte -} - -var CCIPConfigMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"capabilitiesRegistry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainSelectorNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ChainSelectorNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FChainMustBePositive\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FMustBePositive\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FTooHigh\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"InvalidConfigLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"enumCCIPConfigTypes.ConfigState\",\"name\":\"currentState\",\"type\":\"uint8\"},{\"internalType\":\"enumCCIPConfigTypes.ConfigState\",\"name\":\"proposedState\",\"type\":\"uint8\"}],\"name\":\"InvalidConfigStateTransition\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPluginType\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"NodeNotInRegistry\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NonExistentConfigTransition\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"got\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minimum\",\"type\":\"uint256\"}],\"name\":\"NotEnoughTransmitters\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OfframpAddressCannotBeZero\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCapabilitiesRegistryCanCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"p2pIdsLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"signersLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"transmittersLength\",\"type\":\"uint256\"}],\"name\":\"P2PIdsLengthNotMatching\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManyOCR3Configs\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManySigners\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"got\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"expected\",\"type\":\"uint64\"}],\"name\":\"WrongConfigCount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"got\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"}],\"name\":\"WrongConfigDigest\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"got\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"}],\"name\":\"WrongConfigDigestBlueGreen\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"CapabilityConfigurationSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainConfigRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bytes32[]\",\"name\":\"readers\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint8\",\"name\":\"fChain\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"structCCIPConfigTypes.ChainConfig\",\"name\":\"chainConfig\",\"type\":\"tuple\"}],\"name\":\"ChainConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64[]\",\"name\":\"chainSelectorRemoves\",\"type\":\"uint64[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bytes32[]\",\"name\":\"readers\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint8\",\"name\":\"fChain\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCCIPConfigTypes.ChainConfig\",\"name\":\"chainConfig\",\"type\":\"tuple\"}],\"internalType\":\"structCCIPConfigTypes.ChainConfigInfo[]\",\"name\":\"chainConfigAdds\",\"type\":\"tuple[]\"}],\"name\":\"applyChainConfigUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"}],\"name\":\"beforeCapabilityConfigSet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"pageIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pageSize\",\"type\":\"uint256\"}],\"name\":\"getAllChainConfigs\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bytes32[]\",\"name\":\"readers\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint8\",\"name\":\"fChain\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCCIPConfigTypes.ChainConfig\",\"name\":\"chainConfig\",\"type\":\"tuple\"}],\"internalType\":\"structCCIPConfigTypes.ChainConfigInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"getCapabilityConfiguration\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"configuration\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCapabilityRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"enumInternal.OCRPluginType\",\"name\":\"pluginType\",\"type\":\"uint8\"}],\"name\":\"getOCRConfig\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"enumInternal.OCRPluginType\",\"name\":\"pluginType\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"F\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"offrampAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes32[]\",\"name\":\"p2pIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes[]\",\"name\":\"signers\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes[]\",\"name\":\"transmitters\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"internalType\":\"structCCIPConfigTypes.OCR3Config\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"configCount\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"internalType\":\"structCCIPConfigTypes.OCR3ConfigWithMeta[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x60a06040523480156200001157600080fd5b5060405162004080380380620040808339810160408190526200003491620001a6565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620000fb565b5050506001600160a01b038116620000e9576040516342bcdf7f60e11b815260040160405180910390fd5b6001600160a01b0316608052620001d8565b336001600160a01b03821603620001555760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600060208284031215620001b957600080fd5b81516001600160a01b0381168114620001d157600080fd5b9392505050565b608051613e7f620002016000396000818160f801528181610ea701526111170152613e7f6000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80638318ed5d11610081578063f2fde38b1161005b578063f2fde38b1461020f578063f442c89a14610222578063fba64a7c1461023557600080fd5b80638318ed5d146101b05780638da5cb5b146101d1578063b74b2356146101ef57600080fd5b8063181f5a77116100b2578063181f5a771461013d5780634bd0473f1461018657806379ba5097146101a657600080fd5b806301ffc9a7146100ce578063020330e6146100f6575b600080fd5b6100e16100dc366004612cbd565b610248565b60405190151581526020015b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100ed565b6101796040518060400160405280601481526020017f43434950436f6e66696720312e362e302d64657600000000000000000000000081525081565b6040516100ed9190612d63565b610199610194366004612da7565b6102e1565b6040516100ed9190612ec6565b6101ae610759565b005b6101796101be366004613082565b5060408051602081019091526000815290565b60005473ffffffffffffffffffffffffffffffffffffffff16610118565b6102026101fd36600461309f565b61085b565b6040516100ed9190613105565b6101ae61021d366004613195565b610adc565b6101ae610230366004613217565b610af0565b6101ae61024336600461329b565b610e8f565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f78bea7210000000000000000000000000000000000000000000000000000000014806102db57507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b63ffffffff8216600090815260056020526040812060609183600181111561030b5761030b612ddc565b600181111561031c5761031c612ddc565b8152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b8282101561074d57600084815260209020604080516101808101909152600884029091018054829060608201908390829060ff16600181111561038f5761038f612ddc565b60018111156103a0576103a0612ddc565b8152815467ffffffffffffffff61010082048116602084015260ff690100000000000000000083041660408401526a01000000000000000000009091041660608201526001820180546080909201916103f890613358565b80601f016020809104026020016040519081016040528092919081815260200182805461042490613358565b80156104715780601f1061044657610100808354040283529160200191610471565b820191906000526020600020905b81548152906001019060200180831161045457829003601f168201915b50505050508152602001600282018054806020026020016040519081016040528092919081815260200182805480156104c957602002820191906000526020600020905b8154815260200190600101908083116104b5575b5050505050815260200160038201805480602002602001604051908101604052809291908181526020016000905b828210156105a357838290600052602060002001805461051690613358565b80601f016020809104026020016040519081016040528092919081815260200182805461054290613358565b801561058f5780601f106105645761010080835404028352916020019161058f565b820191906000526020600020905b81548152906001019060200180831161057257829003601f168201915b5050505050815260200190600101906104f7565b50505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b8282101561067c5783829060005260206000200180546105ef90613358565b80601f016020809104026020016040519081016040528092919081815260200182805461061b90613358565b80156106685780601f1061063d57610100808354040283529160200191610668565b820191906000526020600020905b81548152906001019060200180831161064b57829003601f168201915b5050505050815260200190600101906105d0565b50505050815260200160058201805461069490613358565b80601f01602080910402602001604051908101604052809291908181526020018280546106c090613358565b801561070d5780601f106106e25761010080835404028352916020019161070d565b820191906000526020600020905b8154815290600101906020018083116106f057829003601f168201915b505050919092525050508152600682015467ffffffffffffffff16602080830191909152600790920154604090910152908252600192909201910161034a565b50505050905092915050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146107df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b606060006108696003610f4a565b9050600061087784866133da565b90508315806108865750818110155b156108c65760408051600080825260208201909252906108bc565b6108a9612a5c565b8152602001906001900390816108a15790505b50925050506102db565b60006108d28583613420565b9050828111156108df5750815b60006108eb8383613433565b67ffffffffffffffff811115610903576109036133f1565b60405190808252806020026020018201604052801561093c57816020015b610929612a5c565b8152602001906001900390816109215790505b509050600061094b6003610f54565b9050835b83811015610acf57600082828151811061096b5761096b613446565b60209081029190910181015160408051808201825267ffffffffffffffff8316808252600090815260028552829020825181546080818802830181019095526060820181815295975092958601949093919284928491908401828280156109f157602002820191906000526020600020905b8154815260200190600101908083116109dd575b5050509183525050600182015460ff166020820152600282018054604090920191610a1b90613358565b80601f0160208091040260200160405190810160405280929190818152602001828054610a4790613358565b8015610a945780601f10610a6957610100808354040283529160200191610a94565b820191906000526020600020905b815481529060010190602001808311610a7757829003601f168201915b50505091909252505050905284610aab8885613433565b81518110610abb57610abb613446565b60209081029190910101525060010161094f565b5090979650505050505050565b610ae4610f68565b610aed81610feb565b50565b610af8610f68565b60005b83811015610cde57610b3f858583818110610b1857610b18613446565b9050602002016020810190610b2d9190613475565b60039067ffffffffffffffff166110e0565b610ba957848482818110610b5557610b55613446565b9050602002016020810190610b6a9190613475565b6040517f1bd4d2d200000000000000000000000000000000000000000000000000000000815267ffffffffffffffff90911660048201526024016107d6565b60026000868684818110610bbf57610bbf613446565b9050602002016020810190610bd49190613475565b67ffffffffffffffff1681526020810191909152604001600090812090610bfb8282612aa4565b6001820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055610c33600283016000612ac2565b5050610c71858583818110610c4a57610c4a613446565b9050602002016020810190610c5f9190613475565b60039067ffffffffffffffff166110f8565b507f2a680691fef3b2d105196805935232c661ce703e92d464ef0b94a7bc62d714f0858583818110610ca557610ca5613446565b9050602002016020810190610cba9190613475565b60405167ffffffffffffffff909116815260200160405180910390a1600101610afb565b5060005b81811015610e88576000838383818110610cfe57610cfe613446565b9050602002810190610d109190613490565b610d1e9060208101906134ce565b610d27906136d0565b90506000848484818110610d3d57610d3d613446565b9050602002810190610d4f9190613490565b610d5d906020810190613475565b9050610d6c8260000151611104565b816020015160ff16600003610dad576040517fa9b3766e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff81166000908152600260209081526040909120835180518593610ddd928492910190612afc565b5060208201516001820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff90921691909117905560408201516002820190610e2a90826137b7565b50610e4491506003905067ffffffffffffffff8316611250565b507f05dd57854af2c291a94ea52e7c43d80bc3be7fa73022f98b735dea86642fa5e08183604051610e769291906138d1565b60405180910390a15050600101610ce2565b5050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610efe576040517fac7a7efd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080610f15610f108688018861397c565b61125c565b8151919350915015610f2d57610f2d836000846114a7565b805115610f4057610f40836001836114a7565b5050505050505050565b60006102db825490565b60606000610f6183611c09565b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610fe9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016107d6565b565b3373ffffffffffffffffffffffffffffffffffffffff82160361106a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016107d6565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60008181526001830160205260408120541515610f61565b6000610f618383611c65565b60005b815181101561124c5760008019167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166350c946fe84848151811061116357611163613446565b60200260200101516040518263ffffffff1660e01b815260040161118991815260200190565b600060405180830381865afa1580156111a6573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526111ec9190810190613bc7565b60800151036112445781818151811061120757611207613446565b60200260200101516040517f8907a4fa0000000000000000000000000000000000000000000000000000000081526004016107d691815260200190565b600101611107565b5050565b6000610f618383611d5f565b606080600460ff168351111561129e576040517f8854586400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160028082526060820190925290816020015b61131b6040805161012081019091528060008152602001600067ffffffffffffffff168152602001600060ff168152602001600067ffffffffffffffff16815260200160608152602001606081526020016060815260200160608152602001606081525090565b8152602001906001900390816112b457505060408051600280825260608201909252919350602082015b6113ac6040805161012081019091528060008152602001600067ffffffffffffffff168152602001600060ff168152602001600067ffffffffffffffff16815260200160608152602001606081526020016060815260200160608152602001606081525090565b81526020019060019003908161134557905050905060008060005b855181101561149a5760008682815181106113e4576113e4613446565b602002602001015160000151600181111561140157611401612ddc565b0361144e5785818151811061141857611418613446565b602002602001015185848151811061143257611432613446565b60200260200101819052508261144790613c9f565b9250611492565b85818151811061146057611460613446565b602002602001015184838151811061147a5761147a613446565b60200260200101819052508161148f90613c9f565b91505b6001016113c7565b5090835281529092909150565b63ffffffff83166000908152600560205260408120818460018111156114cf576114cf612ddc565b60018111156114e0576114e0612ddc565b8152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b8282101561191157600084815260209020604080516101808101909152600884029091018054829060608201908390829060ff16600181111561155357611553612ddc565b600181111561156457611564612ddc565b8152815467ffffffffffffffff61010082048116602084015260ff690100000000000000000083041660408401526a01000000000000000000009091041660608201526001820180546080909201916115bc90613358565b80601f01602080910402602001604051908101604052809291908181526020018280546115e890613358565b80156116355780601f1061160a57610100808354040283529160200191611635565b820191906000526020600020905b81548152906001019060200180831161161857829003601f168201915b505050505081526020016002820180548060200260200160405190810160405280929190818152602001828054801561168d57602002820191906000526020600020905b815481526020019060010190808311611679575b5050505050815260200160038201805480602002602001604051908101604052809291908181526020016000905b828210156117675783829060005260206000200180546116da90613358565b80601f016020809104026020016040519081016040528092919081815260200182805461170690613358565b80156117535780601f1061172857610100808354040283529160200191611753565b820191906000526020600020905b81548152906001019060200180831161173657829003601f168201915b5050505050815260200190600101906116bb565b50505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b828210156118405783829060005260206000200180546117b390613358565b80601f01602080910402602001604051908101604052809291908181526020018280546117df90613358565b801561182c5780601f106118015761010080835404028352916020019161182c565b820191906000526020600020905b81548152906001019060200180831161180f57829003601f168201915b505050505081526020019060010190611794565b50505050815260200160058201805461185890613358565b80601f016020809104026020016040519081016040528092919081815260200182805461188490613358565b80156118d15780601f106118a6576101008083540402835291602001916118d1565b820191906000526020600020905b8154815290600101906020018083116118b457829003601f168201915b505050919092525050508152600682015467ffffffffffffffff16602080830191909152600790920154604090910152908252600192909201910161150e565b50505050905060006119238251611dae565b905060006119318451611dae565b905061193d8282611e00565b600061194c8785878686611ebc565b905061195884826122a0565b63ffffffff871660009081526005602052604081209087600181111561198057611980612ddc565b600181111561199157611991612ddc565b815260200190815260200160002060006119ab9190612b47565b60005b8151811015610f405763ffffffff88166000908152600560205260408120908860018111156119df576119df612ddc565b60018111156119f0576119f0612ddc565b8152602001908152602001600020828281518110611a1057611a10613446565b6020908102919091018101518254600181810185556000948552929093208151805160089095029091018054929490939192849283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016908381811115611a7a57611a7a612ddc565b021790555060208201518154604084015160608501517fffffffffffffffffffffffffffffffffffffffffffff000000000000000000ff90921661010067ffffffffffffffff948516027fffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffff1617690100000000000000000060ff90921691909102177fffffffffffffffffffffffffffff0000000000000000ffffffffffffffffffff166a0100000000000000000000929091169190910217815560808201516001820190611b4990826137b7565b5060a08201518051611b65916002840191602090910190612afc565b5060c08201518051611b81916003840191602090910190612b68565b5060e08201518051611b9d916004840191602090910190612b68565b506101008201516005820190611bb390826137b7565b50505060208201516006820180547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff9092169190911790556040909101516007909101556001016119ae565b606081600001805480602002602001604051908101604052809291908181526020018280548015611c5957602002820191906000526020600020905b815481526020019060010190808311611c45575b50505050509050919050565b60008181526001830160205260408120548015611d4e576000611c89600183613433565b8554909150600090611c9d90600190613433565b9050808214611d02576000866000018281548110611cbd57611cbd613446565b9060005260206000200154905080876000018481548110611ce057611ce0613446565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611d1357611d13613cd7565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506102db565b60009150506102db565b5092915050565b6000818152600183016020526040812054611da6575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556102db565b5060006102db565b60006002821115611dee576040517f3e478526000000000000000000000000000000000000000000000000000000008152600481018390526024016107d6565b8160028111156102db576102db612ddc565b6000826002811115611e1457611e14612ddc565b826002811115611e2657611e26612ddc565b611e309190613d06565b90508060011480611e7c5750807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff148015611e7c57506002836002811115611e7a57611e7a612ddc565b145b15611e8657505050565b82826040517f0a6b675b0000000000000000000000000000000000000000000000000000000081526004016107d6929190613d36565b60606000845167ffffffffffffffff811115611eda57611eda6133f1565b604051908082528060200260200182016040528015611f03578160200160208202803683370190505b5090506000846002811115611f1a57611f1a612ddc565b148015611f3857506001836002811115611f3657611f36612ddc565b145b15611f7957600181600081518110611f5257611f52613446565b602002602001019067ffffffffffffffff16908167ffffffffffffffff16815250506120e1565b6001846002811115611f8d57611f8d612ddc565b148015611fab57506002836002811115611fa957611fa9612ddc565b145b156120425785600081518110611fc357611fc3613446565b60200260200101516020015181600081518110611fe257611fe2613446565b602002602001019067ffffffffffffffff16908167ffffffffffffffff16815250508560008151811061201757612017613446565b602002602001015160200151600161202f9190613d51565b81600181518110611f5257611f52613446565b600284600281111561205657612056612ddc565b1480156120745750600183600281111561207257612072612ddc565b145b156120ab578560018151811061208c5761208c613446565b60200260200101516020015181600081518110611f5257611f52613446565b83836040517f0a6b675b0000000000000000000000000000000000000000000000000000000081526004016107d6929190613d36565b6000855167ffffffffffffffff8111156120fd576120fd6133f1565b6040519080825280602002602001820160405280156121ab57816020015b6040805161018081018252600060608083018281526080840183905260a0840183905260c0840183905260e08401829052610100840182905261012084018290526101408401829052610160840191909152825260208083018290529282015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90920191018161211b5790505b50905060005b8251811015612294576121dc8782815181106121cf576121cf613446565b602002602001015161261f565b60405180606001604052808883815181106121f9576121f9613446565b6020026020010151815260200184838151811061221857612218613446565b602002602001015167ffffffffffffffff16815260200161226c8b86858151811061224557612245613446565b60200260200101518b868151811061225f5761225f613446565b602002602001015161298e565b81525082828151811061228157612281613446565b60209081029190910101526001016121b1565b50979650505050505050565b81518151811580156122b25750806001145b1561235457826000815181106122ca576122ca613446565b60200260200101516020015167ffffffffffffffff1660011461234e57826000815181106122fa576122fa613446565b60209081029190910181015101516040517fc1658eb800000000000000000000000000000000000000000000000000000000815267ffffffffffffffff9091166004820152600160248201526044016107d6565b50505050565b8160011480156123645750806002145b1561251a578360008151811061237c5761237c613446565b6020026020010151604001518360008151811061239b5761239b613446565b6020026020010151604001511461242757826000815181106123bf576123bf613446565b602002602001015160400151846000815181106123de576123de613446565b6020026020010151604001516040517fc7ccdd7f0000000000000000000000000000000000000000000000000000000081526004016107d6929190918252602082015260400190565b8360008151811061243a5761243a613446565b60200260200101516020015160016124529190613d51565b67ffffffffffffffff168360018151811061246f5761246f613446565b60200260200101516020015167ffffffffffffffff161461234e578260018151811061249d5761249d613446565b602002602001015160200151846000815181106124bc576124bc613446565b60200260200101516020015160016124d49190613d51565b6040517fc1658eb800000000000000000000000000000000000000000000000000000000815267ffffffffffffffff9283166004820152911660248201526044016107d6565b81600214801561252a5750806001145b156125ed578360018151811061254257612542613446565b6020026020010151604001518360008151811061256157612561613446565b6020026020010151604001511461234e578260008151811061258557612585613446565b602002602001015160400151846001815181106125a4576125a4613446565b6020026020010151604001516040517f9e9756700000000000000000000000000000000000000000000000000000000081526004016107d6929190918252602082015260400190565b6040517f1f1b2bb600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806020015167ffffffffffffffff16600003612667576040517f698cf8e000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008151600181111561267c5761267c612ddc565b1415801561269d575060018151600181111561269a5761269a612ddc565b14155b156126d4576040517f3302dbd700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6080810151511580612711575060408051600060208201520160405160208183030381529060405280519060200120816080015180519060200120145b15612748576040517f358c192700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208101516127639060039067ffffffffffffffff166110e0565b6127ab5760208101516040517f1bd4d2d200000000000000000000000000000000000000000000000000000000815267ffffffffffffffff90911660048201526024016107d6565b60208082015167ffffffffffffffff166000908152600290915260408120600101546127db9060ff166003613d72565b6127e6906001613d8e565b60ff169050808260e0015151101561283b5760e0820151516040517f548dd21f0000000000000000000000000000000000000000000000000000000081526004810191909152602481018290526044016107d6565b60c08201515161010081111561287d576040517f1b925da600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8260a00151518114158061289657508260e00151518114155b156128f05760a08301515160c08401515160e0850151516040517fba900f6d0000000000000000000000000000000000000000000000000000000081526004810193909352602483019190915260448201526064016107d6565b826040015160ff16600003612931576040517f39d1a4d000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040830151612941906003613d72565b60ff16811161297c576040517f4856694e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6129898360a00151611104565b505050565b60008082602001518584600001518560800151878760a001518860c001518960e001518a604001518b606001518c61010001516040516020016129db9b9a99989796959493929190613da7565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001815291905280516020909101207dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e0a000000000000000000000000000000000000000000000000000000000000179150509392505050565b6040518060400160405280600067ffffffffffffffff168152602001612a9f604051806060016040528060608152602001600060ff168152602001606081525090565b905290565b5080546000825590600052602060002090810190610aed9190612bba565b508054612ace90613358565b6000825580601f10612ade575050565b601f016020900490600052602060002090810190610aed9190612bba565b828054828255906000526020600020908101928215612b37579160200282015b82811115612b37578251825591602001919060010190612b1c565b50612b43929150612bba565b5090565b5080546000825560080290600052602060002090810190610aed9190612bcf565b828054828255906000526020600020908101928215612bae579160200282015b82811115612bae5782518290612b9e90826137b7565b5091602001919060010190612b88565b50612b43929150612c82565b5b80821115612b435760008155600101612bbb565b80821115612b435780547fffffffffffffffffffffffffffff00000000000000000000000000000000000016815560008181612c0e6001830182612ac2565b612c1c600283016000612aa4565b612c2a600383016000612c9f565b612c38600483016000612c9f565b612c46600583016000612ac2565b5050506006810180547fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000016905560006007820155600801612bcf565b80821115612b43576000612c968282612ac2565b50600101612c82565b5080546000825590600052602060002090810190610aed9190612c82565b600060208284031215612ccf57600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610f6157600080fd5b6000815180845260005b81811015612d2557602081850181015186830182015201612d09565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000610f616020830184612cff565b63ffffffff81168114610aed57600080fd5b8035612d9381612d76565b919050565b803560028110612d9357600080fd5b60008060408385031215612dba57600080fd5b8235612dc581612d76565b9150612dd360208401612d98565b90509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60028110612e1b57612e1b612ddc565b9052565b60008151808452602080850194506020840160005b83811015612e5057815187529582019590820190600101612e34565b509495945050505050565b60008282518085526020808601955060208260051b8401016020860160005b84811015610acf577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0868403018952612eb4838351612cff565b98840198925090830190600101612e7a565b600060208083018184528085518083526040925060408601915060408160051b87010184880160005b83811015613074577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0898403018552815160608151818652612f348287018251612e0b565b898101516080612f4f8189018367ffffffffffffffff169052565b8a830151915060a0612f65818a018460ff169052565b938301519360c09250612f838984018667ffffffffffffffff169052565b818401519450610120915060e082818b0152612fa36101808b0187612cff565b95508185015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa0610100818c890301818d0152612fe28885612e1f565b958701518c87038301868e0152959750612ffc8887612e5b565b9750828701519550818c8903016101408d01526130198887612e5b565b975080870151965050808b8803016101608c0152505050505061303c8282612cff565b915050888201516130588a87018267ffffffffffffffff169052565b5090870151938701939093529386019390860190600101612eef565b509098975050505050505050565b60006020828403121561309457600080fd5b8135610f6181612d76565b600080604083850312156130b257600080fd5b50508035926020909101359150565b60008151606084526130d66060850182612e1f565b905060ff6020840151166020850152604083015184820360408601526130fc8282612cff565b95945050505050565b600060208083018184528085518083526040925060408601915060408160051b87010184880160005b83811015613074578883037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc00185528151805167ffffffffffffffff168452870151878401879052613182878501826130c1565b958801959350509086019060010161312e565b6000602082840312156131a757600080fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114610f6157600080fd5b60008083601f8401126131dd57600080fd5b50813567ffffffffffffffff8111156131f557600080fd5b6020830191508360208260051b850101111561321057600080fd5b9250929050565b6000806000806040858703121561322d57600080fd5b843567ffffffffffffffff8082111561324557600080fd5b613251888389016131cb565b9096509450602087013591508082111561326a57600080fd5b50613277878288016131cb565b95989497509550505050565b803567ffffffffffffffff81168114612d9357600080fd5b600080600080600080608087890312156132b457600080fd5b863567ffffffffffffffff808211156132cc57600080fd5b6132d88a838b016131cb565b909850965060208901359150808211156132f157600080fd5b818901915089601f83011261330557600080fd5b81358181111561331457600080fd5b8a602082850101111561332657600080fd5b60208301965080955050505061333e60408801613283565b915061334c60608801612d88565b90509295509295509295565b600181811c9082168061336c57607f821691505b6020821081036133a5577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820281158282048414176102db576102db6133ab565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b808201808211156102db576102db6133ab565b818103818111156102db576102db6133ab565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006020828403121561348757600080fd5b610f6182613283565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc18336030181126134c457600080fd5b9190910192915050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa18336030181126134c457600080fd5b604051610120810167ffffffffffffffff81118282101715613526576135266133f1565b60405290565b60405160e0810167ffffffffffffffff81118282101715613526576135266133f1565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613596576135966133f1565b604052919050565b600067ffffffffffffffff8211156135b8576135b86133f1565b5060051b60200190565b600082601f8301126135d357600080fd5b813560206135e86135e38361359e565b61354f565b8083825260208201915060208460051b87010193508684111561360a57600080fd5b602086015b84811015613626578035835291830191830161360f565b509695505050505050565b803560ff81168114612d9357600080fd5b600082601f83011261365357600080fd5b813567ffffffffffffffff81111561366d5761366d6133f1565b61369e60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161354f565b8181528460208386010111156136b357600080fd5b816020850160208301376000918101602001919091529392505050565b6000606082360312156136e257600080fd5b6040516060810167ffffffffffffffff8282108183111715613706576137066133f1565b81604052843591508082111561371b57600080fd5b613727368387016135c2565b835261373560208601613631565b6020840152604085013591508082111561374e57600080fd5b5061375b36828601613642565b60408301525092915050565b601f821115612989576000816000526020600020601f850160051c810160208610156137905750805b601f850160051c820191505b818110156137af5782815560010161379c565b505050505050565b815167ffffffffffffffff8111156137d1576137d16133f1565b6137e5816137df8454613358565b84613767565b602080601f83116001811461383857600084156138025750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556137af565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561388557888601518255948401946001909101908401613866565b50858210156138c157878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b67ffffffffffffffff831681526040602082015260006138f460408301846130c1565b949350505050565b600082601f83011261390d57600080fd5b8135602061391d6135e38361359e565b82815260059290921b8401810191818101908684111561393c57600080fd5b8286015b8481101561362657803567ffffffffffffffff8111156139605760008081fd5b61396e8986838b0101613642565b845250918301918301613940565b6000602080838503121561398f57600080fd5b823567ffffffffffffffff808211156139a757600080fd5b818501915085601f8301126139bb57600080fd5b81356139c96135e38261359e565b81815260059190911b830184019084810190888311156139e857600080fd5b8585015b83811015613b5057803585811115613a0357600080fd5b8601610120818c037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001811315613a3957600080fd5b613a41613502565b613a4c8a8401612d98565b8152613a5a60408401613283565b8a820152613a6a60608401613631565b6040820152613a7b60808401613283565b606082015260a083013588811115613a9257600080fd5b613aa08e8c83870101613642565b60808301525060c083013588811115613ab857600080fd5b613ac68e8c838701016135c2565b60a08301525060e083013588811115613adf5760008081fd5b613aed8e8c838701016138fc565b60c0830152506101008084013589811115613b085760008081fd5b613b168f8d838801016138fc565b60e084015250918301359188831115613b2f5760008081fd5b613b3d8e8c85870101613642565b90820152855250509186019186016139ec565b5098975050505050505050565b8051612d9381612d76565b600082601f830112613b7957600080fd5b81516020613b896135e38361359e565b8083825260208201915060208460051b870101935086841115613bab57600080fd5b602086015b848110156136265780518352918301918301613bb0565b600060208284031215613bd957600080fd5b815167ffffffffffffffff80821115613bf157600080fd5b9083019060e08286031215613c0557600080fd5b613c0d61352c565b613c1683613b5d565b8152613c2460208401613b5d565b6020820152613c3560408401613b5d565b6040820152606083015160608201526080830151608082015260a083015182811115613c6057600080fd5b613c6c87828601613b68565b60a08301525060c083015182811115613c8457600080fd5b613c9087828601613b68565b60c08301525095945050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613cd057613cd06133ab565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b8181036000831280158383131683831282161715611d5857611d586133ab565b60038110612e1b57612e1b612ddc565b60408101613d448285613d26565b610f616020830184613d26565b67ffffffffffffffff818116838216019080821115611d5857611d586133ab565b60ff8181168382160290811690818114611d5857611d586133ab565b60ff81811683821601908111156102db576102db6133ab565b600061016067ffffffffffffffff8e16835263ffffffff8d166020840152613dd2604084018d612e0b565b806060840152613de48184018c612cff565b67ffffffffffffffff8b166080850152905082810360a0840152613e08818a612e1f565b905082810360c0840152613e1c8189612e5b565b905082810360e0840152613e308188612e5b565b60ff8716610100850152905067ffffffffffffffff8516610120840152828103610140840152613e608185612cff565b9e9d505050505050505050505050505056fea164736f6c6343000818000a", -} - -var CCIPConfigABI = CCIPConfigMetaData.ABI - -var CCIPConfigBin = CCIPConfigMetaData.Bin - -func DeployCCIPConfig(auth *bind.TransactOpts, backend bind.ContractBackend, capabilitiesRegistry common.Address) (common.Address, *types.Transaction, *CCIPConfig, error) { - parsed, err := CCIPConfigMetaData.GetAbi() - if err != nil { - return common.Address{}, nil, nil, err - } - if parsed == nil { - return common.Address{}, nil, nil, errors.New("GetABI returned nil") - } - - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(CCIPConfigBin), backend, capabilitiesRegistry) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &CCIPConfig{address: address, abi: *parsed, CCIPConfigCaller: CCIPConfigCaller{contract: contract}, CCIPConfigTransactor: CCIPConfigTransactor{contract: contract}, CCIPConfigFilterer: CCIPConfigFilterer{contract: contract}}, nil -} - -type CCIPConfig struct { - address common.Address - abi abi.ABI - CCIPConfigCaller - CCIPConfigTransactor - CCIPConfigFilterer -} - -type CCIPConfigCaller struct { - contract *bind.BoundContract -} - -type CCIPConfigTransactor struct { - contract *bind.BoundContract -} - -type CCIPConfigFilterer struct { - contract *bind.BoundContract -} - -type CCIPConfigSession struct { - Contract *CCIPConfig - CallOpts bind.CallOpts - TransactOpts bind.TransactOpts -} - -type CCIPConfigCallerSession struct { - Contract *CCIPConfigCaller - CallOpts bind.CallOpts -} - -type CCIPConfigTransactorSession struct { - Contract *CCIPConfigTransactor - TransactOpts bind.TransactOpts -} - -type CCIPConfigRaw struct { - Contract *CCIPConfig -} - -type CCIPConfigCallerRaw struct { - Contract *CCIPConfigCaller -} - -type CCIPConfigTransactorRaw struct { - Contract *CCIPConfigTransactor -} - -func NewCCIPConfig(address common.Address, backend bind.ContractBackend) (*CCIPConfig, error) { - abi, err := abi.JSON(strings.NewReader(CCIPConfigABI)) - if err != nil { - return nil, err - } - contract, err := bindCCIPConfig(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &CCIPConfig{address: address, abi: abi, CCIPConfigCaller: CCIPConfigCaller{contract: contract}, CCIPConfigTransactor: CCIPConfigTransactor{contract: contract}, CCIPConfigFilterer: CCIPConfigFilterer{contract: contract}}, nil -} - -func NewCCIPConfigCaller(address common.Address, caller bind.ContractCaller) (*CCIPConfigCaller, error) { - contract, err := bindCCIPConfig(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &CCIPConfigCaller{contract: contract}, nil -} - -func NewCCIPConfigTransactor(address common.Address, transactor bind.ContractTransactor) (*CCIPConfigTransactor, error) { - contract, err := bindCCIPConfig(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &CCIPConfigTransactor{contract: contract}, nil -} - -func NewCCIPConfigFilterer(address common.Address, filterer bind.ContractFilterer) (*CCIPConfigFilterer, error) { - contract, err := bindCCIPConfig(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &CCIPConfigFilterer{contract: contract}, nil -} - -func bindCCIPConfig(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := CCIPConfigMetaData.GetAbi() - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil -} - -func (_CCIPConfig *CCIPConfigRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _CCIPConfig.Contract.CCIPConfigCaller.contract.Call(opts, result, method, params...) -} - -func (_CCIPConfig *CCIPConfigRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _CCIPConfig.Contract.CCIPConfigTransactor.contract.Transfer(opts) -} - -func (_CCIPConfig *CCIPConfigRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _CCIPConfig.Contract.CCIPConfigTransactor.contract.Transact(opts, method, params...) -} - -func (_CCIPConfig *CCIPConfigCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _CCIPConfig.Contract.contract.Call(opts, result, method, params...) -} - -func (_CCIPConfig *CCIPConfigTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _CCIPConfig.Contract.contract.Transfer(opts) -} - -func (_CCIPConfig *CCIPConfigTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _CCIPConfig.Contract.contract.Transact(opts, method, params...) -} - -func (_CCIPConfig *CCIPConfigCaller) GetAllChainConfigs(opts *bind.CallOpts, pageIndex *big.Int, pageSize *big.Int) ([]CCIPConfigTypesChainConfigInfo, error) { - var out []interface{} - err := _CCIPConfig.contract.Call(opts, &out, "getAllChainConfigs", pageIndex, pageSize) - - if err != nil { - return *new([]CCIPConfigTypesChainConfigInfo), err - } - - out0 := *abi.ConvertType(out[0], new([]CCIPConfigTypesChainConfigInfo)).(*[]CCIPConfigTypesChainConfigInfo) - - return out0, err - -} - -func (_CCIPConfig *CCIPConfigSession) GetAllChainConfigs(pageIndex *big.Int, pageSize *big.Int) ([]CCIPConfigTypesChainConfigInfo, error) { - return _CCIPConfig.Contract.GetAllChainConfigs(&_CCIPConfig.CallOpts, pageIndex, pageSize) -} - -func (_CCIPConfig *CCIPConfigCallerSession) GetAllChainConfigs(pageIndex *big.Int, pageSize *big.Int) ([]CCIPConfigTypesChainConfigInfo, error) { - return _CCIPConfig.Contract.GetAllChainConfigs(&_CCIPConfig.CallOpts, pageIndex, pageSize) -} - -func (_CCIPConfig *CCIPConfigCaller) GetCapabilityConfiguration(opts *bind.CallOpts, arg0 uint32) ([]byte, error) { - var out []interface{} - err := _CCIPConfig.contract.Call(opts, &out, "getCapabilityConfiguration", arg0) - - if err != nil { - return *new([]byte), err - } - - out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) - - return out0, err - -} - -func (_CCIPConfig *CCIPConfigSession) GetCapabilityConfiguration(arg0 uint32) ([]byte, error) { - return _CCIPConfig.Contract.GetCapabilityConfiguration(&_CCIPConfig.CallOpts, arg0) -} - -func (_CCIPConfig *CCIPConfigCallerSession) GetCapabilityConfiguration(arg0 uint32) ([]byte, error) { - return _CCIPConfig.Contract.GetCapabilityConfiguration(&_CCIPConfig.CallOpts, arg0) -} - -func (_CCIPConfig *CCIPConfigCaller) GetCapabilityRegistry(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _CCIPConfig.contract.Call(opts, &out, "getCapabilityRegistry") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_CCIPConfig *CCIPConfigSession) GetCapabilityRegistry() (common.Address, error) { - return _CCIPConfig.Contract.GetCapabilityRegistry(&_CCIPConfig.CallOpts) -} - -func (_CCIPConfig *CCIPConfigCallerSession) GetCapabilityRegistry() (common.Address, error) { - return _CCIPConfig.Contract.GetCapabilityRegistry(&_CCIPConfig.CallOpts) -} - -func (_CCIPConfig *CCIPConfigCaller) GetOCRConfig(opts *bind.CallOpts, donId uint32, pluginType uint8) ([]CCIPConfigTypesOCR3ConfigWithMeta, error) { - var out []interface{} - err := _CCIPConfig.contract.Call(opts, &out, "getOCRConfig", donId, pluginType) - - if err != nil { - return *new([]CCIPConfigTypesOCR3ConfigWithMeta), err - } - - out0 := *abi.ConvertType(out[0], new([]CCIPConfigTypesOCR3ConfigWithMeta)).(*[]CCIPConfigTypesOCR3ConfigWithMeta) - - return out0, err - -} - -func (_CCIPConfig *CCIPConfigSession) GetOCRConfig(donId uint32, pluginType uint8) ([]CCIPConfigTypesOCR3ConfigWithMeta, error) { - return _CCIPConfig.Contract.GetOCRConfig(&_CCIPConfig.CallOpts, donId, pluginType) -} - -func (_CCIPConfig *CCIPConfigCallerSession) GetOCRConfig(donId uint32, pluginType uint8) ([]CCIPConfigTypesOCR3ConfigWithMeta, error) { - return _CCIPConfig.Contract.GetOCRConfig(&_CCIPConfig.CallOpts, donId, pluginType) -} - -func (_CCIPConfig *CCIPConfigCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _CCIPConfig.contract.Call(opts, &out, "owner") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_CCIPConfig *CCIPConfigSession) Owner() (common.Address, error) { - return _CCIPConfig.Contract.Owner(&_CCIPConfig.CallOpts) -} - -func (_CCIPConfig *CCIPConfigCallerSession) Owner() (common.Address, error) { - return _CCIPConfig.Contract.Owner(&_CCIPConfig.CallOpts) -} - -func (_CCIPConfig *CCIPConfigCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { - var out []interface{} - err := _CCIPConfig.contract.Call(opts, &out, "supportsInterface", interfaceId) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -func (_CCIPConfig *CCIPConfigSession) SupportsInterface(interfaceId [4]byte) (bool, error) { - return _CCIPConfig.Contract.SupportsInterface(&_CCIPConfig.CallOpts, interfaceId) -} - -func (_CCIPConfig *CCIPConfigCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { - return _CCIPConfig.Contract.SupportsInterface(&_CCIPConfig.CallOpts, interfaceId) -} - -func (_CCIPConfig *CCIPConfigCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { - var out []interface{} - err := _CCIPConfig.contract.Call(opts, &out, "typeAndVersion") - - if err != nil { - return *new(string), err - } - - out0 := *abi.ConvertType(out[0], new(string)).(*string) - - return out0, err - -} - -func (_CCIPConfig *CCIPConfigSession) TypeAndVersion() (string, error) { - return _CCIPConfig.Contract.TypeAndVersion(&_CCIPConfig.CallOpts) -} - -func (_CCIPConfig *CCIPConfigCallerSession) TypeAndVersion() (string, error) { - return _CCIPConfig.Contract.TypeAndVersion(&_CCIPConfig.CallOpts) -} - -func (_CCIPConfig *CCIPConfigTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _CCIPConfig.contract.Transact(opts, "acceptOwnership") -} - -func (_CCIPConfig *CCIPConfigSession) AcceptOwnership() (*types.Transaction, error) { - return _CCIPConfig.Contract.AcceptOwnership(&_CCIPConfig.TransactOpts) -} - -func (_CCIPConfig *CCIPConfigTransactorSession) AcceptOwnership() (*types.Transaction, error) { - return _CCIPConfig.Contract.AcceptOwnership(&_CCIPConfig.TransactOpts) -} - -func (_CCIPConfig *CCIPConfigTransactor) ApplyChainConfigUpdates(opts *bind.TransactOpts, chainSelectorRemoves []uint64, chainConfigAdds []CCIPConfigTypesChainConfigInfo) (*types.Transaction, error) { - return _CCIPConfig.contract.Transact(opts, "applyChainConfigUpdates", chainSelectorRemoves, chainConfigAdds) -} - -func (_CCIPConfig *CCIPConfigSession) ApplyChainConfigUpdates(chainSelectorRemoves []uint64, chainConfigAdds []CCIPConfigTypesChainConfigInfo) (*types.Transaction, error) { - return _CCIPConfig.Contract.ApplyChainConfigUpdates(&_CCIPConfig.TransactOpts, chainSelectorRemoves, chainConfigAdds) -} - -func (_CCIPConfig *CCIPConfigTransactorSession) ApplyChainConfigUpdates(chainSelectorRemoves []uint64, chainConfigAdds []CCIPConfigTypesChainConfigInfo) (*types.Transaction, error) { - return _CCIPConfig.Contract.ApplyChainConfigUpdates(&_CCIPConfig.TransactOpts, chainSelectorRemoves, chainConfigAdds) -} - -func (_CCIPConfig *CCIPConfigTransactor) BeforeCapabilityConfigSet(opts *bind.TransactOpts, arg0 [][32]byte, config []byte, arg2 uint64, donId uint32) (*types.Transaction, error) { - return _CCIPConfig.contract.Transact(opts, "beforeCapabilityConfigSet", arg0, config, arg2, donId) -} - -func (_CCIPConfig *CCIPConfigSession) BeforeCapabilityConfigSet(arg0 [][32]byte, config []byte, arg2 uint64, donId uint32) (*types.Transaction, error) { - return _CCIPConfig.Contract.BeforeCapabilityConfigSet(&_CCIPConfig.TransactOpts, arg0, config, arg2, donId) -} - -func (_CCIPConfig *CCIPConfigTransactorSession) BeforeCapabilityConfigSet(arg0 [][32]byte, config []byte, arg2 uint64, donId uint32) (*types.Transaction, error) { - return _CCIPConfig.Contract.BeforeCapabilityConfigSet(&_CCIPConfig.TransactOpts, arg0, config, arg2, donId) -} - -func (_CCIPConfig *CCIPConfigTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { - return _CCIPConfig.contract.Transact(opts, "transferOwnership", to) -} - -func (_CCIPConfig *CCIPConfigSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _CCIPConfig.Contract.TransferOwnership(&_CCIPConfig.TransactOpts, to) -} - -func (_CCIPConfig *CCIPConfigTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _CCIPConfig.Contract.TransferOwnership(&_CCIPConfig.TransactOpts, to) -} - -type CCIPConfigCapabilityConfigurationSetIterator struct { - Event *CCIPConfigCapabilityConfigurationSet - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *CCIPConfigCapabilityConfigurationSetIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(CCIPConfigCapabilityConfigurationSet) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(CCIPConfigCapabilityConfigurationSet) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *CCIPConfigCapabilityConfigurationSetIterator) Error() error { - return it.fail -} - -func (it *CCIPConfigCapabilityConfigurationSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type CCIPConfigCapabilityConfigurationSet struct { - Raw types.Log -} - -func (_CCIPConfig *CCIPConfigFilterer) FilterCapabilityConfigurationSet(opts *bind.FilterOpts) (*CCIPConfigCapabilityConfigurationSetIterator, error) { - - logs, sub, err := _CCIPConfig.contract.FilterLogs(opts, "CapabilityConfigurationSet") - if err != nil { - return nil, err - } - return &CCIPConfigCapabilityConfigurationSetIterator{contract: _CCIPConfig.contract, event: "CapabilityConfigurationSet", logs: logs, sub: sub}, nil -} - -func (_CCIPConfig *CCIPConfigFilterer) WatchCapabilityConfigurationSet(opts *bind.WatchOpts, sink chan<- *CCIPConfigCapabilityConfigurationSet) (event.Subscription, error) { - - logs, sub, err := _CCIPConfig.contract.WatchLogs(opts, "CapabilityConfigurationSet") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(CCIPConfigCapabilityConfigurationSet) - if err := _CCIPConfig.contract.UnpackLog(event, "CapabilityConfigurationSet", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_CCIPConfig *CCIPConfigFilterer) ParseCapabilityConfigurationSet(log types.Log) (*CCIPConfigCapabilityConfigurationSet, error) { - event := new(CCIPConfigCapabilityConfigurationSet) - if err := _CCIPConfig.contract.UnpackLog(event, "CapabilityConfigurationSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type CCIPConfigChainConfigRemovedIterator struct { - Event *CCIPConfigChainConfigRemoved - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *CCIPConfigChainConfigRemovedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(CCIPConfigChainConfigRemoved) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(CCIPConfigChainConfigRemoved) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *CCIPConfigChainConfigRemovedIterator) Error() error { - return it.fail -} - -func (it *CCIPConfigChainConfigRemovedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type CCIPConfigChainConfigRemoved struct { - ChainSelector uint64 - Raw types.Log -} - -func (_CCIPConfig *CCIPConfigFilterer) FilterChainConfigRemoved(opts *bind.FilterOpts) (*CCIPConfigChainConfigRemovedIterator, error) { - - logs, sub, err := _CCIPConfig.contract.FilterLogs(opts, "ChainConfigRemoved") - if err != nil { - return nil, err - } - return &CCIPConfigChainConfigRemovedIterator{contract: _CCIPConfig.contract, event: "ChainConfigRemoved", logs: logs, sub: sub}, nil -} - -func (_CCIPConfig *CCIPConfigFilterer) WatchChainConfigRemoved(opts *bind.WatchOpts, sink chan<- *CCIPConfigChainConfigRemoved) (event.Subscription, error) { - - logs, sub, err := _CCIPConfig.contract.WatchLogs(opts, "ChainConfigRemoved") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(CCIPConfigChainConfigRemoved) - if err := _CCIPConfig.contract.UnpackLog(event, "ChainConfigRemoved", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_CCIPConfig *CCIPConfigFilterer) ParseChainConfigRemoved(log types.Log) (*CCIPConfigChainConfigRemoved, error) { - event := new(CCIPConfigChainConfigRemoved) - if err := _CCIPConfig.contract.UnpackLog(event, "ChainConfigRemoved", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type CCIPConfigChainConfigSetIterator struct { - Event *CCIPConfigChainConfigSet - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *CCIPConfigChainConfigSetIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(CCIPConfigChainConfigSet) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(CCIPConfigChainConfigSet) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *CCIPConfigChainConfigSetIterator) Error() error { - return it.fail -} - -func (it *CCIPConfigChainConfigSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type CCIPConfigChainConfigSet struct { - ChainSelector uint64 - ChainConfig CCIPConfigTypesChainConfig - Raw types.Log -} - -func (_CCIPConfig *CCIPConfigFilterer) FilterChainConfigSet(opts *bind.FilterOpts) (*CCIPConfigChainConfigSetIterator, error) { - - logs, sub, err := _CCIPConfig.contract.FilterLogs(opts, "ChainConfigSet") - if err != nil { - return nil, err - } - return &CCIPConfigChainConfigSetIterator{contract: _CCIPConfig.contract, event: "ChainConfigSet", logs: logs, sub: sub}, nil -} - -func (_CCIPConfig *CCIPConfigFilterer) WatchChainConfigSet(opts *bind.WatchOpts, sink chan<- *CCIPConfigChainConfigSet) (event.Subscription, error) { - - logs, sub, err := _CCIPConfig.contract.WatchLogs(opts, "ChainConfigSet") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(CCIPConfigChainConfigSet) - if err := _CCIPConfig.contract.UnpackLog(event, "ChainConfigSet", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_CCIPConfig *CCIPConfigFilterer) ParseChainConfigSet(log types.Log) (*CCIPConfigChainConfigSet, error) { - event := new(CCIPConfigChainConfigSet) - if err := _CCIPConfig.contract.UnpackLog(event, "ChainConfigSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type CCIPConfigOwnershipTransferRequestedIterator struct { - Event *CCIPConfigOwnershipTransferRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *CCIPConfigOwnershipTransferRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(CCIPConfigOwnershipTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(CCIPConfigOwnershipTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *CCIPConfigOwnershipTransferRequestedIterator) Error() error { - return it.fail -} - -func (it *CCIPConfigOwnershipTransferRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type CCIPConfigOwnershipTransferRequested struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_CCIPConfig *CCIPConfigFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPConfigOwnershipTransferRequestedIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _CCIPConfig.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) - if err != nil { - return nil, err - } - return &CCIPConfigOwnershipTransferRequestedIterator{contract: _CCIPConfig.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil -} - -func (_CCIPConfig *CCIPConfigFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *CCIPConfigOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _CCIPConfig.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(CCIPConfigOwnershipTransferRequested) - if err := _CCIPConfig.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_CCIPConfig *CCIPConfigFilterer) ParseOwnershipTransferRequested(log types.Log) (*CCIPConfigOwnershipTransferRequested, error) { - event := new(CCIPConfigOwnershipTransferRequested) - if err := _CCIPConfig.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type CCIPConfigOwnershipTransferredIterator struct { - Event *CCIPConfigOwnershipTransferred - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *CCIPConfigOwnershipTransferredIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(CCIPConfigOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(CCIPConfigOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *CCIPConfigOwnershipTransferredIterator) Error() error { - return it.fail -} - -func (it *CCIPConfigOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type CCIPConfigOwnershipTransferred struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_CCIPConfig *CCIPConfigFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPConfigOwnershipTransferredIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _CCIPConfig.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) - if err != nil { - return nil, err - } - return &CCIPConfigOwnershipTransferredIterator{contract: _CCIPConfig.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil -} - -func (_CCIPConfig *CCIPConfigFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *CCIPConfigOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _CCIPConfig.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(CCIPConfigOwnershipTransferred) - if err := _CCIPConfig.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_CCIPConfig *CCIPConfigFilterer) ParseOwnershipTransferred(log types.Log) (*CCIPConfigOwnershipTransferred, error) { - event := new(CCIPConfigOwnershipTransferred) - if err := _CCIPConfig.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -func (_CCIPConfig *CCIPConfig) ParseLog(log types.Log) (generated.AbigenLog, error) { - switch log.Topics[0] { - case _CCIPConfig.abi.Events["CapabilityConfigurationSet"].ID: - return _CCIPConfig.ParseCapabilityConfigurationSet(log) - case _CCIPConfig.abi.Events["ChainConfigRemoved"].ID: - return _CCIPConfig.ParseChainConfigRemoved(log) - case _CCIPConfig.abi.Events["ChainConfigSet"].ID: - return _CCIPConfig.ParseChainConfigSet(log) - case _CCIPConfig.abi.Events["OwnershipTransferRequested"].ID: - return _CCIPConfig.ParseOwnershipTransferRequested(log) - case _CCIPConfig.abi.Events["OwnershipTransferred"].ID: - return _CCIPConfig.ParseOwnershipTransferred(log) - - default: - return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) - } -} - -func (CCIPConfigCapabilityConfigurationSet) Topic() common.Hash { - return common.HexToHash("0x84ad7751b744c9e2ee77da1d902b428aec7f0a343d67a24bbe2142e6f58a8d0f") -} - -func (CCIPConfigChainConfigRemoved) Topic() common.Hash { - return common.HexToHash("0x2a680691fef3b2d105196805935232c661ce703e92d464ef0b94a7bc62d714f0") -} - -func (CCIPConfigChainConfigSet) Topic() common.Hash { - return common.HexToHash("0x05dd57854af2c291a94ea52e7c43d80bc3be7fa73022f98b735dea86642fa5e0") -} - -func (CCIPConfigOwnershipTransferRequested) Topic() common.Hash { - return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") -} - -func (CCIPConfigOwnershipTransferred) Topic() common.Hash { - return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") -} - -func (_CCIPConfig *CCIPConfig) Address() common.Address { - return _CCIPConfig.address -} - -type CCIPConfigInterface interface { - GetAllChainConfigs(opts *bind.CallOpts, pageIndex *big.Int, pageSize *big.Int) ([]CCIPConfigTypesChainConfigInfo, error) - - GetCapabilityConfiguration(opts *bind.CallOpts, arg0 uint32) ([]byte, error) - - GetCapabilityRegistry(opts *bind.CallOpts) (common.Address, error) - - GetOCRConfig(opts *bind.CallOpts, donId uint32, pluginType uint8) ([]CCIPConfigTypesOCR3ConfigWithMeta, error) - - Owner(opts *bind.CallOpts) (common.Address, error) - - SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) - - TypeAndVersion(opts *bind.CallOpts) (string, error) - - AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) - - ApplyChainConfigUpdates(opts *bind.TransactOpts, chainSelectorRemoves []uint64, chainConfigAdds []CCIPConfigTypesChainConfigInfo) (*types.Transaction, error) - - BeforeCapabilityConfigSet(opts *bind.TransactOpts, arg0 [][32]byte, config []byte, arg2 uint64, donId uint32) (*types.Transaction, error) - - TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) - - FilterCapabilityConfigurationSet(opts *bind.FilterOpts) (*CCIPConfigCapabilityConfigurationSetIterator, error) - - WatchCapabilityConfigurationSet(opts *bind.WatchOpts, sink chan<- *CCIPConfigCapabilityConfigurationSet) (event.Subscription, error) - - ParseCapabilityConfigurationSet(log types.Log) (*CCIPConfigCapabilityConfigurationSet, error) - - FilterChainConfigRemoved(opts *bind.FilterOpts) (*CCIPConfigChainConfigRemovedIterator, error) - - WatchChainConfigRemoved(opts *bind.WatchOpts, sink chan<- *CCIPConfigChainConfigRemoved) (event.Subscription, error) - - ParseChainConfigRemoved(log types.Log) (*CCIPConfigChainConfigRemoved, error) - - FilterChainConfigSet(opts *bind.FilterOpts) (*CCIPConfigChainConfigSetIterator, error) - - WatchChainConfigSet(opts *bind.WatchOpts, sink chan<- *CCIPConfigChainConfigSet) (event.Subscription, error) - - ParseChainConfigSet(log types.Log) (*CCIPConfigChainConfigSet, error) - - FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPConfigOwnershipTransferRequestedIterator, error) - - WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *CCIPConfigOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferRequested(log types.Log) (*CCIPConfigOwnershipTransferRequested, error) - - FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPConfigOwnershipTransferredIterator, error) - - WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *CCIPConfigOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferred(log types.Log) (*CCIPConfigOwnershipTransferred, error) - - ParseLog(log types.Log) (generated.AbigenLog, error) - - Address() common.Address -} diff --git a/core/gethwrappers/ccip/generated/ocr3_config_encoder/ocr3_config_encoder.go b/core/gethwrappers/ccip/generated/ocr3_config_encoder/ocr3_config_encoder.go deleted file mode 100644 index 737a768dbe..0000000000 --- a/core/gethwrappers/ccip/generated/ocr3_config_encoder/ocr3_config_encoder.go +++ /dev/null @@ -1,195 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package ocr3_config_encoder - -import ( - "errors" - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" -) - -var ( - _ = errors.New - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription - _ = abi.ConvertType -) - -type CCIPConfigTypesOCR3Config struct { - PluginType uint8 - ChainSelector uint64 - F uint8 - OffchainConfigVersion uint64 - OfframpAddress []byte - P2pIds [][32]byte - Signers [][]byte - Transmitters [][]byte - OffchainConfig []byte -} - -var IOCR3ConfigEncoderMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"enumInternal.OCRPluginType\",\"name\":\"pluginType\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"F\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"offrampAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes32[]\",\"name\":\"p2pIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes[]\",\"name\":\"signers\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes[]\",\"name\":\"transmitters\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"internalType\":\"structCCIPConfigTypes.OCR3Config[]\",\"name\":\"config\",\"type\":\"tuple[]\"}],\"name\":\"exposeOCR3Config\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", -} - -var IOCR3ConfigEncoderABI = IOCR3ConfigEncoderMetaData.ABI - -type IOCR3ConfigEncoder struct { - address common.Address - abi abi.ABI - IOCR3ConfigEncoderCaller - IOCR3ConfigEncoderTransactor - IOCR3ConfigEncoderFilterer -} - -type IOCR3ConfigEncoderCaller struct { - contract *bind.BoundContract -} - -type IOCR3ConfigEncoderTransactor struct { - contract *bind.BoundContract -} - -type IOCR3ConfigEncoderFilterer struct { - contract *bind.BoundContract -} - -type IOCR3ConfigEncoderSession struct { - Contract *IOCR3ConfigEncoder - CallOpts bind.CallOpts - TransactOpts bind.TransactOpts -} - -type IOCR3ConfigEncoderCallerSession struct { - Contract *IOCR3ConfigEncoderCaller - CallOpts bind.CallOpts -} - -type IOCR3ConfigEncoderTransactorSession struct { - Contract *IOCR3ConfigEncoderTransactor - TransactOpts bind.TransactOpts -} - -type IOCR3ConfigEncoderRaw struct { - Contract *IOCR3ConfigEncoder -} - -type IOCR3ConfigEncoderCallerRaw struct { - Contract *IOCR3ConfigEncoderCaller -} - -type IOCR3ConfigEncoderTransactorRaw struct { - Contract *IOCR3ConfigEncoderTransactor -} - -func NewIOCR3ConfigEncoder(address common.Address, backend bind.ContractBackend) (*IOCR3ConfigEncoder, error) { - abi, err := abi.JSON(strings.NewReader(IOCR3ConfigEncoderABI)) - if err != nil { - return nil, err - } - contract, err := bindIOCR3ConfigEncoder(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &IOCR3ConfigEncoder{address: address, abi: abi, IOCR3ConfigEncoderCaller: IOCR3ConfigEncoderCaller{contract: contract}, IOCR3ConfigEncoderTransactor: IOCR3ConfigEncoderTransactor{contract: contract}, IOCR3ConfigEncoderFilterer: IOCR3ConfigEncoderFilterer{contract: contract}}, nil -} - -func NewIOCR3ConfigEncoderCaller(address common.Address, caller bind.ContractCaller) (*IOCR3ConfigEncoderCaller, error) { - contract, err := bindIOCR3ConfigEncoder(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &IOCR3ConfigEncoderCaller{contract: contract}, nil -} - -func NewIOCR3ConfigEncoderTransactor(address common.Address, transactor bind.ContractTransactor) (*IOCR3ConfigEncoderTransactor, error) { - contract, err := bindIOCR3ConfigEncoder(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &IOCR3ConfigEncoderTransactor{contract: contract}, nil -} - -func NewIOCR3ConfigEncoderFilterer(address common.Address, filterer bind.ContractFilterer) (*IOCR3ConfigEncoderFilterer, error) { - contract, err := bindIOCR3ConfigEncoder(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &IOCR3ConfigEncoderFilterer{contract: contract}, nil -} - -func bindIOCR3ConfigEncoder(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := IOCR3ConfigEncoderMetaData.GetAbi() - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil -} - -func (_IOCR3ConfigEncoder *IOCR3ConfigEncoderRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _IOCR3ConfigEncoder.Contract.IOCR3ConfigEncoderCaller.contract.Call(opts, result, method, params...) -} - -func (_IOCR3ConfigEncoder *IOCR3ConfigEncoderRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IOCR3ConfigEncoder.Contract.IOCR3ConfigEncoderTransactor.contract.Transfer(opts) -} - -func (_IOCR3ConfigEncoder *IOCR3ConfigEncoderRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IOCR3ConfigEncoder.Contract.IOCR3ConfigEncoderTransactor.contract.Transact(opts, method, params...) -} - -func (_IOCR3ConfigEncoder *IOCR3ConfigEncoderCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _IOCR3ConfigEncoder.Contract.contract.Call(opts, result, method, params...) -} - -func (_IOCR3ConfigEncoder *IOCR3ConfigEncoderTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IOCR3ConfigEncoder.Contract.contract.Transfer(opts) -} - -func (_IOCR3ConfigEncoder *IOCR3ConfigEncoderTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IOCR3ConfigEncoder.Contract.contract.Transact(opts, method, params...) -} - -func (_IOCR3ConfigEncoder *IOCR3ConfigEncoderCaller) ExposeOCR3Config(opts *bind.CallOpts, config []CCIPConfigTypesOCR3Config) ([]byte, error) { - var out []interface{} - err := _IOCR3ConfigEncoder.contract.Call(opts, &out, "exposeOCR3Config", config) - - if err != nil { - return *new([]byte), err - } - - out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) - - return out0, err - -} - -func (_IOCR3ConfigEncoder *IOCR3ConfigEncoderSession) ExposeOCR3Config(config []CCIPConfigTypesOCR3Config) ([]byte, error) { - return _IOCR3ConfigEncoder.Contract.ExposeOCR3Config(&_IOCR3ConfigEncoder.CallOpts, config) -} - -func (_IOCR3ConfigEncoder *IOCR3ConfigEncoderCallerSession) ExposeOCR3Config(config []CCIPConfigTypesOCR3Config) ([]byte, error) { - return _IOCR3ConfigEncoder.Contract.ExposeOCR3Config(&_IOCR3ConfigEncoder.CallOpts, config) -} - -func (_IOCR3ConfigEncoder *IOCR3ConfigEncoder) Address() common.Address { - return _IOCR3ConfigEncoder.address -} - -type IOCR3ConfigEncoderInterface interface { - ExposeOCR3Config(opts *bind.CallOpts, config []CCIPConfigTypesOCR3Config) ([]byte, error) - - Address() common.Address -} diff --git a/core/gethwrappers/ccip/generated/usdc_reader_tester/usdc_reader_tester.go b/core/gethwrappers/ccip/generated/usdc_reader_tester/usdc_reader_tester.go deleted file mode 100644 index f9bd3b56ef..0000000000 --- a/core/gethwrappers/ccip/generated/usdc_reader_tester/usdc_reader_tester.go +++ /dev/null @@ -1,333 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package usdc_reader_tester - -import ( - "errors" - "fmt" - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" -) - -var ( - _ = errors.New - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription - _ = abi.ConvertType -) - -var USDCReaderTesterMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"version\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"sourceDomain\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destinationDomain\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"recipient\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"destinationCaller\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"sender\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"messageBody\",\"type\":\"bytes\"}],\"name\":\"emitMessageSent\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b5061032c806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c806362826f1814610030575b600080fd5b61004361003e366004610129565b610045565b005b600061008d8a8a8a87898c8c8a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506100d292505050565b90507f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036816040516100be9190610228565b60405180910390a150505050505050505050565b606088888888888888886040516020016100f3989796959493929190610279565b604051602081830303815290604052905098975050505050505050565b803563ffffffff8116811461012457600080fd5b919050565b60008060008060008060008060006101008a8c03121561014857600080fd5b6101518a610110565b985061015f60208b01610110565b975061016d60408b01610110565b965060608a0135955060808a0135945060a08a0135935060c08a013567ffffffffffffffff80821682146101a057600080fd5b90935060e08b013590808211156101b657600080fd5b818c0191508c601f8301126101ca57600080fd5b8135818111156101d957600080fd5b8d60208285010111156101eb57600080fd5b6020830194508093505050509295985092959850929598565b60005b8381101561021f578181015183820152602001610207565b50506000910152565b6020815260008251806020840152610247816040850160208701610204565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60007fffffffff00000000000000000000000000000000000000000000000000000000808b60e01b168352808a60e01b166004840152808960e01b166008840152507fffffffffffffffff0000000000000000000000000000000000000000000000008760c01b16600c830152856014830152846034830152836054830152825161030b816074850160208701610204565b91909101607401999850505050505050505056fea164736f6c6343000818000a", -} - -var USDCReaderTesterABI = USDCReaderTesterMetaData.ABI - -var USDCReaderTesterBin = USDCReaderTesterMetaData.Bin - -func DeployUSDCReaderTester(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *USDCReaderTester, error) { - parsed, err := USDCReaderTesterMetaData.GetAbi() - if err != nil { - return common.Address{}, nil, nil, err - } - if parsed == nil { - return common.Address{}, nil, nil, errors.New("GetABI returned nil") - } - - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(USDCReaderTesterBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &USDCReaderTester{address: address, abi: *parsed, USDCReaderTesterCaller: USDCReaderTesterCaller{contract: contract}, USDCReaderTesterTransactor: USDCReaderTesterTransactor{contract: contract}, USDCReaderTesterFilterer: USDCReaderTesterFilterer{contract: contract}}, nil -} - -type USDCReaderTester struct { - address common.Address - abi abi.ABI - USDCReaderTesterCaller - USDCReaderTesterTransactor - USDCReaderTesterFilterer -} - -type USDCReaderTesterCaller struct { - contract *bind.BoundContract -} - -type USDCReaderTesterTransactor struct { - contract *bind.BoundContract -} - -type USDCReaderTesterFilterer struct { - contract *bind.BoundContract -} - -type USDCReaderTesterSession struct { - Contract *USDCReaderTester - CallOpts bind.CallOpts - TransactOpts bind.TransactOpts -} - -type USDCReaderTesterCallerSession struct { - Contract *USDCReaderTesterCaller - CallOpts bind.CallOpts -} - -type USDCReaderTesterTransactorSession struct { - Contract *USDCReaderTesterTransactor - TransactOpts bind.TransactOpts -} - -type USDCReaderTesterRaw struct { - Contract *USDCReaderTester -} - -type USDCReaderTesterCallerRaw struct { - Contract *USDCReaderTesterCaller -} - -type USDCReaderTesterTransactorRaw struct { - Contract *USDCReaderTesterTransactor -} - -func NewUSDCReaderTester(address common.Address, backend bind.ContractBackend) (*USDCReaderTester, error) { - abi, err := abi.JSON(strings.NewReader(USDCReaderTesterABI)) - if err != nil { - return nil, err - } - contract, err := bindUSDCReaderTester(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &USDCReaderTester{address: address, abi: abi, USDCReaderTesterCaller: USDCReaderTesterCaller{contract: contract}, USDCReaderTesterTransactor: USDCReaderTesterTransactor{contract: contract}, USDCReaderTesterFilterer: USDCReaderTesterFilterer{contract: contract}}, nil -} - -func NewUSDCReaderTesterCaller(address common.Address, caller bind.ContractCaller) (*USDCReaderTesterCaller, error) { - contract, err := bindUSDCReaderTester(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &USDCReaderTesterCaller{contract: contract}, nil -} - -func NewUSDCReaderTesterTransactor(address common.Address, transactor bind.ContractTransactor) (*USDCReaderTesterTransactor, error) { - contract, err := bindUSDCReaderTester(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &USDCReaderTesterTransactor{contract: contract}, nil -} - -func NewUSDCReaderTesterFilterer(address common.Address, filterer bind.ContractFilterer) (*USDCReaderTesterFilterer, error) { - contract, err := bindUSDCReaderTester(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &USDCReaderTesterFilterer{contract: contract}, nil -} - -func bindUSDCReaderTester(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := USDCReaderTesterMetaData.GetAbi() - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil -} - -func (_USDCReaderTester *USDCReaderTesterRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _USDCReaderTester.Contract.USDCReaderTesterCaller.contract.Call(opts, result, method, params...) -} - -func (_USDCReaderTester *USDCReaderTesterRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _USDCReaderTester.Contract.USDCReaderTesterTransactor.contract.Transfer(opts) -} - -func (_USDCReaderTester *USDCReaderTesterRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _USDCReaderTester.Contract.USDCReaderTesterTransactor.contract.Transact(opts, method, params...) -} - -func (_USDCReaderTester *USDCReaderTesterCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _USDCReaderTester.Contract.contract.Call(opts, result, method, params...) -} - -func (_USDCReaderTester *USDCReaderTesterTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _USDCReaderTester.Contract.contract.Transfer(opts) -} - -func (_USDCReaderTester *USDCReaderTesterTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _USDCReaderTester.Contract.contract.Transact(opts, method, params...) -} - -func (_USDCReaderTester *USDCReaderTesterTransactor) EmitMessageSent(opts *bind.TransactOpts, version uint32, sourceDomain uint32, destinationDomain uint32, recipient [32]byte, destinationCaller [32]byte, sender [32]byte, nonce uint64, messageBody []byte) (*types.Transaction, error) { - return _USDCReaderTester.contract.Transact(opts, "emitMessageSent", version, sourceDomain, destinationDomain, recipient, destinationCaller, sender, nonce, messageBody) -} - -func (_USDCReaderTester *USDCReaderTesterSession) EmitMessageSent(version uint32, sourceDomain uint32, destinationDomain uint32, recipient [32]byte, destinationCaller [32]byte, sender [32]byte, nonce uint64, messageBody []byte) (*types.Transaction, error) { - return _USDCReaderTester.Contract.EmitMessageSent(&_USDCReaderTester.TransactOpts, version, sourceDomain, destinationDomain, recipient, destinationCaller, sender, nonce, messageBody) -} - -func (_USDCReaderTester *USDCReaderTesterTransactorSession) EmitMessageSent(version uint32, sourceDomain uint32, destinationDomain uint32, recipient [32]byte, destinationCaller [32]byte, sender [32]byte, nonce uint64, messageBody []byte) (*types.Transaction, error) { - return _USDCReaderTester.Contract.EmitMessageSent(&_USDCReaderTester.TransactOpts, version, sourceDomain, destinationDomain, recipient, destinationCaller, sender, nonce, messageBody) -} - -type USDCReaderTesterMessageSentIterator struct { - Event *USDCReaderTesterMessageSent - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *USDCReaderTesterMessageSentIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(USDCReaderTesterMessageSent) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(USDCReaderTesterMessageSent) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *USDCReaderTesterMessageSentIterator) Error() error { - return it.fail -} - -func (it *USDCReaderTesterMessageSentIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type USDCReaderTesterMessageSent struct { - Arg0 []byte - Raw types.Log -} - -func (_USDCReaderTester *USDCReaderTesterFilterer) FilterMessageSent(opts *bind.FilterOpts) (*USDCReaderTesterMessageSentIterator, error) { - - logs, sub, err := _USDCReaderTester.contract.FilterLogs(opts, "MessageSent") - if err != nil { - return nil, err - } - return &USDCReaderTesterMessageSentIterator{contract: _USDCReaderTester.contract, event: "MessageSent", logs: logs, sub: sub}, nil -} - -func (_USDCReaderTester *USDCReaderTesterFilterer) WatchMessageSent(opts *bind.WatchOpts, sink chan<- *USDCReaderTesterMessageSent) (event.Subscription, error) { - - logs, sub, err := _USDCReaderTester.contract.WatchLogs(opts, "MessageSent") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(USDCReaderTesterMessageSent) - if err := _USDCReaderTester.contract.UnpackLog(event, "MessageSent", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_USDCReaderTester *USDCReaderTesterFilterer) ParseMessageSent(log types.Log) (*USDCReaderTesterMessageSent, error) { - event := new(USDCReaderTesterMessageSent) - if err := _USDCReaderTester.contract.UnpackLog(event, "MessageSent", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -func (_USDCReaderTester *USDCReaderTester) ParseLog(log types.Log) (generated.AbigenLog, error) { - switch log.Topics[0] { - case _USDCReaderTester.abi.Events["MessageSent"].ID: - return _USDCReaderTester.ParseMessageSent(log) - - default: - return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) - } -} - -func (USDCReaderTesterMessageSent) Topic() common.Hash { - return common.HexToHash("0x8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036") -} - -func (_USDCReaderTester *USDCReaderTester) Address() common.Address { - return _USDCReaderTester.address -} - -type USDCReaderTesterInterface interface { - EmitMessageSent(opts *bind.TransactOpts, version uint32, sourceDomain uint32, destinationDomain uint32, recipient [32]byte, destinationCaller [32]byte, sender [32]byte, nonce uint64, messageBody []byte) (*types.Transaction, error) - - FilterMessageSent(opts *bind.FilterOpts) (*USDCReaderTesterMessageSentIterator, error) - - WatchMessageSent(opts *bind.WatchOpts, sink chan<- *USDCReaderTesterMessageSent) (event.Subscription, error) - - ParseMessageSent(log types.Log) (*USDCReaderTesterMessageSent, error) - - ParseLog(log types.Log) (generated.AbigenLog, error) - - Address() common.Address -} diff --git a/core/scripts/ccip/applications/ethsenderreceiver/main.go b/core/scripts/ccip/applications/ethsenderreceiver/main.go index f6acad3e6b..93ba70d358 100644 --- a/core/scripts/ccip/applications/ethsenderreceiver/main.go +++ b/core/scripts/ccip/applications/ethsenderreceiver/main.go @@ -28,6 +28,7 @@ var ( senderABI = abihelpers.MustParseABI(ether_sender_receiver.EtherSenderReceiverABI) ) +// nolint func main() { switch os.Args[1] { case "inject-eth-liquidity": diff --git a/core/scripts/ccip/ccip-revert-reason/main.go b/core/scripts/ccip/ccip-revert-reason/main.go index d8504a0480..e357086306 100644 --- a/core/scripts/ccip/ccip-revert-reason/main.go +++ b/core/scripts/ccip/ccip-revert-reason/main.go @@ -13,7 +13,7 @@ import ( var ( errorCodeString = flag.String("errorCode", "", "Error code string (e.g. 0x08c379a0)") - chainId = flag.Uint64("chainId", 0, "Chain ID for the transaction (e.g. 420)") + chainID = flag.Uint64("chainId", 0, "Chain ID for the transaction (e.g. 420)") txHash = flag.String("txHash", "", "Transaction hash (e.g. 0x97be8559164442595aba46b5f849c23257905b78e72ee43d9b998b28eee78b84)") txRequester = flag.String("txRequester", "", "Transaction requester address (e.g. 0xe88ff73814fb891bb0e149f5578796fa41f20242)") rpcURL = flag.String("rpcURL", "", "RPC URL for the chain (can also be set in env var RPC_)") @@ -28,7 +28,7 @@ func main() { flag.Parse() - if *errorCodeString == "" && (*chainId == 0 || *txHash == "" || *txRequester == "") { + if *errorCodeString == "" && (*chainID == 0 || *txHash == "" || *txRequester == "") { flag.Usage() return } @@ -53,8 +53,8 @@ func getErrorString() (string, error) { } if *rpcURL == "" { - fmt.Printf("RPC URL not provided, looking for RPC_%d env var\n", *chainId) - envRPC := secrets.GetRPC(*chainId) + fmt.Printf("RPC URL not provided, looking for RPC_%d env var\n", *chainID) + envRPC := secrets.GetRPC(*chainID) rpcURL = &envRPC } diff --git a/core/scripts/ccip/debugreceiver/main.go b/core/scripts/ccip/debugreceiver/main.go index 5ea6084515..db742ed126 100644 --- a/core/scripts/ccip/debugreceiver/main.go +++ b/core/scripts/ccip/debugreceiver/main.go @@ -15,7 +15,7 @@ import ( ) type ccipAny struct { - SourceChainId *big.Int + SourceChainID *big.Int Sender []byte Data []byte Tokens []common.Address @@ -87,7 +87,7 @@ func main() { log[0].Data) panicErr(err) send := encodedMsg[0].(struct { - SourceChainId *big.Int `json:"sourceChainId"` + SourceChainID *big.Int `json:"sourceChainId"` SequenceNumber uint64 `json:"sequenceNumber"` Sender common.Address `json:"sender"` Receiver common.Address `json:"receiver"` @@ -106,7 +106,7 @@ func main() { {"internalType":"address[]","name":"tokens","type":"address[]"}, {"internalType":"uint256[]","name":"amounts","type":"uint256[]"}], "internalType":"structCCIP.Any2EVMMessage","name":"message","type":"tuple"}]`, - ccipAny{send.SourceChainId, sender, send.Data, send.Tokens, send.Amounts}) + ccipAny{send.SourceChainID, sender, send.Data, send.Tokens, send.Amounts}) panicErr(err) a, err := dest.CallContract(context.Background(), ethereum.CallMsg{ From: common.HexToAddress("0x2b7ab40413da5077e168546ea376920591aee8e7"), // offramp router diff --git a/core/scripts/ccip/liquiditymanager/arb/finalize.go b/core/scripts/ccip/liquiditymanager/arb/finalize.go index d4a97e2083..38b476a14f 100644 --- a/core/scripts/ccip/liquiditymanager/arb/finalize.go +++ b/core/scripts/ccip/liquiditymanager/arb/finalize.go @@ -35,6 +35,7 @@ var ( NodeConfirmedTopic = arbitrum_rollup_core.ArbRollupCoreNodeConfirmed{}.Topic() ) +// nolint // function executeTransaction( // // bytes32[] calldata proof, diff --git a/core/scripts/ccip/liquiditymanager/arb/send_to_l2.go b/core/scripts/ccip/liquiditymanager/arb/send_to_l2.go index afec433168..7faf797521 100644 --- a/core/scripts/ccip/liquiditymanager/arb/send_to_l2.go +++ b/core/scripts/ccip/liquiditymanager/arb/send_to_l2.go @@ -29,6 +29,7 @@ var ( nodeInterfaceABI = abihelpers.MustParseABI(arb_node_interface.NodeInterfaceMetaData.ABI) ) +// nolint func SendToL2( env multienv.Env, l1ChainID, @@ -237,6 +238,7 @@ func estimateAll(env multienv.Env, l1ChainID, l2ChainID uint64, rd RetryableData } } +// nolint func estimateRetryableGasLimit(l2Client *ethclient.Client, l2ChainID uint64, rd RetryableData) *big.Int { packed, err := nodeInterfaceABI.Pack("estimateRetryableTicket", rd.From, @@ -269,6 +271,7 @@ func estimateMaxFeePerGasOnL2(l2Client *ethclient.Client) *big.Int { return l2BaseFee } +// nolint func estimateSubmissionFee(l1Client *ethclient.Client, l1ChainID uint64, l1BaseFee *big.Int, calldataSize uint64) *big.Int { inbox, err := arbitrum_inbox.NewArbitrumInbox(ArbitrumContracts[l1ChainID]["L1Inbox"], l1Client) helpers.PanicErr(err) diff --git a/core/scripts/ccip/liquiditymanager/arb/withdraw.go b/core/scripts/ccip/liquiditymanager/arb/withdraw.go index b283e5d063..e75aeead35 100644 --- a/core/scripts/ccip/liquiditymanager/arb/withdraw.go +++ b/core/scripts/ccip/liquiditymanager/arb/withdraw.go @@ -13,6 +13,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/liquiditymanager/generated/arbitrum_l2_bridge_adapter" ) +// nolint func WithdrawFromL2( env multienv.Env, l2ChainID uint64, diff --git a/core/scripts/ccip/liquiditymanager/multienv/multienv.go b/core/scripts/ccip/liquiditymanager/multienv/multienv.go index a198177505..4fc320316d 100644 --- a/core/scripts/ccip/liquiditymanager/multienv/multienv.go +++ b/core/scripts/ccip/liquiditymanager/multienv/multienv.go @@ -19,12 +19,12 @@ import ( // Environment variables used to configure // the environment for the rebalancer const ( - // OWNER_KEY is the private key used to deploy contracts and send funds to the rebalancer nodes - OWNER_KEY = "OWNER_KEY" - // RPC_ is the prefix for the environment variable that contains the RPC URL for a chain - RPC_ = "RPC_" - // WS_ is the prefix for the environment variable that contains the WebSocket URL for a chain - WS_ = "WS_" + // OwnerKey is the private key used to deploy contracts and send funds to the rebalancer nodes + OwnerKey = "OWNER_KEY" + // RPCPrefix is the prefix for the environment variable that contains the RPC URL for a chain + RPCPrefix = "RPC_" + // WebSocketPerfix is the prefix for the environment variable that contains the WebSocket URL for a chain + WebSocketPerfix = "WS_" ) type Env struct { @@ -35,6 +35,7 @@ type Env struct { WSURLs map[uint64]string } +// nolint func New(websocket bool, overrideNonce bool) Env { env := Env{ Transactors: make(map[uint64]*bind.TransactOpts), @@ -65,7 +66,7 @@ func New(websocket bool, overrideNonce bool) Env { } func GetRPC(chainID uint64) (string, error) { - envVariable := RPC_ + strconv.FormatUint(chainID, 10) + envVariable := RPCPrefix + strconv.FormatUint(chainID, 10) rpc := os.Getenv(envVariable) if rpc != "" { return rpc, nil @@ -74,7 +75,7 @@ func GetRPC(chainID uint64) (string, error) { } func GetWS(chainID uint64) (string, error) { - envVariable := WS_ + strconv.FormatUint(chainID, 10) + envVariable := WebSocketPerfix + strconv.FormatUint(chainID, 10) ws := os.Getenv(envVariable) if ws != "" { return ws, nil @@ -83,7 +84,7 @@ func GetWS(chainID uint64) (string, error) { } func GetTransactor(chainID *big.Int) *bind.TransactOpts { - ownerKey := os.Getenv(OWNER_KEY) + ownerKey := os.Getenv(OwnerKey) if ownerKey != "" { b, err := hex.DecodeString(ownerKey) if err != nil { diff --git a/core/scripts/ccip/liquiditymanager/opstack/finalize.go b/core/scripts/ccip/liquiditymanager/opstack/finalize.go index 4422b2656e..4966796940 100644 --- a/core/scripts/ccip/liquiditymanager/opstack/finalize.go +++ b/core/scripts/ccip/liquiditymanager/opstack/finalize.go @@ -22,6 +22,7 @@ const ( FinalizationActionFinalizeWithdrawal uint8 = 1 ) +// nolint func FinalizeL1( env multienv.Env, l1ChainID, @@ -55,6 +56,7 @@ func FinalizeL1( helpers.ConfirmTXMined(context.Background(), env.Clients[l1ChainID], tx, int64(l1ChainID), "FinalizeWithdrawalTransaction") } +// nolint func FinalizeWithdrawalViaRebalancer( env multienv.Env, l1ChainID, diff --git a/core/scripts/ccip/liquiditymanager/opstack/prove_withdrawal.go b/core/scripts/ccip/liquiditymanager/opstack/prove_withdrawal.go index 3eed3cba70..fe479a49e2 100644 --- a/core/scripts/ccip/liquiditymanager/opstack/prove_withdrawal.go +++ b/core/scripts/ccip/liquiditymanager/opstack/prove_withdrawal.go @@ -25,6 +25,7 @@ var ( encoderABI = abihelpers.MustParseABI(optimism_l1_bridge_adapter_encoder.OptimismL1BridgeAdapterEncoderMetaData.ABI) ) +// nolint func ProveWithdrawal( env multienv.Env, l1ChainID, @@ -57,6 +58,7 @@ func ProveWithdrawal( helpers.ConfirmTXMined(context.Background(), l1Client, tx, int64(l1ChainID), "ProveWithdrawal") } +// nolint func ProveWithdrawalViaRebalancer( env multienv.Env, l1ChainID, diff --git a/core/scripts/ccip/liquiditymanager/opstack/send_to_l2.go b/core/scripts/ccip/liquiditymanager/opstack/send_to_l2.go index 22a280858c..1aa93804bf 100644 --- a/core/scripts/ccip/liquiditymanager/opstack/send_to_l2.go +++ b/core/scripts/ccip/liquiditymanager/opstack/send_to_l2.go @@ -23,6 +23,7 @@ var ( rebalancerABI = abihelpers.MustParseABI(liquiditymanager.LiquidityManagerMetaData.ABI) ) +// nolint func SendToL2( env multienv.Env, l1ChainID uint64, @@ -115,6 +116,7 @@ func scaleGasCost(gasCost uint64) uint64 { return gasCost * 18 / 10 } +// nolint func SendToL2ViaRebalancer( env multienv.Env, l1ChainID, diff --git a/core/scripts/ccip/liquiditymanager/opstack/withdraw.go b/core/scripts/ccip/liquiditymanager/opstack/withdraw.go index 18f0620e5f..2cc42ea2b6 100644 --- a/core/scripts/ccip/liquiditymanager/opstack/withdraw.go +++ b/core/scripts/ccip/liquiditymanager/opstack/withdraw.go @@ -16,6 +16,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/shared/generated/erc20" ) +// nolint func WithdrawFromL2( env multienv.Env, l2ChainID uint64, @@ -62,6 +63,7 @@ func WithdrawFromL2( helpers.ConfirmTXMined(context.Background(), env.Clients[l2ChainID], tx, int64(l2ChainID), "WithdrawFromL2") } +// nolint func WithdrawFromL2ViaRebalancer( env multienv.Env, l2ChainID, diff --git a/core/scripts/ccip/revert-reason/handler/reason.go b/core/scripts/ccip/revert-reason/handler/reason.go index 7256b85856..d705774b76 100644 --- a/core/scripts/ccip/revert-reason/handler/reason.go +++ b/core/scripts/ccip/revert-reason/handler/reason.go @@ -44,13 +44,13 @@ func (h *BaseHandler) RevertReasonFromErrorCodeString(errorCodeString string) (s func (h *BaseHandler) RevertReasonFromTx(txHash string) (string, error) { // Need a node URL // NOTE: this node needs to run in archive mode - ethUrl := h.cfg.NodeURL - if ethUrl == "" { + ethURL := h.cfg.NodeURL + if ethURL == "" { panicErr(errors.New("you must define ETH_NODE env variable")) } requester := h.cfg.FromAddress - ec, err := ethclient.Dial(ethUrl) + ec, err := ethclient.Dial(ethURL) panicErr(err) errorString, _ := GetErrorForTx(ec, txHash, requester) diff --git a/core/scripts/go.mod b/core/scripts/go.mod index 1971aef875..6384d8f6b6 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -273,7 +273,6 @@ require ( 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/smartcontractkit/chainlink-ccip v0.0.0-20240924115754-8858b0423283 // indirect github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240911175228-daf2600bb7b7 // indirect github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240916152957-433914114bd2 // indirect github.com/smartcontractkit/chainlink-feeds v0.0.0-20240910155501-42f20443189f // indirect diff --git a/core/scripts/go.sum b/core/scripts/go.sum index 504412944e..8688b12749 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1077,8 +1077,6 @@ github.com/smartcontractkit/chain-selectors v1.0.27 h1:VE/ftX9Aae4gnw67yR1raKi+3 github.com/smartcontractkit/chain-selectors v1.0.27/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8= github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924115754-8858b0423283 h1:f0vdqcOL9kJZwfmWE76roIyEuiZx/R82js0IfXNAvXg= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924115754-8858b0423283/go.mod h1:KP82vFCqm+M1G1t6Vos5CewGUGYJkxxCEdxnta4uLlE= github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925085218-aded1b263ecc h1:ALbyaoRzUSXQ2NhGFKVOyJqO22IB5yQjhjKWbIZGbrI= github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925085218-aded1b263ecc/go.mod h1:F6WUS6N4mP5ScwpwyTyAJc9/vjR+GXbMCRUOVekQi1g= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240911175228-daf2600bb7b7 h1:lTGIOQYLk1Ufn++X/AvZnt6VOcuhste5yp+C157No/Q= diff --git a/core/services/chainlink/config_test.go b/core/services/chainlink/config_test.go index 51ec687feb..97970df38f 100644 --- a/core/services/chainlink/config_test.go +++ b/core/services/chainlink/config_test.go @@ -1598,25 +1598,25 @@ BackupURL = "foo-bar?password=asdf" AllowSimplePasswords = false`, exp: `invalid secrets: 2 errors: - Database: 2 errors: - - URL: invalid value (*****): missing or insufficiently complex password: DB URL must be authenticated; plaintext URLs are not allowed. Database should be secured by a password matching the following complexity requirements: + - URL: invalid value (*****): missing or insufficiently complex password: DB URL must be authenticated; plaintext URLs are not allowed. Database should be secured by a password matching the following complexity requirements: Must have a length of 16-50 characters Must not comprise: Leading or trailing whitespace (note that a trailing newline in the password file, if present, will be ignored) - - - BackupURL: invalid value (*****): missing or insufficiently complex password: + + - BackupURL: invalid value (*****): missing or insufficiently complex password: Expected password complexity: Must be at least 16 characters long Must not comprise: Leading or trailing whitespace A user's API email - + Faults: password is less than 16 characters long - . Database should be secured by a password matching the following complexity requirements: + . Database should be secured by a password matching the following complexity requirements: Must have a length of 16-50 characters Must not comprise: Leading or trailing whitespace (note that a trailing newline in the password file, if present, will be ignored) - + - Password.Keystore: empty: must be provided and non-empty`}, {name: "invalid-urls-allowed", diff --git a/core/services/llo/evm/report_codec_premium_legacy.go b/core/services/llo/evm/report_codec_premium_legacy.go index f8d72619ea..901d688bda 100644 --- a/core/services/llo/evm/report_codec_premium_legacy.go +++ b/core/services/llo/evm/report_codec_premium_legacy.go @@ -105,11 +105,11 @@ func (r ReportCodecPremiumLegacy) Pack(digest types.ConfigDigest, seqNr uint64, var ss [][32]byte var vs [32]byte for i, as := range sigs { - r, s, v, err := evmutil.SplitSignature(as.Signature) + rr, s, v, err := evmutil.SplitSignature(as.Signature) if err != nil { return nil, fmt.Errorf("eventTransmit(ev): error in SplitSignature: %w", err) } - rs = append(rs, r) + rs = append(rs, rr) ss = append(ss, s) vs[i] = v } @@ -167,8 +167,8 @@ func LegacyReportContext(cd ocr2types.ConfigDigest, seqNr uint64) ocr2types.Repo return ocr2types.ReportContext{ ReportTimestamp: ocr2types.ReportTimestamp{ ConfigDigest: cd, - Epoch: uint32(epoch), - Round: uint8(round), + Epoch: epoch, + Round: round, }, ExtraHash: LLOExtraHash, // ExtraHash is always zero for mercury, we use LLOExtraHash here to differentiate from the legacy plugin } diff --git a/core/services/llo/onchain_channel_definition_cache.go b/core/services/llo/onchain_channel_definition_cache.go index 6ff2058fb7..0f6e8c161c 100644 --- a/core/services/llo/onchain_channel_definition_cache.go +++ b/core/services/llo/onchain_channel_definition_cache.go @@ -154,7 +154,7 @@ func (c *channelDefinitionCache) Start(ctx context.Context) error { } else if pd != nil { c.definitions = pd.Definitions c.initialBlockNum = pd.BlockNum + 1 - c.definitionsVersion = uint32(pd.Version) + c.definitionsVersion = pd.Version } else { // ensure non-nil map ready for assignment later c.definitions = make(llotypes.ChannelDefinitions) @@ -454,6 +454,7 @@ func (c *channelDefinitionCache) persist(ctx context.Context) (memoryVersion, pe return } +// nolint:revive // Checks persisted version and tries to save if necessary on a periodic timer // Simple backup in case database persistence fails func (c *channelDefinitionCache) failedPersistLoop() { diff --git a/core/services/ocr/contract_tracker.go b/core/services/ocr/contract_tracker.go index d7199874a9..0d0dc45c0d 100644 --- a/core/services/ocr/contract_tracker.go +++ b/core/services/ocr/contract_tracker.go @@ -391,6 +391,7 @@ func (t *OCRContractTracker) ConfigFromLogs(ctx context.Context, changedInBlock return confighelper.ContractConfigFromConfigSetEvent(*latest), err } +// nolint:exhaustive // LatestBlockHeight queries the eth node for the most recent header func (t *OCRContractTracker) LatestBlockHeight(ctx context.Context) (blockheight uint64, err error) { switch t.cfg.ChainType() { diff --git a/core/services/ocr2/plugins/ccip/internal/pricegetter/evm_test.go b/core/services/ocr2/plugins/ccip/internal/pricegetter/evm_test.go index 8ab2ce2bc4..cc3eb3d35c 100644 --- a/core/services/ocr2/plugins/ccip/internal/pricegetter/evm_test.go +++ b/core/services/ocr2/plugins/ccip/internal/pricegetter/evm_test.go @@ -198,10 +198,10 @@ func testParamAggregatorOnly(t *testing.T) testParameters { AnsweredInRound: big.NewInt(4000), } contractReaders := map[uint64]types.ContractReader{ - uint64(101): mockCR(t, []uint8{8}, []aggregator_v3_interface.LatestRoundData{round1}), - uint64(102): mockCR(t, []uint8{8}, []aggregator_v3_interface.LatestRoundData{round2}), - uint64(103): mockCR(t, []uint8{18}, []aggregator_v3_interface.LatestRoundData{round3}), - uint64(104): mockCR(t, []uint8{20}, []aggregator_v3_interface.LatestRoundData{round4}), + uint64(101): mockCR(t, []uint8{8}, cfg, []common.Address{TK1}, []aggregator_v3_interface.LatestRoundData{round1}), + uint64(102): mockCR(t, []uint8{8}, cfg, []common.Address{TK2}, []aggregator_v3_interface.LatestRoundData{round2}), + uint64(103): mockCR(t, []uint8{18}, cfg, []common.Address{TK3}, []aggregator_v3_interface.LatestRoundData{round3}), + uint64(104): mockCR(t, []uint8{20}, cfg, []common.Address{TK4}, []aggregator_v3_interface.LatestRoundData{round4}), } expectedTokenPrices := map[common.Address]big.Int{ TK1: *multExp(round1.Answer, 10), // expected in 1e18 format. @@ -261,8 +261,8 @@ func testParamAggregatorOnlyMulti(t *testing.T) testParameters { AnsweredInRound: big.NewInt(3000), } contractReaders := map[uint64]types.ContractReader{ - uint64(101): mockCR(t, []uint8{8}, []aggregator_v3_interface.LatestRoundData{round1}), - uint64(102): mockCR(t, []uint8{8, 8}, []aggregator_v3_interface.LatestRoundData{round2, round3}), + uint64(101): mockCR(t, []uint8{8}, cfg, []common.Address{TK1}, []aggregator_v3_interface.LatestRoundData{round1}), + uint64(102): mockCR(t, []uint8{8, 8}, cfg, []common.Address{TK2, TK3}, []aggregator_v3_interface.LatestRoundData{round2, round3}), } expectedTokenPrices := map[common.Address]big.Int{ TK1: *multExp(round1.Answer, 10), @@ -347,8 +347,8 @@ func testParamNoAggregatorForToken(t *testing.T) testParameters { AnsweredInRound: big.NewInt(2000), } contractReaders := map[uint64]types.ContractReader{ - uint64(101): mockCR(t, []uint8{8}, []aggregator_v3_interface.LatestRoundData{round1}), - uint64(102): mockCR(t, []uint8{8}, []aggregator_v3_interface.LatestRoundData{round2}), + uint64(101): mockCR(t, []uint8{8}, cfg, []common.Address{TK1}, []aggregator_v3_interface.LatestRoundData{round1}), + uint64(102): mockCR(t, []uint8{8}, cfg, []common.Address{TK2}, []aggregator_v3_interface.LatestRoundData{round2}), } expectedTokenPrices := map[common.Address]big.Int{ TK1: *round1.Answer, @@ -401,8 +401,8 @@ func testParamAggregatorAndStaticValid(t *testing.T) testParameters { AnsweredInRound: big.NewInt(2000), } contractReaders := map[uint64]types.ContractReader{ - uint64(101): mockCR(t, []uint8{8}, []aggregator_v3_interface.LatestRoundData{round1}), - uint64(102): mockCR(t, []uint8{8}, []aggregator_v3_interface.LatestRoundData{round2}), + uint64(101): mockCR(t, []uint8{8}, cfg, []common.Address{TK1}, []aggregator_v3_interface.LatestRoundData{round1}), + uint64(102): mockCR(t, []uint8{8}, cfg, []common.Address{TK2}, []aggregator_v3_interface.LatestRoundData{round2}), } expectedTokenPrices := map[common.Address]big.Int{ TK1: *multExp(round1.Answer, 10), @@ -464,9 +464,9 @@ func testParamAggregatorAndStaticTokenCollision(t *testing.T) testParameters { AnsweredInRound: big.NewInt(3000), } contractReaders := map[uint64]types.ContractReader{ - uint64(101): mockCR(t, []uint8{8}, []aggregator_v3_interface.LatestRoundData{round1}), - uint64(102): mockCR(t, []uint8{8}, []aggregator_v3_interface.LatestRoundData{round2}), - uint64(103): mockCR(t, []uint8{8}, []aggregator_v3_interface.LatestRoundData{round3}), + uint64(101): mockCR(t, []uint8{8}, cfg, []common.Address{TK1}, []aggregator_v3_interface.LatestRoundData{round1}), + uint64(102): mockCR(t, []uint8{8}, cfg, []common.Address{TK2}, []aggregator_v3_interface.LatestRoundData{round2}), + uint64(103): mockCR(t, []uint8{8}, cfg, []common.Address{TK3}, []aggregator_v3_interface.LatestRoundData{round3}), } return testParameters{ cfg: cfg, @@ -504,7 +504,7 @@ func testParamBatchCallReturnsErr(t *testing.T) testParameters { AnsweredInRound: big.NewInt(1000), } contractReaders := map[uint64]types.ContractReader{ - uint64(101): mockCR(t, []uint8{8}, []aggregator_v3_interface.LatestRoundData{round1}), + uint64(101): mockCR(t, []uint8{8}, cfg, []common.Address{TK1}, []aggregator_v3_interface.LatestRoundData{round1}), uint64(102): mockErrCR(t), } return testParameters{ @@ -563,9 +563,9 @@ func testLessInputsThanDefinedPrices(t *testing.T) testParameters { AnsweredInRound: big.NewInt(3000), } contractReaders := map[uint64]types.ContractReader{ - uint64(101): mockCR(t, []uint8{8}, []aggregator_v3_interface.LatestRoundData{round1}), - uint64(102): mockCR(t, []uint8{8}, []aggregator_v3_interface.LatestRoundData{round2}), - uint64(103): mockCR(t, []uint8{8}, []aggregator_v3_interface.LatestRoundData{round3}), + uint64(101): mockCR(t, []uint8{8}, cfg, []common.Address{TK1}, []aggregator_v3_interface.LatestRoundData{round1}), + uint64(102): mockCR(t, []uint8{8}, cfg, []common.Address{TK2}, []aggregator_v3_interface.LatestRoundData{round2}), + uint64(103): mockCR(t, []uint8{8}, cfg, []common.Address{TK3}, []aggregator_v3_interface.LatestRoundData{round3}), } expectedTokenPrices := map[common.Address]big.Int{ TK1: *multExp(round1.Answer, 10), @@ -628,9 +628,9 @@ func testGetAllTokensAggregatorAndStatic(t *testing.T) testParameters { AnsweredInRound: big.NewInt(3000), } contractReaders := map[uint64]types.ContractReader{ - uint64(101): mockCR(t, []uint8{8}, []aggregator_v3_interface.LatestRoundData{round1}), - uint64(102): mockCR(t, []uint8{8}, []aggregator_v3_interface.LatestRoundData{round2}), - uint64(103): mockCR(t, []uint8{8}, []aggregator_v3_interface.LatestRoundData{round3}), + uint64(101): mockCR(t, []uint8{8}, cfg, []common.Address{TK1}, []aggregator_v3_interface.LatestRoundData{round1}), + uint64(102): mockCR(t, []uint8{8}, cfg, []common.Address{TK2}, []aggregator_v3_interface.LatestRoundData{round2}), + uint64(103): mockCR(t, []uint8{8}, cfg, []common.Address{TK3}, []aggregator_v3_interface.LatestRoundData{round3}), } expectedTokenPricesForAll := map[common.Address]big.Int{ TK1: *multExp(round1.Answer, 10), @@ -688,9 +688,9 @@ func testGetAllTokensAggregatorOnly(t *testing.T) testParameters { AnsweredInRound: big.NewInt(3000), } contractReaders := map[uint64]types.ContractReader{ - uint64(101): mockCR(t, []uint8{8}, []aggregator_v3_interface.LatestRoundData{round1}), - uint64(102): mockCR(t, []uint8{8}, []aggregator_v3_interface.LatestRoundData{round2}), - uint64(103): mockCR(t, []uint8{8}, []aggregator_v3_interface.LatestRoundData{round3}), + uint64(101): mockCR(t, []uint8{8}, cfg, []common.Address{TK1}, []aggregator_v3_interface.LatestRoundData{round1}), + uint64(102): mockCR(t, []uint8{8}, cfg, []common.Address{TK2}, []aggregator_v3_interface.LatestRoundData{round2}), + uint64(103): mockCR(t, []uint8{8}, cfg, []common.Address{TK3}, []aggregator_v3_interface.LatestRoundData{round3}), } expectedTokenPricesForAll := map[common.Address]big.Int{ @@ -737,17 +737,18 @@ func testGetAllTokensStaticOnly(t *testing.T) testParameters { } } -func mockCR(t *testing.T, decimals []uint8, rounds []aggregator_v3_interface.LatestRoundData) *mocks.ChainReader { - caller := mocks.NewChainReader(t) +func mockCR(t *testing.T, decimals []uint8, cfg config.DynamicPriceGetterConfig, addr []common.Address, rounds []aggregator_v3_interface.LatestRoundData) *mocks.ContractReader { + caller := mocks.NewContractReader(t) // Mock batch calls per chain: all decimals calls then all latestRoundData calls. - // bGLVR = batchGetLatestValueResult - //nolint:all - var bGLVR types.BatchGetLatestValuesResult - bGLVR = make(map[string]types.ContractBatchResults, 1) + bGLVR := make(types.BatchGetLatestValuesResult) for i := range len(decimals) { - bGLVR[fmt.Sprintf("%v_%v", OffchainAggregator, i)] = make([]types.BatchReadResult, 0, 2) + boundContract := types.BoundContract{ + Address: cfg.AggregatorPrices[addr[i]].AggregatorContractAddress.Hex(), + Name: fmt.Sprintf("%v_%v", OffchainAggregator, i), + } + bGLVR[boundContract] = types.ContractBatchResults{} } for i, d := range decimals { contractName := fmt.Sprintf("%v_%v", OffchainAggregator, i) @@ -755,7 +756,11 @@ func mockCR(t *testing.T, decimals []uint8, rounds []aggregator_v3_interface.Lat ReadName: DecimalsMethodName, } readRes.SetResult(&d, nil) - bGLVR[contractName] = append(bGLVR[contractName], readRes) + boundContract := types.BoundContract{ + Address: cfg.AggregatorPrices[addr[i]].AggregatorContractAddress.Hex(), + Name: contractName, + } + bGLVR[boundContract] = append(bGLVR[boundContract], readRes) } for i, r := range rounds { @@ -764,7 +769,11 @@ func mockCR(t *testing.T, decimals []uint8, rounds []aggregator_v3_interface.Lat ReadName: LatestRoundDataMethodName, } readRes.SetResult(&r, nil) - bGLVR[contractName] = append(bGLVR[contractName], readRes) + boundContract := types.BoundContract{ + Address: cfg.AggregatorPrices[addr[i]].AggregatorContractAddress.Hex(), + Name: contractName, + } + bGLVR[boundContract] = append(bGLVR[boundContract], readRes) } caller.On("Bind", mock.Anything, mock.Anything).Return(nil).Maybe() @@ -772,8 +781,8 @@ func mockCR(t *testing.T, decimals []uint8, rounds []aggregator_v3_interface.Lat return caller } -func mockErrCR(t *testing.T) *mocks.ChainReader { - caller := mocks.NewChainReader(t) +func mockErrCR(t *testing.T) *mocks.ContractReader { + caller := mocks.NewContractReader(t) caller.On("Bind", mock.Anything, mock.Anything).Return(nil).Maybe() caller.On("BatchGetLatestValues", mock.Anything, mock.Anything).Return(nil, assert.AnError).Maybe() return caller diff --git a/core/services/ocr2/plugins/ccip/testhelpers/integration/chainlink.go b/core/services/ocr2/plugins/ccip/testhelpers/integration/chainlink.go index 04d6663959..a689424d0e 100644 --- a/core/services/ocr2/plugins/ccip/testhelpers/integration/chainlink.go +++ b/core/services/ocr2/plugins/ccip/testhelpers/integration/chainlink.go @@ -460,7 +460,7 @@ func setupNodeCCIP( }, CSAETHKeystore: simEthKeyStore, } - loopRegistry := plugins.NewLoopRegistry(lggr.Named("LoopRegistry"), config.Tracing()) + loopRegistry := plugins.NewLoopRegistry(lggr.Named("LoopRegistry"), config.Tracing(), config.Telemetry()) relayerFactory := chainlink.RelayerFactory{ Logger: lggr, LoopRegistry: loopRegistry, @@ -490,7 +490,7 @@ func setupNodeCCIP( RestrictedHTTPClient: &http.Client{}, AuditLogger: audit.NoopLogger, MailMon: mailMon, - LoopRegistry: plugins.NewLoopRegistry(lggr, config.Tracing()), + LoopRegistry: plugins.NewLoopRegistry(lggr, config.Tracing(), config.Telemetry()), }) require.NoError(t, err) require.NoError(t, app.GetKeyStore().Unlock(ctx, "password")) diff --git a/core/services/ocr2/plugins/ccip/testhelpers/testhelpers_1_4_0/chainlink.go b/core/services/ocr2/plugins/ccip/testhelpers/testhelpers_1_4_0/chainlink.go index 8d7a4551f1..769874c6e4 100644 --- a/core/services/ocr2/plugins/ccip/testhelpers/testhelpers_1_4_0/chainlink.go +++ b/core/services/ocr2/plugins/ccip/testhelpers/testhelpers_1_4_0/chainlink.go @@ -456,7 +456,7 @@ func setupNodeCCIP( }, CSAETHKeystore: simEthKeyStore, } - loopRegistry := plugins.NewLoopRegistry(lggr.Named("LoopRegistry"), config.Tracing()) + loopRegistry := plugins.NewLoopRegistry(lggr.Named("LoopRegistry"), config.Tracing(), config.Telemetry()) relayerFactory := chainlink.RelayerFactory{ Logger: lggr, LoopRegistry: loopRegistry, @@ -486,7 +486,7 @@ func setupNodeCCIP( RestrictedHTTPClient: &http.Client{}, AuditLogger: audit.NoopLogger, MailMon: mailMon, - LoopRegistry: plugins.NewLoopRegistry(lggr, config.Tracing()), + LoopRegistry: plugins.NewLoopRegistry(lggr, config.Tracing(), config.Telemetry()), }) ctx := testutils.Context(t) require.NoError(t, err) diff --git a/core/services/ocr2/plugins/liquiditymanager/internal/integration_test.go b/core/services/ocr2/plugins/liquiditymanager/internal/integration_test.go index 765366a5c3..080e9b82e3 100644 --- a/core/services/ocr2/plugins/liquiditymanager/internal/integration_test.go +++ b/core/services/ocr2/plugins/liquiditymanager/internal/integration_test.go @@ -160,7 +160,7 @@ func setupNodeOCR3( } relayerFactory := chainlink.RelayerFactory{ Logger: lggr, - LoopRegistry: plugins.NewLoopRegistry(lggr.Named("LoopRegistry"), config.Tracing()), + LoopRegistry: plugins.NewLoopRegistry(lggr.Named("LoopRegistry"), config.Tracing(), config.Telemetry()), GRPCOpts: loop.GRPCOpts{}, } initOps := []chainlink.CoreRelayerChainInitFunc{chainlink.InitEVM(testutils.Context(t), relayerFactory, evmOpts)} @@ -179,7 +179,7 @@ func setupNodeOCR3( RestrictedHTTPClient: &http.Client{}, AuditLogger: audit.NoopLogger, MailMon: mailMon, - LoopRegistry: plugins.NewLoopRegistry(lggr, config.Tracing()), + LoopRegistry: plugins.NewLoopRegistry(lggr, config.Tracing(), config.Telemetry()), }) require.NoError(t, err) require.NoError(t, app.GetKeyStore().Unlock(ctx, "password")) diff --git a/core/services/ocr2/plugins/llo/integration_test.go b/core/services/ocr2/plugins/llo/integration_test.go index 2e49e98946..03dca8f370 100644 --- a/core/services/ocr2/plugins/llo/integration_test.go +++ b/core/services/ocr2/plugins/llo/integration_test.go @@ -310,8 +310,8 @@ lloDonID = %d assert.Equal(t, "application/json", r.Header.Get("Content-Type")) w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusOK) - _, err := w.Write(channelDefinitionsJSON) - require.NoError(t, err) + _, err2 := w.Write(channelDefinitionsJSON) + require.NoError(t, err2) })) t.Cleanup(channelDefinitionsServer.Close) @@ -397,14 +397,14 @@ channelDefinitionsContractFromBlock = %d`, serverURL, serverPubKey, donID, confi t.Run(fmt.Sprintf("emulate mercury server verifying report (local verification) - node %x", req.pk), func(t *testing.T) { rv := mercuryverifier.NewVerifier() - reportSigners, err := rv.Verify(mercuryverifier.SignedReport{ + reportSigners, err2 := rv.Verify(mercuryverifier.SignedReport{ RawRs: v["rawRs"].([][32]byte), RawSs: v["rawSs"].([][32]byte), RawVs: v["rawVs"].([32]byte), ReportContext: v["reportContext"].([3][32]byte), Report: v["report"].([]byte), }, fNodes, signerAddresses) - require.NoError(t, err) + require.NoError(t, err2) assert.GreaterOrEqual(t, len(reportSigners), int(fNodes+1)) assert.Subset(t, signerAddresses, reportSigners) }) diff --git a/core/services/relay/evm/functions.go b/core/services/relay/evm/functions.go index b61baec189..74a133edd1 100644 --- a/core/services/relay/evm/functions.go +++ b/core/services/relay/evm/functions.go @@ -8,9 +8,9 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/pkg/errors" - commonlogger "github.com/smartcontractkit/chainlink-common/pkg/logger" ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + commonlogger "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services" commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" diff --git a/core/services/relay/evm/median_test.go b/core/services/relay/evm/median_test.go index a1578737b6..65e5525596 100644 --- a/core/services/relay/evm/median_test.go +++ b/core/services/relay/evm/median_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/smartcontractkit/chainlink-common/pkg/logger" commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm/mocks" @@ -17,7 +17,7 @@ import ( ) func TestNewMedianProvider(t *testing.T) { - lggr := logger.Test(t) + lggr := logger.TestLogger(t) chain := mocks.NewChain(t) chainID := testutils.NewRandomEVMChainID() diff --git a/core/services/workflows/delegate.go b/core/services/workflows/delegate.go index 2aac9ba97b..e20cff244b 100644 --- a/core/services/workflows/delegate.go +++ b/core/services/workflows/delegate.go @@ -6,8 +6,8 @@ import ( "github.com/google/uuid" "github.com/pelletier/go-toml" - "github.com/smartcontractkit/chainlink-common/pkg/types/core" + "github.com/smartcontractkit/chainlink-common/pkg/types/core" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/workflows/store" diff --git a/core/services/workflows/engine.go b/core/services/workflows/engine.go index 26bc2d4cd6..8abfbcea5b 100644 --- a/core/services/workflows/engine.go +++ b/core/services/workflows/engine.go @@ -10,15 +10,14 @@ import ( "time" "github.com/jonboulle/clockwork" - "github.com/smartcontractkit/chainlink-common/pkg/workflows/sdk" - - "github.com/smartcontractkit/chainlink-common/pkg/workflows/exec" "github.com/smartcontractkit/chainlink-common/pkg/capabilities" "github.com/smartcontractkit/chainlink-common/pkg/services" "github.com/smartcontractkit/chainlink-common/pkg/types/core" "github.com/smartcontractkit/chainlink-common/pkg/values" "github.com/smartcontractkit/chainlink-common/pkg/workflows" + "github.com/smartcontractkit/chainlink-common/pkg/workflows/exec" + "github.com/smartcontractkit/chainlink-common/pkg/workflows/sdk" "github.com/smartcontractkit/chainlink/v2/core/capabilities/transmission" "github.com/smartcontractkit/chainlink/v2/core/logger" diff --git a/core/services/workflows/models.go b/core/services/workflows/models.go index cf1fffa9a4..2935a7d6cc 100644 --- a/core/services/workflows/models.go +++ b/core/services/workflows/models.go @@ -6,11 +6,11 @@ import ( "sync/atomic" "github.com/dominikbraun/graph" - "github.com/smartcontractkit/chainlink-common/pkg/workflows/sdk" "github.com/smartcontractkit/chainlink-common/pkg/capabilities" "github.com/smartcontractkit/chainlink-common/pkg/values" "github.com/smartcontractkit/chainlink-common/pkg/workflows" + "github.com/smartcontractkit/chainlink-common/pkg/workflows/sdk" ) // workflow is a directed graph of nodes, where each node is a step. diff --git a/core/services/workflows/models_test.go b/core/services/workflows/models_test.go index 68944e64ba..ecb9c1995b 100644 --- a/core/services/workflows/models_test.go +++ b/core/services/workflows/models_test.go @@ -293,7 +293,6 @@ targets: for _, tc := range testCases { t.Run(tc.name, func(st *testing.T) { - spec, err := job.YAMLSpecFactory{}.Spec(testutils.Context(t), []byte(tc.yaml), nil) require.NoError(t, err) diff --git a/docs/CONFIG.md b/docs/CONFIG.md index 9cc78c2027..059a0e3002 100644 --- a/docs/CONFIG.md +++ b/docs/CONFIG.md @@ -3092,6 +3092,108 @@ GasLimitDefault = 400000

+
Astar Shibuya (81)

+ +```toml +AutoCreateKey = true +BlockBackfillDepth = 10 +BlockBackfillSkip = false +FinalityDepth = 100 +FinalityTagEnabled = true +LogBackfillBatchSize = 1000 +LogPollInterval = '6s' +LogKeepBlocksDepth = 100000 +LogPrunePageSize = 10000 +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 = 'BlockHistory' +PriceDefault = '20 gwei' +PriceMax = '100 micro' +PriceMin = '1 gwei' +LimitDefault = 8000000 +LimitMax = 8000000 +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 + +[NodePool] +PollFailureThreshold = 5 +PollInterval = '10s' +SelectionMode = 'HighestHead' +SyncThreshold = 5 +LeaseDuration = '0s' +NodeIsSyncingEnabled = false +FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' +NewHeadsPollInterval = '0s' + +[OCR] +ContractConfirmations = 4 +ContractTransmitterTransmitTimeout = '10s' +DatabaseTimeout = '10s' +DeltaCOverride = '168h0m0s' +DeltaCJitterOverride = '1h0m0s' +ObservationGracePeriod = '1s' + +[OCR2] +[OCR2.Automation] +GasLimit = 5400000 + +[Workflow] +GasLimitDefault = 400000 +``` + +

+
BSC Testnet (97)

```toml @@ -4032,7 +4134,7 @@ FinalityTagEnabled = false LogBackfillBatchSize = 1000 LogPollInterval = '10s' LogKeepBlocksDepth = 100000 -LogPrunePageSize = 0 +LogPrunePageSize = 10000 BackupLogPollerBlockDelay = 100 MinIncomingConfirmations = 1 MinContractPayment = '0.00001 link' @@ -4063,8 +4165,8 @@ Mode = 'SuggestedPrice' PriceDefault = '20 gwei' PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether' PriceMin = '1 gwei' -LimitDefault = 500000 -LimitMax = 500000 +LimitDefault = 8000000 +LimitMax = 8000000 LimitMultiplier = '1' LimitTransfer = 21000 EstimateLimit = false @@ -4135,7 +4237,7 @@ FinalityTagEnabled = false LogBackfillBatchSize = 1000 LogPollInterval = '10s' LogKeepBlocksDepth = 100000 -LogPrunePageSize = 0 +LogPrunePageSize = 10000 BackupLogPollerBlockDelay = 100 MinIncomingConfirmations = 1 MinContractPayment = '0.00001 link' @@ -4166,8 +4268,8 @@ Mode = 'SuggestedPrice' PriceDefault = '20 gwei' PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether' PriceMin = '1 gwei' -LimitDefault = 500000 -LimitMax = 500000 +LimitDefault = 8000000 +LimitMax = 8000000 LimitMultiplier = '1' LimitTransfer = 21000 EstimateLimit = false @@ -4657,6 +4759,7 @@ MinIncomingConfirmations = 3 MinContractPayment = '0.00001 link' NonceAutoSync = true NoNewHeadsThreshold = '3m0s' +LogBroadcasterEnabled = true RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 FinalizedBlockOffset = 0 @@ -4721,6 +4824,7 @@ NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' EnforceRepeatableRead = false DeathDeclarationDelay = '10s' +NewHeadsPollInterval = '0s' [OCR] ContractConfirmations = 4 @@ -4733,6 +4837,9 @@ ObservationGracePeriod = '1s' [OCR2] [OCR2.Automation] GasLimit = 5400000 + +[Workflow] +GasLimitDefault = 400000 ```

@@ -4755,6 +4862,7 @@ MinIncomingConfirmations = 3 MinContractPayment = '0.00001 link' NonceAutoSync = true NoNewHeadsThreshold = '3m0s' +LogBroadcasterEnabled = true RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 FinalizedBlockOffset = 0 @@ -4820,6 +4928,7 @@ NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' EnforceRepeatableRead = false DeathDeclarationDelay = '10s' +NewHeadsPollInterval = '0s' [OCR] ContractConfirmations = 4 @@ -4832,6 +4941,9 @@ ObservationGracePeriod = '1s' [OCR2] [OCR2.Automation] GasLimit = 5400000 + +[Workflow] +GasLimitDefault = 400000 ```

@@ -5564,11 +5676,11 @@ BlockBackfillDepth = 10 BlockBackfillSkip = false ChainType = 'kroma' FinalityDepth = 400 -FinalityTagEnabled = false +FinalityTagEnabled = true LogBackfillBatchSize = 1000 LogPollInterval = '2s' LogKeepBlocksDepth = 100000 -LogPrunePageSize = 0 +LogPrunePageSize = 10000 BackupLogPollerBlockDelay = 100 MinIncomingConfirmations = 1 MinContractPayment = '0.00001 link' @@ -5599,8 +5711,8 @@ Mode = 'BlockHistory' PriceDefault = '20 gwei' PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether' PriceMin = '1 wei' -LimitDefault = 500000 -LimitMax = 500000 +LimitDefault = 8000000 +LimitMax = 8000000 LimitMultiplier = '1' LimitTransfer = 21000 EstimateLimit = false @@ -5883,6 +5995,7 @@ MinIncomingConfirmations = 1 MinContractPayment = '0.00001 link' NonceAutoSync = true NoNewHeadsThreshold = '0s' +LogBroadcasterEnabled = true RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 FinalizedBlockOffset = 0 @@ -5948,6 +6061,7 @@ NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' EnforceRepeatableRead = false DeathDeclarationDelay = '10s' +NewHeadsPollInterval = '0s' [OCR] ContractConfirmations = 4 @@ -5960,6 +6074,9 @@ ObservationGracePeriod = '1s' [OCR2] [OCR2.Automation] GasLimit = 5400000 + +[Workflow] +GasLimitDefault = 400000 ```

@@ -6473,6 +6590,9 @@ ObservationGracePeriod = '1s' [OCR2] [OCR2.Automation] GasLimit = 5400000 + +[Workflow] +GasLimitDefault = 400000 ```

@@ -6495,6 +6615,7 @@ MinIncomingConfirmations = 3 MinContractPayment = '0.00001 link' NonceAutoSync = true NoNewHeadsThreshold = '3m0s' +LogBroadcasterEnabled = true RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 FinalizedBlockOffset = 0 @@ -6560,6 +6681,7 @@ NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' EnforceRepeatableRead = false DeathDeclarationDelay = '10s' +NewHeadsPollInterval = '0s' [OCR] ContractConfirmations = 4 @@ -7108,7 +7230,7 @@ LinkContractAddress = '0xDEE94506570cA186BC1e3516fCf4fd719C312cCD' LogBackfillBatchSize = 1000 LogPollInterval = '2s' LogKeepBlocksDepth = 100000 -LogPrunePageSize = 0 +LogPrunePageSize = 10000 BackupLogPollerBlockDelay = 100 MinIncomingConfirmations = 3 MinContractPayment = '0.00001 link' @@ -7141,8 +7263,8 @@ Mode = 'BlockHistory' PriceDefault = '20 gwei' PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether' PriceMin = '1 wei' -LimitDefault = 500000 -LimitMax = 500000 +LimitDefault = 8000000 +LimitMax = 8000000 LimitMultiplier = '1' LimitTransfer = 21000 EstimateLimit = false @@ -7214,7 +7336,7 @@ LinkContractAddress = '0x5D6d033B4FbD2190D99D930719fAbAcB64d2439a' LogBackfillBatchSize = 1000 LogPollInterval = '2s' LogKeepBlocksDepth = 100000 -LogPrunePageSize = 0 +LogPrunePageSize = 10000 BackupLogPollerBlockDelay = 100 MinIncomingConfirmations = 3 MinContractPayment = '0.00001 link' @@ -7247,8 +7369,8 @@ Mode = 'BlockHistory' PriceDefault = '20 gwei' PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether' PriceMin = '1 wei' -LimitDefault = 500000 -LimitMax = 500000 +LimitDefault = 8000000 +LimitMax = 8000000 LimitMultiplier = '1' LimitTransfer = 21000 EstimateLimit = false @@ -7307,208 +7429,6 @@ GasLimitDefault = 400000

-
Zircuit Sepolia (48899)

- -```toml -AutoCreateKey = true -BlockBackfillDepth = 10 -BlockBackfillSkip = false -ChainType = 'optimismBedrock' -FinalityDepth = 1000 -FinalityTagEnabled = true -LinkContractAddress = '0xDEE94506570cA186BC1e3516fCf4fd719C312cCD' -LogBackfillBatchSize = 1000 -LogPollInterval = '2s' -LogKeepBlocksDepth = 100000 -LogPrunePageSize = 10000 -BackupLogPollerBlockDelay = 100 -MinIncomingConfirmations = 3 -MinContractPayment = '0.00001 link' -NonceAutoSync = true -NoNewHeadsThreshold = '40s' -RPCDefaultBatchSize = 250 -RPCBlockQueryDelay = 1 -FinalizedBlockOffset = 0 -NoNewFinalizedHeadsThreshold = '15m0s' - -[Transactions] -ForwardersEnabled = false -MaxInFlight = 16 -MaxQueued = 250 -ReaperInterval = '1h0m0s' -ReaperThreshold = '168h0m0s' -ResendAfterThreshold = '30s' - -[Transactions.AutoPurge] -Enabled = true -Threshold = 90 -MinAttempts = 3 - -[BalanceMonitor] -Enabled = true - -[GasEstimator] -Mode = 'BlockHistory' -PriceDefault = '20 gwei' -PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether' -PriceMin = '1 wei' -LimitDefault = 8000000 -LimitMax = 8000000 -LimitMultiplier = '1' -LimitTransfer = 21000 -EstimateLimit = false -BumpMin = '100 wei' -BumpPercent = 20 -BumpThreshold = 3 -EIP1559DynamicFees = true -FeeCapDefault = '100 gwei' -TipCapDefault = '1 wei' -TipCapMin = '1 wei' - -[GasEstimator.BlockHistory] -BatchSize = 25 -BlockHistorySize = 60 -CheckInclusionBlocks = 12 -CheckInclusionPercentile = 90 -TransactionPercentile = 60 - -[GasEstimator.FeeHistory] -CacheTimeout = '10s' - -[HeadTracker] -HistoryDepth = 2000 -MaxBufferSize = 3 -SamplingInterval = '1s' -MaxAllowedFinalityDepth = 10000 -FinalityTagBypass = true - -[NodePool] -PollFailureThreshold = 5 -PollInterval = '10s' -SelectionMode = 'HighestHead' -SyncThreshold = 10 -LeaseDuration = '0s' -NodeIsSyncingEnabled = false -FinalizedBlockPollInterval = '5s' -EnforceRepeatableRead = false -DeathDeclarationDelay = '10s' - -[OCR] -ContractConfirmations = 1 -ContractTransmitterTransmitTimeout = '10s' -DatabaseTimeout = '10s' -DeltaCOverride = '168h0m0s' -DeltaCJitterOverride = '1h0m0s' -ObservationGracePeriod = '1s' - -[OCR2] -[OCR2.Automation] -GasLimit = 6500000 -``` - -

- -
Zircuit Mainnet (48900)

- -```toml -AutoCreateKey = true -BlockBackfillDepth = 10 -BlockBackfillSkip = false -ChainType = 'optimismBedrock' -FinalityDepth = 1000 -FinalityTagEnabled = true -LinkContractAddress = '0x5D6d033B4FbD2190D99D930719fAbAcB64d2439a' -LogBackfillBatchSize = 1000 -LogPollInterval = '2s' -LogKeepBlocksDepth = 100000 -LogPrunePageSize = 10000 -BackupLogPollerBlockDelay = 100 -MinIncomingConfirmations = 3 -MinContractPayment = '0.00001 link' -NonceAutoSync = true -NoNewHeadsThreshold = '40s' -RPCDefaultBatchSize = 250 -RPCBlockQueryDelay = 1 -FinalizedBlockOffset = 0 -NoNewFinalizedHeadsThreshold = '15m0s' - -[Transactions] -ForwardersEnabled = false -MaxInFlight = 16 -MaxQueued = 250 -ReaperInterval = '1h0m0s' -ReaperThreshold = '168h0m0s' -ResendAfterThreshold = '30s' - -[Transactions.AutoPurge] -Enabled = true -Threshold = 90 -MinAttempts = 3 - -[BalanceMonitor] -Enabled = true - -[GasEstimator] -Mode = 'BlockHistory' -PriceDefault = '20 gwei' -PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether' -PriceMin = '1 wei' -LimitDefault = 8000000 -LimitMax = 8000000 -LimitMultiplier = '1' -LimitTransfer = 21000 -EstimateLimit = false -BumpMin = '100 wei' -BumpPercent = 20 -BumpThreshold = 3 -EIP1559DynamicFees = true -FeeCapDefault = '100 gwei' -TipCapDefault = '1 wei' -TipCapMin = '1 wei' - -[GasEstimator.BlockHistory] -BatchSize = 25 -BlockHistorySize = 24 -CheckInclusionBlocks = 12 -CheckInclusionPercentile = 90 -TransactionPercentile = 60 - -[GasEstimator.FeeHistory] -CacheTimeout = '10s' - -[HeadTracker] -HistoryDepth = 2000 -MaxBufferSize = 3 -SamplingInterval = '1s' -MaxAllowedFinalityDepth = 10000 -FinalityTagBypass = true - -[NodePool] -PollFailureThreshold = 5 -PollInterval = '10s' -SelectionMode = 'HighestHead' -SyncThreshold = 10 -LeaseDuration = '0s' -NodeIsSyncingEnabled = false -FinalizedBlockPollInterval = '5s' -EnforceRepeatableRead = false -DeathDeclarationDelay = '10s' - -[OCR] -ContractConfirmations = 1 -ContractTransmitterTransmitTimeout = '10s' -DatabaseTimeout = '10s' -DeltaCOverride = '168h0m0s' -DeltaCJitterOverride = '1h0m0s' -ObservationGracePeriod = '1s' - -[OCR2] -[OCR2.Automation] -GasLimit = 6500000 -``` - -

-
Linea Goerli (59140)

```toml @@ -7936,6 +7856,7 @@ MinIncomingConfirmations = 1 MinContractPayment = '0.00001 link' NonceAutoSync = true NoNewHeadsThreshold = '0s' +LogBroadcasterEnabled = true RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 2 FinalizedBlockOffset = 0 @@ -8000,6 +7921,7 @@ NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' EnforceRepeatableRead = false DeathDeclarationDelay = '10s' +NewHeadsPollInterval = '0s' [OCR] ContractConfirmations = 1 @@ -8012,6 +7934,9 @@ ObservationGracePeriod = '1s' [OCR2] [OCR2.Automation] GasLimit = 5400000 + +[Workflow] +GasLimitDefault = 400000 ```

@@ -8239,6 +8164,7 @@ MinIncomingConfirmations = 3 MinContractPayment = '0.00001 link' NonceAutoSync = true NoNewHeadsThreshold = '3m0s' +LogBroadcasterEnabled = true RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 FinalizedBlockOffset = 0 @@ -8304,6 +8230,7 @@ NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' EnforceRepeatableRead = false DeathDeclarationDelay = '10s' +NewHeadsPollInterval = '0s' [OCR] ContractConfirmations = 4 @@ -8316,6 +8243,9 @@ ObservationGracePeriod = '1s' [OCR2] [OCR2.Automation] GasLimit = 5400000 + +[Workflow] +GasLimitDefault = 400000 ```

@@ -9269,6 +9199,7 @@ MinIncomingConfirmations = 3 MinContractPayment = '0.00001 link' NonceAutoSync = true NoNewHeadsThreshold = '3m0s' +LogBroadcasterEnabled = true RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 FinalizedBlockOffset = 0 @@ -9334,6 +9265,7 @@ NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' EnforceRepeatableRead = false DeathDeclarationDelay = '10s' +NewHeadsPollInterval = '0s' [OCR] ContractConfirmations = 4 @@ -9346,6 +9278,9 @@ ObservationGracePeriod = '1s' [OCR2] [OCR2.Automation] GasLimit = 5400000 + +[Workflow] +GasLimitDefault = 400000 ```

@@ -10998,3 +10933,4 @@ URL is the base HTTP(S) endpoint for this node. APIKey = 'key' # Example ``` APIKey Header is optional and only required for Nethermind RPCs + diff --git a/go.md b/go.md index 3100bd2db0..02c01177b9 100644 --- a/go.md +++ b/go.md @@ -29,8 +29,6 @@ flowchart LR click chain-selectors href "https://github.com/smartcontractkit/chain-selectors" chainlink/v2 --> chainlink-automation click chainlink-automation href "https://github.com/smartcontractkit/chainlink-automation" - chainlink/v2 --> chainlink-ccip - click chainlink-ccip href "https://github.com/smartcontractkit/chainlink-ccip" chainlink/v2 --> chainlink-common click chainlink-common href "https://github.com/smartcontractkit/chainlink-common" chainlink/v2 --> chainlink-cosmos @@ -55,9 +53,6 @@ flowchart LR click wsrpc href "https://github.com/smartcontractkit/wsrpc" chainlink-automation --> chainlink-common chainlink-automation --> libocr - chainlink-ccip --> chain-selectors - chainlink-ccip --> chainlink-common - chainlink-ccip --> libocr chainlink-common --> grpc-proxy chainlink-common --> libocr chainlink-cosmos --> chainlink-common diff --git a/go.mod b/go.mod index df50538a52..beb2354edf 100644 --- a/go.mod +++ b/go.mod @@ -75,7 +75,6 @@ require ( github.com/shopspring/decimal v1.4.0 github.com/smartcontractkit/chain-selectors v1.0.27 github.com/smartcontractkit/chainlink-automation v1.0.4 - github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924115754-8858b0423283 github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925085218-aded1b263ecc github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240911175228-daf2600bb7b7 github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240916152957-433914114bd2 @@ -118,6 +117,7 @@ require ( google.golang.org/protobuf v1.34.2 gopkg.in/guregu/null.v4 v4.0.0 gopkg.in/natefinch/lumberjack.v2 v2.2.1 + k8s.io/utils v0.0.0-20230711102312-30195339c3c7 ) require ( diff --git a/go.sum b/go.sum index eef42444b2..2dcd978d70 100644 --- a/go.sum +++ b/go.sum @@ -1038,8 +1038,6 @@ github.com/smartcontractkit/chain-selectors v1.0.27 h1:VE/ftX9Aae4gnw67yR1raKi+3 github.com/smartcontractkit/chain-selectors v1.0.27/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8= github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924115754-8858b0423283 h1:f0vdqcOL9kJZwfmWE76roIyEuiZx/R82js0IfXNAvXg= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924115754-8858b0423283/go.mod h1:KP82vFCqm+M1G1t6Vos5CewGUGYJkxxCEdxnta4uLlE= github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925085218-aded1b263ecc h1:ALbyaoRzUSXQ2NhGFKVOyJqO22IB5yQjhjKWbIZGbrI= github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925085218-aded1b263ecc/go.mod h1:F6WUS6N4mP5ScwpwyTyAJc9/vjR+GXbMCRUOVekQi1g= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240911175228-daf2600bb7b7 h1:lTGIOQYLk1Ufn++X/AvZnt6VOcuhste5yp+C157No/Q= @@ -1707,6 +1705,8 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= +k8s.io/utils v0.0.0-20230711102312-30195339c3c7 h1:ZgnF1KZsYxWIifwSNZFZgNtWE89WI5yiP5WwlfDoIyc= +k8s.io/utils v0.0.0-20230711102312-30195339c3c7/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 h1:5D53IMaUuA5InSeMu9eJtlQXS2NxAhyWQvkKEgXZhHI= modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6/go.mod h1:Qz0X07sNOR1jWYCrJMEnbW/X55x206Q7Vt4mz6/wHp4= modernc.org/libc v1.41.0 h1:g9YAc6BkKlgORsUWj+JwqoB1wU3o4DE3bM3yvA3k+Gk= diff --git a/integration-tests/ccip-tests/Makefile b/integration-tests/ccip-tests/Makefile index 90304c1481..4aebd4c460 100644 --- a/integration-tests/ccip-tests/Makefile +++ b/integration-tests/ccip-tests/Makefile @@ -1,35 +1,17 @@ ## To Override the default config: -<<<<<<< HEAD # example usage: make set_config override_toml=../config/config.toml -======= -# example usage: make set_config override_toml=../config/config.toml network_config_toml=../config/network.toml ->>>>>>> v2.17.0 .PHONY: set_config set_config: if [ -s "$(override_toml)" ]; then \ echo "Overriding config with $(override_toml)"; \ -<<<<<<< HEAD - echo "export BASE64_CCIP_CONFIG_OVERRIDE=$$(base64 -i $(override_toml))" > ./testconfig/override/.env; \ - echo "export TEST_BASE64_CCIP_CONFIG_OVERRIDE=$$(base64 -i $(override_toml))" >> ./testconfig/override/.env; \ - echo "BASE64_CCIP_CONFIG_OVERRIDE=$$(base64 -i $(override_toml))" > ./testconfig/override/debug.env; \ - echo "TEST_BASE64_CCIP_CONFIG_OVERRIDE=$$(base64 -i $(override_toml))" >> ./testconfig/override/debug.env; \ -======= echo "export BASE64_CONFIG_OVERRIDE=$$(base64 -i $(override_toml))" > ./testconfig/override/.env; \ echo "export TEST_BASE64_CONFIG_OVERRIDE=$$(base64 -i $(override_toml))" >> ./testconfig/override/.env; \ echo "BASE64_CONFIG_OVERRIDE=$$(base64 -i $(override_toml))" > ./testconfig/override/debug.env; \ echo "TEST_BASE64_CONFIG_OVERRIDE=$$(base64 -i $(override_toml))" >> ./testconfig/override/debug.env; \ ->>>>>>> v2.17.0 else \ echo "No override config found, using default config"; \ echo > ./testconfig/override/.env; \ fi -<<<<<<< HEAD -======= - if [ -s "$(network_config_toml)" ]; then \ - echo "Overriding network config with $(network_config_toml)"; \ - echo "export BASE64_NETWORK_CONFIG=$$(base64 -i $(network_config_toml))" >> ./testconfig/override/.env; \ - fi ->>>>>>> v2.17.0 @echo "Checking for test secrets file in ~/.testsecrets..."; @if [ ! -f ~/.testsecrets ]; then \ @@ -70,13 +52,8 @@ test_smoke_ccip: set_config test_smoke_ccip_default: set_config source ./testconfig/override/.env && \ DATABASE_URL=postgresql://postgres:node@localhost:5432/chainlink_test?sslmode=disable \ -<<<<<<< HEAD - BASE64_CCIP_CONFIG_OVERRIDE="" \ - TEST_BASE64_CCIP_CONFIG_OVERRIDE="" \ -======= BASE64_CONFIG_OVERRIDE="" \ TEST_BASE64_CONFIG_OVERRIDE="" \ ->>>>>>> v2.17.0 ENV_JOB_IMAGE="" \ TEST_SUITE=smoke \ TEST_ARGS="-test.timeout 900h" \ @@ -90,7 +67,6 @@ test_smoke_ccip_default: set_config .PHONY: build_ccip_image build_ccip_image: docker build -f ../../core/chainlink.Dockerfile --build-arg COMMIT_SHA=$(git rev-parse HEAD) --build-arg CHAINLINK_USER=chainlink -t $(image):$(tag) ../../ -<<<<<<< HEAD # image: the name for the chainlink image being built, example: image=chainlink # tag: the tag for the chainlink image being built, example: tag=latest @@ -98,5 +74,3 @@ build_ccip_image: .PHONY: build_ccip_debug_image build_ccip_debug_image: docker build -f ../../core/chainlink.debug.Dockerfile --build-arg COMMIT_SHA=$(git rev-parse HEAD) --build-arg CHAINLINK_USER=chainlink -t $(image):$(tag) ../../ -======= ->>>>>>> v2.17.0 diff --git a/integration-tests/ccip-tests/README.md b/integration-tests/ccip-tests/README.md index f883eea212..855cfcde69 100644 --- a/integration-tests/ccip-tests/README.md +++ b/integration-tests/ccip-tests/README.md @@ -8,11 +8,7 @@ CCIP tests are designed to be highly configurable. Instead of writing many tests 1. Default test input - set via TOML - If no specific input is set; the tests will run with default inputs mentioned in [default.toml](./testconfig/tomls/ccip-default.toml). Please refer to the [testconfig README](../testconfig/README.md) for a more detailed look at how testconfig works. -<<<<<<< HEAD -2. If you want to run your test with a different config, you can override the default inputs. You can either write an [overrides.toml](../testconfig/README.md#configuration-and-overrides) file, or set the env var `BASE64_CCIP_CONFIG_OVERRIDE` containing the base64 encoded TOML file content with updated test input parameters. -======= 2. If you want to run your test with a different config, you can override the default inputs. You can either write an [overrides.toml](../testconfig/README.md#configuration-and-overrides) file, or set the env var `BASE64_CONFIG_OVERRIDE` containing the base64 encoded TOML file content with updated test input parameters. ->>>>>>> v2.17.0 For example, if you want to override the `Network` input in test and want to run your test on `avalanche testnet` and `arbitrum goerli` network, you need to: 1. Create a TOML file with the following content: @@ -24,17 +20,10 @@ For example, if you want to override the `Network` input in test and want to run ``` 2. Encode it using the `base64` command -<<<<<<< HEAD - 3. Set the env var `BASE64_CCIP_CONFIG_OVERRIDE` with the encoded content. - - ```bash - export BASE64_CCIP_CONFIG_OVERRIDE=$(base64 -i ) -======= 3. Set the env var `BASE64_CONFIG_OVERRIDE` with the encoded content. ```bash export BASE64_CONFIG_OVERRIDE=$(base64 -i ) ->>>>>>> v2.17.0 ``` [mainnet.toml](./testconfig/override/mainnet.toml), [override.toml](./testconfig/examples/override.toml.example) are some of the sample override TOML files. @@ -42,8 +31,7 @@ For example, if you want to override the `Network` input in test and want to run For example - In order to run the smoke test (TestSmokeCCIPForBidirectionalLane) on mainnet, run the test with following env var set: ```bash -<<<<<<< HEAD - export BASE64_CCIP_CONFIG_OVERRIDE=$(base64 -i ./testconfig/override/mainnet.toml) + export BASE64_CONFIG_OVERRIDE=$(base64 -i ./testconfig/override/mainnet.toml) ``` 3. Secrets - You also need to set some secrets. This is a mandatory step needed to run the tests. Please refer to [.testsecrets.example](./examples/.testsecrets.example) for the list of secrets and instruction how to set them up. diff --git a/integration-tests/ccip-tests/actions/ccip_helpers.go b/integration-tests/ccip-tests/actions/ccip_helpers.go index fa5b473937..49d6ed3fd1 100644 --- a/integration-tests/ccip-tests/actions/ccip_helpers.go +++ b/integration-tests/ccip-tests/actions/ccip_helpers.go @@ -61,10 +61,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/rmn_contract" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/token_pool" -<<<<<<< HEAD "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/ccipexec" -======= ->>>>>>> v2.17.0 "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/config" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/testhelpers" integrationtesthelpers "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/testhelpers/integration" @@ -733,7 +730,6 @@ func (ccipModule *CCIPCommon) WriteLaneConfig(conf *laneconfig.LaneConfig) { for k, v := range ccipModule.PriceAggregators { priceAggrs[k.Hex()] = v.ContractAddress.Hex() } -<<<<<<< HEAD conf.CommonContracts.FeeToken = ccipModule.FeeToken.Address() conf.CommonContracts.BridgeTokens = btAddresses conf.CommonContracts.BridgeTokenPools = btpAddresses @@ -744,19 +740,6 @@ func (ccipModule *CCIPCommon) WriteLaneConfig(conf *laneconfig.LaneConfig) { conf.CommonContracts.WrappedNative = ccipModule.WrappedNative.Hex() conf.CommonContracts.Multicall = ccipModule.MulticallContract.Hex() -======= - conf.CommonContracts = laneconfig.CommonContracts{ - FeeToken: ccipModule.FeeToken.Address(), - BridgeTokens: btAddresses, - BridgeTokenPools: btpAddresses, - ARM: ccipModule.RMNContract.Hex(), - Router: ccipModule.Router.Address(), - PriceRegistry: ccipModule.PriceRegistry.Address(), - PriceAggregators: priceAggrs, - WrappedNative: ccipModule.WrappedNative.Hex(), - Multicall: ccipModule.MulticallContract.Hex(), - } ->>>>>>> v2.17.0 if ccipModule.TokenAdminRegistry != nil { conf.CommonContracts.TokenAdminRegistry = ccipModule.TokenAdminRegistry.Address() } @@ -1665,14 +1648,10 @@ func (sourceCCIP *SourceCCIPModule) IsRequestTriggeredWithinTimeframe(timeframe // IsPastRequestTriggeredWithinTimeframe determines the average block time and calculates the block numbers // within the specified timeframe. It then uses FilterCCIPSendRequested to identify the past events. -<<<<<<< HEAD func (sourceCCIP *SourceCCIPModule) IsPastRequestTriggeredWithinTimeframe( ctx context.Context, timeframe *commonconfig.Duration, ) (*types.Log, error) { -======= -func (sourceCCIP *SourceCCIPModule) IsPastRequestTriggeredWithinTimeframe(ctx context.Context, timeframe *commonconfig.Duration) (*time.Time, error) { ->>>>>>> v2.17.0 if timeframe == nil { return nil, nil } @@ -1699,7 +1678,6 @@ func (sourceCCIP *SourceCCIPModule) IsPastRequestTriggeredWithinTimeframe(ctx co return nil, fmt.Errorf("error while filtering CCIP send requested starting block number: %d. Error: %w", filterFromBlock, err) } defer func() { -<<<<<<< HEAD iterErr := iterator.Close() if iterErr != nil { sourceCCIP.Common.Logger.Error().Err(iterErr).Msg("Error closing iterator") @@ -1715,19 +1693,6 @@ func (sourceCCIP *SourceCCIPModule) IsPastRequestTriggeredWithinTimeframe(ctx co } } return latestEvent, nil -======= - _ = iterator.Close() - }() - if iterator.Next() { - hdr, err := sourceCCIP.Common.ChainClient.HeaderByNumber(context.Background(), big.NewInt(int64(iterator.Event.Raw.BlockNumber))) - if err != nil { - return nil, fmt.Errorf("error getting header for block: %d, Error: %w", iterator.Event.Raw.BlockNumber, err) - } - return pointer.ToTime(hdr.Timestamp), nil - } - - return nil, nil ->>>>>>> v2.17.0 } func (sourceCCIP *SourceCCIPModule) AssertEventCCIPSendRequested( @@ -1851,11 +1816,7 @@ func (sourceCCIP *SourceCCIPModule) CCIPMsg( extraArgs, err = testhelpers.GetEVMExtraArgsV2(gasLimit, allowOutOfOrder) } if err != nil { -<<<<<<< HEAD - return router.ClientEVM2AnyMessage{}, fmt.Errorf("failed encoding the options field: %w", err) -======= return router.ClientEVM2AnyMessage{}, fmt.Errorf("failed getting extra args: %w", err) ->>>>>>> v2.17.0 } // form the message for transfer return router.ClientEVM2AnyMessage{ @@ -1868,14 +1829,10 @@ func (sourceCCIP *SourceCCIPModule) CCIPMsg( } // SendRequest sends a CCIP request to the source chain's router contract -<<<<<<< HEAD -func (sourceCCIP *SourceCCIPModule) SendRequest(receiver common.Address, gasLimit *big.Int) (common.Hash, time.Duration, *big.Int, error) { -======= func (sourceCCIP *SourceCCIPModule) SendRequest( receiver common.Address, gasLimit *big.Int, ) (common.Hash, time.Duration, *big.Int, error) { ->>>>>>> v2.17.0 var d time.Duration destChainSelector, err := chainselectors.SelectorFromChainId(sourceCCIP.DestinationChainId) if err != nil { @@ -2900,16 +2857,11 @@ func (lane *CCIPLane) AddToSentReqs(txHash common.Hash, reqStats []*testreporter func (lane *CCIPLane) Multicall(noOfRequests int, multiSendAddr common.Address) error { var ccipMultipleMsg []contracts.CCIPMsgData feeToken := common.HexToAddress(lane.Source.Common.FeeToken.Address()) -<<<<<<< HEAD - genericMsg, err := lane.Source.CCIPMsg(lane.Dest.ReceiverDapp.EthAddress, lane.Source.Common.AllowOutOfOrder, - big.NewInt(DefaultDestinationGasLimit)) -======= genericMsg, err := lane.Source.CCIPMsg( lane.Dest.ReceiverDapp.EthAddress, lane.Source.Common.AllowOutOfOrder, big.NewInt(DefaultDestinationGasLimit), ) ->>>>>>> v2.17.0 if err != nil { return fmt.Errorf("failed to form the ccip message: %w", err) } @@ -3258,11 +3210,7 @@ func (lane *CCIPLane) ValidateRequestByTxHash(txHash common.Hash, opts validatio reqStats = append(reqStats, req.RequestStat) } -<<<<<<< HEAD if (opts.phaseExpectedToFail == testreporters.CCIPSendRe || opts.expectAnyPhaseToFail) && opts.timeout != 0 { -======= - if opts.phaseExpectedToFail == testreporters.CCIPSendRe && opts.timeout != 0 { ->>>>>>> v2.17.0 timeout = opts.timeout } msgLogs, ccipSendReqGenAt, err := lane.Source.AssertEventCCIPSendRequested( @@ -3290,13 +3238,10 @@ func (lane *CCIPLane) ValidateRequestByTxHash(txHash common.Hash, opts validatio return fmt.Errorf("could not find request stat for seq number %d", seqNumber) } -<<<<<<< HEAD if opts.expectAnyPhaseToFail && opts.timeout != 0 { timeout = opts.timeout } -======= ->>>>>>> v2.17.0 if opts.phaseExpectedToFail == testreporters.Commit && opts.timeout != 0 { timeout = opts.timeout } @@ -3336,12 +3281,10 @@ func (lane *CCIPLane) ValidateRequestByTxHash(txHash common.Hash, opts validatio return phaseErr } } -<<<<<<< HEAD if opts.expectAnyPhaseToFail { return fmt.Errorf("expected at least any one phase to fail but no phase got failed") } -======= ->>>>>>> v2.17.0 + return nil } @@ -3661,15 +3604,9 @@ func (lane *CCIPLane) DeployNewCCIPLane( return fmt.Errorf("failed to create source module: %w", err) } -<<<<<<< HEAD - // If AllowOutOfOrder is set globally in test config, then assumption is to set it for every lane. - //However, if this is set as false, and set as true for specific chain in lane_configs then apply it - //only for a lane where source network is of that chain. -======= // If AllowOutOfOrder is set globally in test config, the assumption is to set it for every lane. // However, if this is set as false, and set as true for specific chain in lane_configs, then apply it // only for a lane where source network is of that chain. ->>>>>>> v2.17.0 if allowOutOfOrder { lane.Source.Common.AllowOutOfOrder = true } @@ -3924,7 +3861,6 @@ func SetOCR2Config( if len(execNodes) > 0 { nodes = execNodes } -<<<<<<< HEAD // Use out of order batching strategy if we expect to be sending out of order messages batchingStrategyID := ccipexec.BestEffortBatchingStrategyID @@ -3932,14 +3868,6 @@ func SetOCR2Config( batchingStrategyID = ccipexec.ZKOverflowBatchingStrategyID } if destCCIP.OffRamp != nil { -======= - if destCCIP.OffRamp != nil { - // Use out of order batching strategy if we expect to be sending out of order messages - batchingStrategyID := uint32(0) - if pointer.GetBool(testConf.AllowOutOfOrder) { - batchingStrategyID = uint32(1) - } ->>>>>>> v2.17.0 execOffchainCfg, err := contracts.NewExecOffchainConfig( 1, BatchGasLimit, @@ -4201,10 +4129,7 @@ func (c *CCIPTestEnv) ConnectToExistingNodes(envConfig *testconfig.Common) error if err != nil { return fmt.Errorf("failed to create chainlink client: %w for node %d config %v", err, i+1, cfg) } -<<<<<<< HEAD clClient.ChainlinkClient.WithRetryCount(3) -======= ->>>>>>> v2.17.0 c.CLNodes = append(c.CLNodes, clClient) c.nodeMutexes = append(c.nodeMutexes, &sync.Mutex{}) } @@ -4218,11 +4143,7 @@ func (c *CCIPTestEnv) ConnectToDeployedNodes() error { for _, chainlinkNode := range c.LocalCluster.ClCluster.Nodes { c.nodeMutexes = append(c.nodeMutexes, &sync.Mutex{}) c.CLNodes = append(c.CLNodes, &client.ChainlinkK8sClient{ -<<<<<<< HEAD ChainlinkClient: chainlinkNode.API.WithRetryCount(3), -======= - ChainlinkClient: chainlinkNode.API, ->>>>>>> v2.17.0 }) } } else { @@ -4236,12 +4157,7 @@ func (c *CCIPTestEnv) ConnectToDeployedNodes() error { return fmt.Errorf("no CL node found") } -<<<<<<< HEAD - for i := range chainlinkK8sNodes { - chainlinkK8sNodes[i].ChainlinkClient.WithRetryCount(3) -======= for range chainlinkK8sNodes { ->>>>>>> v2.17.0 c.nodeMutexes = append(c.nodeMutexes, &sync.Mutex{}) } c.CLNodes = chainlinkK8sNodes diff --git a/integration-tests/ccip-tests/load/ccip_loadgen.go b/integration-tests/ccip-tests/load/ccip_loadgen.go index cf95bf7cf6..8a3059feca 100644 --- a/integration-tests/ccip-tests/load/ccip_loadgen.go +++ b/integration-tests/ccip-tests/load/ccip_loadgen.go @@ -10,33 +10,20 @@ import ( "testing" "time" -<<<<<<< HEAD -======= - "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/testcontext" - ->>>>>>> v2.17.0 "github.com/AlekSi/pointer" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/rs/zerolog" -<<<<<<< HEAD "github.com/stretchr/testify/require" "go.uber.org/atomic" chain_selectors "github.com/smartcontractkit/chain-selectors" "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/testcontext" -======= - chain_selectors "github.com/smartcontractkit/chain-selectors" - "github.com/stretchr/testify/require" - "go.uber.org/atomic" - ->>>>>>> v2.17.0 "github.com/smartcontractkit/chainlink-testing-framework/wasp" "github.com/smartcontractkit/chainlink-common/pkg/config" -<<<<<<< HEAD "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/actions" "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/contracts" "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/testconfig" @@ -44,16 +31,6 @@ import ( "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/services/ocr2/plugins/ccip/testhelpers" -======= - "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/contracts" - "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/testconfig" - "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/services/ocr2/plugins/ccip/testhelpers" - - "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/actions" - "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/testreporters" ->>>>>>> v2.17.0 ) // CCIPLaneOptimized is a light-weight version of CCIPLane, It only contains elements which are used during load triggering and validation @@ -220,10 +197,7 @@ func (c *CCIPE2ELoad) CCIPMsg() (router.ClientEVM2AnyMessage, *testreporters.Req extraArgs []byte err error ) -<<<<<<< HEAD // v1.5.0 and later starts using V2 extra args -======= ->>>>>>> v2.17.0 matchErr := contracts.MatchContractVersionsOrAbove(map[contracts.Name]contracts.Version{ contracts.OnRampContract: contracts.V1_5_0, }) @@ -251,16 +225,12 @@ func (c *CCIPE2ELoad) Call(_ *wasp.Generator) *wasp.Response { res := &wasp.Response{} sourceCCIP := c.Lane.Source var recentRequestFoundAt *time.Time -<<<<<<< HEAD var latestEvent *types.Log -======= ->>>>>>> v2.17.0 var err error // Use IsPastRequestTriggeredWithinTimeframe to check for any historical CCIP send request events // within the specified timeframe for the first message. Subsequently, use the watcher method to monitor // and detect any new events as they occur. if c.CurrentMsgSerialNo.Load() == int64(1) { -<<<<<<< HEAD latestEvent, err = sourceCCIP.IsPastRequestTriggeredWithinTimeframe(testcontext.Get(c.t), c.SkipRequestIfAnotherRequestTriggeredWithin) require.NoError(c.t, err, "error while filtering past requests") if latestEvent != nil { @@ -268,10 +238,6 @@ func (c *CCIPE2ELoad) Call(_ *wasp.Generator) *wasp.Response { require.NoError(c.t, err, "error while getting header by block number") recentRequestFoundAt = pointer.ToTime(hdr.Timestamp) } -======= - recentRequestFoundAt, err = sourceCCIP.IsPastRequestTriggeredWithinTimeframe(testcontext.Get(c.t), c.SkipRequestIfAnotherRequestTriggeredWithin) - require.NoError(c.t, err, "error while filtering past requests") ->>>>>>> v2.17.0 } else { recentRequestFoundAt = sourceCCIP.IsRequestTriggeredWithinTimeframe(c.SkipRequestIfAnotherRequestTriggeredWithin) } diff --git a/integration-tests/ccip-tests/load/ccip_multicall_loadgen.go b/integration-tests/ccip-tests/load/ccip_multicall_loadgen.go index 8a02aa7dc7..39e5388244 100644 --- a/integration-tests/ccip-tests/load/ccip_multicall_loadgen.go +++ b/integration-tests/ccip-tests/load/ccip_multicall_loadgen.go @@ -91,11 +91,7 @@ func NewMultiCallLoadGenerator(testCfg *testsetups.CCIPTestConfig, lanes []*acti testCfg.Test, lane, testCfg.TestGroupInput.PhaseTimeout.Duration(), 100000, testCfg.TestGroupInput.LoadProfile.MsgProfile, 0, -<<<<<<< HEAD testCfg.TestGroupInput.SkipRequestIfAnotherRequestTriggeredWithin, -======= - testCfg.TestGroupInput.LoadProfile.SkipRequestIfAnotherRequestTriggeredWithin, ->>>>>>> v2.17.0 ) ccipLoad.BeforeAllCall() m.E2ELoads[fmt.Sprintf("%s-%s", lane.SourceNetworkName, lane.DestNetworkName)] = ccipLoad diff --git a/integration-tests/ccip-tests/load/helper.go b/integration-tests/ccip-tests/load/helper.go index 03607a8329..f89aadc248 100644 --- a/integration-tests/ccip-tests/load/helper.go +++ b/integration-tests/ccip-tests/load/helper.go @@ -112,7 +112,6 @@ func (l *LoadArgs) scheduleForDest(destNetworkName string) []*wasp.Segment { // if found, use that frequency for the destination network // otherwise, use the default frequency if l.TestCfg.TestGroupInput.LoadProfile.FrequencyByDestination != nil { -<<<<<<< HEAD l.lggr.Debug(). Interface("FrequencyByDestination", l.TestCfg.TestGroupInput.LoadProfile.FrequencyByDestination). Msg("LoadProfile provided") @@ -122,10 +121,6 @@ func (l *LoadArgs) scheduleForDest(destNetworkName string) []*wasp.Segment { l.lggr.Info().Str("Destination", destNetworkName). Ints64("RequestPerUnitTime", freq.RequestPerUnitTime). Msg("Using frequency for destination") -======= - for networkName, freq := range l.TestCfg.TestGroupInput.LoadProfile.FrequencyByDestination { - if strings.Contains(destNetworkName, networkName) { ->>>>>>> v2.17.0 return WaspSchedule( freq.RequestPerUnitTime, l.TestCfg.TestGroupInput.LoadProfile.TestDuration, @@ -281,11 +276,7 @@ func (l *LoadArgs) TriggerLoadByLane() { ccipLoad := NewCCIPLoad( l.TestCfg.Test, lane, l.TestCfg.TestGroupInput.PhaseTimeout.Duration(), 100000, l.TestCfg.TestGroupInput.LoadProfile.MsgProfile, sendMaxData, -<<<<<<< HEAD l.TestCfg.TestGroupInput.SkipRequestIfAnotherRequestTriggeredWithin, -======= - l.TestCfg.TestGroupInput.LoadProfile.SkipRequestIfAnotherRequestTriggeredWithin, ->>>>>>> v2.17.0 ) ccipLoad.BeforeAllCall() // if it's not multicall set the tokens to nil to free up some space, @@ -321,11 +312,7 @@ func (l *LoadArgs) TriggerLoadByLane() { } waspCfg.LokiConfig.Timeout = time.Minute loadRunner, err := wasp.NewGenerator(waspCfg) -<<<<<<< HEAD - require.NoError(l.TestCfg.Test, err, "initiating loadgen for lane %s --> %s", -======= require.NoError(l.TestCfg.Test, err, "error while initiating loadgen for lane %s --> %s", ->>>>>>> v2.17.0 lane.SourceNetworkName, lane.DestNetworkName) loadRunner.Run(false) l.AddToRunnerGroup(loadRunner) diff --git a/integration-tests/ccip-tests/smoke/ccip_test.go b/integration-tests/ccip-tests/smoke/ccip_test.go index ab8d81747e..cc8cc9b9a4 100644 --- a/integration-tests/ccip-tests/smoke/ccip_test.go +++ b/integration-tests/ccip-tests/smoke/ccip_test.go @@ -3,7 +3,6 @@ package smoke import ( "fmt" "math/big" -<<<<<<< HEAD "strings" "testing" "time" @@ -17,39 +16,18 @@ import ( "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/osutil" "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/ptr" "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/actions" + "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/testsetups" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" -======= - "testing" - "time" - - "github.com/rs/zerolog" - "github.com/stretchr/testify/assert" - - "github.com/AlekSi/pointer" - "github.com/stretchr/testify/require" - - "github.com/smartcontractkit/chainlink-testing-framework/lib/logging" - "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/ptr" - - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/evm_2_evm_onramp" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/lock_release_token_pool" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/token_pool" - - "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/actions" ->>>>>>> v2.17.0 "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/contracts" "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/testconfig" "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/testreporters" - "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/testsetups" -<<<<<<< HEAD + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/evm_2_evm_onramp" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/lock_release_token_pool" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/token_pool" -======= ->>>>>>> v2.17.0 ) type testDefinition struct { @@ -61,10 +39,7 @@ func TestSmokeCCIPForBidirectionalLane(t *testing.T) { t.Parallel() log := logging.GetTestLogger(t) TestCfg := testsetups.NewCCIPTestConfig(t, log, testconfig.Smoke) -<<<<<<< HEAD -======= require.NotNil(t, TestCfg.TestGroupInput.MsgDetails.DestGasLimit) ->>>>>>> v2.17.0 gasLimit := big.NewInt(*TestCfg.TestGroupInput.MsgDetails.DestGasLimit) setUpOutput := testsetups.CCIPDefaultTestSetUp(t, &log, "smoke-ccip", nil, TestCfg) if len(setUpOutput.Lanes) == 0 { @@ -273,14 +248,10 @@ func TestSmokeCCIPRateLimit(t *testing.T) { tc.lane.Source.Common.ChainClient.GetDefaultWallet(), src.Common.Router.Address(), src.TransferAmount[0]), ) require.NoError(t, tc.lane.Source.Common.ChainClient.WaitForEvents()) -<<<<<<< HEAD failedTx, _, _, err := tc.lane.Source.SendRequest( tc.lane.Dest.ReceiverDapp.EthAddress, big.NewInt(actions.DefaultDestinationGasLimit), ) -======= - failedTx, _, _, err := tc.lane.Source.SendRequest(tc.lane.Dest.ReceiverDapp.EthAddress, big.NewInt(actions.DefaultDestinationGasLimit)) ->>>>>>> v2.17.0 require.NoError(t, err) require.Error(t, tc.lane.Source.Common.ChainClient.WaitForEvents()) errReason, v, err := tc.lane.Source.Common.ChainClient.RevertReasonFromTx(failedTx, evm_2_evm_onramp.EVM2EVMOnRampABI) @@ -941,7 +912,6 @@ func TestSmokeCCIPReorgAboveFinalityAtSource(t *testing.T) { }) } -<<<<<<< HEAD // TestSmokeCCIPForGivenNetworkPairs is designed specifically for scheduled mainnet testing. This test checks for recent // transaction and skip the lanes accordingly. This test also has capability to take override input on network pairs and phase timeout. func TestSmokeCCIPForGivenNetworkPairs(t *testing.T) { @@ -1059,8 +1029,6 @@ func TestSmokeCCIPForGivenNetworkPairs(t *testing.T) { } } -======= ->>>>>>> v2.17.0 // performAboveFinalityReorgAndValidate is to perform the above finality reorg test func performAboveFinalityReorgAndValidate(t *testing.T, network string) { t.Helper() @@ -1103,21 +1071,13 @@ func performAboveFinalityReorgAndValidate(t *testing.T, network string) { require.NoError(t, err) for _, d := range resp.Data { if d.Attributes.Name == logPollerName && d.Attributes.Output == "finality violated" && d.Attributes.Status == "failing" { -<<<<<<< HEAD log.Debug().Str("Node", node.ChainlinkClient.URL()).Msg("Finality violated is detected by node") -======= - log.Debug().Msg("Finality violated is detected by node") ->>>>>>> v2.17.0 nodesDetectedViolation[node.ChainlinkClient.URL()] = true } } } return len(nodesDetectedViolation) == len(clNodes) -<<<<<<< HEAD }, 5*time.Minute, 5*time.Second, "Reorg above finality depth is not detected by every node") -======= - }, 3*time.Minute, 20*time.Second, "Reorg above finality depth is not detected by every node") ->>>>>>> v2.17.0 log.Debug().Interface("Nodes", nodesDetectedViolation).Msg("Violation detection details") // send another request and verify it fails err = lane.SendRequests(1, gasLimit) diff --git a/integration-tests/ccip-tests/testconfig/README.md b/integration-tests/ccip-tests/testconfig/README.md index 1614ed62eb..cf1431baa9 100644 --- a/integration-tests/ccip-tests/testconfig/README.md +++ b/integration-tests/ccip-tests/testconfig/README.md @@ -6,19 +6,11 @@ The test config is read in following order: - The test reads the default configuration from [ccip-default.toml](./tomls/ccip-default.toml). - The default can be overridden by specifying the test config in a separate file. -<<<<<<< HEAD - The file content needs to be encoded in base64 format and set in `BASE64_CCIP_CONFIG_OVERRIDE` environment variable. - The config mentioned in this file will override the default config. - Example override file - [override.toml.example](./examples/override.toml.example) - If there are sensitive details like private keys, credentials in test config, they can be specified in a separate dotenv file as env vars - The `~/.testsecrets` file in home directory is automatically loaded and should have all test secrets as env vars. Learn more about it [here](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/config/README.md#test-secrets) -======= - - The file content needs to be encoded in base64 format and set in `BASE64_CONFIG_OVERRIDE` environment variable. - - The config mentioned in this file will override the default config. - - Example override file - [override.toml.example](./examples/override.toml.example) -- If there are sensitive details like private keys, credentials in test config, they can be specified in a separate dotenv file as env vars - - The `~/.testsecrets` file in home directory is automatically loaded and should have all test secrets as env vars ->>>>>>> v2.17.0 - Example secret file - [.testsecrets.example](./examples/.testsecrets.example) ## CCIP.ContractVersions @@ -118,11 +110,7 @@ Or, DataFile = '' ``` -<<<<<<< HEAD ## CCIP.Env -======= -## CCIP.Env ->>>>>>> v2.17.0 Specifies the environment details for the test to be run on. Mandatory fields are: @@ -131,18 +119,7 @@ Mandatory fields are: - **NewCLCluster**: [CCIP.Env.NewCLCluster](#ccipenvnewclcluster) - This is mandatory if the test needs to deploy Chainlink nodes. - **ExistingCLCluster**: [CCIP.Env.ExistingCLCluster](#ccipenvexistingclcluster) - This is mandatory if the test needs to run on existing Chainlink nodes to deploy ccip jobs. -<<<<<<< HEAD Test needs network/chain details to be set through configuration. Set network urls in ~/.testsecrets [see docs](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/config/README.md#test-secrets). -======= -Test needs network/chain details to be set through configuration. This configuration is mandatory for running the tests. -you have option to set the network details in two ways: - -1. Using [CCIP.Env.Networks](#ccipenvnetworks) -2. Using a separate network config file - - - refer to the example - [network_config.toml.example](./examples/network_config.toml.example) - - once all necessary values are set, encode the toml file content in base64 format, - - set the base64'ed string content in `BASE64_NETWORK_CONFIG` environment variable. ->>>>>>> v2.17.0 ### CCIP.Env.Networks @@ -162,11 +139,7 @@ If the network is not present in known_networks, then the network details can be #### CCIP.Env.Network.EVMNetworks -<<<<<<< HEAD Specifies the network config to be used while creating blockchain EVMClient for test. -======= -Specifies the network config to be used while creating blockchain EVMClient for test. ->>>>>>> v2.17.0 It is a map of network name to EVMNetworks where key is network name specified under `CCIP.Env.Networks.selected_networks` and value is `EVMNetwork`. The EVMNetwork is imported from [EVMNetwork](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/blockchain/config.go#L43) in chainlink-testing-framework. @@ -684,7 +657,6 @@ Specifies the OCR parameters for the execute job. This is only valid if the test Specifies the value for the `InflightExpiry` in commit job's offchain config. This is only valid if the test is not run on [existing deployments](#ccipgroupstestgroupexistingdeployment). -<<<<<<< HEAD ### CCIP.Groups.[testgroup].SkipRequestIfAnotherRequestTriggeredWithin If there is CCIP Send requested event present within this duration, the test will skip sending another @@ -692,8 +664,6 @@ request during load run or avoid sending request in smoke test in that lane. For if `SkipRequestIfAnotherRequestTriggeredWithin` is set to `40m`, and a request is triggered at 0th second, the test will skip sending another request for another 40m. This particular field is used to avoid sending transaction when there is traffic already in that lane. -======= ->>>>>>> v2.17.0 ### CCIP.Groups.[testgroup].OffRampConfig Specifies the offramp configuration for the execution job. This is only valid if the test is not run on [existing deployments](#ccipgroupstestgroupexistingdeployment). @@ -773,14 +743,6 @@ Specifies the duration network delay used for `NetworkChaos` experiment. This is If there are multiple chaos experiments, this specifies the duration to wait between each chaos experiment. This is only valid if the test is run on k8s and not on [existing deployments](#ccipgroupstestgroupexistingdeployment). -<<<<<<< HEAD -======= -#### CCIP.Groups.[testgroup].LoadProfile.SkipRequestIfAnotherRequestTriggeredWithin - -If a request is triggered within this duration, the test will skip sending another request during load run. For Example, if `SkipRequestIfAnotherRequestTriggeredWithin` is set to `40m`, and a request is triggered at 0th second, the test will skip sending another request for another 40m. -This particular field is used to avoid sending multiple requests in a short duration during load run. - ->>>>>>> v2.17.0 #### CCIP.Groups.[testgroup].LoadProfile.OptimizeSpace This is used internally to optimize memory usage during load run. If set to true, after the initial lane set up is over the test will discard the lane config to save memory. @@ -861,8 +823,4 @@ DataLength = 10000 MsgType = 'Data' DestGasLimit = 2500000 DataLength = 10000 -<<<<<<< HEAD -``` -======= ``` ->>>>>>> v2.17.0 diff --git a/integration-tests/ccip-tests/testconfig/ccip.go b/integration-tests/ccip-tests/testconfig/ccip.go index 9add765d09..f0b63c8fae 100644 --- a/integration-tests/ccip-tests/testconfig/ccip.go +++ b/integration-tests/ccip-tests/testconfig/ccip.go @@ -211,7 +211,6 @@ type LoadFrequency struct { } type LoadProfile struct { -<<<<<<< HEAD MsgProfile *MsgProfile `toml:",omitempty"` FrequencyByDestination map[string]*LoadFrequency `toml:",omitempty"` RequestPerUnitTime []int64 `toml:",omitempty"` @@ -224,21 +223,6 @@ type LoadProfile struct { FailOnFirstErrorInLoad *bool `toml:",omitempty"` SendMaxDataInEveryMsgCount *int64 `toml:",omitempty"` TestRunName string `toml:",omitempty"` -======= - MsgProfile *MsgProfile `toml:",omitempty"` - FrequencyByDestination map[string]*LoadFrequency `toml:",omitempty"` - RequestPerUnitTime []int64 `toml:",omitempty"` - TimeUnit *config.Duration `toml:",omitempty"` - StepDuration []*config.Duration `toml:",omitempty"` - TestDuration *config.Duration `toml:",omitempty"` - NetworkChaosDelay *config.Duration `toml:",omitempty"` - WaitBetweenChaosDuringLoad *config.Duration `toml:",omitempty"` - SkipRequestIfAnotherRequestTriggeredWithin *config.Duration `toml:",omitempty"` - OptimizeSpace *bool `toml:",omitempty"` - FailOnFirstErrorInLoad *bool `toml:",omitempty"` - SendMaxDataInEveryMsgCount *int64 `toml:",omitempty"` - TestRunName string `toml:",omitempty"` ->>>>>>> v2.17.0 } func (l *LoadProfile) Validate() error { @@ -257,13 +241,6 @@ func (l *LoadProfile) Validate() error { if l.TestDuration == nil || l.TestDuration.Duration().Minutes() == 0 { return fmt.Errorf("test duration should be set") } -<<<<<<< HEAD - -======= - if l.SkipRequestIfAnotherRequestTriggeredWithin != nil && l.TimeUnit.Duration() < l.SkipRequestIfAnotherRequestTriggeredWithin.Duration() { - return fmt.Errorf("SkipRequestIfAnotherRequestTriggeredWithin should be set below the TimeUnit duration") - } ->>>>>>> v2.17.0 return nil } @@ -284,7 +261,6 @@ func (gp *ReorgProfile) Validate() error { // CCIPTestGroupConfig defines configuration input to change how a particular CCIP test group should run type CCIPTestGroupConfig struct { -<<<<<<< HEAD Type string `toml:",omitempty"` KeepEnvAlive *bool `toml:",omitempty"` BiDirectionalLane *bool `toml:",omitempty"` @@ -315,37 +291,6 @@ type CCIPTestGroupConfig struct { LoadProfile *LoadProfile `toml:",omitempty"` ReorgProfile *ReorgProfile `toml:",omitempty"` SkipRequestIfAnotherRequestTriggeredWithin *config.Duration `toml:",omitempty"` -======= - Type string `toml:",omitempty"` - KeepEnvAlive *bool `toml:",omitempty"` - BiDirectionalLane *bool `toml:",omitempty"` - CommitAndExecuteOnSameDON *bool `toml:",omitempty"` - AllowOutOfOrder *bool `toml:",omitempty"` // To set out of order execution globally - NoOfCommitNodes int `toml:",omitempty"` - MsgDetails *MsgDetails `toml:",omitempty"` - TokenConfig *TokenConfig `toml:",omitempty"` - MulticallInOneTx *bool `toml:",omitempty"` - NoOfSendsInMulticall int `toml:",omitempty"` - PhaseTimeout *config.Duration `toml:",omitempty"` - LocalCluster *bool `toml:",omitempty"` - ExistingDeployment *bool `toml:",omitempty"` - ReuseContracts *bool `toml:",omitempty"` - NodeFunding float64 `toml:",omitempty"` - NetworkPairs []string `toml:",omitempty"` - DenselyConnectedNetworkChainIds []string `toml:",omitempty"` - NoOfNetworks int `toml:",omitempty"` - NoOfRoutersPerPair int `toml:",omitempty"` - MaxNoOfLanes int `toml:",omitempty"` - ChaosDuration *config.Duration `toml:",omitempty"` - USDCMockDeployment *bool `toml:",omitempty"` - CommitOCRParams *contracts.OffChainAggregatorV2Config `toml:",omitempty"` - ExecOCRParams *contracts.OffChainAggregatorV2Config `toml:",omitempty"` - OffRampConfig *OffRampConfig `toml:",omitempty"` - CommitInflightExpiry *config.Duration `toml:",omitempty"` - StoreLaneConfig *bool `toml:",omitempty"` - LoadProfile *LoadProfile `toml:",omitempty"` - ReorgProfile *ReorgProfile `toml:",omitempty"` ->>>>>>> v2.17.0 } func (c *CCIPTestGroupConfig) Validate() error { @@ -362,14 +307,11 @@ func (c *CCIPTestGroupConfig) Validate() error { return fmt.Errorf("test run name should be set if existing deployment is true and test is running in k8s") } } -<<<<<<< HEAD if c.ReorgProfile != nil { if err := c.ReorgProfile.Validate(); err != nil { return err } } -======= ->>>>>>> v2.17.0 } err := c.MsgDetails.Validate() if err != nil { @@ -396,13 +338,10 @@ func (c *CCIPTestGroupConfig) Validate() error { return fmt.Errorf("number of sends in multisend should be greater than 0 if multisend is true") } } -<<<<<<< HEAD if c.SkipRequestIfAnotherRequestTriggeredWithin != nil && c.LoadProfile != nil && c.LoadProfile.TimeUnit.Duration() < c.SkipRequestIfAnotherRequestTriggeredWithin.Duration() { return fmt.Errorf("SkipRequestIfAnotherRequestTriggeredWithin should be set below the load TimeUnit duration") } -======= ->>>>>>> v2.17.0 return nil } diff --git a/integration-tests/ccip-tests/testconfig/examples/.testsecrets.example b/integration-tests/ccip-tests/testconfig/examples/.testsecrets.example index bba5ab0bc2..52afa77015 100644 --- a/integration-tests/ccip-tests/testconfig/examples/.testsecrets.example +++ b/integration-tests/ccip-tests/testconfig/examples/.testsecrets.example @@ -36,8 +36,4 @@ E2E_TEST_LOKI_ENDPOINT="" # Grafana secrets E2E_TEST_GRAFANA_BASE_URL="" -<<<<<<< HEAD -E2E_TEST_GRAFANA_DASHBOARD_URL="/d/6vjVx-1V8/ccip-long-running-tests" -======= -E2E_TEST_GRAFANA_DASHBOARD_URL="/d/6vjVx-1V8/ccip-long-running-tests" ->>>>>>> v2.17.0 +E2E_TEST_GRAFANA_DASHBOARD_URL="/d/6vjVx-1V8/ccip-long-running-tests" \ No newline at end of file diff --git a/integration-tests/ccip-tests/testconfig/global.go b/integration-tests/ccip-tests/testconfig/global.go index 3e632f4b38..d2b3f599b1 100644 --- a/integration-tests/ccip-tests/testconfig/global.go +++ b/integration-tests/ccip-tests/testconfig/global.go @@ -29,12 +29,7 @@ import ( ) const ( -<<<<<<< HEAD - OVERIDECONFIG = "BASE64_CCIP_CONFIG_OVERRIDE" - -======= OVERIDECONFIG = "BASE64_CONFIG_OVERRIDE" ->>>>>>> v2.17.0 ErrReadConfig = "failed to read TOML config" ErrUnmarshalConfig = "failed to unmarshal TOML config" Load string = "load" @@ -141,10 +136,7 @@ func NewConfig() (*Config, error) { } } } -<<<<<<< HEAD -======= ->>>>>>> v2.17.0 // read secrets for all products if cfg.CCIP != nil { err := ctfconfig.LoadSecretEnvsFromFiles() @@ -183,8 +175,6 @@ type Common struct { func (p *Common) ReadFromEnvVar() error { logger := logging.GetTestLogger(nil) -<<<<<<< HEAD -======= testLogCollect := ctfconfig.MustReadEnvVar_Boolean(ctfconfig.E2E_TEST_LOG_COLLECT_ENV) if testLogCollect != nil { if p.Logging == nil { @@ -215,7 +205,6 @@ func (p *Common) ReadFromEnvVar() error { p.Logging.LogStream.LogTargets = logstreamLogTargets } ->>>>>>> v2.17.0 lokiTenantID := ctfconfig.MustReadEnvVar_String(ctfconfig.E2E_TEST_LOKI_TENANT_ID_ENV) if lokiTenantID != "" { if p.Logging == nil { @@ -300,8 +289,6 @@ func (p *Common) ReadFromEnvVar() error { p.Logging.Grafana.BearerToken = &grafanaBearerToken } -<<<<<<< HEAD -======= selectedNetworks := ctfconfig.MustReadEnvVar_Strings(ctfconfig.E2E_TEST_SELECTED_NETWORK_ENV, ",") if len(selectedNetworks) > 0 { if p.Network == nil { @@ -311,7 +298,6 @@ func (p *Common) ReadFromEnvVar() error { p.Network.SelectedNetworks = selectedNetworks } ->>>>>>> v2.17.0 walletKeys := ctfconfig.ReadEnvVarGroupedMap(ctfconfig.E2E_TEST_WALLET_KEY_ENV, ctfconfig.E2E_TEST_WALLET_KEYS_ENV) if len(walletKeys) > 0 { if p.Network == nil { @@ -355,8 +341,6 @@ func (p *Common) ReadFromEnvVar() error { p.NewCLCluster.Common.ChainlinkImage.Image = &chainlinkImage } -<<<<<<< HEAD -======= chainlinkVersion := ctfconfig.MustReadEnvVar_String(ctfconfig.E2E_TEST_CHAINLINK_VERSION_ENV) if chainlinkVersion != "" { if p.NewCLCluster == nil { @@ -389,7 +373,6 @@ func (p *Common) ReadFromEnvVar() error { p.NewCLCluster.Common.ChainlinkImage.PostgresVersion = &chainlinkPostgresVersion } ->>>>>>> v2.17.0 chainlinkUpgradeImage := ctfconfig.MustReadEnvVar_String(ctfconfig.E2E_TEST_CHAINLINK_UPGRADE_IMAGE_ENV) if chainlinkUpgradeImage != "" { if p.NewCLCluster == nil { @@ -406,8 +389,6 @@ func (p *Common) ReadFromEnvVar() error { p.NewCLCluster.Common.ChainlinkUpgradeImage.Image = &chainlinkUpgradeImage } -<<<<<<< HEAD -======= chainlinkUpgradeVersion := ctfconfig.MustReadEnvVar_String(ctfconfig.E2E_TEST_CHAINLINK_UPGRADE_VERSION_ENV) if chainlinkUpgradeVersion != "" { if p.NewCLCluster == nil { @@ -424,7 +405,6 @@ func (p *Common) ReadFromEnvVar() error { p.NewCLCluster.Common.ChainlinkUpgradeImage.Version = &chainlinkUpgradeVersion } ->>>>>>> v2.17.0 return nil } diff --git a/integration-tests/ccip-tests/testconfig/override/mainnet.toml b/integration-tests/ccip-tests/testconfig/override/mainnet.toml index 3aec6ec714..6fa0c3e0dd 100644 --- a/integration-tests/ccip-tests/testconfig/override/mainnet.toml +++ b/integration-tests/ccip-tests/testconfig/override/mainnet.toml @@ -1081,7 +1081,6 @@ TTL = '8h' [CCIP.Env.Network] selected_networks = [ -<<<<<<< HEAD 'ARBITRUM_MAINNET', 'AVALANCHE_MAINNET', 'BASE_MAINNET', @@ -1156,54 +1155,6 @@ BiDirectionalLane = true PhaseTimeout = '20m' ExistingDeployment = true SkipRequestIfAnotherRequestTriggeredWithin = '40m' -======= - 'ARBITRUM_MAINNET', - 'AVALANCHE_MAINNET', - 'BSC_MAINNET', - 'BASE_MAINNET', - 'ETHEREUM_MAINNET', - 'KROMA_MAINNET', - 'OPTIMISM_MAINNET', - 'POLYGON_MAINNET', - 'WEMIX_MAINNET', - ] - -[CCIP.Groups.load] -NetworkPairs = [ - 'ETHEREUM_MAINNET,OPTIMISM_MAINNET', - 'ETHEREUM_MAINNET,AVALANCHE_MAINNET', - 'ETHEREUM_MAINNET,POLYGON_MAINNET', - 'ETHEREUM_MAINNET,BSC_MAINNET', - 'ETHEREUM_MAINNET,ARBITRUM_MAINNET', - 'ETHEREUM_MAINNET,BASE_MAINNET', - 'ETHEREUM_MAINNET,WEMIX_MAINNET', - 'AVALANCHE_MAINNET,POLYGON_MAINNET', - 'BASE_MAINNET,OPTIMISM_MAINNET', - 'BASE_MAINNET,ARBITRUM_MAINNET', - 'AVALANCHE_MAINNET,BSC_MAINNET', - 'BSC_MAINNET,POLYGON_MAINNET', - 'OPTIMISM_MAINNET,POLYGON_MAINNET', - 'BASE_MAINNET,BSC_MAINNET', - 'POLYGON_MAINNET,ARBITRUM_MAINNET', # added as batch 1 - 'ARBITRUM_MAINNET,BSC_MAINNET', # added as batch 1 - 'ARBITRUM_MAINNET,OPTIMISM_MAINNET', # added as batch 1 - 'AVALANCHE_MAINNET,OPTIMISM_MAINNET', # added as batch 2 - 'AVALANCHE_MAINNET,ARBITRUM_MAINNET', # added as batch 2 - 'BASE_MAINNET,POLYGON_MAINNET', # added as batch 2 - 'BSC_MAINNET,OPTIMISM_MAINNET', # added as batch 2 - 'AVALANCHE_MAINNET,BASE_MAINNET', # added as batch 2 - 'WEMIX_MAINNET,KROMA_MAINNET', - 'BSC_MAINNET,WEMIX_MAINNET', # added as batch 2 - 'AVALANCHE_MAINNET,WEMIX_MAINNET', # added as batch 2 - 'POLYGON_MAINNET,WEMIX_MAINNET', # added as batch 2 - 'WEMIX_MAINNET,ARBITRUM_MAINNET', # added as batch 2 - 'OPTIMISM_MAINNET,WEMIX_MAINNET' # added as batch 2 -] - -BiDirectionalLane = true -PhaseTimeout = '30m' -ExistingDeployment = true ->>>>>>> v2.17.0 [CCIP.Groups.load.TokenConfig] NoOfTokensPerChain = 1 @@ -1214,11 +1165,7 @@ TimeUnit = '1h' TestDuration = '5h' TestRunName = 'Soak_test_mainnet' FailOnFirstErrorInLoad = true -<<<<<<< HEAD -======= -SkipRequestIfAnotherRequestTriggeredWithin = '40m' ->>>>>>> v2.17.0 [[CCIP.Groups.load.LoadProfile.MsgProfile.MsgDetails]] MsgType = 'Data' @@ -1230,7 +1177,6 @@ AmountPerToken = 1 [CCIP.Groups.smoke] # these are all the valid network pairs NetworkPairs = [ -<<<<<<< HEAD 'ARBITRUM_MAINNET,BSC_MAINNET', 'ARBITRUM_MAINNET,OPTIMISM_MAINNET', 'AVALANCHE_MAINNET,ARBITRUM_MAINNET', @@ -1280,36 +1226,6 @@ NetworkPairs = [ 'WEMIX_MAINNET,ARBITRUM_MAINNET', 'WEMIX_MAINNET,KROMA_MAINNET', 'ZKSYNC_MAINNET,ARBITRUM_MAINNET' -======= - 'ETHEREUM_MAINNET,OPTIMISM_MAINNET', - 'ETHEREUM_MAINNET,AVALANCHE_MAINNET', - 'ETHEREUM_MAINNET,POLYGON_MAINNET', - 'ETHEREUM_MAINNET,BSC_MAINNET', - 'ETHEREUM_MAINNET,ARBITRUM_MAINNET', - 'ETHEREUM_MAINNET,BASE_MAINNET', - 'ETHEREUM_MAINNET,WEMIX_MAINNET', - 'AVALANCHE_MAINNET,POLYGON_MAINNET', - 'BASE_MAINNET,OPTIMISM_MAINNET', - 'BASE_MAINNET,ARBITRUM_MAINNET', - 'AVALANCHE_MAINNET,BSC_MAINNET', - 'BSC_MAINNET,POLYGON_MAINNET', - 'OPTIMISM_MAINNET,POLYGON_MAINNET', - 'BASE_MAINNET,BSC_MAINNET', - 'POLYGON_MAINNET,ARBITRUM_MAINNET', # added as batch 1 - 'ARBITRUM_MAINNET,BSC_MAINNET', # added as batch 1 - 'ARBITRUM_MAINNET,OPTIMISM_MAINNET', # added as batch 1 - 'AVALANCHE_MAINNET,OPTIMISM_MAINNET', # added as batch 2 - 'AVALANCHE_MAINNET,ARBITRUM_MAINNET', # added as batch 2 - 'BASE_MAINNET,POLYGON_MAINNET', # added as batch 2 - 'BSC_MAINNET,OPTIMISM_MAINNET', # added as batch 2 - 'AVALANCHE_MAINNET,BASE_MAINNET', # added as batch 2 - 'WEMIX_MAINNET,KROMA_MAINNET', - 'BSC_MAINNET,WEMIX_MAINNET', # added as batch 2 - 'AVALANCHE_MAINNET,WEMIX_MAINNET', # added as batch 2 - 'POLYGON_MAINNET,WEMIX_MAINNET', # added as batch 2 - 'WEMIX_MAINNET,ARBITRUM_MAINNET', # added as batch 2 - 'OPTIMISM_MAINNET,WEMIX_MAINNET' # added as batch 2 ->>>>>>> v2.17.0 ] BiDirectionalLane = true @@ -1317,11 +1233,7 @@ PhaseTimeout = '20m' LocalCluster = false ExistingDeployment = true ReuseContracts = true -<<<<<<< HEAD SkipRequestIfAnotherRequestTriggeredWithin = '24h' -======= - ->>>>>>> v2.17.0 [CCIP.Groups.smoke.TokenConfig] NoOfTokensPerChain = 1 diff --git a/integration-tests/ccip-tests/testconfig/tomls/ccip-default.toml b/integration-tests/ccip-tests/testconfig/tomls/ccip-default.toml index 379215421c..15bf443bca 100644 --- a/integration-tests/ccip-tests/testconfig/tomls/ccip-default.toml +++ b/integration-tests/ccip-tests/testconfig/tomls/ccip-default.toml @@ -229,13 +229,10 @@ BlockHistorySize = 200 EIP1559FeeCapBufferBlocks = 0 """ -<<<<<<< HEAD # Run by default using latest version from `ccip-develop` branch, override this value to use a specific version [CCIP.Env.NewCLCluster.Common.ChainlinkImage] version = "ccip-develop" -======= ->>>>>>> v2.17.0 # the following configs are specific to each test type, smoke, load , chaos, etc... [CCIP.Groups] [CCIP.Groups.smoke] @@ -246,14 +243,8 @@ version = "ccip-develop" KeepEnvAlive = false # if true, the test will not tear down the test environment after the test is finished CommitAndExecuteOnSameDON = true # if true, and the test is building the env from scratch, same chainlink nodes will be used for Commit and Execution jobs. -<<<<<<< HEAD # Otherwise Commit and execution jobs will be set up in different nodes based on the number of nodes specified in NoOfCommitNodes and CCIP.Env.NewCLCluster.NoOfNodes AllowOutOfOrder = false # if true, all lanes will set all transactions to allow out of order execution. This setting overrides individual settings from lane_config. To allow out of order execution per lane, then send "allow_out_of_order":true, similar to is_native_fee_token variable. -======= -AllowOutOfOrder = false # if true, all the lanes will allow out of order execution and it -# overrides settings from lane_config. To allow out of order execution per lane, then send "allow_out_of_order":true, similar to is_native_fee_token variable. -# Otherwise Commit and execution jobs will be set up in different nodes based on the number of nodes specified in NoOfCommitNodes and CCIP.Env.NewCLCluster.NoOfNodes ->>>>>>> v2.17.0 BiDirectionalLane = true # True uses both the lanes. If bidirectional is false only one way lane is set up. NoOfCommitNodes = 5 # no of chainlink nodes with Commit job PhaseTimeout = '10m' # Duration to wait for the each phase validation(SendRequested, Commit, RMN Blessing, Execution) to time-out. @@ -384,11 +375,7 @@ CCIPOwnerTokens = false # if true, the test will use deploy the tokens by the CC # Uncomment the following if you want to run your tests with updated OCR params # otherwise test will use default OCR params from - -<<<<<<< HEAD # https://github.com/smartcontractkit/ccip/blob/ccip-develop/integration-tests/ccip-tests/contracts/contract_deployer.go#L729-L751 -======= -# https://github.com/smartcontractkit/chainlink/blob/develop/integration-tests/ccip-tests/contracts/contract_deployer.go#L729-L751 ->>>>>>> v2.17.0 ## OCR Params #CommitInflightExpiry = '2m' #ExecInflightExpiry = '2m' diff --git a/integration-tests/ccip-tests/testconfig/tomls/ccip1.4-stress/baseline.toml b/integration-tests/ccip-tests/testconfig/tomls/ccip1.4-stress/baseline.toml index d97a85f066..d78cd12595 100644 --- a/integration-tests/ccip-tests/testconfig/tomls/ccip1.4-stress/baseline.toml +++ b/integration-tests/ccip-tests/testconfig/tomls/ccip1.4-stress/baseline.toml @@ -1,9 +1,5 @@ ## Baseline performance test on simulated environment (with chaos) -<<<<<<< HEAD ## 30 chains / 300 lanes -======= -## 40 chains / 400 lanes ->>>>>>> v2.17.0 ## historyDepth 200 / finalityDepth 200 ## block_time = 1s ## throughput 1msg / 5s @@ -11,7 +7,6 @@ ## ## make test_load_ccip testimage=.dkr.ecr..amazonaws.com/chainlink-ccip-tests:ccip-develop \ ## testname=TestLoadCCIPStableRequestTriggeringWithNetworkChaos \ -<<<<<<< HEAD ## override_toml=./testconfig/tomls/ccip-1.4-stress/baseline.toml ## Adjust this value depending on what you want to test. @@ -21,10 +16,6 @@ # E2E_TEST_CHAINLINK_IMAGE=".dkr.ecr..amazonaws.com/chainlink-ccip" [CCIP.Env.NewCLCluster.Common.ChainlinkImage] version = "2.14.0-ccip1.5.0" -======= -## override_toml=./testconfig/tomls/ccip-1.4-stress/baseline.toml \ -## secret_toml=./testconfig/tomls/secrets.toml ->>>>>>> v2.17.0 [CCIP] [CCIP.ContractVersions] @@ -35,17 +26,10 @@ TokenPool = '1.4.0' CommitStore = '1.2.0' [CCIP.Env] -<<<<<<< HEAD TTL = '10h' [CCIP.Env.Network] selected_networks = ['PRIVATE-CHAIN-1', 'PRIVATE-CHAIN-2'] -======= -TTL = '8h' - -[CCIP.Env.Network] -selected_networks= ['PRIVATE-CHAIN-1', 'PRIVATE-CHAIN-2'] ->>>>>>> v2.17.0 [CCIP.Env.Network.EVMNetworks.PRIVATE-CHAIN-1] evm_name = 'private-chain-1' @@ -89,11 +73,7 @@ block_time = 1 [CCIP.Env.NewCLCluster] NoOfNodes = 17 NodeMemory = '10Gi' -<<<<<<< HEAD NodeCPU = '4' -======= -NodeCPU = '6' ->>>>>>> v2.17.0 DBMemory = '16Gi' DBCPU = '4' DBStorageClass = 'gp3' @@ -151,11 +131,8 @@ DeltaReconcile = '5s' """ CommonChainConfigTOML = """ -<<<<<<< HEAD LogPollInterval = '1s' -======= ->>>>>>> v2.17.0 [HeadTracker] HistoryDepth = 200 @@ -171,15 +148,9 @@ KeepEnvAlive = true NoOfCommitNodes = 16 PhaseTimeout = '40m' NodeFunding = 1000.0 -<<<<<<< HEAD NoOfRoutersPerPair = 1 NoOfNetworks = 30 MaxNoOfLanes = 300 -======= -NoOfRoutersPerPair = 2 -NoOfNetworks = 40 -MaxNoOfLanes = 400 ->>>>>>> v2.17.0 [CCIP.Groups.load.OffRampConfig] BatchGasLimit = 11000000 @@ -188,19 +159,11 @@ BatchGasLimit = 11000000 TimeoutForPriceUpdate = '15m' NoOfTokensPerChain = 10 NoOfTokensWithDynamicPrice = 10 -<<<<<<< HEAD DynamicPriceUpdateInterval = '15s' CCIPOwnerTokens = true [CCIP.Groups.load.LoadProfile] TestDuration = '6h' -======= -DynamicPriceUpdateInterval ='15s' -CCIPOwnerTokens = true - -[CCIP.Groups.load.LoadProfile] -TestDuration = '4h' ->>>>>>> v2.17.0 TimeUnit = '5s' RequestPerUnitTime = [1] OptimizeSpace = true @@ -208,11 +171,7 @@ NetworkChaosDelay = '100ms' # to represent 20%, 60%, 15%, 5% of the total messages [CCIP.Groups.load.LoadProfile.MsgProfile] -<<<<<<< HEAD Frequencies = [4, 12, 3, 1] -======= -Frequencies = [4,12,3,1] ->>>>>>> v2.17.0 [[CCIP.Groups.load.LoadProfile.MsgProfile.MsgDetails]] MsgType = 'Token' @@ -236,4 +195,4 @@ DataLength = 10000 [[CCIP.Groups.load.LoadProfile.MsgProfile.MsgDetails]] MsgType = 'Data' DestGasLimit = 2500000 -DataLength = 10000 +DataLength = 10000 \ No newline at end of file diff --git a/integration-tests/ccip-tests/testconfig/tomls/prod-testnet/load-prod-testnet.toml b/integration-tests/ccip-tests/testconfig/tomls/prod-testnet/load-prod-testnet.toml index e0e1a9ea5f..d3c23b0bcb 100644 --- a/integration-tests/ccip-tests/testconfig/tomls/prod-testnet/load-prod-testnet.toml +++ b/integration-tests/ccip-tests/testconfig/tomls/prod-testnet/load-prod-testnet.toml @@ -11,97 +11,14 @@ CommitStore = '1.2.0' Data = """ { "lane_configs": { -<<<<<<< HEAD "Avalanche Fuji": { "is_native_fee_token": true, "fee_token": "0xd00ae08403B9bbb9124bB305C09058E32C39A48c", "arm": "0x7e28DD790214139798446A121cFe950B51304684", -======= - "Arbitrum Sepolia": { - "is_native_fee_token": true, - "fee_token": "0xb1D4538B4571d411F07960EF2838Ce337FE1E80E", - "bridge_tokens": [ - ], - "bridge_tokens_pools": [ - ], - "price_aggregators": null, - "arm": "0x5EF7a726Fd21Fd9D77D34E3C56cfDD8691F7F0ac", - "router": "0x2a9C5afB0d0e4BAb2BCdaE109EC4b0c4Be15a165", - "price_registry": "0x89D5b13908b9063abCC6791dc724bF7B7c93634C", - "wrapped_native": "0xE591bf0A0CF924A0674d7792db046B23CEbF5f34", - "src_contracts": { - "Avalanche Fuji": { - "on_ramp": "0x1Cb56374296ED19E86F68fA437ee679FD7798DaA", - "deployed_at": 33999325 - }, - "Base Sepolia": { - "on_ramp": "0x7854E73C73e7F9bb5b0D5B4861E997f4C6E8dcC6", - "deployed_at": 9199926 - }, - "Gnosis Chiado": { - "on_ramp": "0x973CbE752258D32AE82b60CD1CB656Eebb588dF0", - "deployed_at": 42809650 - }, - "Optimism Sepolia": { - "on_ramp": "0x701Fe16916dd21EFE2f535CA59611D818B017877", - "deployed_at": 35180131 - }, - "Sepolia Testnet": { - "on_ramp": "0x4205E1Ca0202A248A5D42F5975A8FE56F3E302e9", - "deployed_at": 35180131 - }, - "WeMix Testnet": { - "on_ramp": "0xBD4106fBE4699FE212A34Cc21b10BFf22b02d959", - "deployed_at": 18816676 - } - }, - "dest_contracts": { - "Avalanche Fuji": { - "off_ramp": "0xcab0EF91Bee323d1A617c0a027eE753aFd6997E4", - "commit_store": "0x0d90b9b96cBFa0D01635ce12982ccE1b70827c7a", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Base Sepolia": { - "off_ramp": "0xc1982985720B959E66c19b64F783361Eb9B60F26", - "commit_store": "0x28F66bB336f6db713d6ad2a3bd1B7a531282A159", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Gnosis Chiado": { - "off_ramp": "0x935C26F9a9122E5F9a27f2d3803e74c75B94f5a3", - "commit_store": "0xEdb963Ec5c2E5AbdFdCF137eF44A445a7fa4787A", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Optimism Sepolia": { - "off_ramp": "0xfD404A89e1d195F0c65be1A9042C77745197659e", - "commit_store": "0x84B7B012c95f8A152B44Ab3e952f2dEE424fA8e1", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Sepolia Testnet": { - "off_ramp": "0x1c71f141b4630EBE52d6aF4894812960abE207eB", - "commit_store": "0xaB0c8Ba51E7Fa3E5693a4Fbb39473520FD85d173", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "WeMix Testnet": { - "off_ramp": "0x262e16C8D42aa07bE13e58F81e7D9F62F6DE2830", - "commit_store": "0xc132eFAf929299E5ee704Fa6D9796CFa23Bb8b2C", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - } - } - }, - "Avalanche Fuji": { - "fee_token": "0x0b9d5D9136855f6FEc3c0993feE6E9CE8a297846", - "bridge_tokens": [ - ], - "bridge_tokens_pools": [ - ], - "price_aggregators": null, - "arm": "0x0ea0D7B2b78DD3A926fC76d6875a287F0AEB158F", ->>>>>>> v2.17.0 "router": "0xF694E193200268f9a4868e4Aa017A0118C9a8177", "price_registry": "0x19e157E5fb1DAec1aE4BaB113fdf077F980704AA", "wrapped_native": "0xd00ae08403B9bbb9124bB305C09058E32C39A48c", "src_contracts": { -<<<<<<< HEAD "Base Sepolia": { "on_ramp": "0x1A674645f3EB4147543FCA7d40C5719cbd997362", "deployed_at": 0 @@ -120,182 +37,27 @@ Data = """ "off_ramp": "0xdBdE8510226d1E060A3bf982b67705C67f5697e2", "commit_store": "0x8Ee73BC9492b4182D289E5C1e66e40CD876CC00F", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" -======= - "Arbitrum Sepolia": { - "on_ramp": "0x8bB16BEDbFd62D1f905ACe8DBBF2954c8EEB4f66", - "deployed_at": 31888860 - }, - "BSC Testnet": { - "on_ramp": "0xF25ECF1Aad9B2E43EDc2960cF66f325783245535", - "deployed_at": 33214865 - }, - "Base Sepolia": { - "on_ramp": "0x1A674645f3EB4147543FCA7d40C5719cbd997362", - "deployed_at": 31235262 - }, - "Gnosis Chiado": { - "on_ramp": "0x1532e5b204ee2b2244170c78E743CB9c168F4DF9", - "deployed_at": 32817266 - }, - "Optimism Sepolia": { - "on_ramp": "0xC334DE5b020e056d0fE766dE46e8d9f306Ffa1E2", - "deployed_at": 30396804 - }, - "Polygon Amoy": { - "on_ramp": "0x610F76A35E17DA4542518D85FfEa12645eF111Fc", - "deployed_at": 31982368 - }, - "Sepolia Testnet": { - "on_ramp": "0x5724B4Cc39a9690135F7273b44Dfd3BA6c0c69aD", - "deployed_at": 33214865 - }, - "WeMix Testnet": { - "on_ramp": "0x677B5ab5C8522d929166c064d5700F147b15fa33", - "deployed_at": 30436465 - } - }, - "dest_contracts": { - "Arbitrum Sepolia": { - "off_ramp": "0x90A74072e7B0c2d59e13aB4d8f93c8198c413194", - "commit_store": "0xf3458CFd2fdf4a6CF0Ce296d520DD21eB194828b", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "BSC Testnet": { - "off_ramp": "0x10b28009E5D776F1f5AAA73941CE8953B8f42d26", - "commit_store": "0xacDD582F271eCF22FAd6764cCDe1c4a534b732A8", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Base Sepolia": { - "off_ramp": "0xdBdE8510226d1E060A3bf982b67705C67f5697e2", - "commit_store": "0x8Ee73BC9492b4182D289E5C1e66e40CD876CC00F", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Gnosis Chiado": { - "off_ramp": "0x56dF55aF5F0A4689f3364230587a68eD6A314fAd", - "commit_store": "0xabA7ff98094c4cc7A075812EefF2CD21f6400235", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" ->>>>>>> v2.17.0 }, "Optimism Sepolia": { "off_ramp": "0x3d7CbC95DCC33257F14D6Eb780c88Bd56C6335BB", "commit_store": "0x1fcDC02edDfb405f378ba53cF9E6104feBcB7542", -<<<<<<< HEAD "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" -======= - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Polygon Amoy": { - "off_ramp": "0x3e33290B90fD0FF30a3FA138934DF028E4eCA348", - "commit_store": "0xCFe3556Aa42d40be09BD23aa80448a19443BE5B1", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" ->>>>>>> v2.17.0 }, "Sepolia Testnet": { "off_ramp": "0x9e5e4324F8608D54A50a317832d456a392E4F8C2", "commit_store": "0x92A51eD3F041B39EbD1e464C1f7cb1e8f8A8c63f", -<<<<<<< HEAD "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" -======= - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "WeMix Testnet": { - "off_ramp": "0xD0D338318bC6837b091FC7AB5F2a94B7783507d5", - "commit_store": "0xd9D479208235c7355848ff4aF26eB5aacfDC30c6", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - } - } - }, - "BSC Testnet": { - "is_native_fee_token": true, - "fee_token": "0x84b9B910527Ad5C03A9Ca831909E21e236EA7b06", - "bridge_tokens": [ - ], - "bridge_tokens_pools": [ - ], - "price_aggregators": null, - "arm": "0xF9a21B587111e7E8745Fb8b13750014f19DB0014", - "router": "0xE1053aE1857476f36A3C62580FF9b016E8EE8F6f", - "price_registry": "0xCCDf022c9d31DC26Ebab4FB92432724a5b79809a", - "wrapped_native": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", - "src_contracts": { - "Avalanche Fuji": { - "on_ramp": "0xa2515683E99F50ADbE177519A46bb20FfdBaA5de", - "deployed_at": 40500000 - }, - "Base Sepolia": { - "on_ramp": "0x3E807220Ca84b997c0d1928162227b46C618e0c5", - "deployed_at": 37115558 - }, - "Gnosis Chiado": { - "on_ramp": "0x8735f991d41eA9cA9D2CC75cD201e4B7C866E63e", - "deployed_at": 40228352 - }, - "Polygon Amoy": { - "on_ramp": "0xf37CcbfC04adc1B56a46B36F811D52C744a1AF78", - "deployed_at": 39572254 - }, - "Sepolia Testnet": { - "on_ramp": "0xB1DE44B04C00eaFe9915a3C07a0CaeA4410537dF", - "deployed_at": 38150066 - }, - "WeMix Testnet": { - "on_ramp": "0x89268Afc1BEA0782a27ba84124E3F42b196af927", - "deployed_at": 38184995 - } - }, - "dest_contracts": { - "Avalanche Fuji": { - "off_ramp": "0x6e6fFCb6B4BED91ff0CC8C2e57EC029dA7DB80C2", - "commit_store": "0x38Bc38Bd824b6eE87571f9D3CFbe6D6E28E3Dc62", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Base Sepolia": { - "off_ramp": "0x2C61FD7E93Dc79422861282145c59B56dFbc3a8c", - "commit_store": "0x42fAe5B3605804CF6d08632d7A25864e24F792Ae", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Gnosis Chiado": { - "off_ramp": "0x71a44a60832B0F8B63232C9516e7E6aEc3A373Dc", - "commit_store": "0xAC24299a91b72d1Cb5B31147e3CF54964D896974", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Polygon Amoy": { - "off_ramp": "0x63440C7747d37bc6154b5538AE32b54FE0965AfA", - "commit_store": "0xAD22fA198CECfC534927aE1D480c460d5bB3460F", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Sepolia Testnet": { - "off_ramp": "0xf1c128Fe52Ea78CcAAB407509292E61ce38C1523", - "commit_store": "0x59dFD870dC4bd76A7B879A4f705Fdcd2595f85f9", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "WeMix Testnet": { - "off_ramp": "0xfd9B19c3725da5B517aA705B848ff3f21F98280e", - "commit_store": "0x3c1F1412563188aBc8FE3fd53E8F1Cb601CaB4f9", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" ->>>>>>> v2.17.0 } } }, "Base Sepolia": { "is_native_fee_token": true, -<<<<<<< HEAD "fee_token": "0x4200000000000000000000000000000000000006", "arm": "0x7827dD0481EE18DB646bD250d20A8eA43da52146", -======= - "fee_token": "0xE4aB69C077896252FAFBD49EFD26B5D171A32410", - "bridge_tokens": [ - ], - "bridge_tokens_pools": [ - ], - "price_aggregators": null, - "arm": "0x5aA82cA372782d6CC33AA4C830Df2a91017A7e1b", ->>>>>>> v2.17.0 "router": "0xD3b06cEbF099CE7DA4AcCf578aaebFDBd6e88a93", "price_registry": "0x4D20536e60832bE579Cd38E89Dc03d11E1741FbA", "wrapped_native": "0x4200000000000000000000000000000000000006", "src_contracts": { -<<<<<<< HEAD "Avalanche Fuji": { "on_ramp": "0xAbA09a1b7b9f13E05A6241292a66793Ec7d43357", "deployed_at": 0 @@ -314,208 +76,27 @@ Data = """ "off_ramp": "0xAd91214efFee446500940c764DF77AF18427294F", "commit_store": "0x1242b6c5e0e349b8d4BCf0938f961C4B4f7EA3Fa", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" -======= - "Arbitrum Sepolia": { - "on_ramp": "0x58622a80c6DdDc072F2b527a99BE1D0934eb2b50", - "deployed_at": 5146539 - }, - "Avalanche Fuji": { - "on_ramp": "0xAbA09a1b7b9f13E05A6241292a66793Ec7d43357", - "deployed_at": 7810235 - }, - "BSC Testnet": { - "on_ramp": "0xD806966beAB5A3C75E5B90CDA4a6922C6A9F0c9d", - "deployed_at": 5144127 - }, - "Gnosis Chiado": { - "on_ramp": "0x2Eff2d1BF5C557d6289D208a7a43608f5E3FeCc2", - "deployed_at": 9817141 - }, - "Optimism Sepolia": { - "on_ramp": "0x3b39Cd9599137f892Ad57A4f54158198D445D147", - "deployed_at": 5147649 - }, - "Sepolia Testnet": { - "on_ramp": "0x6486906bB2d85A6c0cCEf2A2831C11A2059ebfea", - "deployed_at": 7810235 - }, - "ethereum-testnet-sepolia-mode-1": { - "on_ramp": "0x3d0115386C01436870a2c47e6297962284E70BA6", - "deployed_at": 10409731 - } - }, - "dest_contracts": { - "Arbitrum Sepolia": { - "off_ramp": "0xd364C06ac99a82a00d3eFF9F2F78E4Abe4b9baAA", - "commit_store": "0xdE8d0f47a71eA3fDFBD3162271652f2847939097", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Avalanche Fuji": { - "off_ramp": "0xAd91214efFee446500940c764DF77AF18427294F", - "commit_store": "0x1242b6c5e0e349b8d4BCf0938f961C4B4f7EA3Fa", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "BSC Testnet": { - "off_ramp": "0xd5E9508921434e8758f4540D55c1c066b7cc1598", - "commit_store": "0x1a86b29364D1B3fA3386329A361aA98A104b2742", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Gnosis Chiado": { - "off_ramp": "0x9Bb7e398ef9Acfe9cA584C39B1E233Cba62BB9f7", - "commit_store": "0x1F4B82cDebaC5e3a0Dd53183D47e51808B4a64cB", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" ->>>>>>> v2.17.0 }, "Optimism Sepolia": { "off_ramp": "0x86a3910908eCaAA31Fcd9F0fC8841D8E98f1511d", "commit_store": "0xE99a87C9b5ed4D2b6060195DEea5106ffF655736", -<<<<<<< HEAD "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" -======= - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" ->>>>>>> v2.17.0 }, "Sepolia Testnet": { "off_ramp": "0x189F61D9B886Dd2975D5Abc893c8Cf5f5effda71", "commit_store": "0xEE7e27346DCD1e711348D0F7f7ECB53a9a3a08a7", -<<<<<<< HEAD "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" -======= - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "ethereum-testnet-sepolia-mode-1": { - "off_ramp": "0xB26647A23e8b4284375e5C74b77c9557aE709D03", - "commit_store": "0x4b4fEB401d3E613e1D6242E155C83A80BF9ac2C9", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - } - } - }, - "Gnosis Chiado": { - "is_native_fee_token": true, - "fee_token": "0xDCA67FD8324990792C0bfaE95903B8A64097754F", - "bridge_tokens": [ - ], - "bridge_tokens_pools": [ - ], - "price_aggregators": null, - "arm": "0xb6f1Fe2CDE891eFd5Efd2A563C4C2F2549163718", - "router": "0x19b1bac554111517831ACadc0FD119D23Bb14391", - "price_registry": "0x2F4ACd1f8986c6B1788159C4c9a5fC3fceCCE363", - "wrapped_native": "0x18c8a7ec7897177E4529065a7E7B0878358B3BfF", - "src_contracts": { - "Arbitrum Sepolia": { - "on_ramp": "0x473b49fb592B54a4BfCD55d40E048431982879C9", - "deployed_at": 9718588 - }, - "Avalanche Fuji": { - "on_ramp": "0x610F76A35E17DA4542518D85FfEa12645eF111Fc", - "deployed_at": 9718676 - }, - "BSC Testnet": { - "on_ramp": "0xE48E6AA1fc7D0411acEA95F8C6CaD972A37721D4", - "deployed_at": 9718302 - }, - "Base Sepolia": { - "on_ramp": "0x41b4A51cAfb699D9504E89d19D71F92E886028a8", - "deployed_at": 9718513 - }, - "Optimism Sepolia": { - "on_ramp": "0xAae733212981e06D9C978Eb5148F8af03F54b6EF", - "deployed_at": 9718420 - }, - "Polygon Amoy": { - "on_ramp": "0x01800fCDd892e37f7829937271840A6F041bE62E", - "deployed_at": 9718194 - }, - "Sepolia Testnet": { - "on_ramp": "0x4ac7FBEc2A7298AbDf0E0F4fDC45015836C4bAFe", - "deployed_at": 8487681 - } - }, - "dest_contracts": { - "Arbitrum Sepolia": { - "off_ramp": "0x9aA82DBB53bf02096B771D40e9432A323a78fB26", - "commit_store": "0x5CdbA91aBC0cD81FC56bc10Ad1835C9E5fB38e5F", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Avalanche Fuji": { - "off_ramp": "0x3e33290B90fD0FF30a3FA138934DF028E4eCA348", - "commit_store": "0xCFe3556Aa42d40be09BD23aa80448a19443BE5B1", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "BSC Testnet": { - "off_ramp": "0xbc4AD54e91b213D4279af92c0C5518c0b96cf62D", - "commit_store": "0xff84e8Dd4Fd17eaBb23b6AeA6e1981830e54389C", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Base Sepolia": { - "off_ramp": "0x4117953A5ceeF12f5B8C1E973b470ab83a8CebA6", - "commit_store": "0x94ad41296186E81f31e1ed0B1BcF5fa9e1721C27", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Optimism Sepolia": { - "off_ramp": "0x33d2898F8fb7714FD1661791766f40754982a343", - "commit_store": "0x55d6Df194472f02CD481e506A277c4A29D0D1bCc", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Polygon Amoy": { - "off_ramp": "0x450543b1d85ca79885851D7b74dc982981b78229", - "commit_store": "0x23B79d940A769FE31b4C867A8BAE80117f24Ca81", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Sepolia Testnet": { - "off_ramp": "0xbf9036529123DE264bFA0FC7362fE25B650D4B16", - "commit_store": "0x5f7F1abD5c5EdaF2636D58B980e85355AF0Ef80d", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - } - } - }, - "Kroma Sepolia": { - "is_native_fee_token": true, - "fee_token": "0xa75cCA5b404ec6F4BB6EC4853D177FE7057085c8", - "bridge_tokens": [ - ], - "bridge_tokens_pools": [ - ], - "price_aggregators": null, - "arm": "0x1E4e4e0d6f6631A45C616F71a1A5cF208DB9eCDe", - "router": "0xA8C0c11bf64AF62CDCA6f93D3769B88BdD7cb93D", - "price_registry": "0xa1ed3A3aA29166C9c8448654A8cA6b7916BC8379", - "wrapped_native": "0x4200000000000000000000000000000000000001", - "src_contracts": { - "WeMix Testnet": { - "on_ramp": "0x6ea155Fc77566D9dcE01B8aa5D7968665dc4f0C5", - "deployed_at": 10290904 - } - }, - "dest_contracts": { - "WeMix Testnet": { - "off_ramp": "0xB602B6E5Caf08ac0C920EAE585aed100a8cF6f3B", - "commit_store": "0x89D5b13908b9063abCC6791dc724bF7B7c93634C", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" ->>>>>>> v2.17.0 } } }, "Optimism Sepolia": { "is_native_fee_token": true, -<<<<<<< HEAD "fee_token": "0x4200000000000000000000000000000000000006", "arm": "0xF51366F72184E22cF4a7a8362508DB0d3370392d", -======= - "fee_token": "0xE4aB69C077896252FAFBD49EFD26B5D171A32410", - "bridge_tokens": [ - ], - "bridge_tokens_pools": [ - ], - "price_aggregators": null, - "arm": "0xf06Ff5D2084295909119ca541E93635E7D582FFc", ->>>>>>> v2.17.0 "router": "0x114A20A10b43D4115e5aeef7345a1A71d2a60C57", "price_registry": "0x782a7Ba95215f2F7c3dD4C153cbB2Ae3Ec2d3215", "wrapped_native": "0x4200000000000000000000000000000000000006", "src_contracts": { -<<<<<<< HEAD "Avalanche Fuji": { "on_ramp": "0x6b38CC6Fa938D5AB09Bdf0CFe580E226fDD793cE", "deployed_at": 0 @@ -534,173 +115,27 @@ Data = """ "off_ramp": "0x1F350718e015EB20E5065C09F4A7a3f66888aEeD", "commit_store": "0x98650A8EB59f75D93563aB34FcF603b1A30e4CBF", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" -======= - "Arbitrum Sepolia": { - "on_ramp": "0x1a86b29364D1B3fA3386329A361aA98A104b2742", - "deployed_at": 10841494 - }, - "Avalanche Fuji": { - "on_ramp": "0x6b38CC6Fa938D5AB09Bdf0CFe580E226fDD793cE", - "deployed_at": 8677537 - }, - "Base Sepolia": { - "on_ramp": "0xe284D2315a28c4d62C419e8474dC457b219DB969", - "deployed_at": 7130524 - }, - "Gnosis Chiado": { - "on_ramp": "0x835a5b8e6CA17c2bB5A336c93a4E22478E6F1C8A", - "deployed_at": 11799783 - }, - "Polygon Amoy": { - "on_ramp": "0x2Cf26fb01E9ccDb831414B766287c0A9e4551089", - "deployed_at": 10813146 - }, - "Sepolia Testnet": { - "on_ramp": "0xC8b93b46BF682c39B3F65Aa1c135bC8A95A5E43a", - "deployed_at": 12165583 - }, - "WeMix Testnet": { - "on_ramp": "0xc7E53f6aB982af7A7C3e470c8cCa283d3399BDAd", - "deployed_at": 8733017 - } - }, - "dest_contracts": { - "Arbitrum Sepolia": { - "off_ramp": "0xDc2c7A3d8068C6F09F0F3648d24C84e372F6014d", - "commit_store": "0xb1aFb5cbE3c29b5Db71F21442BA9EfD450BC23C3", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Avalanche Fuji": { - "off_ramp": "0x1F350718e015EB20E5065C09F4A7a3f66888aEeD", - "commit_store": "0x98650A8EB59f75D93563aB34FcF603b1A30e4CBF", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" ->>>>>>> v2.17.0 }, "Base Sepolia": { "off_ramp": "0x0a750ca77369e03613d7640548F4b2b1c695c3Bb", "commit_store": "0x8fEBC74C26129C8d7E60288C6dCCc75eb494aA3C", -<<<<<<< HEAD "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" -======= - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Gnosis Chiado": { - "off_ramp": "0xCE2CE7F940B7c839384e5D7e079A6aE80e8AD6dB", - "commit_store": "0x1b9D78Ec1CEEC439F0b7eA6C428A1a607D9FA7e4", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Polygon Amoy": { - "off_ramp": "0xD667b5706592D0b040C78fEe5EE17D243b7dCB41", - "commit_store": "0x96101BA5250EE9295c193693C1e08A55bC593664", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" ->>>>>>> v2.17.0 }, "Sepolia Testnet": { "off_ramp": "0x260AF9b83e0d2Bb6C9015fC9f0BfF8858A0CCE68", "commit_store": "0x7a0bB92Bc8663abe6296d0162A9b41a2Cb2E0358", -<<<<<<< HEAD "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" -======= - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "WeMix Testnet": { - "off_ramp": "0x9C08B7712af0344188aa5087D9e6aD0f47191037", - "commit_store": "0x4BE6DB0B884169a6A207fe5cad01eB4C025a13dB", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - } - } - }, - "Polygon Amoy": { - "is_native_fee_token": true, - "fee_token": "0x0Fd9e8d3aF1aaee056EB9e802c3A762a667b1904", - "bridge_tokens": [ - ], - "bridge_tokens_pools": [ - ], - "price_aggregators": null, - "arm": "0x50b023c5b33AEe5Adef15C2E95C2fEC690a52fa1", - "router": "0x9C32fCB86BF0f4a1A8921a9Fe46de3198bb884B2", - "price_registry": "0xfb2f2A207dC428da81fbAFfDDe121761f8Be1194", - "wrapped_native": "0x360ad4f9a9A8EFe9A8DCB5f461c4Cc1047E1Dcf9", - "src_contracts": { - "Avalanche Fuji": { - "on_ramp": "0x8Fb98b3837578aceEA32b454f3221FE18D7Ce903", - "deployed_at": 6004551 - }, - "BSC Testnet": { - "on_ramp": "0xC6683ac4a0F62803Bec89a5355B36495ddF2C38b", - "deployed_at": 6005330 - }, - "Gnosis Chiado": { - "on_ramp": "0x2331F6D614C9Fd613Ff59a1aB727f1EDf6c37A68", - "deployed_at": 6897885 - }, - "Optimism Sepolia": { - "on_ramp": "0xA52cDAeb43803A80B3c0C2296f5cFe57e695BE11", - "deployed_at": 6004902 - }, - "Sepolia Testnet": { - "on_ramp": "0x35347A2fC1f2a4c5Eae03339040d0b83b09e6FDA", - "deployed_at": 6004056 - }, - "WeMix Testnet": { - "on_ramp": "0x26546096F64B5eF9A1DcDAe70Df6F4f8c2E10C61", - "deployed_at": 6005611 - } - }, - "dest_contracts": { - "Avalanche Fuji": { - "off_ramp": "0xa733ce82a84335b2E9D864312225B0F3D5d80600", - "commit_store": "0x09B0F93fC2111aE439e853884173AC5b2F809885", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "BSC Testnet": { - "off_ramp": "0x948dfaa4842fc23e0e362Fe8D4396AaE4E6DF7EA", - "commit_store": "0x7F4e739D40E58BBd59dAD388171d18e37B26326f", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Gnosis Chiado": { - "off_ramp": "0x17c542a28e08AEF5697251601C7b2B621d153D42", - "commit_store": "0x811250c20fAB9a1b7ca245453aC214ba637fBEB5", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Optimism Sepolia": { - "off_ramp": "0xfFdE9E8c34A27BEBeaCcAcB7b3044A0A364455C9", - "commit_store": "0x74ED442ad211050e9C05Dc9A267E037E3d74A03B", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Sepolia Testnet": { - "off_ramp": "0xFb04129aD1EEDB741CC705ebC1978a7aB63e51f6", - "commit_store": "0x63f875240149d29136053C954Ca164a9BfA81F77", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "WeMix Testnet": { - "off_ramp": "0xdE8451E952Eb43350614839cCAA84f7C8701a09C", - "commit_store": "0xaCdaBa07ECad81dc634458b98673931DD9d3Bc14", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" ->>>>>>> v2.17.0 } } }, "Sepolia Testnet": { "is_native_fee_token": true, -<<<<<<< HEAD "fee_token": "0x097D90c9d3E0B50Ca60e1ae45F6A81010f9FB534", "arm": "0x27Da8735d8d1402cEc072C234759fbbB4dABBC4A", -======= - "fee_token": "0x779877A7B0D9E8603169DdbD7836e478b4624789", - "bridge_tokens": [ - ], - "bridge_tokens_pools": [ - ], - "price_aggregators": null, - "arm": "0xB4d360459F32Dd641Ef5A6985fFbAC5c4e5521aA", ->>>>>>> v2.17.0 "router": "0x0BF3dE8c5D3e8A2B34D2BEeB17ABfCeBaf363A59", "price_registry": "0x9EF7D57a4ea30b9e37794E55b0C75F2A70275dCc", "wrapped_native": "0x097D90c9d3E0B50Ca60e1ae45F6A81010f9FB534", "src_contracts": { -<<<<<<< HEAD "Avalanche Fuji": { "on_ramp": "0x0477cA0a35eE05D3f9f424d88bC0977ceCf339D4", "deployed_at": 0 @@ -719,318 +154,16 @@ Data = """ "off_ramp": "0x000b26f604eAadC3D874a4404bde6D64a97d95ca", "commit_store": "0x2dD9273F8208B8393350508131270A6574A69784", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" -======= - "Arbitrum Sepolia": { - "on_ramp": "0xe4Dd3B16E09c016402585a8aDFdB4A18f772a07e", - "deployed_at": 5737506 - }, - "Avalanche Fuji": { - "on_ramp": "0x0477cA0a35eE05D3f9f424d88bC0977ceCf339D4", - "deployed_at": 5944649 - }, - "BSC Testnet": { - "on_ramp": "0xD990f8aFA5BCB02f95eEd88ecB7C68f5998bD618", - "deployed_at": 5383500 - }, - "Base Sepolia": { - "on_ramp": "0x2B70a05320cB069e0fB55084D402343F832556E7", - "deployed_at": 5619657 - }, - "Gnosis Chiado": { - "on_ramp": "0x3E842E3A79A00AFdd03B52390B1caC6306Ea257E", - "deployed_at": 5386355 - }, - "Optimism Sepolia": { - "on_ramp": "0x69CaB5A0a08a12BaFD8f5B195989D709E396Ed4d", - "deployed_at": 5937506 - }, - "Polygon Amoy": { - "on_ramp": "0x9f656e0361Fb5Df2ac446102c8aB31855B591692", - "deployed_at": 5723315 - }, - "WeMix Testnet": { - "on_ramp": "0xedFc22336Eb0B9B11Ff37C07777db27BCcDe3C65", - "deployed_at": 5393931 - }, - "celo-testnet-alfajores": { - "on_ramp": "0x3C86d16F52C10B2ff6696a0e1b8E0BcfCC085948", - "deployed_at": 5704643 - }, - "ethereum-testnet-sepolia-blast-1": { - "on_ramp": "0xDB75E9D9ca7577CcBd7232741be954cf26194a66", - "deployed_at": 6040848 - }, - "ethereum-testnet-sepolia-metis-1": { - "on_ramp": "0x1C4640914cd57c5f02a68048A0fbb0E12d904223", - "deployed_at": 6002793 - }, - "ethereum-testnet-sepolia-mode-1": { - "on_ramp": "0xc630fbD4D0F6AEB00aD0793FB827b54fBB78e981", - "deployed_at": 5970819 - } - }, - "dest_contracts": { - "Arbitrum Sepolia": { - "off_ramp": "0xF18896AB20a09A29e64fdEbA99FDb8EC328f43b1", - "commit_store": "0x93Ff9Dd39Dc01eac1fc4d2c9211D95Ee458CAB94", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Avalanche Fuji": { - "off_ramp": "0x000b26f604eAadC3D874a4404bde6D64a97d95ca", - "commit_store": "0x2dD9273F8208B8393350508131270A6574A69784", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "BSC Testnet": { - "off_ramp": "0xdE2d8E126e08d675fCD7fFa5a6CE49925f3Dc692", - "commit_store": "0x0050ac355a82caB31194507f94174297bf0655A7", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" ->>>>>>> v2.17.0 }, "Base Sepolia": { "off_ramp": "0x31c0B81832B333419f0DfD36A69F502cF9094aed", "commit_store": "0xDFcde9d698a2B32DB2537DC9B752Cadd1D846a52", -<<<<<<< HEAD "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" -======= - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Gnosis Chiado": { - "off_ramp": "0x7db0115A0b3AAb01d30bf81123c5DD7B0C41Add5", - "commit_store": "0x6640723Ea801178c4383FA016b9781e7ef1016EF", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" ->>>>>>> v2.17.0 }, "Optimism Sepolia": { "off_ramp": "0xD50590D4438411EDe47029b0FD7901A7145E5Df6", "commit_store": "0xe85EEE9Fd434A7b8a586Ee086E828abF41839479", -<<<<<<< HEAD "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" -======= - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Polygon Amoy": { - "off_ramp": "0x5032cbC0C4aEeD25bb6E45D8B3fAF05DB0688C5d", - "commit_store": "0xe6201C9996Cc7B6E828E10CbE937E693d577D318", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "WeMix Testnet": { - "off_ramp": "0x46b639a3C1a4CBfD326b94a2dB7415c27157282f", - "commit_store": "0x7b74554678816b045c1e7409327E086bD436aa46", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "celo-testnet-alfajores": { - "off_ramp": "0xB435E0f73c18C5a12C324CA1d02F81F2C3e6e761", - "commit_store": "0xbc5d74957F171e75F92c8F0E1C317A25a56a416D", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "ethereum-testnet-sepolia-blast-1": { - "off_ramp": "0x4e897e5cF3aC307F0541B2151A88bCD781c153a3", - "commit_store": "0xB656652841F347178e193951C4663652aCe36B74", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "ethereum-testnet-sepolia-metis-1": { - "off_ramp": "0x4DB693A93E9d5196ECD42EC56CDEAe99dFC652ED", - "commit_store": "0xBfACd78F1412B6f93Ac23409bf456aFec1ABd845", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "ethereum-testnet-sepolia-mode-1": { - "off_ramp": "0xbEfd8D65F6643De54F0b1268A3bf4618ff85dcB4", - "commit_store": "0x0C161D3470b45Cc677661654C30ce4AdE6aCD288", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - } - } - }, - "WeMix Testnet": { - "is_native_fee_token": true, - "fee_token": "0x3580c7A817cCD41f7e02143BFa411D4EeAE78093", - "bridge_tokens": [ - ], - "bridge_tokens_pools": [ - ], - "price_aggregators": null, - "arm": "0x46fF31494651593973D9b38a872ED5B06f45A693", - "router": "0xA8C0c11bf64AF62CDCA6f93D3769B88BdD7cb93D", - "price_registry": "0x89D17571DB7C9540eeB36760E3c749C8fb984569", - "wrapped_native": "0xbE3686643c05f00eC46e73da594c78098F7a9Ae7", - "src_contracts": { - "Arbitrum Sepolia": { - "on_ramp": "0xA9DE3F7A617D67bC50c56baaCb9E0373C15EbfC6", - "deployed_at": 51216113 - }, - "Avalanche Fuji": { - "on_ramp": "0xC4aC84da458ba8e40210D2dF94C76E9a41f70069", - "deployed_at": 51214769 - }, - "BSC Testnet": { - "on_ramp": "0x5AD6eed6Be0ffaDCA4105050CF0E584D87E0c2F1", - "deployed_at": 51213771 - }, - "Kroma Sepolia": { - "on_ramp": "0x428C4dc89b6Bf908B82d77C9CBceA786ea8cc7D0", - "deployed_at": 51239062 - }, - "Optimism Sepolia": { - "on_ramp": "0x1961a7De751451F410391c251D4D4F98D71B767D", - "deployed_at": 51216748 - }, - "Polygon Amoy": { - "on_ramp": "0xd55148e841e76265B484d399eC71b7076ecB1216", - "deployed_at": 55378685 - }, - "Sepolia Testnet": { - "on_ramp": "0x4d57C6d8037C65fa66D6231844785a428310a735", - "deployed_at": 51239309 - } - }, - "dest_contracts": { - "Arbitrum Sepolia": { - "off_ramp": "0xeB1dFaB2464Bf0574D43e764E0c758f92e7ecAFb", - "commit_store": "0xcEaCa2B7890065c485f3E58657358a185Ad33791", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Avalanche Fuji": { - "off_ramp": "0x98e811Df9D2512f1aaf58D534607F583D6c54A4F", - "commit_store": "0x8e538351F6E5B2daF3c90C565C3738bca69a2716", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "BSC Testnet": { - "off_ramp": "0xB0e7f0fCcD3c961C473E7c44D939C1cDb4Cec1cB", - "commit_store": "0x4B56D8d53f1A6e0117B09700067De99581aA5542", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Kroma Sepolia": { - "off_ramp": "0xD685D2d224dd6D0Db2D56497db6270D77D9a7966", - "commit_store": "0x7e062D6880779a0347e7742058C1b1Ee4AA0B137", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Optimism Sepolia": { - "off_ramp": "0xA5f97Bc69Bf06e7C37B93265c5457420A92c5F4b", - "commit_store": "0xd48b9213583074f518D8f4336FDf35370D450132", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Polygon Amoy": { - "off_ramp": "0x6c8f5999B06FDE17B11E4e3C1062b761766F960f", - "commit_store": "0x957c3c2056192e58A8485eF31165fC490d474239", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Sepolia Testnet": { - "off_ramp": "0x8AB103843ED9D28D2C5DAf5FdB9c3e1CE2B6c876", - "commit_store": "0x7d5297c5506ee2A7Ef121Da9bE02b6a6AD30b392", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - } - } - }, - "celo-testnet-alfajores": { - "is_native_fee_token": true, - "fee_token": "0x32E08557B14FaD8908025619797221281D439071", - "bridge_tokens": [ - ], - "bridge_tokens_pools": [ - ], - "price_aggregators": null, - "arm": "0xbE8FD4b84ca8CC2cFAeeEf8dc1388E44860eeEeb", - "router": "0xb00E95b773528E2Ea724DB06B75113F239D15Dca", - "price_registry": "0x8F048206D11B2c69b8963E2EBd5968D141e022f4", - "wrapped_native": "0x99604d0e2EfE7ABFb58BdE565b5330Bb46Ab3Dca", - "src_contracts": { - "Sepolia Testnet": { - "on_ramp": "0x16a020c4bbdE363FaB8481262D30516AdbcfcFc8", - "deployed_at": 23561364 - } - }, - "dest_contracts": { - "Sepolia Testnet": { - "off_ramp": "0xa1b97F92D806BA040daf419AFC2765DC723683a4", - "commit_store": "0xcd92C0599Ac515e7588865cC45Eee21A74816aFc", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - } - } - }, - "ethereum-testnet-sepolia-blast-1": { - "is_native_fee_token": true, - "fee_token": "0x02c359ebf98fc8BF793F970F9B8302bb373BdF32", - "bridge_tokens": [ - ], - "bridge_tokens_pools": [ - ], - "price_aggregators": null, - "arm": "0x9C32fCB86BF0f4a1A8921a9Fe46de3198bb884B2", - "router": "0xfb2f2A207dC428da81fbAFfDDe121761f8Be1194", - "price_registry": "0xc8acE9dF450FaD007755C6C9AB4f0e9c8626E29C", - "wrapped_native": "0x4200000000000000000000000000000000000023", - "src_contracts": { - "Sepolia Testnet": { - "on_ramp": "0x85Ef19FC4C63c70744995DC38CAAEC185E0c619f", - "deployed_at": 6429339 - } - }, - "dest_contracts": { - "Sepolia Testnet": { - "off_ramp": "0x92cD24C278D34C726f377703E50875d8f9535dC2", - "commit_store": "0xcE1b4D50CeD56850182Bd58Ace91171cB249B873", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - } - } - }, - "ethereum-testnet-sepolia-metis-1": { - "is_native_fee_token": true, - "fee_token": "0x9870D6a0e05F867EAAe696e106741843F7fD116D", - "bridge_tokens": [ - ], - "bridge_tokens_pools": [ - ], - "price_aggregators": null, - "arm": "0x26546096F64B5eF9A1DcDAe70Df6F4f8c2E10C61", - "router": "0xaCdaBa07ECad81dc634458b98673931DD9d3Bc14", - "price_registry": "0x5DCE866b3ae6E0Ed153f0e149D7203A1B266cdF5", - "wrapped_native": "0x5c48e07062aC4E2Cf4b9A768a711Aef18e8fbdA0", - "src_contracts": { - "Sepolia Testnet": { - "on_ramp": "0x2Eff2d1BF5C557d6289D208a7a43608f5E3FeCc2", - "deployed_at": 858864 - } - }, - "dest_contracts": { - "Sepolia Testnet": { - "off_ramp": "0x9Bb7e398ef9Acfe9cA584C39B1E233Cba62BB9f7", - "commit_store": "0x1F4B82cDebaC5e3a0Dd53183D47e51808B4a64cB", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - } - } - }, - "ethereum-testnet-sepolia-mode-1": { - "is_native_fee_token": true, - "fee_token": "0x925a4bfE64AE2bFAC8a02b35F78e60C29743755d", - "bridge_tokens": [ - ], - "bridge_tokens_pools": [ - ], - "price_aggregators": null, - "arm": "0x11545812A8d64e4A3A0Ec36b6F70D87b42Ce4a01", - "router": "0xc49ec0eB4beb48B8Da4cceC51AA9A5bD0D0A4c43", - "price_registry": "0xa733ce82a84335b2E9D864312225B0F3D5d80600", - "wrapped_native": "0x4200000000000000000000000000000000000006", - "src_contracts": { - "Base Sepolia": { - "on_ramp": "0x73f7E074bd7291706a0C5412f51DB46441B1aDCB", - "deployed_at": 14359909 - }, - "Sepolia Testnet": { - "on_ramp": "0xfFdE9E8c34A27BEBeaCcAcB7b3044A0A364455C9", - "deployed_at": 14359680 - } - }, - "dest_contracts": { - "Base Sepolia": { - "off_ramp": "0x137a38c6b1Ad20101F93516aB2159Df525309168", - "commit_store": "0x8F43d867969F14619895d71E0A5b89E0bb20bF70", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" - }, - "Sepolia Testnet": { - "off_ramp": "0xcD44cec849B6a8eBd5551D6DFeEcA452257Dfe4d", - "commit_store": "0xbA66f08733E6715D33edDfb5a5947676bb45d0e0", - "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" ->>>>>>> v2.17.0 } } } @@ -1039,7 +172,6 @@ Data = """ """ [CCIP.Env] -<<<<<<< HEAD TTL = '2h' [CCIP.Env.Network] @@ -1048,33 +180,12 @@ selected_networks = [ 'OPTIMISM_SEPOLIA', 'BASE_SEPOLIA', 'SEPOLIA', -======= -TTL = '8h' - -[CCIP.Env.Network] -selected_networks = [ - 'ARBITRUM_SEPOLIA', - 'AVALANCHE_FUJI', - 'OPTIMISM_SEPOLIA', - 'BASE_SEPOLIA', - 'BSC_TESTNET', - 'WEMIX_TESTNET', - 'SEPOLIA', - 'POLYGON_AMOY', - 'KROMA_SEPOLIA', - 'BLAST_SEPOLIA' ->>>>>>> v2.17.0 ] [CCIP.Groups.load] NetworkPairs = [ -<<<<<<< HEAD 'AVALANCHE_FUJI,SEPOLIA', 'OPTIMISM_SEPOLIA,BASE_SEPOLIA' -======= - 'AVALANCHE_FUJI,SEPOLIA', - 'OPTIMISM_SEPOLIA,BASE_SEPOLIA' ->>>>>>> v2.17.0 ] BiDirectionalLane = true @@ -1083,7 +194,6 @@ ExistingDeployment = true NoOfTokensPerChain = 1 -<<<<<<< HEAD # 1msg/5sec = 12msg/min [CCIP.Groups.load.LoadProfile] RequestPerUnitTime = [12] @@ -1099,17 +209,6 @@ RequestPerUnitTime = [5] # to represent 20%, 60%, 15%, 5% of the total messages [CCIP.Groups.load.LoadProfile.MsgProfile] Frequencies = [4, 12, 3, 1] -======= -[CCIP.Groups.load.LoadProfile] -RequestPerUnitTime = [1] -TimeUnit = '5s' -TestDuration = '1h' -TestRunName = 'ccip-prod-testnet-stress' - -# to represent 20%, 60%, 15%, 5% of the total messages -[CCIP.Groups.load.LoadProfile.MsgProfile] -Frequencies = [4,12,3,1] ->>>>>>> v2.17.0 [[CCIP.Groups.load.LoadProfile.MsgProfile.MsgDetails]] MsgType = 'Token' diff --git a/integration-tests/ccip-tests/testsetups/ccip.go b/integration-tests/ccip-tests/testsetups/ccip.go index 64ac701eb5..eee424d50d 100644 --- a/integration-tests/ccip-tests/testsetups/ccip.go +++ b/integration-tests/ccip-tests/testsetups/ccip.go @@ -29,13 +29,8 @@ import ( "github.com/smartcontractkit/chainlink-testing-framework/lib/blockchain" ctfClient "github.com/smartcontractkit/chainlink-testing-framework/lib/client" -<<<<<<< HEAD - ctfconfig "github.com/smartcontractkit/chainlink-testing-framework/lib/config" - ctfconfigtypes "github.com/smartcontractkit/chainlink-testing-framework/lib/config/types" -======= ctf_config "github.com/smartcontractkit/chainlink-testing-framework/lib/config" ctf_config_types "github.com/smartcontractkit/chainlink-testing-framework/lib/config/types" ->>>>>>> v2.17.0 ctftestenv "github.com/smartcontractkit/chainlink-testing-framework/lib/docker/test_env" "github.com/smartcontractkit/chainlink-testing-framework/lib/k8s/config" "github.com/smartcontractkit/chainlink-testing-framework/lib/k8s/environment" @@ -276,27 +271,16 @@ func (c *CCIPTestConfig) SetNetworkPairs(lggr zerolog.Logger) error { c.EnvInput.Network.AnvilConfigs[strings.ToUpper(name)] = existing } -<<<<<<< HEAD - chainConfig := &ctfconfig.EthereumChainConfig{} -======= chainConfig := &ctf_config.EthereumChainConfig{} ->>>>>>> v2.17.0 err := chainConfig.Default() if err != nil { allError = multierr.Append(allError, fmt.Errorf("failed to get default chain config: %w", err)) } else { chainConfig.ChainID = int(chainID) -<<<<<<< HEAD - eth1 := ctfconfigtypes.EthereumVersion_Eth1 - geth := ctfconfigtypes.ExecutionLayer_Geth - - c.EnvInput.PrivateEthereumNetworks[fmt.Sprint(chainID)] = &ctfconfig.EthereumNetworkConfig{ -======= eth1 := ctf_config_types.EthereumVersion_Eth1 geth := ctf_config_types.ExecutionLayer_Geth c.EnvInput.PrivateEthereumNetworks[fmt.Sprint(chainID)] = &ctf_config.EthereumNetworkConfig{ ->>>>>>> v2.17.0 EthereumVersion: ð1, ExecutionLayer: &geth, EthereumChainConfig: chainConfig, diff --git a/integration-tests/ccip-tests/testsetups/test_env.go b/integration-tests/ccip-tests/testsetups/test_env.go index 46a12c63b9..effd6e61bf 100644 --- a/integration-tests/ccip-tests/testsetups/test_env.go +++ b/integration-tests/ccip-tests/testsetups/test_env.go @@ -13,13 +13,8 @@ import ( "github.com/rs/zerolog" "github.com/stretchr/testify/require" -<<<<<<< HEAD - ctfconfig "github.com/smartcontractkit/chainlink-testing-framework/lib/config" - ctfconfigtypes "github.com/smartcontractkit/chainlink-testing-framework/lib/config/types" -======= ctf_config "github.com/smartcontractkit/chainlink-testing-framework/lib/config" ctf_config_types "github.com/smartcontractkit/chainlink-testing-framework/lib/config/types" ->>>>>>> v2.17.0 "github.com/smartcontractkit/chainlink-testing-framework/lib/networks" "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/conversions" @@ -58,11 +53,7 @@ func SetResourceProfile(cpu, mem string) map[string]interface{} { } } -<<<<<<< HEAD -func setNodeConfig(nets []blockchain.EVMNetwork, nodeConfig, commonChain string, configByChain map[string]string) (*corechainlink.Config, string, error) { -======= func SetNodeConfig(nets []blockchain.EVMNetwork, nodeConfig, commonChain string, configByChain map[string]string) (*corechainlink.Config, string, error) { ->>>>>>> v2.17.0 var tomlCfg *corechainlink.Config var err error var commonChainConfig *evmcfg.Chain @@ -131,11 +122,7 @@ func ChainlinkPropsForUpdate( chainConfigByChain = testInputs.EnvInput.NewCLCluster.Common.ChainConfigTOMLByChain } -<<<<<<< HEAD - _, tomlStr, err := setNodeConfig( -======= _, tomlStr, err := SetNodeConfig( ->>>>>>> v2.17.0 testInputs.SelectedNetworks, nodeConfig, commonChainConfig, chainConfigByChain, ) @@ -163,11 +150,7 @@ func ChainlinkPropsForUpdate( "version": upgradeTag, }, } -<<<<<<< HEAD - _, tomlStr, err := setNodeConfig( -======= _, tomlStr, err := SetNodeConfig( ->>>>>>> v2.17.0 testInputs.SelectedNetworks, testInputs.EnvInput.NewCLCluster.Common.BaseConfigTOML, testInputs.EnvInput.NewCLCluster.Common.CommonChainConfigTOML, @@ -233,11 +216,7 @@ func ChainlinkChart( chainConfigByChain = testInputs.EnvInput.NewCLCluster.Common.ChainConfigTOMLByChain } -<<<<<<< HEAD - _, tomlStr, err := setNodeConfig(nets, nodeConfig, commonChainConfig, chainConfigByChain) -======= _, tomlStr, err := SetNodeConfig(nets, nodeConfig, commonChainConfig, chainConfigByChain) ->>>>>>> v2.17.0 require.NoError(t, err) nodesMap = append(nodesMap, map[string]any{ "name": clNode.Name, @@ -261,11 +240,8 @@ func ChainlinkChart( return chainlink.New(0, clProps) } clProps["replicas"] = pointer.GetInt(testInputs.EnvInput.NewCLCluster.NoOfNodes) -<<<<<<< HEAD - _, tomlStr, err := setNodeConfig( -======= + _, tomlStr, err := SetNodeConfig( ->>>>>>> v2.17.0 nets, testInputs.EnvInput.NewCLCluster.Common.BaseConfigTOML, testInputs.EnvInput.NewCLCluster.Common.CommonChainConfigTOML, @@ -282,11 +258,7 @@ func DeployLocalCluster( ) (*test_env.CLClusterTestEnv, func() error) { selectedNetworks := testInputs.SelectedNetworks -<<<<<<< HEAD - privateEthereumNetworks := []*ctfconfig.EthereumNetworkConfig{} -======= privateEthereumNetworks := []*ctf_config.EthereumNetworkConfig{} ->>>>>>> v2.17.0 for _, network := range testInputs.EnvInput.PrivateEthereumNetworks { privateEthereumNetworks = append(privateEthereumNetworks, network) @@ -316,27 +288,17 @@ func DeployLocalCluster( } for _, network := range missing { -<<<<<<< HEAD - chainConfig := &ctfconfig.EthereumChainConfig{} -======= chainConfig := &ctf_config.EthereumChainConfig{} ->>>>>>> v2.17.0 err := chainConfig.Default() if err != nil { require.NoError(t, err, "failed to get default chain config: %w", err) } else { chainConfig.ChainID = int(network.ChainID) -<<<<<<< HEAD - eth1 := ctfconfigtypes.EthereumVersion_Eth1 - geth := ctfconfigtypes.ExecutionLayer_Geth - privateEthereumNetworks = append(privateEthereumNetworks, &ctfconfig.EthereumNetworkConfig{ -======= eth1 := ctf_config_types.EthereumVersion_Eth1 geth := ctf_config_types.ExecutionLayer_Geth privateEthereumNetworks = append(privateEthereumNetworks, &ctf_config.EthereumNetworkConfig{ ->>>>>>> v2.17.0 EthereumVersion: ð1, ExecutionLayer: &geth, EthereumChainConfig: chainConfig, @@ -372,12 +334,6 @@ func DeployLocalCluster( // a func to start the CL nodes asynchronously deployCL := func() error { noOfNodes := pointer.GetInt(testInputs.EnvInput.NewCLCluster.NoOfNodes) -<<<<<<< HEAD - // if individual nodes are specified, then deploy them with specified configs - if len(testInputs.EnvInput.NewCLCluster.Nodes) > 0 { - for _, clNode := range testInputs.EnvInput.NewCLCluster.Nodes { - toml, _, err := setNodeConfig( -======= if env.ClCluster == nil { env.ClCluster = &test_env.ClCluster{} } @@ -385,7 +341,6 @@ func DeployLocalCluster( if len(testInputs.EnvInput.NewCLCluster.Nodes) > 0 { for _, clNode := range testInputs.EnvInput.NewCLCluster.Nodes { toml, _, err := SetNodeConfig( ->>>>>>> v2.17.0 selectedNetworks, clNode.BaseConfigTOML, clNode.CommonChainConfigTOML, @@ -414,11 +369,7 @@ func DeployLocalCluster( } else { // if no individual nodes are specified, then deploy the number of nodes specified in the env input with common config for i := 0; i < noOfNodes; i++ { -<<<<<<< HEAD - toml, _, err := setNodeConfig( -======= toml, _, err := SetNodeConfig( ->>>>>>> v2.17.0 selectedNetworks, testInputs.EnvInput.NewCLCluster.Common.BaseConfigTOML, testInputs.EnvInput.NewCLCluster.Common.CommonChainConfigTOML, @@ -544,12 +495,8 @@ func DeployEnvironments( "fullnameOverride": actions.NetworkName(network.Name), "image": map[string]interface{}{ "repository": "ghcr.io/foundry-rs/foundry", -<<<<<<< HEAD - "tag": "nightly-2442e7a5fc165d7d0b022aa8b9f09dcdf675157b", -======= "tag": "nightly-5ac78a9cd4b94dc53d1fe5e0f42372b28b5a7559", // "tag": "nightly-ea2eff95b5c17edd3ffbdfc6daab5ce5cc80afc0", ->>>>>>> v2.17.0 }, "anvil": map[string]interface{}{ "chainId": fmt.Sprintf("%d", network.ChainID), diff --git a/integration-tests/crib/chaos.go b/integration-tests/crib/chaos.go index 745237e67b..463ced483f 100644 --- a/integration-tests/crib/chaos.go +++ b/integration-tests/crib/chaos.go @@ -3,8 +3,6 @@ package crib import ( "time" - "github.com/smartcontractkit/chainlink-testing-framework/havoc" - "github.com/chaos-mesh/chaos-mesh/api/v1alpha1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/integration-tests/crib/ocr_test.go b/integration-tests/crib/ocr_test.go index e27c379daa..f2119dc7f4 100644 --- a/integration-tests/crib/ocr_test.go +++ b/integration-tests/crib/ocr_test.go @@ -6,7 +6,6 @@ import ( "testing" "time" - "github.com/smartcontractkit/chainlink-testing-framework/havoc" "github.com/smartcontractkit/chainlink-testing-framework/lib/client" "github.com/smartcontractkit/chainlink-testing-framework/lib/logging" "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/ptr" diff --git a/integration-tests/deployment/README.md b/integration-tests/deployment/README.md deleted file mode 100644 index 000219c8ab..0000000000 --- a/integration-tests/deployment/README.md +++ /dev/null @@ -1,58 +0,0 @@ -### Overview -The deployment package in the integration-tests Go module serves -as a product agnostic set of environment abstractions used -to deploy and configure products including both on/offchain -dependencies. The environment abstractions allow for -complex and critical deployment/configuration logic to be tested -against ephemeral environments and then exposed for use in persistent -environments like testnet/mainnet. - -### Directory structure - -/deployment -- package name `deployment` -- Product agnostic environment abstractions and helpers using those - abstractions - -/deployment/memory -- package name `memory` -- In-memory environment for fast integration testing -- EVM only - -/deployment/devenv -- Coming soon -- package name `devenv` -- Docker environment for higher fidelity testing -- Support non-EVMs (yet to be implemented) - -/deployment/ccip -- package name `ccipdeployment` -- Files and tests per product deployment/configuration workflows -- Tests can use deployment/memory for fast integration testing -- TODO: System state representation is defined here, need to define - an interface to comply with for all products. - -/deployment/ccip/changeset -- package name `changeset` imported as `ccipchangesets` -- These function like scripts describing state transitions - you wish to apply to _persistent_ environments like testnet/mainnet -- Ordered list of Go functions following the format -```Go -0001_descriptive_name.go -func Apply0001(env deployment.Environment, c ccipdeployment.Config) (deployment.ChangesetOutput, error) -{ - // Deploy contracts, generate MCMS proposals, generate - // job specs according to contracts etc. - return deployment.ChangesetOutput{}, nil -} -0001_descriptive_name_test.go -func TestApply0001(t *testing.T) -{ - // Set up memory env - // Apply0001 function - // Take the artifacts from ChangeSet output - // Apply them to the memory env - // Send traffic, run assertions etc. -} -``` -- Changesets are exposed and applied via a different repo. \ No newline at end of file diff --git a/integration-tests/deployment/address_book.go b/integration-tests/deployment/address_book.go deleted file mode 100644 index be004f27d0..0000000000 --- a/integration-tests/deployment/address_book.go +++ /dev/null @@ -1,163 +0,0 @@ -package deployment - -import ( - "fmt" - "strings" - - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/common" - "github.com/pkg/errors" - chainsel "github.com/smartcontractkit/chain-selectors" -) - -var ( - ErrInvalidChainSelector = fmt.Errorf("invalid chain selector") - ErrInvalidAddress = fmt.Errorf("invalid address") - ErrChainNotFound = fmt.Errorf("chain not found") -) - -// ContractType is a simple string type for identifying contract types. -type ContractType string - -var ( - Version1_0_0 = *semver.MustParse("1.0.0") - Version1_1_0 = *semver.MustParse("1.1.0") - Version1_2_0 = *semver.MustParse("1.2.0") - Version1_5_0 = *semver.MustParse("1.5.0") - Version1_6_0_dev = *semver.MustParse("1.6.0-dev") -) - -type TypeAndVersion struct { - Type ContractType - Version semver.Version -} - -func (tv TypeAndVersion) String() string { - return fmt.Sprintf("%s %s", tv.Type, tv.Version.String()) -} - -func (tv TypeAndVersion) Equal(other TypeAndVersion) bool { - return tv.String() == other.String() -} - -func MustTypeAndVersionFromString(s string) TypeAndVersion { - tv, err := TypeAndVersionFromString(s) - if err != nil { - panic(err) - } - return tv -} - -// Note this will become useful for validation. When we want -// to assert an onchain call to typeAndVersion yields whats expected. -func TypeAndVersionFromString(s string) (TypeAndVersion, error) { - parts := strings.Split(s, " ") - if len(parts) != 2 { - return TypeAndVersion{}, fmt.Errorf("invalid type and version string: %s", s) - } - v, err := semver.NewVersion(parts[1]) - if err != nil { - return TypeAndVersion{}, err - } - return TypeAndVersion{ - Type: ContractType(parts[0]), - Version: *v, - }, nil -} - -func NewTypeAndVersion(t ContractType, v semver.Version) TypeAndVersion { - return TypeAndVersion{ - Type: t, - Version: v, - } -} - -// AddressBook is a simple interface for storing and retrieving contract addresses across -// chains. It is family agnostic as the keys are chain selectors. -// We store rather than derive typeAndVersion as some contracts do not support it. -// For ethereum addresses are always stored in EIP55 format. -type AddressBook interface { - Save(chainSelector uint64, address string, tv TypeAndVersion) error - Addresses() (map[uint64]map[string]TypeAndVersion, error) - AddressesForChain(chain uint64) (map[string]TypeAndVersion, error) - // Allows for merging address books (e.g. new deployments with existing ones) - Merge(other AddressBook) error -} - -type AddressBookMap struct { - AddressesByChain map[uint64]map[string]TypeAndVersion -} - -func (m *AddressBookMap) Save(chainSelector uint64, address string, typeAndVersion TypeAndVersion) error { - _, exists := chainsel.ChainBySelector(chainSelector) - if !exists { - return errors.Wrapf(ErrInvalidChainSelector, "chain selector %d", chainSelector) - } - if address == "" || address == common.HexToAddress("0x0").Hex() { - return errors.Wrap(ErrInvalidAddress, "address cannot be empty") - } - if common.IsHexAddress(address) { - // IMPORTANT: WE ALWAYS STANDARDIZE ETHEREUM ADDRESS STRINGS TO EIP55 - address = common.HexToAddress(address).Hex() - } else { - return errors.Wrapf(ErrInvalidAddress, "address %s is not a valid Ethereum address, only Ethereum addresses supported", address) - } - if typeAndVersion.Type == "" { - return fmt.Errorf("type cannot be empty") - } - if _, exists := m.AddressesByChain[chainSelector]; !exists { - // First time chain add, create map - m.AddressesByChain[chainSelector] = make(map[string]TypeAndVersion) - } - if _, exists := m.AddressesByChain[chainSelector][address]; exists { - return fmt.Errorf("address %s already exists for chain %d", address, chainSelector) - } - m.AddressesByChain[chainSelector][address] = typeAndVersion - return nil -} - -func (m *AddressBookMap) Addresses() (map[uint64]map[string]TypeAndVersion, error) { - return m.AddressesByChain, nil -} - -func (m *AddressBookMap) AddressesForChain(chainSelector uint64) (map[string]TypeAndVersion, error) { - _, exists := chainsel.ChainBySelector(chainSelector) - if !exists { - return nil, errors.Wrapf(ErrInvalidChainSelector, "chain selector %d", chainSelector) - } - if _, exists := m.AddressesByChain[chainSelector]; !exists { - return nil, errors.Wrapf(ErrChainNotFound, "chain selector %d", chainSelector) - } - return m.AddressesByChain[chainSelector], nil -} - -// Attention this will mutate existing book -func (m *AddressBookMap) Merge(ab AddressBook) error { - addresses, err := ab.Addresses() - if err != nil { - return err - } - for chain, chainAddresses := range addresses { - for address, typeAndVersions := range chainAddresses { - if err := m.Save(chain, address, typeAndVersions); err != nil { - return err - } - } - } - return nil -} - -// TODO: Maybe could add an environment argument -// which would ensure only mainnet/testnet chain selectors are used -// for further safety? -func NewMemoryAddressBook() *AddressBookMap { - return &AddressBookMap{ - AddressesByChain: make(map[uint64]map[string]TypeAndVersion), - } -} - -func NewMemoryAddressBookFromMap(addressesByChain map[uint64]map[string]TypeAndVersion) *AddressBookMap { - return &AddressBookMap{ - AddressesByChain: addressesByChain, - } -} diff --git a/integration-tests/deployment/address_book_test.go b/integration-tests/deployment/address_book_test.go deleted file mode 100644 index bf3d2ad965..0000000000 --- a/integration-tests/deployment/address_book_test.go +++ /dev/null @@ -1,120 +0,0 @@ -package deployment - -import ( - "errors" - "testing" - - "github.com/ethereum/go-ethereum/common" - chainsel "github.com/smartcontractkit/chain-selectors" - "github.com/stretchr/testify/require" - "gotest.tools/v3/assert" -) - -func TestAddressBook_Save(t *testing.T) { - ab := NewMemoryAddressBook() - onRamp100 := NewTypeAndVersion("OnRamp", Version1_0_0) - onRamp110 := NewTypeAndVersion("OnRamp", Version1_1_0) - addr1 := common.HexToAddress("0x1").String() - addr2 := common.HexToAddress("0x2").String() - - err := ab.Save(chainsel.TEST_90000001.Selector, addr1, onRamp100) - require.NoError(t, err) - - // Invalid address - err = ab.Save(chainsel.TEST_90000001.Selector, "asdlfkj", onRamp100) - require.Error(t, err) - assert.Equal(t, errors.Is(err, ErrInvalidAddress), true, "err %s", err) - - // Valid chain but not present. - _, err = ab.AddressesForChain(chainsel.TEST_90000002.Selector) - assert.Equal(t, errors.Is(err, ErrChainNotFound), true, "err %s", err) - - // Invalid selector - err = ab.Save(0, addr1, onRamp100) - require.Error(t, err) - assert.Equal(t, errors.Is(err, ErrInvalidChainSelector), true) - - // Duplicate - err = ab.Save(chainsel.TEST_90000001.Selector, addr1, onRamp100) - require.Error(t, err) - - // Zero address - err = ab.Save(chainsel.TEST_90000001.Selector, common.HexToAddress("0x0").Hex(), onRamp100) - require.Error(t, err) - - // Distinct address same TV will not - err = ab.Save(chainsel.TEST_90000001.Selector, addr2, onRamp100) - require.NoError(t, err) - // Same address different chain will not error - err = ab.Save(chainsel.TEST_90000002.Selector, addr1, onRamp100) - require.NoError(t, err) - // We can save different versions of the same contract - err = ab.Save(chainsel.TEST_90000002.Selector, addr2, onRamp110) - require.NoError(t, err) - - addresses, err := ab.Addresses() - require.NoError(t, err) - assert.DeepEqual(t, addresses, map[uint64]map[string]TypeAndVersion{ - chainsel.TEST_90000001.Selector: { - addr1: onRamp100, - addr2: onRamp100, - }, - chainsel.TEST_90000002.Selector: { - addr1: onRamp100, - addr2: onRamp110, - }, - }) -} - -func TestAddressBook_Merge(t *testing.T) { - onRamp100 := NewTypeAndVersion("OnRamp", Version1_0_0) - onRamp110 := NewTypeAndVersion("OnRamp", Version1_1_0) - addr1 := common.HexToAddress("0x1").String() - addr2 := common.HexToAddress("0x2").String() - a1 := NewMemoryAddressBookFromMap(map[uint64]map[string]TypeAndVersion{ - chainsel.TEST_90000001.Selector: { - addr1: onRamp100, - }, - }) - a2 := NewMemoryAddressBookFromMap(map[uint64]map[string]TypeAndVersion{ - chainsel.TEST_90000001.Selector: { - addr2: onRamp100, - }, - chainsel.TEST_90000002.Selector: { - addr1: onRamp110, - }, - }) - require.NoError(t, a1.Merge(a2)) - - addresses, err := a1.Addresses() - require.NoError(t, err) - assert.DeepEqual(t, addresses, map[uint64]map[string]TypeAndVersion{ - chainsel.TEST_90000001.Selector: { - addr1: onRamp100, - addr2: onRamp100, - }, - chainsel.TEST_90000002.Selector: { - addr1: onRamp110, - }, - }) - - // Merge with conflicting addresses should error - a3 := NewMemoryAddressBookFromMap(map[uint64]map[string]TypeAndVersion{ - chainsel.TEST_90000001.Selector: { - addr1: onRamp100, - }, - }) - require.Error(t, a1.Merge(a3)) - // a1 should not have changed - addresses, err = a1.Addresses() - require.NoError(t, err) - assert.DeepEqual(t, addresses, map[uint64]map[string]TypeAndVersion{ - chainsel.TEST_90000001.Selector: { - addr1: onRamp100, - addr2: onRamp100, - }, - chainsel.TEST_90000002.Selector: { - addr1: onRamp110, - }, - }) -} diff --git a/integration-tests/deployment/changeset.go b/integration-tests/deployment/changeset.go deleted file mode 100644 index aeac3e8e72..0000000000 --- a/integration-tests/deployment/changeset.go +++ /dev/null @@ -1,12 +0,0 @@ -package deployment - -import ( - "github.com/smartcontractkit/ccip-owner-contracts/tools/proposal/timelock" -) - -// Services as input to CI/Async tasks -type ChangesetOutput struct { - JobSpecs map[string][]string - Proposals []timelock.MCMSWithTimelockProposal - AddressBook AddressBook -} diff --git a/integration-tests/deployment/devenv/.sample.env b/integration-tests/deployment/devenv/.sample.env deleted file mode 100644 index f0505cf857..0000000000 --- a/integration-tests/deployment/devenv/.sample.env +++ /dev/null @@ -1,25 +0,0 @@ -E2E_JD_IMAGE= -E2E_JD_VERSION= - -E2E_TEST_CHAINLINK_IMAGE=public.ecr.aws/w0i8p0z9/chainlink-ccip -E2E_TEST_CHAINLINK_VERSION=2.14.0-ccip1.5.0 - -# RPC Configuration -E2E_TEST_SEPOLIA_WALLET_KEY= -E2E_TEST_SEPOLIA_RPC_HTTP_URL_1= -E2E_TEST_SEPOLIA_RPC_HTTP_URL_2= -E2E_TEST_SEPOLIA_RPC_WS_URL_1= -E2E_TEST_SEPOLIA_RPC_WS_URL_2= - -E2E_TEST_AVALANCHE_FUJI_WALLET_KEY= -E2E_TEST_AVALANCHE_FUJI_RPC_HTTP_URL_1= -E2E_TEST_AVALANCHE_FUJI_RPC_HTTP_URL_2= -E2E_TEST_AVALANCHE_FUJI_RPC_WS_URL_1= -E2E_TEST_AVALANCHE_FUJI_RPC_WS_URL_2= - -E2E_TEST_BSC_TESTNET_WALLET_KEY= -E2E_TEST_BSC_TESTNET_RPC_HTTP_URL_1= -E2E_TEST_BSC_TESTNET_RPC_HTTP_URL_2= -E2E_TEST_BSC_TESTNET_RPC_WS_URL_1= -E2E_TEST_BSC_TESTNET_RPC_WS_URL_2= - diff --git a/integration-tests/deployment/devenv/README.md b/integration-tests/deployment/devenv/README.md deleted file mode 100644 index a1f264dfce..0000000000 --- a/integration-tests/deployment/devenv/README.md +++ /dev/null @@ -1,45 +0,0 @@ -## Overview - -This package is used to create ephemeral environment for local/CI testing. -It sets up an environment with local Docker containers running Chainlink nodes and a job distributor. -It can either create new simulated private Ethereum network containers or connect to existing testnets/mainnets. - -### Run Tests with Devenv - -The tests created with this environment are run as [end-to-end integration smoke tests](../../smoke). - -#### Setting Up Testconfig with Simulated Private Ethereum Network - -To run tests (e.g., [ccip-test](../../smoke/ccip_test.go)), -you need to set up the testconfig following the [testconfig setup instructions](../../testconfig/README.md). -The testconfig specifies the details of the different configurations to set up the environment and run the tests. -Generally, tests are run with the [default](../../testconfig/default.toml) config unless overridden by product-specific config. -For example, the [ccip-test](../../smoke/ccip_test.go) uses [ccip.toml](../../testconfig/ccip/ccip.toml) to specify -CCIP-specific test environment details. - -There are additional secret configuration parameters required by the `devenv` environment that are not stored in the testconfig. -These are read from environment variables. For example, Chainlink image, Job-Distributor image, etc. -All such environment variables are listed in the [sample.env](./.sample.env) file. -You can create a `.env` file in the same directory of the test and set the required environment variables. - -#### Setting Up Testconfig for Running Tests with Existing Testnet/Mainnet - -To run tests with existing testnet/mainnet, set up the testconfig with the details of the testnet/mainnet networks. -Following the integration-test [testconfig framework](../../testconfig/README.md#configuration-and-overrides), -create a new `overrides.toml` file with testnet/mainnet network details and place it under any location in the `integration-tests` directory. -By default, tests are run with private Ethereum network containers set up in the same Docker network as -the Chainlink nodes and job distributor. To run tests against existing testnet/mainnet, -set the `selected_network` field in the testconfig with the specific network names. - -For example, if running [ccip-smoke](../../smoke/ccip_test.go) tests with Sepolia, Avax, and Binance testnets, -copy the contents of [sepolia_avax_binance.toml](../../testconfig/ccip/overrides/sepolia_avax_binance.toml) -to the `overrides.toml` file. - -Before running the test, ensure that RPC and wallet secrets are set as environment variables. -Refer to the environment variables pattern in the [sample.env](./.sample.env) file to -provide necessary secrets applicable to the network you are running the tests against: -- `E2E_TEST__WALLET_KEY_` -- `E2E_TEST__RPC_HTTP_URL_` -- `E2E_TEST__RPC_WS_URL_` - -Now you are all set to run the tests with the existing testnet/mainnet. \ No newline at end of file diff --git a/integration-tests/deployment/devenv/build_env.go b/integration-tests/deployment/devenv/build_env.go deleted file mode 100644 index 61e677ca43..0000000000 --- a/integration-tests/deployment/devenv/build_env.go +++ /dev/null @@ -1,354 +0,0 @@ -package devenv - -import ( - "fmt" - "math/big" - "os" - "strconv" - "testing" - - "github.com/AlekSi/pointer" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/rs/zerolog" - chainselectors "github.com/smartcontractkit/chain-selectors" - "github.com/stretchr/testify/require" - "github.com/subosito/gotenv" - - "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/conversions" - "github.com/smartcontractkit/chainlink-testing-framework/seth" - - ctf_config "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/docker/test_env/job_distributor" - "github.com/smartcontractkit/chainlink-testing-framework/lib/networks" - "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/ptr" - - "github.com/smartcontractkit/chainlink/integration-tests/actions" - "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/testsetups" - clclient "github.com/smartcontractkit/chainlink/integration-tests/client" - "github.com/smartcontractkit/chainlink/integration-tests/contracts" - "github.com/smartcontractkit/chainlink/integration-tests/deployment" - "github.com/smartcontractkit/chainlink/integration-tests/docker/test_env" - tc "github.com/smartcontractkit/chainlink/integration-tests/testconfig" - "github.com/smartcontractkit/chainlink/integration-tests/utils" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" -) - -// CreateDockerEnv creates a new test environment with simulated private ethereum networks and job distributor -// It returns the EnvironmentConfig which holds the chain config and JD config -// The test environment is then used to start chainlink nodes -func CreateDockerEnv(t *testing.T) ( - *EnvironmentConfig, - *test_env.CLClusterTestEnv, - tc.TestConfig, -) { - if _, err := os.Stat(".env"); err == nil || !os.IsNotExist(err) { - require.NoError(t, gotenv.Load(".env"), "Error loading .env file") - } - - cfg, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.CCIP) - require.NoError(t, err, "Error getting config") - - evmNetworks := networks.MustGetSelectedNetworkConfig(cfg.GetNetworkConfig()) - - // find out if the selected networks are provided with PrivateEthereumNetworks configs - // if yes, PrivateEthereumNetworkConfig will be used to create simulated private ethereum networks in docker environment - var privateEthereumNetworks []*ctf_config.EthereumNetworkConfig - for _, name := range cfg.GetNetworkConfig().SelectedNetworks { - if network, exists := cfg.CCIP.PrivateEthereumNetworks[name]; exists { - privateEthereumNetworks = append(privateEthereumNetworks, network) - } - } - - builder := test_env.NewCLTestEnvBuilder(). - WithTestConfig(&cfg). - WithTestInstance(t). - WithStandardCleanup() - - // if private ethereum networks are provided, we will use them to create the test environment - // otherwise we will use the network URLs provided in the network config - if len(privateEthereumNetworks) > 0 { - builder = builder.WithPrivateEthereumNetworks(privateEthereumNetworks) - } - env, err := builder.Build() - require.NoError(t, err, "Error building test environment") - - chains := CreateChainConfigFromNetworks(t, env, privateEthereumNetworks, cfg.GetNetworkConfig()) - - var jdConfig JDConfig - // TODO : move this as a part of test_env setup with an input in testconfig - // if JD is not provided, we will spin up a new JD - if cfg.CCIP.GetJDGRPC() == "" && cfg.CCIP.GetJDWSRPC() == "" { - jdDB, err := ctftestenv.NewPostgresDb( - []string{env.DockerNetwork.Name}, - ctftestenv.WithPostgresDbName(cfg.CCIP.GetJDDBName()), - ctftestenv.WithPostgresImageVersion(cfg.CCIP.GetJDDBVersion()), - ) - require.NoError(t, err) - err = jdDB.StartContainer() - require.NoError(t, err) - - jd := job_distributor.New([]string{env.DockerNetwork.Name}, - job_distributor.WithImage(cfg.CCIP.GetJDImage()), - job_distributor.WithVersion(cfg.CCIP.GetJDVersion()), - job_distributor.WithDBURL(jdDB.InternalURL.String()), - ) - err = jd.StartContainer() - require.NoError(t, err) - jdConfig = JDConfig{ - GRPC: jd.Grpc, - // we will use internal wsrpc for nodes on same docker network to connect to JD - WSRPC: jd.InternalWSRPC, - } - } else { - jdConfig = JDConfig{ - GRPC: cfg.CCIP.GetJDGRPC(), - WSRPC: cfg.CCIP.GetJDWSRPC(), - } - } - require.NotEmpty(t, jdConfig, "JD config is empty") - - homeChainSelector, err := cfg.CCIP.GetHomeChainSelector() - require.NoError(t, err, "Error getting home chain selector") - homeChainID, err := chainselectors.ChainIdFromSelector(homeChainSelector) - require.NoError(t, err, "Error getting chain id from selector") - // verify if the home chain selector is valid - validHomeChain := false - for _, net := range evmNetworks { - if net.ChainID == int64(homeChainID) { - validHomeChain = true - break - } - } - require.True(t, validHomeChain, "Invalid home chain selector, chain not found in network config") - - return &EnvironmentConfig{ - Chains: chains, - JDConfig: jdConfig, - HomeChainSelector: homeChainSelector, - }, env, cfg -} - -// StartChainlinkNodes starts docker containers for chainlink nodes on the existing test environment based on provided test config -// Once the nodes starts, it updates the devenv EnvironmentConfig with the node info -// which includes chainlink API URL, email, password and internal IP -func StartChainlinkNodes( - t *testing.T, - envConfig *EnvironmentConfig, - registryConfig deployment.CapabilityRegistryConfig, - env *test_env.CLClusterTestEnv, - cfg tc.TestConfig, -) error { - evmNetworks := networks.MustGetSelectedNetworkConfig(cfg.GetNetworkConfig()) - for i, net := range evmNetworks { - // if network is simulated, update the URLs with private chain RPCs in the docker test environment - // so that nodes can internally connect to the chain - if net.Simulated { - rpcProvider, err := env.GetRpcProvider(net.ChainID) - require.NoError(t, err, "Error getting rpc provider") - evmNetworks[i].HTTPURLs = rpcProvider.PrivateHttpUrls() - evmNetworks[i].URLs = rpcProvider.PrivateWsUrsl() - } - } - noOfNodes := pointer.GetInt(cfg.CCIP.CLNode.NoOfPluginNodes) + pointer.GetInt(cfg.CCIP.CLNode.NoOfBootstraps) - if env.ClCluster == nil { - env.ClCluster = &test_env.ClCluster{} - } - var nodeInfo []NodeInfo - for i := 1; i <= noOfNodes; i++ { - if i <= pointer.GetInt(cfg.CCIP.CLNode.NoOfBootstraps) { - nodeInfo = append(nodeInfo, NodeInfo{ - IsBootstrap: true, - Name: fmt.Sprintf("bootstrap-%d", i), - // TODO : make this configurable - P2PPort: "6690", - }) - } else { - nodeInfo = append(nodeInfo, NodeInfo{ - IsBootstrap: false, - Name: fmt.Sprintf("node-%d", i-1), - // TODO : make this configurable - P2PPort: "6690", - }) - } - toml, _, err := testsetups.SetNodeConfig( - evmNetworks, - cfg.NodeConfig.BaseConfigTOML, - cfg.NodeConfig.CommonChainConfigTOML, - cfg.NodeConfig.ChainConfigTOMLByChainID, - ) - - toml.Capabilities.ExternalRegistry.NetworkID = ptr.Ptr(relay.NetworkEVM) - toml.Capabilities.ExternalRegistry.ChainID = ptr.Ptr(strconv.FormatUint(registryConfig.EVMChainID, 10)) - toml.Capabilities.ExternalRegistry.Address = ptr.Ptr(registryConfig.Contract.String()) - - if err != nil { - return err - } - ccipNode, err := test_env.NewClNode( - []string{env.DockerNetwork.Name}, - pointer.GetString(cfg.GetChainlinkImageConfig().Image), - pointer.GetString(cfg.GetChainlinkImageConfig().Version), - toml, - env.LogStream, - test_env.WithPgDBOptions( - ctftestenv.WithPostgresImageVersion(pointer.GetString(cfg.GetChainlinkImageConfig().PostgresVersion)), - ), - ) - if err != nil { - return err - } - ccipNode.SetTestLogger(t) - env.ClCluster.Nodes = append(env.ClCluster.Nodes, ccipNode) - } - err := env.ClCluster.Start() - if err != nil { - return err - } - for i, n := range env.ClCluster.Nodes { - nodeInfo[i].CLConfig = clclient.ChainlinkConfig{ - URL: n.API.URL(), - Email: n.UserEmail, - Password: n.UserPassword, - InternalIP: n.API.InternalIP(), - } - } - envConfig.nodeInfo = nodeInfo - return nil -} - -// FundNodes sends funds to the chainlink nodes based on the provided test config -// It also sets up a clean-up function to return the funds back to the deployer account once the test is done -// It assumes that the chainlink nodes are already started and the account addresses for all chains are available -func FundNodes(t *testing.T, lggr zerolog.Logger, env *test_env.CLClusterTestEnv, cfg tc.TestConfig, nodes []Node) { - evmNetworks := networks.MustGetSelectedNetworkConfig(cfg.GetNetworkConfig()) - for i, net := range evmNetworks { - // if network is simulated, update the URLs with deployed chain RPCs in the docker test environment - if net.Simulated { - rpcProvider, err := env.GetRpcProvider(net.ChainID) - require.NoError(t, err, "Error getting rpc provider") - evmNetworks[i].HTTPURLs = rpcProvider.PublicHttpUrls() - evmNetworks[i].URLs = rpcProvider.PublicWsUrls() - } - } - t.Cleanup(func() { - for i := range evmNetworks { - // if simulated no need for balance return - if evmNetworks[i].Simulated { - continue - } - evmNetwork := evmNetworks[i] - sethClient, err := utils.TestAwareSethClient(t, cfg, &evmNetwork) - require.NoError(t, err, "Error getting seth client for network %s", evmNetwork.Name) - require.Greater(t, len(sethClient.PrivateKeys), 0, seth.ErrNoKeyLoaded) - var keyExporters []contracts.ChainlinkKeyExporter - for j := range nodes { - node := nodes[j] - keyExporters = append(keyExporters, &node) - } - if err := actions.ReturnFundsFromKeyExporterNodes(lggr, sethClient, keyExporters); err != nil { - lggr.Error().Err(err).Str("Network", evmNetwork.Name). - Msg("Error attempting to return funds from chainlink nodes to network's default wallet. " + - "Environment is left running so you can try manually!") - } - } - }) - for i := range evmNetworks { - evmNetwork := evmNetworks[i] - sethClient, err := utils.TestAwareSethClient(t, cfg, &evmNetwork) - require.NoError(t, err, "Error getting seth client for network %s", evmNetwork.Name) - require.Greater(t, len(sethClient.PrivateKeys), 0, seth.ErrNoKeyLoaded) - privateKey := sethClient.PrivateKeys[0] - for _, node := range nodes { - nodeAddr, ok := node.AccountAddr[uint64(evmNetwork.ChainID)] - require.True(t, ok, "Account address not found for chain %d", evmNetwork.ChainID) - fromAddress, err := actions.PrivateKeyToAddress(privateKey) - require.NoError(t, err, "Error getting address from private key") - amount := big.NewFloat(pointer.GetFloat64(cfg.Common.ChainlinkNodeFunding)) - toAddr := common.HexToAddress(nodeAddr) - receipt, err := actions.SendFunds(lggr, sethClient, actions.FundsToSendPayload{ - ToAddress: toAddr, - Amount: conversions.EtherToWei(amount), - PrivateKey: privateKey, - }) - require.NoError(t, err, "Error sending funds to node %s", node.Name) - require.NotNil(t, receipt, "Receipt is nil") - txHash := "(none)" - if receipt != nil { - txHash = receipt.TxHash.String() - } - lggr.Info(). - Str("From", fromAddress.Hex()). - Str("To", toAddr.String()). - Str("TxHash", txHash). - Str("Amount", amount.String()). - Msg("Funded Chainlink node") - } - } -} - -// CreateChainConfigFromNetworks creates a list of ChainConfig from the network config provided in test config. -// It either creates it from the private ethereum networks created by the test environment or from the -// network URLs provided in the network config ( if the network is a live testnet). -// It uses the private keys from the network config to create the deployer key for each chain. -func CreateChainConfigFromNetworks( - t *testing.T, - env *test_env.CLClusterTestEnv, - privateEthereumNetworks []*ctf_config.EthereumNetworkConfig, - networkConfig *ctf_config.NetworkConfig, -) []ChainConfig { - evmNetworks := networks.MustGetSelectedNetworkConfig(networkConfig) - networkPvtKeys := make(map[int64]string) - for _, net := range evmNetworks { - require.Greater(t, len(net.PrivateKeys), 0, "No private keys found for network") - networkPvtKeys[net.ChainID] = net.PrivateKeys[0] - } - var chains []ChainConfig - // if private ethereum networks are not provided, we will create chains from the network URLs - if len(privateEthereumNetworks) == 0 { - for _, net := range evmNetworks { - chainId := net.ChainID - chainName, err := chainselectors.NameFromChainId(uint64(chainId)) - require.NoError(t, err, "Error getting chain name") - pvtKeyStr, exists := networkPvtKeys[chainId] - require.Truef(t, exists, "Private key not found for chain id %d", chainId) - pvtKey, err := crypto.HexToECDSA(pvtKeyStr) - require.NoError(t, err) - deployer, err := bind.NewKeyedTransactorWithChainID(pvtKey, big.NewInt(chainId)) - require.NoError(t, err) - chains = append(chains, ChainConfig{ - ChainID: uint64(chainId), - ChainName: chainName, - ChainType: "EVM", - WSRPCs: net.URLs, - HTTPRPCs: net.HTTPURLs, - DeployerKey: deployer, - }) - } - return chains - } - for _, networkCfg := range privateEthereumNetworks { - chainId := networkCfg.EthereumChainConfig.ChainID - chainName, err := chainselectors.NameFromChainId(uint64(chainId)) - require.NoError(t, err, "Error getting chain name") - rpcProvider, err := env.GetRpcProvider(int64(chainId)) - require.NoError(t, err, "Error getting rpc provider") - pvtKeyStr, exists := networkPvtKeys[int64(chainId)] - require.Truef(t, exists, "Private key not found for chain id %d", chainId) - pvtKey, err := crypto.HexToECDSA(pvtKeyStr) - require.NoError(t, err) - deployer, err := bind.NewKeyedTransactorWithChainID(pvtKey, big.NewInt(int64(chainId))) - require.NoError(t, err) - chains = append(chains, ChainConfig{ - ChainID: uint64(chainId), - ChainName: chainName, - ChainType: "EVM", - WSRPCs: rpcProvider.PublicWsUrls(), - HTTPRPCs: rpcProvider.PublicHttpUrls(), - DeployerKey: deployer, - }) - } - return chains -} diff --git a/integration-tests/deployment/devenv/chain.go b/integration-tests/deployment/devenv/chain.go deleted file mode 100644 index e40bbc066f..0000000000 --- a/integration-tests/deployment/devenv/chain.go +++ /dev/null @@ -1,91 +0,0 @@ -package devenv - -import ( - "context" - "fmt" - "time" - - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/ethclient" - "github.com/sethvargo/go-retry" - chainselectors "github.com/smartcontractkit/chain-selectors" - - "github.com/smartcontractkit/chainlink-common/pkg/logger" - - "github.com/smartcontractkit/chainlink/integration-tests/deployment" -) - -// ChainConfig holds the configuration for a with a deployer key which can be used to send transactions to the chain. -type ChainConfig struct { - ChainID uint64 // chain id as per EIP-155, mainly applicable for EVM chains - ChainName string // name of the chain populated from chainselector repo - ChainType string // should denote the chain family. Acceptable values are EVM, COSMOS, SOLANA, STARKNET, APTOS etc - WSRPCs []string // websocket rpcs to connect to the chain - HTTPRPCs []string // http rpcs to connect to the chain - DeployerKey *bind.TransactOpts // key to send transactions to the chain -} - -func NewChains(logger logger.Logger, configs []ChainConfig) (map[uint64]deployment.Chain, error) { - chains := make(map[uint64]deployment.Chain) - for _, chainCfg := range configs { - selector, err := chainselectors.SelectorFromChainId(chainCfg.ChainID) - if err != nil { - return nil, fmt.Errorf("failed to get selector from chain id %d: %w", chainCfg.ChainID, err) - } - // TODO : better client handling - var ec *ethclient.Client - for _, rpc := range chainCfg.WSRPCs { - ec, err = ethclient.Dial(rpc) - if err != nil { - logger.Warnf("failed to dial ws rpc %s", rpc) - continue - } - logger.Infof("connected to ws rpc %s", rpc) - break - } - if ec == nil { - return nil, fmt.Errorf("failed to connect to chain %s", chainCfg.ChainName) - } - chains[selector] = deployment.Chain{ - Selector: selector, - Client: ec, - DeployerKey: chainCfg.DeployerKey, - Confirm: func(tx *types.Transaction) (uint64, error) { - var blockNumber uint64 - if tx == nil { - return 0, fmt.Errorf("tx was nil, nothing to confirm") - } - err := retry.Do(context.Background(), - retry.WithMaxDuration(3*time.Minute, retry.NewFibonacci(1*time.Second)), - func(ctx context.Context) error { - chainId, err := ec.ChainID(ctx) - if err != nil { - return fmt.Errorf("failed to get chain id: %w", err) - } - receipt, err := bind.WaitMined(ctx, ec, tx) - if err != nil { - return retry.RetryableError(fmt.Errorf("failed to get receipt for chain %d: %w", chainId, err)) - } - if receipt != nil { - blockNumber = receipt.BlockNumber.Uint64() - } - if receipt.Status == 0 { - t, _, err := ec.TransactionByHash(context.Background(), tx.Hash()) - if err != nil { - return fmt.Errorf("tx %s reverted, failed to get transaction: %w", tx.Hash().Hex(), err) - } - errReason, err := deployment.GetErrorReasonFromTx(ec, chainCfg.DeployerKey.From, *t, receipt) - if err == nil && errReason != "" { - return fmt.Errorf("tx %s reverted,error reason: %s", tx.Hash().Hex(), errReason) - } - return fmt.Errorf("tx %s reverted, could not decode error reason", tx.Hash().Hex()) - } - return nil - }) - return blockNumber, err - }, - } - } - return chains, nil -} diff --git a/integration-tests/deployment/devenv/don.go b/integration-tests/deployment/devenv/don.go deleted file mode 100644 index ab64eab5c5..0000000000 --- a/integration-tests/deployment/devenv/don.go +++ /dev/null @@ -1,282 +0,0 @@ -package devenv - -import ( - "context" - "fmt" - "strconv" - "strings" - - "github.com/AlekSi/pointer" - "github.com/hashicorp/go-multierror" - "github.com/rs/zerolog" - - clclient "github.com/smartcontractkit/chainlink/integration-tests/client" - nodev1 "github.com/smartcontractkit/chainlink/integration-tests/deployment/jd/node/v1" - "github.com/smartcontractkit/chainlink/integration-tests/deployment/jd/shared/ptypes" - "github.com/smartcontractkit/chainlink/integration-tests/web/sdk/client" -) - -const ( - NodeLabelKeyType = "type" - NodeLabelValueBootstrap = "bootstrap" - NodeLabelValuePlugin = "plugin" -) - -// NodeInfo holds the information required to create a node -type NodeInfo struct { - CLConfig clclient.ChainlinkConfig // config to connect to chainlink node via API - P2PPort string // port for P2P communication - IsBootstrap bool // denotes if the node is a bootstrap node - Name string // name of the node, used to identify the node, helpful in logs - AdminAddr string // admin address to send payments to, applicable only for non-bootstrap nodes -} - -type DON struct { - Nodes []Node -} - -func (don *DON) PluginNodes() []Node { - var pluginNodes []Node - for _, node := range don.Nodes { - for _, label := range node.labels { - if label.Key == NodeLabelKeyType && pointer.GetString(label.Value) == NodeLabelValuePlugin { - pluginNodes = append(pluginNodes, node) - } - } - } - return pluginNodes -} - -func (don *DON) NodeIds() []string { - var nodeIds []string - for _, node := range don.Nodes { - nodeIds = append(nodeIds, node.NodeId) - } - return nodeIds -} - -func (don *DON) CreateSupportedChains(ctx context.Context, chains []ChainConfig) error { - var err error - for i, node := range don.Nodes { - if err1 := node.CreateCCIPOCRSupportedChains(ctx, chains); err1 != nil { - err = multierror.Append(err, err1) - } - don.Nodes[i] = node - } - return err -} - -// NewRegisteredDON creates a DON with the given node info, registers the nodes with the job distributor -// and sets up the job distributor in the nodes -func NewRegisteredDON(ctx context.Context, nodeInfo []NodeInfo, jd JobDistributor) (*DON, error) { - don := &DON{ - Nodes: make([]Node, 0), - } - for i, info := range nodeInfo { - if info.Name == "" { - info.Name = fmt.Sprintf("node-%d", i) - } - node, err := NewNode(info) - if err != nil { - return nil, fmt.Errorf("failed to create node %d: %w", i, err) - } - // node Labels so that it's easier to query them - if info.IsBootstrap { - // create multi address for OCR2, applicable only for bootstrap nodes - - node.multiAddr = fmt.Sprintf("%s:%s", info.CLConfig.InternalIP, info.P2PPort) - // no need to set admin address for bootstrap nodes, as there will be no payment - node.adminAddr = "" - node.labels = append(node.labels, &ptypes.Label{ - Key: NodeLabelKeyType, - Value: pointer.ToString(NodeLabelValueBootstrap), - }) - } else { - // multi address is not applicable for non-bootstrap nodes - // explicitly set it to empty string to denote that - node.multiAddr = "" - node.labels = append(node.labels, &ptypes.Label{ - Key: NodeLabelKeyType, - Value: pointer.ToString(NodeLabelValuePlugin), - }) - } - // Set up Job distributor in node and register node with the job distributor - err = node.SetUpAndLinkJobDistributor(ctx, jd) - if err != nil { - return nil, fmt.Errorf("failed to set up job distributor in node %s: %w", info.Name, err) - } - - don.Nodes = append(don.Nodes, *node) - } - return don, nil -} - -func NewNode(nodeInfo NodeInfo) (*Node, error) { - gqlClient, err := client.New(nodeInfo.CLConfig.URL, client.Credentials{ - Email: nodeInfo.CLConfig.Email, - Password: nodeInfo.CLConfig.Password, - }) - if err != nil { - return nil, fmt.Errorf("failed to create node graphql client: %w", err) - } - chainlinkClient, err := clclient.NewChainlinkClient(&nodeInfo.CLConfig, zerolog.Logger{}) - if err != nil { - return nil, fmt.Errorf("failed to create node rest client: %w", err) - } - return &Node{ - gqlClient: gqlClient, - restClient: chainlinkClient, - Name: nodeInfo.Name, - adminAddr: nodeInfo.AdminAddr, - }, nil -} - -type Node struct { - NodeId string // node id returned by job distributor after node is registered with it - JDId string // job distributor id returned by node after Job distributor is created in node - Name string // name of the node - AccountAddr map[uint64]string // chain selector to node's account address mapping for supported chains - gqlClient client.Client // graphql client to interact with the node - restClient *clclient.ChainlinkClient // rest client to interact with the node - labels []*ptypes.Label // labels with which the node is registered with the job distributor - adminAddr string // admin address to send payments to, applicable only for non-bootstrap nodes - multiAddr string // multi address denoting node's FQN (needed for deriving P2PBootstrappers in OCR), applicable only for bootstrap nodes -} - -// CreateCCIPOCRSupportedChains creates a JobDistributorChainConfig for the node. -// It works under assumption that the node is already registered with the job distributor. -// It expects bootstrap nodes to have label with key "type" and value as "bootstrap". -// It fetches the account address, peer id, and OCR2 key bundle id and creates the JobDistributorChainConfig. -func (n *Node) CreateCCIPOCRSupportedChains(ctx context.Context, chains []ChainConfig) error { - for _, chain := range chains { - chainId := strconv.FormatUint(chain.ChainID, 10) - accountAddr, err := n.gqlClient.FetchAccountAddress(ctx, chainId) - if err != nil { - return fmt.Errorf("failed to fetch account address for node %s: %w", n.Name, err) - } - if accountAddr == nil { - return fmt.Errorf("no account address found for node %s", n.Name) - } - if n.AccountAddr == nil { - n.AccountAddr = make(map[uint64]string) - } - n.AccountAddr[chain.ChainID] = *accountAddr - peerID, err := n.gqlClient.FetchP2PPeerID(ctx) - if err != nil { - return fmt.Errorf("failed to fetch peer id for node %s: %w", n.Name, err) - } - if peerID == nil { - return fmt.Errorf("no peer id found for node %s", n.Name) - } - - ocr2BundleId, err := n.gqlClient.FetchOCR2KeyBundleID(ctx, chain.ChainType) - if err != nil { - return fmt.Errorf("failed to fetch OCR2 key bundle id for node %s: %w", n.Name, err) - } - if ocr2BundleId == "" { - return fmt.Errorf("no OCR2 key bundle id found for node %s", n.Name) - } - // fetch node labels to know if the node is bootstrap or plugin - isBootstrap := false - for _, label := range n.labels { - if label.Key == NodeLabelKeyType && pointer.GetString(label.Value) == NodeLabelValueBootstrap { - isBootstrap = true - break - } - } - err = n.gqlClient.CreateJobDistributorChainConfig(ctx, client.JobDistributorChainConfigInput{ - JobDistributorID: n.JDId, - ChainID: chainId, - ChainType: chain.ChainType, - AccountAddr: pointer.GetString(accountAddr), - AdminAddr: n.adminAddr, - Ocr2Enabled: true, - Ocr2IsBootstrap: isBootstrap, - Ocr2Multiaddr: n.multiAddr, - Ocr2P2PPeerID: pointer.GetString(peerID), - Ocr2KeyBundleID: ocr2BundleId, - Ocr2Plugins: `{"commit":true,"execute":true,"median":false,"mercury":false}`, - }) - if err != nil { - return fmt.Errorf("failed to create CCIPOCR2SupportedChains for node %s: %w", n.Name, err) - } - } - return nil -} - -func (n *Node) AcceptJob(ctx context.Context, id string) error { - spec, err := n.gqlClient.ApproveJobProposalSpec(ctx, id, false) - if err != nil { - return err - } - if spec == nil { - return fmt.Errorf("no job proposal spec found for job id %s", id) - } - return nil -} - -// RegisterNodeToJobDistributor fetches the CSA public key of the node and registers the node with the job distributor -// it sets the node id returned by JobDistributor as a result of registration in the node struct -func (n *Node) RegisterNodeToJobDistributor(ctx context.Context, jd JobDistributor) error { - // Get the public key of the node - csaKeyRes, err := n.gqlClient.FetchCSAPublicKey(ctx) - if err != nil { - return err - } - if csaKeyRes == nil { - return fmt.Errorf("no csa key found for node %s", n.Name) - } - csaKey := strings.TrimPrefix(*csaKeyRes, "csa_") - // register the node in the job distributor - registerResponse, err := jd.RegisterNode(ctx, &nodev1.RegisterNodeRequest{ - PublicKey: csaKey, - Labels: n.labels, - Name: n.Name, - }) - - if err != nil { - return fmt.Errorf("failed to register node %s: %w", n.Name, err) - } - if registerResponse.GetNode().GetId() == "" { - return fmt.Errorf("no node id returned from job distributor for node %s", n.Name) - } - n.NodeId = registerResponse.GetNode().GetId() - return nil -} - -// CreateJobDistributor fetches the keypairs from the job distributor and creates the job distributor in the node -// and returns the job distributor id -func (n *Node) CreateJobDistributor(ctx context.Context, jd JobDistributor) (string, error) { - // Get the keypairs from the job distributor - csaKey, err := jd.GetCSAPublicKey(ctx) - if err != nil { - return "", err - } - // create the job distributor in the node with the csa key - return n.gqlClient.CreateJobDistributor(ctx, client.JobDistributorInput{ - Name: "Job Distributor", - Uri: jd.WSRPC, - PublicKey: csaKey, - }) -} - -// SetUpAndLinkJobDistributor sets up the job distributor in the node and registers the node with the job distributor -// it sets the job distributor id for node -func (n *Node) SetUpAndLinkJobDistributor(ctx context.Context, jd JobDistributor) error { - // register the node in the job distributor - err := n.RegisterNodeToJobDistributor(ctx, jd) - if err != nil { - return err - } - // now create the job distributor in the node - id, err := n.CreateJobDistributor(ctx, jd) - if err != nil { - return err - } - n.JDId = id - return nil -} - -func (n *Node) ExportEVMKeysForChain(chainId string) ([]*clclient.ExportedEVMKey, error) { - return n.restClient.ExportEVMKeysForChain(chainId) -} diff --git a/integration-tests/deployment/devenv/environment.go b/integration-tests/deployment/devenv/environment.go deleted file mode 100644 index f7513798e3..0000000000 --- a/integration-tests/deployment/devenv/environment.go +++ /dev/null @@ -1,55 +0,0 @@ -package devenv - -import ( - "context" - "fmt" - - "github.com/smartcontractkit/chainlink-common/pkg/logger" - - "github.com/smartcontractkit/chainlink/integration-tests/deployment" -) - -const ( - DevEnv = "devenv" -) - -type EnvironmentConfig struct { - Chains []ChainConfig - HomeChainSelector uint64 - nodeInfo []NodeInfo - JDConfig JDConfig -} - -func NewEnvironment(ctx context.Context, lggr logger.Logger, config EnvironmentConfig) (*deployment.Environment, *DON, error) { - chains, err := NewChains(lggr, config.Chains) - if err != nil { - return nil, nil, fmt.Errorf("failed to create chains: %w", err) - } - offChain, err := NewJDClient(config.JDConfig) - if err != nil { - return nil, nil, fmt.Errorf("failed to create JD client: %w", err) - } - - jd, ok := offChain.(JobDistributor) - if !ok { - return nil, nil, fmt.Errorf("offchain client does not implement JobDistributor") - } - don, err := NewRegisteredDON(ctx, config.nodeInfo, jd) - if err != nil { - return nil, nil, fmt.Errorf("failed to create registered DON: %w", err) - } - nodeIDs := don.NodeIds() - - err = don.CreateSupportedChains(ctx, config.Chains) - if err != nil { - return nil, nil, err - } - - return &deployment.Environment{ - Name: DevEnv, - Offchain: offChain, - NodeIDs: nodeIDs, - Chains: chains, - Logger: lggr, - }, don, nil -} diff --git a/integration-tests/deployment/devenv/jd.go b/integration-tests/deployment/devenv/jd.go deleted file mode 100644 index 671e6e4cea..0000000000 --- a/integration-tests/deployment/devenv/jd.go +++ /dev/null @@ -1,71 +0,0 @@ -package devenv - -import ( - "context" - "fmt" - - "google.golang.org/grpc" - "google.golang.org/grpc/credentials" - "google.golang.org/grpc/credentials/insecure" - - "github.com/smartcontractkit/chainlink/integration-tests/deployment" - csav1 "github.com/smartcontractkit/chainlink/integration-tests/deployment/jd/csa/v1" - jobv1 "github.com/smartcontractkit/chainlink/integration-tests/deployment/jd/job/v1" - nodev1 "github.com/smartcontractkit/chainlink/integration-tests/deployment/jd/node/v1" -) - -type JDConfig struct { - GRPC string - WSRPC string - creds credentials.TransportCredentials -} - -func NewJDConnection(cfg JDConfig) (*grpc.ClientConn, error) { - var opts []grpc.DialOption - // TODO: add auth details - if cfg.creds != nil { - opts = append(opts, grpc.WithTransportCredentials(cfg.creds)) - } else { - opts = append(opts, grpc.WithTransportCredentials(insecure.NewCredentials())) - - } - - conn, err := grpc.NewClient(cfg.GRPC, opts...) - if err != nil { - return nil, fmt.Errorf("failed to connect Job Distributor service. Err: %w", err) - } - - return conn, nil -} - -type JobDistributor struct { - WSRPC string - nodev1.NodeServiceClient - jobv1.JobServiceClient - csav1.CSAServiceClient -} - -func NewJDClient(cfg JDConfig) (deployment.OffchainClient, error) { - conn, err := NewJDConnection(cfg) - if err != nil { - return nil, fmt.Errorf("failed to connect Job Distributor service. Err: %w", err) - } - return JobDistributor{ - WSRPC: cfg.WSRPC, - NodeServiceClient: nodev1.NewNodeServiceClient(conn), - JobServiceClient: jobv1.NewJobServiceClient(conn), - CSAServiceClient: csav1.NewCSAServiceClient(conn), - }, err -} - -func (jd JobDistributor) GetCSAPublicKey(ctx context.Context) (string, error) { - keypairs, err := jd.ListKeypairs(ctx, &csav1.ListKeypairsRequest{}) - if err != nil { - return "", err - } - if keypairs == nil || len(keypairs.Keypairs) == 0 { - return "", fmt.Errorf("no keypairs found") - } - csakey := keypairs.Keypairs[0].PublicKey - return csakey, nil -} diff --git a/integration-tests/deployment/environment.go b/integration-tests/deployment/environment.go deleted file mode 100644 index 0f3c85a362..0000000000 --- a/integration-tests/deployment/environment.go +++ /dev/null @@ -1,266 +0,0 @@ -package deployment - -import ( - "bytes" - "context" - "errors" - "fmt" - "math/big" - "sort" - "strconv" - - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/rpc" - chain_selectors "github.com/smartcontractkit/chain-selectors" - types2 "github.com/smartcontractkit/libocr/offchainreporting2/types" - types3 "github.com/smartcontractkit/libocr/offchainreporting2plus/types" - - csav1 "github.com/smartcontractkit/chainlink/integration-tests/deployment/jd/csa/v1" - - jobv1 "github.com/smartcontractkit/chainlink/integration-tests/deployment/jd/job/v1" - nodev1 "github.com/smartcontractkit/chainlink/integration-tests/deployment/jd/node/v1" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" - - "github.com/smartcontractkit/chainlink-common/pkg/logger" -) - -type OnchainClient interface { - // For EVM specifically we can use existing geth interface - // to abstract chain clients. - bind.ContractBackend - bind.DeployBackend -} - -type OffchainClient interface { - // The job distributor grpc interface can be used to abstract offchain read/writes - jobv1.JobServiceClient - nodev1.NodeServiceClient - csav1.CSAServiceClient -} - -type Chain struct { - // Selectors used as canonical chain identifier. - Selector uint64 - Client OnchainClient - // Note the Sign function can be abstract supporting a variety of key storage mechanisms (e.g. KMS etc). - DeployerKey *bind.TransactOpts - Confirm func(tx *types.Transaction) (uint64, error) -} - -type Environment struct { - Name string - Chains map[uint64]Chain - Offchain OffchainClient - NodeIDs []string - Logger logger.Logger -} - -func (e Environment) AllChainSelectors() []uint64 { - var selectors []uint64 - for sel := range e.Chains { - selectors = append(selectors, sel) - } - return selectors -} - -func (e Environment) AllChainSelectorsExcluding(excluding []uint64) []uint64 { - var selectors []uint64 - for sel := range e.Chains { - excluded := false - for _, toExclude := range excluding { - if sel == toExclude { - excluded = true - } - } - if excluded { - continue - } - selectors = append(selectors, sel) - } - return selectors -} - -func ConfirmIfNoError(chain Chain, tx *types.Transaction, err error) (uint64, error) { - if err != nil { - //revive:disable - var d rpc.DataError - ok := errors.As(err, &d) - if ok { - return 0, fmt.Errorf("got Data Error: %s", d.ErrorData()) - } - return 0, err - } - return chain.Confirm(tx) -} - -func MaybeDataErr(err error) error { - //revive:disable - var d rpc.DataError - ok := errors.As(err, &d) - if ok { - return d - } - return err -} - -func UBigInt(i uint64) *big.Int { - return new(big.Int).SetUint64(i) -} - -func E18Mult(amount uint64) *big.Int { - return new(big.Int).Mul(UBigInt(amount), UBigInt(1e18)) -} - -type OCRConfig struct { - OffchainPublicKey types2.OffchainPublicKey - // For EVM-chains, this an *address*. - OnchainPublicKey types2.OnchainPublicKey - PeerID p2pkey.PeerID - TransmitAccount types2.Account - ConfigEncryptionPublicKey types3.ConfigEncryptionPublicKey - KeyBundleID string -} - -// Nodes includes is a group CL nodes. -type Nodes []Node - -// PeerIDs returns peerIDs in a sorted list -func (n Nodes) PeerIDs() [][32]byte { - var peerIDs [][32]byte - for _, node := range n { - peerIDs = append(peerIDs, node.PeerID) - } - sort.Slice(peerIDs, func(i, j int) bool { - return bytes.Compare(peerIDs[i][:], peerIDs[j][:]) < 0 - }) - return peerIDs -} - -func (n Nodes) NonBootstraps() Nodes { - var nonBootstraps Nodes - for _, node := range n { - if node.IsBootstrap { - continue - } - nonBootstraps = append(nonBootstraps, node) - } - return nonBootstraps -} - -func (n Nodes) DefaultF() uint8 { - return uint8(len(n) / 3) -} - -func (n Nodes) BootstrapLocators() []string { - bootstrapMp := make(map[string]struct{}) - for _, node := range n { - if node.IsBootstrap { - bootstrapMp[fmt.Sprintf("%s@%s", - // p2p_12D3... -> 12D3... - node.PeerID.String()[4:], node.MultiAddr)] = struct{}{} - } - } - var locators []string - for b := range bootstrapMp { - locators = append(locators, b) - } - return locators -} - -type Node struct { - NodeID string - SelToOCRConfig map[uint64]OCRConfig - PeerID p2pkey.PeerID - IsBootstrap bool - MultiAddr string -} - -func (n Node) FirstOCRKeybundle() OCRConfig { - for _, ocrConfig := range n.SelToOCRConfig { - return ocrConfig - } - return OCRConfig{} -} - -func MustPeerIDFromString(s string) p2pkey.PeerID { - p := p2pkey.PeerID{} - if err := p.UnmarshalString(s); err != nil { - panic(err) - } - return p -} - -// Gathers all the node info through JD required to be able to set -// OCR config for example. -func NodeInfo(nodeIDs []string, oc OffchainClient) (Nodes, error) { - var nodes []Node - for _, nodeID := range nodeIDs { - // TODO: Filter should accept multiple nodes - nodeChainConfigs, err := oc.ListNodeChainConfigs(context.Background(), &nodev1.ListNodeChainConfigsRequest{Filter: &nodev1.ListNodeChainConfigsRequest_Filter{ - NodeIds: []string{nodeID}, - }}) - if err != nil { - return nil, err - } - selToOCRConfig := make(map[uint64]OCRConfig) - bootstrap := false - var peerID p2pkey.PeerID - var multiAddr string - for _, chainConfig := range nodeChainConfigs.ChainConfigs { - if chainConfig.Chain.Type == nodev1.ChainType_CHAIN_TYPE_SOLANA { - // Note supported for CCIP yet. - continue - } - // NOTE: Assume same peerID/multiAddr for all chains. - // Might make sense to change proto as peerID/multiAddr is 1-1 with nodeID? - peerID = MustPeerIDFromString(chainConfig.Ocr2Config.P2PKeyBundle.PeerId) - multiAddr = chainConfig.Ocr2Config.Multiaddr - if chainConfig.Ocr2Config.IsBootstrap { - // NOTE: Assume same peerID for all chains. - // Might make sense to change proto as peerID is 1-1 with nodeID? - bootstrap = true - break - } - evmChainID, err := strconv.Atoi(chainConfig.Chain.Id) - if err != nil { - return nil, err - } - sel, err := chain_selectors.SelectorFromChainId(uint64(evmChainID)) - if err != nil { - return nil, err - } - b := common.Hex2Bytes(chainConfig.Ocr2Config.OcrKeyBundle.OffchainPublicKey) - var opk types2.OffchainPublicKey - copy(opk[:], b) - - b = common.Hex2Bytes(chainConfig.Ocr2Config.OcrKeyBundle.ConfigPublicKey) - var cpk types3.ConfigEncryptionPublicKey - copy(cpk[:], b) - - selToOCRConfig[sel] = OCRConfig{ - OffchainPublicKey: opk, - OnchainPublicKey: common.HexToAddress(chainConfig.Ocr2Config.OcrKeyBundle.OnchainSigningAddress).Bytes(), - PeerID: MustPeerIDFromString(chainConfig.Ocr2Config.P2PKeyBundle.PeerId), - TransmitAccount: types2.Account(chainConfig.AccountAddress), - ConfigEncryptionPublicKey: cpk, - KeyBundleID: chainConfig.Ocr2Config.OcrKeyBundle.BundleId, - } - } - nodes = append(nodes, Node{ - NodeID: nodeID, - SelToOCRConfig: selToOCRConfig, - IsBootstrap: bootstrap, - PeerID: peerID, - MultiAddr: multiAddr, - }) - } - - return nodes, nil -} - -type CapabilityRegistryConfig struct { - EVMChainID uint64 // chain id of the chain the CR is deployed on - Contract common.Address // address of the CR contract -} diff --git a/integration-tests/deployment/evm_kmsclient.go b/integration-tests/deployment/evm_kmsclient.go deleted file mode 100644 index 07af77523c..0000000000 --- a/integration-tests/deployment/evm_kmsclient.go +++ /dev/null @@ -1,233 +0,0 @@ -package deployment - -import ( - "bytes" - "context" - "crypto/ecdsa" - "encoding/asn1" - "encoding/hex" - "fmt" - "math/big" - - "github.com/aws/aws-sdk-go/aws/session" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/kms" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/crypto/secp256k1" -) - -var ( - secp256k1N = crypto.S256().Params().N - secp256k1HalfN = new(big.Int).Div(secp256k1N, big.NewInt(2)) -) - -// See https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#API_GetPublicKey_ResponseSyntax -// and https://datatracker.ietf.org/doc/html/rfc5280 for why we need to unpack the KMS public key. -type asn1SubjectPublicKeyInfo struct { - AlgorithmIdentifier asn1AlgorithmIdentifier - SubjectPublicKey asn1.BitString -} - -type asn1AlgorithmIdentifier struct { - Algorithm asn1.ObjectIdentifier - Parameters asn1.ObjectIdentifier -} - -// See https://aws.amazon.com/blogs/database/part2-use-aws-kms-to-securely-manage-ethereum-accounts/ for why we -// need to manually prep the signature for Ethereum. -type asn1ECDSASig struct { - R asn1.RawValue - S asn1.RawValue -} - -// TODO: Mockery gen then test with a regular eth key behind the interface. -type KMSClient interface { - GetPublicKey(input *kms.GetPublicKeyInput) (*kms.GetPublicKeyOutput, error) - Sign(input *kms.SignInput) (*kms.SignOutput, error) -} - -type KMS struct { - KmsDeployerKeyId string - KmsDeployerKeyRegion string - AwsProfileName string -} - -func NewKMSClient(config KMS) (KMSClient, error) { - if config.KmsDeployerKeyId == "" { - return nil, fmt.Errorf("KMS key ID is required") - } - if config.KmsDeployerKeyRegion == "" { - return nil, fmt.Errorf("KMS key region is required") - } - var awsSessionFn AwsSessionFn - if config.AwsProfileName != "" { - awsSessionFn = awsSessionFromProfileFn - } else { - awsSessionFn = awsSessionFromEnvVarsFn - } - return kms.New(awsSessionFn(config)), nil -} - -type EVMKMSClient struct { - Client KMSClient - KeyID string -} - -func NewEVMKMSClient(client KMSClient, keyID string) *EVMKMSClient { - return &EVMKMSClient{ - Client: client, - KeyID: keyID, - } -} - -func (c *EVMKMSClient) GetKMSTransactOpts(ctx context.Context, chainID *big.Int) (*bind.TransactOpts, error) { - ecdsaPublicKey, err := c.GetECDSAPublicKey() - if err != nil { - return nil, err - } - - pubKeyBytes := secp256k1.S256().Marshal(ecdsaPublicKey.X, ecdsaPublicKey.Y) - keyAddr := crypto.PubkeyToAddress(*ecdsaPublicKey) - if chainID == nil { - return nil, fmt.Errorf("chainID is required") - } - signer := types.LatestSignerForChainID(chainID) - - signerFn := func(address common.Address, tx *types.Transaction) (*types.Transaction, error) { - if address != keyAddr { - return nil, bind.ErrNotAuthorized - } - - txHashBytes := signer.Hash(tx).Bytes() - - mType := kms.MessageTypeDigest - algo := kms.SigningAlgorithmSpecEcdsaSha256 - signOutput, err := c.Client.Sign( - &kms.SignInput{ - KeyId: &c.KeyID, - SigningAlgorithm: &algo, - MessageType: &mType, - Message: txHashBytes, - }) - if err != nil { - return nil, fmt.Errorf("failed to call kms.Sign() on transaction: %w", err) - } - - ethSig, err := kmsToEthSig(signOutput.Signature, pubKeyBytes, txHashBytes) - if err != nil { - return nil, fmt.Errorf("failed to convert KMS signature to Ethereum signature: %w", err) - } - - return tx.WithSignature(signer, ethSig) - } - - return &bind.TransactOpts{ - From: keyAddr, - Signer: signerFn, - Context: ctx, - }, nil -} - -// GetECDSAPublicKey retrieves the public key from KMS and converts it to its ECDSA representation. -func (c *EVMKMSClient) GetECDSAPublicKey() (*ecdsa.PublicKey, error) { - getPubKeyOutput, err := c.Client.GetPublicKey(&kms.GetPublicKeyInput{ - KeyId: aws.String(c.KeyID), - }) - if err != nil { - return nil, fmt.Errorf("can not get public key from KMS for KeyId=%s: %w", c.KeyID, err) - } - - var asn1pubKeyInfo asn1SubjectPublicKeyInfo - _, err = asn1.Unmarshal(getPubKeyOutput.PublicKey, &asn1pubKeyInfo) - if err != nil { - return nil, fmt.Errorf("can not parse asn1 public key for KeyId=%s: %w", c.KeyID, err) - } - - pubKey, err := crypto.UnmarshalPubkey(asn1pubKeyInfo.SubjectPublicKey.Bytes) - if err != nil { - return nil, fmt.Errorf("can not unmarshal public key bytes: %w", err) - } - return pubKey, nil -} - -func kmsToEthSig(kmsSig, ecdsaPubKeyBytes, hash []byte) ([]byte, error) { - var asn1Sig asn1ECDSASig - _, err := asn1.Unmarshal(kmsSig, &asn1Sig) - if err != nil { - return nil, err - } - - rBytes := asn1Sig.R.Bytes - sBytes := asn1Sig.S.Bytes - - // Adjust S value from signature to match Eth standard. - // See: https://aws.amazon.com/blogs/database/part2-use-aws-kms-to-securely-manage-ethereum-accounts/ - // "After we extract r and s successfully, we have to test if the value of s is greater than secp256k1n/2 as - // specified in EIP-2 and flip it if required." - sBigInt := new(big.Int).SetBytes(sBytes) - if sBigInt.Cmp(secp256k1HalfN) > 0 { - sBytes = new(big.Int).Sub(secp256k1N, sBigInt).Bytes() - } - - return recoverEthSignature(ecdsaPubKeyBytes, hash, rBytes, sBytes) -} - -// See: https://aws.amazon.com/blogs/database/part2-use-aws-kms-to-securely-manage-ethereum-accounts/ -func recoverEthSignature(expectedPublicKeyBytes, txHash, r, s []byte) ([]byte, error) { - rsSig := append(padTo32Bytes(r), padTo32Bytes(s)...) - ethSig := append(rsSig, []byte{0}...) - - recoveredPublicKeyBytes, err := crypto.Ecrecover(txHash, ethSig) - if err != nil { - return nil, fmt.Errorf("failing to call Ecrecover: %w", err) - } - - if hex.EncodeToString(recoveredPublicKeyBytes) != hex.EncodeToString(expectedPublicKeyBytes) { - ethSig = append(rsSig, []byte{1}...) - recoveredPublicKeyBytes, err = crypto.Ecrecover(txHash, ethSig) - if err != nil { - return nil, fmt.Errorf("failing to call Ecrecover: %w", err) - } - - if hex.EncodeToString(recoveredPublicKeyBytes) != hex.EncodeToString(expectedPublicKeyBytes) { - return nil, fmt.Errorf("can not reconstruct public key from sig") - } - } - - return ethSig, nil -} - -func padTo32Bytes(buffer []byte) []byte { - buffer = bytes.TrimLeft(buffer, "\x00") - for len(buffer) < 32 { - zeroBuf := []byte{0} - buffer = append(zeroBuf, buffer...) - } - return buffer -} - -type AwsSessionFn func(config KMS) *session.Session - -var awsSessionFromEnvVarsFn = func(config KMS) *session.Session { - return session.Must( - session.NewSession(&aws.Config{ - Region: aws.String(config.KmsDeployerKeyRegion), - CredentialsChainVerboseErrors: aws.Bool(true), - })) -} - -var awsSessionFromProfileFn = func(config KMS) *session.Session { - return session.Must( - session.NewSessionWithOptions(session.Options{ - SharedConfigState: session.SharedConfigEnable, - Profile: config.AwsProfileName, - Config: aws.Config{ - Region: aws.String(config.KmsDeployerKeyRegion), - CredentialsChainVerboseErrors: aws.Bool(true), - }, - })) -} diff --git a/integration-tests/deployment/evm_kmsclient_test.go b/integration-tests/deployment/evm_kmsclient_test.go deleted file mode 100644 index 8a889a5606..0000000000 --- a/integration-tests/deployment/evm_kmsclient_test.go +++ /dev/null @@ -1,27 +0,0 @@ -package deployment - -import ( - "encoding/hex" - "testing" - - "github.com/test-go/testify/require" -) - -func TestKMSToEthSigConversion(t *testing.T) { - kmsSigBytes, err := hex.DecodeString("304402206168865941bafcae3a8cf8b26edbb5693d62222b2e54d962c1aabbeaddf33b6802205edc7f597d2bf2d1eaa14fc514a6202bafcffe52b13ae3fec00674d92a874b73") - require.NoError(t, err) - ecdsaPublicKeyBytes, err := hex.DecodeString("04a735e9e3cb526f83be23b03f1f5ae7788a8654e3f0fcfb4f978290de07ebd47da30eeb72e904fdd4a81b46e320908ff4345e119148f89c1f04674c14a506e24b") - require.NoError(t, err) - txHashBytes, err := hex.DecodeString("a2f037301e90f58c084fe4bec2eef14b26e620d6b6cb46051037d03b29ab7d9a") - require.NoError(t, err) - expectedEthSignBytes, err := hex.DecodeString("6168865941bafcae3a8cf8b26edbb5693d62222b2e54d962c1aabbeaddf33b685edc7f597d2bf2d1eaa14fc514a6202bafcffe52b13ae3fec00674d92a874b7300") - require.NoError(t, err) - - actualEthSig, err := kmsToEthSig( - kmsSigBytes, - ecdsaPublicKeyBytes, - txHashBytes, - ) - require.NoError(t, err) - require.Equal(t, expectedEthSignBytes, actualEthSig) -} diff --git a/integration-tests/deployment/helpers.go b/integration-tests/deployment/helpers.go deleted file mode 100644 index 5e81eadd39..0000000000 --- a/integration-tests/deployment/helpers.go +++ /dev/null @@ -1,82 +0,0 @@ -package deployment - -import ( - "bytes" - "context" - "encoding/hex" - "encoding/json" - "fmt" - "strings" - - "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/pkg/errors" -) - -func GetErrorReasonFromTx(client bind.ContractBackend, from common.Address, tx types.Transaction, receipt *types.Receipt) (string, error) { - call := ethereum.CallMsg{ - From: from, - To: tx.To(), - Data: tx.Data(), - Value: tx.Value(), - Gas: tx.Gas(), - GasPrice: tx.GasPrice(), - } - _, err := client.CallContract(context.Background(), call, receipt.BlockNumber) - if err != nil { - errorReason, err := parseError(err) - if err == nil { - return errorReason, nil - } - } - return "", fmt.Errorf("tx %s reverted with no reason", tx.Hash().Hex()) -} - -func parseError(txError error) (string, error) { - b, err := json.Marshal(txError) - if err != nil { - return "", err - } - var callErr struct { - Code int - Data string `json:"data"` - Message string `json:"message"` - } - if json.Unmarshal(b, &callErr) != nil { - return "", err - } - - if callErr.Data == "" && strings.Contains(callErr.Message, "missing trie node") { - return "", errors.Errorf("please use an archive node") - } - - return callErr.Data, nil -} - -func ParseErrorFromABI(errorString string, contractABI string) (string, error) { - parsedAbi, err := abi.JSON(strings.NewReader(contractABI)) - if err != nil { - return "", errors.Wrap(err, "error loading ABI") - } - errorString = strings.TrimPrefix(errorString, "Reverted ") - errorString = strings.TrimPrefix(errorString, "0x") - - data, err := hex.DecodeString(errorString) - if err != nil { - return "", errors.Wrap(err, "error decoding error string") - } - for errorName, abiError := range parsedAbi.Errors { - if bytes.Equal(data[:4], abiError.ID.Bytes()[:4]) { - // Found a matching error - v, err3 := abiError.Unpack(data) - if err3 != nil { - return "", errors.Wrap(err3, "error unpacking data") - } - return fmt.Sprintf("error is \"%v\" args %v\n", errorName, v), nil - } - } - return "", errors.New("error not found in ABI") -} diff --git a/integration-tests/deployment/jd/csa/v1/csa.pb.go b/integration-tests/deployment/jd/csa/v1/csa.pb.go deleted file mode 100644 index 77ad4be4c0..0000000000 --- a/integration-tests/deployment/jd/csa/v1/csa.pb.go +++ /dev/null @@ -1,418 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.29.0 -// protoc v4.25.3 -// source: csa/v1/csa.proto - -package v1 - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Keypair struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - PublicKey string `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` -} - -func (x *Keypair) Reset() { - *x = Keypair{} - if protoimpl.UnsafeEnabled { - mi := &file_csa_v1_csa_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Keypair) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Keypair) ProtoMessage() {} - -func (x *Keypair) ProtoReflect() protoreflect.Message { - mi := &file_csa_v1_csa_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Keypair.ProtoReflect.Descriptor instead. -func (*Keypair) Descriptor() ([]byte, []int) { - return file_csa_v1_csa_proto_rawDescGZIP(), []int{0} -} - -func (x *Keypair) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *Keypair) GetPublicKey() string { - if x != nil { - return x.PublicKey - } - return "" -} - -func (x *Keypair) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -type GetKeypairRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetKeypairRequest) Reset() { - *x = GetKeypairRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_csa_v1_csa_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetKeypairRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetKeypairRequest) ProtoMessage() {} - -func (x *GetKeypairRequest) ProtoReflect() protoreflect.Message { - mi := &file_csa_v1_csa_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetKeypairRequest.ProtoReflect.Descriptor instead. -func (*GetKeypairRequest) Descriptor() ([]byte, []int) { - return file_csa_v1_csa_proto_rawDescGZIP(), []int{1} -} - -type GetKeypairResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Keypair *Keypair `protobuf:"bytes,1,opt,name=keypair,proto3" json:"keypair,omitempty"` -} - -func (x *GetKeypairResponse) Reset() { - *x = GetKeypairResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_csa_v1_csa_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetKeypairResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetKeypairResponse) ProtoMessage() {} - -func (x *GetKeypairResponse) ProtoReflect() protoreflect.Message { - mi := &file_csa_v1_csa_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetKeypairResponse.ProtoReflect.Descriptor instead. -func (*GetKeypairResponse) Descriptor() ([]byte, []int) { - return file_csa_v1_csa_proto_rawDescGZIP(), []int{2} -} - -func (x *GetKeypairResponse) GetKeypair() *Keypair { - if x != nil { - return x.Keypair - } - return nil -} - -type ListKeypairsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ListKeypairsRequest) Reset() { - *x = ListKeypairsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_csa_v1_csa_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListKeypairsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListKeypairsRequest) ProtoMessage() {} - -func (x *ListKeypairsRequest) ProtoReflect() protoreflect.Message { - mi := &file_csa_v1_csa_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListKeypairsRequest.ProtoReflect.Descriptor instead. -func (*ListKeypairsRequest) Descriptor() ([]byte, []int) { - return file_csa_v1_csa_proto_rawDescGZIP(), []int{3} -} - -type ListKeypairsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Keypairs []*Keypair `protobuf:"bytes,1,rep,name=keypairs,proto3" json:"keypairs,omitempty"` -} - -func (x *ListKeypairsResponse) Reset() { - *x = ListKeypairsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_csa_v1_csa_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListKeypairsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListKeypairsResponse) ProtoMessage() {} - -func (x *ListKeypairsResponse) ProtoReflect() protoreflect.Message { - mi := &file_csa_v1_csa_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListKeypairsResponse.ProtoReflect.Descriptor instead. -func (*ListKeypairsResponse) Descriptor() ([]byte, []int) { - return file_csa_v1_csa_proto_rawDescGZIP(), []int{4} -} - -func (x *ListKeypairsResponse) GetKeypairs() []*Keypair { - if x != nil { - return x.Keypairs - } - return nil -} - -var File_csa_v1_csa_proto protoreflect.FileDescriptor - -var file_csa_v1_csa_proto_rawDesc = []byte{ - 0x0a, 0x10, 0x63, 0x73, 0x61, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x73, 0x61, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x0a, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x73, 0x61, 0x2e, 0x76, 0x31, 0x1a, 0x1f, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x73, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x70, 0x61, 0x69, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x22, 0x13, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x70, 0x61, - 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x43, 0x0a, 0x12, 0x47, 0x65, 0x74, - 0x4b, 0x65, 0x79, 0x70, 0x61, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x2d, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x70, 0x61, 0x69, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x73, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, - 0x79, 0x70, 0x61, 0x69, 0x72, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x70, 0x61, 0x69, 0x72, 0x22, 0x15, - 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x70, 0x61, 0x69, 0x72, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x47, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, - 0x70, 0x61, 0x69, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, - 0x08, 0x6b, 0x65, 0x79, 0x70, 0x61, 0x69, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x73, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, - 0x70, 0x61, 0x69, 0x72, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x70, 0x61, 0x69, 0x72, 0x73, 0x32, 0xac, - 0x01, 0x0a, 0x0a, 0x43, 0x53, 0x41, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4b, 0x0a, - 0x0a, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x70, 0x61, 0x69, 0x72, 0x12, 0x1d, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x63, 0x73, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x70, - 0x61, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x63, 0x73, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x70, 0x61, - 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0c, 0x4c, 0x69, - 0x73, 0x74, 0x4b, 0x65, 0x79, 0x70, 0x61, 0x69, 0x72, 0x73, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x63, 0x73, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x70, - 0x61, 0x69, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x63, 0x73, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, - 0x70, 0x61, 0x69, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x08, 0x5a, - 0x06, 0x63, 0x73, 0x61, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_csa_v1_csa_proto_rawDescOnce sync.Once - file_csa_v1_csa_proto_rawDescData = file_csa_v1_csa_proto_rawDesc -) - -func file_csa_v1_csa_proto_rawDescGZIP() []byte { - file_csa_v1_csa_proto_rawDescOnce.Do(func() { - file_csa_v1_csa_proto_rawDescData = protoimpl.X.CompressGZIP(file_csa_v1_csa_proto_rawDescData) - }) - return file_csa_v1_csa_proto_rawDescData -} - -var file_csa_v1_csa_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_csa_v1_csa_proto_goTypes = []interface{}{ - (*Keypair)(nil), // 0: api.csa.v1.Keypair - (*GetKeypairRequest)(nil), // 1: api.csa.v1.GetKeypairRequest - (*GetKeypairResponse)(nil), // 2: api.csa.v1.GetKeypairResponse - (*ListKeypairsRequest)(nil), // 3: api.csa.v1.ListKeypairsRequest - (*ListKeypairsResponse)(nil), // 4: api.csa.v1.ListKeypairsResponse - (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp -} -var file_csa_v1_csa_proto_depIdxs = []int32{ - 5, // 0: api.csa.v1.Keypair.created_at:type_name -> google.protobuf.Timestamp - 0, // 1: api.csa.v1.GetKeypairResponse.keypair:type_name -> api.csa.v1.Keypair - 0, // 2: api.csa.v1.ListKeypairsResponse.keypairs:type_name -> api.csa.v1.Keypair - 1, // 3: api.csa.v1.CSAService.GetKeypair:input_type -> api.csa.v1.GetKeypairRequest - 3, // 4: api.csa.v1.CSAService.ListKeypairs:input_type -> api.csa.v1.ListKeypairsRequest - 2, // 5: api.csa.v1.CSAService.GetKeypair:output_type -> api.csa.v1.GetKeypairResponse - 4, // 6: api.csa.v1.CSAService.ListKeypairs:output_type -> api.csa.v1.ListKeypairsResponse - 5, // [5:7] is the sub-list for method output_type - 3, // [3:5] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_csa_v1_csa_proto_init() } -func file_csa_v1_csa_proto_init() { - if File_csa_v1_csa_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_csa_v1_csa_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Keypair); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_csa_v1_csa_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetKeypairRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_csa_v1_csa_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetKeypairResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_csa_v1_csa_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListKeypairsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_csa_v1_csa_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListKeypairsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_csa_v1_csa_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_csa_v1_csa_proto_goTypes, - DependencyIndexes: file_csa_v1_csa_proto_depIdxs, - MessageInfos: file_csa_v1_csa_proto_msgTypes, - }.Build() - File_csa_v1_csa_proto = out.File - file_csa_v1_csa_proto_rawDesc = nil - file_csa_v1_csa_proto_goTypes = nil - file_csa_v1_csa_proto_depIdxs = nil -} diff --git a/integration-tests/deployment/jd/csa/v1/csa_grpc.pb.go b/integration-tests/deployment/jd/csa/v1/csa_grpc.pb.go deleted file mode 100644 index 7e058bd9fd..0000000000 --- a/integration-tests/deployment/jd/csa/v1/csa_grpc.pb.go +++ /dev/null @@ -1,146 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v4.25.3 -// source: csa/v1/csa.proto - -package v1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - CSAService_GetKeypair_FullMethodName = "/api.csa.v1.CSAService/GetKeypair" - CSAService_ListKeypairs_FullMethodName = "/api.csa.v1.CSAService/ListKeypairs" -) - -// CSAServiceClient is the client API for CSAService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type CSAServiceClient interface { - GetKeypair(ctx context.Context, in *GetKeypairRequest, opts ...grpc.CallOption) (*GetKeypairResponse, error) - ListKeypairs(ctx context.Context, in *ListKeypairsRequest, opts ...grpc.CallOption) (*ListKeypairsResponse, error) -} - -type cSAServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewCSAServiceClient(cc grpc.ClientConnInterface) CSAServiceClient { - return &cSAServiceClient{cc} -} - -func (c *cSAServiceClient) GetKeypair(ctx context.Context, in *GetKeypairRequest, opts ...grpc.CallOption) (*GetKeypairResponse, error) { - out := new(GetKeypairResponse) - err := c.cc.Invoke(ctx, CSAService_GetKeypair_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *cSAServiceClient) ListKeypairs(ctx context.Context, in *ListKeypairsRequest, opts ...grpc.CallOption) (*ListKeypairsResponse, error) { - out := new(ListKeypairsResponse) - err := c.cc.Invoke(ctx, CSAService_ListKeypairs_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// CSAServiceServer is the server API for CSAService service. -// All implementations must embed UnimplementedCSAServiceServer -// for forward compatibility -type CSAServiceServer interface { - GetKeypair(context.Context, *GetKeypairRequest) (*GetKeypairResponse, error) - ListKeypairs(context.Context, *ListKeypairsRequest) (*ListKeypairsResponse, error) - mustEmbedUnimplementedCSAServiceServer() -} - -// UnimplementedCSAServiceServer must be embedded to have forward compatible implementations. -type UnimplementedCSAServiceServer struct { -} - -func (UnimplementedCSAServiceServer) GetKeypair(context.Context, *GetKeypairRequest) (*GetKeypairResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetKeypair not implemented") -} -func (UnimplementedCSAServiceServer) ListKeypairs(context.Context, *ListKeypairsRequest) (*ListKeypairsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListKeypairs not implemented") -} -func (UnimplementedCSAServiceServer) mustEmbedUnimplementedCSAServiceServer() {} - -// UnsafeCSAServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to CSAServiceServer will -// result in compilation errors. -type UnsafeCSAServiceServer interface { - mustEmbedUnimplementedCSAServiceServer() -} - -func RegisterCSAServiceServer(s grpc.ServiceRegistrar, srv CSAServiceServer) { - s.RegisterService(&CSAService_ServiceDesc, srv) -} - -func _CSAService_GetKeypair_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetKeypairRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CSAServiceServer).GetKeypair(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CSAService_GetKeypair_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CSAServiceServer).GetKeypair(ctx, req.(*GetKeypairRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CSAService_ListKeypairs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListKeypairsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CSAServiceServer).ListKeypairs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CSAService_ListKeypairs_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CSAServiceServer).ListKeypairs(ctx, req.(*ListKeypairsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// CSAService_ServiceDesc is the grpc.ServiceDesc for CSAService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var CSAService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "api.csa.v1.CSAService", - HandlerType: (*CSAServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetKeypair", - Handler: _CSAService_GetKeypair_Handler, - }, - { - MethodName: "ListKeypairs", - Handler: _CSAService_ListKeypairs_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "csa/v1/csa.proto", -} \ No newline at end of file diff --git a/integration-tests/deployment/jd/job/v1/job.pb.go b/integration-tests/deployment/jd/job/v1/job.pb.go deleted file mode 100644 index 5544a12bdd..0000000000 --- a/integration-tests/deployment/jd/job/v1/job.pb.go +++ /dev/null @@ -1,1994 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.29.0 -// protoc v4.25.3 -// source: job/v1/job.proto - -package v1 - -import ( - ptypes "github.com/smartcontractkit/chainlink/integration-tests/deployment/jd/shared/ptypes" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// ProposalStatus defines the possible states of a job proposal. -type ProposalStatus int32 - -const ( - ProposalStatus_PROPOSAL_STATUS_UNSPECIFIED ProposalStatus = 0 - ProposalStatus_PROPOSAL_STATUS_PROPOSED ProposalStatus = 1 // Proposal has been made but not yet decided upon. - ProposalStatus_PROPOSAL_STATUS_APPROVED ProposalStatus = 2 // Proposal has been accepted. - ProposalStatus_PROPOSAL_STATUS_REJECTED ProposalStatus = 3 // Proposal has been rejected. - ProposalStatus_PROPOSAL_STATUS_CANCELLED ProposalStatus = 4 // Proposal has been cancelled. - ProposalStatus_PROPOSAL_STATUS_PENDING ProposalStatus = 5 // Proposal is pending review. - ProposalStatus_PROPOSAL_STATUS_REVOKED ProposalStatus = 6 // Proposal has been revoked after being proposed. -) - -// Enum value maps for ProposalStatus. -var ( - ProposalStatus_name = map[int32]string{ - 0: "PROPOSAL_STATUS_UNSPECIFIED", - 1: "PROPOSAL_STATUS_PROPOSED", - 2: "PROPOSAL_STATUS_APPROVED", - 3: "PROPOSAL_STATUS_REJECTED", - 4: "PROPOSAL_STATUS_CANCELLED", - 5: "PROPOSAL_STATUS_PENDING", - 6: "PROPOSAL_STATUS_REVOKED", - } - ProposalStatus_value = map[string]int32{ - "PROPOSAL_STATUS_UNSPECIFIED": 0, - "PROPOSAL_STATUS_PROPOSED": 1, - "PROPOSAL_STATUS_APPROVED": 2, - "PROPOSAL_STATUS_REJECTED": 3, - "PROPOSAL_STATUS_CANCELLED": 4, - "PROPOSAL_STATUS_PENDING": 5, - "PROPOSAL_STATUS_REVOKED": 6, - } -) - -func (x ProposalStatus) Enum() *ProposalStatus { - p := new(ProposalStatus) - *p = x - return p -} - -func (x ProposalStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ProposalStatus) Descriptor() protoreflect.EnumDescriptor { - return file_job_v1_job_proto_enumTypes[0].Descriptor() -} - -func (ProposalStatus) Type() protoreflect.EnumType { - return &file_job_v1_job_proto_enumTypes[0] -} - -func (x ProposalStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ProposalStatus.Descriptor instead. -func (ProposalStatus) EnumDescriptor() ([]byte, []int) { - return file_job_v1_job_proto_rawDescGZIP(), []int{0} -} - -// ProposalDeliveryStatus defines the delivery status of the proposal to the node. -type ProposalDeliveryStatus int32 - -const ( - ProposalDeliveryStatus_PROPOSAL_DELIVERY_STATUS_UNSPECIFIED ProposalDeliveryStatus = 0 - ProposalDeliveryStatus_PROPOSAL_DELIVERY_STATUS_DELIVERED ProposalDeliveryStatus = 1 // Delivered to the node. - ProposalDeliveryStatus_PROPOSAL_DELIVERY_STATUS_ACKNOWLEDGED ProposalDeliveryStatus = 2 // Acknowledged by the node. - ProposalDeliveryStatus_PROPOSAL_DELIVERY_STATUS_FAILED ProposalDeliveryStatus = 3 // Delivery failed. -) - -// Enum value maps for ProposalDeliveryStatus. -var ( - ProposalDeliveryStatus_name = map[int32]string{ - 0: "PROPOSAL_DELIVERY_STATUS_UNSPECIFIED", - 1: "PROPOSAL_DELIVERY_STATUS_DELIVERED", - 2: "PROPOSAL_DELIVERY_STATUS_ACKNOWLEDGED", - 3: "PROPOSAL_DELIVERY_STATUS_FAILED", - } - ProposalDeliveryStatus_value = map[string]int32{ - "PROPOSAL_DELIVERY_STATUS_UNSPECIFIED": 0, - "PROPOSAL_DELIVERY_STATUS_DELIVERED": 1, - "PROPOSAL_DELIVERY_STATUS_ACKNOWLEDGED": 2, - "PROPOSAL_DELIVERY_STATUS_FAILED": 3, - } -) - -func (x ProposalDeliveryStatus) Enum() *ProposalDeliveryStatus { - p := new(ProposalDeliveryStatus) - *p = x - return p -} - -func (x ProposalDeliveryStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ProposalDeliveryStatus) Descriptor() protoreflect.EnumDescriptor { - return file_job_v1_job_proto_enumTypes[1].Descriptor() -} - -func (ProposalDeliveryStatus) Type() protoreflect.EnumType { - return &file_job_v1_job_proto_enumTypes[1] -} - -func (x ProposalDeliveryStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ProposalDeliveryStatus.Descriptor instead. -func (ProposalDeliveryStatus) EnumDescriptor() ([]byte, []int) { - return file_job_v1_job_proto_rawDescGZIP(), []int{1} -} - -// Job represents the structured data of a job within the system. -type Job struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Unique identifier for the job. - Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"` // Universally unique identifier for the job. - NodeId string `protobuf:"bytes,3,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` // ID of the node associated with this job. - ProposalIds []string `protobuf:"bytes,4,rep,name=proposal_ids,json=proposalIds,proto3" json:"proposal_ids,omitempty"` // List of proposal IDs associated with this job. - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // Timestamp when the job was created. - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // Timestamp when the job was last updated. - DeletedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"` // Timestamp when the job was deleted, if applicable. - Labels []*ptypes.Label `protobuf:"bytes,8,rep,name=labels,proto3" json:"labels,omitempty"` // Set of labels associated with the job. -} - -func (x *Job) Reset() { - *x = Job{} - if protoimpl.UnsafeEnabled { - mi := &file_job_v1_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Job) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Job) ProtoMessage() {} - -func (x *Job) ProtoReflect() protoreflect.Message { - mi := &file_job_v1_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Job.ProtoReflect.Descriptor instead. -func (*Job) Descriptor() ([]byte, []int) { - return file_job_v1_job_proto_rawDescGZIP(), []int{0} -} - -func (x *Job) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Job) GetUuid() string { - if x != nil { - return x.Uuid - } - return "" -} - -func (x *Job) GetNodeId() string { - if x != nil { - return x.NodeId - } - return "" -} - -func (x *Job) GetProposalIds() []string { - if x != nil { - return x.ProposalIds - } - return nil -} - -func (x *Job) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *Job) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -func (x *Job) GetDeletedAt() *timestamppb.Timestamp { - if x != nil { - return x.DeletedAt - } - return nil -} - -func (x *Job) GetLabels() []*ptypes.Label { - if x != nil { - return x.Labels - } - return nil -} - -// Proposal represents a job proposal. -type Proposal struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Unique identifier for the proposal. - Revision int64 `protobuf:"varint,2,opt,name=revision,proto3" json:"revision,omitempty"` // Revision number of the proposal. Montonically increasing. - Status ProposalStatus `protobuf:"varint,3,opt,name=status,proto3,enum=api.job.v1.ProposalStatus" json:"status,omitempty"` // Current status of the proposal. - DeliveryStatus ProposalDeliveryStatus `protobuf:"varint,4,opt,name=delivery_status,json=deliveryStatus,proto3,enum=api.job.v1.ProposalDeliveryStatus" json:"delivery_status,omitempty"` // Delivery status of the proposal. - Spec string `protobuf:"bytes,5,opt,name=spec,proto3" json:"spec,omitempty"` // Specification of the job proposed. - JobId string `protobuf:"bytes,6,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` // ID of the job associated with this proposal. - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // Timestamp when the proposal was created. - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // Timestamp when the proposal was last updated. - AckedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=acked_at,json=ackedAt,proto3,oneof" json:"acked_at,omitempty"` // Timestamp when the proposal was acknowledged. - ResponseReceivedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=response_received_at,json=responseReceivedAt,proto3,oneof" json:"response_received_at,omitempty"` // Timestamp when a response was received. -} - -func (x *Proposal) Reset() { - *x = Proposal{} - if protoimpl.UnsafeEnabled { - mi := &file_job_v1_job_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Proposal) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Proposal) ProtoMessage() {} - -func (x *Proposal) ProtoReflect() protoreflect.Message { - mi := &file_job_v1_job_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Proposal.ProtoReflect.Descriptor instead. -func (*Proposal) Descriptor() ([]byte, []int) { - return file_job_v1_job_proto_rawDescGZIP(), []int{1} -} - -func (x *Proposal) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Proposal) GetRevision() int64 { - if x != nil { - return x.Revision - } - return 0 -} - -func (x *Proposal) GetStatus() ProposalStatus { - if x != nil { - return x.Status - } - return ProposalStatus_PROPOSAL_STATUS_UNSPECIFIED -} - -func (x *Proposal) GetDeliveryStatus() ProposalDeliveryStatus { - if x != nil { - return x.DeliveryStatus - } - return ProposalDeliveryStatus_PROPOSAL_DELIVERY_STATUS_UNSPECIFIED -} - -func (x *Proposal) GetSpec() string { - if x != nil { - return x.Spec - } - return "" -} - -func (x *Proposal) GetJobId() string { - if x != nil { - return x.JobId - } - return "" -} - -func (x *Proposal) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *Proposal) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -func (x *Proposal) GetAckedAt() *timestamppb.Timestamp { - if x != nil { - return x.AckedAt - } - return nil -} - -func (x *Proposal) GetResponseReceivedAt() *timestamppb.Timestamp { - if x != nil { - return x.ResponseReceivedAt - } - return nil -} - -// GetJobRequest specifies the criteria for retrieving a job. -type GetJobRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to IdOneof: - // - // *GetJobRequest_Id - // *GetJobRequest_Uuid - IdOneof isGetJobRequest_IdOneof `protobuf_oneof:"id_oneof"` -} - -func (x *GetJobRequest) Reset() { - *x = GetJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_job_v1_job_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetJobRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetJobRequest) ProtoMessage() {} - -func (x *GetJobRequest) ProtoReflect() protoreflect.Message { - mi := &file_job_v1_job_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetJobRequest.ProtoReflect.Descriptor instead. -func (*GetJobRequest) Descriptor() ([]byte, []int) { - return file_job_v1_job_proto_rawDescGZIP(), []int{2} -} - -func (m *GetJobRequest) GetIdOneof() isGetJobRequest_IdOneof { - if m != nil { - return m.IdOneof - } - return nil -} - -func (x *GetJobRequest) GetId() string { - if x, ok := x.GetIdOneof().(*GetJobRequest_Id); ok { - return x.Id - } - return "" -} - -func (x *GetJobRequest) GetUuid() string { - if x, ok := x.GetIdOneof().(*GetJobRequest_Uuid); ok { - return x.Uuid - } - return "" -} - -type isGetJobRequest_IdOneof interface { - isGetJobRequest_IdOneof() -} - -type GetJobRequest_Id struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof"` // Unique identifier of the job. -} - -type GetJobRequest_Uuid struct { - Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3,oneof"` // Universally unique identifier of the job. -} - -func (*GetJobRequest_Id) isGetJobRequest_IdOneof() {} - -func (*GetJobRequest_Uuid) isGetJobRequest_IdOneof() {} - -// GetJobResponse contains the job details. -type GetJobResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Job *Job `protobuf:"bytes,1,opt,name=job,proto3" json:"job,omitempty"` // Details of the retrieved job. -} - -func (x *GetJobResponse) Reset() { - *x = GetJobResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_job_v1_job_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetJobResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetJobResponse) ProtoMessage() {} - -func (x *GetJobResponse) ProtoReflect() protoreflect.Message { - mi := &file_job_v1_job_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetJobResponse.ProtoReflect.Descriptor instead. -func (*GetJobResponse) Descriptor() ([]byte, []int) { - return file_job_v1_job_proto_rawDescGZIP(), []int{3} -} - -func (x *GetJobResponse) GetJob() *Job { - if x != nil { - return x.Job - } - return nil -} - -// GetProposalRequest specifies the criteria for retrieving a proposal. -type GetProposalRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Unique identifier of the proposal to retrieve. -} - -func (x *GetProposalRequest) Reset() { - *x = GetProposalRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_job_v1_job_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetProposalRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetProposalRequest) ProtoMessage() {} - -func (x *GetProposalRequest) ProtoReflect() protoreflect.Message { - mi := &file_job_v1_job_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetProposalRequest.ProtoReflect.Descriptor instead. -func (*GetProposalRequest) Descriptor() ([]byte, []int) { - return file_job_v1_job_proto_rawDescGZIP(), []int{4} -} - -func (x *GetProposalRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -// GetProposalResponse contains the proposal details. -type GetProposalResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Proposal *Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` // Details of the retrieved proposal. -} - -func (x *GetProposalResponse) Reset() { - *x = GetProposalResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_job_v1_job_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetProposalResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetProposalResponse) ProtoMessage() {} - -func (x *GetProposalResponse) ProtoReflect() protoreflect.Message { - mi := &file_job_v1_job_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetProposalResponse.ProtoReflect.Descriptor instead. -func (*GetProposalResponse) Descriptor() ([]byte, []int) { - return file_job_v1_job_proto_rawDescGZIP(), []int{5} -} - -func (x *GetProposalResponse) GetProposal() *Proposal { - if x != nil { - return x.Proposal - } - return nil -} - -// ListJobsRequest specifies filters for listing jobs. -type ListJobsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Filter *ListJobsRequest_Filter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` // Filters applied to the job listing. -} - -func (x *ListJobsRequest) Reset() { - *x = ListJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_job_v1_job_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListJobsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListJobsRequest) ProtoMessage() {} - -func (x *ListJobsRequest) ProtoReflect() protoreflect.Message { - mi := &file_job_v1_job_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListJobsRequest.ProtoReflect.Descriptor instead. -func (*ListJobsRequest) Descriptor() ([]byte, []int) { - return file_job_v1_job_proto_rawDescGZIP(), []int{6} -} - -func (x *ListJobsRequest) GetFilter() *ListJobsRequest_Filter { - if x != nil { - return x.Filter - } - return nil -} - -// ListJobsResponse contains a list of jobs that match the filters. -type ListJobsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Jobs []*Job `protobuf:"bytes,1,rep,name=jobs,proto3" json:"jobs,omitempty"` // List of jobs. -} - -func (x *ListJobsResponse) Reset() { - *x = ListJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_job_v1_job_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListJobsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListJobsResponse) ProtoMessage() {} - -func (x *ListJobsResponse) ProtoReflect() protoreflect.Message { - mi := &file_job_v1_job_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListJobsResponse.ProtoReflect.Descriptor instead. -func (*ListJobsResponse) Descriptor() ([]byte, []int) { - return file_job_v1_job_proto_rawDescGZIP(), []int{7} -} - -func (x *ListJobsResponse) GetJobs() []*Job { - if x != nil { - return x.Jobs - } - return nil -} - -// ListProposalsRequest specifies filters for listing proposals. -type ListProposalsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Filter *ListProposalsRequest_Filter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` // Filters applied to the proposal listing. -} - -func (x *ListProposalsRequest) Reset() { - *x = ListProposalsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_job_v1_job_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListProposalsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListProposalsRequest) ProtoMessage() {} - -func (x *ListProposalsRequest) ProtoReflect() protoreflect.Message { - mi := &file_job_v1_job_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListProposalsRequest.ProtoReflect.Descriptor instead. -func (*ListProposalsRequest) Descriptor() ([]byte, []int) { - return file_job_v1_job_proto_rawDescGZIP(), []int{8} -} - -func (x *ListProposalsRequest) GetFilter() *ListProposalsRequest_Filter { - if x != nil { - return x.Filter - } - return nil -} - -// ListProposalsResponse contains a list of proposals that match the filters. -type ListProposalsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Proposals []*Proposal `protobuf:"bytes,1,rep,name=proposals,proto3" json:"proposals,omitempty"` // List of proposals. -} - -func (x *ListProposalsResponse) Reset() { - *x = ListProposalsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_job_v1_job_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListProposalsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListProposalsResponse) ProtoMessage() {} - -func (x *ListProposalsResponse) ProtoReflect() protoreflect.Message { - mi := &file_job_v1_job_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListProposalsResponse.ProtoReflect.Descriptor instead. -func (*ListProposalsResponse) Descriptor() ([]byte, []int) { - return file_job_v1_job_proto_rawDescGZIP(), []int{9} -} - -func (x *ListProposalsResponse) GetProposals() []*Proposal { - if x != nil { - return x.Proposals - } - return nil -} - -// ProposeJobRequest contains the information needed to submit a new job proposal. -type ProposeJobRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` // ID of the node to which the job is proposed. - Spec string `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` // Specification of the job being proposed. - Labels []*ptypes.Label `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty"` // Labels to associate with the job. -} - -func (x *ProposeJobRequest) Reset() { - *x = ProposeJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_job_v1_job_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProposeJobRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProposeJobRequest) ProtoMessage() {} - -func (x *ProposeJobRequest) ProtoReflect() protoreflect.Message { - mi := &file_job_v1_job_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ProposeJobRequest.ProtoReflect.Descriptor instead. -func (*ProposeJobRequest) Descriptor() ([]byte, []int) { - return file_job_v1_job_proto_rawDescGZIP(), []int{10} -} - -func (x *ProposeJobRequest) GetNodeId() string { - if x != nil { - return x.NodeId - } - return "" -} - -func (x *ProposeJobRequest) GetSpec() string { - if x != nil { - return x.Spec - } - return "" -} - -func (x *ProposeJobRequest) GetLabels() []*ptypes.Label { - if x != nil { - return x.Labels - } - return nil -} - -// ProposeJobResponse returns the newly created proposal. -type ProposeJobResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Proposal *Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` // Details of the newly created proposal. -} - -func (x *ProposeJobResponse) Reset() { - *x = ProposeJobResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_job_v1_job_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProposeJobResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProposeJobResponse) ProtoMessage() {} - -func (x *ProposeJobResponse) ProtoReflect() protoreflect.Message { - mi := &file_job_v1_job_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ProposeJobResponse.ProtoReflect.Descriptor instead. -func (*ProposeJobResponse) Descriptor() ([]byte, []int) { - return file_job_v1_job_proto_rawDescGZIP(), []int{11} -} - -func (x *ProposeJobResponse) GetProposal() *Proposal { - if x != nil { - return x.Proposal - } - return nil -} - -// RevokeJobRequest specifies the criteria for revoking a job proposal. -type RevokeJobRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to IdOneof: - // - // *RevokeJobRequest_Id - // *RevokeJobRequest_Uuid - IdOneof isRevokeJobRequest_IdOneof `protobuf_oneof:"id_oneof"` -} - -func (x *RevokeJobRequest) Reset() { - *x = RevokeJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_job_v1_job_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RevokeJobRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RevokeJobRequest) ProtoMessage() {} - -func (x *RevokeJobRequest) ProtoReflect() protoreflect.Message { - mi := &file_job_v1_job_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RevokeJobRequest.ProtoReflect.Descriptor instead. -func (*RevokeJobRequest) Descriptor() ([]byte, []int) { - return file_job_v1_job_proto_rawDescGZIP(), []int{12} -} - -func (m *RevokeJobRequest) GetIdOneof() isRevokeJobRequest_IdOneof { - if m != nil { - return m.IdOneof - } - return nil -} - -func (x *RevokeJobRequest) GetId() string { - if x, ok := x.GetIdOneof().(*RevokeJobRequest_Id); ok { - return x.Id - } - return "" -} - -func (x *RevokeJobRequest) GetUuid() string { - if x, ok := x.GetIdOneof().(*RevokeJobRequest_Uuid); ok { - return x.Uuid - } - return "" -} - -type isRevokeJobRequest_IdOneof interface { - isRevokeJobRequest_IdOneof() -} - -type RevokeJobRequest_Id struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof"` // Unique identifier of the proposal to revoke. -} - -type RevokeJobRequest_Uuid struct { - Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3,oneof"` // Universally unique identifier of the proposal to revoke. -} - -func (*RevokeJobRequest_Id) isRevokeJobRequest_IdOneof() {} - -func (*RevokeJobRequest_Uuid) isRevokeJobRequest_IdOneof() {} - -// RevokeJobResponse returns the revoked proposal. -type RevokeJobResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Proposal *Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` // Details of the revoked proposal. -} - -func (x *RevokeJobResponse) Reset() { - *x = RevokeJobResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_job_v1_job_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RevokeJobResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RevokeJobResponse) ProtoMessage() {} - -func (x *RevokeJobResponse) ProtoReflect() protoreflect.Message { - mi := &file_job_v1_job_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RevokeJobResponse.ProtoReflect.Descriptor instead. -func (*RevokeJobResponse) Descriptor() ([]byte, []int) { - return file_job_v1_job_proto_rawDescGZIP(), []int{13} -} - -func (x *RevokeJobResponse) GetProposal() *Proposal { - if x != nil { - return x.Proposal - } - return nil -} - -// DeleteJobRequest specifies the criteria for deleting a job. -type DeleteJobRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to IdOneof: - // - // *DeleteJobRequest_Id - // *DeleteJobRequest_Uuid - IdOneof isDeleteJobRequest_IdOneof `protobuf_oneof:"id_oneof"` -} - -func (x *DeleteJobRequest) Reset() { - *x = DeleteJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_job_v1_job_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteJobRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteJobRequest) ProtoMessage() {} - -func (x *DeleteJobRequest) ProtoReflect() protoreflect.Message { - mi := &file_job_v1_job_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteJobRequest.ProtoReflect.Descriptor instead. -func (*DeleteJobRequest) Descriptor() ([]byte, []int) { - return file_job_v1_job_proto_rawDescGZIP(), []int{14} -} - -func (m *DeleteJobRequest) GetIdOneof() isDeleteJobRequest_IdOneof { - if m != nil { - return m.IdOneof - } - return nil -} - -func (x *DeleteJobRequest) GetId() string { - if x, ok := x.GetIdOneof().(*DeleteJobRequest_Id); ok { - return x.Id - } - return "" -} - -func (x *DeleteJobRequest) GetUuid() string { - if x, ok := x.GetIdOneof().(*DeleteJobRequest_Uuid); ok { - return x.Uuid - } - return "" -} - -type isDeleteJobRequest_IdOneof interface { - isDeleteJobRequest_IdOneof() -} - -type DeleteJobRequest_Id struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof"` // Unique identifier of the job to delete. -} - -type DeleteJobRequest_Uuid struct { - Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3,oneof"` // Universally unique identifier of the job to delete. -} - -func (*DeleteJobRequest_Id) isDeleteJobRequest_IdOneof() {} - -func (*DeleteJobRequest_Uuid) isDeleteJobRequest_IdOneof() {} - -// DeleteJobResponse returns details of the deleted job. -type DeleteJobResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Job *Job `protobuf:"bytes,1,opt,name=job,proto3" json:"job,omitempty"` // Details of the deleted job. -} - -func (x *DeleteJobResponse) Reset() { - *x = DeleteJobResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_job_v1_job_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteJobResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteJobResponse) ProtoMessage() {} - -func (x *DeleteJobResponse) ProtoReflect() protoreflect.Message { - mi := &file_job_v1_job_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteJobResponse.ProtoReflect.Descriptor instead. -func (*DeleteJobResponse) Descriptor() ([]byte, []int) { - return file_job_v1_job_proto_rawDescGZIP(), []int{15} -} - -func (x *DeleteJobResponse) GetJob() *Job { - if x != nil { - return x.Job - } - return nil -} - -// UpdateJobRequest specifies the criteria for updating a job. -type UpdateJobRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to IdOneof: - // - // *UpdateJobRequest_Id - // *UpdateJobRequest_Uuid - IdOneof isUpdateJobRequest_IdOneof `protobuf_oneof:"id_oneof"` - Labels []*ptypes.Label `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty"` // Set of labels associated with the job. -} - -func (x *UpdateJobRequest) Reset() { - *x = UpdateJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_job_v1_job_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateJobRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateJobRequest) ProtoMessage() {} - -func (x *UpdateJobRequest) ProtoReflect() protoreflect.Message { - mi := &file_job_v1_job_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateJobRequest.ProtoReflect.Descriptor instead. -func (*UpdateJobRequest) Descriptor() ([]byte, []int) { - return file_job_v1_job_proto_rawDescGZIP(), []int{16} -} - -func (m *UpdateJobRequest) GetIdOneof() isUpdateJobRequest_IdOneof { - if m != nil { - return m.IdOneof - } - return nil -} - -func (x *UpdateJobRequest) GetId() string { - if x, ok := x.GetIdOneof().(*UpdateJobRequest_Id); ok { - return x.Id - } - return "" -} - -func (x *UpdateJobRequest) GetUuid() string { - if x, ok := x.GetIdOneof().(*UpdateJobRequest_Uuid); ok { - return x.Uuid - } - return "" -} - -func (x *UpdateJobRequest) GetLabels() []*ptypes.Label { - if x != nil { - return x.Labels - } - return nil -} - -type isUpdateJobRequest_IdOneof interface { - isUpdateJobRequest_IdOneof() -} - -type UpdateJobRequest_Id struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof"` // Unique identifier of the job to update. -} - -type UpdateJobRequest_Uuid struct { - Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3,oneof"` // Universally unique identifier of the job to update. -} - -func (*UpdateJobRequest_Id) isUpdateJobRequest_IdOneof() {} - -func (*UpdateJobRequest_Uuid) isUpdateJobRequest_IdOneof() {} - -// UpdateJobResponse returns details of the updated job. -type UpdateJobResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Job *Job `protobuf:"bytes,1,opt,name=job,proto3" json:"job,omitempty"` // Details of the updated job. -} - -func (x *UpdateJobResponse) Reset() { - *x = UpdateJobResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_job_v1_job_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateJobResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateJobResponse) ProtoMessage() {} - -func (x *UpdateJobResponse) ProtoReflect() protoreflect.Message { - mi := &file_job_v1_job_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateJobResponse.ProtoReflect.Descriptor instead. -func (*UpdateJobResponse) Descriptor() ([]byte, []int) { - return file_job_v1_job_proto_rawDescGZIP(), []int{17} -} - -func (x *UpdateJobResponse) GetJob() *Job { - if x != nil { - return x.Job - } - return nil -} - -type ListJobsRequest_Filter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` // Filter by job IDs. - NodeIds []string `protobuf:"bytes,2,rep,name=node_ids,json=nodeIds,proto3" json:"node_ids,omitempty"` // Filter by node IDs. - Selectors []*ptypes.Selector `protobuf:"bytes,3,rep,name=selectors,proto3" json:"selectors,omitempty"` // Filter by selectors -} - -func (x *ListJobsRequest_Filter) Reset() { - *x = ListJobsRequest_Filter{} - if protoimpl.UnsafeEnabled { - mi := &file_job_v1_job_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListJobsRequest_Filter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListJobsRequest_Filter) ProtoMessage() {} - -func (x *ListJobsRequest_Filter) ProtoReflect() protoreflect.Message { - mi := &file_job_v1_job_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListJobsRequest_Filter.ProtoReflect.Descriptor instead. -func (*ListJobsRequest_Filter) Descriptor() ([]byte, []int) { - return file_job_v1_job_proto_rawDescGZIP(), []int{6, 0} -} - -func (x *ListJobsRequest_Filter) GetIds() []string { - if x != nil { - return x.Ids - } - return nil -} - -func (x *ListJobsRequest_Filter) GetNodeIds() []string { - if x != nil { - return x.NodeIds - } - return nil -} - -func (x *ListJobsRequest_Filter) GetSelectors() []*ptypes.Selector { - if x != nil { - return x.Selectors - } - return nil -} - -type ListProposalsRequest_Filter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` // Filter by proposal IDs. - JobIds []string `protobuf:"bytes,2,rep,name=job_ids,json=jobIds,proto3" json:"job_ids,omitempty"` // Filter by job IDs. -} - -func (x *ListProposalsRequest_Filter) Reset() { - *x = ListProposalsRequest_Filter{} - if protoimpl.UnsafeEnabled { - mi := &file_job_v1_job_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListProposalsRequest_Filter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListProposalsRequest_Filter) ProtoMessage() {} - -func (x *ListProposalsRequest_Filter) ProtoReflect() protoreflect.Message { - mi := &file_job_v1_job_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListProposalsRequest_Filter.ProtoReflect.Descriptor instead. -func (*ListProposalsRequest_Filter) Descriptor() ([]byte, []int) { - return file_job_v1_job_proto_rawDescGZIP(), []int{8, 0} -} - -func (x *ListProposalsRequest_Filter) GetIds() []string { - if x != nil { - return x.Ids - } - return nil -} - -func (x *ListProposalsRequest_Filter) GetJobIds() []string { - if x != nil { - return x.JobIds - } - return nil -} - -var File_job_v1_job_proto protoreflect.FileDescriptor - -var file_job_v1_job_proto_rawDesc = []byte{ - 0x0a, 0x10, 0x6a, 0x6f, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x6a, 0x6f, 0x62, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x0a, 0x61, 0x70, 0x69, 0x2e, 0x6a, 0x6f, 0x62, 0x2e, 0x76, 0x31, 0x1a, 0x1f, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x19, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2f, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc0, 0x02, 0x0a, 0x03, 0x4a, - 0x6f, 0x62, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, - 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, - 0x64, 0x73, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, - 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x12, 0x28, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x08, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x2e, - 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x8d, 0x04, - 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, - 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x72, 0x65, - 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6a, 0x6f, 0x62, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4b, 0x0a, 0x0f, 0x64, 0x65, - 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6a, 0x6f, 0x62, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, - 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, - 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x15, 0x0a, 0x06, 0x6a, - 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, - 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, - 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3a, 0x0a, 0x08, 0x61, 0x63, 0x6b, 0x65, - 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x07, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x41, - 0x74, 0x88, 0x01, 0x01, 0x12, 0x51, 0x0a, 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x01, - 0x52, 0x12, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, - 0x65, 0x64, 0x41, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x63, 0x6b, 0x65, - 0x64, 0x5f, 0x61, 0x74, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, 0x43, 0x0a, - 0x0d, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x14, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x69, 0x64, 0x5f, 0x6f, 0x6e, 0x65, - 0x6f, 0x66, 0x22, 0x33, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6a, 0x6f, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x4a, - 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0x24, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x47, 0x0a, - 0x13, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6a, 0x6f, 0x62, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x08, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x22, 0xb7, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x4a, - 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x06, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x6a, 0x6f, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x06, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x1a, 0x68, 0x0a, 0x06, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, - 0x64, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x73, 0x12, 0x31, 0x0a, - 0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x2e, 0x53, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, - 0x22, 0x37, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6a, 0x6f, 0x62, 0x2e, 0x76, 0x31, 0x2e, - 0x4a, 0x6f, 0x62, 0x52, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x22, 0x8c, 0x01, 0x0a, 0x14, 0x4c, 0x69, - 0x73, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6a, 0x6f, 0x62, 0x2e, 0x76, 0x31, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x06, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x1a, 0x33, 0x0a, 0x06, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x10, 0x0a, - 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x12, - 0x17, 0x0a, 0x07, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x06, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x73, 0x22, 0x4b, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, - 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x32, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6a, 0x6f, 0x62, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x6a, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, - 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, - 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, - 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x28, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x22, 0x46, 0x0a, 0x12, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4a, 0x6f, 0x62, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x6a, 0x6f, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, - 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x22, 0x46, 0x0a, 0x10, 0x52, 0x65, 0x76, - 0x6f, 0x6b, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x14, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x04, 0x75, 0x75, 0x69, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x69, 0x64, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, - 0x66, 0x22, 0x45, 0x0a, 0x11, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6a, - 0x6f, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x08, - 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x22, 0x46, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, - 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, - 0x75, 0x75, 0x69, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x69, 0x64, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, - 0x22, 0x36, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6a, 0x6f, 0x62, 0x2e, 0x76, 0x31, 0x2e, - 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0x70, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, - 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, - 0x75, 0x75, 0x69, 0x64, 0x12, 0x28, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x42, 0x0a, - 0x0a, 0x08, 0x69, 0x64, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x36, 0x0a, 0x11, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x21, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x6a, 0x6f, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, - 0x6f, 0x62, 0x2a, 0xe4, 0x01, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, - 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, - 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, - 0x45, 0x44, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, - 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56, 0x45, 0x44, - 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x03, - 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, - 0x1b, 0x0a, 0x17, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, 0x1b, 0x0a, 0x17, - 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, - 0x52, 0x45, 0x56, 0x4f, 0x4b, 0x45, 0x44, 0x10, 0x06, 0x2a, 0xba, 0x01, 0x0a, 0x16, 0x50, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x28, 0x0a, 0x24, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, - 0x5f, 0x44, 0x45, 0x4c, 0x49, 0x56, 0x45, 0x52, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x26, - 0x0a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x44, 0x45, 0x4c, 0x49, 0x56, - 0x45, 0x52, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x45, 0x4c, 0x49, 0x56, - 0x45, 0x52, 0x45, 0x44, 0x10, 0x01, 0x12, 0x29, 0x0a, 0x25, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, - 0x41, 0x4c, 0x5f, 0x44, 0x45, 0x4c, 0x49, 0x56, 0x45, 0x52, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x41, 0x43, 0x4b, 0x4e, 0x4f, 0x57, 0x4c, 0x45, 0x44, 0x47, 0x45, 0x44, 0x10, - 0x02, 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x44, 0x45, - 0x4c, 0x49, 0x56, 0x45, 0x52, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, - 0x49, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x32, 0xf5, 0x04, 0x0a, 0x0a, 0x4a, 0x6f, 0x62, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x12, - 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6a, 0x6f, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x6a, 0x6f, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x50, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6a, 0x6f, - 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6a, 0x6f, - 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x08, 0x4c, 0x69, - 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6a, 0x6f, 0x62, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6a, 0x6f, 0x62, 0x2e, 0x76, 0x31, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x56, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x73, 0x12, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6a, 0x6f, 0x62, 0x2e, 0x76, - 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6a, 0x6f, 0x62, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0a, 0x50, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x6a, 0x6f, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4a, 0x6f, - 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6a, - 0x6f, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4a, 0x6f, 0x62, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x09, 0x52, 0x65, - 0x76, 0x6f, 0x6b, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6a, 0x6f, - 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6a, 0x6f, 0x62, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x4a, 0x6f, 0x62, 0x12, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6a, 0x6f, 0x62, 0x2e, 0x76, 0x31, - 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6a, 0x6f, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, - 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6a, 0x6f, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x6a, 0x6f, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x08, - 0x5a, 0x06, 0x6a, 0x6f, 0x62, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_job_v1_job_proto_rawDescOnce sync.Once - file_job_v1_job_proto_rawDescData = file_job_v1_job_proto_rawDesc -) - -func file_job_v1_job_proto_rawDescGZIP() []byte { - file_job_v1_job_proto_rawDescOnce.Do(func() { - file_job_v1_job_proto_rawDescData = protoimpl.X.CompressGZIP(file_job_v1_job_proto_rawDescData) - }) - return file_job_v1_job_proto_rawDescData -} - -var file_job_v1_job_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_job_v1_job_proto_msgTypes = make([]protoimpl.MessageInfo, 20) -var file_job_v1_job_proto_goTypes = []interface{}{ - (ProposalStatus)(0), // 0: api.job.v1.ProposalStatus - (ProposalDeliveryStatus)(0), // 1: api.job.v1.ProposalDeliveryStatus - (*Job)(nil), // 2: api.job.v1.Job - (*Proposal)(nil), // 3: api.job.v1.Proposal - (*GetJobRequest)(nil), // 4: api.job.v1.GetJobRequest - (*GetJobResponse)(nil), // 5: api.job.v1.GetJobResponse - (*GetProposalRequest)(nil), // 6: api.job.v1.GetProposalRequest - (*GetProposalResponse)(nil), // 7: api.job.v1.GetProposalResponse - (*ListJobsRequest)(nil), // 8: api.job.v1.ListJobsRequest - (*ListJobsResponse)(nil), // 9: api.job.v1.ListJobsResponse - (*ListProposalsRequest)(nil), // 10: api.job.v1.ListProposalsRequest - (*ListProposalsResponse)(nil), // 11: api.job.v1.ListProposalsResponse - (*ProposeJobRequest)(nil), // 12: api.job.v1.ProposeJobRequest - (*ProposeJobResponse)(nil), // 13: api.job.v1.ProposeJobResponse - (*RevokeJobRequest)(nil), // 14: api.job.v1.RevokeJobRequest - (*RevokeJobResponse)(nil), // 15: api.job.v1.RevokeJobResponse - (*DeleteJobRequest)(nil), // 16: api.job.v1.DeleteJobRequest - (*DeleteJobResponse)(nil), // 17: api.job.v1.DeleteJobResponse - (*UpdateJobRequest)(nil), // 18: api.job.v1.UpdateJobRequest - (*UpdateJobResponse)(nil), // 19: api.job.v1.UpdateJobResponse - (*ListJobsRequest_Filter)(nil), // 20: api.job.v1.ListJobsRequest.Filter - (*ListProposalsRequest_Filter)(nil), // 21: api.job.v1.ListProposalsRequest.Filter - (*timestamppb.Timestamp)(nil), // 22: google.protobuf.Timestamp - (*ptypes.Label)(nil), // 23: api.label.Label - (*ptypes.Selector)(nil), // 24: api.label.Selector -} -var file_job_v1_job_proto_depIdxs = []int32{ - 22, // 0: api.job.v1.Job.created_at:type_name -> google.protobuf.Timestamp - 22, // 1: api.job.v1.Job.updated_at:type_name -> google.protobuf.Timestamp - 22, // 2: api.job.v1.Job.deleted_at:type_name -> google.protobuf.Timestamp - 23, // 3: api.job.v1.Job.labels:type_name -> api.label.Label - 0, // 4: api.job.v1.Proposal.status:type_name -> api.job.v1.ProposalStatus - 1, // 5: api.job.v1.Proposal.delivery_status:type_name -> api.job.v1.ProposalDeliveryStatus - 22, // 6: api.job.v1.Proposal.created_at:type_name -> google.protobuf.Timestamp - 22, // 7: api.job.v1.Proposal.updated_at:type_name -> google.protobuf.Timestamp - 22, // 8: api.job.v1.Proposal.acked_at:type_name -> google.protobuf.Timestamp - 22, // 9: api.job.v1.Proposal.response_received_at:type_name -> google.protobuf.Timestamp - 2, // 10: api.job.v1.GetJobResponse.job:type_name -> api.job.v1.Job - 3, // 11: api.job.v1.GetProposalResponse.proposal:type_name -> api.job.v1.Proposal - 20, // 12: api.job.v1.ListJobsRequest.filter:type_name -> api.job.v1.ListJobsRequest.Filter - 2, // 13: api.job.v1.ListJobsResponse.jobs:type_name -> api.job.v1.Job - 21, // 14: api.job.v1.ListProposalsRequest.filter:type_name -> api.job.v1.ListProposalsRequest.Filter - 3, // 15: api.job.v1.ListProposalsResponse.proposals:type_name -> api.job.v1.Proposal - 23, // 16: api.job.v1.ProposeJobRequest.labels:type_name -> api.label.Label - 3, // 17: api.job.v1.ProposeJobResponse.proposal:type_name -> api.job.v1.Proposal - 3, // 18: api.job.v1.RevokeJobResponse.proposal:type_name -> api.job.v1.Proposal - 2, // 19: api.job.v1.DeleteJobResponse.job:type_name -> api.job.v1.Job - 23, // 20: api.job.v1.UpdateJobRequest.labels:type_name -> api.label.Label - 2, // 21: api.job.v1.UpdateJobResponse.job:type_name -> api.job.v1.Job - 24, // 22: api.job.v1.ListJobsRequest.Filter.selectors:type_name -> api.label.Selector - 4, // 23: api.job.v1.JobService.GetJob:input_type -> api.job.v1.GetJobRequest - 6, // 24: api.job.v1.JobService.GetProposal:input_type -> api.job.v1.GetProposalRequest - 8, // 25: api.job.v1.JobService.ListJobs:input_type -> api.job.v1.ListJobsRequest - 10, // 26: api.job.v1.JobService.ListProposals:input_type -> api.job.v1.ListProposalsRequest - 12, // 27: api.job.v1.JobService.ProposeJob:input_type -> api.job.v1.ProposeJobRequest - 14, // 28: api.job.v1.JobService.RevokeJob:input_type -> api.job.v1.RevokeJobRequest - 16, // 29: api.job.v1.JobService.DeleteJob:input_type -> api.job.v1.DeleteJobRequest - 18, // 30: api.job.v1.JobService.UpdateJob:input_type -> api.job.v1.UpdateJobRequest - 5, // 31: api.job.v1.JobService.GetJob:output_type -> api.job.v1.GetJobResponse - 7, // 32: api.job.v1.JobService.GetProposal:output_type -> api.job.v1.GetProposalResponse - 9, // 33: api.job.v1.JobService.ListJobs:output_type -> api.job.v1.ListJobsResponse - 11, // 34: api.job.v1.JobService.ListProposals:output_type -> api.job.v1.ListProposalsResponse - 13, // 35: api.job.v1.JobService.ProposeJob:output_type -> api.job.v1.ProposeJobResponse - 15, // 36: api.job.v1.JobService.RevokeJob:output_type -> api.job.v1.RevokeJobResponse - 17, // 37: api.job.v1.JobService.DeleteJob:output_type -> api.job.v1.DeleteJobResponse - 19, // 38: api.job.v1.JobService.UpdateJob:output_type -> api.job.v1.UpdateJobResponse - 31, // [31:39] is the sub-list for method output_type - 23, // [23:31] is the sub-list for method input_type - 23, // [23:23] is the sub-list for extension type_name - 23, // [23:23] is the sub-list for extension extendee - 0, // [0:23] is the sub-list for field type_name -} - -func init() { file_job_v1_job_proto_init() } -func file_job_v1_job_proto_init() { - if File_job_v1_job_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_job_v1_job_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Job); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_job_v1_job_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Proposal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_job_v1_job_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_job_v1_job_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetJobResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_job_v1_job_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetProposalRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_job_v1_job_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetProposalResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_job_v1_job_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_job_v1_job_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_job_v1_job_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListProposalsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_job_v1_job_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListProposalsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_job_v1_job_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProposeJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_job_v1_job_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProposeJobResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_job_v1_job_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RevokeJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_job_v1_job_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RevokeJobResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_job_v1_job_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_job_v1_job_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteJobResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_job_v1_job_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_job_v1_job_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateJobResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_job_v1_job_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListJobsRequest_Filter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_job_v1_job_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListProposalsRequest_Filter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_job_v1_job_proto_msgTypes[1].OneofWrappers = []interface{}{} - file_job_v1_job_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*GetJobRequest_Id)(nil), - (*GetJobRequest_Uuid)(nil), - } - file_job_v1_job_proto_msgTypes[12].OneofWrappers = []interface{}{ - (*RevokeJobRequest_Id)(nil), - (*RevokeJobRequest_Uuid)(nil), - } - file_job_v1_job_proto_msgTypes[14].OneofWrappers = []interface{}{ - (*DeleteJobRequest_Id)(nil), - (*DeleteJobRequest_Uuid)(nil), - } - file_job_v1_job_proto_msgTypes[16].OneofWrappers = []interface{}{ - (*UpdateJobRequest_Id)(nil), - (*UpdateJobRequest_Uuid)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_job_v1_job_proto_rawDesc, - NumEnums: 2, - NumMessages: 20, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_job_v1_job_proto_goTypes, - DependencyIndexes: file_job_v1_job_proto_depIdxs, - EnumInfos: file_job_v1_job_proto_enumTypes, - MessageInfos: file_job_v1_job_proto_msgTypes, - }.Build() - File_job_v1_job_proto = out.File - file_job_v1_job_proto_rawDesc = nil - file_job_v1_job_proto_goTypes = nil - file_job_v1_job_proto_depIdxs = nil -} \ No newline at end of file diff --git a/integration-tests/deployment/jd/job/v1/job_grpc.pb.go b/integration-tests/deployment/jd/job/v1/job_grpc.pb.go deleted file mode 100644 index 1ac2ca13c9..0000000000 --- a/integration-tests/deployment/jd/job/v1/job_grpc.pb.go +++ /dev/null @@ -1,384 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v4.25.3 -// source: job/v1/job.proto - -package v1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - JobService_GetJob_FullMethodName = "/api.job.v1.JobService/GetJob" - JobService_GetProposal_FullMethodName = "/api.job.v1.JobService/GetProposal" - JobService_ListJobs_FullMethodName = "/api.job.v1.JobService/ListJobs" - JobService_ListProposals_FullMethodName = "/api.job.v1.JobService/ListProposals" - JobService_ProposeJob_FullMethodName = "/api.job.v1.JobService/ProposeJob" - JobService_RevokeJob_FullMethodName = "/api.job.v1.JobService/RevokeJob" - JobService_DeleteJob_FullMethodName = "/api.job.v1.JobService/DeleteJob" - JobService_UpdateJob_FullMethodName = "/api.job.v1.JobService/UpdateJob" -) - -// JobServiceClient is the client API for JobService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type JobServiceClient interface { - // GetJob retrieves the details of a specific job by its ID or UUID. - GetJob(ctx context.Context, in *GetJobRequest, opts ...grpc.CallOption) (*GetJobResponse, error) - // GetProposal retrieves the details of a specific proposal by its ID. - GetProposal(ctx context.Context, in *GetProposalRequest, opts ...grpc.CallOption) (*GetProposalResponse, error) - // ListJobs returns a list of jobs, optionally filtered by IDs or node IDs. - ListJobs(ctx context.Context, in *ListJobsRequest, opts ...grpc.CallOption) (*ListJobsResponse, error) - // ListProposals returns a list of proposals, optionally filtered by proposal or job IDs. - ListProposals(ctx context.Context, in *ListProposalsRequest, opts ...grpc.CallOption) (*ListProposalsResponse, error) - // ProposeJob submits a new job proposal to a node. - ProposeJob(ctx context.Context, in *ProposeJobRequest, opts ...grpc.CallOption) (*ProposeJobResponse, error) - // RevokeJob revokes an existing job proposal. - RevokeJob(ctx context.Context, in *RevokeJobRequest, opts ...grpc.CallOption) (*RevokeJobResponse, error) - // DeleteJob deletes a job from the system. - DeleteJob(ctx context.Context, in *DeleteJobRequest, opts ...grpc.CallOption) (*DeleteJobResponse, error) - // UpdateJob updates a job in the system. - UpdateJob(ctx context.Context, in *UpdateJobRequest, opts ...grpc.CallOption) (*UpdateJobResponse, error) -} - -type jobServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewJobServiceClient(cc grpc.ClientConnInterface) JobServiceClient { - return &jobServiceClient{cc} -} - -func (c *jobServiceClient) GetJob(ctx context.Context, in *GetJobRequest, opts ...grpc.CallOption) (*GetJobResponse, error) { - out := new(GetJobResponse) - err := c.cc.Invoke(ctx, JobService_GetJob_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *jobServiceClient) GetProposal(ctx context.Context, in *GetProposalRequest, opts ...grpc.CallOption) (*GetProposalResponse, error) { - out := new(GetProposalResponse) - err := c.cc.Invoke(ctx, JobService_GetProposal_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *jobServiceClient) ListJobs(ctx context.Context, in *ListJobsRequest, opts ...grpc.CallOption) (*ListJobsResponse, error) { - out := new(ListJobsResponse) - err := c.cc.Invoke(ctx, JobService_ListJobs_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *jobServiceClient) ListProposals(ctx context.Context, in *ListProposalsRequest, opts ...grpc.CallOption) (*ListProposalsResponse, error) { - out := new(ListProposalsResponse) - err := c.cc.Invoke(ctx, JobService_ListProposals_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *jobServiceClient) ProposeJob(ctx context.Context, in *ProposeJobRequest, opts ...grpc.CallOption) (*ProposeJobResponse, error) { - out := new(ProposeJobResponse) - err := c.cc.Invoke(ctx, JobService_ProposeJob_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *jobServiceClient) RevokeJob(ctx context.Context, in *RevokeJobRequest, opts ...grpc.CallOption) (*RevokeJobResponse, error) { - out := new(RevokeJobResponse) - err := c.cc.Invoke(ctx, JobService_RevokeJob_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *jobServiceClient) DeleteJob(ctx context.Context, in *DeleteJobRequest, opts ...grpc.CallOption) (*DeleteJobResponse, error) { - out := new(DeleteJobResponse) - err := c.cc.Invoke(ctx, JobService_DeleteJob_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *jobServiceClient) UpdateJob(ctx context.Context, in *UpdateJobRequest, opts ...grpc.CallOption) (*UpdateJobResponse, error) { - out := new(UpdateJobResponse) - err := c.cc.Invoke(ctx, JobService_UpdateJob_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// JobServiceServer is the server API for JobService service. -// All implementations must embed UnimplementedJobServiceServer -// for forward compatibility -type JobServiceServer interface { - // GetJob retrieves the details of a specific job by its ID or UUID. - GetJob(context.Context, *GetJobRequest) (*GetJobResponse, error) - // GetProposal retrieves the details of a specific proposal by its ID. - GetProposal(context.Context, *GetProposalRequest) (*GetProposalResponse, error) - // ListJobs returns a list of jobs, optionally filtered by IDs or node IDs. - ListJobs(context.Context, *ListJobsRequest) (*ListJobsResponse, error) - // ListProposals returns a list of proposals, optionally filtered by proposal or job IDs. - ListProposals(context.Context, *ListProposalsRequest) (*ListProposalsResponse, error) - // ProposeJob submits a new job proposal to a node. - ProposeJob(context.Context, *ProposeJobRequest) (*ProposeJobResponse, error) - // RevokeJob revokes an existing job proposal. - RevokeJob(context.Context, *RevokeJobRequest) (*RevokeJobResponse, error) - // DeleteJob deletes a job from the system. - DeleteJob(context.Context, *DeleteJobRequest) (*DeleteJobResponse, error) - // UpdateJob updates a job in the system. - UpdateJob(context.Context, *UpdateJobRequest) (*UpdateJobResponse, error) - mustEmbedUnimplementedJobServiceServer() -} - -// UnimplementedJobServiceServer must be embedded to have forward compatible implementations. -type UnimplementedJobServiceServer struct { -} - -func (UnimplementedJobServiceServer) GetJob(context.Context, *GetJobRequest) (*GetJobResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetJob not implemented") -} -func (UnimplementedJobServiceServer) GetProposal(context.Context, *GetProposalRequest) (*GetProposalResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetProposal not implemented") -} -func (UnimplementedJobServiceServer) ListJobs(context.Context, *ListJobsRequest) (*ListJobsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListJobs not implemented") -} -func (UnimplementedJobServiceServer) ListProposals(context.Context, *ListProposalsRequest) (*ListProposalsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListProposals not implemented") -} -func (UnimplementedJobServiceServer) ProposeJob(context.Context, *ProposeJobRequest) (*ProposeJobResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ProposeJob not implemented") -} -func (UnimplementedJobServiceServer) RevokeJob(context.Context, *RevokeJobRequest) (*RevokeJobResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RevokeJob not implemented") -} -func (UnimplementedJobServiceServer) DeleteJob(context.Context, *DeleteJobRequest) (*DeleteJobResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteJob not implemented") -} -func (UnimplementedJobServiceServer) UpdateJob(context.Context, *UpdateJobRequest) (*UpdateJobResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateJob not implemented") -} -func (UnimplementedJobServiceServer) mustEmbedUnimplementedJobServiceServer() {} - -// UnsafeJobServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to JobServiceServer will -// result in compilation errors. -type UnsafeJobServiceServer interface { - mustEmbedUnimplementedJobServiceServer() -} - -func RegisterJobServiceServer(s grpc.ServiceRegistrar, srv JobServiceServer) { - s.RegisterService(&JobService_ServiceDesc, srv) -} - -func _JobService_GetJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetJobRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(JobServiceServer).GetJob(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: JobService_GetJob_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(JobServiceServer).GetJob(ctx, req.(*GetJobRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _JobService_GetProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetProposalRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(JobServiceServer).GetProposal(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: JobService_GetProposal_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(JobServiceServer).GetProposal(ctx, req.(*GetProposalRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _JobService_ListJobs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListJobsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(JobServiceServer).ListJobs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: JobService_ListJobs_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(JobServiceServer).ListJobs(ctx, req.(*ListJobsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _JobService_ListProposals_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListProposalsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(JobServiceServer).ListProposals(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: JobService_ListProposals_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(JobServiceServer).ListProposals(ctx, req.(*ListProposalsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _JobService_ProposeJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ProposeJobRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(JobServiceServer).ProposeJob(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: JobService_ProposeJob_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(JobServiceServer).ProposeJob(ctx, req.(*ProposeJobRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _JobService_RevokeJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RevokeJobRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(JobServiceServer).RevokeJob(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: JobService_RevokeJob_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(JobServiceServer).RevokeJob(ctx, req.(*RevokeJobRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _JobService_DeleteJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteJobRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(JobServiceServer).DeleteJob(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: JobService_DeleteJob_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(JobServiceServer).DeleteJob(ctx, req.(*DeleteJobRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _JobService_UpdateJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateJobRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(JobServiceServer).UpdateJob(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: JobService_UpdateJob_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(JobServiceServer).UpdateJob(ctx, req.(*UpdateJobRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// JobService_ServiceDesc is the grpc.ServiceDesc for JobService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var JobService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "api.job.v1.JobService", - HandlerType: (*JobServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetJob", - Handler: _JobService_GetJob_Handler, - }, - { - MethodName: "GetProposal", - Handler: _JobService_GetProposal_Handler, - }, - { - MethodName: "ListJobs", - Handler: _JobService_ListJobs_Handler, - }, - { - MethodName: "ListProposals", - Handler: _JobService_ListProposals_Handler, - }, - { - MethodName: "ProposeJob", - Handler: _JobService_ProposeJob_Handler, - }, - { - MethodName: "RevokeJob", - Handler: _JobService_RevokeJob_Handler, - }, - { - MethodName: "DeleteJob", - Handler: _JobService_DeleteJob_Handler, - }, - { - MethodName: "UpdateJob", - Handler: _JobService_UpdateJob_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "job/v1/job.proto", -} \ No newline at end of file diff --git a/integration-tests/deployment/jd/node/v1/node.pb.go b/integration-tests/deployment/jd/node/v1/node.pb.go deleted file mode 100644 index 224109b826..0000000000 --- a/integration-tests/deployment/jd/node/v1/node.pb.go +++ /dev/null @@ -1,2492 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.29.0 -// protoc v4.25.3 -// source: node/v1/node.proto - -package v1 - -import ( - ptypes "github.com/smartcontractkit/chainlink/integration-tests/deployment/jd/shared/ptypes" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type ChainType int32 - -const ( - ChainType_CHAIN_TYPE_UNSPECIFIED ChainType = 0 - ChainType_CHAIN_TYPE_EVM ChainType = 1 - ChainType_CHAIN_TYPE_SOLANA ChainType = 2 - ChainType_CHAIN_TYPE_STARKNET ChainType = 3 -) - -// Enum value maps for ChainType. -var ( - ChainType_name = map[int32]string{ - 0: "CHAIN_TYPE_UNSPECIFIED", - 1: "CHAIN_TYPE_EVM", - 2: "CHAIN_TYPE_SOLANA", - 3: "CHAIN_TYPE_STARKNET", - } - ChainType_value = map[string]int32{ - "CHAIN_TYPE_UNSPECIFIED": 0, - "CHAIN_TYPE_EVM": 1, - "CHAIN_TYPE_SOLANA": 2, - "CHAIN_TYPE_STARKNET": 3, - } -) - -func (x ChainType) Enum() *ChainType { - p := new(ChainType) - *p = x - return p -} - -func (x ChainType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ChainType) Descriptor() protoreflect.EnumDescriptor { - return file_node_v1_node_proto_enumTypes[0].Descriptor() -} - -func (ChainType) Type() protoreflect.EnumType { - return &file_node_v1_node_proto_enumTypes[0] -} - -func (x ChainType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ChainType.Descriptor instead. -func (ChainType) EnumDescriptor() ([]byte, []int) { - return file_node_v1_node_proto_rawDescGZIP(), []int{0} -} - -// EnableState represents the enabled state of the node. -type EnableState int32 - -const ( - EnableState_ENABLE_STATE_UNSPECIFIED EnableState = 0 - EnableState_ENABLE_STATE_ENABLED EnableState = 1 - EnableState_ENABLE_STATE_DISABLED EnableState = 2 -) - -// Enum value maps for EnableState. -var ( - EnableState_name = map[int32]string{ - 0: "ENABLE_STATE_UNSPECIFIED", - 1: "ENABLE_STATE_ENABLED", - 2: "ENABLE_STATE_DISABLED", - } - EnableState_value = map[string]int32{ - "ENABLE_STATE_UNSPECIFIED": 0, - "ENABLE_STATE_ENABLED": 1, - "ENABLE_STATE_DISABLED": 2, - } -) - -func (x EnableState) Enum() *EnableState { - p := new(EnableState) - *p = x - return p -} - -func (x EnableState) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (EnableState) Descriptor() protoreflect.EnumDescriptor { - return file_node_v1_node_proto_enumTypes[1].Descriptor() -} - -func (EnableState) Type() protoreflect.EnumType { - return &file_node_v1_node_proto_enumTypes[1] -} - -func (x EnableState) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use EnableState.Descriptor instead. -func (EnableState) EnumDescriptor() ([]byte, []int) { - return file_node_v1_node_proto_rawDescGZIP(), []int{1} -} - -// Node represents a node within the Job Distributor system. -type Node struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Unique identifier for the node. - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Human-readable name for the node. - PublicKey string `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // Public key used for secure communications. - IsEnabled bool `protobuf:"varint,4,opt,name=is_enabled,json=isEnabled,proto3" json:"is_enabled,omitempty"` // Indicates if the node is currently enabled. - IsConnected bool `protobuf:"varint,5,opt,name=is_connected,json=isConnected,proto3" json:"is_connected,omitempty"` // Indicates if the node is currently connected to the network. - Labels []*ptypes.Label `protobuf:"bytes,6,rep,name=labels,proto3" json:"labels,omitempty"` // Set of labels associated with the node. - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // Timestamp when the node was created. - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // Timestamp when the node was last updated. -} - -func (x *Node) Reset() { - *x = Node{} - if protoimpl.UnsafeEnabled { - mi := &file_node_v1_node_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Node) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Node) ProtoMessage() {} - -func (x *Node) ProtoReflect() protoreflect.Message { - mi := &file_node_v1_node_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Node.ProtoReflect.Descriptor instead. -func (*Node) Descriptor() ([]byte, []int) { - return file_node_v1_node_proto_rawDescGZIP(), []int{0} -} - -func (x *Node) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Node) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Node) GetPublicKey() string { - if x != nil { - return x.PublicKey - } - return "" -} - -func (x *Node) GetIsEnabled() bool { - if x != nil { - return x.IsEnabled - } - return false -} - -func (x *Node) GetIsConnected() bool { - if x != nil { - return x.IsConnected - } - return false -} - -func (x *Node) GetLabels() []*ptypes.Label { - if x != nil { - return x.Labels - } - return nil -} - -func (x *Node) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *Node) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -type Chain struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Type ChainType `protobuf:"varint,2,opt,name=type,proto3,enum=api.node.v1.ChainType" json:"type,omitempty"` -} - -func (x *Chain) Reset() { - *x = Chain{} - if protoimpl.UnsafeEnabled { - mi := &file_node_v1_node_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Chain) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Chain) ProtoMessage() {} - -func (x *Chain) ProtoReflect() protoreflect.Message { - mi := &file_node_v1_node_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Chain.ProtoReflect.Descriptor instead. -func (*Chain) Descriptor() ([]byte, []int) { - return file_node_v1_node_proto_rawDescGZIP(), []int{1} -} - -func (x *Chain) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Chain) GetType() ChainType { - if x != nil { - return x.Type - } - return ChainType_CHAIN_TYPE_UNSPECIFIED -} - -// The config for Flux Monitor on a specific chain -type FluxMonitorConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` -} - -func (x *FluxMonitorConfig) Reset() { - *x = FluxMonitorConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_node_v1_node_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FluxMonitorConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FluxMonitorConfig) ProtoMessage() {} - -func (x *FluxMonitorConfig) ProtoReflect() protoreflect.Message { - mi := &file_node_v1_node_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FluxMonitorConfig.ProtoReflect.Descriptor instead. -func (*FluxMonitorConfig) Descriptor() ([]byte, []int) { - return file_node_v1_node_proto_rawDescGZIP(), []int{2} -} - -func (x *FluxMonitorConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -// The config for OCR1 on a specific chain -type OCR1Config struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - IsBootstrap bool `protobuf:"varint,2,opt,name=is_bootstrap,json=isBootstrap,proto3" json:"is_bootstrap,omitempty"` - P2PKeyBundle *OCR1Config_P2PKeyBundle `protobuf:"bytes,3,opt,name=p2p_key_bundle,json=p2pKeyBundle,proto3" json:"p2p_key_bundle,omitempty"` - OcrKeyBundle *OCR1Config_OCRKeyBundle `protobuf:"bytes,4,opt,name=ocr_key_bundle,json=ocrKeyBundle,proto3" json:"ocr_key_bundle,omitempty"` - Multiaddr string `protobuf:"bytes,5,opt,name=multiaddr,proto3" json:"multiaddr,omitempty"` -} - -func (x *OCR1Config) Reset() { - *x = OCR1Config{} - if protoimpl.UnsafeEnabled { - mi := &file_node_v1_node_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OCR1Config) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OCR1Config) ProtoMessage() {} - -func (x *OCR1Config) ProtoReflect() protoreflect.Message { - mi := &file_node_v1_node_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OCR1Config.ProtoReflect.Descriptor instead. -func (*OCR1Config) Descriptor() ([]byte, []int) { - return file_node_v1_node_proto_rawDescGZIP(), []int{3} -} - -func (x *OCR1Config) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -func (x *OCR1Config) GetIsBootstrap() bool { - if x != nil { - return x.IsBootstrap - } - return false -} - -func (x *OCR1Config) GetP2PKeyBundle() *OCR1Config_P2PKeyBundle { - if x != nil { - return x.P2PKeyBundle - } - return nil -} - -func (x *OCR1Config) GetOcrKeyBundle() *OCR1Config_OCRKeyBundle { - if x != nil { - return x.OcrKeyBundle - } - return nil -} - -func (x *OCR1Config) GetMultiaddr() string { - if x != nil { - return x.Multiaddr - } - return "" -} - -// The config for OCR2 on a specific chain -type OCR2Config struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - IsBootstrap bool `protobuf:"varint,2,opt,name=is_bootstrap,json=isBootstrap,proto3" json:"is_bootstrap,omitempty"` - P2PKeyBundle *OCR2Config_P2PKeyBundle `protobuf:"bytes,3,opt,name=p2p_key_bundle,json=p2pKeyBundle,proto3" json:"p2p_key_bundle,omitempty"` - OcrKeyBundle *OCR2Config_OCRKeyBundle `protobuf:"bytes,4,opt,name=ocr_key_bundle,json=ocrKeyBundle,proto3" json:"ocr_key_bundle,omitempty"` - Multiaddr string `protobuf:"bytes,5,opt,name=multiaddr,proto3" json:"multiaddr,omitempty"` - Plugins *OCR2Config_Plugins `protobuf:"bytes,6,opt,name=plugins,proto3" json:"plugins,omitempty"` - ForwarderAddress *string `protobuf:"bytes,7,opt,name=forwarder_address,json=forwarderAddress,proto3,oneof" json:"forwarder_address,omitempty"` -} - -func (x *OCR2Config) Reset() { - *x = OCR2Config{} - if protoimpl.UnsafeEnabled { - mi := &file_node_v1_node_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OCR2Config) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OCR2Config) ProtoMessage() {} - -func (x *OCR2Config) ProtoReflect() protoreflect.Message { - mi := &file_node_v1_node_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OCR2Config.ProtoReflect.Descriptor instead. -func (*OCR2Config) Descriptor() ([]byte, []int) { - return file_node_v1_node_proto_rawDescGZIP(), []int{4} -} - -func (x *OCR2Config) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -func (x *OCR2Config) GetIsBootstrap() bool { - if x != nil { - return x.IsBootstrap - } - return false -} - -func (x *OCR2Config) GetP2PKeyBundle() *OCR2Config_P2PKeyBundle { - if x != nil { - return x.P2PKeyBundle - } - return nil -} - -func (x *OCR2Config) GetOcrKeyBundle() *OCR2Config_OCRKeyBundle { - if x != nil { - return x.OcrKeyBundle - } - return nil -} - -func (x *OCR2Config) GetMultiaddr() string { - if x != nil { - return x.Multiaddr - } - return "" -} - -func (x *OCR2Config) GetPlugins() *OCR2Config_Plugins { - if x != nil { - return x.Plugins - } - return nil -} - -func (x *OCR2Config) GetForwarderAddress() string { - if x != nil && x.ForwarderAddress != nil { - return *x.ForwarderAddress - } - return "" -} - -type ChainConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Chain *Chain `protobuf:"bytes,1,opt,name=chain,proto3" json:"chain,omitempty"` - AccountAddress string `protobuf:"bytes,2,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` - AdminAddress string `protobuf:"bytes,3,opt,name=admin_address,json=adminAddress,proto3" json:"admin_address,omitempty"` - FluxMonitorConfig *FluxMonitorConfig `protobuf:"bytes,4,opt,name=flux_monitor_config,json=fluxMonitorConfig,proto3" json:"flux_monitor_config,omitempty"` - Ocr1Config *OCR1Config `protobuf:"bytes,5,opt,name=ocr1_config,json=ocr1Config,proto3" json:"ocr1_config,omitempty"` - Ocr2Config *OCR2Config `protobuf:"bytes,6,opt,name=ocr2_config,json=ocr2Config,proto3" json:"ocr2_config,omitempty"` - // For EVM chains, we do not need this value and it is kept in the node's - // keystore. For starknet, because the wallet address needs to be deployed - // using this value and this pub key needs to be passed into the starknet - // relayer, we request the node to send this directly to CLO. - AccountAddressPublicKey *string `protobuf:"bytes,7,opt,name=account_address_public_key,json=accountAddressPublicKey,proto3,oneof" json:"account_address_public_key,omitempty"` -} - -func (x *ChainConfig) Reset() { - *x = ChainConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_node_v1_node_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ChainConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChainConfig) ProtoMessage() {} - -func (x *ChainConfig) ProtoReflect() protoreflect.Message { - mi := &file_node_v1_node_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ChainConfig.ProtoReflect.Descriptor instead. -func (*ChainConfig) Descriptor() ([]byte, []int) { - return file_node_v1_node_proto_rawDescGZIP(), []int{5} -} - -func (x *ChainConfig) GetChain() *Chain { - if x != nil { - return x.Chain - } - return nil -} - -func (x *ChainConfig) GetAccountAddress() string { - if x != nil { - return x.AccountAddress - } - return "" -} - -func (x *ChainConfig) GetAdminAddress() string { - if x != nil { - return x.AdminAddress - } - return "" -} - -func (x *ChainConfig) GetFluxMonitorConfig() *FluxMonitorConfig { - if x != nil { - return x.FluxMonitorConfig - } - return nil -} - -func (x *ChainConfig) GetOcr1Config() *OCR1Config { - if x != nil { - return x.Ocr1Config - } - return nil -} - -func (x *ChainConfig) GetOcr2Config() *OCR2Config { - if x != nil { - return x.Ocr2Config - } - return nil -} - -func (x *ChainConfig) GetAccountAddressPublicKey() string { - if x != nil && x.AccountAddressPublicKey != nil { - return *x.AccountAddressPublicKey - } - return "" -} - -// RegisterNodeRequest contains the information needed to register a new node. -type RegisterNodeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Desired name for the node. - PublicKey string `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // Public key for the node. - Labels []*ptypes.Label `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty"` // Labels to associate with the node. -} - -func (x *RegisterNodeRequest) Reset() { - *x = RegisterNodeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_node_v1_node_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RegisterNodeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RegisterNodeRequest) ProtoMessage() {} - -func (x *RegisterNodeRequest) ProtoReflect() protoreflect.Message { - mi := &file_node_v1_node_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RegisterNodeRequest.ProtoReflect.Descriptor instead. -func (*RegisterNodeRequest) Descriptor() ([]byte, []int) { - return file_node_v1_node_proto_rawDescGZIP(), []int{6} -} - -func (x *RegisterNodeRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *RegisterNodeRequest) GetPublicKey() string { - if x != nil { - return x.PublicKey - } - return "" -} - -func (x *RegisterNodeRequest) GetLabels() []*ptypes.Label { - if x != nil { - return x.Labels - } - return nil -} - -// RegisterNodeResponse returns the newly registered node. -type RegisterNodeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Node *Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` // Details of the newly registered node. -} - -func (x *RegisterNodeResponse) Reset() { - *x = RegisterNodeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_node_v1_node_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RegisterNodeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RegisterNodeResponse) ProtoMessage() {} - -func (x *RegisterNodeResponse) ProtoReflect() protoreflect.Message { - mi := &file_node_v1_node_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RegisterNodeResponse.ProtoReflect.Descriptor instead. -func (*RegisterNodeResponse) Descriptor() ([]byte, []int) { - return file_node_v1_node_proto_rawDescGZIP(), []int{7} -} - -func (x *RegisterNodeResponse) GetNode() *Node { - if x != nil { - return x.Node - } - return nil -} - -// GetNodeRequest is the request to retrieve a single node by its ID. -type GetNodeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Unique identifier of the node to retrieve. -} - -func (x *GetNodeRequest) Reset() { - *x = GetNodeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_node_v1_node_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetNodeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetNodeRequest) ProtoMessage() {} - -func (x *GetNodeRequest) ProtoReflect() protoreflect.Message { - mi := &file_node_v1_node_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetNodeRequest.ProtoReflect.Descriptor instead. -func (*GetNodeRequest) Descriptor() ([]byte, []int) { - return file_node_v1_node_proto_rawDescGZIP(), []int{8} -} - -func (x *GetNodeRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -// GetNodeResponse is the response containing the requested node. -type GetNodeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Node *Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` // Details of the retrieved node. -} - -func (x *GetNodeResponse) Reset() { - *x = GetNodeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_node_v1_node_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetNodeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetNodeResponse) ProtoMessage() {} - -func (x *GetNodeResponse) ProtoReflect() protoreflect.Message { - mi := &file_node_v1_node_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetNodeResponse.ProtoReflect.Descriptor instead. -func (*GetNodeResponse) Descriptor() ([]byte, []int) { - return file_node_v1_node_proto_rawDescGZIP(), []int{9} -} - -func (x *GetNodeResponse) GetNode() *Node { - if x != nil { - return x.Node - } - return nil -} - -// * -// ListNodesRequest is the request object for the ListNodes method. -// -// Provide a filter to return a subset of data. NodesByPeerID can be filtered by: -// - ids - A list of node ids. -// - archived - The archived state of the node. -// - selectors - A list of selectors to filter nodes by their labels. -// -// If no filter is provided, all nodes are returned. -type ListNodesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Filter *ListNodesRequest_Filter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` -} - -func (x *ListNodesRequest) Reset() { - *x = ListNodesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_node_v1_node_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListNodesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListNodesRequest) ProtoMessage() {} - -func (x *ListNodesRequest) ProtoReflect() protoreflect.Message { - mi := &file_node_v1_node_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListNodesRequest.ProtoReflect.Descriptor instead. -func (*ListNodesRequest) Descriptor() ([]byte, []int) { - return file_node_v1_node_proto_rawDescGZIP(), []int{10} -} - -func (x *ListNodesRequest) GetFilter() *ListNodesRequest_Filter { - if x != nil { - return x.Filter - } - return nil -} - -// * -// ListNodesResponse is the response object for the ListNodes method. -// -// It returns a list of nodes that match the filter criteria. -type ListNodesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Nodes []*Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` // List of nodes. -} - -func (x *ListNodesResponse) Reset() { - *x = ListNodesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_node_v1_node_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListNodesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListNodesResponse) ProtoMessage() {} - -func (x *ListNodesResponse) ProtoReflect() protoreflect.Message { - mi := &file_node_v1_node_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListNodesResponse.ProtoReflect.Descriptor instead. -func (*ListNodesResponse) Descriptor() ([]byte, []int) { - return file_node_v1_node_proto_rawDescGZIP(), []int{11} -} - -func (x *ListNodesResponse) GetNodes() []*Node { - if x != nil { - return x.Nodes - } - return nil -} - -// UpdateNodeRequest contains the information necessary to update a node. -type UpdateNodeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Unique identifier of the node to update. - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // New name for the node, if changing. - PublicKey string `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // New public key for the node, if changing. - Labels []*ptypes.Label `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty"` // New set of labels for the node, if changing. -} - -func (x *UpdateNodeRequest) Reset() { - *x = UpdateNodeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_node_v1_node_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateNodeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateNodeRequest) ProtoMessage() {} - -func (x *UpdateNodeRequest) ProtoReflect() protoreflect.Message { - mi := &file_node_v1_node_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateNodeRequest.ProtoReflect.Descriptor instead. -func (*UpdateNodeRequest) Descriptor() ([]byte, []int) { - return file_node_v1_node_proto_rawDescGZIP(), []int{12} -} - -func (x *UpdateNodeRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *UpdateNodeRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *UpdateNodeRequest) GetPublicKey() string { - if x != nil { - return x.PublicKey - } - return "" -} - -func (x *UpdateNodeRequest) GetLabels() []*ptypes.Label { - if x != nil { - return x.Labels - } - return nil -} - -// UpdateNodeResponse returns the updated node. -type UpdateNodeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Node *Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` // Updated node details. -} - -func (x *UpdateNodeResponse) Reset() { - *x = UpdateNodeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_node_v1_node_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateNodeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateNodeResponse) ProtoMessage() {} - -func (x *UpdateNodeResponse) ProtoReflect() protoreflect.Message { - mi := &file_node_v1_node_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateNodeResponse.ProtoReflect.Descriptor instead. -func (*UpdateNodeResponse) Descriptor() ([]byte, []int) { - return file_node_v1_node_proto_rawDescGZIP(), []int{13} -} - -func (x *UpdateNodeResponse) GetNode() *Node { - if x != nil { - return x.Node - } - return nil -} - -// DisableNodeRequest is used to mark a node as disabled. -type DisableNodeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Unique identifier of the node to disable. -} - -func (x *DisableNodeRequest) Reset() { - *x = DisableNodeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_node_v1_node_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DisableNodeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DisableNodeRequest) ProtoMessage() {} - -func (x *DisableNodeRequest) ProtoReflect() protoreflect.Message { - mi := &file_node_v1_node_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DisableNodeRequest.ProtoReflect.Descriptor instead. -func (*DisableNodeRequest) Descriptor() ([]byte, []int) { - return file_node_v1_node_proto_rawDescGZIP(), []int{14} -} - -func (x *DisableNodeRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -// DisableNodeResponse returns the disabled node. -type DisableNodeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Node *Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` // Disabled node details. -} - -func (x *DisableNodeResponse) Reset() { - *x = DisableNodeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_node_v1_node_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DisableNodeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DisableNodeResponse) ProtoMessage() {} - -func (x *DisableNodeResponse) ProtoReflect() protoreflect.Message { - mi := &file_node_v1_node_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DisableNodeResponse.ProtoReflect.Descriptor instead. -func (*DisableNodeResponse) Descriptor() ([]byte, []int) { - return file_node_v1_node_proto_rawDescGZIP(), []int{15} -} - -func (x *DisableNodeResponse) GetNode() *Node { - if x != nil { - return x.Node - } - return nil -} - -// EnableNodeRequest is used to reactivate a disabled node. -type EnableNodeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Unique identifier of the node to enable. -} - -func (x *EnableNodeRequest) Reset() { - *x = EnableNodeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_node_v1_node_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EnableNodeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnableNodeRequest) ProtoMessage() {} - -func (x *EnableNodeRequest) ProtoReflect() protoreflect.Message { - mi := &file_node_v1_node_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnableNodeRequest.ProtoReflect.Descriptor instead. -func (*EnableNodeRequest) Descriptor() ([]byte, []int) { - return file_node_v1_node_proto_rawDescGZIP(), []int{16} -} - -func (x *EnableNodeRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -// EnableNodeResponse returns the enabled node. -type EnableNodeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Node *Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` // Enabled node details. -} - -func (x *EnableNodeResponse) Reset() { - *x = EnableNodeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_node_v1_node_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EnableNodeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnableNodeResponse) ProtoMessage() {} - -func (x *EnableNodeResponse) ProtoReflect() protoreflect.Message { - mi := &file_node_v1_node_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnableNodeResponse.ProtoReflect.Descriptor instead. -func (*EnableNodeResponse) Descriptor() ([]byte, []int) { - return file_node_v1_node_proto_rawDescGZIP(), []int{17} -} - -func (x *EnableNodeResponse) GetNode() *Node { - if x != nil { - return x.Node - } - return nil -} - -type ListNodeChainConfigsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Filter *ListNodeChainConfigsRequest_Filter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` -} - -func (x *ListNodeChainConfigsRequest) Reset() { - *x = ListNodeChainConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_node_v1_node_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListNodeChainConfigsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListNodeChainConfigsRequest) ProtoMessage() {} - -func (x *ListNodeChainConfigsRequest) ProtoReflect() protoreflect.Message { - mi := &file_node_v1_node_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListNodeChainConfigsRequest.ProtoReflect.Descriptor instead. -func (*ListNodeChainConfigsRequest) Descriptor() ([]byte, []int) { - return file_node_v1_node_proto_rawDescGZIP(), []int{18} -} - -func (x *ListNodeChainConfigsRequest) GetFilter() *ListNodeChainConfigsRequest_Filter { - if x != nil { - return x.Filter - } - return nil -} - -type ListNodeChainConfigsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ChainConfigs []*ChainConfig `protobuf:"bytes,1,rep,name=chain_configs,json=chainConfigs,proto3" json:"chain_configs,omitempty"` -} - -func (x *ListNodeChainConfigsResponse) Reset() { - *x = ListNodeChainConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_node_v1_node_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListNodeChainConfigsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListNodeChainConfigsResponse) ProtoMessage() {} - -func (x *ListNodeChainConfigsResponse) ProtoReflect() protoreflect.Message { - mi := &file_node_v1_node_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListNodeChainConfigsResponse.ProtoReflect.Descriptor instead. -func (*ListNodeChainConfigsResponse) Descriptor() ([]byte, []int) { - return file_node_v1_node_proto_rawDescGZIP(), []int{19} -} - -func (x *ListNodeChainConfigsResponse) GetChainConfigs() []*ChainConfig { - if x != nil { - return x.ChainConfigs - } - return nil -} - -type OCR1Config_P2PKeyBundle struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` - PublicKey string `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` -} - -func (x *OCR1Config_P2PKeyBundle) Reset() { - *x = OCR1Config_P2PKeyBundle{} - if protoimpl.UnsafeEnabled { - mi := &file_node_v1_node_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OCR1Config_P2PKeyBundle) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OCR1Config_P2PKeyBundle) ProtoMessage() {} - -func (x *OCR1Config_P2PKeyBundle) ProtoReflect() protoreflect.Message { - mi := &file_node_v1_node_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OCR1Config_P2PKeyBundle.ProtoReflect.Descriptor instead. -func (*OCR1Config_P2PKeyBundle) Descriptor() ([]byte, []int) { - return file_node_v1_node_proto_rawDescGZIP(), []int{3, 0} -} - -func (x *OCR1Config_P2PKeyBundle) GetPeerId() string { - if x != nil { - return x.PeerId - } - return "" -} - -func (x *OCR1Config_P2PKeyBundle) GetPublicKey() string { - if x != nil { - return x.PublicKey - } - return "" -} - -type OCR1Config_OCRKeyBundle struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BundleId string `protobuf:"bytes,1,opt,name=bundle_id,json=bundleId,proto3" json:"bundle_id,omitempty"` - ConfigPublicKey string `protobuf:"bytes,2,opt,name=config_public_key,json=configPublicKey,proto3" json:"config_public_key,omitempty"` - OffchainPublicKey string `protobuf:"bytes,3,opt,name=offchain_public_key,json=offchainPublicKey,proto3" json:"offchain_public_key,omitempty"` - OnchainSigningAddress string `protobuf:"bytes,4,opt,name=onchain_signing_address,json=onchainSigningAddress,proto3" json:"onchain_signing_address,omitempty"` -} - -func (x *OCR1Config_OCRKeyBundle) Reset() { - *x = OCR1Config_OCRKeyBundle{} - if protoimpl.UnsafeEnabled { - mi := &file_node_v1_node_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OCR1Config_OCRKeyBundle) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OCR1Config_OCRKeyBundle) ProtoMessage() {} - -func (x *OCR1Config_OCRKeyBundle) ProtoReflect() protoreflect.Message { - mi := &file_node_v1_node_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OCR1Config_OCRKeyBundle.ProtoReflect.Descriptor instead. -func (*OCR1Config_OCRKeyBundle) Descriptor() ([]byte, []int) { - return file_node_v1_node_proto_rawDescGZIP(), []int{3, 1} -} - -func (x *OCR1Config_OCRKeyBundle) GetBundleId() string { - if x != nil { - return x.BundleId - } - return "" -} - -func (x *OCR1Config_OCRKeyBundle) GetConfigPublicKey() string { - if x != nil { - return x.ConfigPublicKey - } - return "" -} - -func (x *OCR1Config_OCRKeyBundle) GetOffchainPublicKey() string { - if x != nil { - return x.OffchainPublicKey - } - return "" -} - -func (x *OCR1Config_OCRKeyBundle) GetOnchainSigningAddress() string { - if x != nil { - return x.OnchainSigningAddress - } - return "" -} - -type OCR2Config_P2PKeyBundle struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` - PublicKey string `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` -} - -func (x *OCR2Config_P2PKeyBundle) Reset() { - *x = OCR2Config_P2PKeyBundle{} - if protoimpl.UnsafeEnabled { - mi := &file_node_v1_node_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OCR2Config_P2PKeyBundle) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OCR2Config_P2PKeyBundle) ProtoMessage() {} - -func (x *OCR2Config_P2PKeyBundle) ProtoReflect() protoreflect.Message { - mi := &file_node_v1_node_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OCR2Config_P2PKeyBundle.ProtoReflect.Descriptor instead. -func (*OCR2Config_P2PKeyBundle) Descriptor() ([]byte, []int) { - return file_node_v1_node_proto_rawDescGZIP(), []int{4, 0} -} - -func (x *OCR2Config_P2PKeyBundle) GetPeerId() string { - if x != nil { - return x.PeerId - } - return "" -} - -func (x *OCR2Config_P2PKeyBundle) GetPublicKey() string { - if x != nil { - return x.PublicKey - } - return "" -} - -type OCR2Config_OCRKeyBundle struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BundleId string `protobuf:"bytes,1,opt,name=bundle_id,json=bundleId,proto3" json:"bundle_id,omitempty"` - ConfigPublicKey string `protobuf:"bytes,2,opt,name=config_public_key,json=configPublicKey,proto3" json:"config_public_key,omitempty"` - OffchainPublicKey string `protobuf:"bytes,3,opt,name=offchain_public_key,json=offchainPublicKey,proto3" json:"offchain_public_key,omitempty"` - OnchainSigningAddress string `protobuf:"bytes,4,opt,name=onchain_signing_address,json=onchainSigningAddress,proto3" json:"onchain_signing_address,omitempty"` -} - -func (x *OCR2Config_OCRKeyBundle) Reset() { - *x = OCR2Config_OCRKeyBundle{} - if protoimpl.UnsafeEnabled { - mi := &file_node_v1_node_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OCR2Config_OCRKeyBundle) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OCR2Config_OCRKeyBundle) ProtoMessage() {} - -func (x *OCR2Config_OCRKeyBundle) ProtoReflect() protoreflect.Message { - mi := &file_node_v1_node_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OCR2Config_OCRKeyBundle.ProtoReflect.Descriptor instead. -func (*OCR2Config_OCRKeyBundle) Descriptor() ([]byte, []int) { - return file_node_v1_node_proto_rawDescGZIP(), []int{4, 1} -} - -func (x *OCR2Config_OCRKeyBundle) GetBundleId() string { - if x != nil { - return x.BundleId - } - return "" -} - -func (x *OCR2Config_OCRKeyBundle) GetConfigPublicKey() string { - if x != nil { - return x.ConfigPublicKey - } - return "" -} - -func (x *OCR2Config_OCRKeyBundle) GetOffchainPublicKey() string { - if x != nil { - return x.OffchainPublicKey - } - return "" -} - -func (x *OCR2Config_OCRKeyBundle) GetOnchainSigningAddress() string { - if x != nil { - return x.OnchainSigningAddress - } - return "" -} - -type OCR2Config_Plugins struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Commit bool `protobuf:"varint,1,opt,name=commit,proto3" json:"commit,omitempty"` - Execute bool `protobuf:"varint,2,opt,name=execute,proto3" json:"execute,omitempty"` - Median bool `protobuf:"varint,3,opt,name=median,proto3" json:"median,omitempty"` - Mercury bool `protobuf:"varint,4,opt,name=mercury,proto3" json:"mercury,omitempty"` - Rebalancer bool `protobuf:"varint,5,opt,name=rebalancer,proto3" json:"rebalancer,omitempty"` -} - -func (x *OCR2Config_Plugins) Reset() { - *x = OCR2Config_Plugins{} - if protoimpl.UnsafeEnabled { - mi := &file_node_v1_node_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OCR2Config_Plugins) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OCR2Config_Plugins) ProtoMessage() {} - -func (x *OCR2Config_Plugins) ProtoReflect() protoreflect.Message { - mi := &file_node_v1_node_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OCR2Config_Plugins.ProtoReflect.Descriptor instead. -func (*OCR2Config_Plugins) Descriptor() ([]byte, []int) { - return file_node_v1_node_proto_rawDescGZIP(), []int{4, 2} -} - -func (x *OCR2Config_Plugins) GetCommit() bool { - if x != nil { - return x.Commit - } - return false -} - -func (x *OCR2Config_Plugins) GetExecute() bool { - if x != nil { - return x.Execute - } - return false -} - -func (x *OCR2Config_Plugins) GetMedian() bool { - if x != nil { - return x.Median - } - return false -} - -func (x *OCR2Config_Plugins) GetMercury() bool { - if x != nil { - return x.Mercury - } - return false -} - -func (x *OCR2Config_Plugins) GetRebalancer() bool { - if x != nil { - return x.Rebalancer - } - return false -} - -type ListNodesRequest_Filter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` - Enabled EnableState `protobuf:"varint,2,opt,name=enabled,proto3,enum=api.node.v1.EnableState" json:"enabled,omitempty"` - Selectors []*ptypes.Selector `protobuf:"bytes,3,rep,name=selectors,proto3" json:"selectors,omitempty"` -} - -func (x *ListNodesRequest_Filter) Reset() { - *x = ListNodesRequest_Filter{} - if protoimpl.UnsafeEnabled { - mi := &file_node_v1_node_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListNodesRequest_Filter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListNodesRequest_Filter) ProtoMessage() {} - -func (x *ListNodesRequest_Filter) ProtoReflect() protoreflect.Message { - mi := &file_node_v1_node_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListNodesRequest_Filter.ProtoReflect.Descriptor instead. -func (*ListNodesRequest_Filter) Descriptor() ([]byte, []int) { - return file_node_v1_node_proto_rawDescGZIP(), []int{10, 0} -} - -func (x *ListNodesRequest_Filter) GetIds() []string { - if x != nil { - return x.Ids - } - return nil -} - -func (x *ListNodesRequest_Filter) GetEnabled() EnableState { - if x != nil { - return x.Enabled - } - return EnableState_ENABLE_STATE_UNSPECIFIED -} - -func (x *ListNodesRequest_Filter) GetSelectors() []*ptypes.Selector { - if x != nil { - return x.Selectors - } - return nil -} - -type ListNodeChainConfigsRequest_Filter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - NodeIds []string `protobuf:"bytes,1,rep,name=node_ids,json=nodeIds,proto3" json:"node_ids,omitempty"` -} - -func (x *ListNodeChainConfigsRequest_Filter) Reset() { - *x = ListNodeChainConfigsRequest_Filter{} - if protoimpl.UnsafeEnabled { - mi := &file_node_v1_node_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListNodeChainConfigsRequest_Filter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListNodeChainConfigsRequest_Filter) ProtoMessage() {} - -func (x *ListNodeChainConfigsRequest_Filter) ProtoReflect() protoreflect.Message { - mi := &file_node_v1_node_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListNodeChainConfigsRequest_Filter.ProtoReflect.Descriptor instead. -func (*ListNodeChainConfigsRequest_Filter) Descriptor() ([]byte, []int) { - return file_node_v1_node_proto_rawDescGZIP(), []int{18, 0} -} - -func (x *ListNodeChainConfigsRequest_Filter) GetNodeIds() []string { - if x != nil { - return x.NodeIds - } - return nil -} - -var File_node_v1_node_proto protoreflect.FileDescriptor - -var file_node_v1_node_proto_rawDesc = []byte{ - 0x0a, 0x12, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x61, 0x70, 0x69, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, - 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x19, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2f, 0x70, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xab, 0x02, - 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, - 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, - 0x69, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x28, 0x0a, 0x06, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x06, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, - 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x43, 0x0a, 0x05, 0x43, - 0x68, 0x61, 0x69, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x22, 0x2d, 0x0a, 0x11, 0x46, 0x6c, 0x75, 0x78, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, - 0x89, 0x04, 0x0a, 0x0a, 0x4f, 0x43, 0x52, 0x31, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, - 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x62, - 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, - 0x69, 0x73, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x12, 0x4a, 0x0a, 0x0e, 0x70, - 0x32, 0x70, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x4f, 0x43, 0x52, 0x31, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x32, 0x50, - 0x4b, 0x65, 0x79, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x0c, 0x70, 0x32, 0x70, 0x4b, 0x65, - 0x79, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x4a, 0x0a, 0x0e, 0x6f, 0x63, 0x72, 0x5f, 0x6b, - 0x65, 0x79, 0x5f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x43, - 0x52, 0x31, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4f, 0x43, 0x52, 0x4b, 0x65, 0x79, 0x42, - 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x0c, 0x6f, 0x63, 0x72, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x6e, - 0x64, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x61, 0x64, 0x64, 0x72, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x61, 0x64, 0x64, - 0x72, 0x1a, 0x46, 0x0a, 0x0c, 0x50, 0x32, 0x50, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x6e, 0x64, 0x6c, - 0x65, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x1a, 0xbf, 0x01, 0x0a, 0x0c, 0x4f, 0x43, - 0x52, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x75, - 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, - 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x4b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x13, 0x6f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x11, 0x6f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x4b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x17, 0x6f, 0x6e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x73, - 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6f, 0x6e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x53, 0x69, 0x67, - 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x9c, 0x06, 0x0a, 0x0a, - 0x4f, 0x43, 0x52, 0x32, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x62, 0x6f, 0x6f, 0x74, 0x73, - 0x74, 0x72, 0x61, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x42, 0x6f, - 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x12, 0x4a, 0x0a, 0x0e, 0x70, 0x32, 0x70, 0x5f, 0x6b, - 0x65, 0x79, 0x5f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x43, - 0x52, 0x32, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x32, 0x50, 0x4b, 0x65, 0x79, 0x42, - 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x0c, 0x70, 0x32, 0x70, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x6e, - 0x64, 0x6c, 0x65, 0x12, 0x4a, 0x0a, 0x0e, 0x6f, 0x63, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x62, - 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x43, 0x52, 0x32, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4f, 0x43, 0x52, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x6e, 0x64, 0x6c, - 0x65, 0x52, 0x0c, 0x6f, 0x63, 0x72, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, - 0x1c, 0x0a, 0x09, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x61, 0x64, 0x64, 0x72, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x61, 0x64, 0x64, 0x72, 0x12, 0x39, 0x0a, - 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x43, 0x52, - 0x32, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, - 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x11, 0x66, 0x6f, 0x72, 0x77, - 0x61, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x10, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x65, 0x72, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x1a, 0x46, 0x0a, 0x0c, 0x50, 0x32, - 0x50, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x65, - 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x65, 0x65, - 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, - 0x65, 0x79, 0x1a, 0xbf, 0x01, 0x0a, 0x0c, 0x4f, 0x43, 0x52, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x6e, - 0x64, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x64, - 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x13, - 0x6f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, - 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6f, 0x66, 0x66, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x17, - 0x6f, 0x6e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6f, - 0x6e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x1a, 0x8d, 0x01, 0x0a, 0x07, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, - 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x06, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, - 0x72, 0x63, 0x75, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x6d, 0x65, 0x72, - 0x63, 0x75, 0x72, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, - 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x72, 0x65, 0x62, 0x61, 0x6c, 0x61, - 0x6e, 0x63, 0x65, 0x72, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, - 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xaa, 0x03, 0x0a, 0x0b, 0x43, - 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x28, 0x0a, 0x05, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x05, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x23, 0x0a, - 0x0d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x4e, 0x0a, 0x13, 0x66, 0x6c, 0x75, 0x78, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, - 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, - 0x75, 0x78, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x11, 0x66, 0x6c, 0x75, 0x78, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x38, 0x0a, 0x0b, 0x6f, 0x63, 0x72, 0x31, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x43, 0x52, 0x31, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x0a, 0x6f, 0x63, 0x72, 0x31, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x38, 0x0a, 0x0b, - 0x6f, 0x63, 0x72, 0x32, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x4f, 0x43, 0x52, 0x32, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0a, 0x6f, 0x63, 0x72, 0x32, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x40, 0x0a, 0x1a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x17, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x4b, 0x65, 0x79, 0x88, 0x01, 0x01, 0x42, 0x1d, 0x0a, 0x1b, 0x5f, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x22, 0x72, 0x0a, 0x13, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, - 0x79, 0x12, 0x28, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x2e, 0x4c, 0x61, - 0x62, 0x65, 0x6c, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x3d, 0x0a, 0x14, 0x52, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65, - 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x38, 0x0a, 0x0f, - 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x25, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, - 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x22, 0xd4, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4e, - 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x06, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, - 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x1a, 0x81, 0x01, 0x0a, 0x06, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x31, 0x0a, 0x09, 0x73, 0x65, - 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x52, 0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x22, 0x3c, 0x0a, - 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x80, 0x01, 0x0a, 0x11, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, - 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x4b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x3b, - 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x22, 0x24, 0x0a, 0x12, 0x44, - 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x22, 0x3c, 0x0a, 0x13, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x22, - 0x23, 0x0a, 0x11, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x22, 0x3b, 0x0a, 0x12, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, - 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x6e, 0x6f, - 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, - 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x47, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x1a, 0x23, 0x0a, 0x06, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x73, 0x22, - 0x5d, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x3d, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x0c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x2a, 0x6b, - 0x0a, 0x09, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x43, - 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x48, 0x41, 0x49, 0x4e, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x4d, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x43, - 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x4f, 0x4c, 0x41, 0x4e, 0x41, - 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x53, 0x54, 0x41, 0x52, 0x4b, 0x4e, 0x45, 0x54, 0x10, 0x03, 0x2a, 0x60, 0x0a, 0x0b, 0x45, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x4e, - 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x45, 0x4e, 0x41, 0x42, - 0x4c, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, - 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x53, 0x54, 0x41, - 0x54, 0x45, 0x5f, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x32, 0xdf, 0x04, - 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x52, 0x0a, - 0x0b, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, - 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x61, - 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x4f, 0x0a, 0x0a, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, - 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x46, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, - 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x09, 0x4c, 0x69, - 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6d, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, - 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, - 0x12, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, - 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, - 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, - 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, - 0x09, 0x5a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_node_v1_node_proto_rawDescOnce sync.Once - file_node_v1_node_proto_rawDescData = file_node_v1_node_proto_rawDesc -) - -func file_node_v1_node_proto_rawDescGZIP() []byte { - file_node_v1_node_proto_rawDescOnce.Do(func() { - file_node_v1_node_proto_rawDescData = protoimpl.X.CompressGZIP(file_node_v1_node_proto_rawDescData) - }) - return file_node_v1_node_proto_rawDescData -} - -var file_node_v1_node_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_node_v1_node_proto_msgTypes = make([]protoimpl.MessageInfo, 27) -var file_node_v1_node_proto_goTypes = []interface{}{ - (ChainType)(0), // 0: api.node.v1.ChainType - (EnableState)(0), // 1: api.node.v1.EnableState - (*Node)(nil), // 2: api.node.v1.Node - (*Chain)(nil), // 3: api.node.v1.Chain - (*FluxMonitorConfig)(nil), // 4: api.node.v1.FluxMonitorConfig - (*OCR1Config)(nil), // 5: api.node.v1.OCR1Config - (*OCR2Config)(nil), // 6: api.node.v1.OCR2Config - (*ChainConfig)(nil), // 7: api.node.v1.ChainConfig - (*RegisterNodeRequest)(nil), // 8: api.node.v1.RegisterNodeRequest - (*RegisterNodeResponse)(nil), // 9: api.node.v1.RegisterNodeResponse - (*GetNodeRequest)(nil), // 10: api.node.v1.GetNodeRequest - (*GetNodeResponse)(nil), // 11: api.node.v1.GetNodeResponse - (*ListNodesRequest)(nil), // 12: api.node.v1.ListNodesRequest - (*ListNodesResponse)(nil), // 13: api.node.v1.ListNodesResponse - (*UpdateNodeRequest)(nil), // 14: api.node.v1.UpdateNodeRequest - (*UpdateNodeResponse)(nil), // 15: api.node.v1.UpdateNodeResponse - (*DisableNodeRequest)(nil), // 16: api.node.v1.DisableNodeRequest - (*DisableNodeResponse)(nil), // 17: api.node.v1.DisableNodeResponse - (*EnableNodeRequest)(nil), // 18: api.node.v1.EnableNodeRequest - (*EnableNodeResponse)(nil), // 19: api.node.v1.EnableNodeResponse - (*ListNodeChainConfigsRequest)(nil), // 20: api.node.v1.ListNodeChainConfigsRequest - (*ListNodeChainConfigsResponse)(nil), // 21: api.node.v1.ListNodeChainConfigsResponse - (*OCR1Config_P2PKeyBundle)(nil), // 22: api.node.v1.OCR1Config.P2PKeyBundle - (*OCR1Config_OCRKeyBundle)(nil), // 23: api.node.v1.OCR1Config.OCRKeyBundle - (*OCR2Config_P2PKeyBundle)(nil), // 24: api.node.v1.OCR2Config.P2PKeyBundle - (*OCR2Config_OCRKeyBundle)(nil), // 25: api.node.v1.OCR2Config.OCRKeyBundle - (*OCR2Config_Plugins)(nil), // 26: api.node.v1.OCR2Config.Plugins - (*ListNodesRequest_Filter)(nil), // 27: api.node.v1.ListNodesRequest.Filter - (*ListNodeChainConfigsRequest_Filter)(nil), // 28: api.node.v1.ListNodeChainConfigsRequest.Filter - (*ptypes.Label)(nil), // 29: api.label.Label - (*timestamppb.Timestamp)(nil), // 30: google.protobuf.Timestamp - (*ptypes.Selector)(nil), // 31: api.label.Selector -} -var file_node_v1_node_proto_depIdxs = []int32{ - 29, // 0: api.node.v1.Node.labels:type_name -> api.label.Label - 30, // 1: api.node.v1.Node.created_at:type_name -> google.protobuf.Timestamp - 30, // 2: api.node.v1.Node.updated_at:type_name -> google.protobuf.Timestamp - 0, // 3: api.node.v1.Chain.type:type_name -> api.node.v1.ChainType - 22, // 4: api.node.v1.OCR1Config.p2p_key_bundle:type_name -> api.node.v1.OCR1Config.P2PKeyBundle - 23, // 5: api.node.v1.OCR1Config.ocr_key_bundle:type_name -> api.node.v1.OCR1Config.OCRKeyBundle - 24, // 6: api.node.v1.OCR2Config.p2p_key_bundle:type_name -> api.node.v1.OCR2Config.P2PKeyBundle - 25, // 7: api.node.v1.OCR2Config.ocr_key_bundle:type_name -> api.node.v1.OCR2Config.OCRKeyBundle - 26, // 8: api.node.v1.OCR2Config.plugins:type_name -> api.node.v1.OCR2Config.Plugins - 3, // 9: api.node.v1.ChainConfig.chain:type_name -> api.node.v1.Chain - 4, // 10: api.node.v1.ChainConfig.flux_monitor_config:type_name -> api.node.v1.FluxMonitorConfig - 5, // 11: api.node.v1.ChainConfig.ocr1_config:type_name -> api.node.v1.OCR1Config - 6, // 12: api.node.v1.ChainConfig.ocr2_config:type_name -> api.node.v1.OCR2Config - 29, // 13: api.node.v1.RegisterNodeRequest.labels:type_name -> api.label.Label - 2, // 14: api.node.v1.RegisterNodeResponse.node:type_name -> api.node.v1.Node - 2, // 15: api.node.v1.GetNodeResponse.node:type_name -> api.node.v1.Node - 27, // 16: api.node.v1.ListNodesRequest.filter:type_name -> api.node.v1.ListNodesRequest.Filter - 2, // 17: api.node.v1.ListNodesResponse.nodes:type_name -> api.node.v1.Node - 29, // 18: api.node.v1.UpdateNodeRequest.labels:type_name -> api.label.Label - 2, // 19: api.node.v1.UpdateNodeResponse.node:type_name -> api.node.v1.Node - 2, // 20: api.node.v1.DisableNodeResponse.node:type_name -> api.node.v1.Node - 2, // 21: api.node.v1.EnableNodeResponse.node:type_name -> api.node.v1.Node - 28, // 22: api.node.v1.ListNodeChainConfigsRequest.filter:type_name -> api.node.v1.ListNodeChainConfigsRequest.Filter - 7, // 23: api.node.v1.ListNodeChainConfigsResponse.chain_configs:type_name -> api.node.v1.ChainConfig - 1, // 24: api.node.v1.ListNodesRequest.Filter.enabled:type_name -> api.node.v1.EnableState - 31, // 25: api.node.v1.ListNodesRequest.Filter.selectors:type_name -> api.label.Selector - 16, // 26: api.node.v1.NodeService.DisableNode:input_type -> api.node.v1.DisableNodeRequest - 18, // 27: api.node.v1.NodeService.EnableNode:input_type -> api.node.v1.EnableNodeRequest - 10, // 28: api.node.v1.NodeService.GetNode:input_type -> api.node.v1.GetNodeRequest - 12, // 29: api.node.v1.NodeService.ListNodes:input_type -> api.node.v1.ListNodesRequest - 20, // 30: api.node.v1.NodeService.ListNodeChainConfigs:input_type -> api.node.v1.ListNodeChainConfigsRequest - 8, // 31: api.node.v1.NodeService.RegisterNode:input_type -> api.node.v1.RegisterNodeRequest - 14, // 32: api.node.v1.NodeService.UpdateNode:input_type -> api.node.v1.UpdateNodeRequest - 17, // 33: api.node.v1.NodeService.DisableNode:output_type -> api.node.v1.DisableNodeResponse - 19, // 34: api.node.v1.NodeService.EnableNode:output_type -> api.node.v1.EnableNodeResponse - 11, // 35: api.node.v1.NodeService.GetNode:output_type -> api.node.v1.GetNodeResponse - 13, // 36: api.node.v1.NodeService.ListNodes:output_type -> api.node.v1.ListNodesResponse - 21, // 37: api.node.v1.NodeService.ListNodeChainConfigs:output_type -> api.node.v1.ListNodeChainConfigsResponse - 9, // 38: api.node.v1.NodeService.RegisterNode:output_type -> api.node.v1.RegisterNodeResponse - 15, // 39: api.node.v1.NodeService.UpdateNode:output_type -> api.node.v1.UpdateNodeResponse - 33, // [33:40] is the sub-list for method output_type - 26, // [26:33] is the sub-list for method input_type - 26, // [26:26] is the sub-list for extension type_name - 26, // [26:26] is the sub-list for extension extendee - 0, // [0:26] is the sub-list for field type_name -} - -func init() { file_node_v1_node_proto_init() } -func file_node_v1_node_proto_init() { - if File_node_v1_node_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_node_v1_node_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Node); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_node_v1_node_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Chain); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_node_v1_node_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FluxMonitorConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_node_v1_node_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OCR1Config); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_node_v1_node_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OCR2Config); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_node_v1_node_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChainConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_node_v1_node_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegisterNodeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_node_v1_node_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegisterNodeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_node_v1_node_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNodeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_node_v1_node_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNodeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_node_v1_node_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListNodesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_node_v1_node_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListNodesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_node_v1_node_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateNodeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_node_v1_node_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateNodeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_node_v1_node_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DisableNodeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_node_v1_node_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DisableNodeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_node_v1_node_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EnableNodeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_node_v1_node_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EnableNodeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_node_v1_node_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListNodeChainConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_node_v1_node_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListNodeChainConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_node_v1_node_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OCR1Config_P2PKeyBundle); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_node_v1_node_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OCR1Config_OCRKeyBundle); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_node_v1_node_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OCR2Config_P2PKeyBundle); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_node_v1_node_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OCR2Config_OCRKeyBundle); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_node_v1_node_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OCR2Config_Plugins); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_node_v1_node_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListNodesRequest_Filter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_node_v1_node_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListNodeChainConfigsRequest_Filter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_node_v1_node_proto_msgTypes[4].OneofWrappers = []interface{}{} - file_node_v1_node_proto_msgTypes[5].OneofWrappers = []interface{}{} - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_node_v1_node_proto_rawDesc, - NumEnums: 2, - NumMessages: 27, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_node_v1_node_proto_goTypes, - DependencyIndexes: file_node_v1_node_proto_depIdxs, - EnumInfos: file_node_v1_node_proto_enumTypes, - MessageInfos: file_node_v1_node_proto_msgTypes, - }.Build() - File_node_v1_node_proto = out.File - file_node_v1_node_proto_rawDesc = nil - file_node_v1_node_proto_goTypes = nil - file_node_v1_node_proto_depIdxs = nil -} \ No newline at end of file diff --git a/integration-tests/deployment/jd/node/v1/node_grpc.pb.go b/integration-tests/deployment/jd/node/v1/node_grpc.pb.go deleted file mode 100644 index 70010f3f0c..0000000000 --- a/integration-tests/deployment/jd/node/v1/node_grpc.pb.go +++ /dev/null @@ -1,343 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v4.25.3 -// source: node/v1/node.proto - -package v1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - NodeService_DisableNode_FullMethodName = "/api.node.v1.NodeService/DisableNode" - NodeService_EnableNode_FullMethodName = "/api.node.v1.NodeService/EnableNode" - NodeService_GetNode_FullMethodName = "/api.node.v1.NodeService/GetNode" - NodeService_ListNodes_FullMethodName = "/api.node.v1.NodeService/ListNodes" - NodeService_ListNodeChainConfigs_FullMethodName = "/api.node.v1.NodeService/ListNodeChainConfigs" - NodeService_RegisterNode_FullMethodName = "/api.node.v1.NodeService/RegisterNode" - NodeService_UpdateNode_FullMethodName = "/api.node.v1.NodeService/UpdateNode" -) - -// NodeServiceClient is the client API for NodeService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type NodeServiceClient interface { - // DisableNode marks a node as disabled, disabling any active operations on it. - DisableNode(ctx context.Context, in *DisableNodeRequest, opts ...grpc.CallOption) (*DisableNodeResponse, error) - // EnableNode enabled a disabled node, allowing operations to resume. - EnableNode(ctx context.Context, in *EnableNodeRequest, opts ...grpc.CallOption) (*EnableNodeResponse, error) - // GetNode retrieves the details of a node by its unique identifier. - GetNode(ctx context.Context, in *GetNodeRequest, opts ...grpc.CallOption) (*GetNodeResponse, error) - // ListNodes returns a list of nodes, optionally filtered by the provided criteria. - ListNodes(ctx context.Context, in *ListNodesRequest, opts ...grpc.CallOption) (*ListNodesResponse, error) - ListNodeChainConfigs(ctx context.Context, in *ListNodeChainConfigsRequest, opts ...grpc.CallOption) (*ListNodeChainConfigsResponse, error) - // RegisterNode registers a new node to the system. - RegisterNode(ctx context.Context, in *RegisterNodeRequest, opts ...grpc.CallOption) (*RegisterNodeResponse, error) - // UpdateNode updates the details of an existing node. - UpdateNode(ctx context.Context, in *UpdateNodeRequest, opts ...grpc.CallOption) (*UpdateNodeResponse, error) -} - -type nodeServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewNodeServiceClient(cc grpc.ClientConnInterface) NodeServiceClient { - return &nodeServiceClient{cc} -} - -func (c *nodeServiceClient) DisableNode(ctx context.Context, in *DisableNodeRequest, opts ...grpc.CallOption) (*DisableNodeResponse, error) { - out := new(DisableNodeResponse) - err := c.cc.Invoke(ctx, NodeService_DisableNode_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *nodeServiceClient) EnableNode(ctx context.Context, in *EnableNodeRequest, opts ...grpc.CallOption) (*EnableNodeResponse, error) { - out := new(EnableNodeResponse) - err := c.cc.Invoke(ctx, NodeService_EnableNode_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *nodeServiceClient) GetNode(ctx context.Context, in *GetNodeRequest, opts ...grpc.CallOption) (*GetNodeResponse, error) { - out := new(GetNodeResponse) - err := c.cc.Invoke(ctx, NodeService_GetNode_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *nodeServiceClient) ListNodes(ctx context.Context, in *ListNodesRequest, opts ...grpc.CallOption) (*ListNodesResponse, error) { - out := new(ListNodesResponse) - err := c.cc.Invoke(ctx, NodeService_ListNodes_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *nodeServiceClient) ListNodeChainConfigs(ctx context.Context, in *ListNodeChainConfigsRequest, opts ...grpc.CallOption) (*ListNodeChainConfigsResponse, error) { - out := new(ListNodeChainConfigsResponse) - err := c.cc.Invoke(ctx, NodeService_ListNodeChainConfigs_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *nodeServiceClient) RegisterNode(ctx context.Context, in *RegisterNodeRequest, opts ...grpc.CallOption) (*RegisterNodeResponse, error) { - out := new(RegisterNodeResponse) - err := c.cc.Invoke(ctx, NodeService_RegisterNode_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *nodeServiceClient) UpdateNode(ctx context.Context, in *UpdateNodeRequest, opts ...grpc.CallOption) (*UpdateNodeResponse, error) { - out := new(UpdateNodeResponse) - err := c.cc.Invoke(ctx, NodeService_UpdateNode_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// NodeServiceServer is the server API for NodeService service. -// All implementations must embed UnimplementedNodeServiceServer -// for forward compatibility -type NodeServiceServer interface { - // DisableNode marks a node as disabled, disabling any active operations on it. - DisableNode(context.Context, *DisableNodeRequest) (*DisableNodeResponse, error) - // EnableNode enabled a disabled node, allowing operations to resume. - EnableNode(context.Context, *EnableNodeRequest) (*EnableNodeResponse, error) - // GetNode retrieves the details of a node by its unique identifier. - GetNode(context.Context, *GetNodeRequest) (*GetNodeResponse, error) - // ListNodes returns a list of nodes, optionally filtered by the provided criteria. - ListNodes(context.Context, *ListNodesRequest) (*ListNodesResponse, error) - ListNodeChainConfigs(context.Context, *ListNodeChainConfigsRequest) (*ListNodeChainConfigsResponse, error) - // RegisterNode registers a new node to the system. - RegisterNode(context.Context, *RegisterNodeRequest) (*RegisterNodeResponse, error) - // UpdateNode updates the details of an existing node. - UpdateNode(context.Context, *UpdateNodeRequest) (*UpdateNodeResponse, error) - mustEmbedUnimplementedNodeServiceServer() -} - -// UnimplementedNodeServiceServer must be embedded to have forward compatible implementations. -type UnimplementedNodeServiceServer struct { -} - -func (UnimplementedNodeServiceServer) DisableNode(context.Context, *DisableNodeRequest) (*DisableNodeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DisableNode not implemented") -} -func (UnimplementedNodeServiceServer) EnableNode(context.Context, *EnableNodeRequest) (*EnableNodeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EnableNode not implemented") -} -func (UnimplementedNodeServiceServer) GetNode(context.Context, *GetNodeRequest) (*GetNodeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNode not implemented") -} -func (UnimplementedNodeServiceServer) ListNodes(context.Context, *ListNodesRequest) (*ListNodesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListNodes not implemented") -} -func (UnimplementedNodeServiceServer) ListNodeChainConfigs(context.Context, *ListNodeChainConfigsRequest) (*ListNodeChainConfigsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListNodeChainConfigs not implemented") -} -func (UnimplementedNodeServiceServer) RegisterNode(context.Context, *RegisterNodeRequest) (*RegisterNodeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RegisterNode not implemented") -} -func (UnimplementedNodeServiceServer) UpdateNode(context.Context, *UpdateNodeRequest) (*UpdateNodeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateNode not implemented") -} -func (UnimplementedNodeServiceServer) mustEmbedUnimplementedNodeServiceServer() {} - -// UnsafeNodeServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to NodeServiceServer will -// result in compilation errors. -type UnsafeNodeServiceServer interface { - mustEmbedUnimplementedNodeServiceServer() -} - -func RegisterNodeServiceServer(s grpc.ServiceRegistrar, srv NodeServiceServer) { - s.RegisterService(&NodeService_ServiceDesc, srv) -} - -func _NodeService_DisableNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DisableNodeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NodeServiceServer).DisableNode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: NodeService_DisableNode_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NodeServiceServer).DisableNode(ctx, req.(*DisableNodeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _NodeService_EnableNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EnableNodeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NodeServiceServer).EnableNode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: NodeService_EnableNode_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NodeServiceServer).EnableNode(ctx, req.(*EnableNodeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _NodeService_GetNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetNodeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NodeServiceServer).GetNode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: NodeService_GetNode_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NodeServiceServer).GetNode(ctx, req.(*GetNodeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _NodeService_ListNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListNodesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NodeServiceServer).ListNodes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: NodeService_ListNodes_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NodeServiceServer).ListNodes(ctx, req.(*ListNodesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _NodeService_ListNodeChainConfigs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListNodeChainConfigsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NodeServiceServer).ListNodeChainConfigs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: NodeService_ListNodeChainConfigs_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NodeServiceServer).ListNodeChainConfigs(ctx, req.(*ListNodeChainConfigsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _NodeService_RegisterNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RegisterNodeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NodeServiceServer).RegisterNode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: NodeService_RegisterNode_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NodeServiceServer).RegisterNode(ctx, req.(*RegisterNodeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _NodeService_UpdateNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateNodeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NodeServiceServer).UpdateNode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: NodeService_UpdateNode_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NodeServiceServer).UpdateNode(ctx, req.(*UpdateNodeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// NodeService_ServiceDesc is the grpc.ServiceDesc for NodeService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var NodeService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "api.node.v1.NodeService", - HandlerType: (*NodeServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "DisableNode", - Handler: _NodeService_DisableNode_Handler, - }, - { - MethodName: "EnableNode", - Handler: _NodeService_EnableNode_Handler, - }, - { - MethodName: "GetNode", - Handler: _NodeService_GetNode_Handler, - }, - { - MethodName: "ListNodes", - Handler: _NodeService_ListNodes_Handler, - }, - { - MethodName: "ListNodeChainConfigs", - Handler: _NodeService_ListNodeChainConfigs_Handler, - }, - { - MethodName: "RegisterNode", - Handler: _NodeService_RegisterNode_Handler, - }, - { - MethodName: "UpdateNode", - Handler: _NodeService_UpdateNode_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "node/v1/node.proto", -} \ No newline at end of file diff --git a/integration-tests/deployment/jd/shared/ptypes/label.pb.go b/integration-tests/deployment/jd/shared/ptypes/label.pb.go deleted file mode 100644 index ab8f0db54c..0000000000 --- a/integration-tests/deployment/jd/shared/ptypes/label.pb.go +++ /dev/null @@ -1,311 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.29.0 -// protoc v4.25.3 -// source: shared/ptypes/label.proto - -package ptypes - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// SelectorOp defines the operation to be used in a selector -type SelectorOp int32 - -const ( - SelectorOp_EQ SelectorOp = 0 - SelectorOp_NOT_EQ SelectorOp = 1 - SelectorOp_IN SelectorOp = 2 - SelectorOp_NOT_IN SelectorOp = 3 - SelectorOp_EXIST SelectorOp = 4 - SelectorOp_NOT_EXIST SelectorOp = 5 -) - -// Enum value maps for SelectorOp. -var ( - SelectorOp_name = map[int32]string{ - 0: "EQ", - 1: "NOT_EQ", - 2: "IN", - 3: "NOT_IN", - 4: "EXIST", - 5: "NOT_EXIST", - } - SelectorOp_value = map[string]int32{ - "EQ": 0, - "NOT_EQ": 1, - "IN": 2, - "NOT_IN": 3, - "EXIST": 4, - "NOT_EXIST": 5, - } -) - -func (x SelectorOp) Enum() *SelectorOp { - p := new(SelectorOp) - *p = x - return p -} - -func (x SelectorOp) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SelectorOp) Descriptor() protoreflect.EnumDescriptor { - return file_shared_ptypes_label_proto_enumTypes[0].Descriptor() -} - -func (SelectorOp) Type() protoreflect.EnumType { - return &file_shared_ptypes_label_proto_enumTypes[0] -} - -func (x SelectorOp) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SelectorOp.Descriptor instead. -func (SelectorOp) EnumDescriptor() ([]byte, []int) { - return file_shared_ptypes_label_proto_rawDescGZIP(), []int{0} -} - -// Label defines a label as a key value pair -type Label struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` -} - -func (x *Label) Reset() { - *x = Label{} - if protoimpl.UnsafeEnabled { - mi := &file_shared_ptypes_label_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Label) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Label) ProtoMessage() {} - -func (x *Label) ProtoReflect() protoreflect.Message { - mi := &file_shared_ptypes_label_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Label.ProtoReflect.Descriptor instead. -func (*Label) Descriptor() ([]byte, []int) { - return file_shared_ptypes_label_proto_rawDescGZIP(), []int{0} -} - -func (x *Label) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *Label) GetValue() string { - if x != nil && x.Value != nil { - return *x.Value - } - return "" -} - -// Selector defines a selector as a key value pair with an operation -type Selector struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Op SelectorOp `protobuf:"varint,2,opt,name=op,proto3,enum=api.label.SelectorOp" json:"op,omitempty"` - Value *string `protobuf:"bytes,3,opt,name=value,proto3,oneof" json:"value,omitempty"` -} - -func (x *Selector) Reset() { - *x = Selector{} - if protoimpl.UnsafeEnabled { - mi := &file_shared_ptypes_label_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Selector) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Selector) ProtoMessage() {} - -func (x *Selector) ProtoReflect() protoreflect.Message { - mi := &file_shared_ptypes_label_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Selector.ProtoReflect.Descriptor instead. -func (*Selector) Descriptor() ([]byte, []int) { - return file_shared_ptypes_label_proto_rawDescGZIP(), []int{1} -} - -func (x *Selector) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *Selector) GetOp() SelectorOp { - if x != nil { - return x.Op - } - return SelectorOp_EQ -} - -func (x *Selector) GetValue() string { - if x != nil && x.Value != nil { - return *x.Value - } - return "" -} - -var File_shared_ptypes_label_proto protoreflect.FileDescriptor - -var file_shared_ptypes_label_proto_rawDesc = []byte{ - 0x0a, 0x19, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2f, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, - 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x61, 0x70, 0x69, - 0x2e, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x3e, 0x0a, 0x05, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x68, 0x0a, 0x08, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x02, 0x6f, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x2e, 0x53, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4f, 0x70, 0x52, 0x02, 0x6f, 0x70, 0x12, 0x19, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x2a, 0x4e, 0x0a, 0x0a, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4f, 0x70, 0x12, 0x06, - 0x0a, 0x02, 0x45, 0x51, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x54, 0x5f, 0x45, 0x51, - 0x10, 0x01, 0x12, 0x06, 0x0a, 0x02, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, - 0x54, 0x5f, 0x49, 0x4e, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x58, 0x49, 0x53, 0x54, 0x10, - 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x54, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x10, 0x05, - 0x42, 0x47, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, - 0x6d, 0x61, 0x72, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6b, 0x69, 0x74, 0x2f, - 0x6a, 0x6f, 0x62, 0x2d, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x2f, - 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x73, 0x68, 0x61, 0x72, - 0x65, 0x64, 0x2f, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_shared_ptypes_label_proto_rawDescOnce sync.Once - file_shared_ptypes_label_proto_rawDescData = file_shared_ptypes_label_proto_rawDesc -) - -func file_shared_ptypes_label_proto_rawDescGZIP() []byte { - file_shared_ptypes_label_proto_rawDescOnce.Do(func() { - file_shared_ptypes_label_proto_rawDescData = protoimpl.X.CompressGZIP(file_shared_ptypes_label_proto_rawDescData) - }) - return file_shared_ptypes_label_proto_rawDescData -} - -var file_shared_ptypes_label_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_shared_ptypes_label_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_shared_ptypes_label_proto_goTypes = []interface{}{ - (SelectorOp)(0), // 0: api.label.SelectorOp - (*Label)(nil), // 1: api.label.Label - (*Selector)(nil), // 2: api.label.Selector -} -var file_shared_ptypes_label_proto_depIdxs = []int32{ - 0, // 0: api.label.Selector.op:type_name -> api.label.SelectorOp - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_shared_ptypes_label_proto_init() } -func file_shared_ptypes_label_proto_init() { - if File_shared_ptypes_label_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_shared_ptypes_label_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Label); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_shared_ptypes_label_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Selector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_shared_ptypes_label_proto_msgTypes[0].OneofWrappers = []interface{}{} - file_shared_ptypes_label_proto_msgTypes[1].OneofWrappers = []interface{}{} - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_shared_ptypes_label_proto_rawDesc, - NumEnums: 1, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_shared_ptypes_label_proto_goTypes, - DependencyIndexes: file_shared_ptypes_label_proto_depIdxs, - EnumInfos: file_shared_ptypes_label_proto_enumTypes, - MessageInfos: file_shared_ptypes_label_proto_msgTypes, - }.Build() - File_shared_ptypes_label_proto = out.File - file_shared_ptypes_label_proto_rawDesc = nil - file_shared_ptypes_label_proto_goTypes = nil - file_shared_ptypes_label_proto_depIdxs = nil -} \ No newline at end of file diff --git a/integration-tests/deployment/memory/chain.go b/integration-tests/deployment/memory/chain.go deleted file mode 100644 index 153d9d19e9..0000000000 --- a/integration-tests/deployment/memory/chain.go +++ /dev/null @@ -1,74 +0,0 @@ -package memory - -import ( - "math/big" - "testing" - "time" - - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/accounts/abi/bind/backends" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - gethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/params" - chainsel "github.com/smartcontractkit/chain-selectors" - "github.com/stretchr/testify/require" -) - -type EVMChain struct { - Backend *backends.SimulatedBackend - DeployerKey *bind.TransactOpts -} - -// CCIP relies on block timestamps, but SimulatedBackend uses by default clock starting from 1970-01-01 -// This trick is used to move the clock closer to the current time. We set first block to be X hours ago. -// Tests create plenty of transactions so this number can't be too low, every new block mined will tick the clock, -// if you mine more than "X hours" transactions, SimulatedBackend will panic because generated timestamps will be in the future. -func tweakChainTimestamp(t *testing.T, backend *backends.SimulatedBackend, tweak time.Duration) { - blockTime := time.Unix(int64(backend.Blockchain().CurrentHeader().Time), 0) - sinceBlockTime := time.Since(blockTime) - diff := sinceBlockTime - tweak - err := backend.AdjustTime(diff) - require.NoError(t, err, "unable to adjust time on simulated chain") - backend.Commit() - backend.Commit() -} - -func fundAddress(t *testing.T, from *bind.TransactOpts, to common.Address, amount *big.Int, backend *backends.SimulatedBackend) { - nonce, err := backend.PendingNonceAt(Context(t), from.From) - require.NoError(t, err) - gp, err := backend.SuggestGasPrice(Context(t)) - require.NoError(t, err) - rawTx := gethtypes.NewTx(&gethtypes.LegacyTx{ - Nonce: nonce, - GasPrice: gp, - Gas: 21000, - To: &to, - Value: amount, - }) - signedTx, err := from.Signer(from.From, rawTx) - require.NoError(t, err) - err = backend.SendTransaction(Context(t), signedTx) - require.NoError(t, err) - backend.Commit() -} - -func GenerateChains(t *testing.T, numChains int) map[uint64]EVMChain { - chains := make(map[uint64]EVMChain) - for i := 0; i < numChains; i++ { - chainID := chainsel.TEST_90000001.EvmChainID + uint64(i) - key, err := crypto.GenerateKey() - require.NoError(t, err) - owner, err := bind.NewKeyedTransactorWithChainID(key, big.NewInt(1337)) - require.NoError(t, err) - backend := backends.NewSimulatedBackend(core.GenesisAlloc{ - owner.From: {Balance: big.NewInt(0).Mul(big.NewInt(100), big.NewInt(params.Ether))}}, 10000000) - tweakChainTimestamp(t, backend, time.Hour*8) - chains[chainID] = EVMChain{ - Backend: backend, - DeployerKey: owner, - } - } - return chains -} diff --git a/integration-tests/deployment/memory/environment.go b/integration-tests/deployment/memory/environment.go deleted file mode 100644 index 409e8d3a81..0000000000 --- a/integration-tests/deployment/memory/environment.go +++ /dev/null @@ -1,147 +0,0 @@ -package memory - -import ( - "context" - "fmt" - "testing" - - "github.com/ethereum/go-ethereum/accounts/abi/bind/backends" - "github.com/ethereum/go-ethereum/core/types" - "github.com/hashicorp/consul/sdk/freeport" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zapcore" - - chainsel "github.com/smartcontractkit/chain-selectors" - - "github.com/smartcontractkit/chainlink/integration-tests/deployment" - - "github.com/smartcontractkit/chainlink-common/pkg/logger" -) - -const ( - Memory = "memory" -) - -type MemoryEnvironmentConfig struct { - Chains int - Nodes int - Bootstraps int - RegistryConfig deployment.CapabilityRegistryConfig -} - -// Needed for environment variables on the node which point to prexisitng addresses. -// i.e. CapReg. -func NewMemoryChains(t *testing.T, numChains int) map[uint64]deployment.Chain { - mchains := GenerateChains(t, numChains) - chains := make(map[uint64]deployment.Chain) - for cid, chain := range mchains { - sel, err := chainsel.SelectorFromChainId(cid) - require.NoError(t, err) - chains[sel] = deployment.Chain{ - Selector: sel, - Client: chain.Backend, - DeployerKey: chain.DeployerKey, - Confirm: func(tx *types.Transaction) (uint64, error) { - if tx == nil { - return 0, fmt.Errorf("tx was nil, nothing to confirm") - } - for { - chain.Backend.Commit() - receipt, err := chain.Backend.TransactionReceipt(context.Background(), tx.Hash()) - if err != nil { - t.Log("failed to get receipt", err) - continue - } - if receipt.Status == 0 { - t.Logf("Status (reverted) %d for txhash %s\n", receipt.Status, tx.Hash().Hex()) - } - return receipt.BlockNumber.Uint64(), nil - } - }, - } - } - return chains -} - -func NewNodes(t *testing.T, logLevel zapcore.Level, chains map[uint64]deployment.Chain, numNodes, numBootstraps int, registryConfig deployment.CapabilityRegistryConfig) map[string]Node { - mchains := make(map[uint64]EVMChain) - for _, chain := range chains { - evmChainID, err := chainsel.ChainIdFromSelector(chain.Selector) - if err != nil { - t.Fatal(err) - } - mchains[evmChainID] = EVMChain{ - Backend: chain.Client.(*backends.SimulatedBackend), - DeployerKey: chain.DeployerKey, - } - } - nodesByPeerID := make(map[string]Node) - ports := freeport.GetN(t, numBootstraps+numNodes) - // bootstrap nodes must be separate nodes from plugin nodes, - // since we won't run a bootstrapper and a plugin oracle on the same - // chainlink node in production. - for i := 0; i < numBootstraps; i++ { - node := NewNode(t, ports[i], mchains, logLevel, true /* bootstrap */, registryConfig) - nodesByPeerID[node.Keys.PeerID.String()] = *node - // Note in real env, this ID is allocated by JD. - } - for i := 0; i < numNodes; i++ { - // grab port offset by numBootstraps, since above loop also takes some ports. - node := NewNode(t, ports[numBootstraps+i], mchains, logLevel, false /* bootstrap */, registryConfig) - nodesByPeerID[node.Keys.PeerID.String()] = *node - // Note in real env, this ID is allocated by JD. - } - return nodesByPeerID -} - -func NewMemoryEnvironmentFromChainsNodes(t *testing.T, - lggr logger.Logger, - chains map[uint64]deployment.Chain, - nodes map[string]Node) deployment.Environment { - var nodeIDs []string - for id := range nodes { - nodeIDs = append(nodeIDs, id) - } - return deployment.Environment{ - Name: Memory, - Offchain: NewMemoryJobClient(nodes), - // Note these have the p2p_ prefix. - NodeIDs: nodeIDs, - Chains: chains, - Logger: lggr, - } -} - -//func NewMemoryEnvironmentExistingChains(t *testing.T, lggr logger.Logger, -// chains map[uint64]deployment.Chain, config MemoryEnvironmentConfig) deployment.Environment { -// nodes := NewNodes(t, chains, config.Nodes, config.Bootstraps, config.CapabilityRegistryConfig) -// var nodeIDs []string -// for id := range nodes { -// nodeIDs = append(nodeIDs, id) -// } -// return deployment.Environment{ -// Name: Memory, -// Offchain: NewMemoryJobClient(nodes), -// // Note these have the p2p_ prefix. -// NodeIDs: nodeIDs, -// Chains: chains, -// Logger: lggr, -// } -//} - -// To be used by tests and any kind of deployment logic. -func NewMemoryEnvironment(t *testing.T, lggr logger.Logger, logLevel zapcore.Level, config MemoryEnvironmentConfig) deployment.Environment { - chains := NewMemoryChains(t, config.Chains) - nodes := NewNodes(t, logLevel, chains, config.Nodes, config.Bootstraps, config.RegistryConfig) - var nodeIDs []string - for id := range nodes { - nodeIDs = append(nodeIDs, id) - } - return deployment.Environment{ - Name: Memory, - Offchain: NewMemoryJobClient(nodes), - NodeIDs: nodeIDs, - Chains: chains, - Logger: lggr, - } -} diff --git a/integration-tests/deployment/memory/job_client.go b/integration-tests/deployment/memory/job_client.go deleted file mode 100644 index 25fec711d8..0000000000 --- a/integration-tests/deployment/memory/job_client.go +++ /dev/null @@ -1,161 +0,0 @@ -package memory - -import ( - "context" - "strconv" - - "github.com/ethereum/go-ethereum/common" - "google.golang.org/grpc" - - csav1 "github.com/smartcontractkit/chainlink/integration-tests/deployment/jd/csa/v1" - jobv1 "github.com/smartcontractkit/chainlink/integration-tests/deployment/jd/job/v1" - nodev1 "github.com/smartcontractkit/chainlink/integration-tests/deployment/jd/node/v1" - "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/validate" -) - -type JobClient struct { - Nodes map[string]Node -} - -func (j JobClient) UpdateJob(ctx context.Context, in *jobv1.UpdateJobRequest, opts ...grpc.CallOption) (*jobv1.UpdateJobResponse, error) { - //TODO CCIP-3108 implement me - panic("implement me") -} - -func (j JobClient) DisableNode(ctx context.Context, in *nodev1.DisableNodeRequest, opts ...grpc.CallOption) (*nodev1.DisableNodeResponse, error) { - //TODO CCIP-3108 implement me - panic("implement me") -} - -func (j JobClient) EnableNode(ctx context.Context, in *nodev1.EnableNodeRequest, opts ...grpc.CallOption) (*nodev1.EnableNodeResponse, error) { - //TODO CCIP-3108 implement me - panic("implement me") -} - -func (j JobClient) RegisterNode(ctx context.Context, in *nodev1.RegisterNodeRequest, opts ...grpc.CallOption) (*nodev1.RegisterNodeResponse, error) { - //TODO implement me - panic("implement me") -} - -func (j JobClient) UpdateNode(ctx context.Context, in *nodev1.UpdateNodeRequest, opts ...grpc.CallOption) (*nodev1.UpdateNodeResponse, error) { - //TODO CCIP-3108 implement me - panic("implement me") -} - -func (j JobClient) GetKeypair(ctx context.Context, in *csav1.GetKeypairRequest, opts ...grpc.CallOption) (*csav1.GetKeypairResponse, error) { - //TODO implement me - panic("implement me") -} - -func (j JobClient) ListKeypairs(ctx context.Context, in *csav1.ListKeypairsRequest, opts ...grpc.CallOption) (*csav1.ListKeypairsResponse, error) { - //TODO CCIP-3108 implement me - panic("implement me") -} - -func (j JobClient) GetNode(ctx context.Context, in *nodev1.GetNodeRequest, opts ...grpc.CallOption) (*nodev1.GetNodeResponse, error) { - //TODO CCIP-3108 implement me - panic("implement me") -} - -func (j JobClient) ListNodes(ctx context.Context, in *nodev1.ListNodesRequest, opts ...grpc.CallOption) (*nodev1.ListNodesResponse, error) { - //TODO CCIP-3108 implement me - panic("implement me") -} - -func (j JobClient) ListNodeChainConfigs(ctx context.Context, in *nodev1.ListNodeChainConfigsRequest, opts ...grpc.CallOption) (*nodev1.ListNodeChainConfigsResponse, error) { - n := j.Nodes[in.Filter.NodeIds[0]] - offpk := n.Keys.OCRKeyBundle.OffchainPublicKey() - cpk := n.Keys.OCRKeyBundle.ConfigEncryptionPublicKey() - var chainConfigs []*nodev1.ChainConfig - for evmChainID, transmitter := range n.Keys.TransmittersByEVMChainID { - chainConfigs = append(chainConfigs, &nodev1.ChainConfig{ - Chain: &nodev1.Chain{ - Id: strconv.Itoa(int(evmChainID)), - Type: nodev1.ChainType_CHAIN_TYPE_EVM, - }, - AccountAddress: transmitter.String(), - AdminAddress: "", - Ocr1Config: nil, - Ocr2Config: &nodev1.OCR2Config{ - Enabled: true, - IsBootstrap: n.IsBoostrap, - P2PKeyBundle: &nodev1.OCR2Config_P2PKeyBundle{ - PeerId: n.Keys.PeerID.String(), - }, - OcrKeyBundle: &nodev1.OCR2Config_OCRKeyBundle{ - BundleId: n.Keys.OCRKeyBundle.ID(), - ConfigPublicKey: common.Bytes2Hex(cpk[:]), - OffchainPublicKey: common.Bytes2Hex(offpk[:]), - OnchainSigningAddress: n.Keys.OCRKeyBundle.OnChainPublicKey(), - }, - Multiaddr: n.Addr.String(), - Plugins: nil, - ForwarderAddress: ptr(""), - }, - }) - } - - // TODO: I think we can pull it from the feeds manager. - return &nodev1.ListNodeChainConfigsResponse{ - ChainConfigs: chainConfigs, - }, nil -} - -func (j JobClient) GetJob(ctx context.Context, in *jobv1.GetJobRequest, opts ...grpc.CallOption) (*jobv1.GetJobResponse, error) { - //TODO CCIP-3108 implement me - panic("implement me") -} - -func (j JobClient) GetProposal(ctx context.Context, in *jobv1.GetProposalRequest, opts ...grpc.CallOption) (*jobv1.GetProposalResponse, error) { - //TODO CCIP-3108 implement me - panic("implement me") -} - -func (j JobClient) ListJobs(ctx context.Context, in *jobv1.ListJobsRequest, opts ...grpc.CallOption) (*jobv1.ListJobsResponse, error) { - //TODO CCIP-3108 implement me - panic("implement me") -} - -func (j JobClient) ListProposals(ctx context.Context, in *jobv1.ListProposalsRequest, opts ...grpc.CallOption) (*jobv1.ListProposalsResponse, error) { - //TODO CCIP-3108 implement me - panic("implement me") -} - -func (j JobClient) ProposeJob(ctx context.Context, in *jobv1.ProposeJobRequest, opts ...grpc.CallOption) (*jobv1.ProposeJobResponse, error) { - n := j.Nodes[in.NodeId] - // TODO: Use FMS - jb, err := validate.ValidatedCCIPSpec(in.Spec) - if err != nil { - return nil, err - } - err = n.App.AddJobV2(ctx, &jb) - if err != nil { - return nil, err - } - return &jobv1.ProposeJobResponse{Proposal: &jobv1.Proposal{ - Id: "", - // Auto approve for now - Status: jobv1.ProposalStatus_PROPOSAL_STATUS_APPROVED, - DeliveryStatus: jobv1.ProposalDeliveryStatus_PROPOSAL_DELIVERY_STATUS_DELIVERED, - Spec: in.Spec, - JobId: jb.ExternalJobID.String(), - CreatedAt: nil, - UpdatedAt: nil, - AckedAt: nil, - ResponseReceivedAt: nil, - }}, nil -} - -func (j JobClient) RevokeJob(ctx context.Context, in *jobv1.RevokeJobRequest, opts ...grpc.CallOption) (*jobv1.RevokeJobResponse, error) { - //TODO CCIP-3108 implement me - panic("implement me") -} - -func (j JobClient) DeleteJob(ctx context.Context, in *jobv1.DeleteJobRequest, opts ...grpc.CallOption) (*jobv1.DeleteJobResponse, error) { - //TODO CCIP-3108 implement me - panic("implement me") -} - -func NewMemoryJobClient(nodesByPeerID map[string]Node) *JobClient { - return &JobClient{nodesByPeerID} -} diff --git a/integration-tests/deployment/memory/node.go b/integration-tests/deployment/memory/node.go deleted file mode 100644 index 1befa38dc6..0000000000 --- a/integration-tests/deployment/memory/node.go +++ /dev/null @@ -1,291 +0,0 @@ -package memory - -import ( - "context" - "fmt" - "math/big" - "net" - "net/http" - "strconv" - "testing" - "time" - - "github.com/ethereum/go-ethereum/common" - gethtypes "github.com/ethereum/go-ethereum/core/types" - chainsel "github.com/smartcontractkit/chain-selectors" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zapcore" - - coretypes "github.com/smartcontractkit/chainlink-common/pkg/types/core/mocks" - - "github.com/smartcontractkit/chainlink-common/pkg/config" - "github.com/smartcontractkit/chainlink-common/pkg/loop" - "github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox" - - "github.com/smartcontractkit/chainlink/integration-tests/deployment" - "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" - "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" - v2toml "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" - evmutils "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" - "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm" - configv2 "github.com/smartcontractkit/chainlink/v2/core/config/toml" - "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink/v2/core/logger/audit" - "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/chaintype" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocr2key" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" - "github.com/smartcontractkit/chainlink/v2/core/utils" - "github.com/smartcontractkit/chainlink/v2/core/utils/testutils/heavyweight" - "github.com/smartcontractkit/chainlink/v2/plugins" -) - -func Context(tb testing.TB) context.Context { - ctx := context.Background() - var cancel func() - switch t := tb.(type) { - case *testing.T: - if d, ok := t.Deadline(); ok { - ctx, cancel = context.WithDeadline(ctx, d) - } - } - if cancel == nil { - ctx, cancel = context.WithCancel(ctx) - } - tb.Cleanup(cancel) - return ctx -} - -type Node struct { - App chainlink.Application - // Transmitter key/OCR keys for this node - Keys Keys - Addr net.TCPAddr - IsBoostrap bool -} - -func (n Node) ReplayLogs(chains map[uint64]uint64) error { - for sel, block := range chains { - chainID, _ := chainsel.ChainIdFromSelector(sel) - if err := n.App.ReplayFromBlock(big.NewInt(int64(chainID)), block, false); err != nil { - return err - } - } - return nil -} - -// Creates a CL node which is: -// - Configured for OCR -// - Configured for the chains specified -// - Transmitter keys funded. -func NewNode( - t *testing.T, - port int, // Port for the P2P V2 listener. - chains map[uint64]EVMChain, - logLevel zapcore.Level, - bootstrap bool, - registryConfig deployment.CapabilityRegistryConfig, -) *Node { - // Do not want to load fixtures as they contain a dummy chainID. - // Create database and initial configuration. - cfg, db := heavyweight.FullTestDBNoFixturesV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { - c.Insecure.OCRDevelopmentMode = ptr(true) // Disables ocr spec validation so we can have fast polling for the test. - - c.Feature.LogPoller = ptr(true) - - // P2P V2 configs. - c.P2P.V2.Enabled = ptr(true) - c.P2P.V2.DeltaDial = config.MustNewDuration(500 * time.Millisecond) - c.P2P.V2.DeltaReconcile = config.MustNewDuration(5 * time.Second) - c.P2P.V2.ListenAddresses = &[]string{fmt.Sprintf("127.0.0.1:%d", port)} - - // Enable Capabilities, This is a pre-requisite for registrySyncer to work. - if registryConfig.Contract != common.HexToAddress("0x0") { - c.Capabilities.ExternalRegistry.NetworkID = ptr(relay.NetworkEVM) - c.Capabilities.ExternalRegistry.ChainID = ptr(strconv.FormatUint(uint64(registryConfig.EVMChainID), 10)) - c.Capabilities.ExternalRegistry.Address = ptr(registryConfig.Contract.String()) - } - - // OCR configs - c.OCR.Enabled = ptr(false) - c.OCR.DefaultTransactionQueueDepth = ptr(uint32(200)) - c.OCR2.Enabled = ptr(true) - c.OCR2.ContractPollInterval = config.MustNewDuration(5 * time.Second) - - c.Log.Level = ptr(configv2.LogLevel(logLevel)) - - var chainConfigs v2toml.EVMConfigs - for chainID := range chains { - chainConfigs = append(chainConfigs, createConfigV2Chain(chainID)) - } - c.EVM = chainConfigs - }) - - // Set logging. - lggr := logger.TestLogger(t) - lggr.SetLogLevel(logLevel) - - // Create clients for the core node backed by sim. - clients := make(map[uint64]client.Client) - for chainID, chain := range chains { - clients[chainID] = client.NewSimulatedBackendClient(t, chain.Backend, big.NewInt(int64(chainID))) - } - - // Create keystore - master := keystore.New(db, utils.FastScryptParams, lggr) - kStore := KeystoreSim{ - eks: &EthKeystoreSim{ - Eth: master.Eth(), - }, - csa: master.CSA(), - } - - // Build evm factory using clients + keystore. - mailMon := mailbox.NewMonitor("node", lggr.Named("mailbox")) - evmOpts := chainlink.EVMFactoryConfig{ - ChainOpts: legacyevm.ChainOpts{ - AppConfig: cfg, - GenEthClient: func(i *big.Int) client.Client { - ethClient, ok := clients[i.Uint64()] - if !ok { - t.Fatal("no backend for chainID", i) - } - return ethClient - }, - MailMon: mailMon, - DS: db, - }, - CSAETHKeystore: kStore, - } - - // Build relayer factory with EVM. - relayerFactory := chainlink.RelayerFactory{ - Logger: lggr, - LoopRegistry: plugins.NewLoopRegistry(lggr.Named("LoopRegistry"), cfg.Tracing(), cfg.Telemetry()), - GRPCOpts: loop.GRPCOpts{}, - CapabilitiesRegistry: coretypes.NewCapabilitiesRegistry(t), - } - initOps := []chainlink.CoreRelayerChainInitFunc{chainlink.InitEVM(context.Background(), relayerFactory, evmOpts)} - rci, err := chainlink.NewCoreRelayerChainInteroperators(initOps...) - require.NoError(t, err) - - app, err := chainlink.NewApplication(chainlink.ApplicationOpts{ - Config: cfg, - DS: db, - KeyStore: master, - RelayerChainInteroperators: rci, - Logger: lggr, - ExternalInitiatorManager: nil, - CloseLogger: lggr.Sync, - UnrestrictedHTTPClient: &http.Client{}, - RestrictedHTTPClient: &http.Client{}, - AuditLogger: audit.NoopLogger, - MailMon: mailMon, - LoopRegistry: plugins.NewLoopRegistry(lggr, cfg.Tracing(), cfg.Telemetry()), - }) - require.NoError(t, err) - t.Cleanup(func() { - require.NoError(t, db.Close()) - }) - keys := CreateKeys(t, app, chains) - - return &Node{ - App: app, - Keys: keys, - Addr: net.TCPAddr{IP: net.ParseIP("127.0.0.1"), Port: port}, - IsBoostrap: bootstrap, - } -} - -type Keys struct { - PeerID p2pkey.PeerID - TransmittersByEVMChainID map[uint64]common.Address - OCRKeyBundle ocr2key.KeyBundle -} - -func CreateKeys(t *testing.T, - app chainlink.Application, chains map[uint64]EVMChain) Keys { - ctx := Context(t) - require.NoError(t, app.GetKeyStore().Unlock(ctx, "password")) - _, err := app.GetKeyStore().P2P().Create(ctx) - require.NoError(t, err) - - p2pIDs, err := app.GetKeyStore().P2P().GetAll() - require.NoError(t, err) - require.Len(t, p2pIDs, 1) - peerID := p2pIDs[0].PeerID() - // create a transmitter for each chain - transmitters := make(map[uint64]common.Address) - for chainID, chain := range chains { - cid := big.NewInt(int64(chainID)) - addrs, err2 := app.GetKeyStore().Eth().EnabledAddressesForChain(Context(t), cid) - require.NoError(t, err2) - if len(addrs) == 1 { - // just fund the address - fundAddress(t, chain.DeployerKey, addrs[0], assets.Ether(10).ToInt(), chain.Backend) - transmitters[chainID] = addrs[0] - } else { - // create key and fund it - _, err3 := app.GetKeyStore().Eth().Create(Context(t), cid) - require.NoError(t, err3, "failed to create key for chain", chainID) - sendingKeys, err3 := app.GetKeyStore().Eth().EnabledAddressesForChain(Context(t), cid) - require.NoError(t, err3) - require.Len(t, sendingKeys, 1) - fundAddress(t, chain.DeployerKey, sendingKeys[0], assets.Ether(10).ToInt(), chain.Backend) - transmitters[chainID] = sendingKeys[0] - } - } - require.Len(t, transmitters, len(chains)) - - keybundle, err := app.GetKeyStore().OCR2().Create(ctx, chaintype.EVM) - require.NoError(t, err) - return Keys{ - PeerID: peerID, - TransmittersByEVMChainID: transmitters, - OCRKeyBundle: keybundle, - } -} - -func createConfigV2Chain(chainID uint64) *v2toml.EVMConfig { - chainIDBig := evmutils.NewI(int64(chainID)) - chain := v2toml.Defaults(chainIDBig) - chain.GasEstimator.LimitDefault = ptr(uint64(5e6)) - chain.LogPollInterval = config.MustNewDuration(500 * time.Millisecond) - chain.Transactions.ForwardersEnabled = ptr(false) - chain.FinalityDepth = ptr(uint32(2)) - return &v2toml.EVMConfig{ - ChainID: chainIDBig, - Enabled: ptr(true), - Chain: chain, - Nodes: v2toml.EVMNodes{&v2toml.Node{}}, - } -} - -func ptr[T any](v T) *T { return &v } - -var _ keystore.Eth = &EthKeystoreSim{} - -type EthKeystoreSim struct { - keystore.Eth -} - -// override -func (e *EthKeystoreSim) SignTx(ctx context.Context, address common.Address, tx *gethtypes.Transaction, chainID *big.Int) (*gethtypes.Transaction, error) { - // always sign with chain id 1337 for the simulated backend - return e.Eth.SignTx(ctx, address, tx, big.NewInt(1337)) -} - -type KeystoreSim struct { - eks keystore.Eth - csa keystore.CSA -} - -func (e KeystoreSim) Eth() keystore.Eth { - return e.eks -} - -func (e KeystoreSim) CSA() keystore.CSA { - return e.csa -} diff --git a/integration-tests/deployment/memory/node_test.go b/integration-tests/deployment/memory/node_test.go deleted file mode 100644 index 4a791bfc1f..0000000000 --- a/integration-tests/deployment/memory/node_test.go +++ /dev/null @@ -1,25 +0,0 @@ -package memory - -import ( - "testing" - - "github.com/hashicorp/consul/sdk/freeport" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zapcore" - - "github.com/smartcontractkit/chainlink/integration-tests/deployment" -) - -func TestNode(t *testing.T) { - chains := GenerateChains(t, 3) - ports := freeport.GetN(t, 1) - node := NewNode(t, ports[0], chains, zapcore.DebugLevel, false, deployment.CapabilityRegistryConfig{}) - // We expect 3 transmitter keys - keys, err := node.App.GetKeyStore().Eth().GetAll(Context(t)) - require.NoError(t, err) - require.Len(t, keys, 3) - // We expect 3 chains supported - evmChains := node.App.GetRelayers().LegacyEVMChains().Slice() - require.NoError(t, err) - require.Len(t, evmChains, 3) -} diff --git a/integration-tests/deployment/multiclient.go b/integration-tests/deployment/multiclient.go deleted file mode 100644 index 02a18f760d..0000000000 --- a/integration-tests/deployment/multiclient.go +++ /dev/null @@ -1,124 +0,0 @@ -package deployment - -import ( - "context" - "fmt" - "math/big" - "time" - - "github.com/avast/retry-go/v4" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/ethclient" - "github.com/pkg/errors" -) - -const ( - RPC_DEFAULT_RETRY_ATTEMPTS = 10 - RPC_DEFAULT_RETRY_DELAY = 1000 * time.Millisecond -) - -type RetryConfig struct { - Attempts uint - Delay time.Duration -} - -func defaultRetryConfig() RetryConfig { - return RetryConfig{ - Attempts: RPC_DEFAULT_RETRY_ATTEMPTS, - Delay: RPC_DEFAULT_RETRY_DELAY, - } -} - -type RPC struct { - WSURL string - // TODO: http fallback needed for some networks? -} - -// MultiClient should comply with the OnchainClient interface -var _ OnchainClient = &MultiClient{} - -type MultiClient struct { - *ethclient.Client - Backups []*ethclient.Client - RetryConfig RetryConfig -} - -func NewMultiClient(rpcs []RPC, opts ...func(client *MultiClient)) (*MultiClient, error) { - if len(rpcs) == 0 { - return nil, fmt.Errorf("No RPCs provided, need at least one") - } - var mc MultiClient - clients := make([]*ethclient.Client, 0, len(rpcs)) - for _, rpc := range rpcs { - client, err := ethclient.Dial(rpc.WSURL) - if err != nil { - return nil, errors.Wrapf(err, "failed to dial %s", rpc.WSURL) - } - clients = append(clients, client) - } - mc.Client = clients[0] - mc.Backups = clients[1:] - mc.RetryConfig = defaultRetryConfig() - - for _, opt := range opts { - opt(&mc) - } - return &mc, nil -} - -func (mc *MultiClient) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error) { - var receipt *types.Receipt - err := mc.retryWithBackups(func(client *ethclient.Client) error { - var err error - receipt, err = client.TransactionReceipt(ctx, txHash) - return err - }) - return receipt, err -} - -func (mc *MultiClient) SendTransaction(ctx context.Context, tx *types.Transaction) error { - return mc.retryWithBackups(func(client *ethclient.Client) error { - return client.SendTransaction(ctx, tx) - }) -} - -func (mc *MultiClient) CodeAt(ctx context.Context, account common.Address, blockNumber *big.Int) ([]byte, error) { - var code []byte - err := mc.retryWithBackups(func(client *ethclient.Client) error { - var err error - code, err = client.CodeAt(ctx, account, blockNumber) - return err - }) - return code, err -} - -func (mc *MultiClient) NonceAt(ctx context.Context, account common.Address) (uint64, error) { - var count uint64 - err := mc.retryWithBackups(func(client *ethclient.Client) error { - var err error - count, err = client.NonceAt(ctx, account, nil) - return err - }) - return count, err -} - -func (mc *MultiClient) retryWithBackups(op func(*ethclient.Client) error) error { - var err error - for _, client := range append([]*ethclient.Client{mc.Client}, mc.Backups...) { - err2 := retry.Do(func() error { - err = op(client) - if err != nil { - // TODO: logger? - fmt.Printf("Error %v with client %v\n", err, client) - return err - } - return nil - }, retry.Attempts(mc.RetryConfig.Attempts), retry.Delay(mc.RetryConfig.Delay)) - if err2 == nil { - return nil - } - fmt.Printf("Client %v failed, trying next client\n", client) - } - return errors.Wrapf(err, "All backup clients %v failed", mc.Backups) -} diff --git a/integration-tests/deployment/multiclient_test.go b/integration-tests/deployment/multiclient_test.go deleted file mode 100644 index a3176691c0..0000000000 --- a/integration-tests/deployment/multiclient_test.go +++ /dev/null @@ -1,36 +0,0 @@ -package deployment - -import ( - "net/http" - "net/http/httptest" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestMultiClient(t *testing.T) { - // Expect an error if no RPCs supplied. - s := httptest.NewServer(http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) { - writer.WriteHeader(http.StatusOK) - _, err := writer.Write([]byte(`{"jsonrpc":"2.0","id":1,"result":true}`)) - require.NoError(t, err) - })) - defer s.Close() - _, err := NewMultiClient([]RPC{}) - require.Error(t, err) - - // Expect defaults to be set if not provided. - mc, err := NewMultiClient([]RPC{{WSURL: s.URL}}) - require.NoError(t, err) - assert.Equal(t, mc.RetryConfig.Attempts, uint(RPC_DEFAULT_RETRY_ATTEMPTS)) - assert.Equal(t, mc.RetryConfig.Delay, RPC_DEFAULT_RETRY_DELAY) - - // Expect second client to be set as backup. - mc, err = NewMultiClient([]RPC{ - {WSURL: s.URL}, - {WSURL: s.URL}, - }) - require.NoError(t, err) - require.Equal(t, len(mc.Backups), 1) -} diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 3a8dcf4cc7..c40ac63013 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -6,11 +6,11 @@ go 1.22.5 replace github.com/smartcontractkit/chainlink/v2 => ../ require ( + dario.cat/mergo v1.0.1 github.com/AlekSi/pointer v1.1.0 github.com/Khan/genqlient v0.7.0 github.com/Masterminds/semver/v3 v3.2.1 github.com/avast/retry-go/v4 v4.6.0 - github.com/aws/aws-sdk-go v1.45.25 github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df github.com/chaos-mesh/chaos-mesh/api v0.0.0-20240821051457-da69c6d9617a github.com/cli/go-gh/v2 v2.0.0 @@ -19,8 +19,6 @@ require ( github.com/go-resty/resty/v2 v2.11.0 github.com/google/go-cmp v0.6.0 github.com/google/uuid v1.6.0 - github.com/hashicorp/consul/sdk v0.16.0 - github.com/hashicorp/go-multierror v1.1.1 github.com/jmoiron/sqlx v1.4.0 github.com/lib/pq v1.10.9 github.com/manifoldco/promptui v0.9.0 @@ -32,13 +30,10 @@ require ( github.com/rs/zerolog v1.33.0 github.com/scylladb/go-reflectx v1.0.1 github.com/segmentio/ksuid v1.0.4 - github.com/sethvargo/go-retry v0.2.4 github.com/shopspring/decimal v1.4.0 github.com/slack-go/slack v0.12.2 - github.com/smartcontractkit/ccip-owner-contracts v0.0.0-20240919155713-f4bf4ae0b9c6 github.com/smartcontractkit/chain-selectors v1.0.27 github.com/smartcontractkit/chainlink-automation v1.0.4 - github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924115754-8858b0423283 github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925085218-aded1b263ecc github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.0 github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.9 @@ -49,7 +44,6 @@ require ( github.com/smartcontractkit/libocr v0.0.0-20240717100443-f6226e09bee7 github.com/spf13/cobra v1.8.1 github.com/stretchr/testify v1.9.0 - github.com/subosito/gotenv v1.6.0 github.com/test-go/testify v1.1.4 github.com/testcontainers/testcontainers-go v0.28.0 github.com/umbracle/ethgo v0.1.3 @@ -60,11 +54,7 @@ require ( golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 golang.org/x/sync v0.8.0 golang.org/x/text v0.18.0 - google.golang.org/grpc v1.65.0 - google.golang.org/protobuf v1.34.2 gopkg.in/guregu/null.v4 v4.0.0 - gopkg.in/yaml.v2 v2.4.0 - gotest.tools/v3 v3.5.1 k8s.io/apimachinery v0.31.0 ) @@ -78,7 +68,6 @@ require ( cosmossdk.io/depinject v1.0.0-alpha.4 // indirect cosmossdk.io/errors v1.0.1 // indirect cosmossdk.io/math v1.3.0 // indirect - dario.cat/mergo v1.0.1 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect @@ -109,6 +98,7 @@ require ( github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/avast/retry-go v3.0.0+incompatible // indirect github.com/awalterschulze/gographviz v2.0.3+incompatible // indirect + github.com/aws/aws-sdk-go v1.45.25 // indirect github.com/aws/aws-sdk-go-v2 v1.30.4 // indirect github.com/aws/aws-sdk-go-v2/config v1.27.28 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.17.28 // indirect @@ -281,12 +271,14 @@ require ( github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect github.com/hashicorp/consul/api v1.28.2 // indirect + github.com/hashicorp/consul/sdk v0.16.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-envparse v0.1.0 // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-msgpack v0.5.5 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-plugin v1.6.2-0.20240829161738-06afb6d7ae99 // indirect github.com/hashicorp/go-retryablehttp v0.7.5 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect @@ -425,6 +417,7 @@ require ( github.com/status-im/keycard-go v0.2.0 // indirect github.com/streamingfast/logging v0.0.0-20220405224725-2755dab2ce75 // indirect github.com/stretchr/objx v0.5.2 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/supranational/blst v0.3.11 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tendermint/go-amino v0.16.0 // indirect @@ -494,10 +487,13 @@ require ( google.golang.org/genproto v0.0.0-20240711142825-46eb208f015d // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240822170219-fc7c04adadcd // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240822170219-fc7c04adadcd // indirect + google.golang.org/grpc v1.65.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/api v0.31.0 // indirect k8s.io/apiextensions-apiserver v0.31.0 // indirect diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 19dce0c26c..d10606f1d4 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1417,14 +1417,10 @@ 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.12.2 h1:x3OppyMyGIbbiyFhsBmpf9pwkUzMhthJMRNmNlA4LaQ= github.com/slack-go/slack v0.12.2/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQdlMQKOw= -github.com/smartcontractkit/ccip-owner-contracts v0.0.0-20240919155713-f4bf4ae0b9c6 h1:e4lR/xTK7iOeCniSwH6hdaNZZ/sJs1eYWpnJoz3CXxI= -github.com/smartcontractkit/ccip-owner-contracts v0.0.0-20240919155713-f4bf4ae0b9c6/go.mod h1:nlRI0m23HFMAHf7cKYdE58mPbXsTyY1y3ZLJxnuuoCM= github.com/smartcontractkit/chain-selectors v1.0.27 h1:VE/ftX9Aae4gnw67yR1raKi+30iWKL/sWq8uyiLHM8k= github.com/smartcontractkit/chain-selectors v1.0.27/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8= github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924115754-8858b0423283 h1:f0vdqcOL9kJZwfmWE76roIyEuiZx/R82js0IfXNAvXg= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924115754-8858b0423283/go.mod h1:KP82vFCqm+M1G1t6Vos5CewGUGYJkxxCEdxnta4uLlE= github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925085218-aded1b263ecc h1:ALbyaoRzUSXQ2NhGFKVOyJqO22IB5yQjhjKWbIZGbrI= github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925085218-aded1b263ecc/go.mod h1:F6WUS6N4mP5ScwpwyTyAJc9/vjR+GXbMCRUOVekQi1g= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240911175228-daf2600bb7b7 h1:lTGIOQYLk1Ufn++X/AvZnt6VOcuhste5yp+C157No/Q= @@ -2214,6 +2210,7 @@ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index b67ce2a452..0503ea6a4d 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -387,7 +387,6 @@ require ( github.com/shopspring/decimal v1.4.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/smartcontractkit/chain-selectors v1.0.27 // indirect - github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924115754-8858b0423283 // indirect github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240911175228-daf2600bb7b7 // indirect github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240916152957-433914114bd2 // indirect github.com/smartcontractkit/chainlink-feeds v0.0.0-20240910155501-42f20443189f // indirect diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index d2cadb7aa5..ea10d96011 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1397,8 +1397,6 @@ github.com/smartcontractkit/chain-selectors v1.0.27 h1:VE/ftX9Aae4gnw67yR1raKi+3 github.com/smartcontractkit/chain-selectors v1.0.27/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8= github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924115754-8858b0423283 h1:f0vdqcOL9kJZwfmWE76roIyEuiZx/R82js0IfXNAvXg= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924115754-8858b0423283/go.mod h1:KP82vFCqm+M1G1t6Vos5CewGUGYJkxxCEdxnta4uLlE= github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925085218-aded1b263ecc h1:ALbyaoRzUSXQ2NhGFKVOyJqO22IB5yQjhjKWbIZGbrI= github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925085218-aded1b263ecc/go.mod h1:F6WUS6N4mP5ScwpwyTyAJc9/vjR+GXbMCRUOVekQi1g= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240911175228-daf2600bb7b7 h1:lTGIOQYLk1Ufn++X/AvZnt6VOcuhste5yp+C157No/Q= diff --git a/integration-tests/smoke/ccip_test.go b/integration-tests/smoke/ccip_test.go deleted file mode 100644 index 759e8eac1e..0000000000 --- a/integration-tests/smoke/ccip_test.go +++ /dev/null @@ -1,90 +0,0 @@ -package smoke - -import ( - "strconv" - "testing" - - "github.com/stretchr/testify/require" - - "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/testcontext" - - ccipdeployment "github.com/smartcontractkit/chainlink/integration-tests/deployment/ccip" - "github.com/smartcontractkit/chainlink/integration-tests/deployment/ccip/changeset" - jobv1 "github.com/smartcontractkit/chainlink/integration-tests/deployment/jd/job/v1" - "github.com/smartcontractkit/chainlink/v2/core/logger" -) - -func Test0002_InitialDeployOnLocal(t *testing.T) { - lggr := logger.TestLogger(t) - ctx := ccipdeployment.Context(t) - tenv := ccipdeployment.NewDeployedLocalDevEnvironment(t, lggr) - e := tenv.Env - nodes := tenv.Nodes - - state, err := ccipdeployment.LoadOnchainState(tenv.Env, tenv.Ab) - require.NoError(t, err) - - // Apply migration - output, err := changeset.Apply0002(tenv.Env, ccipdeployment.DeployCCIPContractConfig{ - HomeChainSel: tenv.HomeChainSel, - ChainsToDeploy: tenv.Env.AllChainSelectors(), - // Capreg/config already exist. - CCIPOnChainState: state, - }) - require.NoError(t, err) - // Get new state after migration. - state, err = ccipdeployment.LoadOnchainState(e, output.AddressBook) - require.NoError(t, err) - - // Apply the jobs. - nodeIdToJobIds := make(map[string][]string) - for nodeID, jobs := range output.JobSpecs { - nodeIdToJobIds[nodeID] = make([]string, 0, len(jobs)) - for _, job := range jobs { - res, err := e.Offchain.ProposeJob(ctx, - &jobv1.ProposeJobRequest{ - NodeId: nodeID, - Spec: job, - }) - require.NoError(t, err) - require.NotNil(t, res.Proposal) - nodeIdToJobIds[nodeID] = append(nodeIdToJobIds[nodeID], res.Proposal.JobId) - } - } - - // Accept all the jobs for this node. - for _, n := range nodes { - jobsToAccept, exists := nodeIdToJobIds[n.NodeId] - require.True(t, exists, "node %s has no jobs to accept", n.NodeId) - for i, jobID := range jobsToAccept { - require.NoError(t, n.AcceptJob(ctx, strconv.Itoa(i+1)), "node -%s failed to accept job %s", n.Name, jobID) - } - } - t.Log("Jobs accepted") - - // Add all lanes - require.NoError(t, ccipdeployment.AddLanesForAll(e, state)) - // Need to keep track of the block number for each chain so that event subscription can be done from that block. - startBlocks := make(map[uint64]*uint64) - // Send a message from each chain to every other chain. - expectedSeqNum := make(map[uint64]uint64) - for src := range e.Chains { - for dest, destChain := range e.Chains { - if src == dest { - continue - } - latesthdr, err := destChain.Client.HeaderByNumber(testcontext.Get(t), nil) - require.NoError(t, err) - block := latesthdr.Number.Uint64() - startBlocks[dest] = &block - seqNum := ccipdeployment.SendRequest(t, e, state, src, dest, false) - expectedSeqNum[dest] = seqNum - } - } - - // Wait for all commit reports to land. - ccipdeployment.ConfirmCommitForAllWithExpectedSeqNums(t, e, state, expectedSeqNum, startBlocks) - - // Wait for all exec reports to land - ccipdeployment.ConfirmExecWithSeqNrForAll(t, e, state, expectedSeqNum, startBlocks) -} diff --git a/testdata/scripts/node/validate/default.txtar b/testdata/scripts/node/validate/default.txtar index 9b045ac35b..ad923919e0 100644 --- a/testdata/scripts/node/validate/default.txtar +++ b/testdata/scripts/node/validate/default.txtar @@ -302,3 +302,4 @@ TraceSampleRatio = 0.01 Invalid configuration: invalid secrets: 2 errors: - Database.URL: empty: must be provided and non-empty - Password.Keystore: empty: must be provided and non-empty + diff --git a/testdata/scripts/node/validate/defaults-override.txtar b/testdata/scripts/node/validate/defaults-override.txtar deleted file mode 100644 index 85228771ce..0000000000 --- a/testdata/scripts/node/validate/defaults-override.txtar +++ /dev/null @@ -1,468 +0,0 @@ -# test with default override -env CL_CHAIN_DEFAULTS=default_overrides -exec chainlink node -c config.toml -s secrets.toml validate -cmp stdout out.txt - -# remove override, FinalityTagEnabled should no longer match -env CL_CHAIN_DEFAULTS= -exec chainlink node -c config.toml -s secrets.toml validate -! cmp stdout out.txt - -# overrides outside of evm suffix, FinalityTagEnabled should not match as override is not applied -env CL_CHAIN_DEFAULTS=default_overrides2 -! exec chainlink node -c config.toml -s secrets.toml validate - -# duplicate chain IDs -env CL_CHAIN_DEFAULTS=default_overrides3 -! exec chainlink node -c config.toml -s secrets.toml validate -stderr 'contains duplicate ChainID' - --- default_overrides/evm/Ethereum_Mainnet.toml -- -ChainID = '1' -FinalityTagEnabled = true - --- default_overrides2/Ethereum_Mainnet.toml -- -ChainID = '1' -FinalityTagEnabled = true - --- default_overrides3/evm/Ethereum_Mainnet.toml -- -ChainID = '1' - --- default_overrides3/evm/Ethereum_Testnet.toml -- -ChainID = '1' - --- config.toml -- -Log.Level = 'debug' - -[[EVM]] -ChainID = '1' - -[[EVM.Nodes]] -Name = 'fake' -WSURL = 'wss://foo.bar/ws' -HTTPURL = 'https://foo.bar' - --- secrets.toml -- -[Database] -URL = 'postgresql://user:pass1234567890abcd@localhost:5432/dbname?sslmode=disable' - -[Password] -Keystore = 'keystore_pass' - --- out.txt -- -# Secrets: -[Database] -URL = 'xxxxx' -AllowSimplePasswords = false - -[Password] -Keystore = 'xxxxx' - -# Input Configuration: -[Log] -Level = 'debug' - -[[EVM]] -ChainID = '1' - -[[EVM.Nodes]] -Name = 'fake' -WSURL = 'wss://foo.bar/ws' -HTTPURL = 'https://foo.bar' - -# Effective Configuration, with defaults applied: -InsecureFastScrypt = false -RootDir = '~/.chainlink' -ShutdownGracePeriod = '5s' - -[Feature] -FeedsManager = true -LogPoller = false -UICSAKeys = false -CCIP = true -MultiFeedsManagers = false - -[Database] -DefaultIdleInTxSessionTimeout = '1h0m0s' -DefaultLockTimeout = '15s' -DefaultQueryTimeout = '10s' -LogQueries = false -MaxIdleConns = 10 -MaxOpenConns = 100 -MigrateOnStartup = true - -[Database.Backup] -Dir = '' -Frequency = '1h0m0s' -Mode = 'none' -OnVersionUpgrade = true - -[Database.Listener] -MaxReconnectDuration = '10m0s' -MinReconnectInterval = '1m0s' -FallbackPollInterval = '30s' - -[Database.Lock] -Enabled = true -LeaseDuration = '10s' -LeaseRefreshInterval = '1s' - -[TelemetryIngress] -UniConn = false -Logging = false -BufferSize = 100 -MaxBatchSize = 50 -SendInterval = '500ms' -SendTimeout = '10s' -UseBatchSend = true - -[AuditLogger] -Enabled = false -ForwardToUrl = '' -JsonWrapperKey = '' -Headers = [] - -[Log] -Level = 'debug' -JSONConsole = false -UnixTS = false - -[Log.File] -Dir = '' -MaxSize = '5.12gb' -MaxAgeDays = 0 -MaxBackups = 1 - -[WebServer] -AuthenticationMethod = 'local' -AllowOrigins = 'http://localhost:3000,http://localhost:6688' -BridgeResponseURL = '' -BridgeCacheTTL = '0s' -HTTPWriteTimeout = '10s' -HTTPPort = 6688 -SecureCookies = true -SessionTimeout = '15m0s' -SessionReaperExpiration = '240h0m0s' -HTTPMaxSize = '32.77kb' -StartTimeout = '15s' -ListenIP = '0.0.0.0' - -[WebServer.LDAP] -ServerTLS = true -SessionTimeout = '15m0s' -QueryTimeout = '2m0s' -BaseUserAttr = 'uid' -BaseDN = '' -UsersDN = 'ou=users' -GroupsDN = 'ou=groups' -ActiveAttribute = '' -ActiveAttributeAllowedValue = '' -AdminUserGroupCN = 'NodeAdmins' -EditUserGroupCN = 'NodeEditors' -RunUserGroupCN = 'NodeRunners' -ReadUserGroupCN = 'NodeReadOnly' -UserApiTokenEnabled = false -UserAPITokenDuration = '240h0m0s' -UpstreamSyncInterval = '0s' -UpstreamSyncRateLimit = '2m0s' - -[WebServer.MFA] -RPID = '' -RPOrigin = '' - -[WebServer.RateLimit] -Authenticated = 1000 -AuthenticatedPeriod = '1m0s' -Unauthenticated = 5 -UnauthenticatedPeriod = '20s' - -[WebServer.TLS] -CertPath = '' -ForceRedirect = false -Host = '' -HTTPSPort = 6689 -KeyPath = '' -ListenIP = '0.0.0.0' - -[JobPipeline] -ExternalInitiatorsEnabled = false -MaxRunDuration = '10m0s' -MaxSuccessfulRuns = 10000 -ReaperInterval = '1h0m0s' -ReaperThreshold = '24h0m0s' -ResultWriteQueueDepth = 100 -VerboseLogging = true - -[JobPipeline.HTTPRequest] -DefaultTimeout = '15s' -MaxSize = '32.77kb' - -[FluxMonitor] -DefaultTransactionQueueDepth = 1 -SimulateTransactions = false - -[OCR2] -Enabled = false -ContractConfirmations = 3 -BlockchainTimeout = '20s' -ContractPollInterval = '1m0s' -ContractSubscribeInterval = '2m0s' -ContractTransmitterTransmitTimeout = '10s' -DatabaseTimeout = '10s' -KeyBundleID = '0000000000000000000000000000000000000000000000000000000000000000' -CaptureEATelemetry = false -CaptureAutomationCustomTelemetry = true -DefaultTransactionQueueDepth = 1 -SimulateTransactions = false -TraceLogging = false - -[OCR] -Enabled = false -ObservationTimeout = '5s' -BlockchainTimeout = '20s' -ContractPollInterval = '1m0s' -ContractSubscribeInterval = '2m0s' -DefaultTransactionQueueDepth = 1 -KeyBundleID = '0000000000000000000000000000000000000000000000000000000000000000' -SimulateTransactions = false -TransmitterAddress = '' -CaptureEATelemetry = false -TraceLogging = false - -[P2P] -IncomingMessageBufferSize = 10 -OutgoingMessageBufferSize = 10 -PeerID = '' -TraceLogging = false - -[P2P.V2] -Enabled = true -AnnounceAddresses = [] -DefaultBootstrappers = [] -DeltaDial = '15s' -DeltaReconcile = '1m0s' -ListenAddresses = [] - -[Keeper] -DefaultTransactionQueueDepth = 1 -GasPriceBufferPercent = 20 -GasTipCapBufferPercent = 20 -BaseFeeBufferPercent = 20 -MaxGracePeriod = 100 -TurnLookBack = 1000 - -[Keeper.Registry] -CheckGasOverhead = 200000 -PerformGasOverhead = 300000 -MaxPerformDataSize = 5000 -SyncInterval = '30m0s' -SyncUpkeepQueueSize = 10 - -[AutoPprof] -Enabled = false -ProfileRoot = '' -PollInterval = '10s' -GatherDuration = '10s' -GatherTraceDuration = '5s' -MaxProfileSize = '100.00mb' -CPUProfileRate = 1 -MemProfileRate = 1 -BlockProfileRate = 1 -MutexProfileFraction = 1 -MemThreshold = '4.00gb' -GoroutineThreshold = 5000 - -[Pyroscope] -ServerAddress = '' -Environment = 'mainnet' - -[Sentry] -Debug = false -DSN = '' -Environment = '' -Release = '' - -[Insecure] -DevWebServer = false -OCRDevelopmentMode = false -InfiniteDepthQueries = false -DisableRateLimiting = false - -[Tracing] -Enabled = false -CollectorTarget = '' -NodeID = '' -SamplingRatio = 0.0 -Mode = 'tls' -TLSCertPath = '' - -[Mercury] -VerboseLogging = false - -[Mercury.Cache] -LatestReportTTL = '1s' -MaxStaleAge = '1h0m0s' -LatestReportDeadline = '5s' - -[Mercury.TLS] -CertFile = '' - -[Mercury.Transmitter] -TransmitQueueMaxSize = 10000 -TransmitTimeout = '5s' - -[Capabilities] -[Capabilities.Peering] -IncomingMessageBufferSize = 10 -OutgoingMessageBufferSize = 10 -PeerID = '' -TraceLogging = false - -[Capabilities.Peering.V2] -Enabled = false -AnnounceAddresses = [] -DefaultBootstrappers = [] -DeltaDial = '15s' -DeltaReconcile = '1m0s' -ListenAddresses = [] - -[Capabilities.Dispatcher] -SupportedVersion = 1 -ReceiverBufferSize = 10000 - -[Capabilities.Dispatcher.RateLimit] -GlobalRPS = 800.0 -GlobalBurst = 1000 -PerSenderRPS = 10.0 -PerSenderBurst = 50 - -[Capabilities.ExternalRegistry] -Address = '' -NetworkID = 'evm' -ChainID = '1' - -[Capabilities.GatewayConnector] -ChainIDForNodeKey = '' -NodeAddress = '' -DonID = '' -WSHandshakeTimeoutMillis = 0 -AuthMinChallengeLen = 0 -AuthTimestampToleranceSec = 0 - -[[Capabilities.GatewayConnector.Gateways]] -ID = '' -URL = '' - -[Telemetry] -Enabled = false -CACertFile = '' -Endpoint = '' -InsecureConnection = false -TraceSampleRatio = 0.01 - -[[EVM]] -ChainID = '1' -AutoCreateKey = true -BlockBackfillDepth = 10 -BlockBackfillSkip = false -FinalityDepth = 50 -FinalityTagEnabled = true -LinkContractAddress = '0x514910771AF9Ca656af840dff83E8264EcF986CA' -LogBackfillBatchSize = 1000 -LogPollInterval = '15s' -LogKeepBlocksDepth = 100000 -LogPrunePageSize = 0 -BackupLogPollerBlockDelay = 100 -MinIncomingConfirmations = 3 -MinContractPayment = '0.1 link' -NonceAutoSync = true -NoNewHeadsThreshold = '3m0s' -OperatorFactoryAddress = '0x3E64Cd889482443324F91bFA9c84fE72A511f48A' -LogBroadcasterEnabled = true -RPCDefaultBatchSize = 250 -RPCBlockQueryDelay = 1 -FinalizedBlockOffset = 0 -NoNewFinalizedHeadsThreshold = '9m0s' - -[EVM.Transactions] -ForwardersEnabled = false -MaxInFlight = 16 -MaxQueued = 250 -ReaperInterval = '1h0m0s' -ReaperThreshold = '168h0m0s' -ResendAfterThreshold = '1m0s' - -[EVM.Transactions.AutoPurge] -Enabled = false - -[EVM.BalanceMonitor] -Enabled = true - -[EVM.GasEstimator] -Mode = 'BlockHistory' -PriceDefault = '20 gwei' -PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether' -PriceMin = '1 gwei' -LimitDefault = 500000 -LimitMax = 500000 -LimitMultiplier = '1' -LimitTransfer = 21000 -EstimateLimit = false -BumpMin = '5 gwei' -BumpPercent = 20 -BumpThreshold = 3 -EIP1559DynamicFees = true -FeeCapDefault = '100 gwei' -TipCapDefault = '1 wei' -TipCapMin = '1 wei' - -[EVM.GasEstimator.BlockHistory] -BatchSize = 25 -BlockHistorySize = 4 -CheckInclusionBlocks = 12 -CheckInclusionPercentile = 90 -TransactionPercentile = 50 - -[EVM.GasEstimator.FeeHistory] -CacheTimeout = '10s' - -[EVM.HeadTracker] -HistoryDepth = 100 -MaxBufferSize = 3 -SamplingInterval = '1s' -MaxAllowedFinalityDepth = 10000 -FinalityTagBypass = true - -[EVM.NodePool] -PollFailureThreshold = 5 -PollInterval = '10s' -SelectionMode = 'HighestHead' -SyncThreshold = 5 -LeaseDuration = '0s' -NodeIsSyncingEnabled = false -FinalizedBlockPollInterval = '5s' -EnforceRepeatableRead = false -DeathDeclarationDelay = '10s' -NewHeadsPollInterval = '0s' - -[EVM.OCR] -ContractConfirmations = 4 -ContractTransmitterTransmitTimeout = '10s' -DatabaseTimeout = '10s' -DeltaCOverride = '168h0m0s' -DeltaCJitterOverride = '1h0m0s' -ObservationGracePeriod = '1s' - -[EVM.OCR2] -[EVM.OCR2.Automation] -GasLimit = 10500000 - -[EVM.Workflow] -GasLimitDefault = 400000 - -[[EVM.Nodes]] -Name = 'fake' -WSURL = 'wss://foo.bar/ws' -HTTPURL = 'https://foo.bar' - -Valid configuration. diff --git a/testdata/scripts/node/validate/invalid.txtar b/testdata/scripts/node/validate/invalid.txtar index 5335dbe509..1ff74c2bd7 100644 --- a/testdata/scripts/node/validate/invalid.txtar +++ b/testdata/scripts/node/validate/invalid.txtar @@ -440,25 +440,25 @@ HTTPURL = 'https://foo.bar' Invalid configuration: invalid secrets: 2 errors: - Database: 2 errors: - - URL: invalid value (*****): missing or insufficiently complex password: + - URL: invalid value (*****): missing or insufficiently complex password: Expected password complexity: Must be at least 16 characters long Must not comprise: Leading or trailing whitespace A user's API email - + Faults: password is less than 16 characters long - . Database should be secured by a password matching the following complexity requirements: + . Database should be secured by a password matching the following complexity requirements: Must have a length of 16-50 characters Must not comprise: Leading or trailing whitespace (note that a trailing newline in the password file, if present, will be ignored) - - - BackupURL: invalid value (*****): missing or insufficiently complex password: DB URL must be authenticated; plaintext URLs are not allowed. Database should be secured by a password matching the following complexity requirements: + + - BackupURL: invalid value (*****): missing or insufficiently complex password: DB URL must be authenticated; plaintext URLs are not allowed. Database should be secured by a password matching the following complexity requirements: Must have a length of 16-50 characters Must not comprise: Leading or trailing whitespace (note that a trailing newline in the password file, if present, will be ignored) - + - Password.Keystore: empty: must be provided and non-empty -- err.txt -- diff --git a/tools/bin/go_core_ccip_deployment_tests b/tools/bin/go_core_ccip_deployment_tests deleted file mode 100755 index 54f9b70d26..0000000000 --- a/tools/bin/go_core_ccip_deployment_tests +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env bash -set -o pipefail -set +e - -SCRIPT_PATH=`dirname "$0"`; SCRIPT_PATH=`eval "cd \"$SCRIPT_PATH\" && pwd"` -OUTPUT_FILE="../output.txt" -USE_TEE="${USE_TEE:-true}" - -# To allow reuse in CI from other repositories -TOOLS_PATH=${TOOLS_PATH:-"./tools"} - -echo "Failed tests and panics: ---------------------" -echo "" -use_tee() { - if [ "$USE_TEE" = "true" ]; then - tee "$@" - else - cat > "$@" - fi -} - -cd ./integration-tests || exit -go mod download -go test -json ./deployment/... -covermode=atomic -coverpkg=./... -coverprofile=coverage.txt | use_tee $OUTPUT_FILE -EXITCODE=${PIPESTATUS[0]} - -# Assert no known sensitive strings present in test logger output -printf "\n----------------------------------------------\n\n" -echo "Beginning check of output logs for sensitive strings" -$SCRIPT_PATH/scrub_logs $OUTPUT_FILE -cd .. -if [[ $? != 0 ]]; then - exit 1 -fi - -echo "Exit code: $EXITCODE" -if [[ $EXITCODE != 0 ]]; then - echo "Encountered test failures." -else - echo "All tests passed!" -fi -echo "go_core_ccip_deployment_tests exiting with code $EXITCODE" -exit $EXITCODE diff --git a/tools/flakeytests/cmd/runner/main.go b/tools/flakeytests/cmd/runner/main.go index 0e1be5e7d3..c20fef17b1 100644 --- a/tools/flakeytests/cmd/runner/main.go +++ b/tools/flakeytests/cmd/runner/main.go @@ -24,7 +24,6 @@ func main() { grafanaHost := flag.String("grafana_host", "", "grafana host URL") grafanaAuth := flag.String("grafana_auth", "", "grafana basic auth for Loki API") - grafanaOrgID := flag.String("grafana_org_id", "", "grafana org ID") command := flag.String("command", "", "test command being rerun; used to tag metrics") ghSHA := flag.String("gh_sha", "", "commit sha for which we're rerunning tests") ghEventPath := flag.String("gh_event_path", "", "path to associated gh event") @@ -46,10 +45,6 @@ func main() { log.Fatal("Error re-running flakey tests: `grafana_auth` is required") } - if *grafanaOrgID == "" { - log.Fatal("Error re-running flakey tests: `grafana_org_id` is required") - } - if *command == "" { log.Fatal("Error re-running flakey tests: `command` is required") } @@ -68,7 +63,7 @@ func main() { } meta := flakeytests.GetGithubMetadata(*ghRepo, *ghEventName, *ghSHA, *ghEventPath, *ghRunID, runAttempt) - rep := flakeytests.NewLokiReporter(*grafanaHost, *grafanaAuth, *grafanaOrgID, *command, meta) + rep := flakeytests.NewLokiReporter(*grafanaHost, *grafanaAuth, *command, meta) r := flakeytests.NewRunner(readers, rep, numReruns) err := r.Run(ctx) if err != nil { diff --git a/tools/flakeytests/reporter.go b/tools/flakeytests/reporter.go index b3c8ad6da0..b7c7f66698 100644 --- a/tools/flakeytests/reporter.go +++ b/tools/flakeytests/reporter.go @@ -62,7 +62,6 @@ type Context struct { type LokiReporter struct { host string auth string - orgId string command string now func() time.Time ctx Context @@ -156,7 +155,6 @@ func (l *LokiReporter) makeRequest(ctx context.Context, pushReq pushRequest) err fmt.Sprintf("Basic %s", base64.StdEncoding.EncodeToString([]byte(l.auth))), ) req.Header.Add("Content-Type", "application/json") - req.Header.Add("X-Scope-OrgID", l.orgId) resp, err := http.DefaultClient.Do(req) if err != nil { return err @@ -179,6 +177,6 @@ func (l *LokiReporter) Report(ctx context.Context, report *Report) error { return l.makeRequest(ctx, pushReq) } -func NewLokiReporter(host, auth, orgId, command string, ctx Context) *LokiReporter { - return &LokiReporter{host: host, auth: auth, orgId: orgId, command: command, now: time.Now, ctx: ctx} +func NewLokiReporter(host, auth, command string, ctx Context) *LokiReporter { + return &LokiReporter{host: host, auth: auth, command: command, now: time.Now, ctx: ctx} } diff --git a/tools/flakeytests/reporter_test.go b/tools/flakeytests/reporter_test.go index c2b03e26dc..15650fc7bd 100644 --- a/tools/flakeytests/reporter_test.go +++ b/tools/flakeytests/reporter_test.go @@ -19,7 +19,7 @@ func TestMakeRequest_SingleTest(t *testing.T) { }, }, } - lr := &LokiReporter{auth: "bla", host: "bla", orgId: "bla", command: "go_core_tests", now: func() time.Time { return now }} + lr := &LokiReporter{auth: "bla", host: "bla", command: "go_core_tests", now: func() time.Time { return now }} pr, err := lr.createRequest(r) require.NoError(t, err) assert.Len(t, pr.Streams, 1) @@ -41,7 +41,7 @@ func TestMakeRequest_MultipleTests(t *testing.T) { }, }, } - lr := &LokiReporter{auth: "bla", host: "bla", orgId: "bla", command: "go_core_tests", now: func() time.Time { return now }} + lr := &LokiReporter{auth: "bla", host: "bla", command: "go_core_tests", now: func() time.Time { return now }} pr, err := lr.createRequest(r) require.NoError(t, err) assert.Len(t, pr.Streams, 1) @@ -58,7 +58,7 @@ func TestMakeRequest_NoTests(t *testing.T) { now := time.Now() ts := fmt.Sprintf("%d", now.UnixNano()) r := NewReport() - lr := &LokiReporter{auth: "bla", host: "bla", orgId: "bla", command: "go_core_tests", now: func() time.Time { return now }} + lr := &LokiReporter{auth: "bla", host: "bla", command: "go_core_tests", now: func() time.Time { return now }} pr, err := lr.createRequest(r) require.NoError(t, err) assert.Len(t, pr.Streams, 1) @@ -72,7 +72,7 @@ func TestMakeRequest_WithContext(t *testing.T) { now := time.Now() ts := fmt.Sprintf("%d", now.UnixNano()) r := NewReport() - lr := &LokiReporter{auth: "bla", host: "bla", orgId: "bla", command: "go_core_tests", now: func() time.Time { return now }, ctx: Context{CommitSHA: "42"}} + lr := &LokiReporter{auth: "bla", host: "bla", command: "go_core_tests", now: func() time.Time { return now }, ctx: Context{CommitSHA: "42"}} pr, err := lr.createRequest(r) require.NoError(t, err) assert.Len(t, pr.Streams, 1) @@ -95,7 +95,7 @@ func TestMakeRequest_Panics(t *testing.T) { "core/assets": 1, }, } - lr := &LokiReporter{auth: "bla", host: "bla", orgId: "bla", command: "go_core_tests", now: func() time.Time { return now }} + lr := &LokiReporter{auth: "bla", host: "bla", command: "go_core_tests", now: func() time.Time { return now }} pr, err := lr.createRequest(r) require.NoError(t, err) assert.Len(t, pr.Streams, 1)