diff --git a/.changeset/lucky-bears-invite.md b/.changeset/lucky-bears-invite.md new file mode 100644 index 0000000000..2fda12d8d8 --- /dev/null +++ b/.changeset/lucky-bears-invite.md @@ -0,0 +1,5 @@ +--- +"ccip": patch +--- + +NewCommitServices + NewExecServices use a provider diff --git a/.changeset/nervous-humans-march.md b/.changeset/nervous-humans-march.md new file mode 100644 index 0000000000..43c7a08683 --- /dev/null +++ b/.changeset/nervous-humans-march.md @@ -0,0 +1,5 @@ +--- +"ccip": patch +--- + +Added tests and cleanup of liquidity graph #changed diff --git a/.github/workflows/build-publish-develop.yml b/.github/workflows/build-publish-develop.yml index 53507a29e8..6e8e5ba3f5 100644 --- a/.github/workflows/build-publish-develop.yml +++ b/.github/workflows/build-publish-develop.yml @@ -52,8 +52,8 @@ jobs: ecr-image-name: ccip-develop ecr-tag-suffix: ${{ matrix.image.tag-suffix }} dockerfile: ${{ matrix.image.dockerfile }} - dockerhub_username: ${{ secrets.DOCKERHUB_READONLY_USERNAME }} - dockerhub_password: ${{ secrets.DOCKERHUB_READONLY_PASSWORD }} + dockerhub_username: ${{ secrets.DOCKER_READONLY_USERNAME }} + dockerhub_password: ${{ secrets.DOCKER_READONLY_PASSWORD }} git-commit-sha: ${{ steps.git-ref.outputs.checked-out || github.sha }} - name: Collect Metrics diff --git a/.github/workflows/build-publish-pr.yml b/.github/workflows/build-publish-pr.yml index 7553b74fba..1a426cdeac 100644 --- a/.github/workflows/build-publish-pr.yml +++ b/.github/workflows/build-publish-pr.yml @@ -50,8 +50,8 @@ jobs: sign-images: false ecr-hostname: ${{ secrets.AWS_SDLC_ECR_HOSTNAME }} ecr-image-name: ${{ env.ECR_IMAGE_NAME }} - dockerhub_username: ${{ secrets.DOCKERHUB_READONLY_USERNAME }} - dockerhub_password: ${{ secrets.DOCKERHUB_READONLY_PASSWORD }} + dockerhub_username: ${{ secrets.DOCKER_READONLY_USERNAME }} + dockerhub_password: ${{ secrets.DOCKER_READONLY_PASSWORD }} - name: Collect Metrics if: always() diff --git a/.github/workflows/build-publish.yml b/.github/workflows/build-publish.yml index ef0f641db1..865bdaf730 100644 --- a/.github/workflows/build-publish.yml +++ b/.github/workflows/build-publish.yml @@ -46,8 +46,8 @@ jobs: cosign-private-key: ${{ secrets.COSIGN_PRIVATE_KEY }} cosign-public-key: ${{ secrets.COSIGN_PUBLIC_KEY }} cosign-password: ${{ secrets.COSIGN_PASSWORD }} - dockerhub_username: ${{ secrets.DOCKERHUB_READONLY_USERNAME }} - dockerhub_password: ${{ secrets.DOCKERHUB_READONLY_PASSWORD }} + dockerhub_username: ${{ secrets.DOCKER_READONLY_USERNAME }} + dockerhub_password: ${{ secrets.DOCKER_READONLY_PASSWORD }} verify-signature: true - name: Collect Metrics if: always() diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6e3272204e..b82b5a8203 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,8 +34,8 @@ jobs: if: ${{ steps.change.outputs.changelog-only == 'false' }} uses: ./.github/actions/build-sign-publish-chainlink with: - dockerhub_username: ${{ secrets.DOCKERHUB_READONLY_USERNAME }} - dockerhub_password: ${{ secrets.DOCKERHUB_READONLY_PASSWORD }} + dockerhub_username: ${{ secrets.DOCKER_READONLY_USERNAME }} + dockerhub_password: ${{ secrets.DOCKER_READONLY_PASSWORD }} publish: false sign-images: false diff --git a/.github/workflows/ccip-live-testnet-tests.yml b/.github/workflows/ccip-live-network-tests.yml similarity index 99% rename from .github/workflows/ccip-live-testnet-tests.yml rename to .github/workflows/ccip-live-network-tests.yml index f2fd469f1c..94aa36ddf8 100644 --- a/.github/workflows/ccip-live-testnet-tests.yml +++ b/.github/workflows/ccip-live-network-tests.yml @@ -1,4 +1,4 @@ -name: CCIP On-Demand Live Testnet Tests +name: CCIP On-Demand Live Network Tests on: schedule: - cron: '0 */6 * * *' diff --git a/.github/workflows/ccip-ocr3-build-lint-test.yml b/.github/workflows/ccip-ocr3-build-lint-test.yml deleted file mode 100644 index 554995dc65..0000000000 --- a/.github/workflows/ccip-ocr3-build-lint-test.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: "Build lint and test CCIP-OCR3" - -on: - pull_request: - paths: - - core/services/ocr3/plugins/ccip/** - -jobs: - build-lint-test: - runs-on: ubuntu-20.04 - strategy: - matrix: - go-version: ['1.21'] - defaults: - run: - working-directory: ./core/services/ocr3/plugins/ccip - steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - - name: Setup Go ${{ matrix.go-version }} - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 - with: - go-version: ${{ matrix.go-version }} - - name: Display Go version - run: go version - - name: Build - run: go build -v ./... - - name: Install linter - run: | - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.59.0 - - name: Run linter - run: golangci-lint run -c .golangci.yml - - name: Run tests - run: go test -race -fullpath -shuffle on -count 20 ./... diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 8591c06457..79053bd072 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -303,12 +303,13 @@ jobs: fail-fast: false matrix: product: - - name: ccip-lm-smoke - nodes: 1 - os: ubuntu-latest - file: lm - dir: ccip-tests/smoke - run: -run ^TestLmBasic$ +# 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 @@ -342,6 +343,12 @@ jobs: 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 @@ -354,18 +361,24 @@ jobs: os: ubuntu-latest file: ccip run: -run ^TestSmokeCCIPManuallyExecuteAfterExecutionFailingDueToInsufficientGas$ - - name: ccip-smoke-self-serve-offramp-arl + - 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 ^TestSmokeCCIPSelfServeRateLimitOffRamp$ - - name: ccip-smoke-self-serve-onramp-arl + run: -run ^TestSmokeCCIPOffRampCapacityLimit$ + - name: ccip-smoke-off-ramp-agg-rate-limit nodes: 1 dir: ccip-tests/smoke os: ubuntu-latest file: ccip - run: -run ^TestSmokeCCIPSelfServeRateLimitOnRamp$ + run: -run ^TestSmokeCCIPOffRampAggRateLimit$ - name: runlog id: runlog nodes: 2 diff --git a/.github/workflows/live-vrf-tests.yml b/.github/workflows/live-vrf-tests.yml index 89c62c104f..80eb14a589 100644 --- a/.github/workflows/live-vrf-tests.yml +++ b/.github/workflows/live-vrf-tests.yml @@ -30,8 +30,7 @@ env: TEST_LOG_LEVEL: debug jobs: - - # Build Test Dependencies + # Build Test Dependencies build-chainlink: environment: integration @@ -107,7 +106,6 @@ jobs: cache_restore_only: "true" binary_name: tests - # End Build Test Dependencies live-smoke-tests: @@ -120,7 +118,7 @@ jobs: needs: [build-chainlink, build-tests] strategy: fail-fast: false - matrix: + matrix: network: ${{fromJson(needs.build-tests.outputs.matrix)}} name: Smoke Tests on ${{ matrix.network }} runs-on: ubuntu-latest @@ -177,8 +175,8 @@ jobs: cl_repo: ${{ env.CHAINLINK_IMAGE }} cl_image_tag: ${{ github.sha }} aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} - dockerhub_username: ${{ secrets.DOCKERHUB_READONLY_USERNAME }} - dockerhub_password: ${{ secrets.DOCKERHUB_READONLY_PASSWORD }} + dockerhub_username: ${{ secrets.DOCKER_READONLY_USERNAME }} + dockerhub_password: ${{ secrets.DOCKER_READONLY_PASSWORD }} artifacts_location: ./logs token: ${{ secrets.GITHUB_TOKEN }} cache_key_id: core-e2e-${{ env.MOD_CACHE_VERSION }} @@ -190,4 +188,4 @@ jobs: if: always() uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 with: - test_directory: "./" \ No newline at end of file + test_directory: "./" diff --git a/CODEOWNERS b/CODEOWNERS index f7f60a32e5..0a5a8d8966 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -148,8 +148,8 @@ flake.lock @smartcontractkit/prodsec-public /core/services/relay/evm/liquidity_manager.go @smartcontractkit/liquidity-manager /contracts/**/liquiditymanager/ @smartcontractkit/liquidity-manager -# CCIP ARM +# CCIP RMN /contracts/src/v0.8/ccip/RMN.sol @smartcontractkit/rmn /contracts/src/v0.8/ccip/ARMProxy.sol @smartcontractkit/rmn -/contracts/src/v0.8/ccip/interfaces/IARM.sol @smartcontractkit/rmn +/contracts/src/v0.8/ccip/interfaces/IRMN.sol @smartcontractkit/rmn /contracts/src/v0.8/ccip/test/arm @smartcontractkit/rmn diff --git a/contracts/gas-snapshots/ccip.gas-snapshot b/contracts/gas-snapshots/ccip.gas-snapshot index 6eae209ae0..54443aa4e2 100644 --- a/contracts/gas-snapshots/ccip.gas-snapshot +++ b/contracts/gas-snapshots/ccip.gas-snapshot @@ -2,9 +2,9 @@ ARMProxyStandaloneTest:test_ARMCallEmptyContractRevert() (gas: 19600) ARMProxyStandaloneTest:test_Constructor() (gas: 374544) ARMProxyStandaloneTest:test_SetARM() (gas: 16494) ARMProxyStandaloneTest:test_SetARMzero() (gas: 11216) -ARMProxyTest:test_ARMCallRevertReasonForwarded() (gas: 48006) -ARMProxyTest:test_ARMIsBlessed_Success() (gas: 48186) -ARMProxyTest:test_ARMIsCursed_Success() (gas: 50264) +ARMProxyTest:test_ARMCallRevertReasonForwarded() (gas: 47793) +ARMProxyTest:test_ARMIsBlessed_Success() (gas: 36269) +ARMProxyTest:test_ARMIsCursed_Success() (gas: 49740) AggregateTokenLimiter_constructor:test_Constructor_Success() (gas: 26920) AggregateTokenLimiter_getTokenBucket:test_GetTokenBucket_Success() (gas: 19691) AggregateTokenLimiter_getTokenBucket:test_Refill_Success() (gas: 40911) @@ -19,245 +19,232 @@ AggregateTokenLimiter_setAdmin:test_Owner_Success() (gas: 18989) AggregateTokenLimiter_setRateLimiterConfig:test_OnlyOnlyCallableByAdminOrOwner_Revert() (gas: 17479) AggregateTokenLimiter_setRateLimiterConfig:test_Owner_Success() (gas: 30062) AggregateTokenLimiter_setRateLimiterConfig:test_TokenLimitAdmin_Success() (gas: 32071) -BurnFromMintTokenPool_lockOrBurn:test_ChainNotAllowed_Revert() (gas: 28789) -BurnFromMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 55208) -BurnFromMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 243632) +BurnFromMintTokenPool_lockOrBurn:test_ChainNotAllowed_Revert() (gas: 28675) +BurnFromMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 55158) +BurnFromMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 243541) BurnFromMintTokenPool_lockOrBurn:test_Setup_Success() (gas: 23907) -BurnMintTokenPool_lockOrBurn:test_ChainNotAllowed_Revert() (gas: 27699) -BurnMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 55208) -BurnMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 241523) +BurnMintTokenPool_lockOrBurn:test_ChainNotAllowed_Revert() (gas: 27585) +BurnMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 55158) +BurnMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 241432) BurnMintTokenPool_lockOrBurn:test_Setup_Success() (gas: 17633) -BurnMintTokenPool_releaseOrMint:test_ChainNotAllowed_Revert() (gas: 28651) -BurnMintTokenPool_releaseOrMint:test_PoolMintNotHealthy_Revert() (gas: 56041) -BurnMintTokenPool_releaseOrMint:test_PoolMint_Success() (gas: 110771) -BurnWithFromMintTokenPool_lockOrBurn:test_ChainNotAllowed_Revert() (gas: 28789) -BurnWithFromMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 55208) -BurnWithFromMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 243659) +BurnMintTokenPool_releaseOrMint:test_ChainNotAllowed_Revert() (gas: 28537) +BurnMintTokenPool_releaseOrMint:test_PoolMintNotHealthy_Revert() (gas: 55991) +BurnMintTokenPool_releaseOrMint:test_PoolMint_Success() (gas: 110657) +BurnWithFromMintTokenPool_lockOrBurn:test_ChainNotAllowed_Revert() (gas: 28675) +BurnWithFromMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 55158) +BurnWithFromMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 243568) BurnWithFromMintTokenPool_lockOrBurn:test_Setup_Success() (gas: 24260) -CCIPCapabilityConfigurationSetup:test_getCapabilityConfiguration_Success() (gas: 9561) -CCIPCapabilityConfiguration_ConfigStateMachine:test__computeConfigDigest_Success() (gas: 70645) -CCIPCapabilityConfiguration_ConfigStateMachine:test__computeNewConfigWithMeta_InitToRunning_Success() (gas: 350565) -CCIPCapabilityConfiguration_ConfigStateMachine:test__computeNewConfigWithMeta_RunningToStaging_Success() (gas: 471510) -CCIPCapabilityConfiguration_ConfigStateMachine:test__computeNewConfigWithMeta_StagingToRunning_Success() (gas: 440232) -CCIPCapabilityConfiguration_ConfigStateMachine:test__groupByPluginType_TooManyOCR3Configs_Reverts() (gas: 37027) -CCIPCapabilityConfiguration_ConfigStateMachine:test__groupByPluginType_threeCommitConfigs_Reverts() (gas: 61043) -CCIPCapabilityConfiguration_ConfigStateMachine:test__groupByPluginType_threeExecutionConfigs_Reverts() (gas: 60963) -CCIPCapabilityConfiguration_ConfigStateMachine:test__stateFromConfigLength_Success() (gas: 11764) -CCIPCapabilityConfiguration_ConfigStateMachine:test__validateConfigStateTransition_Success() (gas: 8897) -CCIPCapabilityConfiguration_ConfigStateMachine:test__validateConfigTransition_InitToRunning_Success() (gas: 303038) -CCIPCapabilityConfiguration_ConfigStateMachine:test__validateConfigTransition_InitToRunning_WrongConfigCount_Reverts() (gas: 49619) -CCIPCapabilityConfiguration_ConfigStateMachine:test__validateConfigTransition_NonExistentConfigTransition_Reverts() (gas: 32253) -CCIPCapabilityConfiguration_ConfigStateMachine:test__validateConfigTransition_RunningToStaging_Success() (gas: 367516) -CCIPCapabilityConfiguration_ConfigStateMachine:test__validateConfigTransition_RunningToStaging_WrongConfigCount_Reverts() (gas: 120877) -CCIPCapabilityConfiguration_ConfigStateMachine:test__validateConfigTransition_RunningToStaging_WrongConfigDigestBlueGreen_Reverts() (gas: 156973) -CCIPCapabilityConfiguration_ConfigStateMachine:test__validateConfigTransition_StagingToRunning_Success() (gas: 367292) -CCIPCapabilityConfiguration_ConfigStateMachine:test__validateConfigTransition_StagingToRunning_WrongConfigDigest_Reverts() (gas: 157040) -CCIPCapabilityConfiguration_ConfigStateMachine:test_getCapabilityConfiguration_Success() (gas: 9648) -CCIPCapabilityConfiguration__updatePluginConfig:test__updatePluginConfig_InitToRunning_Success() (gas: 1044370) -CCIPCapabilityConfiguration__updatePluginConfig:test__updatePluginConfig_InvalidConfigLength_Reverts() (gas: 27539) -CCIPCapabilityConfiguration__updatePluginConfig:test__updatePluginConfig_InvalidConfigStateTransition_Reverts() (gas: 23083) -CCIPCapabilityConfiguration__updatePluginConfig:test__updatePluginConfig_RunningToStaging_Success() (gas: 1992245) -CCIPCapabilityConfiguration__updatePluginConfig:test__updatePluginConfig_StagingToRunning_Success() (gas: 2595825) -CCIPCapabilityConfiguration__updatePluginConfig:test_getCapabilityConfiguration_Success() (gas: 9626) -CCIPCapabilityConfiguration_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_CommitAndExecConfig_Success() (gas: 1833893) -CCIPCapabilityConfiguration_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_CommitConfigOnly_Success() (gas: 1055282) -CCIPCapabilityConfiguration_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_ExecConfigOnly_Success() (gas: 1055313) -CCIPCapabilityConfiguration_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_OnlyCapabilityRegistryCanCall_Reverts() (gas: 9576) -CCIPCapabilityConfiguration_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_ZeroLengthConfig_Success() (gas: 16070) -CCIPCapabilityConfiguration_beforeCapabilityConfigSet:test_getCapabilityConfiguration_Success() (gas: 9626) -CCIPCapabilityConfiguration_chainConfig:test__applyChainConfigUpdates_FChainNotPositive_Reverts() (gas: 182909) -CCIPCapabilityConfiguration_chainConfig:test_applyChainConfigUpdates_addChainConfigs_Success() (gas: 342472) -CCIPCapabilityConfiguration_chainConfig:test_applyChainConfigUpdates_nodeNotInRegistry_Reverts() (gas: 19116) -CCIPCapabilityConfiguration_chainConfig:test_applyChainConfigUpdates_removeChainConfigs_Success() (gas: 266071) -CCIPCapabilityConfiguration_chainConfig:test_applyChainConfigUpdates_selectorNotFound_Reverts() (gas: 14807) -CCIPCapabilityConfiguration_chainConfig:test_getCapabilityConfiguration_Success() (gas: 9604) -CCIPCapabilityConfiguration_validateConfig:test__validateConfig_ChainSelectorNotFound_Reverts() (gas: 285383) -CCIPCapabilityConfiguration_validateConfig:test__validateConfig_ChainSelectorNotSet_Reverts() (gas: 282501) -CCIPCapabilityConfiguration_validateConfig:test__validateConfig_FMustBePositive_Reverts() (gas: 283422) -CCIPCapabilityConfiguration_validateConfig:test__validateConfig_FTooHigh_Reverts() (gas: 283588) -CCIPCapabilityConfiguration_validateConfig:test__validateConfig_NodeNotInRegistry_Reverts() (gas: 287815) -CCIPCapabilityConfiguration_validateConfig:test__validateConfig_NotEnoughTransmitters_Reverts() (gas: 1068544) -CCIPCapabilityConfiguration_validateConfig:test__validateConfig_OfframpAddressCannotBeZero_Reverts() (gas: 282309) -CCIPCapabilityConfiguration_validateConfig:test__validateConfig_P2PIdsLengthNotMatching_Reverts() (gas: 284277) -CCIPCapabilityConfiguration_validateConfig:test__validateConfig_Success() (gas: 289222) -CCIPCapabilityConfiguration_validateConfig:test__validateConfig_TooManyBootstrapP2PIds_Reverts() (gas: 285518) -CCIPCapabilityConfiguration_validateConfig:test__validateConfig_TooManySigners_Reverts() (gas: 1120660) -CCIPCapabilityConfiguration_validateConfig:test__validateConfig_TooManyTransmitters_Reverts() (gas: 1119000) -CCIPCapabilityConfiguration_validateConfig:test_getCapabilityConfiguration_Success() (gas: 9540) -CCIPClientExample_sanity:test_ImmutableExamples_Success() (gas: 2132891) -CommitStore_constructor:test_Constructor_Success() (gas: 3091440) -CommitStore_isUnpausedAndRMNHealthy:test_RMN_Success() (gas: 75331) -CommitStore_report:test_InvalidIntervalMinLargerThanMax_Revert() (gas: 28784) -CommitStore_report:test_InvalidInterval_Revert() (gas: 28724) -CommitStore_report:test_InvalidRootRevert() (gas: 27957) -CommitStore_report:test_OnlyGasPriceUpdates_Success() (gas: 55519) -CommitStore_report:test_OnlyPriceUpdateStaleReport_Revert() (gas: 61429) -CommitStore_report:test_OnlyTokenPriceUpdates_Success() (gas: 55517) +CCIPClientExample_sanity:test_ImmutableExamples_Success() (gas: 2132183) +CCIPConfigSetup:test_getCapabilityConfiguration_Success() (gas: 9495) +CCIPConfig_ConfigStateMachine:test__computeConfigDigest_Success() (gas: 70755) +CCIPConfig_ConfigStateMachine:test__computeNewConfigWithMeta_InitToRunning_Success() (gas: 357994) +CCIPConfig_ConfigStateMachine:test__computeNewConfigWithMeta_RunningToStaging_Success() (gas: 481619) +CCIPConfig_ConfigStateMachine:test__computeNewConfigWithMeta_StagingToRunning_Success() (gas: 447731) +CCIPConfig_ConfigStateMachine:test__groupByPluginType_TooManyOCR3Configs_Reverts() (gas: 37027) +CCIPConfig_ConfigStateMachine:test__groupByPluginType_threeCommitConfigs_Reverts() (gas: 61043) +CCIPConfig_ConfigStateMachine:test__groupByPluginType_threeExecutionConfigs_Reverts() (gas: 60963) +CCIPConfig_ConfigStateMachine:test__stateFromConfigLength_Success() (gas: 11764) +CCIPConfig_ConfigStateMachine:test__validateConfigStateTransition_Success() (gas: 8765) +CCIPConfig_ConfigStateMachine:test__validateConfigTransition_InitToRunning_Success() (gas: 307840) +CCIPConfig_ConfigStateMachine:test__validateConfigTransition_InitToRunning_WrongConfigCount_Reverts() (gas: 49663) +CCIPConfig_ConfigStateMachine:test__validateConfigTransition_NonExistentConfigTransition_Reverts() (gas: 32275) +CCIPConfig_ConfigStateMachine:test__validateConfigTransition_RunningToStaging_Success() (gas: 372425) +CCIPConfig_ConfigStateMachine:test__validateConfigTransition_RunningToStaging_WrongConfigCount_Reverts() (gas: 120943) +CCIPConfig_ConfigStateMachine:test__validateConfigTransition_RunningToStaging_WrongConfigDigestBlueGreen_Reverts() (gas: 157105) +CCIPConfig_ConfigStateMachine:test__validateConfigTransition_StagingToRunning_Success() (gas: 372201) +CCIPConfig_ConfigStateMachine:test__validateConfigTransition_StagingToRunning_WrongConfigDigest_Reverts() (gas: 157172) +CCIPConfig_ConfigStateMachine:test_getCapabilityConfiguration_Success() (gas: 9583) +CCIPConfig__updatePluginConfig:test__updatePluginConfig_InitToRunning_Success() (gas: 1051740) +CCIPConfig__updatePluginConfig:test__updatePluginConfig_InvalidConfigLength_Reverts() (gas: 27539) +CCIPConfig__updatePluginConfig:test__updatePluginConfig_InvalidConfigStateTransition_Reverts() (gas: 23105) +CCIPConfig__updatePluginConfig:test__updatePluginConfig_RunningToStaging_Success() (gas: 2002384) +CCIPConfig__updatePluginConfig:test__updatePluginConfig_StagingToRunning_Success() (gas: 2608050) +CCIPConfig__updatePluginConfig:test_getCapabilityConfiguration_Success() (gas: 9583) +CCIPConfig_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_CommitAndExecConfig_Success() (gas: 1844033) +CCIPConfig_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_CommitConfigOnly_Success() (gas: 1062709) +CCIPConfig_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_ExecConfigOnly_Success() (gas: 1062740) +CCIPConfig_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_OnlyCapabilitiesRegistryCanCall_Reverts() (gas: 9599) +CCIPConfig_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_ZeroLengthConfig_Success() (gas: 16070) +CCIPConfig_beforeCapabilityConfigSet:test_getCapabilityConfiguration_Success() (gas: 9583) +CCIPConfig_chainConfig:test__applyChainConfigUpdates_FChainNotPositive_Reverts() (gas: 184703) +CCIPConfig_chainConfig:test_applyChainConfigUpdates_addChainConfigs_Success() (gas: 344332) +CCIPConfig_chainConfig:test_applyChainConfigUpdates_nodeNotInRegistry_Reverts() (gas: 20258) +CCIPConfig_chainConfig:test_applyChainConfigUpdates_removeChainConfigs_Success() (gas: 267558) +CCIPConfig_chainConfig:test_applyChainConfigUpdates_selectorNotFound_Reverts() (gas: 14829) +CCIPConfig_chainConfig:test_getCapabilityConfiguration_Success() (gas: 9626) +CCIPConfig_validateConfig:test__validateConfig_ChainSelectorNotFound_Reverts() (gas: 290206) +CCIPConfig_validateConfig:test__validateConfig_ChainSelectorNotSet_Reverts() (gas: 287302) +CCIPConfig_validateConfig:test__validateConfig_FMustBePositive_Reverts() (gas: 288245) +CCIPConfig_validateConfig:test__validateConfig_FTooHigh_Reverts() (gas: 288389) +CCIPConfig_validateConfig:test__validateConfig_NodeNotInRegistry_Reverts() (gas: 293767) +CCIPConfig_validateConfig:test__validateConfig_NotEnoughTransmitters_Reverts() (gas: 1107053) +CCIPConfig_validateConfig:test__validateConfig_OfframpAddressCannotBeZero_Reverts() (gas: 287109) +CCIPConfig_validateConfig:test__validateConfig_P2PIdsLengthNotMatching_Reverts() (gas: 289078) +CCIPConfig_validateConfig:test__validateConfig_Success() (gas: 296533) +CCIPConfig_validateConfig:test__validateConfig_TooManyBootstrapP2PIds_Reverts() (gas: 290321) +CCIPConfig_validateConfig:test__validateConfig_TooManySigners_Reverts() (gas: 1160583) +CCIPConfig_validateConfig:test__validateConfig_TooManyTransmitters_Reverts() (gas: 1158919) +CCIPConfig_validateConfig:test_getCapabilityConfiguration_Success() (gas: 9562) +CommitStore_constructor:test_Constructor_Success() (gas: 3091326) +CommitStore_isUnpausedAndRMNHealthy:test_RMN_Success() (gas: 73420) +CommitStore_report:test_InvalidIntervalMinLargerThanMax_Revert() (gas: 28670) +CommitStore_report:test_InvalidInterval_Revert() (gas: 28610) +CommitStore_report:test_InvalidRootRevert() (gas: 27843) +CommitStore_report:test_OnlyGasPriceUpdates_Success() (gas: 55405) +CommitStore_report:test_OnlyPriceUpdateStaleReport_Revert() (gas: 61201) +CommitStore_report:test_OnlyTokenPriceUpdates_Success() (gas: 55403) CommitStore_report:test_Paused_Revert() (gas: 21259) -CommitStore_report:test_ReportAndPriceUpdate_Success() (gas: 86508) -CommitStore_report:test_ReportOnlyRootSuccess_gas() (gas: 56427) -CommitStore_report:test_RootAlreadyCommitted_Revert() (gas: 64197) -CommitStore_report:test_StaleReportWithRoot_Success() (gas: 119502) -CommitStore_report:test_Unhealthy_Revert() (gas: 44801) -CommitStore_report:test_ValidPriceUpdateThenStaleReportWithRoot_Success() (gas: 103065) -CommitStore_report:test_ZeroEpochAndRound_Revert() (gas: 27740) +CommitStore_report:test_ReportAndPriceUpdate_Success() (gas: 86394) +CommitStore_report:test_ReportOnlyRootSuccess_gas() (gas: 56313) +CommitStore_report:test_RootAlreadyCommitted_Revert() (gas: 63969) +CommitStore_report:test_StaleReportWithRoot_Success() (gas: 119274) +CommitStore_report:test_Unhealthy_Revert() (gas: 44751) +CommitStore_report:test_ValidPriceUpdateThenStaleReportWithRoot_Success() (gas: 102837) +CommitStore_report:test_ZeroEpochAndRound_Revert() (gas: 27626) CommitStore_resetUnblessedRoots:test_OnlyOwner_Revert() (gas: 11325) -CommitStore_resetUnblessedRoots:test_ResetUnblessedRoots_Success() (gas: 140460) +CommitStore_resetUnblessedRoots:test_ResetUnblessedRoots_Success() (gas: 143718) CommitStore_setDynamicConfig:test_InvalidCommitStoreConfig_Revert() (gas: 37263) CommitStore_setDynamicConfig:test_OnlyOwner_Revert() (gas: 37399) CommitStore_setDynamicConfig:test_PriceEpochCleared_Success() (gas: 129098) CommitStore_setLatestPriceEpochAndRound:test_OnlyOwner_Revert() (gas: 11047) CommitStore_setLatestPriceEpochAndRound:test_SetLatestPriceEpochAndRound_Success() (gas: 20642) CommitStore_setMinSeqNr:test_OnlyOwner_Revert() (gas: 11046) -CommitStore_verify:test_Blessed_Success() (gas: 96279) -CommitStore_verify:test_NotBlessed_Success() (gas: 58800) +CommitStore_verify:test_Blessed_Success() (gas: 96389) +CommitStore_verify:test_NotBlessed_Success() (gas: 61374) CommitStore_verify:test_Paused_Revert() (gas: 18496) CommitStore_verify:test_TooManyLeaves_Revert() (gas: 36785) DefensiveExampleTest:test_HappyPath_Success() (gas: 200018) DefensiveExampleTest:test_Recovery() (gas: 424253) -E2E:test_E2E_3MessagesSuccess_gas() (gas: 1106426) -EVM2EVMMultiOffRamp__releaseOrMintSingleToken:test__releaseOrMintSingleToken_NotACompatiblePool_Revert() (gas: 38297) -EVM2EVMMultiOffRamp__releaseOrMintSingleToken:test__releaseOrMintSingleToken_Success() (gas: 108537) -EVM2EVMMultiOffRamp__releaseOrMintSingleToken:test__releaseOrMintSingleToken_TokenHandlingError_revert_Revert() (gas: 116989) -EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_AddMultipleChains_Success() (gas: 262922) -EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_AddNewChain_Success() (gas: 93606) -EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_ApplyZeroUpdates_Success() (gas: 12376) -EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_ReplaceExistingChainOnRampAndPrevOffRamp_Revert() (gas: 87783) -EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_ReplaceExistingChainOnRamp_Revert() (gas: 87494) -EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_ReplaceExistingChainPrevOffRamp_Revert() (gas: 87642) -EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_ReplaceExistingChain_Success() (gas: 102139) -EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_ZeroOnRampAddress_Revert() (gas: 12465) -EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_ZeroSourceChainSelector_Revert() (gas: 12440) -EVM2EVMMultiOffRamp_batchExecute:test_MultipleReportsDifferentChains_Success() (gas: 278848) -EVM2EVMMultiOffRamp_batchExecute:test_MultipleReportsSameChain_Success() (gas: 224198) -EVM2EVMMultiOffRamp_batchExecute:test_MultipleReportsSkipDuplicate_Success() (gas: 149797) -EVM2EVMMultiOffRamp_batchExecute:test_OutOfBoundsGasLimitsAccess_Revert() (gas: 178986) -EVM2EVMMultiOffRamp_batchExecute:test_SingleReport_Success() (gas: 136134) -EVM2EVMMultiOffRamp_batchExecute:test_Unhealthy_Revert() (gas: 520534) -EVM2EVMMultiOffRamp_batchExecute:test_ZeroReports_Revert() (gas: 10465) -EVM2EVMMultiOffRamp_ccipReceive:test_Reverts() (gas: 17210) -EVM2EVMMultiOffRamp_commit:test_InvalidIntervalMinLargerThanMax_Revert() (gas: 66076) -EVM2EVMMultiOffRamp_commit:test_InvalidInterval_Revert() (gas: 59726) -EVM2EVMMultiOffRamp_commit:test_InvalidRootRevert() (gas: 58806) -EVM2EVMMultiOffRamp_commit:test_NoConfigWithOtherConfigPresent_Revert() (gas: 6568553) -EVM2EVMMultiOffRamp_commit:test_NoConfig_Revert() (gas: 6151804) -EVM2EVMMultiOffRamp_commit:test_OnlyGasPriceUpdates_Success() (gas: 108339) -EVM2EVMMultiOffRamp_commit:test_OnlyPriceUpdateStaleReport_Revert() (gas: 118247) -EVM2EVMMultiOffRamp_commit:test_OnlyTokenPriceUpdates_Success() (gas: 108382) -EVM2EVMMultiOffRamp_commit:test_PriceSequenceNumberCleared_Success() (gas: 353651) -EVM2EVMMultiOffRamp_commit:test_ReportAndPriceUpdate_Success() (gas: 160194) -EVM2EVMMultiOffRamp_commit:test_ReportOnlyRootSuccess_gas() (gas: 135101) -EVM2EVMMultiOffRamp_commit:test_RootAlreadyCommitted_Revert() (gas: 136887) -EVM2EVMMultiOffRamp_commit:test_SourceChainNotEnabled_Revert() (gas: 59074) -EVM2EVMMultiOffRamp_commit:test_StaleReportWithRoot_Success() (gas: 225469) -EVM2EVMMultiOffRamp_commit:test_UnauthorizedTransmitter_Revert() (gas: 119710) -EVM2EVMMultiOffRamp_commit:test_Unhealthy_Revert() (gas: 77572) -EVM2EVMMultiOffRamp_commit:test_ValidPriceUpdateThenStaleReportWithRoot_Success() (gas: 207989) -EVM2EVMMultiOffRamp_commit:test_WrongConfigWithoutSigners_Revert() (gas: 6562945) +E2E:test_E2E_3MessagesSuccess_gas() (gas: 1104821) +EVM2EVMMultiOffRamp__releaseOrMintSingleToken:test__releaseOrMintSingleToken_NotACompatiblePool_Revert() (gas: 38361) +EVM2EVMMultiOffRamp__releaseOrMintSingleToken:test__releaseOrMintSingleToken_Success() (gas: 108455) +EVM2EVMMultiOffRamp__releaseOrMintSingleToken:test__releaseOrMintSingleToken_TokenHandlingError_revert_Revert() (gas: 116907) +EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_AddMultipleChains_Success() (gas: 460360) +EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_AddNewChain_Success() (gas: 95427) +EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_ApplyZeroUpdates_Success() (gas: 12395) +EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_ReplaceExistingChainOnRamp_Revert() (gas: 90249) +EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_ReplaceExistingChain_Success() (gas: 105403) +EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_ZeroOnRampAddress_Revert() (gas: 15651) +EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_ZeroSourceChainSelector_Revert() (gas: 12989) +EVM2EVMMultiOffRamp_batchExecute:test_MultipleReportsDifferentChains_Success() (gas: 305737) +EVM2EVMMultiOffRamp_batchExecute:test_MultipleReportsSameChain_Success() (gas: 247076) +EVM2EVMMultiOffRamp_batchExecute:test_MultipleReportsSkipDuplicate_Success() (gas: 162376) +EVM2EVMMultiOffRamp_batchExecute:test_OutOfBoundsGasLimitsAccess_Revert() (gas: 195244) +EVM2EVMMultiOffRamp_batchExecute:test_SingleReport_Success() (gas: 150011) +EVM2EVMMultiOffRamp_batchExecute:test_Unhealthy_Revert() (gas: 535435) +EVM2EVMMultiOffRamp_batchExecute:test_ZeroReports_Revert() (gas: 10525) +EVM2EVMMultiOffRamp_ccipReceive:test_Reverts() (gas: 16096) +EVM2EVMMultiOffRamp_commit:test_InvalidIntervalMinLargerThanMax_Revert() (gas: 67080) +EVM2EVMMultiOffRamp_commit:test_InvalidInterval_Revert() (gas: 59630) +EVM2EVMMultiOffRamp_commit:test_InvalidRootRevert() (gas: 58710) +EVM2EVMMultiOffRamp_commit:test_NoConfigWithOtherConfigPresent_Revert() (gas: 6574764) +EVM2EVMMultiOffRamp_commit:test_NoConfig_Revert() (gas: 6157992) +EVM2EVMMultiOffRamp_commit:test_OnlyGasPriceUpdates_Success() (gas: 108329) +EVM2EVMMultiOffRamp_commit:test_OnlyPriceUpdateStaleReport_Revert() (gas: 118244) +EVM2EVMMultiOffRamp_commit:test_OnlyTokenPriceUpdates_Success() (gas: 108372) +EVM2EVMMultiOffRamp_commit:test_PriceSequenceNumberCleared_Success() (gas: 353646) +EVM2EVMMultiOffRamp_commit:test_ReportAndPriceUpdate_Success() (gas: 161185) +EVM2EVMMultiOffRamp_commit:test_ReportOnlyRootSuccess_gas() (gas: 136112) +EVM2EVMMultiOffRamp_commit:test_RootAlreadyCommitted_Revert() (gas: 136695) +EVM2EVMMultiOffRamp_commit:test_SourceChainNotEnabled_Revert() (gas: 58978) +EVM2EVMMultiOffRamp_commit:test_StaleReportWithRoot_Success() (gas: 227569) +EVM2EVMMultiOffRamp_commit:test_UnauthorizedTransmitter_Revert() (gas: 119611) +EVM2EVMMultiOffRamp_commit:test_Unhealthy_Revert() (gas: 77537) +EVM2EVMMultiOffRamp_commit:test_ValidPriceUpdateThenStaleReportWithRoot_Success() (gas: 209029) +EVM2EVMMultiOffRamp_commit:test_WrongConfigWithoutSigners_Revert() (gas: 6569153) EVM2EVMMultiOffRamp_commit:test_ZeroEpochAndRound_Revert() (gas: 47717) -EVM2EVMMultiOffRamp_constructor:test_Constructor_Success() (gas: 6221393) -EVM2EVMMultiOffRamp_constructor:test_SourceChainSelector_Revert() (gas: 100992) -EVM2EVMMultiOffRamp_constructor:test_ZeroChainSelector_Revert() (gas: 97936) -EVM2EVMMultiOffRamp_constructor:test_ZeroOnRampAddress_Revert() (gas: 101045) -EVM2EVMMultiOffRamp_constructor:test_ZeroRMNProxy_Revert() (gas: 95693) -EVM2EVMMultiOffRamp_constructor:test_ZeroTokenAdminRegistry_Revert() (gas: 95760) +EVM2EVMMultiOffRamp_constructor:test_Constructor_Success() (gas: 6158331) +EVM2EVMMultiOffRamp_constructor:test_SourceChainSelector_Revert() (gas: 104384) +EVM2EVMMultiOffRamp_constructor:test_ZeroChainSelector_Revert() (gas: 100309) +EVM2EVMMultiOffRamp_constructor:test_ZeroNonceManager_Revert() (gas: 98180) +EVM2EVMMultiOffRamp_constructor:test_ZeroOnRampAddress_Revert() (gas: 106890) +EVM2EVMMultiOffRamp_constructor:test_ZeroRMNProxy_Revert() (gas: 98079) +EVM2EVMMultiOffRamp_constructor:test_ZeroTokenAdminRegistry_Revert() (gas: 98146) EVM2EVMMultiOffRamp_execute:test_IncorrectArrayType_Revert() (gas: 17299) -EVM2EVMMultiOffRamp_execute:test_LargeBatch_Success() (gas: 1493658) -EVM2EVMMultiOffRamp_execute:test_MultipleReportsWithPartialValidationFailures_Success() (gas: 330460) -EVM2EVMMultiOffRamp_execute:test_MultipleReports_Success() (gas: 247590) -EVM2EVMMultiOffRamp_execute:test_NoConfigWithOtherConfigPresent_Revert() (gas: 6618993) -EVM2EVMMultiOffRamp_execute:test_NoConfig_Revert() (gas: 6201960) -EVM2EVMMultiOffRamp_execute:test_NonArray_Revert() (gas: 30077) -EVM2EVMMultiOffRamp_execute:test_SingleReport_Success() (gas: 156744) -EVM2EVMMultiOffRamp_execute:test_UnauthorizedTransmitter_Revert() (gas: 140692) -EVM2EVMMultiOffRamp_execute:test_WrongConfigWithSigners_Revert() (gas: 6981086) +EVM2EVMMultiOffRamp_execute:test_LargeBatch_Success() (gas: 1640074) +EVM2EVMMultiOffRamp_execute:test_MultipleReportsWithPartialValidationFailures_Success() (gas: 350683) +EVM2EVMMultiOffRamp_execute:test_MultipleReports_Success() (gas: 267647) +EVM2EVMMultiOffRamp_execute:test_NoConfigWithOtherConfigPresent_Revert() (gas: 6627625) +EVM2EVMMultiOffRamp_execute:test_NoConfig_Revert() (gas: 6210572) +EVM2EVMMultiOffRamp_execute:test_NonArray_Revert() (gas: 28435) +EVM2EVMMultiOffRamp_execute:test_SingleReport_Success() (gas: 167667) +EVM2EVMMultiOffRamp_execute:test_UnauthorizedTransmitter_Revert() (gas: 151623) +EVM2EVMMultiOffRamp_execute:test_WrongConfigWithSigners_Revert() (gas: 6989700) EVM2EVMMultiOffRamp_execute:test_ZeroReports_Revert() (gas: 17174) -EVM2EVMMultiOffRamp_executeSingleMessage:test_MessageSender_Revert() (gas: 20742) -EVM2EVMMultiOffRamp_executeSingleMessage:test_NonContractWithTokens_Success() (gas: 255884) -EVM2EVMMultiOffRamp_executeSingleMessage:test_NonContract_Success() (gas: 22893) -EVM2EVMMultiOffRamp_executeSingleMessage:test_TokenHandlingError_Revert() (gas: 208273) -EVM2EVMMultiOffRamp_executeSingleMessage:test_ZeroGasDONExecution_Revert() (gas: 50981) -EVM2EVMMultiOffRamp_executeSingleMessage:test_executeSingleMessage_NoTokens_Success() (gas: 50491) -EVM2EVMMultiOffRamp_executeSingleMessage:test_executeSingleMessage_WithFailingValidationNoRouterCall_Revert() (gas: 235475) -EVM2EVMMultiOffRamp_executeSingleMessage:test_executeSingleMessage_WithFailingValidation_Revert() (gas: 91297) -EVM2EVMMultiOffRamp_executeSingleMessage:test_executeSingleMessage_WithTokens_Success() (gas: 288124) -EVM2EVMMultiOffRamp_executeSingleMessage:test_executeSingleMessage_WithValidation_Success() (gas: 95407) -EVM2EVMMultiOffRamp_executeSingleReport:test_DisabledSourceChain_Revert() (gas: 37461) -EVM2EVMMultiOffRamp_executeSingleReport:test_EmptyReport_Revert() (gas: 24043) -EVM2EVMMultiOffRamp_executeSingleReport:test_InvalidMessageId_Revert() (gas: 41937) -EVM2EVMMultiOffRamp_executeSingleReport:test_InvalidSourcePoolAddress_Success() (gas: 448890) -EVM2EVMMultiOffRamp_executeSingleReport:test_ManualExecutionNotYetEnabled_Revert() (gas: 53707) -EVM2EVMMultiOffRamp_executeSingleReport:test_MismatchingOnRampAddress_Revert() (gas: 44774) -EVM2EVMMultiOffRamp_executeSingleReport:test_MismatchingSourceChainSelector_Revert() (gas: 41829) -EVM2EVMMultiOffRamp_executeSingleReport:test_NonExistingSourceChain_Revert() (gas: 37691) -EVM2EVMMultiOffRamp_executeSingleReport:test_ReceiverError_Success() (gas: 170464) -EVM2EVMMultiOffRamp_executeSingleReport:test_RetryFailedMessageWithoutManualExecution_Revert() (gas: 182307) -EVM2EVMMultiOffRamp_executeSingleReport:test_RootNotCommitted_Revert() (gas: 47166) -EVM2EVMMultiOffRamp_executeSingleReport:test_RouterYULCall_Revert() (gas: 405979) -EVM2EVMMultiOffRamp_executeSingleReport:test_SingleMessageNoTokensOtherChain_Success() (gas: 233227) -EVM2EVMMultiOffRamp_executeSingleReport:test_SingleMessageNoTokensUnordered_Success() (gas: 166280) -EVM2EVMMultiOffRamp_executeSingleReport:test_SingleMessageNoTokens_Success() (gas: 180825) -EVM2EVMMultiOffRamp_executeSingleReport:test_SingleMessageToNonCCIPReceiver_Success() (gas: 251931) -EVM2EVMMultiOffRamp_executeSingleReport:test_SingleMessagesNoTokensSuccess_gas() (gas: 119123) -EVM2EVMMultiOffRamp_executeSingleReport:test_SkippedIncorrectNonceStillExecutes_Success() (gas: 383907) -EVM2EVMMultiOffRamp_executeSingleReport:test_SkippedIncorrectNonce_Success() (gas: 56119) -EVM2EVMMultiOffRamp_executeSingleReport:test_TokenDataMismatch_Revert() (gas: 51431) -EVM2EVMMultiOffRamp_executeSingleReport:test_TwoMessagesWithTokensAndGE_Success() (gas: 528858) -EVM2EVMMultiOffRamp_executeSingleReport:test_TwoMessagesWithTokensSuccess_gas() (gas: 466470) -EVM2EVMMultiOffRamp_executeSingleReport:test_UnexpectedTokenData_Revert() (gas: 38166) -EVM2EVMMultiOffRamp_executeSingleReport:test_UnhealthySingleChainCurse_Revert() (gas: 519008) -EVM2EVMMultiOffRamp_executeSingleReport:test_Unhealthy_Revert() (gas: 516384) -EVM2EVMMultiOffRamp_executeSingleReport:test_WithCurseOnAnotherSourceChain_Success() (gas: 483511) -EVM2EVMMultiOffRamp_executeSingleReport:test__execute_SkippedAlreadyExecutedMessageUnordered_Success() (gas: 127580) -EVM2EVMMultiOffRamp_executeSingleReport:test__execute_SkippedAlreadyExecutedMessage_Success() (gas: 147874) -EVM2EVMMultiOffRamp_execute_upgrade:test_NoPrevOffRampForChain_Success() (gas: 239540) -EVM2EVMMultiOffRamp_execute_upgrade:test_UpgradedNonceNewSenderStartsAtZero_Success() (gas: 239421) -EVM2EVMMultiOffRamp_execute_upgrade:test_UpgradedNonceStartsAtV1Nonce_Success() (gas: 289916) -EVM2EVMMultiOffRamp_execute_upgrade:test_UpgradedOffRampNonceSkipsIfMsgInFlight_Success() (gas: 270592) -EVM2EVMMultiOffRamp_execute_upgrade:test_UpgradedSenderNoncesReadsPreviousRampTransitive_Success() (gas: 247698) -EVM2EVMMultiOffRamp_execute_upgrade:test_UpgradedSenderNoncesReadsPreviousRamp_Success() (gas: 235673) -EVM2EVMMultiOffRamp_execute_upgrade:test_UpgradedWithMultiRamp_Revert() (gas: 7153870) -EVM2EVMMultiOffRamp_execute_upgrade:test_Upgraded_Success() (gas: 136567) -EVM2EVMMultiOffRamp_getExecutionState:test_FillExecutionState_Success() (gas: 3652910) -EVM2EVMMultiOffRamp_getExecutionState:test_GetDifferentChainExecutionState_Success() (gas: 118102) -EVM2EVMMultiOffRamp_getExecutionState:test_GetExecutionState_Success() (gas: 87240) -EVM2EVMMultiOffRamp_manuallyExecute:test_ManualExecGasLimitMismatchSingleReport_Revert() (gas: 80095) -EVM2EVMMultiOffRamp_manuallyExecute:test_ManualExecInvalidGasLimit_Revert() (gas: 28717) -EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_DoesNotRevertIfUntouched_Success() (gas: 152385) -EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_FailedTx_Revert() (gas: 200013) -EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_ForkedChain_Revert() (gas: 28246) -EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_GasLimitMismatchMultipleReports_Revert() (gas: 160817) -EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_LowGasLimit_Success() (gas: 497970) -EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_ReentrancyFails() (gas: 2371591) -EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_Success() (gas: 202168) -EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_WithGasOverride_Success() (gas: 202742) -EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_WithMultiReportGasOverride_Success() (gas: 652254) -EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_WithPartialMessages_Success() (gas: 287604) -EVM2EVMMultiOffRamp_metadataHash:test_MetadataHashChangesOnOnRampAddress_Success() (gas: 10983) -EVM2EVMMultiOffRamp_metadataHash:test_MetadataHashChangesOnSourceChain_Success() (gas: 11029) -EVM2EVMMultiOffRamp_metadataHash:test_MetadataHash_Success() (gas: 9135) -EVM2EVMMultiOffRamp_releaseOrMintTokens:test_TokenHandlingError_Reverts() (gas: 165359) -EVM2EVMMultiOffRamp_releaseOrMintTokens:test__releaseOrMintTokens_PoolIsNotAPool_Reverts() (gas: 26919) -EVM2EVMMultiOffRamp_releaseOrMintTokens:test_releaseOrMintTokens_InvalidDataLengthReturnData_Revert() (gas: 63524) -EVM2EVMMultiOffRamp_releaseOrMintTokens:test_releaseOrMintTokens_InvalidEVMAddress_Revert() (gas: 44641) -EVM2EVMMultiOffRamp_releaseOrMintTokens:test_releaseOrMintTokens_PoolDoesNotSupportDest_Reverts() (gas: 80662) -EVM2EVMMultiOffRamp_releaseOrMintTokens:test_releaseOrMintTokens_Success() (gas: 185556) -EVM2EVMMultiOffRamp_releaseOrMintTokens:test_releaseOrMintTokens_destDenominatedDecimals_Success() (gas: 284012) +EVM2EVMMultiOffRamp_executeSingleMessage:test_MessageSender_Revert() (gas: 19548) +EVM2EVMMultiOffRamp_executeSingleMessage:test_NonContractWithTokens_Success() (gas: 254458) +EVM2EVMMultiOffRamp_executeSingleMessage:test_NonContract_Success() (gas: 21806) +EVM2EVMMultiOffRamp_executeSingleMessage:test_TokenHandlingError_Revert() (gas: 206750) +EVM2EVMMultiOffRamp_executeSingleMessage:test_ZeroGasDONExecution_Revert() (gas: 50035) +EVM2EVMMultiOffRamp_executeSingleMessage:test_executeSingleMessage_NoTokens_Success() (gas: 49556) +EVM2EVMMultiOffRamp_executeSingleMessage:test_executeSingleMessage_WithFailingValidationNoRouterCall_Revert() (gas: 234116) +EVM2EVMMultiOffRamp_executeSingleMessage:test_executeSingleMessage_WithFailingValidation_Revert() (gas: 90376) +EVM2EVMMultiOffRamp_executeSingleMessage:test_executeSingleMessage_WithTokens_Success() (gas: 287302) +EVM2EVMMultiOffRamp_executeSingleMessage:test_executeSingleMessage_WithValidation_Success() (gas: 94638) +EVM2EVMMultiOffRamp_executeSingleReport:test_DisabledSourceChain_Revert() (gas: 36249) +EVM2EVMMultiOffRamp_executeSingleReport:test_EmptyReport_Revert() (gas: 23921) +EVM2EVMMultiOffRamp_executeSingleReport:test_InvalidSourcePoolAddress_Success() (gas: 462794) +EVM2EVMMultiOffRamp_executeSingleReport:test_ManualExecutionNotYetEnabled_Revert() (gas: 55975) +EVM2EVMMultiOffRamp_executeSingleReport:test_MismatchingDestChainSelector_Revert() (gas: 37072) +EVM2EVMMultiOffRamp_executeSingleReport:test_MismatchingOnRampRoot_Revert() (gas: 156143) +EVM2EVMMultiOffRamp_executeSingleReport:test_NonExistingSourceChain_Revert() (gas: 36483) +EVM2EVMMultiOffRamp_executeSingleReport:test_ReceiverError_Success() (gas: 184243) +EVM2EVMMultiOffRamp_executeSingleReport:test_RetryFailedMessageWithoutManualExecution_Revert() (gas: 194605) +EVM2EVMMultiOffRamp_executeSingleReport:test_RootNotCommitted_Revert() (gas: 49553) +EVM2EVMMultiOffRamp_executeSingleReport:test_RouterYULCall_Revert() (gas: 439123) +EVM2EVMMultiOffRamp_executeSingleReport:test_SingleMessageNoTokensOtherChain_Success() (gas: 256572) +EVM2EVMMultiOffRamp_executeSingleReport:test_SingleMessageNoTokensUnordered_Success() (gas: 179039) +EVM2EVMMultiOffRamp_executeSingleReport:test_SingleMessageNoTokens_Success() (gas: 198372) +EVM2EVMMultiOffRamp_executeSingleReport:test_SingleMessageToNonCCIPReceiver_Success() (gas: 262344) +EVM2EVMMultiOffRamp_executeSingleReport:test_SingleMessagesNoTokensSuccess_gas() (gas: 131587) +EVM2EVMMultiOffRamp_executeSingleReport:test_SkippedIncorrectNonceStillExecutes_Success() (gas: 399804) +EVM2EVMMultiOffRamp_executeSingleReport:test_SkippedIncorrectNonce_Success() (gas: 67753) +EVM2EVMMultiOffRamp_executeSingleReport:test_TokenDataMismatch_Revert() (gas: 82478) +EVM2EVMMultiOffRamp_executeSingleReport:test_TwoMessagesWithTokensAndGE_Success() (gas: 546583) +EVM2EVMMultiOffRamp_executeSingleReport:test_TwoMessagesWithTokensSuccess_gas() (gas: 486844) +EVM2EVMMultiOffRamp_executeSingleReport:test_UnexpectedTokenData_Revert() (gas: 36976) +EVM2EVMMultiOffRamp_executeSingleReport:test_UnhealthySingleChainCurse_Revert() (gas: 534156) +EVM2EVMMultiOffRamp_executeSingleReport:test_Unhealthy_Revert() (gas: 531524) +EVM2EVMMultiOffRamp_executeSingleReport:test_WithCurseOnAnotherSourceChain_Success() (gas: 498454) +EVM2EVMMultiOffRamp_executeSingleReport:test__execute_SkippedAlreadyExecutedMessageUnordered_Success() (gas: 131751) +EVM2EVMMultiOffRamp_executeSingleReport:test__execute_SkippedAlreadyExecutedMessage_Success() (gas: 160626) +EVM2EVMMultiOffRamp_getExecutionState:test_FillExecutionState_Success() (gas: 3633818) +EVM2EVMMultiOffRamp_getExecutionState:test_GetDifferentChainExecutionState_Success() (gas: 118144) +EVM2EVMMultiOffRamp_getExecutionState:test_GetExecutionState_Success() (gas: 87253) +EVM2EVMMultiOffRamp_manuallyExecute:test_ManualExecGasLimitMismatchSingleReport_Revert() (gas: 81957) +EVM2EVMMultiOffRamp_manuallyExecute:test_ManualExecInvalidGasLimit_Revert() (gas: 27558) +EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_DoesNotRevertIfUntouched_Success() (gas: 165891) +EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_FailedTx_Revert() (gas: 212381) +EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_ForkedChain_Revert() (gas: 27086) +EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_GasLimitMismatchMultipleReports_Revert() (gas: 166703) +EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_LowGasLimit_Success() (gas: 512307) +EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_ReentrancyFails() (gas: 2397801) +EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_Success() (gas: 214474) +EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_WithGasOverride_Success() (gas: 215037) +EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_WithMultiReportGasOverride_Success() (gas: 692864) +EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_WithPartialMessages_Success() (gas: 309081) +EVM2EVMMultiOffRamp_releaseOrMintTokens:test_TokenHandlingError_Reverts() (gas: 165102) +EVM2EVMMultiOffRamp_releaseOrMintTokens:test__releaseOrMintTokens_PoolIsNotAPool_Reverts() (gas: 26890) +EVM2EVMMultiOffRamp_releaseOrMintTokens:test_releaseOrMintTokens_InvalidDataLengthReturnData_Revert() (gas: 63495) +EVM2EVMMultiOffRamp_releaseOrMintTokens:test_releaseOrMintTokens_InvalidEVMAddress_Revert() (gas: 44612) +EVM2EVMMultiOffRamp_releaseOrMintTokens:test_releaseOrMintTokens_PoolDoesNotSupportDest_Reverts() (gas: 80519) +EVM2EVMMultiOffRamp_releaseOrMintTokens:test_releaseOrMintTokens_Success() (gas: 185299) +EVM2EVMMultiOffRamp_releaseOrMintTokens:test_releaseOrMintTokens_destDenominatedDecimals_Success() (gas: 283897) EVM2EVMMultiOffRamp_resetUnblessedRoots:test_OnlyOwner_Revert() (gas: 11420) -EVM2EVMMultiOffRamp_resetUnblessedRoots:test_ResetUnblessedRoots_Success() (gas: 211875) +EVM2EVMMultiOffRamp_resetUnblessedRoots:test_ResetUnblessedRoots_Success() (gas: 215247) EVM2EVMMultiOffRamp_setDynamicConfig:test_NonOwner_Revert() (gas: 14223) EVM2EVMMultiOffRamp_setDynamicConfig:test_PriceRegistryZeroAddress_Revert() (gas: 11729) EVM2EVMMultiOffRamp_setDynamicConfig:test_RouterZeroAddress_Revert() (gas: 13885) -EVM2EVMMultiOffRamp_setDynamicConfig:test_SetDynamicConfigWithValidator_Success() (gas: 55589) -EVM2EVMMultiOffRamp_setDynamicConfig:test_SetDynamicConfig_Success() (gas: 33599) -EVM2EVMMultiOffRamp_trialExecute:test_RateLimitError_Success() (gas: 243962) -EVM2EVMMultiOffRamp_trialExecute:test_TokenHandlingErrorIsCaught_Success() (gas: 252619) -EVM2EVMMultiOffRamp_trialExecute:test_TokenPoolIsNotAContract_Success() (gas: 306794) -EVM2EVMMultiOffRamp_trialExecute:test_trialExecute_Success() (gas: 286041) -EVM2EVMMultiOffRamp_verify:test_Blessed_Success() (gas: 176393) -EVM2EVMMultiOffRamp_verify:test_NotBlessedWrongChainSelector_Success() (gas: 178464) -EVM2EVMMultiOffRamp_verify:test_NotBlessed_Success() (gas: 138858) -EVM2EVMMultiOffRamp_verify:test_TooManyLeaves_Revert() (gas: 51501) +EVM2EVMMultiOffRamp_setDynamicConfig:test_SetDynamicConfigWithValidator_Success() (gas: 55608) +EVM2EVMMultiOffRamp_setDynamicConfig:test_SetDynamicConfig_Success() (gas: 33618) +EVM2EVMMultiOffRamp_trialExecute:test_RateLimitError_Success() (gas: 242740) +EVM2EVMMultiOffRamp_trialExecute:test_TokenHandlingErrorIsCaught_Success() (gas: 251403) +EVM2EVMMultiOffRamp_trialExecute:test_TokenPoolIsNotAContract_Success() (gas: 308206) +EVM2EVMMultiOffRamp_trialExecute:test_trialExecute_Success() (gas: 285105) +EVM2EVMMultiOffRamp_verify:test_Blessed_Success() (gas: 176538) +EVM2EVMMultiOffRamp_verify:test_NotBlessedWrongChainSelector_Success() (gas: 178609) +EVM2EVMMultiOffRamp_verify:test_NotBlessed_Success() (gas: 141470) +EVM2EVMMultiOffRamp_verify:test_TooManyLeaves_Revert() (gas: 51507) EVM2EVMMultiOnRamp_applyDestChainConfigUpdates:test_InvalidDestBytesOverhead_Revert() (gas: 33833) EVM2EVMMultiOnRamp_applyDestChainConfigUpdates:test_InvalidDestChainConfigDestChainSelectorEqZero_Revert() (gas: 16646) EVM2EVMMultiOnRamp_applyDestChainConfigUpdates:test_InvalidDestChainConfigNewPrevOnRampOnExistingChain_Revert() (gas: 30796) @@ -273,37 +260,37 @@ EVM2EVMMultiOnRamp_constructor:test_Constructor_InvalidConfigLinkTokenEqAddressZ EVM2EVMMultiOnRamp_constructor:test_Constructor_InvalidConfigNonceManagerEqAddressZero_Revert() (gas: 140293) EVM2EVMMultiOnRamp_constructor:test_Constructor_InvalidConfigRMNProxyEqAddressZero_Revert() (gas: 145314) EVM2EVMMultiOnRamp_constructor:test_Constructor_InvalidConfigTokenAdminRegistryEqAddressZero_Revert() (gas: 140360) -EVM2EVMMultiOnRamp_constructor:test_Constructor_Success() (gas: 4895426) -EVM2EVMMultiOnRamp_forwardFromRouter:test_CannotSendZeroTokens_Revert() (gas: 96497) -EVM2EVMMultiOnRamp_forwardFromRouter:test_EnforceOutOfOrder_Revert() (gas: 102680) -EVM2EVMMultiOnRamp_forwardFromRouter:test_ForwardFromRouterExtraArgsV2AllowOutOfOrderTrue_Success() (gas: 125959) -EVM2EVMMultiOnRamp_forwardFromRouter:test_ForwardFromRouterExtraArgsV2_Success() (gas: 156706) -EVM2EVMMultiOnRamp_forwardFromRouter:test_ForwardFromRouterSuccessCustomExtraArgs() (gas: 156217) -EVM2EVMMultiOnRamp_forwardFromRouter:test_ForwardFromRouterSuccessEmptyExtraArgs() (gas: 156447) -EVM2EVMMultiOnRamp_forwardFromRouter:test_ForwardFromRouterSuccessLegacyExtraArgs() (gas: 156472) -EVM2EVMMultiOnRamp_forwardFromRouter:test_ForwardFromRouter_Success() (gas: 155917) -EVM2EVMMultiOnRamp_forwardFromRouter:test_InvalidAddressEncodePacked_Revert() (gas: 35200) -EVM2EVMMultiOnRamp_forwardFromRouter:test_InvalidAddress_Revert() (gas: 35461) -EVM2EVMMultiOnRamp_forwardFromRouter:test_InvalidChainSelector_Revert() (gas: 28048) -EVM2EVMMultiOnRamp_forwardFromRouter:test_InvalidExtraArgsTag_Revert() (gas: 30027) -EVM2EVMMultiOnRamp_forwardFromRouter:test_MessageGasLimitTooHigh_Revert() (gas: 31789) -EVM2EVMMultiOnRamp_forwardFromRouter:test_MessageTooLarge_Revert() (gas: 110477) -EVM2EVMMultiOnRamp_forwardFromRouter:test_MessageValidationError_Revert() (gas: 152652) -EVM2EVMMultiOnRamp_forwardFromRouter:test_MesssageFeeTooHigh_Revert() (gas: 34241) -EVM2EVMMultiOnRamp_forwardFromRouter:test_OriginalSender_Revert() (gas: 23151) -EVM2EVMMultiOnRamp_forwardFromRouter:test_Paused_Revert() (gas: 41579) -EVM2EVMMultiOnRamp_forwardFromRouter:test_Permissions_Revert() (gas: 25996) -EVM2EVMMultiOnRamp_forwardFromRouter:test_ShouldIncrementNonceOnlyOnOrdered_Success() (gas: 205172) -EVM2EVMMultiOnRamp_forwardFromRouter:test_ShouldIncrementSeqNumAndNonce_Success() (gas: 231448) -EVM2EVMMultiOnRamp_forwardFromRouter:test_ShouldStoreLinkFees() (gas: 142663) -EVM2EVMMultiOnRamp_forwardFromRouter:test_ShouldStoreNonLinkFees() (gas: 169604) -EVM2EVMMultiOnRamp_forwardFromRouter:test_SourceTokenDataTooLarge_Revert() (gas: 3779910) -EVM2EVMMultiOnRamp_forwardFromRouter:test_TooManyTokens_Revert() (gas: 32971) -EVM2EVMMultiOnRamp_forwardFromRouter:test_Unhealthy_Revert() (gas: 44263) -EVM2EVMMultiOnRamp_forwardFromRouter:test_UnsupportedToken_Revert() (gas: 135530) -EVM2EVMMultiOnRamp_forwardFromRouter:test_ZeroAddressReceiver_Revert() (gas: 282987) -EVM2EVMMultiOnRamp_forwardFromRouter:test_forwardFromRouter_UnsupportedToken_Revert() (gas: 98591) -EVM2EVMMultiOnRamp_forwardFromRouter:test_forwardFromRouter_WithValidation_Success() (gas: 275208) +EVM2EVMMultiOnRamp_constructor:test_Constructor_Success() (gas: 4895404) +EVM2EVMMultiOnRamp_forwardFromRouter:test_CannotSendZeroTokens_Revert() (gas: 96382) +EVM2EVMMultiOnRamp_forwardFromRouter:test_EnforceOutOfOrder_Revert() (gas: 102566) +EVM2EVMMultiOnRamp_forwardFromRouter:test_ForwardFromRouterExtraArgsV2AllowOutOfOrderTrue_Success() (gas: 125845) +EVM2EVMMultiOnRamp_forwardFromRouter:test_ForwardFromRouterExtraArgsV2_Success() (gas: 156591) +EVM2EVMMultiOnRamp_forwardFromRouter:test_ForwardFromRouterSuccessCustomExtraArgs() (gas: 156102) +EVM2EVMMultiOnRamp_forwardFromRouter:test_ForwardFromRouterSuccessEmptyExtraArgs() (gas: 156332) +EVM2EVMMultiOnRamp_forwardFromRouter:test_ForwardFromRouterSuccessLegacyExtraArgs() (gas: 156357) +EVM2EVMMultiOnRamp_forwardFromRouter:test_ForwardFromRouter_Success() (gas: 155802) +EVM2EVMMultiOnRamp_forwardFromRouter:test_InvalidAddressEncodePacked_Revert() (gas: 35086) +EVM2EVMMultiOnRamp_forwardFromRouter:test_InvalidAddress_Revert() (gas: 35347) +EVM2EVMMultiOnRamp_forwardFromRouter:test_InvalidChainSelector_Revert() (gas: 27934) +EVM2EVMMultiOnRamp_forwardFromRouter:test_InvalidExtraArgsTag_Revert() (gas: 29913) +EVM2EVMMultiOnRamp_forwardFromRouter:test_MessageGasLimitTooHigh_Revert() (gas: 31675) +EVM2EVMMultiOnRamp_forwardFromRouter:test_MessageTooLarge_Revert() (gas: 110363) +EVM2EVMMultiOnRamp_forwardFromRouter:test_MessageValidationError_Revert() (gas: 152538) +EVM2EVMMultiOnRamp_forwardFromRouter:test_MesssageFeeTooHigh_Revert() (gas: 34127) +EVM2EVMMultiOnRamp_forwardFromRouter:test_OriginalSender_Revert() (gas: 23037) +EVM2EVMMultiOnRamp_forwardFromRouter:test_Paused_Revert() (gas: 41465) +EVM2EVMMultiOnRamp_forwardFromRouter:test_Permissions_Revert() (gas: 25882) +EVM2EVMMultiOnRamp_forwardFromRouter:test_ShouldIncrementNonceOnlyOnOrdered_Success() (gas: 204962) +EVM2EVMMultiOnRamp_forwardFromRouter:test_ShouldIncrementSeqNumAndNonce_Success() (gas: 231235) +EVM2EVMMultiOnRamp_forwardFromRouter:test_ShouldStoreLinkFees() (gas: 142548) +EVM2EVMMultiOnRamp_forwardFromRouter:test_ShouldStoreNonLinkFees() (gas: 169489) +EVM2EVMMultiOnRamp_forwardFromRouter:test_SourceTokenDataTooLarge_Revert() (gas: 3778765) +EVM2EVMMultiOnRamp_forwardFromRouter:test_TooManyTokens_Revert() (gas: 32857) +EVM2EVMMultiOnRamp_forwardFromRouter:test_Unhealthy_Revert() (gas: 44213) +EVM2EVMMultiOnRamp_forwardFromRouter:test_UnsupportedToken_Revert() (gas: 135415) +EVM2EVMMultiOnRamp_forwardFromRouter:test_ZeroAddressReceiver_Revert() (gas: 281847) +EVM2EVMMultiOnRamp_forwardFromRouter:test_forwardFromRouter_UnsupportedToken_Revert() (gas: 98476) +EVM2EVMMultiOnRamp_forwardFromRouter:test_forwardFromRouter_WithValidation_Success() (gas: 274979) EVM2EVMMultiOnRamp_getDataAvailabilityCost:test_EmptyMessageCalculatesDataAvailabilityCost_Success() (gas: 124845) EVM2EVMMultiOnRamp_getDataAvailabilityCost:test_SimpleMessageCalculatesDataAvailabilityCostUnsupportedDestChainSelector_Success() (gas: 11969) EVM2EVMMultiOnRamp_getDataAvailabilityCost:test_SimpleMessageCalculatesDataAvailabilityCost_Success() (gas: 24662) @@ -337,77 +324,77 @@ EVM2EVMMultiOnRamp_setDynamicConfig:test_SetConfigOnlyOwner_Revert() (gas: 16243 EVM2EVMMultiOnRamp_setDynamicConfig:test_SetDynamicConfig_Success() (gas: 60038) EVM2EVMMultiOnRamp_withdrawFeeTokens:test_WithdrawFeeTokens_Success() (gas: 97129) EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_NotACompatiblePool_Revert() (gas: 38076) -EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_Success() (gas: 108365) -EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_TokenHandlingError_revert_Revert() (gas: 116906) -EVM2EVMOffRamp__releaseOrMintTokens:test_OverValueWithARLOff_Success() (gas: 392217) -EVM2EVMOffRamp__releaseOrMintTokens:test_PriceNotFoundForToken_Reverts() (gas: 145340) -EVM2EVMOffRamp__releaseOrMintTokens:test_RateLimitErrors_Reverts() (gas: 789345) -EVM2EVMOffRamp__releaseOrMintTokens:test_TokenHandlingError_Reverts() (gas: 176477) +EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_Success() (gas: 108251) +EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_TokenHandlingError_revert_Revert() (gas: 116792) +EVM2EVMOffRamp__releaseOrMintTokens:test_OverValueWithARLOff_Success() (gas: 391761) +EVM2EVMOffRamp__releaseOrMintTokens:test_PriceNotFoundForToken_Reverts() (gas: 145226) +EVM2EVMOffRamp__releaseOrMintTokens:test_RateLimitErrors_Reverts() (gas: 788205) +EVM2EVMOffRamp__releaseOrMintTokens:test_TokenHandlingError_Reverts() (gas: 176249) EVM2EVMOffRamp__releaseOrMintTokens:test__releaseOrMintTokens_NotACompatiblePool_Reverts() (gas: 29724) EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_InvalidDataLengthReturnData_Revert() (gas: 63379) EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_InvalidEVMAddress_Revert() (gas: 44501) -EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_Success() (gas: 214353) -EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_destDenominatedDecimals_Success() (gas: 306982) -EVM2EVMOffRamp__report:test_Report_Success() (gas: 127824) -EVM2EVMOffRamp__trialExecute:test_RateLimitError_Success() (gas: 255301) -EVM2EVMOffRamp__trialExecute:test_TokenHandlingErrorIsCaught_Success() (gas: 263892) -EVM2EVMOffRamp__trialExecute:test_TokenPoolIsNotAContract_Success() (gas: 336088) -EVM2EVMOffRamp__trialExecute:test_trialExecute_Success() (gas: 314736) +EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_Success() (gas: 214125) +EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_destDenominatedDecimals_Success() (gas: 306891) +EVM2EVMOffRamp__report:test_Report_Success() (gas: 127704) +EVM2EVMOffRamp__trialExecute:test_RateLimitError_Success() (gas: 255073) +EVM2EVMOffRamp__trialExecute:test_TokenHandlingErrorIsCaught_Success() (gas: 263664) +EVM2EVMOffRamp__trialExecute:test_TokenPoolIsNotAContract_Success() (gas: 335854) +EVM2EVMOffRamp__trialExecute:test_trialExecute_Success() (gas: 314502) EVM2EVMOffRamp_ccipReceive:test_Reverts() (gas: 17096) EVM2EVMOffRamp_constructor:test_CommitStoreAlreadyInUse_Revert() (gas: 153464) EVM2EVMOffRamp_constructor:test_Constructor_Success() (gas: 5491136) EVM2EVMOffRamp_constructor:test_ZeroOnRampAddress_Revert() (gas: 144220) -EVM2EVMOffRamp_execute:test_EmptyReport_Revert() (gas: 21459) -EVM2EVMOffRamp_execute:test_InvalidMessageId_Revert() (gas: 36556) -EVM2EVMOffRamp_execute:test_InvalidSourceChain_Revert() (gas: 51824) -EVM2EVMOffRamp_execute:test_InvalidSourcePoolAddress_Success() (gas: 474330) -EVM2EVMOffRamp_execute:test_ManualExecutionNotYetEnabled_Revert() (gas: 46537) -EVM2EVMOffRamp_execute:test_MessageTooLarge_Revert() (gas: 152576) -EVM2EVMOffRamp_execute:test_Paused_Revert() (gas: 101560) -EVM2EVMOffRamp_execute:test_ReceiverError_Success() (gas: 165312) -EVM2EVMOffRamp_execute:test_RetryFailedMessageWithoutManualExecution_Revert() (gas: 178182) -EVM2EVMOffRamp_execute:test_RootNotCommitted_Revert() (gas: 41431) -EVM2EVMOffRamp_execute:test_RouterYULCall_Revert() (gas: 402717) -EVM2EVMOffRamp_execute:test_SingleMessageNoTokensUnordered_Success() (gas: 160103) -EVM2EVMOffRamp_execute:test_SingleMessageNoTokens_Success() (gas: 175334) -EVM2EVMOffRamp_execute:test_SingleMessageToNonCCIPReceiver_Success() (gas: 248878) -EVM2EVMOffRamp_execute:test_SingleMessagesNoTokensSuccess_gas() (gas: 115349) -EVM2EVMOffRamp_execute:test_SkippedIncorrectNonceStillExecutes_Success() (gas: 409892) -EVM2EVMOffRamp_execute:test_SkippedIncorrectNonce_Success() (gas: 54296) -EVM2EVMOffRamp_execute:test_StrictUntouchedToSuccess_Success() (gas: 132420) -EVM2EVMOffRamp_execute:test_TokenDataMismatch_Revert() (gas: 52323) -EVM2EVMOffRamp_execute:test_TwoMessagesWithTokensAndGE_Success() (gas: 561156) -EVM2EVMOffRamp_execute:test_TwoMessagesWithTokensSuccess_gas() (gas: 500392) -EVM2EVMOffRamp_execute:test_UnexpectedTokenData_Revert() (gas: 35556) -EVM2EVMOffRamp_execute:test_Unhealthy_Revert() (gas: 549423) -EVM2EVMOffRamp_execute:test_UnsupportedNumberOfTokens_Revert() (gas: 64168) -EVM2EVMOffRamp_execute:test__execute_SkippedAlreadyExecutedMessageUnordered_Success() (gas: 123671) -EVM2EVMOffRamp_execute:test__execute_SkippedAlreadyExecutedMessage_Success() (gas: 143834) +EVM2EVMOffRamp_execute:test_EmptyReport_Revert() (gas: 21345) +EVM2EVMOffRamp_execute:test_InvalidMessageId_Revert() (gas: 36442) +EVM2EVMOffRamp_execute:test_InvalidSourceChain_Revert() (gas: 51710) +EVM2EVMOffRamp_execute:test_InvalidSourcePoolAddress_Success() (gas: 473868) +EVM2EVMOffRamp_execute:test_ManualExecutionNotYetEnabled_Revert() (gas: 46423) +EVM2EVMOffRamp_execute:test_MessageTooLarge_Revert() (gas: 152462) +EVM2EVMOffRamp_execute:test_Paused_Revert() (gas: 101458) +EVM2EVMOffRamp_execute:test_ReceiverError_Success() (gas: 165192) +EVM2EVMOffRamp_execute:test_RetryFailedMessageWithoutManualExecution_Revert() (gas: 177948) +EVM2EVMOffRamp_execute:test_RootNotCommitted_Revert() (gas: 41317) +EVM2EVMOffRamp_execute:test_RouterYULCall_Revert() (gas: 402597) +EVM2EVMOffRamp_execute:test_SingleMessageNoTokensUnordered_Success() (gas: 159863) +EVM2EVMOffRamp_execute:test_SingleMessageNoTokens_Success() (gas: 175094) +EVM2EVMOffRamp_execute:test_SingleMessageToNonCCIPReceiver_Success() (gas: 248764) +EVM2EVMOffRamp_execute:test_SingleMessagesNoTokensSuccess_gas() (gas: 115229) +EVM2EVMOffRamp_execute:test_SkippedIncorrectNonceStillExecutes_Success() (gas: 409544) +EVM2EVMOffRamp_execute:test_SkippedIncorrectNonce_Success() (gas: 54182) +EVM2EVMOffRamp_execute:test_StrictUntouchedToSuccess_Success() (gas: 132300) +EVM2EVMOffRamp_execute:test_TokenDataMismatch_Revert() (gas: 52209) +EVM2EVMOffRamp_execute:test_TwoMessagesWithTokensAndGE_Success() (gas: 560574) +EVM2EVMOffRamp_execute:test_TwoMessagesWithTokensSuccess_gas() (gas: 499810) +EVM2EVMOffRamp_execute:test_UnexpectedTokenData_Revert() (gas: 35442) +EVM2EVMOffRamp_execute:test_Unhealthy_Revert() (gas: 547373) +EVM2EVMOffRamp_execute:test_UnsupportedNumberOfTokens_Revert() (gas: 64054) +EVM2EVMOffRamp_execute:test__execute_SkippedAlreadyExecutedMessageUnordered_Success() (gas: 123437) +EVM2EVMOffRamp_execute:test__execute_SkippedAlreadyExecutedMessage_Success() (gas: 143600) EVM2EVMOffRamp_executeSingleMessage:test_MessageSender_Revert() (gas: 20615) -EVM2EVMOffRamp_executeSingleMessage:test_NonContractWithTokens_Success() (gas: 282106) +EVM2EVMOffRamp_executeSingleMessage:test_NonContractWithTokens_Success() (gas: 281878) EVM2EVMOffRamp_executeSingleMessage:test_NonContract_Success() (gas: 20264) -EVM2EVMOffRamp_executeSingleMessage:test_TokenHandlingError_Revert() (gas: 219510) -EVM2EVMOffRamp_executeSingleMessage:test_ZeroGasDONExecution_Revert() (gas: 48753) -EVM2EVMOffRamp_executeSingleMessage:test_executeSingleMessage_NoTokens_Success() (gas: 48241) -EVM2EVMOffRamp_executeSingleMessage:test_executeSingleMessage_WithTokens_Success() (gas: 316806) -EVM2EVMOffRamp_executeSingleMessage:test_executeSingleMessage_ZeroGasZeroData_Success() (gas: 72643) -EVM2EVMOffRamp_execute_upgrade:test_V2NonceNewSenderStartsAtZero_Success() (gas: 232046) -EVM2EVMOffRamp_execute_upgrade:test_V2NonceStartsAtV1Nonce_Success() (gas: 280987) -EVM2EVMOffRamp_execute_upgrade:test_V2OffRampNonceSkipsIfMsgInFlight_Success() (gas: 262028) -EVM2EVMOffRamp_execute_upgrade:test_V2SenderNoncesReadsPreviousRamp_Success() (gas: 230529) -EVM2EVMOffRamp_execute_upgrade:test_V2_Success() (gas: 132026) +EVM2EVMOffRamp_executeSingleMessage:test_TokenHandlingError_Revert() (gas: 219282) +EVM2EVMOffRamp_executeSingleMessage:test_ZeroGasDONExecution_Revert() (gas: 48747) +EVM2EVMOffRamp_executeSingleMessage:test_executeSingleMessage_NoTokens_Success() (gas: 48235) +EVM2EVMOffRamp_executeSingleMessage:test_executeSingleMessage_WithTokens_Success() (gas: 316572) +EVM2EVMOffRamp_executeSingleMessage:test_executeSingleMessage_ZeroGasZeroData_Success() (gas: 72637) +EVM2EVMOffRamp_execute_upgrade:test_V2NonceNewSenderStartsAtZero_Success() (gas: 231806) +EVM2EVMOffRamp_execute_upgrade:test_V2NonceStartsAtV1Nonce_Success() (gas: 280627) +EVM2EVMOffRamp_execute_upgrade:test_V2OffRampNonceSkipsIfMsgInFlight_Success() (gas: 261674) +EVM2EVMOffRamp_execute_upgrade:test_V2SenderNoncesReadsPreviousRamp_Success() (gas: 230169) +EVM2EVMOffRamp_execute_upgrade:test_V2_Success() (gas: 131906) EVM2EVMOffRamp_getAllRateLimitTokens:test_GetAllRateLimitTokens_Success() (gas: 38408) EVM2EVMOffRamp_getExecutionState:test_FillExecutionState_Success() (gas: 3213556) EVM2EVMOffRamp_getExecutionState:test_GetExecutionState_Success() (gas: 83091) -EVM2EVMOffRamp_manuallyExecute:test_LowGasLimitManualExec_Success() (gas: 484053) -EVM2EVMOffRamp_manuallyExecute:test_ManualExecFailedTx_Revert() (gas: 187049) +EVM2EVMOffRamp_manuallyExecute:test_LowGasLimitManualExec_Success() (gas: 483813) +EVM2EVMOffRamp_manuallyExecute:test_ManualExecFailedTx_Revert() (gas: 186809) EVM2EVMOffRamp_manuallyExecute:test_ManualExecForkedChain_Revert() (gas: 25894) EVM2EVMOffRamp_manuallyExecute:test_ManualExecGasLimitMismatch_Revert() (gas: 43519) EVM2EVMOffRamp_manuallyExecute:test_ManualExecInvalidGasLimit_Revert() (gas: 26009) -EVM2EVMOffRamp_manuallyExecute:test_ManualExecWithGasOverride_Success() (gas: 189243) -EVM2EVMOffRamp_manuallyExecute:test_ManualExec_Success() (gas: 188704) -EVM2EVMOffRamp_manuallyExecute:test_ReentrancyManualExecuteFails() (gas: 2028045) -EVM2EVMOffRamp_manuallyExecute:test_manuallyExecute_DoesNotRevertIfUntouched_Success() (gas: 144226) +EVM2EVMOffRamp_manuallyExecute:test_ManualExecWithGasOverride_Success() (gas: 189003) +EVM2EVMOffRamp_manuallyExecute:test_ManualExec_Success() (gas: 188464) +EVM2EVMOffRamp_manuallyExecute:test_ReentrancyManualExecuteFails() (gas: 2027697) +EVM2EVMOffRamp_manuallyExecute:test_manuallyExecute_DoesNotRevertIfUntouched_Success() (gas: 144106) EVM2EVMOffRamp_metadataHash:test_MetadataHash_Success() (gas: 8871) EVM2EVMOffRamp_setDynamicConfig:test_NonOwner_Revert() (gas: 40429) EVM2EVMOffRamp_setDynamicConfig:test_RouterZeroAddress_Revert() (gas: 38804) @@ -420,40 +407,40 @@ EVM2EVMOnRamp_applyPremiumMultiplierWeiPerEthUpdates:test_applyPremiumMultiplier EVM2EVMOnRamp_applyPremiumMultiplierWeiPerEthUpdates:test_applyPremiumMultiplierWeiPerEthUpdatesSingleToken_Success() (gas: 44807) EVM2EVMOnRamp_applyPremiumMultiplierWeiPerEthUpdates:test_applyPremiumMultiplierWeiPerEthUpdatesZeroInput() (gas: 12324) EVM2EVMOnRamp_constructor:test_Constructor_Success() (gas: 5635586) -EVM2EVMOnRamp_forwardFromRouter:test_CannotSendZeroTokens_Revert() (gas: 35902) -EVM2EVMOnRamp_forwardFromRouter:test_EnforceOutOfOrder_Revert() (gas: 99602) -EVM2EVMOnRamp_forwardFromRouter:test_ForwardFromRouterExtraArgsV2AllowOutOfOrderTrue_Success() (gas: 118721) -EVM2EVMOnRamp_forwardFromRouter:test_ForwardFromRouterExtraArgsV2_Success() (gas: 118763) -EVM2EVMOnRamp_forwardFromRouter:test_ForwardFromRouterSuccessCustomExtraArgs() (gas: 130499) -EVM2EVMOnRamp_forwardFromRouter:test_ForwardFromRouterSuccessLegacyExtraArgs() (gas: 139025) -EVM2EVMOnRamp_forwardFromRouter:test_ForwardFromRouter_Success() (gas: 130179) -EVM2EVMOnRamp_forwardFromRouter:test_InvalidAddressEncodePacked_Revert() (gas: 40605) -EVM2EVMOnRamp_forwardFromRouter:test_InvalidAddress_Revert() (gas: 40800) -EVM2EVMOnRamp_forwardFromRouter:test_InvalidChainSelector_Revert() (gas: 25631) -EVM2EVMOnRamp_forwardFromRouter:test_InvalidExtraArgsTag_Revert() (gas: 25417) -EVM2EVMOnRamp_forwardFromRouter:test_MaxCapacityExceeded_Revert() (gas: 86092) -EVM2EVMOnRamp_forwardFromRouter:test_MaxFeeBalanceReached_Revert() (gas: 36581) -EVM2EVMOnRamp_forwardFromRouter:test_MessageGasLimitTooHigh_Revert() (gas: 29163) -EVM2EVMOnRamp_forwardFromRouter:test_MessageTooLarge_Revert() (gas: 107646) -EVM2EVMOnRamp_forwardFromRouter:test_OriginalSender_Revert() (gas: 22755) -EVM2EVMOnRamp_forwardFromRouter:test_OverValueWithARLOff_Success() (gas: 224149) -EVM2EVMOnRamp_forwardFromRouter:test_Paused_Revert() (gas: 54055) -EVM2EVMOnRamp_forwardFromRouter:test_Permissions_Revert() (gas: 25601) -EVM2EVMOnRamp_forwardFromRouter:test_PriceNotFoundForToken_Revert() (gas: 59214) -EVM2EVMOnRamp_forwardFromRouter:test_ShouldIncrementNonceOnlyOnOrdered_Success() (gas: 182848) -EVM2EVMOnRamp_forwardFromRouter:test_ShouldIncrementSeqNumAndNonce_Success() (gas: 178451) -EVM2EVMOnRamp_forwardFromRouter:test_ShouldStoreNonLinkFees() (gas: 137487) -EVM2EVMOnRamp_forwardFromRouter:test_SourceTokenDataTooLarge_Revert() (gas: 3735328) -EVM2EVMOnRamp_forwardFromRouter:test_TooManyTokens_Revert() (gas: 30307) -EVM2EVMOnRamp_forwardFromRouter:test_Unhealthy_Revert() (gas: 43356) -EVM2EVMOnRamp_forwardFromRouter:test_UnsupportedToken_Revert() (gas: 109493) -EVM2EVMOnRamp_forwardFromRouter:test_ZeroAddressReceiver_Revert() (gas: 336597) -EVM2EVMOnRamp_forwardFromRouter:test_forwardFromRouter_ShouldStoreLinkFees_Success() (gas: 112694) -EVM2EVMOnRamp_forwardFromRouter:test_forwardFromRouter_UnsupportedToken_Revert() (gas: 72556) -EVM2EVMOnRamp_forwardFromRouter_upgrade:test_V2NonceNewSenderStartsAtZero_Success() (gas: 148168) -EVM2EVMOnRamp_forwardFromRouter_upgrade:test_V2NonceStartsAtV1Nonce_Success() (gas: 191115) -EVM2EVMOnRamp_forwardFromRouter_upgrade:test_V2SenderNoncesReadsPreviousRamp_Success() (gas: 122367) -EVM2EVMOnRamp_forwardFromRouter_upgrade:test_V2_Success() (gas: 95509) +EVM2EVMOnRamp_forwardFromRouter:test_CannotSendZeroTokens_Revert() (gas: 35788) +EVM2EVMOnRamp_forwardFromRouter:test_EnforceOutOfOrder_Revert() (gas: 99488) +EVM2EVMOnRamp_forwardFromRouter:test_ForwardFromRouterExtraArgsV2AllowOutOfOrderTrue_Success() (gas: 118607) +EVM2EVMOnRamp_forwardFromRouter:test_ForwardFromRouterExtraArgsV2_Success() (gas: 118649) +EVM2EVMOnRamp_forwardFromRouter:test_ForwardFromRouterSuccessCustomExtraArgs() (gas: 130385) +EVM2EVMOnRamp_forwardFromRouter:test_ForwardFromRouterSuccessLegacyExtraArgs() (gas: 138911) +EVM2EVMOnRamp_forwardFromRouter:test_ForwardFromRouter_Success() (gas: 130065) +EVM2EVMOnRamp_forwardFromRouter:test_InvalidAddressEncodePacked_Revert() (gas: 40491) +EVM2EVMOnRamp_forwardFromRouter:test_InvalidAddress_Revert() (gas: 40686) +EVM2EVMOnRamp_forwardFromRouter:test_InvalidChainSelector_Revert() (gas: 25517) +EVM2EVMOnRamp_forwardFromRouter:test_InvalidExtraArgsTag_Revert() (gas: 25303) +EVM2EVMOnRamp_forwardFromRouter:test_MaxCapacityExceeded_Revert() (gas: 85978) +EVM2EVMOnRamp_forwardFromRouter:test_MaxFeeBalanceReached_Revert() (gas: 36467) +EVM2EVMOnRamp_forwardFromRouter:test_MessageGasLimitTooHigh_Revert() (gas: 29049) +EVM2EVMOnRamp_forwardFromRouter:test_MessageTooLarge_Revert() (gas: 107532) +EVM2EVMOnRamp_forwardFromRouter:test_OriginalSender_Revert() (gas: 22641) +EVM2EVMOnRamp_forwardFromRouter:test_OverValueWithARLOff_Success() (gas: 223807) +EVM2EVMOnRamp_forwardFromRouter:test_Paused_Revert() (gas: 53941) +EVM2EVMOnRamp_forwardFromRouter:test_Permissions_Revert() (gas: 25487) +EVM2EVMOnRamp_forwardFromRouter:test_PriceNotFoundForToken_Revert() (gas: 59100) +EVM2EVMOnRamp_forwardFromRouter:test_ShouldIncrementNonceOnlyOnOrdered_Success() (gas: 182506) +EVM2EVMOnRamp_forwardFromRouter:test_ShouldIncrementSeqNumAndNonce_Success() (gas: 178109) +EVM2EVMOnRamp_forwardFromRouter:test_ShouldStoreNonLinkFees() (gas: 137373) +EVM2EVMOnRamp_forwardFromRouter:test_SourceTokenDataTooLarge_Revert() (gas: 3734188) +EVM2EVMOnRamp_forwardFromRouter:test_TooManyTokens_Revert() (gas: 30193) +EVM2EVMOnRamp_forwardFromRouter:test_Unhealthy_Revert() (gas: 43306) +EVM2EVMOnRamp_forwardFromRouter:test_UnsupportedToken_Revert() (gas: 109379) +EVM2EVMOnRamp_forwardFromRouter:test_ZeroAddressReceiver_Revert() (gas: 335457) +EVM2EVMOnRamp_forwardFromRouter:test_forwardFromRouter_ShouldStoreLinkFees_Success() (gas: 112580) +EVM2EVMOnRamp_forwardFromRouter:test_forwardFromRouter_UnsupportedToken_Revert() (gas: 72442) +EVM2EVMOnRamp_forwardFromRouter_upgrade:test_V2NonceNewSenderStartsAtZero_Success() (gas: 147940) +EVM2EVMOnRamp_forwardFromRouter_upgrade:test_V2NonceStartsAtV1Nonce_Success() (gas: 190773) +EVM2EVMOnRamp_forwardFromRouter_upgrade:test_V2SenderNoncesReadsPreviousRamp_Success() (gas: 122025) +EVM2EVMOnRamp_forwardFromRouter_upgrade:test_V2_Success() (gas: 95395) EVM2EVMOnRamp_getDataAvailabilityCost:test_EmptyMessageCalculatesDataAvailabilityCost_Success() (gas: 20760) EVM2EVMOnRamp_getDataAvailabilityCost:test_SimpleMessageCalculatesDataAvailabilityCost_Success() (gas: 21128) EVM2EVMOnRamp_getFee:test_EmptyMessage_Success() (gas: 78194) @@ -486,7 +473,7 @@ EVM2EVMOnRamp_payNops:test_NoFeesToPay_Revert() (gas: 127459) EVM2EVMOnRamp_payNops:test_NoNopsToPay_Revert() (gas: 133360) EVM2EVMOnRamp_payNops:test_NopPayNops_Success() (gas: 146371) EVM2EVMOnRamp_payNops:test_OwnerPayNops_Success() (gas: 140962) -EVM2EVMOnRamp_payNops:test_PayNopsSuccessAfterSetNops() (gas: 297945) +EVM2EVMOnRamp_payNops:test_PayNopsSuccessAfterSetNops() (gas: 297831) EVM2EVMOnRamp_payNops:test_WrongPermissions_Revert() (gas: 15324) EVM2EVMOnRamp_setDynamicConfig:test_SetConfigInvalidConfig_Revert() (gas: 43376) EVM2EVMOnRamp_setDynamicConfig:test_SetConfigOnlyOwner_Revert() (gas: 21646) @@ -495,10 +482,10 @@ EVM2EVMOnRamp_setFeeTokenConfig:test_OnlyCallableByOwnerOrAdmin_Revert() (gas: 1 EVM2EVMOnRamp_setFeeTokenConfig:test_SetFeeTokenConfigByAdmin_Success() (gas: 16467) EVM2EVMOnRamp_setFeeTokenConfig:test_SetFeeTokenConfig_Success() (gas: 14020) EVM2EVMOnRamp_setNops:test_AdminCanSetNops_Success() (gas: 61788) -EVM2EVMOnRamp_setNops:test_IncludesPayment_Success() (gas: 469556) +EVM2EVMOnRamp_setNops:test_IncludesPayment_Success() (gas: 469442) EVM2EVMOnRamp_setNops:test_LinkTokenCannotBeNop_Revert() (gas: 57290) EVM2EVMOnRamp_setNops:test_NonOwnerOrAdmin_Revert() (gas: 14683) -EVM2EVMOnRamp_setNops:test_NotEnoughFundsForPayout_Revert() (gas: 84914) +EVM2EVMOnRamp_setNops:test_NotEnoughFundsForPayout_Revert() (gas: 84800) EVM2EVMOnRamp_setNops:test_SetNopsRemovesOldNopsCompletely_Success() (gas: 60696) EVM2EVMOnRamp_setNops:test_SetNops_Success() (gas: 173721) EVM2EVMOnRamp_setNops:test_TooManyNops_Revert() (gas: 190364) @@ -507,9 +494,9 @@ EVM2EVMOnRamp_setTokenTransferFeeConfig:test__setTokenTransferFeeConfig_InvalidD EVM2EVMOnRamp_setTokenTransferFeeConfig:test__setTokenTransferFeeConfig_OnlyCallableByOwnerOrAdmin_Revert() (gas: 14295) EVM2EVMOnRamp_setTokenTransferFeeConfig:test__setTokenTransferFeeConfig_Success() (gas: 84069) EVM2EVMOnRamp_setTokenTransferFeeConfig:test__setTokenTransferFeeConfig_byAdmin_Success() (gas: 17387) -EVM2EVMOnRamp_withdrawNonLinkFees:test_LinkBalanceNotSettled_Revert() (gas: 83375) +EVM2EVMOnRamp_withdrawNonLinkFees:test_LinkBalanceNotSettled_Revert() (gas: 83261) EVM2EVMOnRamp_withdrawNonLinkFees:test_NonOwnerOrAdmin_Revert() (gas: 15293) -EVM2EVMOnRamp_withdrawNonLinkFees:test_SettlingBalance_Success() (gas: 272352) +EVM2EVMOnRamp_withdrawNonLinkFees:test_SettlingBalance_Success() (gas: 272260) EVM2EVMOnRamp_withdrawNonLinkFees:test_WithdrawNonLinkFees_Success() (gas: 53472) EVM2EVMOnRamp_withdrawNonLinkFees:test_WithdrawToZeroAddress_Revert() (gas: 12856) EtherSenderReceiverTest_ccipReceive:test_ccipReceive_fallbackToWethTransfer() (gas: 96729) @@ -547,14 +534,14 @@ LockReleaseTokenPoolPoolAndProxy_supportsInterface:test_SupportsInterface_Succes LockReleaseTokenPoolPoolAndProxy_withdrawalLiquidity:test_InsufficientLiquidity_Revert() (gas: 60043) LockReleaseTokenPoolPoolAndProxy_withdrawalLiquidity:test_Unauthorized_Revert() (gas: 11355) LockReleaseTokenPool_canAcceptLiquidity:test_CanAcceptLiquidity_Success() (gas: 3068883) -LockReleaseTokenPool_lockOrBurn:test_LockOrBurnWithAllowList_Revert() (gas: 30068) -LockReleaseTokenPool_lockOrBurn:test_LockOrBurnWithAllowList_Success() (gas: 80096) -LockReleaseTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 59514) +LockReleaseTokenPool_lockOrBurn:test_LockOrBurnWithAllowList_Revert() (gas: 29954) +LockReleaseTokenPool_lockOrBurn:test_LockOrBurnWithAllowList_Success() (gas: 79868) +LockReleaseTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 59464) LockReleaseTokenPool_provideLiquidity:test_LiquidityNotAccepted_Revert() (gas: 3065325) LockReleaseTokenPool_provideLiquidity:test_Unauthorized_Revert() (gas: 11380) -LockReleaseTokenPool_releaseOrMint:test_ChainNotAllowed_Revert() (gas: 72753) -LockReleaseTokenPool_releaseOrMint:test_PoolMintNotHealthy_Revert() (gas: 56181) -LockReleaseTokenPool_releaseOrMint:test_ReleaseOrMint_Success() (gas: 238764) +LockReleaseTokenPool_releaseOrMint:test_ChainNotAllowed_Revert() (gas: 72662) +LockReleaseTokenPool_releaseOrMint:test_PoolMintNotHealthy_Revert() (gas: 56131) +LockReleaseTokenPool_releaseOrMint:test_ReleaseOrMint_Success() (gas: 238673) LockReleaseTokenPool_setChainRateLimiterConfig:test_NonExistentChain_Revert() (gas: 17102) LockReleaseTokenPool_setChainRateLimiterConfig:test_OnlyOwnerOrRateLimitAdmin_Revert() (gas: 69075) LockReleaseTokenPool_setChainRateLimiterConfig:test_OnlyOwner_Revert() (gas: 17297) @@ -650,16 +637,28 @@ MultiOCR3Base_transmit:test_UnAuthorizedTransmitter_Revert() (gas: 24191) MultiOCR3Base_transmit:test_UnauthorizedSigner_Revert() (gas: 61409) MultiOCR3Base_transmit:test_UnconfiguredPlugin_Revert() (gas: 39890) MultiOCR3Base_transmit:test_ZeroSignatures_Revert() (gas: 32973) -MultiRampsE2E:test_E2E_3MessagesSuccess_gas() (gas: 1412650) -NonceManagerTest_getIncrementedOutboundNonce:test_getIncrementedOutboundNonce_Success() (gas: 40392) -NonceManager_applyPreviousRampsUpdates:test_MultipleRampsUpdates() (gas: 68922) -NonceManager_applyPreviousRampsUpdates:test_PreviousRampAlreadySetOnRamp_Revert() (gas: 38712) -NonceManager_applyPreviousRampsUpdates:test_SingleRampUpdate() (gas: 39539) -NonceManager_applyPreviousRampsUpdates:test_ZeroInput() (gas: 12007) -NonceManager_onRampUpgrade:test_UpgradeNonceNewSenderStartsAtZero_Success() (gas: 173566) -NonceManager_onRampUpgrade:test_UpgradeNonceStartsAtV1Nonce_Success() (gas: 217628) -NonceManager_onRampUpgrade:test_UpgradeSenderNoncesReadsPreviousRamp_Success() (gas: 125961) -NonceManager_onRampUpgrade:test_Upgrade_Success() (gas: 120933) +MultiRampsE2E:test_E2E_3MessagesSuccess_gas() (gas: 1435700) +NonceManager_NonceIncrementation:test_getIncrementedOutboundNonce_Success() (gas: 37907) +NonceManager_NonceIncrementation:test_incrementInboundNonce_Skip() (gas: 23694) +NonceManager_NonceIncrementation:test_incrementInboundNonce_Success() (gas: 38763) +NonceManager_NonceIncrementation:test_incrementNoncesInboundAndOutbound_Success() (gas: 71847) +NonceManager_OffRampUpgrade:test_NoPrevOffRampForChain_Success() (gas: 255244) +NonceManager_OffRampUpgrade:test_UpgradedNonceNewSenderStartsAtZero_Success() (gas: 257899) +NonceManager_OffRampUpgrade:test_UpgradedNonceStartsAtV1Nonce_Success() (gas: 313263) +NonceManager_OffRampUpgrade:test_UpgradedOffRampNonceSkipsIfMsgInFlight_Success() (gas: 295481) +NonceManager_OffRampUpgrade:test_UpgradedSenderNoncesReadsPreviousRampTransitive_Success() (gas: 248932) +NonceManager_OffRampUpgrade:test_UpgradedSenderNoncesReadsPreviousRamp_Success() (gas: 236918) +NonceManager_OffRampUpgrade:test_Upgraded_Success() (gas: 147192) +NonceManager_OnRampUpgrade:test_UpgradeNonceNewSenderStartsAtZero_Success() (gas: 173337) +NonceManager_OnRampUpgrade:test_UpgradeNonceStartsAtV1Nonce_Success() (gas: 217372) +NonceManager_OnRampUpgrade:test_UpgradeSenderNoncesReadsPreviousRamp_Success() (gas: 125707) +NonceManager_OnRampUpgrade:test_Upgrade_Success() (gas: 120818) +NonceManager_applyPreviousRampsUpdates:test_MultipleRampsUpdates() (gas: 122899) +NonceManager_applyPreviousRampsUpdates:test_PreviousRampAlreadySetOffRamp_Revert() (gas: 42959) +NonceManager_applyPreviousRampsUpdates:test_PreviousRampAlreadySetOnRampAndOffRamp_Revert() (gas: 64282) +NonceManager_applyPreviousRampsUpdates:test_PreviousRampAlreadySetOnRamp_Revert() (gas: 42823) +NonceManager_applyPreviousRampsUpdates:test_SingleRampUpdate() (gas: 66548) +NonceManager_applyPreviousRampsUpdates:test_ZeroInput() (gas: 12025) OCR2BaseNoChecks_setOCR2Config:test_FMustBePositive_Revert() (gas: 12171) OCR2BaseNoChecks_setOCR2Config:test_RepeatAddress_Revert() (gas: 42233) OCR2BaseNoChecks_setOCR2Config:test_SetConfigSuccess_gas() (gas: 84124) @@ -685,10 +684,10 @@ OCR2Base_transmit:test_Transmit2SignersSuccess_gas() (gas: 51686) OCR2Base_transmit:test_UnAuthorizedTransmitter_Revert() (gas: 23484) OCR2Base_transmit:test_UnauthorizedSigner_Revert() (gas: 39665) OCR2Base_transmit:test_WrongNumberOfSignatures_Revert() (gas: 20557) -OnRampTokenPoolReentrancy:test_OnRampTokenPoolReentrancy_Success() (gas: 380951) -PingPong_ccipReceive:test_CcipReceive_Success() (gas: 148731) +OnRampTokenPoolReentrancy:test_OnRampTokenPoolReentrancy_Success() (gas: 380711) +PingPong_ccipReceive:test_CcipReceive_Success() (gas: 148611) PingPong_plumbing:test_Pausing_Success() (gas: 17803) -PingPong_startPingPong:test_StartPingPong_Success() (gas: 178667) +PingPong_startPingPong:test_StartPingPong_Success() (gas: 178547) PriceRegistry_applyFeeTokensUpdates:test_ApplyFeeTokensUpdates_Success() (gas: 79823) PriceRegistry_applyFeeTokensUpdates:test_OnlyCallableByOwner_Revert() (gas: 12580) PriceRegistry_constructor:test_InvalidStalenessThreshold_Revert() (gas: 67418) @@ -726,40 +725,62 @@ PriceRegistry_updateTokenPriceFeeds:test_FeedUpdatedByNonOwner_Revert() (gas: 19 PriceRegistry_updateTokenPriceFeeds:test_MultipleFeedUpdate_Success() (gas: 88796) PriceRegistry_updateTokenPriceFeeds:test_SingleFeedUpdate_Success() (gas: 50733) PriceRegistry_updateTokenPriceFeeds:test_ZeroFeeds_Success() (gas: 12296) -RMN_constructor:test_Constructor_Success() (gas: 58091) -RMN_ownerUnbless:test_Unbless_Success() (gas: 71926) -RMN_ownerUnvoteToCurse:test_CanBlessAndCurseAfterRecovery() (gas: 236626) -RMN_ownerUnvoteToCurse:test_IsIdempotent() (gas: 198633) -RMN_ownerUnvoteToCurse:test_NonOwner_Revert() (gas: 14981) -RMN_ownerUnvoteToCurse:test_OwnerUnvoteToCurseSuccess_gas() (gas: 179810) -RMN_setConfig:test_BlessVoterIsZeroAddress_Revert() (gas: 17975) -RMN_setConfig:test_EitherThresholdIsZero_Revert() (gas: 25955) -RMN_setConfig:test_NonOwner_Revert() (gas: 15063) -RMN_setConfig:test_RepeatedAddress_Revert() (gas: 21309) -RMN_setConfig:test_SetConfigSuccess_gas() (gas: 111473) -RMN_setConfig:test_TotalWeightsSmallerThanEachThreshold_Revert() (gas: 39589) -RMN_setConfig:test_VoteToBlessByEjectedVoter_Revert() (gas: 142372) -RMN_setConfig:test_VotersLengthIsZero_Revert() (gas: 14272) -RMN_setConfig:test_WeightIsZeroAddress_Revert() (gas: 18174) -RMN_unvoteToCurse:test_InvalidCurseState_Revert() (gas: 18158) -RMN_unvoteToCurse:test_InvalidCursesHash() (gas: 23200) -RMN_unvoteToCurse:test_InvalidVoter() (gas: 86794) -RMN_unvoteToCurse:test_OwnerSkips() (gas: 29220) -RMN_unvoteToCurse:test_OwnerSucceeds() (gas: 26951) -RMN_unvoteToCurse:test_ValidCursesHash() (gas: 31510) -RMN_voteToBlessRoots:test_1RootSuccess_gas() (gas: 45454) -RMN_voteToBlessRoots:test_3RootSuccess_gas() (gas: 99549) -RMN_voteToBlessRoots:test_5RootSuccess_gas() (gas: 153757) -RMN_voteToBlessRoots:test_Curse_Revert() (gas: 244265) -RMN_voteToBlessRoots:test_InvalidVoter_Revert() (gas: 17029) -RMN_voteToBlessRoots:test_IsAlreadyBlessedIgnored_Success() (gas: 124904) -RMN_voteToBlessRoots:test_SenderAlreadyVotedIgnored_Success() (gas: 114423) -RMN_voteToCurse:test_AlreadyVoted_Revert() (gas: 74738) -RMN_voteToCurse:test_EmitCurse_Success() (gas: 243463) -RMN_voteToCurse:test_EvenIfAlreadyCursed_Success() (gas: 275806) -RMN_voteToCurse:test_InvalidVoter_Revert() (gas: 13671) -RMN_voteToCurse:test_OwnerCanCurseAndUncurse() (gas: 194255) -RMN_voteToCurse:test_VoteToCurseSuccess_gas() (gas: 70265) +RMN_constructor:test_Constructor_Success() (gas: 48838) +RMN_getRecordedCurseRelatedOps:test_OpsPostDeployment() (gas: 19666) +RMN_lazyVoteToCurseUpdate_Benchmark:test_VoteToCurseLazilyRetain3VotersUponConfigChange_gas() (gas: 152152) +RMN_ownerUnbless:test_Unbless_Success() (gas: 74699) +RMN_ownerUnvoteToCurse:test_CanBlessAndCurseAfterGlobalCurseIsLifted() (gas: 470965) +RMN_ownerUnvoteToCurse:test_IsIdempotent() (gas: 397532) +RMN_ownerUnvoteToCurse:test_NonOwner_Revert() (gas: 18591) +RMN_ownerUnvoteToCurse:test_OwnerUnvoteToCurseSuccess_gas() (gas: 357403) +RMN_ownerUnvoteToCurse:test_UnknownVoter_Revert() (gas: 32980) +RMN_ownerUnvoteToCurse_Benchmark:test_OwnerUnvoteToCurse_1Voter_LiftsCurse_gas() (gas: 261985) +RMN_permaBlessing:test_PermaBlessing() (gas: 202686) +RMN_setConfig:test_BlessVoterIsZeroAddress_Revert() (gas: 15494) +RMN_setConfig:test_EitherThresholdIsZero_Revert() (gas: 21095) +RMN_setConfig:test_NonOwner_Revert() (gas: 14713) +RMN_setConfig:test_RepeatedAddress_Revert() (gas: 18213) +RMN_setConfig:test_SetConfigSuccess_gas() (gas: 104204) +RMN_setConfig:test_TotalWeightsSmallerThanEachThreshold_Revert() (gas: 30173) +RMN_setConfig:test_VoteToBlessByEjectedVoter_Revert() (gas: 130303) +RMN_setConfig:test_VotersLengthIsZero_Revert() (gas: 12128) +RMN_setConfig:test_WeightIsZeroAddress_Revert() (gas: 15734) +RMN_setConfig_Benchmark_1:test_SetConfig_7Voters_gas() (gas: 659123) +RMN_setConfig_Benchmark_2:test_ResetConfig_7Voters_gas() (gas: 212156) +RMN_unvoteToCurse:test_InvalidCursesHash() (gas: 26364) +RMN_unvoteToCurse:test_OwnerSkips() (gas: 33753) +RMN_unvoteToCurse:test_OwnerSucceeds() (gas: 63909) +RMN_unvoteToCurse:test_UnauthorizedVoter() (gas: 47478) +RMN_unvoteToCurse:test_ValidCursesHash() (gas: 61067) +RMN_unvoteToCurse:test_VotersCantLiftCurseButOwnerCan() (gas: 627750) +RMN_voteToBless:test_Curse_Revert() (gas: 472823) +RMN_voteToBless:test_IsAlreadyBlessed_Revert() (gas: 114829) +RMN_voteToBless:test_RootSuccess() (gas: 555559) +RMN_voteToBless:test_SenderAlreadyVoted_Revert() (gas: 96730) +RMN_voteToBless:test_UnauthorizedVoter_Revert() (gas: 17087) +RMN_voteToBless_Benchmark:test_1RootSuccess_gas() (gas: 44667) +RMN_voteToBless_Benchmark:test_3RootSuccess_gas() (gas: 98565) +RMN_voteToBless_Benchmark:test_5RootSuccess_gas() (gas: 152401) +RMN_voteToBless_Blessed_Benchmark:test_1RootSuccessBecameBlessed_gas() (gas: 29619) +RMN_voteToBless_Blessed_Benchmark:test_1RootSuccess_gas() (gas: 27565) +RMN_voteToBless_Blessed_Benchmark:test_3RootSuccess_gas() (gas: 81485) +RMN_voteToBless_Blessed_Benchmark:test_5RootSuccess_gas() (gas: 135299) +RMN_voteToCurse:test_CurseOnlyWhenThresholdReached_Success() (gas: 1648701) +RMN_voteToCurse:test_EmptySubjects_Revert() (gas: 14019) +RMN_voteToCurse:test_EvenIfAlreadyCursed_Success() (gas: 534332) +RMN_voteToCurse:test_OwnerCanCurseAndUncurse() (gas: 399001) +RMN_voteToCurse:test_RepeatedSubject_Revert() (gas: 144225) +RMN_voteToCurse:test_ReusedCurseId_Revert() (gas: 146738) +RMN_voteToCurse:test_UnauthorizedVoter_Revert() (gas: 12600) +RMN_voteToCurse:test_VoteToCurse_NoCurse_Success() (gas: 187244) +RMN_voteToCurse:test_VoteToCurse_YesCurse_Success() (gas: 472452) +RMN_voteToCurse_2:test_VotesAreDroppedIfSubjectIsNotCursedDuringConfigChange() (gas: 370468) +RMN_voteToCurse_2:test_VotesAreRetainedIfSubjectIsCursedDuringConfigChange() (gas: 1151909) +RMN_voteToCurse_Benchmark_1:test_VoteToCurse_NewSubject_NewVoter_NoCurse_gas() (gas: 140968) +RMN_voteToCurse_Benchmark_1:test_VoteToCurse_NewSubject_NewVoter_YesCurse_gas() (gas: 165087) +RMN_voteToCurse_Benchmark_2:test_VoteToCurse_OldSubject_NewVoter_NoCurse_gas() (gas: 121305) +RMN_voteToCurse_Benchmark_2:test_VoteToCurse_OldSubject_OldVoter_NoCurse_gas() (gas: 98247) +RMN_voteToCurse_Benchmark_3:test_VoteToCurse_OldSubject_NewVoter_YesCurse_gas() (gas: 145631) RateLimiter_constructor:test_Constructor_Success() (gas: 19650) RateLimiter_consume:test_AggregateValueMaxCapacityExceeded_Revert() (gas: 15916) RateLimiter_consume:test_AggregateValueRateLimitReached_Revert() (gas: 22222) @@ -779,24 +800,24 @@ RegistryModuleOwnerCustom_registerAdminViaGetCCIPAdmin:test_registerAdminViaGetC RegistryModuleOwnerCustom_registerAdminViaOwner:test_registerAdminViaOwner_Revert() (gas: 19451) RegistryModuleOwnerCustom_registerAdminViaOwner:test_registerAdminViaOwner_Success() (gas: 129731) Router_applyRampUpdates:test_OffRampMismatch_Revert() (gas: 89288) -Router_applyRampUpdates:test_OffRampUpdatesWithRouting() (gas: 10643448) +Router_applyRampUpdates:test_OffRampUpdatesWithRouting() (gas: 10642128) Router_applyRampUpdates:test_OnRampDisable() (gas: 55913) Router_applyRampUpdates:test_OnlyOwner_Revert() (gas: 12311) -Router_ccipSend:test_CCIPSendLinkFeeNoTokenSuccess_gas() (gas: 114212) -Router_ccipSend:test_CCIPSendLinkFeeOneTokenSuccess_gas() (gas: 201163) -Router_ccipSend:test_CCIPSendNativeFeeNoTokenSuccess_gas() (gas: 128820) -Router_ccipSend:test_CCIPSendNativeFeeOneTokenSuccess_gas() (gas: 215773) -Router_ccipSend:test_FeeTokenAmountTooLow_Revert() (gas: 66257) -Router_ccipSend:test_InvalidMsgValue() (gas: 31969) -Router_ccipSend:test_NativeFeeTokenInsufficientValue() (gas: 68693) -Router_ccipSend:test_NativeFeeTokenOverpay_Success() (gas: 173893) -Router_ccipSend:test_NativeFeeTokenZeroValue() (gas: 56019) -Router_ccipSend:test_NativeFeeToken_Success() (gas: 172487) -Router_ccipSend:test_NonLinkFeeToken_Success() (gas: 243022) -Router_ccipSend:test_UnsupportedDestinationChain_Revert() (gas: 24755) -Router_ccipSend:test_WhenNotHealthy_Revert() (gas: 44669) -Router_ccipSend:test_WrappedNativeFeeToken_Success() (gas: 174703) -Router_ccipSend:test_ZeroFeeAndGasPrice_Success() (gas: 243269) +Router_ccipSend:test_CCIPSendLinkFeeNoTokenSuccess_gas() (gas: 114092) +Router_ccipSend:test_CCIPSendLinkFeeOneTokenSuccess_gas() (gas: 200929) +Router_ccipSend:test_CCIPSendNativeFeeNoTokenSuccess_gas() (gas: 128700) +Router_ccipSend:test_CCIPSendNativeFeeOneTokenSuccess_gas() (gas: 215539) +Router_ccipSend:test_FeeTokenAmountTooLow_Revert() (gas: 66251) +Router_ccipSend:test_InvalidMsgValue() (gas: 31963) +Router_ccipSend:test_NativeFeeTokenInsufficientValue() (gas: 68687) +Router_ccipSend:test_NativeFeeTokenOverpay_Success() (gas: 173773) +Router_ccipSend:test_NativeFeeTokenZeroValue() (gas: 56013) +Router_ccipSend:test_NativeFeeToken_Success() (gas: 172367) +Router_ccipSend:test_NonLinkFeeToken_Success() (gas: 242902) +Router_ccipSend:test_UnsupportedDestinationChain_Revert() (gas: 24749) +Router_ccipSend:test_WhenNotHealthy_Revert() (gas: 44724) +Router_ccipSend:test_WrappedNativeFeeToken_Success() (gas: 174583) +Router_ccipSend:test_ZeroFeeAndGasPrice_Success() (gas: 243149) Router_constructor:test_Constructor_Success() (gas: 13074) Router_getArmProxy:test_getArmProxy() (gas: 10561) Router_getFee:test_GetFeeSupportedChain_Success() (gas: 46440) @@ -807,14 +828,14 @@ Router_recoverTokens:test_RecoverTokensNoFunds_Revert() (gas: 17761) Router_recoverTokens:test_RecoverTokensNonOwner_Revert() (gas: 11159) Router_recoverTokens:test_RecoverTokensValueReceiver_Revert() (gas: 422138) Router_recoverTokens:test_RecoverTokens_Success() (gas: 50437) -Router_routeMessage:test_AutoExec_Success() (gas: 42696) -Router_routeMessage:test_ExecutionEvent_Success() (gas: 158020) -Router_routeMessage:test_ManualExec_Success() (gas: 35387) -Router_routeMessage:test_OnlyOffRamp_Revert() (gas: 25122) -Router_routeMessage:test_WhenNotHealthy_Revert() (gas: 44669) +Router_routeMessage:test_AutoExec_Success() (gas: 42684) +Router_routeMessage:test_ExecutionEvent_Success() (gas: 158002) +Router_routeMessage:test_ManualExec_Success() (gas: 35381) +Router_routeMessage:test_OnlyOffRamp_Revert() (gas: 25116) +Router_routeMessage:test_WhenNotHealthy_Revert() (gas: 44724) Router_setWrappedNative:test_OnlyOwner_Revert() (gas: 10985) SelfFundedPingPong_ccipReceive:test_FundingIfNotANop_Revert() (gas: 53600) -SelfFundedPingPong_ccipReceive:test_Funding_Success() (gas: 418951) +SelfFundedPingPong_ccipReceive:test_Funding_Success() (gas: 418231) SelfFundedPingPong_setCountIncrBeforeFunding:test_setCountIncrBeforeFunding() (gas: 20157) TokenAdminRegistry_acceptAdminRole:test_acceptAdminRole_OnlyPendingAdministrator_Revert() (gas: 51085) TokenAdminRegistry_acceptAdminRole:test_acceptAdminRole_Success() (gas: 43947) @@ -838,10 +859,10 @@ TokenAdminRegistry_setPool:test_setPool_Success() (gas: 35943) TokenAdminRegistry_setPool:test_setPool_ZeroAddressRemovesPool_Success() (gas: 30617) TokenAdminRegistry_transferAdminRole:test_transferAdminRole_OnlyAdministrator_Revert() (gas: 18043) TokenAdminRegistry_transferAdminRole:test_transferAdminRole_Success() (gas: 49390) -TokenPoolAndProxy:test_lockOrBurn_burnMint_Success() (gas: 6038283) -TokenPoolAndProxy:test_lockOrBurn_lockRelease_Success() (gas: 6284039) -TokenPoolAndProxyMigration:test_tokenPoolMigration_Success_1_2() (gas: 6886284) -TokenPoolAndProxyMigration:test_tokenPoolMigration_Success_1_4() (gas: 7070387) +TokenPoolAndProxy:test_lockOrBurn_burnMint_Success() (gas: 6037815) +TokenPoolAndProxy:test_lockOrBurn_lockRelease_Success() (gas: 6283571) +TokenPoolAndProxyMigration:test_tokenPoolMigration_Success_1_2() (gas: 6885180) +TokenPoolAndProxyMigration:test_tokenPoolMigration_Success_1_4() (gas: 7069295) TokenPoolWithAllowList_applyAllowListUpdates:test_AllowListNotEnabled_Revert() (gas: 2169749) TokenPoolWithAllowList_applyAllowListUpdates:test_OnlyOwner_Revert() (gas: 12089) TokenPoolWithAllowList_applyAllowListUpdates:test_SetAllowListSkipsZero_Success() (gas: 23280) @@ -872,23 +893,23 @@ TokenPool_setRemotePool:test_setRemotePool_Success() (gas: 281890) TokenProxy_ccipSend:test_CcipSendGasShouldBeZero_Revert() (gas: 17109) TokenProxy_ccipSend:test_CcipSendInsufficientAllowance_Revert() (gas: 136327) TokenProxy_ccipSend:test_CcipSendInvalidToken_Revert() (gas: 15919) -TokenProxy_ccipSend:test_CcipSendNative_Success() (gas: 244973) +TokenProxy_ccipSend:test_CcipSendNative_Success() (gas: 244739) TokenProxy_ccipSend:test_CcipSendNoDataAllowed_Revert() (gas: 16303) -TokenProxy_ccipSend:test_CcipSend_Success() (gas: 261504) +TokenProxy_ccipSend:test_CcipSend_Success() (gas: 261316) TokenProxy_constructor:test_Constructor() (gas: 13812) TokenProxy_getFee:test_GetFeeGasShouldBeZero_Revert() (gas: 16827) TokenProxy_getFee:test_GetFeeInvalidToken_Revert() (gas: 12658) TokenProxy_getFee:test_GetFeeNoDataAllowed_Revert() (gas: 15849) TokenProxy_getFee:test_GetFee_Success() (gas: 86900) USDCTokenPool__validateMessage:test_ValidateInvalidMessage_Revert() (gas: 24960) -USDCTokenPool_lockOrBurn:test_CallerIsNotARampOnRouter_Revert() (gas: 35446) -USDCTokenPool_lockOrBurn:test_LockOrBurnWithAllowList_Revert() (gas: 30189) -USDCTokenPool_lockOrBurn:test_LockOrBurn_Success() (gas: 132972) -USDCTokenPool_lockOrBurn:test_UnknownDomain_Revert() (gas: 477343) -USDCTokenPool_lockOrBurn:test_lockOrBurn_InvalidReceiver_Revert() (gas: 52740) -USDCTokenPool_releaseOrMint:test_ReleaseOrMintRealTx_Success() (gas: 289360) -USDCTokenPool_releaseOrMint:test_TokenMaxCapacityExceeded_Revert() (gas: 50796) -USDCTokenPool_releaseOrMint:test_UnlockingUSDCFailed_Revert() (gas: 119299) +USDCTokenPool_lockOrBurn:test_CallerIsNotARampOnRouter_Revert() (gas: 35332) +USDCTokenPool_lockOrBurn:test_LockOrBurnWithAllowList_Revert() (gas: 30075) +USDCTokenPool_lockOrBurn:test_LockOrBurn_Success() (gas: 132880) +USDCTokenPool_lockOrBurn:test_UnknownDomain_Revert() (gas: 477229) +USDCTokenPool_lockOrBurn:test_lockOrBurn_InvalidReceiver_Revert() (gas: 52626) +USDCTokenPool_releaseOrMint:test_ReleaseOrMintRealTx_Success() (gas: 289268) +USDCTokenPool_releaseOrMint:test_TokenMaxCapacityExceeded_Revert() (gas: 50682) +USDCTokenPool_releaseOrMint:test_UnlockingUSDCFailed_Revert() (gas: 119185) USDCTokenPool_setDomains:test_InvalidDomain_Revert() (gas: 66150) USDCTokenPool_setDomains:test_OnlyOwner_Revert() (gas: 11339) USDCTokenPool_supportsInterface:test_SupportsInterface_Success() (gas: 9876) \ 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 661de2b842..3cfecbc056 100755 --- a/contracts/scripts/native_solc_compile_all_ccip +++ b/contracts/scripts/native_solc_compile_all_ccip @@ -10,7 +10,7 @@ SOLC_VERSION="0.8.24" OPTIMIZE_RUNS=26000 OPTIMIZE_RUNS_OFFRAMP=18000 OPTIMIZE_RUNS_ONRAMP=3600 -OPTIMIZE_RUNS_MULTI_OFFRAMP=1800 +OPTIMIZE_RUNS_MULTI_OFFRAMP=2400 SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" @@ -75,13 +75,15 @@ compileContract ccip/RMN.sol compileContract ccip/ARMProxy.sol compileContract ccip/tokenAdminRegistry/TokenAdminRegistry.sol compileContract ccip/tokenAdminRegistry/RegistryModuleOwnerCustom.sol -compileContract ccip/capability/CCIPCapabilityConfiguration.sol +compileContract ccip/capability/CCIPConfig.sol +compileContract ccip/capability/interfaces/IOCR3ConfigEncoder.sol # Test helpers compileContract ccip/test/helpers/BurnMintERC677Helper.sol compileContract ccip/test/helpers/CommitStoreHelper.sol +compileContract ccip/test/helpers/MessageHasher.sol compileContract ccip/test/helpers/receivers/MaybeRevertMessageReceiver.sol -compileContract ccip/test/mocks/MockRMN.sol +compileContract ccip/test/mocks/MockRMN1_0.sol compileContract ccip/test/mocks/MockE2EUSDCTokenMessenger.sol compileContract ccip/test/mocks/MockE2EUSDCTransmitter.sol compileContract ccip/test/WETH9.sol diff --git a/contracts/src/v0.8/ccip/NonceManager.sol b/contracts/src/v0.8/ccip/NonceManager.sol index 96e5fd03e4..2cfcbbe9e2 100644 --- a/contracts/src/v0.8/ccip/NonceManager.sol +++ b/contracts/src/v0.8/ccip/NonceManager.sol @@ -11,12 +11,13 @@ import {AuthorizedCallers} from "../shared/access/AuthorizedCallers.sol"; contract NonceManager is INonceManager, AuthorizedCallers { error PreviousRampAlreadySet(); - event PreviousOnRampUpdated(uint64 indexed destChainSelector, address prevOnRamp); + event PreviousRampsUpdated(uint64 indexed remoteChainSelector, PreviousRamps prevRamp); + event SkippedIncorrectNonce(uint64 sourceChainSelector, uint64 nonce, bytes sender); /// @dev Struct that contains the previous on/off ramp addresses - // TODO: add prevOffRamp struct PreviousRamps { address prevOnRamp; // Previous onRamp + address prevOffRamp; // Previous offRamp } /// @dev Struct that contains the chain selector and the previous on/off ramps, same as PreviousRamps but with the chain selector @@ -30,6 +31,10 @@ contract NonceManager is INonceManager, AuthorizedCallers { mapping(uint64 chainSelector => PreviousRamps previousRamps) private s_previousRamps; /// @dev The current outbound nonce per sender used on the onramp mapping(uint64 destChainSelector => mapping(address sender => uint64 outboundNonce)) private s_outboundNonces; + /// @dev The current inbound nonce per sender used on the offramp + /// Eventually in sync with the outbound nonce in the remote source chain NonceManager, used to enforce that messages are + /// executed in the same order they are sent (assuming they are DON) + mapping(uint64 sourceChainSelector => mapping(bytes sender => uint64 inboundNonce)) private s_inboundNonces; constructor(address[] memory authorizedCallers) AuthorizedCallers(authorizedCallers) {} @@ -44,9 +49,7 @@ contract NonceManager is INonceManager, AuthorizedCallers { return outboundNonce; } - /// TODO: add incrementInboundNonce - - /// @notice Returns the outbound nonce for the given sender on the given destination chain + /// @notice Returns the outbound nonce for a given sender on a given destination chain /// @param destChainSelector The destination chain selector /// @param sender The sender address /// @return The outbound nonce @@ -57,6 +60,8 @@ contract NonceManager is INonceManager, AuthorizedCallers { function _getOutboundNonce(uint64 destChainSelector, address sender) private view returns (uint64) { uint64 outboundNonce = s_outboundNonces[destChainSelector][sender]; + // When introducing the NonceManager with existing lanes, we still want to have sequential nonces. + // Referencing the old onRamp preserves sequencing between updates. if (outboundNonce == 0) { address prevOnRamp = s_previousRamps[destChainSelector].prevOnRamp; if (prevOnRamp != address(0)) { @@ -67,7 +72,51 @@ contract NonceManager is INonceManager, AuthorizedCallers { return outboundNonce; } - /// TODO: add getInboundNonce + /// @inheritdoc INonceManager + function incrementInboundNonce( + uint64 sourceChainSelector, + uint64 expectedNonce, + bytes calldata sender + ) external onlyAuthorizedCallers returns (bool) { + uint64 inboundNonce = _getInboundNonce(sourceChainSelector, sender) + 1; + + if (inboundNonce != expectedNonce) { + // If the nonce is not the expected one, this means that there are still messages in flight so we skip + // the nonce increment + emit SkippedIncorrectNonce(sourceChainSelector, expectedNonce, sender); + return false; + } + + s_inboundNonces[sourceChainSelector][sender] = inboundNonce; + + return true; + } + + /// @notice Returns the inbound nonce for a given sender on a given source chain + /// @param sourceChainSelector The source chain selector + /// @param sender The encoded sender address + /// @return The inbound nonce + function getInboundNonce(uint64 sourceChainSelector, bytes calldata sender) external view returns (uint64) { + return _getInboundNonce(sourceChainSelector, sender); + } + + function _getInboundNonce(uint64 sourceChainSelector, bytes calldata sender) private view returns (uint64) { + uint64 inboundNonce = s_inboundNonces[sourceChainSelector][sender]; + + // When introducing the NonceManager with existing lanes, we still want to have sequential nonces. + // Referencing the old offRamp to check the expected nonce if none is set for a + // given sender allows us to skip the current message in the current offRamp if it would not be the next according + // to the old offRamp. This preserves sequencing between updates. + if (inboundNonce == 0) { + address prevOffRamp = s_previousRamps[sourceChainSelector].prevOffRamp; + if (prevOffRamp != address(0)) { + // We only expect EVM previous offRamps here so we can safely decode the sender + return IEVM2AnyOnRamp(prevOffRamp).getSenderNonce(abi.decode(sender, (address))); + } + } + + return inboundNonce; + } /// @notice Updates the previous ramps addresses /// @param previousRampsArgs The previous on/off ramps addresses @@ -77,13 +126,15 @@ contract NonceManager is INonceManager, AuthorizedCallers { PreviousRamps storage prevRamps = s_previousRamps[previousRampsArg.remoteChainSelector]; - // If the previous onRamp is already set then it should not be updated - if (prevRamps.prevOnRamp != address(0)) { + // If the previous ramps are already set then they should not be updated + if (prevRamps.prevOnRamp != address(0) || prevRamps.prevOffRamp != address(0)) { revert PreviousRampAlreadySet(); } prevRamps.prevOnRamp = previousRampsArg.prevRamps.prevOnRamp; - emit PreviousOnRampUpdated(previousRampsArg.remoteChainSelector, prevRamps.prevOnRamp); + prevRamps.prevOffRamp = previousRampsArg.prevRamps.prevOffRamp; + + emit PreviousRampsUpdated(previousRampsArg.remoteChainSelector, previousRampsArg.prevRamps); } } diff --git a/contracts/src/v0.8/ccip/RMN.sol b/contracts/src/v0.8/ccip/RMN.sol index ec11aa4816..424aad8fa5 100644 --- a/contracts/src/v0.8/ccip/RMN.sol +++ b/contracts/src/v0.8/ccip/RMN.sol @@ -6,23 +6,48 @@ import {IRMN} from "./interfaces/IRMN.sol"; import {OwnerIsCreator} from "./../shared/access/OwnerIsCreator.sol"; +import {EnumerableSet} from "../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/structs/EnumerableSet.sol"; + +// An active curse on this subject will cause isCursed() to return true. Use this subject if there is an issue with a +// remote chain, for which there exists a legacy lane contract deployed on the same chain as this RMN contract is +// deployed, relying on isCursed(). +bytes16 constant LEGACY_CURSE_SUBJECT = 0x01000000000000000000000000000000; + +// An active curse on this subject will cause isCursed() and isCursed(bytes32) to return true. Use this subject for +// issues affecting all of CCIP chains, or pertaining to the chain that this contract is deployed on, instead of using +// the local chain selector as a subject. +bytes16 constant GLOBAL_CURSE_SUBJECT = 0x01000000000000000000000000000001; + +// The curse vote address representing the owner in data structures, events and recorded votes. Remains constant, even +// if the owner changes. +address constant OWNER_CURSE_VOTE_ADDR = address(~uint160(0)); // 0xff...ff + +// The curse vote address used in an OwnerUnvoteToCurseRequest to lift a curse, if there is no active curse votes for +// the subject that we are able to unvote, but the conditions for an active curse no longer hold. +address constant LIFT_CURSE_VOTE_ADDR = address(0); + /// @dev This contract is owned by RMN, if changing, please notify the RMN maintainers. // solhint-disable chainlink-solidity/explicit-returns contract RMN is IRMN, OwnerIsCreator, ITypeAndVersion { + using EnumerableSet for EnumerableSet.AddressSet; + // STATIC CONFIG string public constant override typeAndVersion = "RMN 1.5.0-dev"; - uint256 private constant MAX_NUM_VOTERS = 128; + uint256 private constant MAX_NUM_VOTERS = 16; + + // MAGIC VALUES + bytes28 private constant NO_VOTES_CURSES_HASH = bytes28(0); // DYNAMIC CONFIG - //solhint-disable gas-struct-packing + /// @notice blessVoteAddr and curseVoteAddr can't be 0. Additionally curseVoteAddr can't be LIFT_CURSE_VOTE_ADDR or + /// OWNER_CURSE_VOTE_ADDR. At least one of blessWeight & curseWeight must be non-zero, i.e., a voter could only vote + /// to bless, or only vote to curse, or both vote to bless and vote to curse. struct Voter { // This is the address the voter should use to call voteToBless. address blessVoteAddr; // This is the address the voter should use to call voteToCurse. address curseVoteAddr; - // This is the address the voter should use to call unvoteToCurse. - address curseUnvoteAddr; // The weight of this voter's vote for blessing. uint8 blessWeight; // The weight of this voter's vote for cursing. @@ -34,8 +59,8 @@ contract RMN is IRMN, OwnerIsCreator, ITypeAndVersion { // When the total weight of voters that have voted to bless a tagged root reaches // or exceeds blessWeightThreshold, the tagged root becomes blessed. uint16 blessWeightThreshold; - // When the total weight of voters that have voted to curse reaches or - // exceeds curseWeightThreshold, the RMN enters the cursed state. + // When the total weight of voters that have voted to curse a subject reaches or + // exceeds curseWeightThreshold, the subject becomes cursed. uint16 curseWeightThreshold; } @@ -65,58 +90,157 @@ contract RMN is IRMN, OwnerIsCreator, ITypeAndVersion { mapping(address blessVoteAddr => BlesserRecord blesserRecord) private s_blesserRecords; struct BlessVoteProgress { + // This particular ordering saves us ~400 gas per voteToBless call, compared to the bool being at the bottom, even + // though the size of the struct is the same. + bool weightThresholdMet; // A BlessVoteProgress is considered invalid if weightThresholdMet is false when // s_versionedConfig.configVersion changes. we don't want old in-progress // votes to continue when we set a new config! // The config version at which the bless vote for a tagged root was initiated. uint32 configVersion; uint16 accumulatedWeight; - // Care must be taken that the bitmap has as many bits as MAX_NUM_VOTERS. - uint128 voterBitmap; - bool weightThresholdMet; + // Care must be taken that the bitmap has at least as many bits as MAX_NUM_VOTERS. + // uint200 is much larger than we need, but it saves us ~100 gas per voteToBless call to fill the word instead of + // using a smaller type. + // _bitmapGet(voterBitmap, i) = true indicates that the i-th voter has voted to bless + uint200 voterBitmap; } mapping(bytes32 taggedRootHash => BlessVoteProgress blessVoteProgress) private s_blessVoteProgressByTaggedRootHash; - // voteCount and cursesHash can be reset through unvoteToCurse, and ownerUnvoteToCurse, and may be reset through - // setConfig if the curser is not part of the new config. + // Any tagged root with a commit store included in s_permaBlessedCommitStores will be considered automatically + // blessed. + EnumerableSet.AddressSet private s_permaBlessedCommitStores; + struct CurserRecord { bool active; uint8 weight; - uint32 voteCount; - address curseUnvoteAddr; - bytes32 cursesHash; + mapping(bytes16 curseId => bool used) usedCurseIds; // retained across config changes } mapping(address curseVoteAddr => CurserRecord curserRecord) private s_curserRecords; - // Maintains a per-curser set of curseIds. Entries from this mapping are - // never cleared. Once a curseId is used it can never be reused, even after - // an unvoteToCurse or ownerUnvoteToCurse. This is to prevent accidental - // re-votes to curse, e.g. caused by TOCTOU issues. - mapping(address curseVoteAddr => mapping(bytes32 curseId => bool voted)) private s_curseVotes; + struct ConfigVersionAndCursesHash { + uint32 configVersion; // configVersion != s_versionedConfig.configVersion means no active vote + bytes28 cursesHash; // bytes28(0) means no active vote; truncated so that ConfigVersionAndCursesHash fits in a word + } struct CurseVoteProgress { - uint16 curseWeightThreshold; - uint16 accumulatedWeight; - // A curse becomes active after: - // - accumulatedWeight becomes greater or equal than curseWeightThreshold; or - // - the owner curses. + uint32 configVersion; // upon config change, lazy set to new config version + uint16 curseWeightThreshold; // upon config change, lazy set to new config value + uint16 accumulatedWeight; // upon config change, lazy set to 0 + // A curse becomes active after either: + // - sum([voter.weight for voter who voted in current config]) >= curseWeightThreshold + // - ownerCurse is invoked // Once a curse is active, only the owner can lift it. - bool curseActive; + bool curseActive; // retained across config changes + mapping(address => ConfigVersionAndCursesHash) latestVoteToCurseByCurseVoteAddr; // retained across config changes } - CurseVoteProgress private s_curseVoteProgress; + mapping(bytes16 subject => CurseVoteProgress curseVoteProgress) private + s_potentiallyOutdatedCurseVoteProgressBySubject; - // AUXILLARY STRUCTS - //solhint-disable gas-struct-packing - struct UnvoteToCurseRecord { - address curseVoteAddr; - bytes32 cursesHash; - bool forceUnvote; + // We intentionally use a struct here, even though it contains a single field, to make it obvious to future editors + // that there is space for more fields. + struct CurseHotVars { + uint64 numSubjectsCursed; // incremented by voteToCurse, ownerCurse; decremented by ownerUnvoteToCurse + } + + CurseHotVars private s_curseHotVars; + + enum RecordedCurseRelatedOpTag { + // A vote to curse, through either voteToCurse or ownerCurse. + VoteToCurse, + // An unvote to curse, through unvoteToCurse. + UnvoteToCurse, + // An unvote to curse, through ownerUnvoteToCurse, which was not forced (forceUnvote=false). + OwnerUnvoteToCurseUnforced, + // An unvote to curse, through ownerUnvoteToCurse, which was forced (forceUnvote=true). + OwnerUnvoteToCurseForced, + // A configuration change. + // + // For subjects that are not cursed when this happens, past votes do not get accounted for in the new configuration. + // If a voter votes during the new configuration, their curses hash will restart from NO_VOTES_CURSES_HASH. + // + // For subjects that are cursed when this happens, past votes get accounted for. + // If a voter votes during the new configuration, their curses hash will continue from its old value. + SetConfig + } + + /// @notice Provides the ability to quickly reconstruct the curse-related state of the contract offchain, without + /// having to replay all past events. Replaying past events often takes long, and in some cases might even be + /// infeasible due to log pruning. + /// + /// @dev We could save some gas by omitting some fields and instead using them as mapping keys, but we would lose the + /// cross-voter ordering, or cross-subject ordering, or cross-vote/unvote ordering. + struct RecordedCurseRelatedOp { + RecordedCurseRelatedOpTag tag; + uint64 blockTimestamp; + bool cursed; // whether the subject is cursed after this op; if tag in {SetConfig}, will be false + address curseVoteAddr; // if tag in {SetConfig}, will be address(0) + bytes16 subject; // if tag in {SetConfig}, will be bytes16(0) + bytes16 curseId; // if tag in {SetConfig, UnvoteToCurse, OwnerUnvoteToCurseUnforced, OwnerUnvoteToCurseForced}, will be bytes16(0) + } + + RecordedCurseRelatedOp[] private s_recordedCurseRelatedOps; + + /// @dev This function is to _ONLY_ be called in order to determine if a curse should become active upon a + /// vote-to-curse, or a curse should be deactivated upon an owner-unvote-to-curse. + /// Other reasons for a curse to be active, which are not covered here: + /// 1. Cursedness is retained from a prior config. + /// 2. The curse weight threshold was met at some point, which activated a curse, and enough voters unvoted to curse + /// such that the curse weight threshold is no longer met. + function _shouldCurseBeActive(CurseVoteProgress storage sptr_upToDateCurseVoteProgress) internal view returns (bool) { + return sptr_upToDateCurseVoteProgress.latestVoteToCurseByCurseVoteAddr[OWNER_CURSE_VOTE_ADDR].cursesHash + != NO_VOTES_CURSES_HASH + || sptr_upToDateCurseVoteProgress.accumulatedWeight >= sptr_upToDateCurseVoteProgress.curseWeightThreshold; + } + + /// @dev It might be the case that due to the lazy update of curseVoteProgress, a curse is active even though + /// _shouldCurseBeActive(curseVoteProgress) is false, i.e., the owner has no active vote to curse and the curse + /// weight threshold has not been met. + function _getUpToDateCurseVoteProgress( + uint32 configVersion, + bytes16 subject + ) internal returns (CurseVoteProgress storage) { + CurseVoteProgress storage sptr_curseVoteProgress = s_potentiallyOutdatedCurseVoteProgressBySubject[subject]; + if (configVersion != sptr_curseVoteProgress.configVersion) { + sptr_curseVoteProgress.configVersion = configVersion; + sptr_curseVoteProgress.curseWeightThreshold = s_versionedConfig.config.curseWeightThreshold; + sptr_curseVoteProgress.accumulatedWeight = 0; + + if (sptr_curseVoteProgress.curseActive) { + // If a curse was active, count past votes to curse and retain the curses hash for cursers who are part of the + // new config. + Config storage sptr_config = s_versionedConfig.config; + for (uint256 i = 0; i < sptr_config.voters.length; ++i) { + Voter storage sptr_voter = sptr_config.voters[i]; + ConfigVersionAndCursesHash storage sptr_cvch = + sptr_curseVoteProgress.latestVoteToCurseByCurseVoteAddr[sptr_voter.curseVoteAddr]; + if (sptr_cvch.configVersion < configVersion && sptr_cvch.cursesHash != NO_VOTES_CURSES_HASH) { + // `< configVersion` instead of `== configVersion-1`, because there might have been multiple config changes + // without a lazy update of our subject. This has the side effect of retaining votes from very old configs + // that we might not really intend to retain, but these can be removed by the owner later. + sptr_cvch.configVersion = configVersion; + sptr_curseVoteProgress.accumulatedWeight += sptr_voter.curseWeight; + } + } + // We don't need to think about OWNER_CURSE_VOTE_ADDR here, because its ConfigVersionAndCursesHash counts even + // if the configVersion is not the current config version, in contrast to regular voters. + // It's an irregularity, but it saves us > 5k gas (if the owner had previously voted) for the unlucky voter who + // enters this branch. + } else { + // If a curse was not active, we don't count past votes to curse for voters who are part of the new config. + // Their curses hash will be restart from NO_VOTES_CURSES_HASH when they vote to curse again. + // We expect that the offchain code will revote to curse in case it voted to curse, and the vote to curse was + // lost due to any reason, including a config change when the curse was not yet active. + } + } + return sptr_curseVoteProgress; } // EVENTS, ERRORS + event ConfigSet(uint32 indexed configVersion, Config config); error InvalidConfig(); @@ -128,62 +252,72 @@ contract RMN is IRMN, OwnerIsCreator, ITypeAndVersion { event VotedToCurse( uint32 indexed configVersion, address indexed voter, + bytes16 subject, + bytes16 curseId, uint8 weight, - uint32 voteCount, - bytes32 curseId, - bytes32 cursesHash, + uint64 blockTimestamp, + bytes28 cursesHash, uint16 accumulatedWeight ); - event ReusedVotesToCurse( + event UnvotedToCurse( uint32 indexed configVersion, address indexed voter, + bytes16 subject, uint8 weight, - uint32 voteCount, - bytes32 cursesHash, - uint16 accumulatedWeight + bytes28 cursesHash, + uint16 remainingAccumulatedWeight ); - event UnvotedToCurse( - uint32 indexed configVersion, address indexed voter, uint8 weight, uint32 voteCount, bytes32 cursesHash - ); - event SkippedUnvoteToCurse(address indexed voter, bytes32 expectedCursesHash, bytes32 actualCursesHash); - event OwnerCursed(uint256 timestamp); - event Cursed(uint32 indexed configVersion, uint256 timestamp); + event SkippedUnvoteToCurse(address indexed voter, bytes16 subject, bytes28 onchainCursesHash, bytes28 cursesHash); + event Cursed(uint32 indexed configVersion, bytes16 subject, uint64 blockTimestamp); + event CurseLifted(bytes16 subject); // These events make it easier for offchain logic to discover that it performs // the same actions multiple times. event AlreadyVotedToBless(uint32 indexed configVersion, address indexed voter, IRMN.TaggedRoot taggedRoot); event AlreadyBlessed(uint32 indexed configVersion, address indexed voter, IRMN.TaggedRoot taggedRoot); - event RecoveredFromCurse(); + // Emitted by ownerRemoveThenAddPermaBlessedCommitStores. + event PermaBlessedCommitStoreAdded(address commitStore); + event PermaBlessedCommitStoreRemoved(address commitStore); + + error ReusedCurseId(address voter, bytes16 curseId); + error UnauthorizedVoter(address voter); + error VoteToBlessNoop(); + error VoteToCurseNoop(); + error UnvoteToCurseNoop(); + error VoteToBlessForbiddenDuringActiveGlobalCurse(); - error AlreadyVotedToCurse(address voter, bytes32 curseId); - error InvalidVoter(address voter); - error InvalidCurseState(); - error InvalidCursesHash(bytes32 expectedCursesHash, bytes32 actualCursesHash); - error MustRecoverFromCurse(); + /// @notice Thrown when subjects are not a strictly increasing monotone sequence. + // Prevents a subject from receiving multiple votes to curse with the same curse id. + error SubjectsMustBeStrictlyIncreasing(); constructor(Config memory config) { { // Ensure that the bitmap is large enough to hold MAX_NUM_VOTERS. // We do this in the constructor because MAX_NUM_VOTERS is constant. - BlessVoteProgress memory vp; - vp.voterBitmap = ~uint128(0); + BlessVoteProgress memory vp = BlessVoteProgress({ + configVersion: 0, + voterBitmap: type(uint200).max, // will not compile if it doesn't fit + accumulatedWeight: 0, + weightThresholdMet: false + }); assert(vp.voterBitmap >> (MAX_NUM_VOTERS - 1) >= 1); } _setConfig(config); } - function _bitmapGet(uint128 bitmap, uint8 index) internal pure returns (bool) { + function _bitmapGet(uint200 bitmap, uint8 index) internal pure returns (bool) { assert(index < MAX_NUM_VOTERS); - return bitmap & (uint128(1) << index) != 0; + return bitmap & (uint200(1) << index) != 0; } - function _bitmapSet(uint128 bitmap, uint8 index) internal pure returns (uint128) { + function _bitmapSet(uint200 bitmap, uint8 index) internal pure returns (uint200) { assert(index < MAX_NUM_VOTERS); - return bitmap | (uint128(1) << index); + return bitmap | (uint200(1) << index); } - function _bitmapCount(uint128 bitmap) internal pure returns (uint8 oneBits) { + function _bitmapCount(uint200 bitmap) internal pure returns (uint8 oneBits) { + assert(bitmap < 1 << MAX_NUM_VOTERS); // https://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetKernighan for (; bitmap != 0; ++oneBits) { bitmap &= bitmap - 1; @@ -194,18 +328,29 @@ contract RMN is IRMN, OwnerIsCreator, ITypeAndVersion { return keccak256(abi.encode(taggedRoot.commitStore, taggedRoot.root)); } + function _cursesHash(bytes28 prevCursesHash, bytes16 curseId) internal pure returns (bytes28) { + return bytes28(keccak256(abi.encode(prevCursesHash, curseId))); + } + + function _blockTimestamp() internal view returns (uint64) { + return uint64(block.timestamp); + } + /// @param taggedRoots A tagged root is hashed as `keccak256(abi.encode(taggedRoot.commitStore /// /* address */, taggedRoot.root /* bytes32 */))`. + /// @notice Tagged roots which are already (voted to be) blessed are skipped and emit corresponding events. In case + /// the call has no effect, i.e., all passed tagged roots are skipped, the function reverts with a `VoteToBlessNoop`. function voteToBless(IRMN.TaggedRoot[] calldata taggedRoots) external { - // If we have an active curse, something is really wrong. Let's err on the + // If we have an active global curse, something is really wrong. Let's err on the // side of caution and not accept further blessings during this time of // uncertainty. - if (isCursed()) revert MustRecoverFromCurse(); + if (isCursed(GLOBAL_CURSE_SUBJECT)) revert VoteToBlessForbiddenDuringActiveGlobalCurse(); uint32 configVersion = s_versionedConfig.configVersion; BlesserRecord memory blesserRecord = s_blesserRecords[msg.sender]; - if (blesserRecord.configVersion != configVersion) revert InvalidVoter(msg.sender); + if (blesserRecord.configVersion != configVersion) revert UnauthorizedVoter(msg.sender); + bool noop = true; for (uint256 i = 0; i < taggedRoots.length; ++i) { IRMN.TaggedRoot memory taggedRoot = taggedRoots[i]; bytes32 taggedRootHash = _taggedRootHash(taggedRoot); @@ -219,8 +364,7 @@ contract RMN is IRMN, OwnerIsCreator, ITypeAndVersion { // count, and we want to allow that to happen. emit AlreadyBlessed(configVersion, msg.sender, taggedRoot); continue; - } - if (voteProgress.configVersion != configVersion) { + } else if (voteProgress.configVersion != configVersion) { // Note that voteProgress.weightThresholdMet must be false at this point // If votes were received while an older config was in effect, @@ -232,13 +376,13 @@ contract RMN is IRMN, OwnerIsCreator, ITypeAndVersion { accumulatedWeight: 0, weightThresholdMet: false }); - } - if (_bitmapGet(voteProgress.voterBitmap, blesserRecord.index)) { + } else if (_bitmapGet(voteProgress.voterBitmap, blesserRecord.index)) { // We don't revert here because there might be other tagged roots for // which votes might count, and we want to allow that to happen. emit AlreadyVotedToBless(configVersion, msg.sender, taggedRoot); continue; } + noop = false; voteProgress.voterBitmap = _bitmapSet(voteProgress.voterBitmap, blesserRecord.index); voteProgress.accumulatedWeight += blesserRecord.weight; emit VotedToBless(configVersion, msg.sender, taggedRoot, blesserRecord.weight); @@ -248,6 +392,10 @@ contract RMN is IRMN, OwnerIsCreator, ITypeAndVersion { } s_blessVoteProgressByTaggedRootHash[taggedRootHash] = voteProgress; } + + if (noop) { + revert VoteToBlessNoop(); + } } /// @notice Can be called by the owner to remove unintentionally voted or even blessed tagged roots in a recovery @@ -268,145 +416,312 @@ contract RMN is IRMN, OwnerIsCreator, ITypeAndVersion { } } + struct UnvoteToCurseRequest { + bytes16 subject; + bytes28 cursesHash; + } + + // For use in internal calls. + enum Privilege { + Owner, + Voter + } + + function _authorizedUnvoteToCurse( + Privilege priv, // Privilege.Owner during an ownerUnvoteToCurse call, Privilege.Voter during a unvoteToCurse call + uint32 configVersion, + address curseVoteAddr, + UnvoteToCurseRequest memory req, + bool forceUnvote, // true only during an ownerUnvoteToCurse call, when OwnerUnvoteToCurseRequest.forceUnvote is true + CurserRecord storage sptr_curserRecord, + CurseVoteProgress storage sptr_curseVoteProgress + ) internal returns (bool unvoted, bool curseLifted) { + { + assert(priv == Privilege.Voter || priv == Privilege.Owner); // sanity check + // Check that the supplied arguments are feasible for our privilege. + if (forceUnvote || curseVoteAddr == OWNER_CURSE_VOTE_ADDR || curseVoteAddr == LIFT_CURSE_VOTE_ADDR) { + assert(priv == Privilege.Owner); + } + } + + ConfigVersionAndCursesHash memory cvch = sptr_curseVoteProgress.latestVoteToCurseByCurseVoteAddr[curseVoteAddr]; + + // First, try to unvote. + if ( + sptr_curserRecord.active && (curseVoteAddr == OWNER_CURSE_VOTE_ADDR || cvch.configVersion == configVersion) + && cvch.cursesHash != NO_VOTES_CURSES_HASH && (cvch.cursesHash == req.cursesHash || forceUnvote) + ) { + unvoted = true; + delete sptr_curseVoteProgress.latestVoteToCurseByCurseVoteAddr[curseVoteAddr]; + // Assumes: s_curserRecords[OWNER_CURSE_VOTE_ADDR].weight == 0, enforced by _setConfig + sptr_curseVoteProgress.accumulatedWeight -= sptr_curserRecord.weight; + + emit UnvotedToCurse( + configVersion, + curseVoteAddr, + req.subject, + sptr_curserRecord.weight, + req.cursesHash, + sptr_curseVoteProgress.accumulatedWeight + ); + } + + // If we have owner privilege, and the conditions for the curse to be active no longer hold, we are able to lift the + // curse. + bool shouldTryToLiftCurse = priv == Privilege.Owner && (unvoted || curseVoteAddr == LIFT_CURSE_VOTE_ADDR); + + if (shouldTryToLiftCurse && sptr_curseVoteProgress.curseActive && !_shouldCurseBeActive(sptr_curseVoteProgress)) { + curseLifted = true; + sptr_curseVoteProgress.curseActive = false; + --s_curseHotVars.numSubjectsCursed; + emit CurseLifted(req.subject); + } + + if (unvoted || curseLifted) { + RecordedCurseRelatedOpTag tag; + if (priv == Privilege.Owner) { + if (forceUnvote) { + tag = RecordedCurseRelatedOpTag.OwnerUnvoteToCurseForced; + } else { + tag = RecordedCurseRelatedOpTag.OwnerUnvoteToCurseUnforced; + } + } else if (priv == Privilege.Voter) { + tag = RecordedCurseRelatedOpTag.UnvoteToCurse; + } else { + // solhint-disable-next-line gas-custom-errors, reason-string + revert(); // assumption violation + } + s_recordedCurseRelatedOps.push( + RecordedCurseRelatedOp({ + tag: tag, + cursed: sptr_curseVoteProgress.curseActive, + curseVoteAddr: curseVoteAddr, + curseId: bytes16(0), + subject: req.subject, + blockTimestamp: _blockTimestamp() + }) + ); + } else { + emit SkippedUnvoteToCurse(curseVoteAddr, req.subject, cvch.cursesHash, req.cursesHash); + } + } + /// @notice Can be called by a curser to remove unintentional votes to curse. /// We expect this to be called very rarely, e.g. in case of a bug in the /// offchain code causing false voteToCurse calls. - /// @notice Should be called from curser's corresponding curseUnvoteAddr. - function unvoteToCurse(address curseVoteAddr, bytes32 cursesHash) external { - CurserRecord memory curserRecord = s_curserRecords[curseVoteAddr]; - - // If a curse is active, only the owner is allowed to lift it. - if (isCursed()) revert MustRecoverFromCurse(); + /// @notice Should be called from curser's corresponding curseVoteAddr. + function unvoteToCurse(UnvoteToCurseRequest[] memory unvoteToCurseRequests) external { + address curseVoteAddr = msg.sender; + CurserRecord storage sptr_curserRecord = s_curserRecords[curseVoteAddr]; - if (msg.sender != curserRecord.curseUnvoteAddr) revert InvalidVoter(msg.sender); + if (!sptr_curserRecord.active) revert UnauthorizedVoter(curseVoteAddr); - if (!curserRecord.active || curserRecord.voteCount == 0) revert InvalidCurseState(); - if (curserRecord.cursesHash != cursesHash) revert InvalidCursesHash(curserRecord.cursesHash, cursesHash); + uint32 configVersion = s_versionedConfig.configVersion; + bool anyVoteWasUnvoted = false; + for (uint256 i = 0; i < unvoteToCurseRequests.length; ++i) { + UnvoteToCurseRequest memory req = unvoteToCurseRequests[i]; + CurseVoteProgress storage sptr_curseVoteProgress = _getUpToDateCurseVoteProgress(configVersion, req.subject); + (bool unvoted, bool curseLifted) = _authorizedUnvoteToCurse( + Privilege.Voter, configVersion, curseVoteAddr, req, false, sptr_curserRecord, sptr_curseVoteProgress + ); + assert(!curseLifted); // assumption violation: voters can't lift curses + anyVoteWasUnvoted = anyVoteWasUnvoted || unvoted; + } - emit UnvotedToCurse( - s_versionedConfig.configVersion, curseVoteAddr, curserRecord.weight, curserRecord.voteCount, cursesHash - ); - curserRecord.voteCount = 0; - curserRecord.cursesHash = 0; - s_curserRecords[curseVoteAddr] = curserRecord; - s_curseVoteProgress.accumulatedWeight -= curserRecord.weight; + if (!anyVoteWasUnvoted) { + revert UnvoteToCurseNoop(); + } } /// @notice A vote to curse is appropriate during unhealthy blockchain conditions /// (eg. finality violations). - function voteToCurse(bytes32 curseId) external { - CurserRecord memory curserRecord = s_curserRecords[msg.sender]; - if (!curserRecord.active) revert InvalidVoter(msg.sender); - if (s_curseVotes[msg.sender][curseId]) revert AlreadyVotedToCurse(msg.sender, curseId); - s_curseVotes[msg.sender][curseId] = true; - ++curserRecord.voteCount; - curserRecord.cursesHash = keccak256(abi.encode(curserRecord.cursesHash, curseId)); - s_curserRecords[msg.sender] = curserRecord; - - CurseVoteProgress memory curseVoteProgress = s_curseVoteProgress; - - if (curserRecord.voteCount == 1) { - curseVoteProgress.accumulatedWeight += curserRecord.weight; - } + function voteToCurse(bytes16 curseId, bytes16[] memory subjects) external { + address curseVoteAddr = msg.sender; + assert(curseVoteAddr != OWNER_CURSE_VOTE_ADDR); + CurserRecord storage sptr_curserRecord = s_curserRecords[curseVoteAddr]; + if (!sptr_curserRecord.active) revert UnauthorizedVoter(curseVoteAddr); + _authorizedVoteToCurse(curseVoteAddr, curseId, subjects, sptr_curserRecord); + } + + function _authorizedVoteToCurse( + address curseVoteAddr, + bytes16 curseId, + bytes16[] memory subjects, + CurserRecord storage sptr_curserRecord + ) internal { + if (subjects.length == 0) revert VoteToCurseNoop(); + + if (sptr_curserRecord.usedCurseIds[curseId]) revert ReusedCurseId(curseVoteAddr, curseId); + sptr_curserRecord.usedCurseIds[curseId] = true; // NOTE: We could pack configVersion into CurserRecord that we already load in the beginning of this function to // avoid the following extra storage read for it, but since voteToCurse is not on the hot path we'd rather keep // things simple. uint32 configVersion = s_versionedConfig.configVersion; - emit VotedToCurse( - configVersion, - msg.sender, - curserRecord.weight, - curserRecord.voteCount, - curseId, - curserRecord.cursesHash, - curseVoteProgress.accumulatedWeight - ); - if (!curseVoteProgress.curseActive && curseVoteProgress.accumulatedWeight >= curseVoteProgress.curseWeightThreshold) - { - curseVoteProgress.curseActive = true; - emit Cursed(configVersion, block.timestamp); + for (uint256 i = 0; i < subjects.length; ++i) { + if (i >= 1 && !(subjects[i - 1] < subjects[i])) { + // Prevents a subject from receiving multiple votes to curse with the same curse id. + revert SubjectsMustBeStrictlyIncreasing(); + } + + bytes16 subject = subjects[i]; + CurseVoteProgress storage sptr_curseVoteProgress = _getUpToDateCurseVoteProgress(configVersion, subject); + ConfigVersionAndCursesHash memory cvch = sptr_curseVoteProgress.latestVoteToCurseByCurseVoteAddr[curseVoteAddr]; + bytes28 prevCursesHash; + if ( + (curseVoteAddr != OWNER_CURSE_VOTE_ADDR && cvch.configVersion < configVersion) + || cvch.cursesHash == NO_VOTES_CURSES_HASH + ) { + // if owner's first vote, or if voter's first vote in this config version + prevCursesHash = NO_VOTES_CURSES_HASH; // start hashchain from scratch, explicit + sptr_curseVoteProgress.accumulatedWeight += sptr_curserRecord.weight; + } else { + // we've already accounted for the weight + prevCursesHash = cvch.cursesHash; + } + sptr_curseVoteProgress.latestVoteToCurseByCurseVoteAddr[curseVoteAddr] = cvch = + ConfigVersionAndCursesHash({configVersion: configVersion, cursesHash: _cursesHash(prevCursesHash, curseId)}); + emit VotedToCurse( + configVersion, + curseVoteAddr, + subject, + curseId, + sptr_curserRecord.weight, + _blockTimestamp(), + cvch.cursesHash, + sptr_curseVoteProgress.accumulatedWeight + ); + + if ( + prevCursesHash == NO_VOTES_CURSES_HASH && !sptr_curseVoteProgress.curseActive + && _shouldCurseBeActive(sptr_curseVoteProgress) + ) { + sptr_curseVoteProgress.curseActive = true; + ++s_curseHotVars.numSubjectsCursed; + emit Cursed(configVersion, subject, _blockTimestamp()); + } + + s_recordedCurseRelatedOps.push( + RecordedCurseRelatedOp({ + tag: RecordedCurseRelatedOpTag.VoteToCurse, + cursed: sptr_curseVoteProgress.curseActive, + curseVoteAddr: curseVoteAddr, + curseId: curseId, + subject: subject, + blockTimestamp: _blockTimestamp() + }) + ); } - s_curseVoteProgress = curseVoteProgress; } /// @notice Enables the owner to immediately have the system enter the cursed state. - function ownerCurse() external onlyOwner { - emit OwnerCursed(block.timestamp); - if (!s_curseVoteProgress.curseActive) { - s_curseVoteProgress.curseActive = true; - emit Cursed(s_versionedConfig.configVersion, block.timestamp); - } + function ownerCurse(bytes16 curseId, bytes16[] memory subjects) external onlyOwner { + address curseVoteAddr = OWNER_CURSE_VOTE_ADDR; + CurserRecord storage sptr_curserRecord = s_curserRecords[curseVoteAddr]; + // no need to check if sptr_curserRecord.active, we must have the onlyOwner modifier + _authorizedVoteToCurse(curseVoteAddr, curseId, subjects, sptr_curserRecord); + } + + // Set curseVoteAddr=LIFT_CURSE_VOTE_ADDR, cursesHash=bytes28(0), to reset curseActive if it can be reset. Useful if + // all voters have unvoted to curse on their own and the curse can now be lifted without any individual votes that can + // be unvoted. + // solhint-disable-next-line gas-struct-packing + struct OwnerUnvoteToCurseRequest { + address curseVoteAddr; + UnvoteToCurseRequest unit; + bool forceUnvote; } /// @notice Enables the owner to remove curse votes. After the curse votes are removed, /// this function will check whether the curse is still valid and restore the uncursed state if possible. /// This function also enables the owner to lift a curse created through ownerCurse. - function ownerUnvoteToCurse(UnvoteToCurseRecord[] calldata unvoteRecords) external onlyOwner { - for (uint256 i = 0; i < unvoteRecords.length; ++i) { - UnvoteToCurseRecord memory unvoteRecord = unvoteRecords[i]; - CurserRecord memory curserRecord = s_curserRecords[unvoteRecord.curseVoteAddr]; - // Owner can avoid the curses hash check by setting forceUnvote to true, in case - // a malicious curser is flooding the system with votes to curse with the - // intention to disallow the owner to clear their curse. - if (!unvoteRecord.forceUnvote && curserRecord.cursesHash != unvoteRecord.cursesHash) { - emit SkippedUnvoteToCurse(unvoteRecord.curseVoteAddr, curserRecord.cursesHash, unvoteRecord.cursesHash); - continue; - } - - if (!curserRecord.active || curserRecord.voteCount == 0) continue; - - emit UnvotedToCurse( - s_versionedConfig.configVersion, - unvoteRecord.curseVoteAddr, - curserRecord.weight, - curserRecord.voteCount, - curserRecord.cursesHash + function ownerUnvoteToCurse(OwnerUnvoteToCurseRequest[] memory ownerUnvoteToCurseRequests) external onlyOwner { + bool anyCurseWasLifted = false; + bool anyVoteWasUnvoted = false; + uint32 configVersion = s_versionedConfig.configVersion; + for (uint256 i = 0; i < ownerUnvoteToCurseRequests.length; ++i) { + OwnerUnvoteToCurseRequest memory req = ownerUnvoteToCurseRequests[i]; + CurseVoteProgress storage sptr_curseVoteProgress = _getUpToDateCurseVoteProgress(configVersion, req.unit.subject); + (bool unvoted, bool curseLifted) = _authorizedUnvoteToCurse( + Privilege.Owner, + configVersion, + req.curseVoteAddr, + req.unit, + req.forceUnvote, + s_curserRecords[req.curseVoteAddr], + sptr_curseVoteProgress ); - curserRecord.voteCount = 0; - curserRecord.cursesHash = 0; - s_curserRecords[unvoteRecord.curseVoteAddr] = curserRecord; - s_curseVoteProgress.accumulatedWeight -= curserRecord.weight; + anyVoteWasUnvoted = anyVoteWasUnvoted || unvoted; + anyCurseWasLifted = anyCurseWasLifted || curseLifted; } - if ( - s_curseVoteProgress.curseActive - && s_curseVoteProgress.accumulatedWeight < s_curseVoteProgress.curseWeightThreshold - ) { - s_curseVoteProgress.curseActive = false; - emit RecoveredFromCurse(); - // Invalidate all in-progress votes to bless by bumping the config version. + if (anyCurseWasLifted) { + // Invalidate all in-progress votes to bless or curse by bumping the config version. // They might have been based on false information about the source chain // (e.g. in case of a finality violation). _setConfig(s_versionedConfig.config); } + + if (!(anyVoteWasUnvoted || anyCurseWasLifted)) { + revert UnvoteToCurseNoop(); + } } - /// @notice Will revert in case a curse is active. To avoid accidentally invalidating an in-progress curse vote, it - /// may be advisable to remove voters one-by-one over time, rather than many at once. - /// @dev The gas use of this function varies depending on the number of curse votes that are active. When calling this - /// function, be sure to include a gas cushion to account for curse votes that may occur between your transaction - /// being sent and mined. function setConfig(Config memory config) external onlyOwner { _setConfig(config); } + /// @notice Any tagged root with a commit store included in this array will be considered automatically blessed. + function getPermaBlessedCommitStores() external view returns (address[] memory) { + return s_permaBlessedCommitStores.values(); + } + + /// @notice The ordering of parameters is important. First come the commit stores to remove, then the commit stores to + /// add. + function ownerRemoveThenAddPermaBlessedCommitStores( + address[] memory removes, + address[] memory adds + ) external onlyOwner { + for (uint256 i = 0; i < removes.length; ++i) { + if (s_permaBlessedCommitStores.remove(removes[i])) { + emit PermaBlessedCommitStoreRemoved(removes[i]); + } + } + for (uint256 i = 0; i < adds.length; ++i) { + if (s_permaBlessedCommitStores.add(adds[i])) { + emit PermaBlessedCommitStoreAdded(adds[i]); + } + } + } + /// @inheritdoc IRMN - function isBlessed(IRMN.TaggedRoot calldata taggedRoot) external view override returns (bool) { - return s_blessVoteProgressByTaggedRootHash[_taggedRootHash(taggedRoot)].weightThresholdMet; + function isBlessed(IRMN.TaggedRoot calldata taggedRoot) external view returns (bool) { + return s_blessVoteProgressByTaggedRootHash[_taggedRootHash(taggedRoot)].weightThresholdMet + || s_permaBlessedCommitStores.contains(taggedRoot.commitStore); } /// @inheritdoc IRMN - function isCursed() public view override returns (bool) { - return s_curseVoteProgress.curseActive; + function isCursed() external view returns (bool) { + if (s_curseHotVars.numSubjectsCursed == 0) { + return false; // happy path costs a single SLOAD + } else { + return s_potentiallyOutdatedCurseVoteProgressBySubject[GLOBAL_CURSE_SUBJECT].curseActive + || s_potentiallyOutdatedCurseVoteProgressBySubject[LEGACY_CURSE_SUBJECT].curseActive; + } } - function isCursed(bytes16) external view override returns (bool) { - return s_curseVoteProgress.curseActive; + /// @inheritdoc IRMN + function isCursed(bytes16 subject) public view returns (bool) { + if (s_curseHotVars.numSubjectsCursed == 0) { + return false; // happy path costs a single SLOAD + } else { + return s_potentiallyOutdatedCurseVoteProgressBySubject[GLOBAL_CURSE_SUBJECT].curseActive + || s_potentiallyOutdatedCurseVoteProgressBySubject[subject].curseActive; + } } /// @notice Config version might be incremented for many reasons, including - /// recovery from a curse and a regular config change. + /// the lifting of a curse, or a regular config change. function getConfigDetails() external view returns (uint32 version, uint32 blockNumber, Config memory config) { version = s_versionedConfig.configVersion; blockNumber = s_versionedConfig.blockNumber; @@ -427,12 +742,12 @@ contract RMN is IRMN, OwnerIsCreator, ITypeAndVersion { blessed = progress.weightThresholdMet; if (progress.configVersion == s_versionedConfig.configVersion) { accumulatedWeight = progress.accumulatedWeight; - uint128 bitmap = progress.voterBitmap; + uint200 bitmap = progress.voterBitmap; blessVoteAddrs = new address[](_bitmapCount(bitmap)); Voter[] memory voters = s_versionedConfig.config.voters; uint256 j = 0; - for (uint256 i = 0; i < voters.length; ++i) { - if (_bitmapGet(bitmap, s_blesserRecords[voters[i].blessVoteAddr].index)) { + for (uint8 i = 0; i < voters.length; ++i) { + if (_bitmapGet(bitmap, i)) { blessVoteAddrs[j] = voters[i].blessVoteAddr; ++j; } @@ -440,44 +755,115 @@ contract RMN is IRMN, OwnerIsCreator, ITypeAndVersion { } } + /// @return curseVoteAddrs the curseVoteAddr of each voter with an active vote to curse + /// @return cursesHashes the i-th value is the curses hash of curseVoteAddrs[i] + /// @return accumulatedWeight the accumulated weight of all voters with an active vote to curse who are part of the + /// current config + /// @return cursed might be true even if the owner has no active vote and accumulatedWeight < curseWeightThreshold, + /// due to a retained curse from a prior config /// @dev This is a helper method for offchain code so efficiency is not really a concern. - function getCurseProgress() + function getCurseProgress(bytes16 subject) external view - returns ( - address[] memory curseVoteAddrs, - uint32[] memory voteCounts, - bytes32[] memory cursesHashes, - uint16 accumulatedWeight, - bool cursed - ) + returns (address[] memory curseVoteAddrs, bytes28[] memory cursesHashes, uint16 accumulatedWeight, bool cursed) { - accumulatedWeight = s_curseVoteProgress.accumulatedWeight; - cursed = s_curseVoteProgress.curseActive; - uint256 numCursers; - Voter[] memory voters = s_versionedConfig.config.voters; - for (uint256 i = 0; i < voters.length; ++i) { - CurserRecord memory curserRecord = s_curserRecords[voters[i].curseVoteAddr]; - if (curserRecord.voteCount > 0) { - ++numCursers; + uint32 configVersion = s_versionedConfig.configVersion; + Config memory config = s_versionedConfig.config; + // Can't use _getUpToDateCurseVoteProgress here because we can't call a non-view function from within a view. + // So we get to repeat some accounting. + CurseVoteProgress storage outdatedCurseVoteProgress = s_potentiallyOutdatedCurseVoteProgressBySubject[subject]; + + cursed = outdatedCurseVoteProgress.curseActive; + + // See _getUpToDateCurseVoteProgress for more context. + bool shouldCountVotesFromOlderConfigs = outdatedCurseVoteProgress.configVersion < configVersion && cursed; + + // A play in two acts, because we can't push to arrays in memory, so we need to precompute the array's length. + // First act: we count the number of cursers, i.e., voters with active vote. + // Second act: push the cursers to the arrays, sum their weights. + + uint256 numCursers = 0; // we reuse this variable for writing to perserve stack space + accumulatedWeight = 0; + for (uint256 act = 1; act <= 2; ++act) { + uint256 i = config.voters.length; // not config.voters.length-1 to account for the owner + while (true) { + address curseVoteAddr; + uint8 weight; + if (i < config.voters.length) { + curseVoteAddr = config.voters[i].curseVoteAddr; + weight = config.voters[i].curseWeight; + } else { + // Allows us to include the owner's vote and curses hash in the result. + curseVoteAddr = OWNER_CURSE_VOTE_ADDR; + weight = 0; + } + + ConfigVersionAndCursesHash memory cvch = + outdatedCurseVoteProgress.latestVoteToCurseByCurseVoteAddr[curseVoteAddr]; + bool hasActiveVote = ( + shouldCountVotesFromOlderConfigs || cvch.configVersion == configVersion + || curseVoteAddr == OWNER_CURSE_VOTE_ADDR + ) && cvch.cursesHash != NO_VOTES_CURSES_HASH; + if (hasActiveVote) { + if (act == 1) { + ++numCursers; + } else if (act == 2) { + accumulatedWeight += weight; + --numCursers; + curseVoteAddrs[numCursers] = curseVoteAddr; + cursesHashes[numCursers] = cvch.cursesHash; + } else { + // solhint-disable-next-line gas-custom-errors, reason-string + revert(); // assumption violation + } + } + + if (i > 0) { + --i; + } else { + break; + } } - } - curseVoteAddrs = new address[](numCursers); - voteCounts = new uint32[](numCursers); - cursesHashes = new bytes32[](numCursers); - uint256 j = 0; - for (uint256 i = 0; i < voters.length; ++i) { - address curseVoteAddr = voters[i].curseVoteAddr; - CurserRecord memory curserRecord = s_curserRecords[curseVoteAddr]; - if (curserRecord.voteCount > 0) { - curseVoteAddrs[j] = curseVoteAddr; - voteCounts[j] = curserRecord.voteCount; - cursesHashes[j] = curserRecord.cursesHash; - ++j; + + if (act == 1) { + // We are done counting at this point, initialize the arrays for the second act that follows immediately after. + curseVoteAddrs = new address[](numCursers); + cursesHashes = new bytes28[](numCursers); } } } + /// @notice Returns the number of subjects that are currently cursed. + function getCursedSubjectsCount() external view returns (uint256) { + return s_curseHotVars.numSubjectsCursed; + } + + /// @dev This is a helper method for offchain code to know what arguments to use for getRecordedCurseRelatedOps. + function getRecordedCurseRelatedOpsCount() external view returns (uint256) { + return s_recordedCurseRelatedOps.length; + } + + /// @dev This is a helper method for offchain code so efficiency is not really a concern. + /// @dev Returns s_recordedCurseRelatedOps[offset:offset+limit]. + function getRecordedCurseRelatedOps( + uint256 offset, + uint256 limit + ) external view returns (RecordedCurseRelatedOp[] memory) { + uint256 pageLen; + if (offset + limit <= s_recordedCurseRelatedOps.length) { + pageLen = limit; + } else if (offset < s_recordedCurseRelatedOps.length) { + pageLen = s_recordedCurseRelatedOps.length - offset; + } else { + pageLen = 0; + } + RecordedCurseRelatedOp[] memory page = new RecordedCurseRelatedOp[](pageLen); + for (uint256 i = 0; i < pageLen; ++i) { + page[i] = s_recordedCurseRelatedOps[offset + i]; + } + return page; + } + function _validateConfig(Config memory config) internal pure returns (bool) { if ( config.voters.length == 0 || config.voters.length > MAX_NUM_VOTERS || config.blessWeightThreshold == 0 @@ -488,18 +874,22 @@ contract RMN is IRMN, OwnerIsCreator, ITypeAndVersion { uint256 totalBlessWeight = 0; uint256 totalCurseWeight = 0; - address[] memory allAddrs = new address[](3 * config.voters.length); + address[] memory allAddrs = new address[](2 * config.voters.length); for (uint256 i = 0; i < config.voters.length; ++i) { Voter memory voter = config.voters[i]; + // The owner can always curse using the ownerCurse method, and is not supposed to be included in the voters list. + // Even though the intent is for the actual owner address to NOT be included in the voters list, we don't + // explicitly disallow curseVoteAddr == owner() here. Even if we did, the owner could transfer ownership of the + // contract, and so we couldn't guarantee that the owner is not eventually included in the voters list. if ( - voter.blessVoteAddr == address(0) || voter.curseVoteAddr == address(0) || voter.curseUnvoteAddr == address(0) + voter.blessVoteAddr == address(0) || voter.curseVoteAddr == address(0) + || voter.curseVoteAddr == LIFT_CURSE_VOTE_ADDR || voter.curseVoteAddr == OWNER_CURSE_VOTE_ADDR || (voter.blessWeight == 0 && voter.curseWeight == 0) ) { return false; } - allAddrs[3 * i + 0] = voter.blessVoteAddr; - allAddrs[3 * i + 1] = voter.curseVoteAddr; - allAddrs[3 * i + 2] = voter.curseUnvoteAddr; + allAddrs[2 * i + 0] = voter.blessVoteAddr; + allAddrs[2 * i + 1] = voter.curseVoteAddr; totalBlessWeight += voter.blessWeight; totalCurseWeight += voter.curseWeight; } @@ -516,11 +906,8 @@ contract RMN is IRMN, OwnerIsCreator, ITypeAndVersion { } function _setConfig(Config memory config) private { - if (isCursed()) revert MustRecoverFromCurse(); if (!_validateConfig(config)) revert InvalidConfig(); - Config memory oldConfig = s_versionedConfig.config; - // We can't directly assign s_versionedConfig.config to config // because copying a memory array into storage is not supported. { @@ -529,7 +916,7 @@ contract RMN is IRMN, OwnerIsCreator, ITypeAndVersion { while (s_versionedConfig.config.voters.length != 0) { Voter memory voter = s_versionedConfig.config.voters[s_versionedConfig.config.voters.length - 1]; delete s_blesserRecords[voter.blessVoteAddr]; - s_curserRecords[voter.curseVoteAddr].active = false; + delete s_curserRecords[voter.curseVoteAddr]; // usedCurseIds mapping is retained, as intended s_versionedConfig.config.voters.pop(); } for (uint256 i = 0; i < config.voters.length; ++i) { @@ -544,45 +931,34 @@ contract RMN is IRMN, OwnerIsCreator, ITypeAndVersion { Voter memory voter = config.voters[i]; s_blesserRecords[voter.blessVoteAddr] = BlesserRecord({configVersion: configVersion, index: i, weight: voter.blessWeight}); - s_curserRecords[voter.curseVoteAddr] = CurserRecord({ - active: true, - weight: voter.curseWeight, - curseUnvoteAddr: voter.curseUnvoteAddr, - voteCount: s_curserRecords[voter.curseVoteAddr].voteCount, - cursesHash: s_curserRecords[voter.curseVoteAddr].cursesHash - }); + { + CurserRecord storage sptr_curserRecord = s_curserRecords[voter.curseVoteAddr]; + // Solidity will not let us initialize as CurserRecord({...}) due to the nested mapping + sptr_curserRecord.active = true; + sptr_curserRecord.weight = voter.curseWeight; + } + } + { + // Initialize the owner's CurserRecord + // We could in principle perform this initialization once in the constructor instead, and save a small bit of gas. + // But configuration changes are relatively infrequent, and keeping the initialization here makes the contract's + // correctness easier to reason about. + CurserRecord storage sptr_ownerCurserRecord = s_curserRecords[OWNER_CURSE_VOTE_ADDR]; + sptr_ownerCurserRecord.active = true; // Assumed by vote/unvote-to-curse logic + sptr_ownerCurserRecord.weight = 0; // Assumed by vote/unvote-to-curse logic } s_versionedConfig.blockNumber = uint32(block.number); emit ConfigSet(configVersion, config); - CurseVoteProgress memory newCurseVoteProgress = - CurseVoteProgress({curseWeightThreshold: config.curseWeightThreshold, accumulatedWeight: 0, curseActive: false}); - - // Retain votes for the cursers who are still part of the new config and delete records for the cursers who are not. - for (uint8 i = 0; i < oldConfig.voters.length; ++i) { - // We could be more efficient with this but since this is only for - // setConfig it will do for now. - address curseVoteAddr = oldConfig.voters[i].curseVoteAddr; - CurserRecord memory curserRecord = s_curserRecords[curseVoteAddr]; - if (!curserRecord.active) { - delete s_curserRecords[curseVoteAddr]; - } else if (curserRecord.active && curserRecord.voteCount > 0) { - newCurseVoteProgress.accumulatedWeight += curserRecord.weight; - emit ReusedVotesToCurse( - configVersion, - curseVoteAddr, - curserRecord.weight, - curserRecord.voteCount, - curserRecord.cursesHash, - newCurseVoteProgress.accumulatedWeight - ); - } - } - newCurseVoteProgress.curseActive = - newCurseVoteProgress.accumulatedWeight >= newCurseVoteProgress.curseWeightThreshold; - if (newCurseVoteProgress.curseActive) { - emit Cursed(configVersion, block.timestamp); - } - s_curseVoteProgress = newCurseVoteProgress; + s_recordedCurseRelatedOps.push( + RecordedCurseRelatedOp({ + tag: RecordedCurseRelatedOpTag.SetConfig, + blockTimestamp: _blockTimestamp(), + cursed: false, + curseVoteAddr: address(0), + curseId: bytes16(0), + subject: bytes16(0) + }) + ); } } diff --git a/contracts/src/v0.8/ccip/capability/CCIPCapabilityConfiguration.sol b/contracts/src/v0.8/ccip/capability/CCIPConfig.sol similarity index 68% rename from contracts/src/v0.8/ccip/capability/CCIPCapabilityConfiguration.sol rename to contracts/src/v0.8/ccip/capability/CCIPConfig.sol index 515f9343c6..795db0c3e4 100644 --- a/contracts/src/v0.8/ccip/capability/CCIPCapabilityConfiguration.sol +++ b/contracts/src/v0.8/ccip/capability/CCIPConfig.sol @@ -3,24 +3,28 @@ pragma solidity 0.8.24; import {ICapabilityConfiguration} from "../../keystone/interfaces/ICapabilityConfiguration.sol"; import {ITypeAndVersion} from "../../shared/interfaces/ITypeAndVersion.sol"; -import {ICapabilityRegistry} from "./interfaces/ICapabilityRegistry.sol"; +import {ICapabilitiesRegistry} from "./interfaces/ICapabilitiesRegistry.sol"; import {OwnerIsCreator} from "../../shared/access/OwnerIsCreator.sol"; +import {Internal} from "../libraries/Internal.sol"; +import {CCIPConfigTypes} from "./libraries/CCIPConfigTypes.sol"; + +import {IERC165} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/interfaces/IERC165.sol"; import {EnumerableSet} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/structs/EnumerableSet.sol"; -/// @notice CCIPCapabilityConfiguration stores the configuration for the CCIP capability. -/// We have two classes of configuration: chain configuration and DON (in the CapabilityRegistry sense) configuration. +/// @notice CCIPConfig stores the configuration for the CCIP capability. +/// We have two classes of configuration: chain configuration and DON (in the CapabilitiesRegistry sense) configuration. /// Each chain will have a single configuration which includes information like the router address. /// Each CR DON will have up to four configurations: for each of (commit, exec), one blue and one green configuration. /// This is done in order to achieve "blue-green" deployments. -contract CCIPCapabilityConfiguration is ITypeAndVersion, ICapabilityConfiguration, OwnerIsCreator { +contract CCIPConfig is ITypeAndVersion, ICapabilityConfiguration, OwnerIsCreator, IERC165 { using EnumerableSet for EnumerableSet.UintSet; /// @notice Emitted when a chain's configuration is set. /// @param chainSelector The chain selector. /// @param chainConfig The chain configuration. - event ChainConfigSet(uint64 chainSelector, ChainConfig chainConfig); + event ChainConfigSet(uint64 chainSelector, CCIPConfigTypes.ChainConfig chainConfig); /// @notice Emitted when a chain's configuration is removed. /// @param chainSelector The chain selector. @@ -28,7 +32,7 @@ contract CCIPCapabilityConfiguration is ITypeAndVersion, ICapabilityConfiguratio error ChainConfigNotSetForChain(uint64 chainSelector); error NodeNotInRegistry(bytes32 p2pId); - error OnlyCapabilityRegistryCanCall(); + error OnlyCapabilitiesRegistryCanCall(); error ChainSelectorNotFound(uint64 chainSelector); error ChainSelectorNotSet(); error TooManyOCR3Configs(); @@ -43,78 +47,22 @@ contract CCIPCapabilityConfiguration is ITypeAndVersion, ICapabilityConfiguratio error InvalidPluginType(); error OfframpAddressCannotBeZero(); error InvalidConfigLength(uint256 length); - error InvalidConfigStateTransition(ConfigState currentState, ConfigState proposedState); + error InvalidConfigStateTransition( + CCIPConfigTypes.ConfigState currentState, CCIPConfigTypes.ConfigState proposedState + ); error NonExistentConfigTransition(); error WrongConfigCount(uint64 got, uint64 expected); error WrongConfigDigest(bytes32 got, bytes32 expected); error WrongConfigDigestBlueGreen(bytes32 got, bytes32 expected); - /// @notice PluginType indicates the type of plugin that the configuration is for. - /// @param Commit The configuration is for the commit plugin. - /// @param Execution The configuration is for the execution plugin. - enum PluginType { - Commit, - Execution - } - - /// @notice ConfigState indicates the state of the configuration. - /// A DON's configuration always starts out in the "Init" state - this is the starting state. - /// The only valid transition from "Init" is to the "Running" state - this is the first ever configuration. - /// The only valid transition from "Running" is to the "Staging" state - this is a blue/green proposal. - /// The only valid transition from "Staging" is back to the "Running" state - this is a promotion. - /// TODO: explain rollbacks? - enum ConfigState { - Init, - Running, - Staging - } - - /// @notice Chain configuration. - /// Changes to chain configuration are detected out-of-band in plugins and decoded offchain. - struct ChainConfig { - bytes32[] readers; // The P2P IDs of the readers for the chain. These IDs must be registered in the capability registry. - uint8 fChain; // The fault tolerance parameter of the chain. - bytes config; // The chain configuration. This is kept intentionally opaque so as to add fields in the future if needed. - } - - /// @notice Chain configuration information struct used in applyChainConfigUpdates and getAllChainConfigs. - struct ChainConfigInfo { - uint64 chainSelector; - ChainConfig chainConfig; - } - - /// @notice OCR3 configuration. - struct OCR3Config { - PluginType pluginType; // ────────╮ The plugin that the configuration is for. - uint64 chainSelector; // | The (remote) chain that the configuration is for. - uint8 F; // | The "big F" parameter for the role DON. - uint64 offchainConfigVersion; // ─╯ The version of the offchain configuration. - bytes offrampAddress; // The remote chain offramp address. - bytes32[] bootstrapP2PIds; // The bootstrap P2P IDs of the oracles that are part of the role DON. - // len(p2pIds) == len(signers) == len(transmitters) == 3 * F + 1 - // NOTE: indexes matter here! The p2p ID at index i corresponds to the signer at index i and the transmitter at index i. - // This is crucial in order to build the oracle ID <-> peer ID mapping offchain. - bytes32[] p2pIds; // The P2P IDs of the oracles that are part of the role DON. - bytes[] signers; // The onchain signing keys of nodes in the don. - bytes[] transmitters; // The onchain transmitter keys of nodes in the don. - bytes offchainConfig; // The offchain configuration for the OCR3 protocol. Protobuf encoded. - } - - /// @notice OCR3 configuration with metadata, specifically the config count and the config digest. - struct OCR3ConfigWithMeta { - OCR3Config config; // The OCR3 configuration. - uint64 configCount; // The config count used to compute the config digest. - bytes32 configDigest; // The config digest of the OCR3 configuration. - } - /// @notice Type and version override. - string public constant override typeAndVersion = "CCIPCapabilityConfiguration 1.6.0-dev"; + string public constant override typeAndVersion = "CCIPConfig 1.6.0-dev"; - /// @notice The canonical capability registry address. - address internal immutable i_capabilityRegistry; + /// @notice The canonical capabilities registry address. + address internal immutable i_capabilitiesRegistry; /// @notice chain configuration for each chain that CCIP is deployed on. - mapping(uint64 chainSelector => ChainConfig chainConfig) internal s_chainConfigurations; + mapping(uint64 chainSelector => CCIPConfigTypes.ChainConfig chainConfig) internal s_chainConfigurations; /// @notice All chains that are configured. EnumerableSet.UintSet internal s_remoteChainSelectors; @@ -122,7 +70,9 @@ contract CCIPCapabilityConfiguration is ITypeAndVersion, ICapabilityConfiguratio /// @notice OCR3 configurations for each DON. /// Each CR DON will have a commit and execution configuration. /// This means that a DON can have up to 4 configurations, since we are implementing blue/green deployments. - mapping(uint32 donId => mapping(PluginType pluginType => OCR3ConfigWithMeta[] ocr3Configs)) internal s_ocr3Configs; + mapping( + uint32 donId => mapping(Internal.OCRPluginType pluginType => CCIPConfigTypes.OCR3ConfigWithMeta[] ocr3Configs) + ) internal s_ocr3Configs; /// @notice The DONs that have been configured. EnumerableSet.UintSet internal s_donIds; @@ -131,9 +81,14 @@ contract CCIPCapabilityConfiguration is ITypeAndVersion, ICapabilityConfiguratio uint8 internal constant MAX_OCR3_CONFIGS_PER_DON = 4; uint8 internal constant MAX_NUM_ORACLES = 31; - /// @param capabilityRegistry the canonical capability registry address. - constructor(address capabilityRegistry) { - i_capabilityRegistry = capabilityRegistry; + /// @param capabilitiesRegistry the canonical capabilities registry address. + constructor(address capabilitiesRegistry) { + i_capabilitiesRegistry = capabilitiesRegistry; + } + + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) external pure override returns (bool) { + return interfaceId == type(ICapabilityConfiguration).interfaceId || interfaceId == type(IERC165).interfaceId; } // ================================================================ @@ -143,13 +98,16 @@ contract CCIPCapabilityConfiguration is ITypeAndVersion, ICapabilityConfiguratio /// @notice Returns all the chain configurations. /// @return The chain configurations. // TODO: will this eventually hit the RPC max response size limit? - function getAllChainConfigs() external view returns (ChainConfigInfo[] memory) { + function getAllChainConfigs() external view returns (CCIPConfigTypes.ChainConfigInfo[] memory) { uint256[] memory chainSelectors = s_remoteChainSelectors.values(); - ChainConfigInfo[] memory chainConfigs = new ChainConfigInfo[](s_remoteChainSelectors.length()); + CCIPConfigTypes.ChainConfigInfo[] memory chainConfigs = + new CCIPConfigTypes.ChainConfigInfo[](s_remoteChainSelectors.length()); for (uint256 i = 0; i < chainSelectors.length; ++i) { uint64 chainSelector = uint64(chainSelectors[i]); - chainConfigs[i] = - ChainConfigInfo({chainSelector: chainSelector, chainConfig: s_chainConfigurations[chainSelector]}); + chainConfigs[i] = CCIPConfigTypes.ChainConfigInfo({ + chainSelector: chainSelector, + chainConfig: s_chainConfigurations[chainSelector] + }); } return chainConfigs; } @@ -158,7 +116,10 @@ contract CCIPCapabilityConfiguration is ITypeAndVersion, ICapabilityConfiguratio /// @param donId The DON ID. /// @param pluginType The plugin type. /// @return The OCR3 configurations, up to 2 (blue and green). - function getOCRConfig(uint32 donId, PluginType pluginType) external view returns (OCR3ConfigWithMeta[] memory) { + function getOCRConfig( + uint32 donId, + Internal.OCRPluginType pluginType + ) external view returns (CCIPConfigTypes.OCR3ConfigWithMeta[] memory) { return s_ocr3Configs[donId][pluginType]; } @@ -180,31 +141,36 @@ contract CCIPCapabilityConfiguration is ITypeAndVersion, ICapabilityConfiguratio uint64, /* configCount */ uint32 donId ) external override { - if (msg.sender != i_capabilityRegistry) { - revert OnlyCapabilityRegistryCanCall(); + if (msg.sender != i_capabilitiesRegistry) { + revert OnlyCapabilitiesRegistryCanCall(); } - OCR3Config[] memory ocr3Configs = abi.decode(config, (OCR3Config[])); - (OCR3Config[] memory commitConfigs, OCR3Config[] memory execConfigs) = _groupByPluginType(ocr3Configs); + CCIPConfigTypes.OCR3Config[] memory ocr3Configs = abi.decode(config, (CCIPConfigTypes.OCR3Config[])); + (CCIPConfigTypes.OCR3Config[] memory commitConfigs, CCIPConfigTypes.OCR3Config[] memory execConfigs) = + _groupByPluginType(ocr3Configs); if (commitConfigs.length > 0) { - _updatePluginConfig(donId, PluginType.Commit, commitConfigs); + _updatePluginConfig(donId, Internal.OCRPluginType.Commit, commitConfigs); } if (execConfigs.length > 0) { - _updatePluginConfig(donId, PluginType.Execution, execConfigs); + _updatePluginConfig(donId, Internal.OCRPluginType.Execution, execConfigs); } } - function _updatePluginConfig(uint32 donId, PluginType pluginType, OCR3Config[] memory newConfig) internal { - OCR3ConfigWithMeta[] memory currentConfig = s_ocr3Configs[donId][pluginType]; + function _updatePluginConfig( + uint32 donId, + Internal.OCRPluginType pluginType, + CCIPConfigTypes.OCR3Config[] memory newConfig + ) internal { + CCIPConfigTypes.OCR3ConfigWithMeta[] memory currentConfig = s_ocr3Configs[donId][pluginType]; // Validate the state transition being proposed, which is implicitly defined by the combination // of lengths of the current and new configurations. - ConfigState currentState = _stateFromConfigLength(currentConfig.length); - ConfigState proposedState = _stateFromConfigLength(newConfig.length); + CCIPConfigTypes.ConfigState currentState = _stateFromConfigLength(currentConfig.length); + CCIPConfigTypes.ConfigState proposedState = _stateFromConfigLength(newConfig.length); _validateConfigStateTransition(currentState, proposedState); // Build the new configuration with metadata and validate that the transition is valid. - OCR3ConfigWithMeta[] memory newConfigWithMeta = + CCIPConfigTypes.OCR3ConfigWithMeta[] memory newConfigWithMeta = _computeNewConfigWithMeta(donId, currentConfig, newConfig, currentState, proposedState); _validateConfigTransition(currentConfig, newConfigWithMeta); @@ -223,11 +189,11 @@ contract CCIPCapabilityConfiguration is ITypeAndVersion, ICapabilityConfiguratio /// @notice Determine the config state of the configuration from the length of the config. /// @param configLen The length of the configuration. /// @return The config state. - function _stateFromConfigLength(uint256 configLen) internal pure returns (ConfigState) { + function _stateFromConfigLength(uint256 configLen) internal pure returns (CCIPConfigTypes.ConfigState) { if (configLen > 2) { revert InvalidConfigLength(configLen); } - return ConfigState(configLen); + return CCIPConfigTypes.ConfigState(configLen); } // the only valid state transitions are the following: @@ -235,7 +201,10 @@ contract CCIPCapabilityConfiguration is ITypeAndVersion, ICapabilityConfiguratio // running -> staging (blue/green proposal) // staging -> running (promotion) // everything else is invalid and should revert. - function _validateConfigStateTransition(ConfigState currentState, ConfigState newState) internal pure { + function _validateConfigStateTransition( + CCIPConfigTypes.ConfigState currentState, + CCIPConfigTypes.ConfigState newState + ) internal pure { // Calculate the difference between the new state and the current state int256 stateDiff = int256(uint256(newState)) - int256(uint256(currentState)); @@ -244,15 +213,15 @@ contract CCIPCapabilityConfiguration is ITypeAndVersion, ICapabilityConfiguratio // 1. currentState -> newState (where stateDiff == 1) // e.g., init -> running or running -> staging // 2. staging -> running (where stateDiff == -1) - if (stateDiff == 1 || (stateDiff == -1 && currentState == ConfigState.Staging)) { + if (stateDiff == 1 || (stateDiff == -1 && currentState == CCIPConfigTypes.ConfigState.Staging)) { return; } revert InvalidConfigStateTransition(currentState, newState); } function _validateConfigTransition( - OCR3ConfigWithMeta[] memory currentConfig, - OCR3ConfigWithMeta[] memory newConfigWithMeta + CCIPConfigTypes.OCR3ConfigWithMeta[] memory currentConfig, + CCIPConfigTypes.OCR3ConfigWithMeta[] memory newConfigWithMeta ) internal pure { uint256 currentConfigLen = currentConfig.length; uint256 newConfigLen = newConfigWithMeta.length; @@ -297,35 +266,36 @@ contract CCIPCapabilityConfiguration is ITypeAndVersion, ICapabilityConfiguratio /// @return The new configuration with metadata. function _computeNewConfigWithMeta( uint32 donId, - OCR3ConfigWithMeta[] memory currentConfig, - OCR3Config[] memory newConfig, - ConfigState currentState, - ConfigState newState - ) internal view returns (OCR3ConfigWithMeta[] memory) { + CCIPConfigTypes.OCR3ConfigWithMeta[] memory currentConfig, + CCIPConfigTypes.OCR3Config[] memory newConfig, + CCIPConfigTypes.ConfigState currentState, + CCIPConfigTypes.ConfigState newState + ) internal view returns (CCIPConfigTypes.OCR3ConfigWithMeta[] memory) { uint64[] memory configCounts = new uint64[](newConfig.length); // Set config counts based on the only valid state transitions. // Init -> Running (first ever config) // Running -> Staging (blue/green proposal) // Staging -> Running (promotion) - if (currentState == ConfigState.Init && newState == ConfigState.Running) { + if (currentState == CCIPConfigTypes.ConfigState.Init && newState == CCIPConfigTypes.ConfigState.Running) { // First ever config starts with config count == 1. configCounts[0] = 1; - } else if (currentState == ConfigState.Running && newState == ConfigState.Staging) { + } else if (currentState == CCIPConfigTypes.ConfigState.Running && newState == CCIPConfigTypes.ConfigState.Staging) { // On a blue/green proposal, the config count of the green config is the blue config count + 1. configCounts[0] = currentConfig[0].configCount; configCounts[1] = currentConfig[0].configCount + 1; - } else if (currentState == ConfigState.Staging && newState == ConfigState.Running) { + } else if (currentState == CCIPConfigTypes.ConfigState.Staging && newState == CCIPConfigTypes.ConfigState.Running) { // On a promotion, the config count of the green config becomes the blue config count. configCounts[0] = currentConfig[1].configCount; } else { revert InvalidConfigStateTransition(currentState, newState); } - OCR3ConfigWithMeta[] memory newConfigWithMeta = new OCR3ConfigWithMeta[](newConfig.length); + CCIPConfigTypes.OCR3ConfigWithMeta[] memory newConfigWithMeta = + new CCIPConfigTypes.OCR3ConfigWithMeta[](newConfig.length); for (uint256 i = 0; i < configCounts.length; ++i) { _validateConfig(newConfig[i]); - newConfigWithMeta[i] = OCR3ConfigWithMeta({ + newConfigWithMeta[i] = CCIPConfigTypes.OCR3ConfigWithMeta({ config: newConfig[i], configCount: configCounts[i], configDigest: _computeConfigDigest(donId, configCounts[i], newConfig[i]) @@ -337,10 +307,10 @@ contract CCIPCapabilityConfiguration is ITypeAndVersion, ICapabilityConfiguratio /// @notice Group the OCR3 configurations by plugin type for further processing. /// @param ocr3Configs The OCR3 configurations to group. - function _groupByPluginType(OCR3Config[] memory ocr3Configs) + function _groupByPluginType(CCIPConfigTypes.OCR3Config[] memory ocr3Configs) internal pure - returns (OCR3Config[] memory commitConfigs, OCR3Config[] memory execConfigs) + returns (CCIPConfigTypes.OCR3Config[] memory commitConfigs, CCIPConfigTypes.OCR3Config[] memory execConfigs) { if (ocr3Configs.length > MAX_OCR3_CONFIGS_PER_DON) { revert TooManyOCR3Configs(); @@ -350,12 +320,12 @@ contract CCIPCapabilityConfiguration is ITypeAndVersion, ICapabilityConfiguratio // If we have less we will adjust the length later using mstore. // If the caller provides more than 2 configs per plugin type, we will revert due to out of bounds // access in the for loop below. - commitConfigs = new OCR3Config[](MAX_OCR3_CONFIGS_PER_PLUGIN); - execConfigs = new OCR3Config[](MAX_OCR3_CONFIGS_PER_PLUGIN); + commitConfigs = new CCIPConfigTypes.OCR3Config[](MAX_OCR3_CONFIGS_PER_PLUGIN); + execConfigs = new CCIPConfigTypes.OCR3Config[](MAX_OCR3_CONFIGS_PER_PLUGIN); uint256 commitCount; uint256 execCount; for (uint256 i = 0; i < ocr3Configs.length; ++i) { - if (ocr3Configs[i].pluginType == PluginType.Commit) { + if (ocr3Configs[i].pluginType == Internal.OCRPluginType.Commit) { commitConfigs[commitCount] = ocr3Configs[i]; ++commitCount; } else { @@ -373,9 +343,11 @@ contract CCIPCapabilityConfiguration is ITypeAndVersion, ICapabilityConfiguratio return (commitConfigs, execConfigs); } - function _validateConfig(OCR3Config memory cfg) internal view { + function _validateConfig(CCIPConfigTypes.OCR3Config memory cfg) internal view { if (cfg.chainSelector == 0) revert ChainSelectorNotSet(); - if (cfg.pluginType != PluginType.Commit && cfg.pluginType != PluginType.Execution) revert InvalidPluginType(); + if (cfg.pluginType != Internal.OCRPluginType.Commit && cfg.pluginType != Internal.OCRPluginType.Execution) { + revert InvalidPluginType(); + } // TODO: can we do more sophisticated validation than this? if (cfg.offrampAddress.length == 0) revert OfframpAddressCannotBeZero(); if (!s_remoteChainSelectors.contains(cfg.chainSelector)) revert ChainSelectorNotFound(cfg.chainSelector); @@ -398,7 +370,7 @@ contract CCIPCapabilityConfiguration is ITypeAndVersion, ICapabilityConfiguratio } if (cfg.bootstrapP2PIds.length > cfg.p2pIds.length) revert TooManyBootstrapP2PIds(); - // Check that the readers are in the capability registry. + // Check that the readers are in the capabilities registry. // TODO: check for duplicate signers, duplicate p2p ids, etc. // TODO: check that p2p ids in cfg.bootstrapP2PIds are included in cfg.p2pIds. for (uint256 i = 0; i < cfg.signers.length; ++i) { @@ -418,7 +390,7 @@ contract CCIPCapabilityConfiguration is ITypeAndVersion, ICapabilityConfiguratio function _computeConfigDigest( uint32 donId, uint64 configCount, - OCR3Config memory ocr3Config + CCIPConfigTypes.OCR3Config memory ocr3Config ) internal pure returns (bytes32) { uint256 h = uint256( keccak256( @@ -452,7 +424,7 @@ contract CCIPCapabilityConfiguration is ITypeAndVersion, ICapabilityConfiguratio /// @param chainConfigAdds The chain configurations to add. function applyChainConfigUpdates( uint64[] calldata chainSelectorRemoves, - ChainConfigInfo[] calldata chainConfigAdds + CCIPConfigTypes.ChainConfigInfo[] calldata chainConfigAdds ) external onlyOwner { // Process removals first. for (uint256 i = 0; i < chainSelectorRemoves.length; ++i) { @@ -469,11 +441,11 @@ contract CCIPCapabilityConfiguration is ITypeAndVersion, ICapabilityConfiguratio // Process additions next. for (uint256 i = 0; i < chainConfigAdds.length; ++i) { - ChainConfig memory chainConfig = chainConfigAdds[i].chainConfig; + CCIPConfigTypes.ChainConfig memory chainConfig = chainConfigAdds[i].chainConfig; bytes32[] memory readers = chainConfig.readers; uint64 chainSelector = chainConfigAdds[i].chainSelector; - // Verify that the provided readers are present in the capability registry. + // Verify that the provided readers are present in the capabilities registry. for (uint256 j = 0; j < readers.length; j++) { _ensureInRegistry(readers[j]); } @@ -490,10 +462,10 @@ contract CCIPCapabilityConfiguration is ITypeAndVersion, ICapabilityConfiguratio } } - /// @notice Helper function to ensure that a node is in the capability registry. + /// @notice Helper function to ensure that a node is in the capabilities registry. /// @param p2pId The P2P ID of the node to check. function _ensureInRegistry(bytes32 p2pId) internal view { - (ICapabilityRegistry.NodeInfo memory node,) = ICapabilityRegistry(i_capabilityRegistry).getNode(p2pId); + ICapabilitiesRegistry.NodeInfo memory node = ICapabilitiesRegistry(i_capabilitiesRegistry).getNode(p2pId); if (node.p2pId == bytes32("")) { revert NodeNotInRegistry(p2pId); } diff --git a/contracts/src/v0.8/ccip/capability/interfaces/ICapabilityRegistry.sol b/contracts/src/v0.8/ccip/capability/interfaces/ICapabilitiesRegistry.sol similarity index 51% rename from contracts/src/v0.8/ccip/capability/interfaces/ICapabilityRegistry.sol rename to contracts/src/v0.8/ccip/capability/interfaces/ICapabilitiesRegistry.sol index 85a98843c6..621c3686cf 100644 --- a/contracts/src/v0.8/ccip/capability/interfaces/ICapabilityRegistry.sol +++ b/contracts/src/v0.8/ccip/capability/interfaces/ICapabilitiesRegistry.sol @@ -1,23 +1,31 @@ -// SPDX-License-Identifier: MIT +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.24; -interface ICapabilityRegistry { +interface ICapabilitiesRegistry { struct NodeInfo { /// @notice The id of the node operator that manages this node uint32 nodeOperatorId; + /// @notice The number of times the node's configuration has been updated + uint32 configCount; + /// @notice The ID of the Workflow DON that the node belongs to. A node can + /// only belong to one DON that accepts Workflows. + uint32 workflowDONId; /// @notice The signer address for application-layer message verification. bytes32 signer; /// @notice This is an Ed25519 public key that is used to identify a node. - /// This key is guaranteed to be unique in the CapabilityRegistry. It is + /// This key is guaranteed to be unique in the CapabilitiesRegistry. It is /// used to identify a node in the the P2P network. bytes32 p2pId; /// @notice The list of hashed capability IDs supported by the node bytes32[] hashedCapabilityIds; + /// @notice The list of capabilities DON Ids supported by the node. A node + /// can belong to multiple capabilities DONs. This list does not include a + /// Workflow DON id if the node belongs to one. + uint256[] capabilitiesDONIds; } /// @notice Gets a node's data /// @param p2pId The P2P ID of the node to query for /// @return NodeInfo The node data - /// @return configCount The number of times the node has been configured - function getNode(bytes32 p2pId) external view returns (NodeInfo memory, uint32 configCount); + function getNode(bytes32 p2pId) external view returns (NodeInfo memory); } diff --git a/contracts/src/v0.8/ccip/capability/interfaces/IOCR3ConfigEncoder.sol b/contracts/src/v0.8/ccip/capability/interfaces/IOCR3ConfigEncoder.sol new file mode 100644 index 0000000000..6d0b0f72a5 --- /dev/null +++ b/contracts/src/v0.8/ccip/capability/interfaces/IOCR3ConfigEncoder.sol @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.0; + +import {CCIPConfigTypes} from "../libraries/CCIPConfigTypes.sol"; + +/// @dev This is so that we can generate gethwrappers and easily encode/decode OCR3Config +/// in the offchain integration tests. +interface IOCR3ConfigEncoder { + /// @dev Encodes an array of OCR3Config into a bytes array. For test usage only. + function exposeOCR3Config(CCIPConfigTypes.OCR3Config[] calldata config) external view returns (bytes memory); +} diff --git a/contracts/src/v0.8/ccip/capability/libraries/CCIPConfigTypes.sol b/contracts/src/v0.8/ccip/capability/libraries/CCIPConfigTypes.sol new file mode 100644 index 0000000000..5f052b3509 --- /dev/null +++ b/contracts/src/v0.8/ccip/capability/libraries/CCIPConfigTypes.sol @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.0; + +import {Internal} from "../../libraries/Internal.sol"; + +library CCIPConfigTypes { + /// @notice ConfigState indicates the state of the configuration. + /// A DON's configuration always starts out in the "Init" state - this is the starting state. + /// The only valid transition from "Init" is to the "Running" state - this is the first ever configuration. + /// The only valid transition from "Running" is to the "Staging" state - this is a blue/green proposal. + /// The only valid transition from "Staging" is back to the "Running" state - this is a promotion. + /// TODO: explain rollbacks? + enum ConfigState { + Init, + Running, + Staging + } + + /// @notice Chain configuration. + /// Changes to chain configuration are detected out-of-band in plugins and decoded offchain. + struct ChainConfig { + bytes32[] readers; // The P2P IDs of the readers for the chain. These IDs must be registered in the capabilities registry. + uint8 fChain; // The fault tolerance parameter of the chain. + bytes config; // The chain configuration. This is kept intentionally opaque so as to add fields in the future if needed. + } + + /// @notice Chain configuration information struct used in applyChainConfigUpdates and getAllChainConfigs. + struct ChainConfigInfo { + uint64 chainSelector; + ChainConfig chainConfig; + } + + /// @notice OCR3 configuration. + struct OCR3Config { + Internal.OCRPluginType pluginType; // ────────╮ The plugin that the configuration is for. + uint64 chainSelector; // | The (remote) chain that the configuration is for. + uint8 F; // | The "big F" parameter for the role DON. + uint64 offchainConfigVersion; // ─────────────╯ The version of the offchain configuration. + bytes offrampAddress; // The remote chain offramp address. + bytes32[] bootstrapP2PIds; // The bootstrap P2P IDs of the oracles that are part of the role DON. + // len(p2pIds) == len(signers) == len(transmitters) == 3 * F + 1 + // NOTE: indexes matter here! The p2p ID at index i corresponds to the signer at index i and the transmitter at index i. + // This is crucial in order to build the oracle ID <-> peer ID mapping offchain. + bytes32[] p2pIds; // The P2P IDs of the oracles that are part of the role DON. + bytes[] signers; // The onchain signing keys of nodes in the don. + bytes[] transmitters; // The onchain transmitter keys of nodes in the don. + bytes offchainConfig; // The offchain configuration for the OCR3 protocol. Protobuf encoded. + } + + /// @notice OCR3 configuration with metadata, specifically the config count and the config digest. + struct OCR3ConfigWithMeta { + OCR3Config config; // The OCR3 configuration. + uint64 configCount; // The config count used to compute the config digest. + bytes32 configDigest; // The config digest of the OCR3 configuration. + } +} diff --git a/contracts/src/v0.8/ccip/interfaces/IAny2EVMMultiOffRamp.sol b/contracts/src/v0.8/ccip/interfaces/IAny2EVMMultiOffRamp.sol deleted file mode 100644 index 484bd9c52c..0000000000 --- a/contracts/src/v0.8/ccip/interfaces/IAny2EVMMultiOffRamp.sol +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; - -interface IAny2EVMMultiOffRamp { - /// @notice Returns the the current nonce for a receiver. - /// @param sourceChainSelector The source chain to retrieve the nonce for - /// @param sender The sender address - /// @return nonce The nonce value belonging to the sender address. - function getSenderNonce(uint64 sourceChainSelector, address sender) external view returns (uint64 nonce); -} diff --git a/contracts/src/v0.8/ccip/interfaces/INonceManager.sol b/contracts/src/v0.8/ccip/interfaces/INonceManager.sol index 1e1b915ce0..52408ae4f5 100644 --- a/contracts/src/v0.8/ccip/interfaces/INonceManager.sol +++ b/contracts/src/v0.8/ccip/interfaces/INonceManager.sol @@ -3,9 +3,21 @@ pragma solidity ^0.8.0; /// @notice Contract interface that allows managing sender nonces interface INonceManager { - /// @notice Increments the outbound nonce for the given sender on the given destination chain + /// @notice Increments the outbound nonce for a given sender on a given destination chain /// @param destChainSelector The destination chain selector /// @param sender The sender address /// @return The new outbound nonce function getIncrementedOutboundNonce(uint64 destChainSelector, address sender) external returns (uint64); + + /// @notice Increments the inbound nonce for a given sender on a given source chain + /// @notice The increment is only applied if the resulting nonce matches the expectedNonce + /// @param sourceChainSelector The destination chain selector + /// @param expectedNonce The expected inbound nonce + /// @param sender The encoded sender address + /// @return True if the nonce was incremented, false otherwise + function incrementInboundNonce( + uint64 sourceChainSelector, + uint64 expectedNonce, + bytes calldata sender + ) external returns (bool); } diff --git a/contracts/src/v0.8/ccip/interfaces/IRMN.sol b/contracts/src/v0.8/ccip/interfaces/IRMN.sol index 37b035320b..a409731549 100644 --- a/contracts/src/v0.8/ccip/interfaces/IRMN.sol +++ b/contracts/src/v0.8/ccip/interfaces/IRMN.sol @@ -12,10 +12,10 @@ interface IRMN { /// @notice Callers MUST NOT cache the return value as a blessed tagged root could become unblessed. function isBlessed(TaggedRoot calldata taggedRoot) external view returns (bool); - /// @notice Iff there is an active global curse, or an active legacy curse (for backwards compatibility), this function returns true. + /// @notice Iff there is an active global or legacy curse, this function returns true. function isCursed() external view returns (bool); - /// @notice Iff there is an active global curse or an active subject curse, this function returns true. + /// @notice Iff there is an active global curse, or an active curse for `subject`, this function returns true. /// @param subject To check whether a particular chain is cursed, set to bytes16(uint128(chainSelector)). function isCursed(bytes16 subject) external view returns (bool); } diff --git a/contracts/src/v0.8/ccip/libraries/Internal.sol b/contracts/src/v0.8/ccip/libraries/Internal.sol index e39fcf4c0f..9068ca3a10 100644 --- a/contracts/src/v0.8/ccip/libraries/Internal.sol +++ b/contracts/src/v0.8/ccip/libraries/Internal.sol @@ -71,7 +71,7 @@ library Internal { /// @dev RMN depends on this struct, if changing, please notify the RMN maintainers. struct ExecutionReportSingleChain { uint64 sourceChainSelector; // Source chain selector for which the report is submitted - EVM2EVMMessage[] messages; + Any2EVMRampMessage[] messages; // Contains a bytes array for each message, each inner bytes array contains bytes per transferred token bytes[][] offchainTokenData; bytes32[] proofs; @@ -106,6 +106,7 @@ library Internal { bytes32 messageId; // a hash of the message data } + // TODO: create new const for EVM2AnyMessage /// @dev EVM2EVMMessage struct has 13 fields, including 3 variable arrays. /// Each variable array takes 1 more slot to store its length. /// When abi encoded, excluding array contents, @@ -113,6 +114,7 @@ library Internal { /// For structs that contain arrays, 1 more slot is added to the front, reaching a total of 17. uint256 public constant MESSAGE_FIXED_BYTES = 32 * 17; + // TODO: create new const for EVM2AnyMessage /// @dev Each token transfer adds 1 EVMTokenAmount and 1 bytes. /// When abiEncoded, each EVMTokenAmount takes 2 slots, each bytes takes 2 slots, excl bytes contents uint256 public constant MESSAGE_FIXED_BYTES_PER_TOKEN = 32 * 4; @@ -132,6 +134,12 @@ library Internal { bytes32 internal constant EVM_2_EVM_MESSAGE_HASH = keccak256("EVM2EVMMessageHashV2"); + /// @dev Used to hash messages for single-lane ramps. + /// OnRamp hash(EVM2EVMMessage) = OffRamp hash(EVM2EVMMessage) + /// The EVM2EVMMessage's messageId is expected to be the output of this hash function + /// @param original Message to hash + /// @param metadataHash Immutable metadata hash representing a lane with a fixed OnRamp + /// @return hashedMessage hashed message as a keccak256 function _hash(EVM2EVMMessage memory original, bytes32 metadataHash) internal pure returns (bytes32) { // Fixed-size message fields are included in nested hash to reduce stack pressure. // This hashing scheme is also used by RMN. If changing it, please notify the RMN maintainers. @@ -158,6 +166,43 @@ library Internal { ); } + bytes32 internal constant ANY_2_EVM_MESSAGE_HASH = keccak256("Any2EVMMessageHashV1"); + + /// @dev Used to hash messages for multi-lane family-agnostic OffRamps. + /// OnRamp hash(EVM2AnyMessage) != Any2EVMRampMessage.messageId + /// OnRamp hash(EVM2AnyMessage) != OffRamp hash(Any2EVMRampMessage) + /// @param original OffRamp message to hash + /// @param onRamp OnRamp to hash the message with - used to compute the metadataHash + /// @return hashedMessage hashed message as a keccak256 + function _hash(Any2EVMRampMessage memory original, bytes memory onRamp) internal pure returns (bytes32) { + // Fixed-size message fields are included in nested hash to reduce stack pressure. + // This hashing scheme is also used by RMN. If changing it, please notify the RMN maintainers. + return keccak256( + abi.encode( + MerkleMultiProof.LEAF_DOMAIN_SEPARATOR, + // Implicit metadata hash + keccak256( + abi.encode( + ANY_2_EVM_MESSAGE_HASH, original.header.sourceChainSelector, original.header.destChainSelector, onRamp + ) + ), + keccak256( + abi.encode( + original.header.messageId, + original.sender, + original.receiver, + original.header.sequenceNumber, + original.gasLimit, + original.header.nonce + ) + ), + keccak256(original.data), + keccak256(abi.encode(original.tokenAmounts)), + keccak256(abi.encode(original.sourceTokenData)) + ) + ); + } + /// @notice This methods provides validation for parsing abi encoded addresses by ensuring the /// address is within the EVM address space. If it isn't it will revert with an InvalidEVMAddress error, which /// we can catch and handle more gracefully than a revert from abi.decode. @@ -200,4 +245,29 @@ library Internal { Commit, Execution } + + /// @notice Family-agnostic header for OnRamp & OffRamp messages. + /// The messageId is not expected to match hash(message), since it may originate from another ramp family + // TODO: revisit if destChainSelector is required (likely sufficient to have it implicitly in the commit roots) + struct RampMessageHeader { + bytes32 messageId; // Unique identifier for the message, generated with the source chain's encoding scheme (i.e. not necessarily abi.encoded) + uint64 sourceChainSelector; // ───────╮ the chain selector of the source chain, note: not chainId + uint64 destChainSelector; // | the chain selector of the destination chain, note: not chainId + uint64 sequenceNumber; // │ sequence number, not unique across lanes + uint64 nonce; // ─────────────────────╯ nonce for this lane for this sender, not unique across senders/lanes + } + + /// @notice Family-agnostic message routed to an OffRamp + /// Note: hash(Any2EVMRampMessage) != hash(EVM2AnyRampMessage), hash(Any2EVMRampMessage) != messageId + /// due to encoding & parameter differences + struct Any2EVMRampMessage { + RampMessageHeader header; // Message header + bytes sender; // sender address on the source chain + bytes data; // arbitrary data payload supplied by the message sender + address receiver; // receiver address on the destination chain + uint256 gasLimit; // user supplied maximum gas amount available for dest chain execution + // TODO: revisit collapsing tokenAmounts + sourceTokenData into one struct array + Client.EVMTokenAmount[] tokenAmounts; // array of tokens and amounts to transfer + bytes[] sourceTokenData; // array of token data, one per token + } } diff --git a/contracts/src/v0.8/ccip/offRamp/EVM2EVMMultiOffRamp.sol b/contracts/src/v0.8/ccip/offRamp/EVM2EVMMultiOffRamp.sol index feb5ff360f..08c8086884 100644 --- a/contracts/src/v0.8/ccip/offRamp/EVM2EVMMultiOffRamp.sol +++ b/contracts/src/v0.8/ccip/offRamp/EVM2EVMMultiOffRamp.sol @@ -3,9 +3,8 @@ pragma solidity 0.8.24; import {ITypeAndVersion} from "../../shared/interfaces/ITypeAndVersion.sol"; import {IAny2EVMMessageReceiver} from "../interfaces/IAny2EVMMessageReceiver.sol"; -import {IAny2EVMMultiOffRamp} from "../interfaces/IAny2EVMMultiOffRamp.sol"; -import {IAny2EVMOffRamp} from "../interfaces/IAny2EVMOffRamp.sol"; import {IMessageInterceptor} from "../interfaces/IMessageInterceptor.sol"; +import {INonceManager} from "../interfaces/INonceManager.sol"; import {IPoolV1} from "../interfaces/IPool.sol"; import {IPriceRegistry} from "../interfaces/IPriceRegistry.sol"; import {IRMN} from "../interfaces/IRMN.sol"; @@ -25,12 +24,12 @@ import {ERC165Checker} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts /// @notice EVM2EVMOffRamp enables OCR networks to execute multiple messages /// in an OffRamp in a single transaction. -/// @dev The EVM2EVMOnRamp, CommitStore and EVM2EVMOffRamp form an xchain upgradeable unit. Any change to one of them -/// results an onchain upgrade of all 3. +/// @dev The EVM2EVMMultiOnRamp and EVM2EVMMultiOffRamp form an xchain upgradeable unit. Any change to one of them +/// results an onchain upgrade of both contracts. /// @dev MultiOCR3Base is used to store multiple OCR configs for both the OffRamp and the CommitStore. /// The execution plugin type has to be configured without signature verification, and the commit /// plugin type with verification. -contract EVM2EVMMultiOffRamp is IAny2EVMMultiOffRamp, ITypeAndVersion, MultiOCR3Base { +contract EVM2EVMMultiOffRamp is ITypeAndVersion, MultiOCR3Base { using ERC165Checker for address; using EnumerableMapAddresses for EnumerableMapAddresses.AddressToAddressMap; @@ -52,7 +51,6 @@ contract EVM2EVMMultiOffRamp is IAny2EVMMultiOffRamp, ITypeAndVersion, MultiOCR3 error TokenHandlingError(bytes error); error EmptyReport(); error CursedByRMN(uint64 sourceChainSelector); - error InvalidMessageId(bytes32 messageId); error NotACompatiblePool(address notPool); error InvalidDataLength(uint256 expected, uint256 got); error InvalidNewState(uint64 sourceChainSelector, uint64 sequenceNumber, Internal.MessageExecutionState newState); @@ -60,12 +58,11 @@ contract EVM2EVMMultiOffRamp is IAny2EVMMultiOffRamp, ITypeAndVersion, MultiOCR3 error StaleCommitReport(); error InvalidInterval(uint64 sourceChainSelector, Interval interval); error ZeroAddressNotAllowed(); + error InvalidMessageDestChainSelector(uint64 messageDestChainSelector); /// @dev Atlas depends on this event, if changing, please notify Atlas. event StaticConfigSet(StaticConfig staticConfig); event DynamicConfigSet(DynamicConfig dynamicConfig); - event SkippedIncorrectNonce(uint64 sourceChainSelector, uint64 nonce, address sender); - event SkippedSenderWithPreviousRampMessageInflight(uint64 sourceChainSelector, uint64 nonce, address sender); /// @dev RMN depends on this event, if changing, please notify the RMN maintainers. event ExecutionStateChanged( uint64 indexed sourceChainSelector, @@ -87,26 +84,21 @@ contract EVM2EVMMultiOffRamp is IAny2EVMMultiOffRamp, ITypeAndVersion, MultiOCR3 uint64 chainSelector; // ───╮ Destination chainSelector address rmnProxy; // ───────╯ RMN proxy address address tokenAdminRegistry; // Token admin registry address + address nonceManager; // Address of the nonce manager } /// @notice Per-chain source config (defining a lane from a Source Chain -> Dest OffRamp) struct SourceChainConfig { - bool isEnabled; // ─────────╮ Flag whether the source chain is enabled or not - uint64 minSeqNr; // | The min sequence number expected for future messages - address prevOffRamp; // ────╯ Address of previous-version per-lane OffRamp. Used to be able to provide sequencing continuity during a zero downtime upgrade. - address onRamp; // OnRamp address on the source chain - /// @dev Ensures that 2 identical messages sent to 2 different lanes will have a distinct hash. - /// Must match the metadataHash used in computing leaf hashes offchain for the root committed in - /// the commitStore and i_metadataHash in the onRamp. - bytes32 metadataHash; // Source-chain specific message hash preimage to ensure global uniqueness + bool isEnabled; // ──────────╮ Flag whether the source chain is enabled or not + uint64 minSeqNr; // ─────────╯ The min sequence number expected for future messages + bytes onRamp; // OnRamp address on the source chain } /// @notice SourceChainConfig update args scoped to one source chain struct SourceChainConfigArgs { uint64 sourceChainSelector; // ───╮ Source chain selector of the config to update - bool isEnabled; // │ Flag whether the source chain is enabled or not - address prevOffRamp; // ───────────╯ Address of previous-version per-lane OffRamp. Used to be able to provide sequencing continuity during a zero downtime upgrade. - address onRamp; // OnRamp address on the source chain + bool isEnabled; // ────────────────╯ Flag whether the source chain is enabled or not + bytes onRamp; // OnRamp address on the source chain } /// @notice Dynamic offRamp config @@ -155,6 +147,8 @@ contract EVM2EVMMultiOffRamp is IAny2EVMMultiOffRamp, ITypeAndVersion, MultiOCR3 address internal immutable i_rmnProxy; /// @dev The address of the token admin registry address internal immutable i_tokenAdminRegistry; + /// @dev The address of the nonce manager + address internal immutable i_nonceManager; // DYNAMIC CONFIG DynamicConfig internal s_dynamicConfig; @@ -164,11 +158,6 @@ contract EVM2EVMMultiOffRamp is IAny2EVMMultiOffRamp, ITypeAndVersion, MultiOCR3 mapping(uint64 sourceChainSelector => SourceChainConfig sourceChainConfig) internal s_sourceChainConfigs; // STATE - /// @dev The expected nonce for a given sender per source chain. - /// Corresponds to s_senderNonce in the OnRamp for a lane, used to enforce that messages are - /// executed in the same order they are sent (assuming they are DON). Note that re-execution - /// of FAILED messages however, can be out of order. - mapping(uint64 sourceChainSelector => mapping(address sender => uint64 nonce)) internal s_senderNonce; /// @dev A mapping of sequence numbers (per source chain) to execution state using a bitmap with each execution /// state only taking up 2 bits of the uint256, packing 128 states into a single slot. /// Message state is tracked to ensure message can only be executed successfully once. @@ -181,7 +170,10 @@ contract EVM2EVMMultiOffRamp is IAny2EVMMultiOffRamp, ITypeAndVersion, MultiOCR3 uint64 private s_latestPriceSequenceNumber; constructor(StaticConfig memory staticConfig, SourceChainConfigArgs[] memory sourceChainConfigs) MultiOCR3Base() { - if (staticConfig.rmnProxy == address(0) || staticConfig.tokenAdminRegistry == address(0)) { + if ( + staticConfig.rmnProxy == address(0) || staticConfig.tokenAdminRegistry == address(0) + || staticConfig.nonceManager == address(0) + ) { revert ZeroAddressNotAllowed(); } @@ -192,6 +184,7 @@ contract EVM2EVMMultiOffRamp is IAny2EVMMultiOffRamp, ITypeAndVersion, MultiOCR3 i_chainSelector = staticConfig.chainSelector; i_rmnProxy = staticConfig.rmnProxy; i_tokenAdminRegistry = staticConfig.tokenAdminRegistry; + i_nonceManager = staticConfig.nonceManager; emit StaticConfigSet(staticConfig); _applySourceChainConfigUpdates(sourceChainConfigs); @@ -258,35 +251,6 @@ contract EVM2EVMMultiOffRamp is IAny2EVMMultiOffRamp, ITypeAndVersion, MultiOCR3 return s_executionStates[sourceChainSelector][sequenceNumber / 128]; } - /// @inheritdoc IAny2EVMMultiOffRamp - function getSenderNonce(uint64 sourceChainSelector, address sender) external view returns (uint64) { - (uint64 nonce,) = _getSenderNonce(sourceChainSelector, sender); - return nonce; - } - - /// @notice Returns the the current nonce for a receiver. - /// @param sourceChainSelector The source chain to retrieve the nonce for - /// @param sender The sender address - /// @return nonce The nonce value belonging to the sender address. - /// @return isFromPrevRamp True if the nonce was retrieved from the prevOffRamps - function _getSenderNonce( - uint64 sourceChainSelector, - address sender - ) internal view returns (uint64 nonce, bool isFromPrevRamp) { - uint64 senderNonce = s_senderNonce[sourceChainSelector][sender]; - - if (senderNonce == 0) { - address prevOffRamp = s_sourceChainConfigs[sourceChainSelector].prevOffRamp; - if (prevOffRamp != address(0)) { - // If OffRamp was upgraded, check if sender has a nonce from the previous OffRamp. - // NOTE: assuming prevOffRamp is always a lane-specific off ramp - return (IAny2EVMOffRamp(prevOffRamp).getSenderNonce(sender), true); - } - } - - return (senderNonce, false); - } - /// @notice Manually executes a set of reports. /// @param reports Internal.ExecutionReportSingleChain[] - list of reports to execute /// @param gasLimitOverrides New gasLimit for each message per report @@ -377,14 +341,19 @@ contract EVM2EVMMultiOffRamp is IAny2EVMMultiOffRamp, ITypeAndVersion, MultiOCR3 bytes32[] memory hashedLeaves = new bytes32[](numMsgs); for (uint256 i = 0; i < numMsgs; ++i) { - Internal.EVM2EVMMessage memory message = report.messages[i]; + Internal.Any2EVMRampMessage memory message = report.messages[i]; + + // Commits do not verify the destChainSelector in the message, since only the root is committed, + // so we have to check it explicitly + if (message.header.destChainSelector != i_chainSelector) { + revert InvalidMessageDestChainSelector(message.header.destChainSelector); + } + // We do this hash here instead of in _verifyMessages to avoid two separate loops - // over the same data, which increases gas cost - hashedLeaves[i] = Internal._hash(message, sourceChainConfig.metadataHash); - // For EVM2EVM offramps, the messageID is the leaf hash. - // Asserting that this is true ensures we don't accidentally commit and then execute - // a message with an unexpected hash. - if (hashedLeaves[i] != message.messageId) revert InvalidMessageId(message.messageId); + // over the same data, which increases gas cost. + // Hashing all of the message fields ensures that the message being executed is correct and not tampered with. + // Including the known OnRamp ensures that the message originates from the correct on ramp version + hashedLeaves[i] = Internal._hash(message, sourceChainConfig.onRamp); } // SECURITY CRITICAL CHECK @@ -395,14 +364,15 @@ contract EVM2EVMMultiOffRamp is IAny2EVMMultiOffRamp, ITypeAndVersion, MultiOCR3 // Execute messages bool manualExecution = manualExecGasLimits.length != 0; for (uint256 i = 0; i < numMsgs; ++i) { - Internal.EVM2EVMMessage memory message = report.messages[i]; + Internal.Any2EVMRampMessage memory message = report.messages[i]; - Internal.MessageExecutionState originalState = getExecutionState(sourceChainSelector, message.sequenceNumber); + Internal.MessageExecutionState originalState = + getExecutionState(sourceChainSelector, message.header.sequenceNumber); if (originalState == Internal.MessageExecutionState.SUCCESS) { // If the message has already been executed, we skip it. We want to not revert on race conditions between // executing parties. This will allow us to open up manual exec while also attempting with the DON, without // reverting an entire DON batch when a user manually executes while the tx is inflight. - emit SkippedAlreadyExecutedMessage(sourceChainSelector, message.sequenceNumber); + emit SkippedAlreadyExecutedMessage(sourceChainSelector, message.header.sequenceNumber); continue; } // Two valid cases here, we either have never touched this message before, or we tried to execute @@ -413,7 +383,7 @@ contract EVM2EVMMultiOffRamp is IAny2EVMMultiOffRamp, ITypeAndVersion, MultiOCR3 originalState == Internal.MessageExecutionState.UNTOUCHED || originalState == Internal.MessageExecutionState.FAILURE ) - ) revert AlreadyExecuted(sourceChainSelector, message.sequenceNumber); + ) revert AlreadyExecuted(sourceChainSelector, message.header.sequenceNumber); if (manualExecution) { bool isOldCommitReport = @@ -432,51 +402,33 @@ contract EVM2EVMMultiOffRamp is IAny2EVMMultiOffRamp, ITypeAndVersion, MultiOCR3 // DON can only execute a message once // Acceptable state transitions: UNTOUCHED->SUCCESS, UNTOUCHED->FAILURE if (originalState != Internal.MessageExecutionState.UNTOUCHED) { - revert AlreadyAttempted(sourceChainSelector, message.sequenceNumber); + revert AlreadyAttempted(sourceChainSelector, message.header.sequenceNumber); } } - if (message.nonce > 0) { - // In the scenario where we upgrade offRamps, we still want to have sequential nonces. - // Referencing the old offRamp to check the expected nonce if none is set for a - // given sender allows us to skip the current message if it would not be the next according - // to the old offRamp. This preserves sequencing between updates. - (uint64 prevNonce, bool isFromPrevRamp) = _getSenderNonce(sourceChainSelector, message.sender); - if (isFromPrevRamp) { - if (prevNonce + 1 != message.nonce) { - // the starting v2 onramp nonce, i.e. the 1st message nonce v2 offramp is expected to receive, - // is guaranteed to equal (largest v1 onramp nonce + 1). - // if this message's nonce isn't (v1 offramp nonce + 1), then v1 offramp nonce != largest v1 onramp nonce, - // it tells us there are still messages inflight for v1 offramp - emit SkippedSenderWithPreviousRampMessageInflight(sourceChainSelector, message.nonce, message.sender); - continue; - } - // Otherwise this nonce is indeed the "transitional nonce", that is - // all messages sent to v1 ramp have been executed by the DON and the sequence can resume in V2. - // Note if first time user in V2, then prevNonce will be 0, and message.nonce = 1, so this will be a no-op. - s_senderNonce[sourceChainSelector][message.sender] = prevNonce; - } - - // UNTOUCHED messages MUST be executed in order always IF message.nonce > 0. - if (originalState == Internal.MessageExecutionState.UNTOUCHED) { - if (prevNonce + 1 != message.nonce) { - // We skip the message if the nonce is incorrect, since message.nonce > 0. - emit SkippedIncorrectNonce(sourceChainSelector, message.nonce, message.sender); - continue; - } - } + // Nonce changes per state transition (these only apply for ordered messages): + // UNTOUCHED -> FAILURE nonce bump + // UNTOUCHED -> SUCCESS nonce bump + // FAILURE -> FAILURE no nonce bump + // FAILURE -> SUCCESS no nonce bump + // UNTOUCHED messages MUST be executed in order always + if (message.header.nonce > 0 && originalState == Internal.MessageExecutionState.UNTOUCHED) { + // If a nonce is not incremented, that means it was skipped, and we can ignore the message + if ( + !INonceManager(i_nonceManager).incrementInboundNonce(sourceChainSelector, message.header.nonce, message.sender) + ) continue; } // Although we expect only valid messages will be committed, we check again // when executing as a defense in depth measure. bytes[] memory offchainTokenData = report.offchainTokenData[i]; if (message.tokenAmounts.length != offchainTokenData.length) { - revert TokenDataMismatch(sourceChainSelector, message.sequenceNumber); + revert TokenDataMismatch(sourceChainSelector, message.header.sequenceNumber); } - _setExecutionState(sourceChainSelector, message.sequenceNumber, Internal.MessageExecutionState.IN_PROGRESS); + _setExecutionState(sourceChainSelector, message.header.sequenceNumber, Internal.MessageExecutionState.IN_PROGRESS); (Internal.MessageExecutionState newState, bytes memory returnData) = _trialExecute(message, offchainTokenData); - _setExecutionState(sourceChainSelector, message.sequenceNumber, newState); + _setExecutionState(sourceChainSelector, message.header.sequenceNumber, newState); // Since it's hard to estimate whether manual execution will succeed, we // revert the entire transaction if it fails. This will show the user if @@ -487,36 +439,28 @@ contract EVM2EVMMultiOffRamp is IAny2EVMMultiOffRamp, ITypeAndVersion, MultiOCR3 ) { // If manual execution fails, we revert the entire transaction, unless the originalState is UNTOUCHED as we // would still be making progress by changing the state from UNTOUCHED to FAILURE. - revert ExecutionError(message.messageId, returnData); + revert ExecutionError(message.header.messageId, returnData); } // The only valid prior states are UNTOUCHED and FAILURE (checked above) // The only valid post states are FAILURE and SUCCESS (checked below) if (newState != Internal.MessageExecutionState.FAILURE && newState != Internal.MessageExecutionState.SUCCESS) { - revert InvalidNewState(sourceChainSelector, message.sequenceNumber, newState); + revert InvalidNewState(sourceChainSelector, message.header.sequenceNumber, newState); } - // Nonce changes per state transition. - // These only apply for ordered messages. - // UNTOUCHED -> FAILURE nonce bump - // UNTOUCHED -> SUCCESS nonce bump - // FAILURE -> FAILURE no nonce bump - // FAILURE -> SUCCESS no nonce bump - if (message.nonce > 0 && originalState == Internal.MessageExecutionState.UNTOUCHED) { - s_senderNonce[sourceChainSelector][message.sender]++; - } - - emit ExecutionStateChanged(sourceChainSelector, message.sequenceNumber, message.messageId, newState, returnData); + emit ExecutionStateChanged( + sourceChainSelector, message.header.sequenceNumber, message.header.messageId, newState, returnData + ); } } /// @notice Try executing a message. - /// @param message Internal.EVM2EVMMessage memory message. + /// @param message Internal.Any2EVMRampMessage memory message. /// @param offchainTokenData Data provided by the DON for token transfers. /// @return the new state of the message, being either SUCCESS or FAILURE. /// @return revert data in bytes if CCIP receiver reverted during execution. function _trialExecute( - Internal.EVM2EVMMessage memory message, + Internal.Any2EVMRampMessage memory message, bytes[] memory offchainTokenData ) internal returns (Internal.MessageExecutionState, bytes memory) { try this.executeSingleMessage(message, offchainTokenData) {} @@ -534,7 +478,7 @@ contract EVM2EVMMultiOffRamp is IAny2EVMMultiOffRamp, ITypeAndVersion, MultiOCR3 return (Internal.MessageExecutionState.FAILURE, err); } else { // If revert is not caused by CCIP receiver, it is unexpected, bubble up the revert. - revert ExecutionError(message.messageId, err); + revert ExecutionError(message.header.messageId, err); } } // If message execution succeeded, no CCIP receiver return data is expected, return with empty bytes. @@ -548,21 +492,27 @@ contract EVM2EVMMultiOffRamp is IAny2EVMMultiOffRamp, ITypeAndVersion, MultiOCR3 /// its execution and enforce atomicity among successful message processing and token transfer. /// @dev We use ERC-165 to check for the ccipReceive interface to permit sending tokens to contracts /// (for example smart contract wallets) without an associated message. - function executeSingleMessage(Internal.EVM2EVMMessage memory message, bytes[] memory offchainTokenData) external { + function executeSingleMessage(Internal.Any2EVMRampMessage memory message, bytes[] memory offchainTokenData) external { if (msg.sender != address(this)) revert CanOnlySelfCall(); Client.EVMTokenAmount[] memory destTokenAmounts = new Client.EVMTokenAmount[](0); if (message.tokenAmounts.length > 0) { destTokenAmounts = _releaseOrMintTokens( message.tokenAmounts, - abi.encode(message.sender), + message.sender, message.receiver, - message.sourceChainSelector, + message.header.sourceChainSelector, message.sourceTokenData, offchainTokenData ); } - Client.Any2EVMMessage memory any2EvmMessage = Internal._toAny2EVMMessage(message, destTokenAmounts); + Client.Any2EVMMessage memory any2EvmMessage = Client.Any2EVMMessage({ + messageId: message.header.messageId, + sourceChainSelector: message.header.sourceChainSelector, + sender: abi.encode(message.sender), + data: message.data, + destTokenAmounts: destTokenAmounts + }); address messageValidator = s_dynamicConfig.messageValidator; if (messageValidator != address(0)) { @@ -593,11 +543,6 @@ contract EVM2EVMMultiOffRamp is IAny2EVMMultiOffRamp, ITypeAndVersion, MultiOCR3 if (!success) revert ReceiverError(returnData); } - /// @notice creates a unique hash to be used in message hashing. - function _metadataHash(uint64 sourceChainSelector, address onRamp, bytes32 prefix) internal view returns (bytes32) { - return keccak256(abi.encode(prefix, sourceChainSelector, i_chainSelector, onRamp)); - } - // ================================================================ // │ Commit │ // ================================================================ @@ -748,8 +693,12 @@ contract EVM2EVMMultiOffRamp is IAny2EVMMultiOffRamp, ITypeAndVersion, MultiOCR3 /// @dev This function will always return the same struct as the contents is static and can never change. /// RMN depends on this function, if changing, please notify the RMN maintainers. function getStaticConfig() external view returns (StaticConfig memory) { - return - StaticConfig({chainSelector: i_chainSelector, rmnProxy: i_rmnProxy, tokenAdminRegistry: i_tokenAdminRegistry}); + return StaticConfig({ + chainSelector: i_chainSelector, + rmnProxy: i_rmnProxy, + tokenAdminRegistry: i_tokenAdminRegistry, + nonceManager: i_nonceManager + }); } /// @notice Returns the current dynamic config. @@ -782,24 +731,20 @@ contract EVM2EVMMultiOffRamp is IAny2EVMMultiOffRamp, ITypeAndVersion, MultiOCR3 revert ZeroChainSelectorNotAllowed(); } - if (sourceConfigUpdate.onRamp == address(0)) { - revert ZeroAddressNotAllowed(); - } - SourceChainConfig storage currentConfig = s_sourceChainConfigs[sourceChainSelector]; + bytes memory currentOnRamp = currentConfig.onRamp; + bytes memory newOnRamp = sourceConfigUpdate.onRamp; // OnRamp can never be zero - if it is, then the source chain has been added for the first time - if (currentConfig.onRamp == address(0)) { - currentConfig.metadataHash = - _metadataHash(sourceChainSelector, sourceConfigUpdate.onRamp, Internal.EVM_2_EVM_MESSAGE_HASH); - currentConfig.onRamp = sourceConfigUpdate.onRamp; - currentConfig.prevOffRamp = sourceConfigUpdate.prevOffRamp; - currentConfig.minSeqNr = 1; + if (currentOnRamp.length == 0) { + if (newOnRamp.length == 0) { + revert ZeroAddressNotAllowed(); + } + currentConfig.onRamp = newOnRamp; + currentConfig.minSeqNr = 1; emit SourceChainSelectorAdded(sourceChainSelector); - } else if ( - currentConfig.onRamp != sourceConfigUpdate.onRamp || currentConfig.prevOffRamp != sourceConfigUpdate.prevOffRamp - ) { + } else if (keccak256(currentOnRamp) != keccak256(newOnRamp)) { revert InvalidStaticConfig(sourceChainSelector); } @@ -845,9 +790,11 @@ contract EVM2EVMMultiOffRamp is IAny2EVMMultiOffRamp, ITypeAndVersion, MultiOCR3 /// @param sourceAmount The amount of tokens to be released/minted. /// @param originalSender The message sender on the source chain. /// @param receiver The address that will receive the tokens. + /// @param sourceChainSelector The remote source chain selector /// @param sourceTokenData A struct containing the local token address, the source pool address and optional data /// returned from the source pool. /// @param offchainTokenData Data fetched offchain by the DON. + /// @return destTokenAmount local token address with amount function _releaseOrMintSingleToken( uint256 sourceAmount, bytes memory originalSender, @@ -920,8 +867,12 @@ contract EVM2EVMMultiOffRamp is IAny2EVMMultiOffRamp, ITypeAndVersion, MultiOCR3 /// @notice Uses pools to release or mint a number of different tokens to a receiver address. /// @param sourceTokenAmounts List of tokens and amount values to be released/minted. - /// @param encodedSourceTokenData Array of token data returned by token pools on the source chain. + /// @param originalSender The message sender on the source chain. + /// @param receiver The address that will receive the tokens. + /// @param sourceChainSelector The remote source chain selector + /// @param encodedSourceTokenData Encoded source token data, decoding to Internal.SourceTokenData /// @param offchainTokenData Array of token data fetched offchain by the DON. + /// @return destTokenAmounts local token addresses with amounts /// @dev This function wrappes the token pool call in a try catch block to gracefully handle /// any non-rate limiting errors that may occur. If we encounter a rate limiting related error /// we bubble it up. If we encounter a non-rate limiting error we wrap it in a TokenHandlingError. diff --git a/contracts/src/v0.8/ccip/onRamp/EVM2EVMMultiOnRamp.sol b/contracts/src/v0.8/ccip/onRamp/EVM2EVMMultiOnRamp.sol index df3ba45b48..130309a9a6 100644 --- a/contracts/src/v0.8/ccip/onRamp/EVM2EVMMultiOnRamp.sol +++ b/contracts/src/v0.8/ccip/onRamp/EVM2EVMMultiOnRamp.sol @@ -54,7 +54,7 @@ contract EVM2EVMMultiOnRamp is IEVM2AnyOnRampClient, ITypeAndVersion, OwnerIsCre event TokenTransferFeeConfigUpdated( uint64 indexed destChainSelector, address indexed token, TokenTransferFeeConfig tokenTransferFeeConfig ); - event TokenTransferFeeConfigDeleted(uint256 indexed destChainSelector, address indexed token); + event TokenTransferFeeConfigDeleted(uint64 indexed destChainSelector, address indexed token); /// RMN depends on this event, if changing, please notify the RMN maintainers. event CCIPSendRequested(uint64 indexed destChainSelector, Internal.EVM2EVMMessage message); event DestChainAdded(uint64 indexed destChainSelector, DestChainConfig destChainConfig); diff --git a/contracts/src/v0.8/ccip/test/NonceManager.t.sol b/contracts/src/v0.8/ccip/test/NonceManager.t.sol index 7c59e82272..b780f4cfad 100644 --- a/contracts/src/v0.8/ccip/test/NonceManager.t.sol +++ b/contracts/src/v0.8/ccip/test/NonceManager.t.sol @@ -2,19 +2,33 @@ pragma solidity 0.8.24; import {NonceManager} from "../NonceManager.sol"; +import {ICommitStore} from "../interfaces/ICommitStore.sol"; import {Client} from "../libraries/Client.sol"; import {Internal} from "../libraries/Internal.sol"; import {Pool} from "../libraries/Pool.sol"; import {RateLimiter} from "../libraries/RateLimiter.sol"; +import {EVM2EVMMultiOffRamp} from "../offRamp/EVM2EVMMultiOffRamp.sol"; import {EVM2EVMMultiOnRamp} from "../onRamp/EVM2EVMMultiOnRamp.sol"; import {EVM2EVMOnRamp} from "../onRamp/EVM2EVMOnRamp.sol"; + +import {BaseTest} from "./BaseTest.t.sol"; import {EVM2EVMMultiOnRampHelper} from "./helpers/EVM2EVMMultiOnRampHelper.sol"; +import {EVM2EVMOffRampHelper} from "./helpers/EVM2EVMOffRampHelper.sol"; import {EVM2EVMOnRampHelper} from "./helpers/EVM2EVMOnRampHelper.sol"; +import {MockCommitStore} from "./mocks/MockCommitStore.sol"; +import {EVM2EVMMultiOffRampSetup} from "./offRamp/EVM2EVMMultiOffRampSetup.t.sol"; import {EVM2EVMMultiOnRampSetup} from "./onRamp/EVM2EVMMultiOnRampSetup.t.sol"; -contract NonceManagerTest_getIncrementedOutboundNonce is EVM2EVMMultiOnRampSetup { +contract NonceManager_NonceIncrementation is BaseTest { + NonceManager private s_nonceManager; + + function setUp() public override { + address[] memory authorizedCallers = new address[](1); + authorizedCallers[0] = address(this); + s_nonceManager = new NonceManager(authorizedCallers); + } + function test_getIncrementedOutboundNonce_Success() public { - vm.startPrank(address(s_onRamp)); address sender = address(this); assertEq(s_nonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, sender), 0); @@ -22,59 +36,136 @@ contract NonceManagerTest_getIncrementedOutboundNonce is EVM2EVMMultiOnRampSetup uint64 outboundNonce = s_nonceManager.getIncrementedOutboundNonce(DEST_CHAIN_SELECTOR, sender); assertEq(outboundNonce, 1); } + + function test_incrementInboundNonce_Success() public { + address sender = address(this); + + s_nonceManager.incrementInboundNonce(SOURCE_CHAIN_SELECTOR, 1, abi.encode(sender)); + + assertEq(s_nonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR, abi.encode(sender)), 1); + } + + function test_incrementInboundNonce_Skip() public { + address sender = address(this); + uint64 expectedNonce = 2; + + vm.expectEmit(); + emit NonceManager.SkippedIncorrectNonce(SOURCE_CHAIN_SELECTOR, expectedNonce, abi.encode(sender)); + + s_nonceManager.incrementInboundNonce(SOURCE_CHAIN_SELECTOR, expectedNonce, abi.encode(sender)); + + assertEq(s_nonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR, abi.encode(sender)), 0); + } + + function test_incrementNoncesInboundAndOutbound_Success() public { + address sender = address(this); + + assertEq(s_nonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, sender), 0); + uint64 outboundNonce = s_nonceManager.getIncrementedOutboundNonce(DEST_CHAIN_SELECTOR, sender); + assertEq(outboundNonce, 1); + + // Inbound nonce unchanged + assertEq(s_nonceManager.getInboundNonce(DEST_CHAIN_SELECTOR, abi.encode(sender)), 0); + + s_nonceManager.incrementInboundNonce(DEST_CHAIN_SELECTOR, 1, abi.encode(sender)); + assertEq(s_nonceManager.getInboundNonce(DEST_CHAIN_SELECTOR, abi.encode(sender)), 1); + + // Outbound nonce unchanged + assertEq(s_nonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, sender), 1); + } } contract NonceManager_applyPreviousRampsUpdates is EVM2EVMMultiOnRampSetup { function test_SingleRampUpdate() public { - address prevOnRamp = vm.addr(1); + address prevOnRamp = makeAddr("prevOnRamp"); + address prevOffRamp = makeAddr("prevOffRamp"); NonceManager.PreviousRampsArgs[] memory previousRamps = new NonceManager.PreviousRampsArgs[](1); - previousRamps[0] = NonceManager.PreviousRampsArgs(DEST_CHAIN_SELECTOR, NonceManager.PreviousRamps(prevOnRamp)); + previousRamps[0] = + NonceManager.PreviousRampsArgs(DEST_CHAIN_SELECTOR, NonceManager.PreviousRamps(prevOnRamp, prevOffRamp)); vm.expectEmit(); - emit NonceManager.PreviousOnRampUpdated(DEST_CHAIN_SELECTOR, prevOnRamp); + emit NonceManager.PreviousRampsUpdated(DEST_CHAIN_SELECTOR, previousRamps[0].prevRamps); - s_nonceManager.applyPreviousRampsUpdates(previousRamps); + s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); - _assertPreviousRampsEqual(s_nonceManager.getPreviousRamps(DEST_CHAIN_SELECTOR), previousRamps[0].prevRamps); + _assertPreviousRampsEqual(s_outboundNonceManager.getPreviousRamps(DEST_CHAIN_SELECTOR), previousRamps[0].prevRamps); } function test_MultipleRampsUpdates() public { - address prevOnRamp1 = vm.addr(1); - address prevOnRamp2 = vm.addr(2); + address prevOnRamp1 = makeAddr("prevOnRamp1"); + address prevOnRamp2 = makeAddr("prevOnRamp2"); + address prevOffRamp1 = makeAddr("prevOffRamp1"); + address prevOffRamp2 = makeAddr("prevOffRamp2"); NonceManager.PreviousRampsArgs[] memory previousRamps = new NonceManager.PreviousRampsArgs[](2); - previousRamps[0] = NonceManager.PreviousRampsArgs(DEST_CHAIN_SELECTOR, NonceManager.PreviousRamps(prevOnRamp1)); - previousRamps[1] = NonceManager.PreviousRampsArgs(DEST_CHAIN_SELECTOR + 1, NonceManager.PreviousRamps(prevOnRamp2)); + previousRamps[0] = + NonceManager.PreviousRampsArgs(DEST_CHAIN_SELECTOR, NonceManager.PreviousRamps(prevOnRamp1, prevOffRamp1)); + previousRamps[1] = + NonceManager.PreviousRampsArgs(DEST_CHAIN_SELECTOR + 1, NonceManager.PreviousRamps(prevOnRamp2, prevOffRamp2)); vm.expectEmit(); - emit NonceManager.PreviousOnRampUpdated(DEST_CHAIN_SELECTOR, prevOnRamp1); + emit NonceManager.PreviousRampsUpdated(DEST_CHAIN_SELECTOR, previousRamps[0].prevRamps); vm.expectEmit(); - emit NonceManager.PreviousOnRampUpdated(DEST_CHAIN_SELECTOR + 1, prevOnRamp2); + emit NonceManager.PreviousRampsUpdated(DEST_CHAIN_SELECTOR + 1, previousRamps[1].prevRamps); - s_nonceManager.applyPreviousRampsUpdates(previousRamps); + s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); - _assertPreviousRampsEqual(s_nonceManager.getPreviousRamps(DEST_CHAIN_SELECTOR), previousRamps[0].prevRamps); - _assertPreviousRampsEqual(s_nonceManager.getPreviousRamps(DEST_CHAIN_SELECTOR + 1), previousRamps[1].prevRamps); + _assertPreviousRampsEqual(s_outboundNonceManager.getPreviousRamps(DEST_CHAIN_SELECTOR), previousRamps[0].prevRamps); + _assertPreviousRampsEqual( + s_outboundNonceManager.getPreviousRamps(DEST_CHAIN_SELECTOR + 1), previousRamps[1].prevRamps + ); } function test_ZeroInput() public { vm.recordLogs(); - s_nonceManager.applyPreviousRampsUpdates(new NonceManager.PreviousRampsArgs[](0)); + s_outboundNonceManager.applyPreviousRampsUpdates(new NonceManager.PreviousRampsArgs[](0)); assertEq(vm.getRecordedLogs().length, 0); } function test_PreviousRampAlreadySetOnRamp_Revert() public { NonceManager.PreviousRampsArgs[] memory previousRamps = new NonceManager.PreviousRampsArgs[](1); + address prevOnRamp = makeAddr("prevOnRamp"); previousRamps[0] = - NonceManager.PreviousRampsArgs(DEST_CHAIN_SELECTOR, NonceManager.PreviousRamps(address(vm.addr(1)))); + NonceManager.PreviousRampsArgs(DEST_CHAIN_SELECTOR, NonceManager.PreviousRamps(prevOnRamp, address(0))); - s_nonceManager.applyPreviousRampsUpdates(previousRamps); + s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); previousRamps[0] = - NonceManager.PreviousRampsArgs(DEST_CHAIN_SELECTOR, NonceManager.PreviousRamps(address(vm.addr(2)))); + NonceManager.PreviousRampsArgs(DEST_CHAIN_SELECTOR, NonceManager.PreviousRamps(prevOnRamp, address(0))); vm.expectRevert(NonceManager.PreviousRampAlreadySet.selector); - s_nonceManager.applyPreviousRampsUpdates(previousRamps); + s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); + } + + function test_PreviousRampAlreadySetOffRamp_Revert() public { + NonceManager.PreviousRampsArgs[] memory previousRamps = new NonceManager.PreviousRampsArgs[](1); + address prevOffRamp = makeAddr("prevOffRamp"); + previousRamps[0] = + NonceManager.PreviousRampsArgs(DEST_CHAIN_SELECTOR, NonceManager.PreviousRamps(address(0), prevOffRamp)); + + s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); + + previousRamps[0] = + NonceManager.PreviousRampsArgs(DEST_CHAIN_SELECTOR, NonceManager.PreviousRamps(address(0), prevOffRamp)); + + vm.expectRevert(NonceManager.PreviousRampAlreadySet.selector); + s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); + } + + function test_PreviousRampAlreadySetOnRampAndOffRamp_Revert() public { + NonceManager.PreviousRampsArgs[] memory previousRamps = new NonceManager.PreviousRampsArgs[](1); + address prevOnRamp = makeAddr("prevOnRamp"); + address prevOffRamp = makeAddr("prevOffRamp"); + previousRamps[0] = + NonceManager.PreviousRampsArgs(DEST_CHAIN_SELECTOR, NonceManager.PreviousRamps(prevOnRamp, prevOffRamp)); + + s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); + + previousRamps[0] = + NonceManager.PreviousRampsArgs(DEST_CHAIN_SELECTOR, NonceManager.PreviousRamps(prevOnRamp, prevOffRamp)); + + vm.expectRevert(NonceManager.PreviousRampAlreadySet.selector); + s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); } function _assertPreviousRampsEqual( @@ -82,15 +173,16 @@ contract NonceManager_applyPreviousRampsUpdates is EVM2EVMMultiOnRampSetup { NonceManager.PreviousRamps memory b ) internal pure { assertEq(a.prevOnRamp, b.prevOnRamp); + assertEq(a.prevOffRamp, b.prevOffRamp); } } -contract NonceManager_onRampUpgrade is EVM2EVMMultiOnRampSetup { +contract NonceManager_OnRampUpgrade is EVM2EVMMultiOnRampSetup { uint256 internal constant FEE_AMOUNT = 1234567890; EVM2EVMOnRampHelper internal s_prevOnRamp; function setUp() public virtual override { - EVM2EVMMultiOnRampSetup.setUp(); + super.setUp(); EVM2EVMOnRamp.FeeTokenConfigArgs[] memory feeTokenConfigArgs = new EVM2EVMOnRamp.FeeTokenConfigArgs[](1); feeTokenConfigArgs[0] = EVM2EVMOnRamp.FeeTokenConfigArgs({ @@ -149,14 +241,14 @@ contract NonceManager_onRampUpgrade is EVM2EVMMultiOnRampSetup { NonceManager.PreviousRampsArgs[] memory previousRamps = new NonceManager.PreviousRampsArgs[](1); previousRamps[0] = - NonceManager.PreviousRampsArgs(DEST_CHAIN_SELECTOR, NonceManager.PreviousRamps(address(s_prevOnRamp))); - s_nonceManager.applyPreviousRampsUpdates(previousRamps); + NonceManager.PreviousRampsArgs(DEST_CHAIN_SELECTOR, NonceManager.PreviousRamps(address(s_prevOnRamp), address(0))); + s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); EVM2EVMMultiOnRamp.DestChainConfigArgs[] memory destChainConfigArgs = _generateDestChainConfigArgs(); destChainConfigArgs[0].prevOnRamp = address(s_prevOnRamp); (s_onRamp, s_metadataHash) = _deployOnRamp( - SOURCE_CHAIN_SELECTOR, address(s_sourceRouter), address(s_nonceManager), address(s_tokenAdminRegistry) + SOURCE_CHAIN_SELECTOR, address(s_sourceRouter), address(s_outboundNonceManager), address(s_tokenAdminRegistry) ); vm.startPrank(address(s_sourceRouter)); @@ -172,24 +264,24 @@ contract NonceManager_onRampUpgrade is EVM2EVMMultiOnRampSetup { function test_UpgradeSenderNoncesReadsPreviousRamp_Success() public { Client.EVM2AnyMessage memory message = _generateEmptyMessage(); - uint64 startNonce = s_nonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER); + uint64 startNonce = s_outboundNonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER); for (uint64 i = 1; i < 4; ++i) { s_prevOnRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 0, OWNER); - assertEq(startNonce + i, s_nonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER)); + assertEq(startNonce + i, s_outboundNonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER)); } } function test_UpgradeNonceStartsAtV1Nonce_Success() public { Client.EVM2AnyMessage memory message = _generateEmptyMessage(); - uint64 startNonce = s_nonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER); + uint64 startNonce = s_outboundNonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER); // send 1 message from previous onramp s_prevOnRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, FEE_AMOUNT, OWNER); - assertEq(startNonce + 1, s_nonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER)); + assertEq(startNonce + 1, s_outboundNonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER)); // new onramp nonce should start from 2, while sequence number start from 1 vm.expectEmit(); @@ -198,7 +290,7 @@ contract NonceManager_onRampUpgrade is EVM2EVMMultiOnRampSetup { ); s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, FEE_AMOUNT, OWNER); - assertEq(startNonce + 2, s_nonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER)); + assertEq(startNonce + 2, s_outboundNonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER)); // after another send, nonce should be 3, and sequence number be 2 vm.expectEmit(); @@ -207,7 +299,7 @@ contract NonceManager_onRampUpgrade is EVM2EVMMultiOnRampSetup { ); s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, FEE_AMOUNT, OWNER); - assertEq(startNonce + 3, s_nonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER)); + assertEq(startNonce + 3, s_outboundNonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER)); } function test_UpgradeNonceNewSenderStartsAtZero_Success() public { @@ -225,3 +317,347 @@ contract NonceManager_onRampUpgrade is EVM2EVMMultiOnRampSetup { s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, FEE_AMOUNT, newSender); } } + +contract NonceManager_OffRampUpgrade is EVM2EVMMultiOffRampSetup { + EVM2EVMOffRampHelper internal s_prevOffRamp; + EVM2EVMOffRampHelper[] internal s_nestedPrevOffRamps; + + address internal constant SINGLE_LANE_ON_RAMP_ADDRESS_1 = abi.decode(ON_RAMP_ADDRESS_1, (address)); + address internal constant SINGLE_LANE_ON_RAMP_ADDRESS_2 = abi.decode(ON_RAMP_ADDRESS_2, (address)); + address internal constant SINGLE_LANE_ON_RAMP_ADDRESS_3 = abi.decode(ON_RAMP_ADDRESS_3, (address)); + + function setUp() public virtual override { + super.setUp(); + + ICommitStore mockPrevCommitStore = new MockCommitStore(); + s_prevOffRamp = _deploySingleLaneOffRamp( + mockPrevCommitStore, s_destRouter, address(0), SOURCE_CHAIN_SELECTOR_1, SINGLE_LANE_ON_RAMP_ADDRESS_1 + ); + + s_nestedPrevOffRamps = new EVM2EVMOffRampHelper[](2); + s_nestedPrevOffRamps[0] = _deploySingleLaneOffRamp( + mockPrevCommitStore, s_destRouter, address(0), SOURCE_CHAIN_SELECTOR_2, SINGLE_LANE_ON_RAMP_ADDRESS_2 + ); + s_nestedPrevOffRamps[1] = _deploySingleLaneOffRamp( + mockPrevCommitStore, + s_destRouter, + address(s_nestedPrevOffRamps[0]), + SOURCE_CHAIN_SELECTOR_2, + SINGLE_LANE_ON_RAMP_ADDRESS_2 + ); + + NonceManager.PreviousRampsArgs[] memory previousRamps = new NonceManager.PreviousRampsArgs[](3); + previousRamps[0] = NonceManager.PreviousRampsArgs( + SOURCE_CHAIN_SELECTOR_1, NonceManager.PreviousRamps(address(0), address(s_prevOffRamp)) + ); + previousRamps[1] = NonceManager.PreviousRampsArgs( + SOURCE_CHAIN_SELECTOR_2, NonceManager.PreviousRamps(address(0), address(s_nestedPrevOffRamps[1])) + ); + previousRamps[2] = NonceManager.PreviousRampsArgs( + SOURCE_CHAIN_SELECTOR_3, NonceManager.PreviousRamps(SINGLE_LANE_ON_RAMP_ADDRESS_3, address(0)) + ); + s_inboundNonceManager.applyPreviousRampsUpdates(previousRamps); + + EVM2EVMMultiOffRamp.SourceChainConfigArgs[] memory sourceChainConfigs = + new EVM2EVMMultiOffRamp.SourceChainConfigArgs[](3); + sourceChainConfigs[0] = EVM2EVMMultiOffRamp.SourceChainConfigArgs({ + sourceChainSelector: SOURCE_CHAIN_SELECTOR_1, + isEnabled: true, + onRamp: ON_RAMP_ADDRESS_1 + }); + sourceChainConfigs[1] = EVM2EVMMultiOffRamp.SourceChainConfigArgs({ + sourceChainSelector: SOURCE_CHAIN_SELECTOR_2, + isEnabled: true, + onRamp: ON_RAMP_ADDRESS_2 + }); + sourceChainConfigs[2] = EVM2EVMMultiOffRamp.SourceChainConfigArgs({ + sourceChainSelector: SOURCE_CHAIN_SELECTOR_3, + isEnabled: true, + onRamp: ON_RAMP_ADDRESS_3 + }); + + _setupMultipleOffRampsFromConfigs(sourceChainConfigs); + + s_offRamp.setVerifyOverrideResult(SOURCE_CHAIN_SELECTOR_1, 1); + s_offRamp.setVerifyOverrideResult(SOURCE_CHAIN_SELECTOR_3, 1); + } + + function test_Upgraded_Success() public { + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + vm.expectEmit(); + emit EVM2EVMMultiOffRamp.ExecutionStateChanged( + SOURCE_CHAIN_SELECTOR_1, + messages[0].header.sequenceNumber, + messages[0].header.messageId, + Internal.MessageExecutionState.SUCCESS, + "" + ); + + s_offRamp.executeSingleReport(_generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0)); + } + + function test_NoPrevOffRampForChain_Success() public { + Internal.EVM2EVMMessage[] memory messages = + _generateSingleLaneSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, SINGLE_LANE_ON_RAMP_ADDRESS_1); + uint64 startNonceChain3 = + s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_3, abi.encode(messages[0].sender)); + s_prevOffRamp.execute( + _generateSingleLaneRampReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0) + ); + + // Nonce unchanged for chain 3 + assertEq( + startNonceChain3, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_3, abi.encode(messages[0].sender)) + ); + + Internal.Any2EVMRampMessage[] memory messagesChain3 = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_3, ON_RAMP_ADDRESS_3); + vm.expectEmit(); + emit EVM2EVMMultiOffRamp.ExecutionStateChanged( + SOURCE_CHAIN_SELECTOR_3, + messagesChain3[0].header.sequenceNumber, + messagesChain3[0].header.messageId, + Internal.MessageExecutionState.SUCCESS, + "" + ); + + s_offRamp.executeSingleReport( + _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_3, messagesChain3), new uint256[](0) + ); + assertEq( + startNonceChain3 + 1, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_3, messagesChain3[0].sender) + ); + } + + function test_UpgradedSenderNoncesReadsPreviousRamp_Success() public { + Internal.EVM2EVMMessage[] memory messages = + _generateSingleLaneSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, SINGLE_LANE_ON_RAMP_ADDRESS_1); + uint64 startNonce = s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, abi.encode(messages[0].sender)); + + for (uint64 i = 1; i < 4; ++i) { + s_prevOffRamp.execute( + _generateSingleLaneRampReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0) + ); + + // messages contains a single message - update for the next execution + messages[0].nonce++; + messages[0].sequenceNumber++; + messages[0].messageId = Internal._hash(messages[0], s_prevOffRamp.metadataHash()); + + assertEq( + startNonce + i, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, abi.encode(messages[0].sender)) + ); + } + } + + function test_UpgradedSenderNoncesReadsPreviousRampTransitive_Success() public { + Internal.EVM2EVMMessage[] memory messages = + _generateSingleLaneSingleBasicMessage(SOURCE_CHAIN_SELECTOR_2, SINGLE_LANE_ON_RAMP_ADDRESS_2); + uint64 startNonce = s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_2, abi.encode(messages[0].sender)); + + for (uint64 i = 1; i < 4; ++i) { + s_nestedPrevOffRamps[0].execute( + _generateSingleLaneRampReportFromMessages(SOURCE_CHAIN_SELECTOR_2, messages), new uint256[](0) + ); + + // messages contains a single message - update for the next execution + messages[0].nonce++; + messages[0].sequenceNumber++; + messages[0].messageId = Internal._hash(messages[0], s_nestedPrevOffRamps[0].metadataHash()); + + // Read through prev sender nonce through prevOffRamp -> prevPrevOffRamp + assertEq( + startNonce + i, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_2, abi.encode(messages[0].sender)) + ); + } + } + + function test_UpgradedNonceStartsAtV1Nonce_Success() public { + Internal.EVM2EVMMessage[] memory messages = + _generateSingleLaneSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, SINGLE_LANE_ON_RAMP_ADDRESS_1); + + uint64 startNonce = s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, abi.encode(messages[0].sender)); + s_prevOffRamp.execute( + _generateSingleLaneRampReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0) + ); + + assertEq( + startNonce + 1, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, abi.encode(messages[0].sender)) + ); + + Internal.Any2EVMRampMessage[] memory messagesMultiRamp = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + + messagesMultiRamp[0].header.nonce++; + messagesMultiRamp[0].header.messageId = Internal._hash(messagesMultiRamp[0], ON_RAMP_ADDRESS_1); + + vm.expectEmit(); + emit EVM2EVMMultiOffRamp.ExecutionStateChanged( + SOURCE_CHAIN_SELECTOR_1, + messagesMultiRamp[0].header.sequenceNumber, + messagesMultiRamp[0].header.messageId, + Internal.MessageExecutionState.SUCCESS, + "" + ); + + s_offRamp.executeSingleReport( + _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messagesMultiRamp), new uint256[](0) + ); + assertEq( + startNonce + 2, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messagesMultiRamp[0].sender) + ); + + messagesMultiRamp[0].header.nonce++; + messagesMultiRamp[0].header.sequenceNumber++; + messagesMultiRamp[0].header.messageId = Internal._hash(messagesMultiRamp[0], ON_RAMP_ADDRESS_1); + + vm.expectEmit(); + emit EVM2EVMMultiOffRamp.ExecutionStateChanged( + SOURCE_CHAIN_SELECTOR_1, + messagesMultiRamp[0].header.sequenceNumber, + messagesMultiRamp[0].header.messageId, + Internal.MessageExecutionState.SUCCESS, + "" + ); + + s_offRamp.executeSingleReport( + _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messagesMultiRamp), new uint256[](0) + ); + assertEq( + startNonce + 3, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messagesMultiRamp[0].sender) + ); + } + + function test_UpgradedNonceNewSenderStartsAtZero_Success() public { + Internal.EVM2EVMMessage[] memory messages = + _generateSingleLaneSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, SINGLE_LANE_ON_RAMP_ADDRESS_1); + + s_prevOffRamp.execute( + _generateSingleLaneRampReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0) + ); + + Internal.Any2EVMRampMessage[] memory messagesMultiRamp = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + + bytes memory newSender = abi.encode(address(1234567)); + messagesMultiRamp[0].sender = newSender; + messagesMultiRamp[0].header.messageId = Internal._hash(messagesMultiRamp[0], ON_RAMP_ADDRESS_1); + + vm.expectEmit(); + emit EVM2EVMMultiOffRamp.ExecutionStateChanged( + SOURCE_CHAIN_SELECTOR_1, + messagesMultiRamp[0].header.sequenceNumber, + messagesMultiRamp[0].header.messageId, + Internal.MessageExecutionState.SUCCESS, + "" + ); + + // new sender nonce in new offramp should go from 0 -> 1 + assertEq(s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, newSender), 0); + s_offRamp.executeSingleReport( + _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messagesMultiRamp), new uint256[](0) + ); + assertEq(s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, newSender), 1); + } + + function test_UpgradedOffRampNonceSkipsIfMsgInFlight_Success() public { + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + + address newSender = address(1234567); + messages[0].sender = abi.encode(newSender); + messages[0].header.nonce = 2; + messages[0].header.messageId = Internal._hash(messages[0], ON_RAMP_ADDRESS_1); + + uint64 startNonce = s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender); + + // new offramp sees msg nonce higher than senderNonce + // it waits for previous offramp to execute + vm.expectEmit(); + emit NonceManager.SkippedIncorrectNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].header.nonce, messages[0].sender); + s_offRamp.executeSingleReport(_generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0)); + assertEq(startNonce, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender)); + + Internal.EVM2EVMMessage[] memory messagesSingleLane = + _generateSingleLaneSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, SINGLE_LANE_ON_RAMP_ADDRESS_1); + + messagesSingleLane[0].nonce = 1; + messagesSingleLane[0].sender = newSender; + messagesSingleLane[0].messageId = Internal._hash(messagesSingleLane[0], s_prevOffRamp.metadataHash()); + + // previous offramp executes msg and increases nonce + s_prevOffRamp.execute( + _generateSingleLaneRampReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messagesSingleLane), new uint256[](0) + ); + assertEq( + startNonce + 1, + s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, abi.encode(messagesSingleLane[0].sender)) + ); + + messages[0].header.nonce = 2; + messages[0].header.messageId = Internal._hash(messages[0], ON_RAMP_ADDRESS_1); + + // new offramp is able to execute + vm.expectEmit(); + emit EVM2EVMMultiOffRamp.ExecutionStateChanged( + SOURCE_CHAIN_SELECTOR_1, + messages[0].header.sequenceNumber, + messages[0].header.messageId, + Internal.MessageExecutionState.SUCCESS, + "" + ); + + s_offRamp.executeSingleReport(_generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0)); + assertEq(startNonce + 2, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender)); + } + + function _generateSingleLaneRampReportFromMessages( + uint64 sourceChainSelector, + Internal.EVM2EVMMessage[] memory messages + ) internal pure returns (Internal.ExecutionReport memory) { + bytes[][] memory offchainTokenData = new bytes[][](messages.length); + + for (uint256 i = 0; i < messages.length; ++i) { + offchainTokenData[i] = new bytes[](messages[i].tokenAmounts.length); + } + + return Internal.ExecutionReport({ + proofs: new bytes32[](0), + proofFlagBits: 2 ** 256 - 1, + messages: messages, + offchainTokenData: offchainTokenData + }); + } + + function _generateSingleLaneSingleBasicMessage( + uint64 sourceChainSelector, + address onRamp + ) internal view returns (Internal.EVM2EVMMessage[] memory) { + Internal.EVM2EVMMessage[] memory messages = new Internal.EVM2EVMMessage[](1); + + bytes memory data = abi.encode(0); + messages[0] = Internal.EVM2EVMMessage({ + sequenceNumber: 1, + sender: OWNER, + nonce: 1, + gasLimit: GAS_LIMIT, + strict: false, + sourceChainSelector: sourceChainSelector, + receiver: address(s_receiver), + data: data, + tokenAmounts: new Client.EVMTokenAmount[](0), + sourceTokenData: new bytes[](0), + feeToken: s_destFeeToken, + feeTokenAmount: uint256(0), + messageId: "" + }); + + messages[0].messageId = Internal._hash( + messages[0], + keccak256(abi.encode(Internal.EVM_2_EVM_MESSAGE_HASH, sourceChainSelector, DEST_CHAIN_SELECTOR, onRamp)) + ); + + return messages; + } +} diff --git a/contracts/src/v0.8/ccip/test/arm/ARMProxy.t.sol b/contracts/src/v0.8/ccip/test/arm/ARMProxy.t.sol index 339855dedb..24b617c82a 100644 --- a/contracts/src/v0.8/ccip/test/arm/ARMProxy.t.sol +++ b/contracts/src/v0.8/ccip/test/arm/ARMProxy.t.sol @@ -6,35 +6,36 @@ import {IRMN} from "../../interfaces/IRMN.sol"; import {ARMProxy} from "../../ARMProxy.sol"; import {RMN} from "../../RMN.sol"; import {MockRMN} from "../mocks/MockRMN.sol"; -import {RMNSetup} from "./RMNSetup.t.sol"; +import {RMNSetup, makeSubjects} from "./RMNSetup.t.sol"; contract ARMProxyTest is RMNSetup { - event ARMSet(address arm); - + MockRMN internal s_mockRMN; ARMProxy internal s_armProxy; function setUp() public virtual override { RMNSetup.setUp(); + s_mockRMN = new MockRMN(); s_armProxy = new ARMProxy(address(s_rmn)); } function test_ARMIsCursed_Success() public { s_armProxy.setARM(address(s_mockRMN)); assertFalse(IRMN(address(s_armProxy)).isCursed()); - RMN(address(s_armProxy)).voteToCurse(bytes32(0)); + s_mockRMN.setGlobalCursed(true); assertTrue(IRMN(address(s_armProxy)).isCursed()); } function test_ARMIsBlessed_Success() public { s_armProxy.setARM(address(s_mockRMN)); + s_mockRMN.setTaggedRootBlessed(IRMN.TaggedRoot({commitStore: address(0), root: bytes32(0)}), true); assertTrue(IRMN(address(s_armProxy)).isBlessed(IRMN.TaggedRoot({commitStore: address(0), root: bytes32(0)}))); - RMN(address(s_armProxy)).voteToCurse(bytes32(0)); + s_mockRMN.setTaggedRootBlessed(IRMN.TaggedRoot({commitStore: address(0), root: bytes32(0)}), false); assertFalse(IRMN(address(s_armProxy)).isBlessed(IRMN.TaggedRoot({commitStore: address(0), root: bytes32(0)}))); } function test_ARMCallRevertReasonForwarded() public { bytes memory err = bytes("revert"); - s_mockRMN.setRevert(err); + s_mockRMN.setIsCursedRevert(err); s_armProxy.setARM(address(s_mockRMN)); vm.expectRevert(abi.encodeWithSelector(MockRMN.CustomError.selector, err)); IRMN(address(s_armProxy)).isCursed(); diff --git a/contracts/src/v0.8/ccip/test/arm/ARMProxy_standalone.t.sol b/contracts/src/v0.8/ccip/test/arm/ARMProxy_standalone.t.sol index 0ee2a508e1..4f3e96fafa 100644 --- a/contracts/src/v0.8/ccip/test/arm/ARMProxy_standalone.t.sol +++ b/contracts/src/v0.8/ccip/test/arm/ARMProxy_standalone.t.sol @@ -5,8 +5,6 @@ import {ARMProxy} from "../../ARMProxy.sol"; import {Test} from "forge-std/Test.sol"; contract ARMProxyStandaloneTest is Test { - event ARMSet(address arm); - address internal constant EMPTY_ADDRESS = address(0x1); address internal constant OWNER_ADDRESS = 0xC0ffeeEeC0fFeeeEc0ffeEeEc0ffEEEEC0FfEEee; address internal constant MOCK_RMN_ADDRESS = 0x1337133713371337133713371337133713371337; @@ -23,14 +21,14 @@ contract ARMProxyStandaloneTest is Test { function test_Constructor() public { vm.expectEmit(); - emit ARMSet(MOCK_RMN_ADDRESS); + emit ARMProxy.ARMSet(MOCK_RMN_ADDRESS); ARMProxy proxy = new ARMProxy(MOCK_RMN_ADDRESS); assertEq(proxy.getARM(), MOCK_RMN_ADDRESS); } function test_SetARM() public { vm.expectEmit(); - emit ARMSet(MOCK_RMN_ADDRESS); + emit ARMProxy.ARMSet(MOCK_RMN_ADDRESS); vm.prank(OWNER_ADDRESS); s_armProxy.setARM(MOCK_RMN_ADDRESS); assertEq(s_armProxy.getARM(), MOCK_RMN_ADDRESS); @@ -57,9 +55,9 @@ contract ARMProxyStandaloneTest is Test { ); if (expectedSuccess) { - vm.mockCall(MOCK_ARM_ADDRESS, 0, call, ret); + vm.mockCall(MOCK_RMN_ADDRESS, 0, call, ret); } else { - vm.mockCallRevert(MOCK_ARM_ADDRESS, 0, call, ret); + vm.mockCallRevert(MOCK_RMN_ADDRESS, 0, call, ret); } (bool actualSuccess, bytes memory result) = address(s_armProxy).call(call); vm.clearMockedCalls(); diff --git a/contracts/src/v0.8/ccip/test/arm/RMN.t.sol b/contracts/src/v0.8/ccip/test/arm/RMN.t.sol index 061f71afdd..d3237592f2 100644 --- a/contracts/src/v0.8/ccip/test/arm/RMN.t.sol +++ b/contracts/src/v0.8/ccip/test/arm/RMN.t.sol @@ -3,10 +3,13 @@ pragma solidity 0.8.24; import {IRMN} from "../../interfaces/IRMN.sol"; -import {RMN} from "../../RMN.sol"; -import {RMNSetup} from "./RMNSetup.t.sol"; +import {GLOBAL_CURSE_SUBJECT, LIFT_CURSE_VOTE_ADDR, OWNER_CURSE_VOTE_ADDR, RMN} from "../../RMN.sol"; +import {RMNSetup, makeCursesHash, makeSubjects} from "./RMNSetup.t.sol"; + import {Test} from "forge-std/Test.sol"; +bytes28 constant GARBAGE_CURSES_HASH = bytes28(keccak256("GARBAGE_CURSES_HASH")); + contract ConfigCompare is Test { function assertConfigEq(RMN.Config memory actualConfig, RMN.Config memory expectedConfig) public pure { assertEq(actualConfig.voters.length, expectedConfig.voters.length); @@ -32,79 +35,50 @@ contract RMN_constructor is ConfigCompare, RMNSetup { } } -contract RMN_voteToBlessRoots is RMNSetup { - event VotedToBless(uint32 indexed configVersion, address indexed voter, IRMN.TaggedRoot taggedRoot, uint8 weight); - - // Success - +contract RMN_voteToBless is RMNSetup { function _getFirstBlessVoterAndWeight() internal pure returns (address, uint8) { RMN.Config memory cfg = rmnConstructorArgs(); return (cfg.voters[0].blessVoteAddr, cfg.voters[0].blessWeight); } - function test_1RootSuccess_gas() public { - vm.pauseGasMetering(); - (address voter, uint8 voterWeight) = _getFirstBlessVoterAndWeight(); - - vm.expectEmit(); - emit VotedToBless(1, voter, makeTaggedRoot(1), voterWeight); - - vm.startPrank(voter); - vm.resumeGasMetering(); - s_rmn.voteToBless(makeTaggedRootSingleton(1)); - vm.pauseGasMetering(); + // Success - assertFalse(s_rmn.isBlessed(makeTaggedRoot(1))); - assertEq(voterWeight, getWeightOfVotesToBlessRoot(makeTaggedRoot(1))); - assertTrue(hasVotedToBlessRoot(voter, makeTaggedRoot(1))); - vm.resumeGasMetering(); - } + function test_RootSuccess() public { + uint256 numRoots = 10; - function test_3RootSuccess_gas() public { - vm.pauseGasMetering(); (address voter, uint8 voterWeight) = _getFirstBlessVoterAndWeight(); - for (uint256 i = 1; i <= 3; ++i) { + for (uint256 i = 1; i <= numRoots; ++i) { vm.expectEmit(); - emit VotedToBless(1, voter, makeTaggedRoot(i), voterWeight); + emit RMN.VotedToBless(1, voter, makeTaggedRoot(i), voterWeight); } - vm.startPrank(voter); - vm.resumeGasMetering(); - s_rmn.voteToBless(makeTaggedRootsInclusive(1, 3)); - vm.pauseGasMetering(); + vm.prank(voter); + s_rmn.voteToBless(makeTaggedRootsInclusive(1, numRoots)); - for (uint256 i = 1; i <= 3; ++i) { + for (uint256 i = 1; i <= numRoots; ++i) { assertFalse(s_rmn.isBlessed(makeTaggedRoot(i))); assertEq(voterWeight, getWeightOfVotesToBlessRoot(makeTaggedRoot(i))); - assertTrue(hasVotedToBlessRoot(voter, makeTaggedRoot(i))); + assertTrue(hasVotedToBlessRoot(voter, makeTaggedRoot(1))); } - vm.resumeGasMetering(); } - function test_5RootSuccess_gas() public { - vm.pauseGasMetering(); - (address voter, uint8 voterWeight) = _getFirstBlessVoterAndWeight(); + // Reverts - for (uint256 i = 1; i <= 5; ++i) { - vm.expectEmit(); - emit VotedToBless(1, voter, makeTaggedRoot(i), voterWeight); - } + function test_SenderAlreadyVoted_Revert() public { + (address voter,) = _getFirstBlessVoterAndWeight(); vm.startPrank(voter); - vm.resumeGasMetering(); - s_rmn.voteToBless(makeTaggedRootsInclusive(1, 5)); - vm.pauseGasMetering(); + s_rmn.voteToBless(makeTaggedRootSingleton(1)); + assertTrue(hasVotedToBlessRoot(voter, makeTaggedRoot(1))); - for (uint256 i = 1; i <= 5; ++i) { - assertFalse(s_rmn.isBlessed(makeTaggedRoot(i))); - assertEq(voterWeight, getWeightOfVotesToBlessRoot(makeTaggedRoot(i))); - assertTrue(hasVotedToBlessRoot(voter, makeTaggedRoot(1))); - } - vm.resumeGasMetering(); + uint256 votesToBlessBefore = getWeightOfVotesToBlessRoot(makeTaggedRoot(1)); + vm.expectRevert(RMN.VoteToBlessNoop.selector); + s_rmn.voteToBless(makeTaggedRootSingleton(1)); + assertEq(votesToBlessBefore, getWeightOfVotesToBlessRoot(makeTaggedRoot(1))); } - function test_IsAlreadyBlessedIgnored_Success() public { + function test_IsAlreadyBlessed_Revert() public { RMN.Config memory cfg = rmnConstructorArgs(); // Bless voters 2,3,4 vote to bless @@ -115,40 +89,27 @@ contract RMN_voteToBlessRoots is RMNSetup { uint256 votesToBlessBefore = getWeightOfVotesToBlessRoot(makeTaggedRoot(1)); vm.startPrank(cfg.voters[0].blessVoteAddr); + vm.expectRevert(RMN.VoteToBlessNoop.selector); s_rmn.voteToBless(makeTaggedRootSingleton(1)); assertEq(votesToBlessBefore, getWeightOfVotesToBlessRoot(makeTaggedRoot(1))); } - function test_SenderAlreadyVotedIgnored_Success() public { - (address voter,) = _getFirstBlessVoterAndWeight(); - - vm.startPrank(voter); - s_rmn.voteToBless(makeTaggedRootSingleton(1)); - assertTrue(hasVotedToBlessRoot(voter, makeTaggedRoot(1))); - - uint256 votesToBlessBefore = getWeightOfVotesToBlessRoot(makeTaggedRoot(1)); - s_rmn.voteToBless(makeTaggedRootSingleton(1)); - assertEq(votesToBlessBefore, getWeightOfVotesToBlessRoot(makeTaggedRoot(1))); - } - - // Reverts - function test_Curse_Revert() public { RMN.Config memory cfg = rmnConstructorArgs(); for (uint256 i = 0; i < cfg.voters.length; i++) { vm.startPrank(cfg.voters[i].curseVoteAddr); - s_rmn.voteToCurse(makeCurseId(i)); + s_rmn.voteToCurse(makeCurseId(i), makeSubjects(GLOBAL_CURSE_SUBJECT)); } vm.startPrank(cfg.voters[0].blessVoteAddr); - vm.expectRevert(RMN.MustRecoverFromCurse.selector); + vm.expectRevert(RMN.VoteToBlessForbiddenDuringActiveGlobalCurse.selector); s_rmn.voteToBless(makeTaggedRootSingleton(12903)); } - function test_InvalidVoter_Revert() public { + function test_UnauthorizedVoter_Revert() public { vm.startPrank(STRANGER); - vm.expectRevert(abi.encodeWithSelector(RMN.InvalidVoter.selector, STRANGER)); + vm.expectRevert(abi.encodeWithSelector(RMN.UnauthorizedVoter.selector, STRANGER)); s_rmn.voteToBless(makeTaggedRootSingleton(12321)); } } @@ -170,24 +131,20 @@ contract RMN_ownerUnbless is RMNSetup { contract RMN_unvoteToCurse is RMNSetup { uint256 internal s_curser; - bytes32 internal s_cursesHash; + bytes28 internal s_cursesHash; function setUp() public override { - RMN.Config memory cfg = rmnConstructorArgs(); RMNSetup.setUp(); - cfg = rmnConstructorArgs(); - s_curser = 0; + RMN.Config memory cfg = rmnConstructorArgs(); - vm.startPrank(cfg.voters[0].curseVoteAddr); - s_rmn.voteToCurse(makeCurseId(1)); - bytes32 expectedCursesHash = keccak256(abi.encode(bytes32(0), makeCurseId(1))); + s_curser = 0; + vm.startPrank(cfg.voters[s_curser].curseVoteAddr); + s_rmn.voteToCurse(makeCurseId(1), makeSubjects(0)); + bytes28 expectedCursesHash = makeCursesHash(makeCurseId(1)); assertFalse(s_rmn.isCursed()); - (address[] memory cursers, uint32[] memory voteCounts, bytes32[] memory cursesHashes, uint16 weight, bool cursed) = - s_rmn.getCurseProgress(); + (address[] memory cursers, bytes28[] memory cursesHashes, uint16 weight, bool cursed) = s_rmn.getCurseProgress(0); assertEq(1, cursers.length); - assertEq(1, voteCounts.length); assertEq(cfg.voters[s_curser].curseVoteAddr, cursers[0]); - assertEq(1, voteCounts[0]); assertEq(cfg.voters[s_curser].curseWeight, weight); assertEq(1, cursesHashes.length); assertEq(expectedCursesHash, cursesHashes[0]); @@ -196,103 +153,322 @@ contract RMN_unvoteToCurse is RMNSetup { s_cursesHash = expectedCursesHash; } - function test_InvalidVoter() public { + function test_UnauthorizedVoter() public { RMN.Config memory cfg = rmnConstructorArgs(); // Someone else cannot unvote to curse on the curser's behalf. - address[] memory unauthorized = new address[](4); + address[] memory unauthorized = new address[](3); unauthorized[0] = cfg.voters[s_curser].blessVoteAddr; - unauthorized[1] = cfg.voters[s_curser].curseVoteAddr; + unauthorized[1] = cfg.voters[s_curser ^ 1].blessVoteAddr; unauthorized[2] = OWNER; - unauthorized[3] = cfg.voters[s_curser ^ 1].curseUnvoteAddr; for (uint256 i = 0; i < unauthorized.length; ++i) { - bytes memory expectedRevert = abi.encodeWithSelector(RMN.InvalidVoter.selector, unauthorized[i]); + bytes memory expectedRevert = abi.encodeWithSelector(RMN.UnauthorizedVoter.selector, unauthorized[i]); vm.startPrank(unauthorized[i]); - // should fail when using the correct curses hash - vm.expectRevert(expectedRevert); - s_rmn.unvoteToCurse(cfg.voters[s_curser].curseVoteAddr, s_cursesHash); - // should fail when using garbage curses hash - vm.expectRevert(expectedRevert); - s_rmn.unvoteToCurse( - cfg.voters[s_curser].curseVoteAddr, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ); + { + // should fail when using the correct curses hash + RMN.UnvoteToCurseRequest[] memory reqs = new RMN.UnvoteToCurseRequest[](1); + reqs[0] = RMN.UnvoteToCurseRequest({subject: 0, cursesHash: s_cursesHash}); + vm.expectRevert(expectedRevert); + s_rmn.unvoteToCurse(reqs); + } + { + // should fail when using garbage curses hash + RMN.UnvoteToCurseRequest[] memory reqs = new RMN.UnvoteToCurseRequest[](1); + reqs[0] = RMN.UnvoteToCurseRequest({subject: 0, cursesHash: GARBAGE_CURSES_HASH}); + vm.expectRevert(expectedRevert); + s_rmn.unvoteToCurse(reqs); + } } } function test_InvalidCursesHash() public { RMN.Config memory cfg = rmnConstructorArgs(); - vm.startPrank(cfg.voters[s_curser].curseUnvoteAddr); - vm.expectRevert( - abi.encodeWithSelector( - RMN.InvalidCursesHash.selector, s_cursesHash, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ) - ); - s_rmn.unvoteToCurse( - cfg.voters[s_curser].curseVoteAddr, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ); + vm.startPrank(cfg.voters[s_curser].curseVoteAddr); + RMN.UnvoteToCurseRequest[] memory reqs = new RMN.UnvoteToCurseRequest[](1); + reqs[0] = RMN.UnvoteToCurseRequest({subject: 0, cursesHash: GARBAGE_CURSES_HASH}); + vm.expectRevert(RMN.UnvoteToCurseNoop.selector); + s_rmn.unvoteToCurse(reqs); } function test_ValidCursesHash() public { RMN.Config memory cfg = rmnConstructorArgs(); - vm.startPrank(cfg.voters[s_curser].curseUnvoteAddr); - s_rmn.unvoteToCurse(cfg.voters[s_curser].curseVoteAddr, s_cursesHash); + vm.startPrank(cfg.voters[s_curser].curseVoteAddr); + RMN.UnvoteToCurseRequest[] memory reqs = new RMN.UnvoteToCurseRequest[](1); + reqs[0] = RMN.UnvoteToCurseRequest({subject: 0, cursesHash: s_cursesHash}); + s_rmn.unvoteToCurse(reqs); // succeeds } function test_OwnerSucceeds() public { RMN.Config memory cfg = rmnConstructorArgs(); vm.startPrank(OWNER); - RMN.UnvoteToCurseRecord[] memory records = new RMN.UnvoteToCurseRecord[](1); - records[0] = RMN.UnvoteToCurseRecord({ - curseVoteAddr: cfg.voters[s_curser].curseUnvoteAddr, - cursesHash: s_cursesHash, + RMN.OwnerUnvoteToCurseRequest[] memory reqs = new RMN.OwnerUnvoteToCurseRequest[](1); + reqs[0] = RMN.OwnerUnvoteToCurseRequest({ + curseVoteAddr: cfg.voters[s_curser].curseVoteAddr, + unit: RMN.UnvoteToCurseRequest({subject: 0, cursesHash: s_cursesHash}), forceUnvote: false }); - s_rmn.ownerUnvoteToCurse(records); + s_rmn.ownerUnvoteToCurse(reqs); } - event SkippedUnvoteToCurse(address indexed voter, bytes32 expectedCursesHash, bytes32 actualCursesHash); - function test_OwnerSkips() public { RMN.Config memory cfg = rmnConstructorArgs(); vm.startPrank(OWNER); - RMN.UnvoteToCurseRecord[] memory records = new RMN.UnvoteToCurseRecord[](1); - records[0] = RMN.UnvoteToCurseRecord({ + RMN.OwnerUnvoteToCurseRequest[] memory reqs = new RMN.OwnerUnvoteToCurseRequest[](1); + reqs[0] = RMN.OwnerUnvoteToCurseRequest({ curseVoteAddr: cfg.voters[s_curser].curseVoteAddr, - cursesHash: 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, + unit: RMN.UnvoteToCurseRequest({subject: 0, cursesHash: GARBAGE_CURSES_HASH}), forceUnvote: false }); + vm.expectEmit(); - emit SkippedUnvoteToCurse( - cfg.voters[s_curser].curseVoteAddr, - s_cursesHash, - 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ); - s_rmn.ownerUnvoteToCurse(records); + emit RMN.SkippedUnvoteToCurse(cfg.voters[s_curser].curseVoteAddr, 0, s_cursesHash, GARBAGE_CURSES_HASH); + vm.expectRevert(RMN.UnvoteToCurseNoop.selector); + s_rmn.ownerUnvoteToCurse(reqs); } - function test_InvalidCurseState_Revert() public { + function test_VotersCantLiftCurseButOwnerCan() public { + vm.stopPrank(); RMN.Config memory cfg = rmnConstructorArgs(); - vm.startPrank(cfg.voters[1].curseUnvoteAddr); + // s_curser has voted to curse during setUp + { + (address[] memory voters, bytes28[] memory cursesHashes, uint16 accWeight, bool cursed) = + s_rmn.getCurseProgress(0); + assertEq(accWeight, cfg.voters[s_curser].curseWeight); + assertFalse(cursed); + assertEq(voters.length, 1); + assertEq(cursesHashes.length, 1); + assertEq(voters[0], cfg.voters[s_curser].curseVoteAddr); + assertEq(cursesHashes[0], makeCursesHash(makeCurseId(1))); + } + // everyone else votes now, same curse id, same subject + { + for (uint256 i = 0; i < cfg.voters.length; ++i) { + if (i == s_curser) continue; // already voted to curse + vm.prank(cfg.voters[i].curseVoteAddr); + s_rmn.voteToCurse(makeCurseId(1), makeSubjects(0)); + } + } + // subject must be cursed now + { + assertTrue(s_rmn.isCursed(0)); + } + // curse progress should be as full as it can get + { + (address[] memory voters, bytes28[] memory cursesHashes, uint16 accWeight, bool cursed) = + s_rmn.getCurseProgress(0); + uint256 allWeights; + for (uint256 i = 0; i < cfg.voters.length; i++) { + allWeights += cfg.voters[i].curseWeight; + } + assertEq(accWeight, allWeights); + assertTrue(cursed); + assertEq(voters.length, cfg.voters.length); + assertEq(cursesHashes.length, cfg.voters.length); + for (uint256 i = 0; i < cfg.voters.length; ++i) { + assertEq(voters[i], cfg.voters[i].curseVoteAddr); + assertEq(cursesHashes[i], makeCursesHash(makeCurseId(1))); + } + } + // everyone unvotes to curse, successfully + { + for (uint256 i = 0; i < cfg.voters.length; ++i) { + vm.prank(cfg.voters[i].curseVoteAddr); + RMN.UnvoteToCurseRequest[] memory reqs = new RMN.UnvoteToCurseRequest[](1); + reqs[0] = RMN.UnvoteToCurseRequest({subject: 0, cursesHash: makeCursesHash(makeCurseId(1))}); + s_rmn.unvoteToCurse(reqs); + } + } + // curse should still be in place as only the owner can lift it + { + assertTrue(s_rmn.isCursed(0)); + } + // curse progress should be empty, expect for the cursed flag + { + (address[] memory voters, bytes28[] memory cursesHashes, uint16 accWeight, bool cursed) = + s_rmn.getCurseProgress(0); + assertEq(accWeight, 0); + assertTrue(cursed); + assertEq(voters.length, 0); + assertEq(cursesHashes.length, 0); + } + // owner lifts curse + { + RMN.OwnerUnvoteToCurseRequest[] memory ownerReq = new RMN.OwnerUnvoteToCurseRequest[](1); + ownerReq[0] = RMN.OwnerUnvoteToCurseRequest({ + curseVoteAddr: LIFT_CURSE_VOTE_ADDR, + unit: RMN.UnvoteToCurseRequest({subject: 0, cursesHash: 0}), + forceUnvote: false + }); + vm.prank(OWNER); + s_rmn.ownerUnvoteToCurse(ownerReq); + } + // curse should now be lifted + { + assertFalse(s_rmn.isCursed(0)); + } + } +} + +contract RMN_voteToCurse_2 is RMNSetup { + function initialConfig() internal pure returns (RMN.Config memory) { + RMN.Config memory cfg = RMN.Config({voters: new RMN.Voter[](3), blessWeightThreshold: 1, curseWeightThreshold: 3}); + cfg.voters[0] = + RMN.Voter({blessVoteAddr: BLESS_VOTER_1, curseVoteAddr: CURSE_VOTER_1, blessWeight: 1, curseWeight: 1}); + cfg.voters[1] = + RMN.Voter({blessVoteAddr: BLESS_VOTER_2, curseVoteAddr: CURSE_VOTER_2, blessWeight: 1, curseWeight: 1}); + cfg.voters[2] = + RMN.Voter({blessVoteAddr: BLESS_VOTER_3, curseVoteAddr: CURSE_VOTER_3, blessWeight: 1, curseWeight: 1}); + return cfg; + } + + function setUp() public override { + vm.prank(OWNER); + s_rmn = new RMN(initialConfig()); + } - vm.expectRevert(RMN.InvalidCurseState.selector); - s_rmn.unvoteToCurse(cfg.voters[1].curseVoteAddr, ""); + function test_VotesAreDroppedIfSubjectIsNotCursedDuringConfigChange() public { + // vote to curse the subject from an insufficient number of voters, one voter + { + RMN.Config memory cfg = initialConfig(); + vm.prank(cfg.voters[0].curseVoteAddr); + s_rmn.voteToCurse(makeCurseId(1), makeSubjects(0)); + } + // vote must be in place + { + (address[] memory voters, bytes28[] memory cursesHashes, uint16 accWeight, bool cursed) = + s_rmn.getCurseProgress(0); + assertEq(voters.length, 1); + assertEq(cursesHashes.length, 1); + assertEq(accWeight, 1); + assertFalse(cursed); + } + // change config to include only the first voter, i.e., initialConfig().voters[0] + { + RMN.Config memory cfg = initialConfig(); + RMN.Voter[] memory voters = cfg.voters; + assembly { + mstore(voters, 1) + } + cfg.curseWeightThreshold = 1; + vm.prank(OWNER); + s_rmn.setConfig(cfg); + } + // vote must be dropped + { + (address[] memory voters, bytes28[] memory cursesHashes, uint16 accWeight, bool cursed) = + s_rmn.getCurseProgress(0); + assertEq(voters.length, 0); + assertEq(cursesHashes.length, 0); + assertEq(accWeight, 0); + assertFalse(cursed); + } + // cause an owner curse now + { + vm.prank(OWNER); + s_rmn.ownerCurse(makeCurseId(1), makeSubjects(0)); + } + // only the owner curse must be visible + { + (address[] memory voters, bytes28[] memory cursesHashes, uint16 accWeight, bool cursed) = + s_rmn.getCurseProgress(0); + assertEq(voters.length, 1); + assertEq(voters[0], OWNER_CURSE_VOTE_ADDR); + assertEq(cursesHashes.length, 1); + assertEq(cursesHashes[0], makeCursesHash(makeCurseId(1))); + assertEq(accWeight, 0); + assertTrue(cursed); + } + } + + function test_VotesAreRetainedIfSubjectIsCursedDuringConfigChange() public { + uint256 numVotersInitially = initialConfig().voters.length; + // curse the subject with votes from all voters + { + RMN.Config memory cfg = initialConfig(); + for (uint256 i = 0; i < cfg.voters.length; ++i) { + vm.prank(cfg.voters[i].curseVoteAddr); + s_rmn.voteToCurse(makeCurseId(1), makeSubjects(0)); + } + } + // subject is now cursed + { + assertTrue(s_rmn.isCursed(0)); + } + // throw in an owner curse + { + vm.prank(OWNER); + s_rmn.ownerCurse(makeCurseId(1), makeSubjects(0)); + } + + uint256 snapshot = vm.snapshot(); + + for (uint256 keepVoters = 1; keepVoters <= numVotersInitially; ++keepVoters) { + vm.revertTo(snapshot); + + // change config to include only the first #keepVoters voters, i.e., initialConfig().voters[0..keepVoters] + { + RMN.Config memory cfg = initialConfig(); + RMN.Voter[] memory voters = cfg.voters; + assembly { + mstore(voters, keepVoters) + } + cfg.curseWeightThreshold = uint16(keepVoters); + vm.prank(OWNER); + s_rmn.setConfig(cfg); + } + // subject is still cursed + { + assertTrue(s_rmn.isCursed(0)); + } + // all votes from the first keepVoters & owner must be present + { + (address[] memory voters, bytes28[] memory cursesHashes, uint16 accWeight, bool cursed) = + s_rmn.getCurseProgress(0); + assertEq(voters.length, keepVoters + 1 /* owner */ ); + assertEq(cursesHashes.length, keepVoters + 1 /* owner */ ); + assertEq(accWeight, keepVoters /* 1 per voter */ ); + assertTrue(cursed); + for (uint256 i = 0; i < keepVoters; ++i) { + assertEq(voters[i], initialConfig().voters[i].curseVoteAddr); + assertEq(cursesHashes[i], makeCursesHash(makeCurseId(1))); + } + assertEq(voters[voters.length - 1], OWNER_CURSE_VOTE_ADDR); + assertEq(cursesHashes[cursesHashes.length - 1], makeCursesHash(makeCurseId(1))); + } + // the owner unvoting for all is not enough to lift the curse, because remember that the owner has an active vote + // also + { + for (uint256 i = 0; i < keepVoters; ++i) { + RMN.OwnerUnvoteToCurseRequest[] memory ownerReq = new RMN.OwnerUnvoteToCurseRequest[](1); + ownerReq[0] = RMN.OwnerUnvoteToCurseRequest({ + curseVoteAddr: initialConfig().voters[i].curseVoteAddr, + unit: RMN.UnvoteToCurseRequest({subject: 0, cursesHash: makeCursesHash(makeCurseId(1))}), + forceUnvote: false + }); + vm.prank(OWNER); + s_rmn.ownerUnvoteToCurse(ownerReq); + + assertTrue(s_rmn.isCursed(0)); + } + } + // after owner unvotes for themselves, finally, the curse will be lifted + { + RMN.OwnerUnvoteToCurseRequest[] memory ownerReq = new RMN.OwnerUnvoteToCurseRequest[](1); + ownerReq[0] = RMN.OwnerUnvoteToCurseRequest({ + curseVoteAddr: OWNER_CURSE_VOTE_ADDR, + unit: RMN.UnvoteToCurseRequest({subject: 0, cursesHash: makeCursesHash(makeCurseId(1))}), + forceUnvote: false + }); + vm.prank(OWNER); + s_rmn.ownerUnvoteToCurse(ownerReq); + + assertFalse(s_rmn.isCursed(0)); + } + } } } contract RMN_voteToCurse is RMNSetup { - event VotedToCurse( - uint32 indexed configVersion, - address indexed voter, - uint8 weight, - uint32 voteCount, - bytes32 curseId, - bytes32 cursesHash, - uint16 accumulatedWeight - ); - event Cursed(uint32 indexed configVersion, uint256 timestamp); - event OwnerCursed(uint256 timestamp); - event RecoveredFromCurse(); - function _getFirstCurseVoterAndWeight() internal pure returns (address, uint8) { RMN.Config memory cfg = rmnConstructorArgs(); return (cfg.voters[0].curseVoteAddr, cfg.voters[0].curseWeight); @@ -300,41 +476,89 @@ contract RMN_voteToCurse is RMNSetup { // Success - function test_VoteToCurseSuccess_gas() public { - vm.pauseGasMetering(); + function test_CurseOnlyWhenThresholdReached_Success() public { + uint256 numSubjects = 3; + uint256 maxNumRevotes = 2; + + RMN.Config memory cfg = rmnConstructorArgs(); + bytes16[] memory subjects = new bytes16[](numSubjects); + for (uint256 i = 0; i < numSubjects; ++i) { + subjects[i] = bytes16(uint128(i)); + } + for (uint256 numRevotes = 1; numRevotes <= maxNumRevotes; ++numRevotes) { + // all voters but the last vote, but can't surpass the curse weight threshold + for (uint256 i = 0; i < cfg.voters.length - 1; ++i) { + vm.prank(cfg.voters[i].curseVoteAddr); + s_rmn.voteToCurse(makeCurseId(numRevotes), subjects); + } + // no curse is yet active, last voter also needs to vote for any curse to be active + { + // ensure every subject is not cursed + for (uint256 i = 0; i < numSubjects; ++i) { + assertFalse(s_rmn.isCursed(subjects[i])); + } + // ensure every vote has been recorded + assertEq( + s_rmn.getRecordedCurseRelatedOpsCount(), + 1 /* setConfig */ + (cfg.voters.length - 1) * numRevotes * numSubjects + ); + } + } + + // last voter now votes + vm.prank(cfg.voters[cfg.voters.length - 1].curseVoteAddr); + s_rmn.voteToCurse(makeCurseId(0), subjects); + // curses should be now active + { + // ensure every subject is now cursed + for (uint256 i = 0; i < numSubjects; ++i) { + assertTrue(s_rmn.isCursed(subjects[i])); + } + // ensure every vote has been recorded + assertEq( + s_rmn.getRecordedCurseRelatedOpsCount(), + 1 /* setConfig */ + ((cfg.voters.length - 1) * maxNumRevotes + 1) * numSubjects + ); + } + } + function test_VoteToCurse_NoCurse_Success() public { (address voter, uint8 weight) = _getFirstCurseVoterAndWeight(); vm.startPrank(voter); vm.expectEmit(); - emit VotedToCurse( - 1, voter, weight, 1, makeCurseId(123), keccak256(abi.encode(bytes32(0), makeCurseId(123))), weight + emit RMN.VotedToCurse( + 1, // configVersion + voter, + GLOBAL_CURSE_SUBJECT, + makeCurseId(123), + weight, + 1234567890, // blockTimestamp + makeCursesHash(makeCurseId(123)), // cursesHash + weight ); - vm.resumeGasMetering(); - s_rmn.voteToCurse(makeCurseId(123)); - vm.pauseGasMetering(); + s_rmn.voteToCurse(makeCurseId(123), makeSubjects(GLOBAL_CURSE_SUBJECT)); - (address[] memory voters,,, uint16 votes, bool cursed) = s_rmn.getCurseProgress(); + (address[] memory voters,, uint16 votes, bool cursed) = s_rmn.getCurseProgress(GLOBAL_CURSE_SUBJECT); assertEq(1, voters.length); assertEq(voter, voters[0]); assertEq(weight, votes); assertFalse(cursed); - - vm.resumeGasMetering(); } - function test_EmitCurse_Success() public { + function test_VoteToCurse_YesCurse_Success() public { RMN.Config memory cfg = rmnConstructorArgs(); for (uint256 i = 0; i < cfg.voters.length - 1; ++i) { vm.startPrank(cfg.voters[i].curseVoteAddr); - s_rmn.voteToCurse(makeCurseId(1)); + s_rmn.voteToCurse(makeCurseId(1), makeSubjects(0)); } vm.expectEmit(); - emit Cursed(1, block.timestamp); + emit RMN.Cursed(1, 0, uint64(block.timestamp)); vm.startPrank(cfg.voters[cfg.voters.length - 1].curseVoteAddr); - s_rmn.voteToCurse(makeCurseId(1)); + vm.resumeGasMetering(); + s_rmn.voteToCurse(makeCurseId(1), makeSubjects(0)); } function test_EvenIfAlreadyCursed_Success() public { @@ -342,68 +566,104 @@ contract RMN_voteToCurse is RMNSetup { uint16 weightSum = 0; for (uint256 i = 0; i < cfg.voters.length; ++i) { vm.startPrank(cfg.voters[i].curseVoteAddr); - s_rmn.voteToCurse(makeCurseId(i)); + s_rmn.voteToCurse(makeCurseId(i), makeSubjects(0)); weightSum += cfg.voters[i].curseWeight; } // Not part of the assertion of this test but good to have as a sanity // check. We want a curse to be active in order for the ultimate assertion // to make sense. - assert(s_rmn.isCursed()); + assert(s_rmn.isCursed(0)); vm.expectEmit(); - emit VotedToCurse( + emit RMN.VotedToCurse( 1, // configVersion cfg.voters[cfg.voters.length - 1].curseVoteAddr, - cfg.voters[cfg.voters.length - 1].curseWeight, - 2, // voteCount + 0, // subject makeCurseId(cfg.voters.length + 1), // this curse id - keccak256( - abi.encode( - keccak256(abi.encode(bytes32(0), makeCurseId(cfg.voters.length - 1))), makeCurseId(cfg.voters.length + 1) - ) - ), // cursesHash + cfg.voters[cfg.voters.length - 1].curseWeight, + uint64(block.timestamp), // blockTimestamp + makeCursesHash(makeCurseId(cfg.voters.length - 1), makeCurseId(cfg.voters.length + 1)), // cursesHash weightSum // accumulatedWeight ); // Asserts that this call to vote with a new curse id goes through with no // reverts even when the RMN contract is cursed. - s_rmn.voteToCurse(makeCurseId(cfg.voters.length + 1)); + s_rmn.voteToCurse(makeCurseId(cfg.voters.length + 1), makeSubjects(0)); } function test_OwnerCanCurseAndUncurse() public { vm.startPrank(OWNER); + bytes28 expectedCursesHash = makeCursesHash(makeCurseId(0)); vm.expectEmit(); - emit OwnerCursed(block.timestamp); + emit RMN.VotedToCurse( + 1, // configVersion + OWNER_CURSE_VOTE_ADDR, // owner + 0, // subject + makeCurseId(0), // curse id + 0, // weight + uint64(block.timestamp), // blockTimestamp + expectedCursesHash, // cursesHash + 0 // accumulatedWeight + ); vm.expectEmit(); - emit Cursed(1, block.timestamp); - s_rmn.ownerCurse(); + emit RMN.Cursed( + 1, // configVersion + 0, // subject + uint64(block.timestamp) // blockTimestamp + ); + s_rmn.ownerCurse(makeCurseId(0), makeSubjects(0)); { - (address[] memory voters,,, uint24 accWeight, bool cursed) = s_rmn.getCurseProgress(); - assertEq(voters.length, 0); + (address[] memory voters, bytes28[] memory cursesHashes, uint24 accWeight, bool cursed) = + s_rmn.getCurseProgress(0); + assertEq(voters.length, 1); + assertEq(voters[0], OWNER_CURSE_VOTE_ADDR /* owner */ ); + assertEq(cursesHashes.length, 1); + assertEq(cursesHashes[0], expectedCursesHash); assertEq(accWeight, 0); assertTrue(cursed); } - // ownerCurse again, this time we only get OwnerCursed, but not Cursed + // ownerCurse again, should cause a vote to appear and a change in curses hash + expectedCursesHash = makeCursesHash(makeCurseId(0), makeCurseId(1)); vm.expectEmit(); - emit OwnerCursed(block.timestamp); - s_rmn.ownerCurse(); + emit RMN.VotedToCurse( + 1, // configVersion + OWNER_CURSE_VOTE_ADDR, // owner + 0, // subject + makeCurseId(1), // curse id + 0, // weight + uint64(block.timestamp), // blockTimestamp + expectedCursesHash, // cursesHash + 0 // accumulatedWeight + ); + s_rmn.ownerCurse(makeCurseId(1), makeSubjects(0)); { - (address[] memory voters,,, uint24 accWeight, bool cursed) = s_rmn.getCurseProgress(); - assertEq(voters.length, 0); + (address[] memory voters, bytes28[] memory cursesHashes, uint24 accWeight, bool cursed) = + s_rmn.getCurseProgress(0); + assertEq(voters.length, 1); + assertEq(voters[0], OWNER_CURSE_VOTE_ADDR /* owner */ ); + assertEq(cursesHashes.length, 1); + assertEq(cursesHashes[0], expectedCursesHash); assertEq(accWeight, 0); assertTrue(cursed); } - RMN.UnvoteToCurseRecord[] memory unvoteRecords = new RMN.UnvoteToCurseRecord[](0); + RMN.OwnerUnvoteToCurseRequest[] memory unvoteReqs = new RMN.OwnerUnvoteToCurseRequest[](1); + unvoteReqs[0] = RMN.OwnerUnvoteToCurseRequest({ + curseVoteAddr: OWNER_CURSE_VOTE_ADDR, + unit: RMN.UnvoteToCurseRequest({subject: 0, cursesHash: 0}), + forceUnvote: true // TODO: test with forceUnvote false also + }); vm.expectEmit(); - emit RecoveredFromCurse(); - s_rmn.ownerUnvoteToCurse(unvoteRecords); + emit RMN.CurseLifted(0); + s_rmn.ownerUnvoteToCurse(unvoteReqs); { - (address[] memory voters,,, uint24 accWeight, bool cursed) = s_rmn.getCurseProgress(); + (address[] memory voters, bytes28[] memory cursesHashes, uint24 accWeight, bool cursed) = + s_rmn.getCurseProgress(0); assertEq(voters.length, 0); + assertEq(cursesHashes.length, 0); assertEq(accWeight, 0); assertFalse(cursed); } @@ -411,26 +671,42 @@ contract RMN_voteToCurse is RMNSetup { // Reverts - function test_InvalidVoter_Revert() public { + function test_UnauthorizedVoter_Revert() public { vm.startPrank(STRANGER); - vm.expectRevert(abi.encodeWithSelector(RMN.InvalidVoter.selector, STRANGER)); - s_rmn.voteToCurse(makeCurseId(12312)); + vm.expectRevert(abi.encodeWithSelector(RMN.UnauthorizedVoter.selector, STRANGER)); + s_rmn.voteToCurse(makeCurseId(12312), makeSubjects(0)); } - function test_AlreadyVoted_Revert() public { + function test_ReusedCurseId_Revert() public { (address voter,) = _getFirstCurseVoterAndWeight(); vm.startPrank(voter); - s_rmn.voteToCurse(makeCurseId(1)); + s_rmn.voteToCurse(makeCurseId(1), makeSubjects(0)); + + vm.expectRevert(abi.encodeWithSelector(RMN.ReusedCurseId.selector, voter, makeCurseId(1))); + s_rmn.voteToCurse(makeCurseId(1), makeSubjects(0)); + } + + function test_RepeatedSubject_Revert() public { + (address voter,) = _getFirstCurseVoterAndWeight(); + vm.prank(voter); + + bytes16 subject = bytes16(uint128(1)); + + vm.expectRevert(RMN.SubjectsMustBeStrictlyIncreasing.selector); + s_rmn.voteToCurse(makeCurseId(1), makeSubjects(subject, subject)); + } + + function test_EmptySubjects_Revert() public { + (address voter,) = _getFirstCurseVoterAndWeight(); + vm.prank(voter); - vm.expectRevert(abi.encodeWithSelector(RMN.AlreadyVotedToCurse.selector, voter, makeCurseId(1))); - s_rmn.voteToCurse(makeCurseId(1)); + vm.expectRevert(RMN.VoteToCurseNoop.selector); + s_rmn.voteToCurse(makeCurseId(1), new bytes16[](0)); } } contract RMN_ownerUnvoteToCurse is RMNSetup { - event RecoveredFromCurse(); - // These cursers are going to curse in setUp curseCount times. function getCursersAndCurseCounts() internal pure returns (address[] memory cursers, uint32[] memory curseCounts) { // NOTE: Change this when changing setUp or rmnConstructorArgs. @@ -453,23 +729,26 @@ contract RMN_ownerUnvoteToCurse is RMNSetup { for (uint256 i = 0; i < cursers.length; ++i) { vm.startPrank(cursers[i]); for (uint256 j = 0; j < curseCounts[i]; ++j) { - s_rmn.voteToCurse(makeCurseId(j)); + s_rmn.voteToCurse(makeCurseId(j), makeSubjects(GLOBAL_CURSE_SUBJECT)); } } } function ownerUnvoteToCurse() internal { - s_rmn.ownerUnvoteToCurse(makeUnvoteToCurseRecords()); + s_rmn.ownerUnvoteToCurse(makeOwnerUnvoteToCurseRequests()); } - function makeUnvoteToCurseRecords() internal pure returns (RMN.UnvoteToCurseRecord[] memory) { + function makeOwnerUnvoteToCurseRequests() internal pure returns (RMN.OwnerUnvoteToCurseRequest[] memory) { (address[] memory cursers,) = getCursersAndCurseCounts(); - RMN.UnvoteToCurseRecord[] memory records = new RMN.UnvoteToCurseRecord[](cursers.length); + RMN.OwnerUnvoteToCurseRequest[] memory reqs = new RMN.OwnerUnvoteToCurseRequest[](cursers.length); for (uint256 i = 0; i < cursers.length; ++i) { - records[i] = - RMN.UnvoteToCurseRecord({curseVoteAddr: cursers[i], cursesHash: bytes32(uint256(0)), forceUnvote: true}); + reqs[i] = RMN.OwnerUnvoteToCurseRequest({ + curseVoteAddr: cursers[i], + unit: RMN.UnvoteToCurseRequest({subject: GLOBAL_CURSE_SUBJECT, cursesHash: bytes28(0)}), + forceUnvote: true + }); } - return records; + return reqs; } // Success @@ -479,14 +758,15 @@ contract RMN_ownerUnvoteToCurse is RMNSetup { vm.startPrank(OWNER); vm.expectEmit(); - emit RecoveredFromCurse(); + emit RMN.CurseLifted(GLOBAL_CURSE_SUBJECT); vm.resumeGasMetering(); ownerUnvoteToCurse(); vm.pauseGasMetering(); assertFalse(s_rmn.isCursed()); - (address[] memory voters,, bytes32[] memory cursesHashes, uint256 weight, bool cursed) = s_rmn.getCurseProgress(); + (address[] memory voters, bytes28[] memory cursesHashes, uint256 weight, bool cursed) = + s_rmn.getCurseProgress(GLOBAL_CURSE_SUBJECT); assertEq(voters.length, 0); assertEq(cursesHashes.length, 0); assertEq(weight, 0); @@ -497,25 +777,25 @@ contract RMN_ownerUnvoteToCurse is RMNSetup { function test_IsIdempotent() public { vm.startPrank(OWNER); ownerUnvoteToCurse(); + vm.expectRevert(RMN.UnvoteToCurseNoop.selector); ownerUnvoteToCurse(); assertFalse(s_rmn.isCursed()); - (address[] memory voters, uint32[] memory voteCounts, bytes32[] memory cursesHashes, uint256 weight, bool cursed) = - s_rmn.getCurseProgress(); + (address[] memory voters, bytes28[] memory cursesHashes, uint256 weight, bool cursed) = + s_rmn.getCurseProgress(GLOBAL_CURSE_SUBJECT); assertEq(voters.length, 0); assertEq(cursesHashes.length, 0); - assertEq(voteCounts.length, 0); assertEq(weight, 0); assertFalse(cursed); } - function test_CanBlessAndCurseAfterRecovery() public { + function test_CanBlessAndCurseAfterGlobalCurseIsLifted() public { // Contract is already cursed due to setUp. // Owner unvotes to curse. vm.startPrank(OWNER); vm.expectEmit(); - emit RecoveredFromCurse(); + emit RMN.CurseLifted(GLOBAL_CURSE_SUBJECT); ownerUnvoteToCurse(); // Contract is now uncursed. @@ -527,7 +807,7 @@ contract RMN_ownerUnvoteToCurse is RMNSetup { // Vote to curse should go through. vm.startPrank(CURSE_VOTER_1); - s_rmn.voteToCurse(makeCurseId(73894728973)); + s_rmn.voteToCurse(makeCurseId(73894728973), makeSubjects(GLOBAL_CURSE_SUBJECT)); } // Reverts @@ -537,6 +817,25 @@ contract RMN_ownerUnvoteToCurse is RMNSetup { vm.expectRevert("Only callable by owner"); ownerUnvoteToCurse(); } + + function test_UnknownVoter_Revert() public { + vm.stopPrank(); + RMN.OwnerUnvoteToCurseRequest[] memory reqs = new RMN.OwnerUnvoteToCurseRequest[](1); + reqs[0] = RMN.OwnerUnvoteToCurseRequest({ + curseVoteAddr: STRANGER, + unit: RMN.UnvoteToCurseRequest({subject: GLOBAL_CURSE_SUBJECT, cursesHash: bytes28(0)}), + forceUnvote: true + }); + + vm.prank(OWNER); + vm.expectEmit(); + emit RMN.SkippedUnvoteToCurse(STRANGER, GLOBAL_CURSE_SUBJECT, bytes28(0), bytes28(0)); + vm.expectRevert(RMN.UnvoteToCurseNoop.selector); + s_rmn.ownerUnvoteToCurse(reqs); + + // no effect on cursedness + assertTrue(s_rmn.isCursed(GLOBAL_CURSE_SUBJECT)); + } } contract RMN_setConfig is ConfigCompare, RMNSetup { @@ -546,14 +845,12 @@ contract RMN_setConfig is ConfigCompare, RMNSetup { voters[0] = RMN.Voter({ blessVoteAddr: BLESS_VOTER_1, curseVoteAddr: CURSE_VOTER_1, - curseUnvoteAddr: CURSE_UNVOTER_1, blessWeight: WEIGHT_1, curseWeight: WEIGHT_1 }); voters[1] = RMN.Voter({ blessVoteAddr: BLESS_VOTER_2, curseVoteAddr: CURSE_VOTER_2, - curseUnvoteAddr: CURSE_UNVOTER_2, blessWeight: WEIGHT_10, curseWeight: WEIGHT_10 }); @@ -574,7 +871,7 @@ contract RMN_setConfig is ConfigCompare, RMNSetup { vm.startPrank(cfg.voters[1].blessVoteAddr); s_rmn.voteToBless(makeTaggedRootSingleton(1)); vm.startPrank(cfg.voters[1].curseVoteAddr); - s_rmn.voteToCurse(makeCurseId(1)); + s_rmn.voteToCurse(makeCurseId(1), makeSubjects(0)); } // Success @@ -589,7 +886,7 @@ contract RMN_setConfig is ConfigCompare, RMNSetup { // BLESS_VOTER_4 is not part of cfg anymore, vote to bless should revert. vm.startPrank(BLESS_VOTER_4); - vm.expectRevert(abi.encodeWithSelector(RMN.InvalidVoter.selector, BLESS_VOTER_4)); + vm.expectRevert(abi.encodeWithSelector(RMN.UnauthorizedVoter.selector, BLESS_VOTER_4)); s_rmn.voteToBless(makeTaggedRootSingleton(2)); } @@ -610,14 +907,13 @@ contract RMN_setConfig is ConfigCompare, RMNSetup { assertEq(configVersionBefore + 1, configVersionAfter); assertConfigEq(configAfter, cfg); - // Assert that curse votes have been cleared, except for CURSE_VOTER_2 who - // has already voted and is also part of the new config - (address[] memory curseVoters,, bytes32[] memory cursesHashes, uint256 curseWeight, bool cursed) = - s_rmn.getCurseProgress(); - assertEq(1, curseVoters.length); - assertEq(WEIGHT_10, curseWeight); - assertEq(1, cursesHashes.length); - assertEq(keccak256(abi.encode(bytes32(0), makeCurseId(1))), cursesHashes[0]); + // Assert that curse votes have been cleared + + (address[] memory curseVoters, bytes28[] memory cursesHashes, uint256 curseWeight, bool cursed) = + s_rmn.getCurseProgress(0); + assertEq(0, curseVoters.length); + assertEq(0, cursesHashes.length); + assertEq(0, curseWeight); assertFalse(cursed); // Assert that good votes have been cleared @@ -700,3 +996,73 @@ contract RMN_setConfig is ConfigCompare, RMNSetup { s_rmn.setConfig(cfg); } } + +contract RMN_permaBlessing is RMNSetup { + function addresses() private pure returns (address[] memory) { + return new address[](0); + } + + function addresses(address a) private pure returns (address[] memory) { + address[] memory arr = new address[](1); + arr[0] = a; + return arr; + } + + function addresses(address a, address b) private pure returns (address[] memory) { + address[] memory arr = new address[](2); + arr[0] = a; + arr[1] = b; + return arr; + } + + function test_PermaBlessing() public { + bytes32 SOME_ROOT = bytes32(~uint256(0)); + address COMMIT_STORE_1 = makeAddr("COMMIT_STORE_1"); + address COMMIT_STORE_2 = makeAddr("COMMIT_STORE_2"); + IRMN.TaggedRoot memory taggedRootCommitStore1 = IRMN.TaggedRoot({root: SOME_ROOT, commitStore: COMMIT_STORE_1}); + IRMN.TaggedRoot memory taggedRootCommitStore2 = IRMN.TaggedRoot({root: SOME_ROOT, commitStore: COMMIT_STORE_2}); + + assertFalse(s_rmn.isBlessed(taggedRootCommitStore1)); + assertFalse(s_rmn.isBlessed(taggedRootCommitStore2)); + assertEq(s_rmn.getPermaBlessedCommitStores(), addresses()); + + // only owner can mutate permaBlessedCommitStores + vm.prank(STRANGER); + vm.expectRevert("Only callable by owner"); + s_rmn.ownerRemoveThenAddPermaBlessedCommitStores(addresses(), addresses(COMMIT_STORE_1)); + + vm.prank(OWNER); + s_rmn.ownerRemoveThenAddPermaBlessedCommitStores(addresses(), addresses(COMMIT_STORE_1)); + assertTrue(s_rmn.isBlessed(taggedRootCommitStore1)); + assertFalse(s_rmn.isBlessed(taggedRootCommitStore2)); + assertEq(s_rmn.getPermaBlessedCommitStores(), addresses(COMMIT_STORE_1)); + + vm.prank(OWNER); + s_rmn.ownerRemoveThenAddPermaBlessedCommitStores(addresses(COMMIT_STORE_1), addresses(COMMIT_STORE_2)); + assertFalse(s_rmn.isBlessed(taggedRootCommitStore1)); + assertTrue(s_rmn.isBlessed(taggedRootCommitStore2)); + assertEq(s_rmn.getPermaBlessedCommitStores(), addresses(COMMIT_STORE_2)); + + vm.prank(OWNER); + s_rmn.ownerRemoveThenAddPermaBlessedCommitStores(addresses(), addresses(COMMIT_STORE_1)); + assertTrue(s_rmn.isBlessed(taggedRootCommitStore1)); + assertTrue(s_rmn.isBlessed(taggedRootCommitStore2)); + assertEq(s_rmn.getPermaBlessedCommitStores(), addresses(COMMIT_STORE_2, COMMIT_STORE_1)); + + vm.prank(OWNER); + s_rmn.ownerRemoveThenAddPermaBlessedCommitStores(addresses(COMMIT_STORE_1, COMMIT_STORE_2), addresses()); + assertFalse(s_rmn.isBlessed(taggedRootCommitStore1)); + assertFalse(s_rmn.isBlessed(taggedRootCommitStore2)); + assertEq(s_rmn.getPermaBlessedCommitStores(), addresses()); + } +} + +contract RMN_getRecordedCurseRelatedOps is RMNSetup { + function test_OpsPostDeployment() public { + // The constructor call includes a setConfig, so that's the only thing we should expect to find. + assertEq(s_rmn.getRecordedCurseRelatedOpsCount(), 1); + RMN.RecordedCurseRelatedOp[] memory recordedCurseRelatedOps = s_rmn.getRecordedCurseRelatedOps(0, type(uint256).max); + assertEq(recordedCurseRelatedOps.length, 1); + assertEq(uint8(recordedCurseRelatedOps[0].tag), uint8(RMN.RecordedCurseRelatedOpTag.SetConfig)); + } +} diff --git a/contracts/src/v0.8/ccip/test/arm/RMNSetup.t.sol b/contracts/src/v0.8/ccip/test/arm/RMNSetup.t.sol index 9b7789bb91..8feacb95f4 100644 --- a/contracts/src/v0.8/ccip/test/arm/RMNSetup.t.sol +++ b/contracts/src/v0.8/ccip/test/arm/RMNSetup.t.sol @@ -1,29 +1,92 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.24; +import {RMN} from "../../RMN.sol"; import {IRMN} from "../../interfaces/IRMN.sol"; -import {RMN} from "../../RMN.sol"; -import {MockRMN} from "../mocks/MockRMN.sol"; import {Test} from "forge-std/Test.sol"; +function makeSubjects(bytes16 a) pure returns (bytes16[] memory) { + bytes16[] memory subjects = new bytes16[](1); + subjects[0] = a; + return subjects; +} + +function makeSubjects(bytes16 a, bytes16 b) pure returns (bytes16[] memory) { + bytes16[] memory subjects = new bytes16[](2); + subjects[0] = a; + subjects[1] = b; + return subjects; +} + +// in order from earliest to latest curse ids +function makeCursesHashFromList(bytes32[] memory curseIds) pure returns (bytes28 cursesHash) { + for (uint256 i = 0; i < curseIds.length; ++i) { + cursesHash = bytes28(keccak256(abi.encode(cursesHash, curseIds[i]))); + } +} + +// hides the ugliness from tests +function makeCursesHash(bytes32 a) pure returns (bytes28) { + bytes32[] memory curseIds = new bytes32[](1); + curseIds[0] = a; + return makeCursesHashFromList(curseIds); +} + +function makeCursesHash(bytes32 a, bytes32 b) pure returns (bytes28) { + bytes32[] memory curseIds = new bytes32[](2); + curseIds[0] = a; + curseIds[1] = b; + return makeCursesHashFromList(curseIds); +} + contract RMNSetup is Test { + // Addresses address internal constant OWNER = 0x00007e64E1fB0C487F25dd6D3601ff6aF8d32e4e; address internal constant STRANGER = address(999999); address internal constant ZERO_ADDRESS = address(0); - address internal constant BLESS_VOTER_1 = address(1); address internal constant CURSE_VOTER_1 = address(10); - address internal constant CURSE_UNVOTER_1 = address(110); address internal constant BLESS_VOTER_2 = address(2); address internal constant CURSE_VOTER_2 = address(12); - address internal constant CURSE_UNVOTER_2 = address(112); address internal constant BLESS_VOTER_3 = address(3); address internal constant CURSE_VOTER_3 = address(13); - address internal constant CURSE_UNVOTER_3 = address(113); address internal constant BLESS_VOTER_4 = address(4); address internal constant CURSE_VOTER_4 = address(14); - address internal constant CURSE_UNVOTER_4 = address(114); + + // Arm + function rmnConstructorArgs() internal pure returns (RMN.Config memory) { + RMN.Voter[] memory voters = new RMN.Voter[](4); + voters[0] = RMN.Voter({ + blessVoteAddr: BLESS_VOTER_1, + curseVoteAddr: CURSE_VOTER_1, + blessWeight: WEIGHT_1, + curseWeight: WEIGHT_1 + }); + voters[1] = RMN.Voter({ + blessVoteAddr: BLESS_VOTER_2, + curseVoteAddr: CURSE_VOTER_2, + blessWeight: WEIGHT_10, + curseWeight: WEIGHT_10 + }); + voters[2] = RMN.Voter({ + blessVoteAddr: BLESS_VOTER_3, + curseVoteAddr: CURSE_VOTER_3, + blessWeight: WEIGHT_20, + curseWeight: WEIGHT_20 + }); + voters[3] = RMN.Voter({ + blessVoteAddr: BLESS_VOTER_4, + curseVoteAddr: CURSE_VOTER_4, + blessWeight: WEIGHT_40, + curseWeight: WEIGHT_40 + }); + return RMN.Config({ + voters: voters, + blessWeightThreshold: WEIGHT_10 + WEIGHT_20 + WEIGHT_40, + curseWeightThreshold: WEIGHT_1 + WEIGHT_10 + WEIGHT_20 + WEIGHT_40 + }); + } uint8 internal constant ZERO = 0; uint8 internal constant WEIGHT_1 = 1; @@ -52,57 +115,18 @@ contract RMNSetup is Test { return keccak256(abi.encode(taggedRoot.commitStore, taggedRoot.root)); } - function makeCurseId(uint256 index) internal pure returns (bytes32) { - return bytes32(index); + function makeCurseId(uint256 index) internal pure returns (bytes16) { + return bytes16(uint128(index)); } - MockRMN internal s_mockRMN; RMN internal s_rmn; function setUp() public virtual { vm.startPrank(OWNER); s_rmn = new RMN(rmnConstructorArgs()); - s_mockRMN = new MockRMN(); vm.stopPrank(); } - function rmnConstructorArgs() internal pure returns (RMN.Config memory) { - RMN.Voter[] memory voters = new RMN.Voter[](4); - voters[0] = RMN.Voter({ - blessVoteAddr: BLESS_VOTER_1, - curseVoteAddr: CURSE_VOTER_1, - curseUnvoteAddr: CURSE_UNVOTER_1, - blessWeight: WEIGHT_1, - curseWeight: WEIGHT_1 - }); - voters[1] = RMN.Voter({ - blessVoteAddr: BLESS_VOTER_2, - curseVoteAddr: CURSE_VOTER_2, - curseUnvoteAddr: CURSE_UNVOTER_2, - blessWeight: WEIGHT_10, - curseWeight: WEIGHT_10 - }); - voters[2] = RMN.Voter({ - blessVoteAddr: BLESS_VOTER_3, - curseVoteAddr: CURSE_VOTER_3, - curseUnvoteAddr: CURSE_UNVOTER_3, - blessWeight: WEIGHT_20, - curseWeight: WEIGHT_20 - }); - voters[3] = RMN.Voter({ - blessVoteAddr: BLESS_VOTER_4, - curseVoteAddr: CURSE_VOTER_4, - curseUnvoteAddr: CURSE_UNVOTER_4, - blessWeight: WEIGHT_40, - curseWeight: WEIGHT_40 - }); - return RMN.Config({ - voters: voters, - blessWeightThreshold: WEIGHT_10 + WEIGHT_20 + WEIGHT_40, - curseWeightThreshold: WEIGHT_1 + WEIGHT_10 + WEIGHT_20 + WEIGHT_40 - }); - } - function hasVotedToBlessRoot(address voter, IRMN.TaggedRoot memory taggedRoot_) internal view returns (bool) { (address[] memory voters,,) = s_rmn.getBlessProgress(taggedRoot_); for (uint256 i = 0; i < voters.length; ++i) { diff --git a/contracts/src/v0.8/ccip/test/arm/RMN_benchmark.t.sol b/contracts/src/v0.8/ccip/test/arm/RMN_benchmark.t.sol new file mode 100644 index 0000000000..8564614a74 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/arm/RMN_benchmark.t.sol @@ -0,0 +1,217 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {GLOBAL_CURSE_SUBJECT, OWNER_CURSE_VOTE_ADDR, RMN} from "../../RMN.sol"; +import {RMNSetup, makeCursesHash, makeSubjects} from "./RMNSetup.t.sol"; + +contract RMN_voteToBless_Benchmark is RMNSetup { + function test_RootSuccess_gas(uint256 n) internal { + vm.prank(BLESS_VOTER_1); + s_rmn.voteToBless(makeTaggedRootsInclusive(1, n)); + } + + function test_1RootSuccess_gas() public { + test_RootSuccess_gas(1); + } + + function test_3RootSuccess_gas() public { + test_RootSuccess_gas(3); + } + + function test_5RootSuccess_gas() public { + test_RootSuccess_gas(5); + } +} + +contract RMN_voteToBless_Blessed_Benchmark is RMN_voteToBless_Benchmark { + function setUp() public virtual override { + RMNSetup.setUp(); + vm.prank(BLESS_VOTER_2); + s_rmn.voteToBless(makeTaggedRootsInclusive(1, 1)); + vm.prank(BLESS_VOTER_3); + s_rmn.voteToBless(makeTaggedRootsInclusive(1, 1)); + } + + function test_1RootSuccessBecameBlessed_gas() public { + vm.prank(BLESS_VOTER_4); + s_rmn.voteToBless(makeTaggedRootsInclusive(1, 1)); + } +} + +abstract contract RMN_voteToCurse_Benchmark is RMNSetup { + struct PreVote { + address voter; + bytes16 subject; + } + + PreVote[] internal s_preVotes; + + function setUp() public virtual override { + // Intentionally does not inherit RMNSetup setUp(), because we set up a simpler config here. + // The only way to ensure that storage slots are cold for the actual functions to be benchmarked is to perform the + // setup in setUp(). + + RMN.Config memory cfg = RMN.Config({voters: new RMN.Voter[](3), blessWeightThreshold: 3, curseWeightThreshold: 3}); + cfg.voters[0] = + RMN.Voter({blessVoteAddr: BLESS_VOTER_1, curseVoteAddr: CURSE_VOTER_1, blessWeight: 1, curseWeight: 1}); + cfg.voters[1] = + RMN.Voter({blessVoteAddr: BLESS_VOTER_2, curseVoteAddr: CURSE_VOTER_2, blessWeight: 1, curseWeight: 1}); + cfg.voters[2] = + RMN.Voter({blessVoteAddr: BLESS_VOTER_3, curseVoteAddr: CURSE_VOTER_3, blessWeight: 1, curseWeight: 1}); + vm.prank(OWNER); + s_rmn = new RMN(cfg); + + for (uint256 i = 0; i < s_preVotes.length; ++i) { + vm.prank(s_preVotes[i].voter); + s_rmn.voteToCurse(makeCurseId(i), makeSubjects(s_preVotes[i].subject)); + } + } +} + +contract RMN_voteToCurse_Benchmark_1 is RMN_voteToCurse_Benchmark { + constructor() { + // some irrelevant subject & voter so that we don't pay for the nonzero->zero SSTORE of + // s_recordedVotesToCurse.length in the benchmark below + s_preVotes.push(PreVote({voter: CURSE_VOTER_3, subject: bytes16(~uint128(0))})); + } + + function test_VoteToCurse_NewSubject_NewVoter_NoCurse_gas() public { + vm.prank(CURSE_VOTER_1); + s_rmn.voteToCurse(makeCurseId(0xffff), makeSubjects(GLOBAL_CURSE_SUBJECT)); + } + + function test_VoteToCurse_NewSubject_NewVoter_YesCurse_gas() public { + vm.prank(OWNER); + s_rmn.ownerCurse(makeCurseId(0xffff), makeSubjects(GLOBAL_CURSE_SUBJECT)); + } +} + +contract RMN_voteToCurse_Benchmark_2 is RMN_voteToCurse_Benchmark { + constructor() { + s_preVotes.push(PreVote({voter: CURSE_VOTER_1, subject: GLOBAL_CURSE_SUBJECT})); + } + + function test_VoteToCurse_OldSubject_OldVoter_NoCurse_gas() public { + vm.prank(CURSE_VOTER_1); + s_rmn.voteToCurse(makeCurseId(0xffff), makeSubjects(GLOBAL_CURSE_SUBJECT)); + } + + function test_VoteToCurse_OldSubject_NewVoter_NoCurse_gas() public { + vm.prank(CURSE_VOTER_2); + s_rmn.voteToCurse(makeCurseId(0xffff), makeSubjects(GLOBAL_CURSE_SUBJECT)); + } +} + +contract RMN_voteToCurse_Benchmark_3 is RMN_voteToCurse_Benchmark { + constructor() { + s_preVotes.push(PreVote({voter: CURSE_VOTER_1, subject: GLOBAL_CURSE_SUBJECT})); + s_preVotes.push(PreVote({voter: CURSE_VOTER_2, subject: GLOBAL_CURSE_SUBJECT})); + } + + function test_VoteToCurse_OldSubject_NewVoter_YesCurse_gas() public { + vm.prank(CURSE_VOTER_3); + s_rmn.voteToCurse(makeCurseId(0xffff), makeSubjects(GLOBAL_CURSE_SUBJECT)); + } +} + +contract RMN_lazyVoteToCurseUpdate_Benchmark is RMN_voteToCurse_Benchmark { + constructor() { + s_preVotes.push(PreVote({voter: CURSE_VOTER_1, subject: GLOBAL_CURSE_SUBJECT})); + s_preVotes.push(PreVote({voter: CURSE_VOTER_2, subject: GLOBAL_CURSE_SUBJECT})); + s_preVotes.push(PreVote({voter: CURSE_VOTER_3, subject: GLOBAL_CURSE_SUBJECT})); + } + + function setUp() public override { + RMN_voteToCurse_Benchmark.setUp(); // sends the prevotes + // initial config includes voters CURSE_VOTER_1, CURSE_VOTER_2, CURSE_VOTER_3 + // include a new voter in the config + { + (,, RMN.Config memory cfg) = s_rmn.getConfigDetails(); + RMN.Voter[] memory newVoters = new RMN.Voter[](cfg.voters.length + 1); + for (uint256 i = 0; i < cfg.voters.length; ++i) { + newVoters[i] = cfg.voters[i]; + } + newVoters[newVoters.length - 1] = + RMN.Voter({blessVoteAddr: BLESS_VOTER_4, curseVoteAddr: CURSE_VOTER_4, blessWeight: 1, curseWeight: 1}); + cfg.voters = newVoters; + + vm.prank(OWNER); + s_rmn.setConfig(cfg); + } + } + + function test_VoteToCurseLazilyRetain3VotersUponConfigChange_gas() public { + // send a vote as the new voter, should cause a lazy update and votes from CURSE_VOTER_1, CURSE_VOTER_2, + // CURSE_VOTER_3 to be retained, which is the worst case for the prior config + vm.prank(CURSE_VOTER_4); + s_rmn.voteToCurse(makeCurseId(0xffff), makeSubjects(GLOBAL_CURSE_SUBJECT)); + } +} + +contract RMN_setConfig_Benchmark is RMNSetup { + uint256 s_numVoters; + + function configWithVoters(uint256 numVoters) internal pure returns (RMN.Config memory) { + RMN.Config memory cfg = + RMN.Config({voters: new RMN.Voter[](numVoters), blessWeightThreshold: 1, curseWeightThreshold: 1}); + for (uint256 i = 1; i <= numVoters; ++i) { + cfg.voters[i - 1] = RMN.Voter({ + blessVoteAddr: address(uint160(2 * i)), + curseVoteAddr: address(uint160(2 * i + 1)), + blessWeight: 1, + curseWeight: 1 + }); + } + return cfg; + } + + function setUp() public virtual override { + vm.prank(OWNER); + s_rmn = new RMN(configWithVoters(s_numVoters)); + } +} + +contract RMN_setConfig_Benchmark_1 is RMN_setConfig_Benchmark { + constructor() { + s_numVoters = 1; + } + + function test_SetConfig_7Voters_gas() public { + vm.prank(OWNER); + s_rmn.setConfig(configWithVoters(7)); + } +} + +contract RMN_setConfig_Benchmark_2 is RMN_setConfig_Benchmark { + constructor() { + s_numVoters = 7; + } + + function test_ResetConfig_7Voters_gas() public { + vm.prank(OWNER); + s_rmn.setConfig(configWithVoters(7)); + } +} + +contract RMN_ownerUnvoteToCurse_Benchmark is RMN_setConfig_Benchmark { + constructor() { + s_numVoters = 7; + } + + function setUp() public override { + RMN_setConfig_Benchmark.setUp(); + vm.prank(OWNER); + s_rmn.ownerCurse(makeCurseId(0xffff), makeSubjects(GLOBAL_CURSE_SUBJECT)); + } + + function test_OwnerUnvoteToCurse_1Voter_LiftsCurse_gas() public { + RMN.OwnerUnvoteToCurseRequest[] memory reqs = new RMN.OwnerUnvoteToCurseRequest[](1); + reqs[0] = RMN.OwnerUnvoteToCurseRequest({ + curseVoteAddr: OWNER_CURSE_VOTE_ADDR, + unit: RMN.UnvoteToCurseRequest({cursesHash: makeCursesHash(makeCurseId(0xffff)), subject: GLOBAL_CURSE_SUBJECT}), + forceUnvote: false + }); + vm.prank(OWNER); + s_rmn.ownerUnvoteToCurse(reqs); + } +} diff --git a/contracts/src/v0.8/ccip/test/capability/CCIPCapabilityConfiguration.t.sol b/contracts/src/v0.8/ccip/test/capability/CCIPConfig.t.sol similarity index 60% rename from contracts/src/v0.8/ccip/test/capability/CCIPCapabilityConfiguration.t.sol rename to contracts/src/v0.8/ccip/test/capability/CCIPConfig.t.sol index 25e6d79c88..4caa4394be 100644 --- a/contracts/src/v0.8/ccip/test/capability/CCIPCapabilityConfiguration.t.sol +++ b/contracts/src/v0.8/ccip/test/capability/CCIPConfig.t.sol @@ -3,19 +3,21 @@ pragma solidity ^0.8.24; import {Test} from "forge-std/Test.sol"; -import {CCIPCapabilityConfiguration} from "../../capability/CCIPCapabilityConfiguration.sol"; -import {ICapabilityRegistry} from "../../capability/interfaces/ICapabilityRegistry.sol"; -import {CCIPCapabilityConfigurationHelper} from "../helpers/CCIPCapabilityConfigurationHelper.sol"; +import {CCIPConfig} from "../../capability/CCIPConfig.sol"; +import {ICapabilitiesRegistry} from "../../capability/interfaces/ICapabilitiesRegistry.sol"; +import {CCIPConfigTypes} from "../../capability/libraries/CCIPConfigTypes.sol"; +import {Internal} from "../../libraries/Internal.sol"; +import {CCIPConfigHelper} from "../helpers/CCIPConfigHelper.sol"; -contract CCIPCapabilityConfigurationSetup is Test { +contract CCIPConfigSetup is Test { address public constant OWNER = 0x82ae2B4F57CA5C1CBF8f744ADbD3697aD1a35AFe; - address public constant CAPABILITY_REGISTRY = 0x272aF4BF7FBFc4944Ed59F914Cd864DfD912D55e; + address public constant CAPABILITIES_REGISTRY = 0x272aF4BF7FBFc4944Ed59F914Cd864DfD912D55e; - CCIPCapabilityConfigurationHelper public s_ccipCC; + CCIPConfigHelper public s_ccipCC; function setUp() public { changePrank(OWNER); - s_ccipCC = new CCIPCapabilityConfigurationHelper(CAPABILITY_REGISTRY); + s_ccipCC = new CCIPConfigHelper(CAPABILITIES_REGISTRY); } function _makeBytes32Array(uint256 length, uint256 seed) internal pure returns (bytes32[] memory arr) { @@ -51,28 +53,30 @@ contract CCIPCapabilityConfigurationSetup is Test { transmitters = _makeBytesArray(numNodes, 20); for (uint256 i = 0; i < numNodes; i++) { vm.mockCall( - CAPABILITY_REGISTRY, - abi.encodeWithSelector(ICapabilityRegistry.getNode.selector, p2pIds[i]), + CAPABILITIES_REGISTRY, + abi.encodeWithSelector(ICapabilitiesRegistry.getNode.selector, p2pIds[i]), abi.encode( - ICapabilityRegistry.NodeInfo({ + ICapabilitiesRegistry.NodeInfo({ nodeOperatorId: 1, signer: bytes32(signers[i]), p2pId: p2pIds[i], - hashedCapabilityIds: new bytes32[](0) - }), - uint32(1) + hashedCapabilityIds: new bytes32[](0), + configCount: uint32(1), + workflowDONId: uint32(1), + capabilitiesDONIds: new uint256[](0) + }) ) ); } // Add chain selector for chain 1. - CCIPCapabilityConfiguration.ChainConfigInfo[] memory adds = new CCIPCapabilityConfiguration.ChainConfigInfo[](1); - adds[0] = CCIPCapabilityConfiguration.ChainConfigInfo({ + CCIPConfigTypes.ChainConfigInfo[] memory adds = new CCIPConfigTypes.ChainConfigInfo[](1); + adds[0] = CCIPConfigTypes.ChainConfigInfo({ chainSelector: 1, - chainConfig: CCIPCapabilityConfiguration.ChainConfig({readers: p2pIds, fChain: 1, config: bytes("config1")}) + chainConfig: CCIPConfigTypes.ChainConfig({readers: p2pIds, fChain: 1, config: bytes("config1")}) }); vm.expectEmit(); - emit CCIPCapabilityConfiguration.ChainConfigSet(1, adds[0].chainConfig); + emit CCIPConfig.ChainConfigSet(1, adds[0].chainConfig); s_ccipCC.applyChainConfigUpdates(new uint64[](0), adds); return (p2pIds, signers, transmitters); @@ -84,43 +88,45 @@ contract CCIPCapabilityConfigurationSetup is Test { } } -contract CCIPCapabilityConfiguration_chainConfig is CCIPCapabilityConfigurationSetup { +contract CCIPConfig_chainConfig is CCIPConfigSetup { // Successes. function test_applyChainConfigUpdates_addChainConfigs_Success() public { bytes32[] memory chainReaders = new bytes32[](1); chainReaders[0] = keccak256(abi.encode(1)); - CCIPCapabilityConfiguration.ChainConfigInfo[] memory adds = new CCIPCapabilityConfiguration.ChainConfigInfo[](2); - adds[0] = CCIPCapabilityConfiguration.ChainConfigInfo({ + CCIPConfigTypes.ChainConfigInfo[] memory adds = new CCIPConfigTypes.ChainConfigInfo[](2); + adds[0] = CCIPConfigTypes.ChainConfigInfo({ chainSelector: 1, - chainConfig: CCIPCapabilityConfiguration.ChainConfig({readers: chainReaders, fChain: 1, config: bytes("config1")}) + chainConfig: CCIPConfigTypes.ChainConfig({readers: chainReaders, fChain: 1, config: bytes("config1")}) }); - adds[1] = CCIPCapabilityConfiguration.ChainConfigInfo({ + adds[1] = CCIPConfigTypes.ChainConfigInfo({ chainSelector: 2, - chainConfig: CCIPCapabilityConfiguration.ChainConfig({readers: chainReaders, fChain: 1, config: bytes("config2")}) + chainConfig: CCIPConfigTypes.ChainConfig({readers: chainReaders, fChain: 1, config: bytes("config2")}) }); vm.mockCall( - CAPABILITY_REGISTRY, - abi.encodeWithSelector(ICapabilityRegistry.getNode.selector, chainReaders[0]), + CAPABILITIES_REGISTRY, + abi.encodeWithSelector(ICapabilitiesRegistry.getNode.selector, chainReaders[0]), abi.encode( - ICapabilityRegistry.NodeInfo({ + ICapabilitiesRegistry.NodeInfo({ nodeOperatorId: 1, signer: bytes32(uint256(1)), p2pId: chainReaders[0], - hashedCapabilityIds: new bytes32[](0) - }), - uint32(1) + hashedCapabilityIds: new bytes32[](0), + configCount: uint32(1), + workflowDONId: uint32(1), + capabilitiesDONIds: new uint256[](0) + }) ) ); vm.expectEmit(); - emit CCIPCapabilityConfiguration.ChainConfigSet(1, adds[0].chainConfig); + emit CCIPConfig.ChainConfigSet(1, adds[0].chainConfig); vm.expectEmit(); - emit CCIPCapabilityConfiguration.ChainConfigSet(2, adds[1].chainConfig); + emit CCIPConfig.ChainConfigSet(2, adds[1].chainConfig); s_ccipCC.applyChainConfigUpdates(new uint64[](0), adds); - CCIPCapabilityConfiguration.ChainConfigInfo[] memory configs = s_ccipCC.getAllChainConfigs(); + CCIPConfigTypes.ChainConfigInfo[] memory configs = s_ccipCC.getAllChainConfigs(); assertEq(configs.length, 2, "chain configs length must be 2"); assertEq(configs[0].chainSelector, 1, "chain selector must match"); assertEq(configs[1].chainSelector, 2, "chain selector must match"); @@ -129,42 +135,44 @@ contract CCIPCapabilityConfiguration_chainConfig is CCIPCapabilityConfigurationS function test_applyChainConfigUpdates_removeChainConfigs_Success() public { bytes32[] memory chainReaders = new bytes32[](1); chainReaders[0] = keccak256(abi.encode(1)); - CCIPCapabilityConfiguration.ChainConfigInfo[] memory adds = new CCIPCapabilityConfiguration.ChainConfigInfo[](2); - adds[0] = CCIPCapabilityConfiguration.ChainConfigInfo({ + CCIPConfigTypes.ChainConfigInfo[] memory adds = new CCIPConfigTypes.ChainConfigInfo[](2); + adds[0] = CCIPConfigTypes.ChainConfigInfo({ chainSelector: 1, - chainConfig: CCIPCapabilityConfiguration.ChainConfig({readers: chainReaders, fChain: 1, config: bytes("config1")}) + chainConfig: CCIPConfigTypes.ChainConfig({readers: chainReaders, fChain: 1, config: bytes("config1")}) }); - adds[1] = CCIPCapabilityConfiguration.ChainConfigInfo({ + adds[1] = CCIPConfigTypes.ChainConfigInfo({ chainSelector: 2, - chainConfig: CCIPCapabilityConfiguration.ChainConfig({readers: chainReaders, fChain: 1, config: bytes("config2")}) + chainConfig: CCIPConfigTypes.ChainConfig({readers: chainReaders, fChain: 1, config: bytes("config2")}) }); vm.mockCall( - CAPABILITY_REGISTRY, - abi.encodeWithSelector(ICapabilityRegistry.getNode.selector, chainReaders[0]), + CAPABILITIES_REGISTRY, + abi.encodeWithSelector(ICapabilitiesRegistry.getNode.selector, chainReaders[0]), abi.encode( - ICapabilityRegistry.NodeInfo({ + ICapabilitiesRegistry.NodeInfo({ nodeOperatorId: 1, signer: bytes32(uint256(1)), p2pId: chainReaders[0], - hashedCapabilityIds: new bytes32[](0) - }), - uint32(1) + hashedCapabilityIds: new bytes32[](0), + configCount: uint32(1), + workflowDONId: uint32(1), + capabilitiesDONIds: new uint256[](0) + }) ) ); vm.expectEmit(); - emit CCIPCapabilityConfiguration.ChainConfigSet(1, adds[0].chainConfig); + emit CCIPConfig.ChainConfigSet(1, adds[0].chainConfig); vm.expectEmit(); - emit CCIPCapabilityConfiguration.ChainConfigSet(2, adds[1].chainConfig); + emit CCIPConfig.ChainConfigSet(2, adds[1].chainConfig); s_ccipCC.applyChainConfigUpdates(new uint64[](0), adds); uint64[] memory removes = new uint64[](1); removes[0] = uint64(1); vm.expectEmit(); - emit CCIPCapabilityConfiguration.ChainConfigRemoved(1); - s_ccipCC.applyChainConfigUpdates(removes, new CCIPCapabilityConfiguration.ChainConfigInfo[](0)); + emit CCIPConfig.ChainConfigRemoved(1); + s_ccipCC.applyChainConfigUpdates(removes, new CCIPConfigTypes.ChainConfigInfo[](0)); } // Reverts. @@ -173,78 +181,82 @@ contract CCIPCapabilityConfiguration_chainConfig is CCIPCapabilityConfigurationS uint64[] memory removes = new uint64[](1); removes[0] = uint64(1); - vm.expectRevert(abi.encodeWithSelector(CCIPCapabilityConfiguration.ChainSelectorNotFound.selector, 1)); - s_ccipCC.applyChainConfigUpdates(removes, new CCIPCapabilityConfiguration.ChainConfigInfo[](0)); + vm.expectRevert(abi.encodeWithSelector(CCIPConfig.ChainSelectorNotFound.selector, 1)); + s_ccipCC.applyChainConfigUpdates(removes, new CCIPConfigTypes.ChainConfigInfo[](0)); } function test_applyChainConfigUpdates_nodeNotInRegistry_Reverts() public { bytes32[] memory chainReaders = new bytes32[](1); chainReaders[0] = keccak256(abi.encode(1)); - CCIPCapabilityConfiguration.ChainConfigInfo[] memory adds = new CCIPCapabilityConfiguration.ChainConfigInfo[](1); - adds[0] = CCIPCapabilityConfiguration.ChainConfigInfo({ + CCIPConfigTypes.ChainConfigInfo[] memory adds = new CCIPConfigTypes.ChainConfigInfo[](1); + adds[0] = CCIPConfigTypes.ChainConfigInfo({ chainSelector: 1, - chainConfig: CCIPCapabilityConfiguration.ChainConfig({readers: chainReaders, fChain: 1, config: abi.encode(1, 2, 3)}) + chainConfig: CCIPConfigTypes.ChainConfig({readers: chainReaders, fChain: 1, config: abi.encode(1, 2, 3)}) }); vm.mockCall( - CAPABILITY_REGISTRY, - abi.encodeWithSelector(ICapabilityRegistry.getNode.selector, chainReaders[0]), + CAPABILITIES_REGISTRY, + abi.encodeWithSelector(ICapabilitiesRegistry.getNode.selector, chainReaders[0]), abi.encode( - ICapabilityRegistry.NodeInfo({ + ICapabilitiesRegistry.NodeInfo({ nodeOperatorId: 0, signer: bytes32(0), p2pId: bytes32(uint256(0)), - hashedCapabilityIds: new bytes32[](0) - }), - uint32(1) + hashedCapabilityIds: new bytes32[](0), + configCount: uint32(1), + workflowDONId: uint32(1), + capabilitiesDONIds: new uint256[](0) + }) ) ); - vm.expectRevert(abi.encodeWithSelector(CCIPCapabilityConfiguration.NodeNotInRegistry.selector, chainReaders[0])); + vm.expectRevert(abi.encodeWithSelector(CCIPConfig.NodeNotInRegistry.selector, chainReaders[0])); s_ccipCC.applyChainConfigUpdates(new uint64[](0), adds); } function test__applyChainConfigUpdates_FChainNotPositive_Reverts() public { bytes32[] memory chainReaders = new bytes32[](1); chainReaders[0] = keccak256(abi.encode(1)); - CCIPCapabilityConfiguration.ChainConfigInfo[] memory adds = new CCIPCapabilityConfiguration.ChainConfigInfo[](2); - adds[0] = CCIPCapabilityConfiguration.ChainConfigInfo({ + CCIPConfigTypes.ChainConfigInfo[] memory adds = new CCIPConfigTypes.ChainConfigInfo[](2); + adds[0] = CCIPConfigTypes.ChainConfigInfo({ chainSelector: 1, - chainConfig: CCIPCapabilityConfiguration.ChainConfig({readers: chainReaders, fChain: 1, config: bytes("config1")}) + chainConfig: CCIPConfigTypes.ChainConfig({readers: chainReaders, fChain: 1, config: bytes("config1")}) }); - adds[1] = CCIPCapabilityConfiguration.ChainConfigInfo({ + adds[1] = CCIPConfigTypes.ChainConfigInfo({ chainSelector: 2, - chainConfig: CCIPCapabilityConfiguration.ChainConfig({readers: chainReaders, fChain: 0, config: bytes("config2")}) // bad fChain + chainConfig: CCIPConfigTypes.ChainConfig({readers: chainReaders, fChain: 0, config: bytes("config2")}) // bad fChain }); vm.mockCall( - CAPABILITY_REGISTRY, - abi.encodeWithSelector(ICapabilityRegistry.getNode.selector, chainReaders[0]), + CAPABILITIES_REGISTRY, + abi.encodeWithSelector(ICapabilitiesRegistry.getNode.selector, chainReaders[0]), abi.encode( - ICapabilityRegistry.NodeInfo({ + ICapabilitiesRegistry.NodeInfo({ nodeOperatorId: 1, signer: bytes32(uint256(1)), p2pId: chainReaders[0], - hashedCapabilityIds: new bytes32[](0) - }), - uint32(1) + hashedCapabilityIds: new bytes32[](0), + configCount: uint32(1), + workflowDONId: uint32(1), + capabilitiesDONIds: new uint256[](0) + }) ) ); - vm.expectRevert(CCIPCapabilityConfiguration.FChainMustBePositive.selector); + vm.expectRevert(CCIPConfig.FChainMustBePositive.selector); s_ccipCC.applyChainConfigUpdates(new uint64[](0), adds); } } -contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurationSetup { +contract CCIPConfig_validateConfig is CCIPConfigSetup { // Successes. function test__validateConfig_Success() public { (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); // Config is for 4 nodes, so f == 1. - CCIPCapabilityConfiguration.OCR3Config memory config = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory config = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -264,8 +276,8 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); // Config is for 4 nodes, so f == 1. - CCIPCapabilityConfiguration.OCR3Config memory config = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory config = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 0, // invalid bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -277,7 +289,7 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati offchainConfig: bytes("offchainConfig") }); - vm.expectRevert(CCIPCapabilityConfiguration.ChainSelectorNotSet.selector); + vm.expectRevert(CCIPConfig.ChainSelectorNotSet.selector); s_ccipCC.validateConfig(config); } @@ -285,8 +297,8 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); // Config is for 4 nodes, so f == 1. - CCIPCapabilityConfiguration.OCR3Config memory config = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory config = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: bytes(""), // invalid chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -298,7 +310,7 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati offchainConfig: bytes("offchainConfig") }); - vm.expectRevert(CCIPCapabilityConfiguration.OfframpAddressCannotBeZero.selector); + vm.expectRevert(CCIPConfig.OfframpAddressCannotBeZero.selector); s_ccipCC.validateConfig(config); } @@ -306,8 +318,8 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); // Config is for 4 nodes, so f == 1. - CCIPCapabilityConfiguration.OCR3Config memory config = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory config = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 2, // not set bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -319,7 +331,7 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati offchainConfig: bytes("offchainConfig") }); - vm.expectRevert(abi.encodeWithSelector(CCIPCapabilityConfiguration.ChainSelectorNotFound.selector, 2)); + vm.expectRevert(abi.encodeWithSelector(CCIPConfig.ChainSelectorNotFound.selector, 2)); s_ccipCC.validateConfig(config); } @@ -327,8 +339,8 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati // 32 > 31 (max num oracles) (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(32); - CCIPCapabilityConfiguration.OCR3Config memory config = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory config = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -340,7 +352,7 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati offchainConfig: bytes("offchainConfig") }); - vm.expectRevert(CCIPCapabilityConfiguration.TooManySigners.selector); + vm.expectRevert(CCIPConfig.TooManySigners.selector); s_ccipCC.validateConfig(config); } @@ -353,8 +365,8 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati mstore(signers, 30) } - CCIPCapabilityConfiguration.OCR3Config memory config = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory config = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -366,7 +378,7 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati offchainConfig: bytes("offchainConfig") }); - vm.expectRevert(CCIPCapabilityConfiguration.TooManyTransmitters.selector); + vm.expectRevert(CCIPConfig.TooManyTransmitters.selector); s_ccipCC.validateConfig(config); } @@ -380,8 +392,8 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati mstore(transmitters, 3) } - CCIPCapabilityConfiguration.OCR3Config memory config = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory config = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -393,7 +405,7 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati offchainConfig: bytes("offchainConfig") }); - vm.expectRevert(abi.encodeWithSelector(CCIPCapabilityConfiguration.NotEnoughTransmitters.selector, 3, 4)); + vm.expectRevert(abi.encodeWithSelector(CCIPConfig.NotEnoughTransmitters.selector, 3, 4)); s_ccipCC.validateConfig(config); } @@ -401,8 +413,8 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); // Config is for 4 nodes, so f == 1. - CCIPCapabilityConfiguration.OCR3Config memory config = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory config = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -414,15 +426,15 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati offchainConfig: bytes("offchainConfig") }); - vm.expectRevert(CCIPCapabilityConfiguration.FMustBePositive.selector); + vm.expectRevert(CCIPConfig.FMustBePositive.selector); s_ccipCC.validateConfig(config); } function test__validateConfig_FTooHigh_Reverts() public { (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); - CCIPCapabilityConfiguration.OCR3Config memory config = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory config = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -434,7 +446,7 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati offchainConfig: bytes("offchainConfig") }); - vm.expectRevert(CCIPCapabilityConfiguration.FTooHigh.selector); + vm.expectRevert(CCIPConfig.FTooHigh.selector); s_ccipCC.validateConfig(config); } @@ -446,8 +458,8 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati } // Config is for 4 nodes, so f == 1. - CCIPCapabilityConfiguration.OCR3Config memory config = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory config = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -460,9 +472,7 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati }); vm.expectRevert( - abi.encodeWithSelector( - CCIPCapabilityConfiguration.P2PIdsLengthNotMatching.selector, uint256(3), uint256(4), uint256(4) - ) + abi.encodeWithSelector(CCIPConfig.P2PIdsLengthNotMatching.selector, uint256(3), uint256(4), uint256(4)) ); s_ccipCC.validateConfig(config); } @@ -471,8 +481,8 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); // Config is for 4 nodes, so f == 1. - CCIPCapabilityConfiguration.OCR3Config memory config = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory config = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _makeBytes32Array(5, 0), // too many bootstrap p2pIds, 5 > 4 @@ -484,7 +494,7 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati offchainConfig: bytes("offchainConfig") }); - vm.expectRevert(CCIPCapabilityConfiguration.TooManyBootstrapP2PIds.selector); + vm.expectRevert(CCIPConfig.TooManyBootstrapP2PIds.selector); s_ccipCC.validateConfig(config); } @@ -494,22 +504,24 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati p2pIds[0] = nonExistentP2PId; vm.mockCall( - CAPABILITY_REGISTRY, - abi.encodeWithSelector(ICapabilityRegistry.getNode.selector, nonExistentP2PId), + CAPABILITIES_REGISTRY, + abi.encodeWithSelector(ICapabilitiesRegistry.getNode.selector, nonExistentP2PId), abi.encode( - ICapabilityRegistry.NodeInfo({ + ICapabilitiesRegistry.NodeInfo({ nodeOperatorId: 0, signer: bytes32(0), p2pId: bytes32(uint256(0)), - hashedCapabilityIds: new bytes32[](0) - }), - uint32(1) + hashedCapabilityIds: new bytes32[](0), + configCount: uint32(1), + workflowDONId: uint32(1), + capabilitiesDONIds: new uint256[](0) + }) ) ); // Config is for 4 nodes, so f == 1. - CCIPCapabilityConfiguration.OCR3Config memory config = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory config = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -521,40 +533,34 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati offchainConfig: bytes("offchainConfig") }); - vm.expectRevert(abi.encodeWithSelector(CCIPCapabilityConfiguration.NodeNotInRegistry.selector, nonExistentP2PId)); + vm.expectRevert(abi.encodeWithSelector(CCIPConfig.NodeNotInRegistry.selector, nonExistentP2PId)); s_ccipCC.validateConfig(config); } } -contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigurationSetup { +contract CCIPConfig_ConfigStateMachine is CCIPConfigSetup { // Successful cases. function test__stateFromConfigLength_Success() public { uint256 configLen = 0; - CCIPCapabilityConfiguration.ConfigState state = s_ccipCC.stateFromConfigLength(configLen); - assertEq(uint256(state), uint256(CCIPCapabilityConfiguration.ConfigState.Init)); + CCIPConfigTypes.ConfigState state = s_ccipCC.stateFromConfigLength(configLen); + assertEq(uint256(state), uint256(CCIPConfigTypes.ConfigState.Init)); configLen = 1; state = s_ccipCC.stateFromConfigLength(configLen); - assertEq(uint256(state), uint256(CCIPCapabilityConfiguration.ConfigState.Running)); + assertEq(uint256(state), uint256(CCIPConfigTypes.ConfigState.Running)); configLen = 2; state = s_ccipCC.stateFromConfigLength(configLen); - assertEq(uint256(state), uint256(CCIPCapabilityConfiguration.ConfigState.Staging)); + assertEq(uint256(state), uint256(CCIPConfigTypes.ConfigState.Staging)); } function test__validateConfigStateTransition_Success() public { - s_ccipCC.validateConfigStateTransition( - CCIPCapabilityConfiguration.ConfigState.Init, CCIPCapabilityConfiguration.ConfigState.Running - ); + s_ccipCC.validateConfigStateTransition(CCIPConfigTypes.ConfigState.Init, CCIPConfigTypes.ConfigState.Running); - s_ccipCC.validateConfigStateTransition( - CCIPCapabilityConfiguration.ConfigState.Running, CCIPCapabilityConfiguration.ConfigState.Staging - ); + s_ccipCC.validateConfigStateTransition(CCIPConfigTypes.ConfigState.Running, CCIPConfigTypes.ConfigState.Staging); - s_ccipCC.validateConfigStateTransition( - CCIPCapabilityConfiguration.ConfigState.Staging, CCIPCapabilityConfiguration.ConfigState.Running - ); + s_ccipCC.validateConfigStateTransition(CCIPConfigTypes.ConfigState.Staging, CCIPConfigTypes.ConfigState.Running); } function test__computeConfigDigest_Success() public { @@ -565,8 +571,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu bytes32[] memory p2pIds = _makeBytes32Array(4, 0); bytes[] memory signers = _makeBytesArray(2, 10); bytes[] memory transmitters = _makeBytesArray(2, 20); - CCIPCapabilityConfiguration.OCR3Config memory config = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory config = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -590,7 +596,7 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu bytes32 configDigest3 = s_ccipCC.computeConfigDigest(donId, configCount, config); configCount = 1; - config.pluginType = CCIPCapabilityConfiguration.PluginType.Execution; + config.pluginType = Internal.OCRPluginType.Execution; bytes32 configDigest4 = s_ccipCC.computeConfigDigest(donId, configCount, config); assertNotEq(configDigest1, configDigest2, "config digests 1 and 2 must not match"); @@ -602,17 +608,16 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu } function test_Fuzz__groupByPluginType_Success(uint256 numCommitCfgs, uint256 numExecCfgs) public { - vm.assume(numCommitCfgs >= 0 && numCommitCfgs < 3); - vm.assume(numExecCfgs >= 0 && numExecCfgs < 3); + numCommitCfgs = bound(numCommitCfgs, 0, 2); + numExecCfgs = bound(numExecCfgs, 0, 2); bytes32[] memory p2pIds = _makeBytes32Array(4, 0); bytes[] memory signers = _makeBytesArray(4, 10); bytes[] memory transmitters = _makeBytesArray(4, 20); - CCIPCapabilityConfiguration.OCR3Config[] memory cfgs = - new CCIPCapabilityConfiguration.OCR3Config[](numCommitCfgs + numExecCfgs); + CCIPConfigTypes.OCR3Config[] memory cfgs = new CCIPConfigTypes.OCR3Config[](numCommitCfgs + numExecCfgs); for (uint256 i = 0; i < numCommitCfgs; i++) { - cfgs[i] = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + cfgs[i] = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -625,8 +630,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu }); } for (uint256 i = 0; i < numExecCfgs; i++) { - cfgs[numCommitCfgs + i] = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Execution, + cfgs[numCommitCfgs + i] = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Execution, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -638,27 +643,17 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfig: abi.encode("exec", numCommitCfgs + i) }); } - ( - CCIPCapabilityConfiguration.OCR3Config[] memory commitCfgs, - CCIPCapabilityConfiguration.OCR3Config[] memory execCfgs - ) = s_ccipCC.groupByPluginType(cfgs); + (CCIPConfigTypes.OCR3Config[] memory commitCfgs, CCIPConfigTypes.OCR3Config[] memory execCfgs) = + s_ccipCC.groupByPluginType(cfgs); assertEq(commitCfgs.length, numCommitCfgs, "commitCfgs length must match"); assertEq(execCfgs.length, numExecCfgs, "execCfgs length must match"); for (uint256 i = 0; i < commitCfgs.length; i++) { - assertEq( - uint8(commitCfgs[i].pluginType), - uint8(CCIPCapabilityConfiguration.PluginType.Commit), - "plugin type must be commit" - ); + assertEq(uint8(commitCfgs[i].pluginType), uint8(Internal.OCRPluginType.Commit), "plugin type must be commit"); assertEq(commitCfgs[i].offchainConfig, abi.encode("commit", i), "offchain config must match"); } for (uint256 i = 0; i < execCfgs.length; i++) { - assertEq( - uint8(execCfgs[i].pluginType), - uint8(CCIPCapabilityConfiguration.PluginType.Execution), - "plugin type must be execution" - ); + assertEq(uint8(execCfgs[i].pluginType), uint8(Internal.OCRPluginType.Execution), "plugin type must be execution"); assertEq(execCfgs[i].offchainConfig, abi.encode("exec", numCommitCfgs + i), "offchain config must match"); } } @@ -666,11 +661,10 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu function test__computeNewConfigWithMeta_InitToRunning_Success() public { (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory currentConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](0); - CCIPCapabilityConfiguration.OCR3Config[] memory newConfig = new CCIPCapabilityConfiguration.OCR3Config[](1); - newConfig[0] = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3ConfigWithMeta[] memory currentConfig = new CCIPConfigTypes.OCR3ConfigWithMeta[](0); + CCIPConfigTypes.OCR3Config[] memory newConfig = new CCIPConfigTypes.OCR3Config[](1); + newConfig[0] = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -681,9 +675,9 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfigVersion: 30, offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.ConfigState currentState = CCIPCapabilityConfiguration.ConfigState.Init; - CCIPCapabilityConfiguration.ConfigState newState = CCIPCapabilityConfiguration.ConfigState.Running; - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory newConfigWithMeta = + CCIPConfigTypes.ConfigState currentState = CCIPConfigTypes.ConfigState.Init; + CCIPConfigTypes.ConfigState newState = CCIPConfigTypes.ConfigState.Running; + CCIPConfigTypes.OCR3ConfigWithMeta[] memory newConfigWithMeta = s_ccipCC.computeNewConfigWithMeta(donId, currentConfig, newConfig, currentState, newState); assertEq(newConfigWithMeta.length, 1, "new config with meta length must be 1"); assertEq(newConfigWithMeta[0].configCount, uint64(1), "config count must be 1"); @@ -702,8 +696,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu function test__computeNewConfigWithMeta_RunningToStaging_Success() public { (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config memory blueConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory blueConfig = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -714,8 +708,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfigVersion: 30, offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.OCR3Config memory greenConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory greenConfig = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -727,24 +721,23 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfig: bytes("commit-new") }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory currentConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](1); - currentConfig[0] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + CCIPConfigTypes.OCR3ConfigWithMeta[] memory currentConfig = new CCIPConfigTypes.OCR3ConfigWithMeta[](1); + currentConfig[0] = CCIPConfigTypes.OCR3ConfigWithMeta({ configCount: 1, config: blueConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 1, blueConfig) }); - CCIPCapabilityConfiguration.OCR3Config[] memory newConfig = new CCIPCapabilityConfiguration.OCR3Config[](2); + CCIPConfigTypes.OCR3Config[] memory newConfig = new CCIPConfigTypes.OCR3Config[](2); // existing blue config first. newConfig[0] = blueConfig; // green config next. newConfig[1] = greenConfig; - CCIPCapabilityConfiguration.ConfigState currentState = CCIPCapabilityConfiguration.ConfigState.Running; - CCIPCapabilityConfiguration.ConfigState newState = CCIPCapabilityConfiguration.ConfigState.Staging; + CCIPConfigTypes.ConfigState currentState = CCIPConfigTypes.ConfigState.Running; + CCIPConfigTypes.ConfigState newState = CCIPConfigTypes.ConfigState.Staging; - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory newConfigWithMeta = + CCIPConfigTypes.OCR3ConfigWithMeta[] memory newConfigWithMeta = s_ccipCC.computeNewConfigWithMeta(donId, currentConfig, newConfig, currentState, newState); assertEq(newConfigWithMeta.length, 2, "new config with meta length must be 2"); @@ -781,8 +774,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu function test__computeNewConfigWithMeta_StagingToRunning_Success() public { (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config memory blueConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory blueConfig = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -793,8 +786,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfigVersion: 30, offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.OCR3Config memory greenConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory greenConfig = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -806,25 +799,24 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfig: bytes("commit-new") }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory currentConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](2); - currentConfig[0] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + CCIPConfigTypes.OCR3ConfigWithMeta[] memory currentConfig = new CCIPConfigTypes.OCR3ConfigWithMeta[](2); + currentConfig[0] = CCIPConfigTypes.OCR3ConfigWithMeta({ configCount: 1, config: blueConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 1, blueConfig) }); - currentConfig[1] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + currentConfig[1] = CCIPConfigTypes.OCR3ConfigWithMeta({ configCount: 2, config: greenConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 2, greenConfig) }); - CCIPCapabilityConfiguration.OCR3Config[] memory newConfig = new CCIPCapabilityConfiguration.OCR3Config[](1); + CCIPConfigTypes.OCR3Config[] memory newConfig = new CCIPConfigTypes.OCR3Config[](1); newConfig[0] = greenConfig; - CCIPCapabilityConfiguration.ConfigState currentState = CCIPCapabilityConfiguration.ConfigState.Staging; - CCIPCapabilityConfiguration.ConfigState newState = CCIPCapabilityConfiguration.ConfigState.Running; + CCIPConfigTypes.ConfigState currentState = CCIPConfigTypes.ConfigState.Staging; + CCIPConfigTypes.ConfigState newState = CCIPConfigTypes.ConfigState.Running; - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory newConfigWithMeta = + CCIPConfigTypes.OCR3ConfigWithMeta[] memory newConfigWithMeta = s_ccipCC.computeNewConfigWithMeta(donId, currentConfig, newConfig, currentState, newState); assertEq(newConfigWithMeta.length, 1, "new config with meta length must be 1"); @@ -842,8 +834,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu function test__validateConfigTransition_InitToRunning_Success() public { (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config memory blueConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory blueConfig = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -855,15 +847,13 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory newConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](1); - newConfig[0] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + CCIPConfigTypes.OCR3ConfigWithMeta[] memory newConfig = new CCIPConfigTypes.OCR3ConfigWithMeta[](1); + newConfig[0] = CCIPConfigTypes.OCR3ConfigWithMeta({ configCount: 1, config: blueConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 1, blueConfig) }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory currentConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](0); + CCIPConfigTypes.OCR3ConfigWithMeta[] memory currentConfig = new CCIPConfigTypes.OCR3ConfigWithMeta[](0); s_ccipCC.validateConfigTransition(currentConfig, newConfig); } @@ -871,8 +861,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu function test__validateConfigTransition_RunningToStaging_Success() public { (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config memory blueConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory blueConfig = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -883,8 +873,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfigVersion: 30, offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.OCR3Config memory greenConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory greenConfig = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -896,22 +886,20 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfig: bytes("commit-new") }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory newConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](2); - newConfig[0] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + CCIPConfigTypes.OCR3ConfigWithMeta[] memory newConfig = new CCIPConfigTypes.OCR3ConfigWithMeta[](2); + newConfig[0] = CCIPConfigTypes.OCR3ConfigWithMeta({ configCount: 1, config: blueConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 1, blueConfig) }); - newConfig[1] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + newConfig[1] = CCIPConfigTypes.OCR3ConfigWithMeta({ configCount: 2, config: greenConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 2, greenConfig) }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory currentConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](1); - currentConfig[0] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + CCIPConfigTypes.OCR3ConfigWithMeta[] memory currentConfig = new CCIPConfigTypes.OCR3ConfigWithMeta[](1); + currentConfig[0] = CCIPConfigTypes.OCR3ConfigWithMeta({ configCount: 1, config: blueConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 1, blueConfig) @@ -923,8 +911,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu function test__validateConfigTransition_StagingToRunning_Success() public { (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config memory blueConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory blueConfig = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -935,8 +923,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfigVersion: 30, offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.OCR3Config memory greenConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory greenConfig = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -948,22 +936,20 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfig: bytes("commit-new") }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory currentConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](2); - currentConfig[0] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + CCIPConfigTypes.OCR3ConfigWithMeta[] memory currentConfig = new CCIPConfigTypes.OCR3ConfigWithMeta[](2); + currentConfig[0] = CCIPConfigTypes.OCR3ConfigWithMeta({ configCount: 1, config: blueConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 1, blueConfig) }); - currentConfig[1] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + currentConfig[1] = CCIPConfigTypes.OCR3ConfigWithMeta({ configCount: 2, config: greenConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 2, greenConfig) }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory newConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](1); - newConfig[0] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + CCIPConfigTypes.OCR3ConfigWithMeta[] memory newConfig = new CCIPConfigTypes.OCR3ConfigWithMeta[](1); + newConfig[0] = CCIPConfigTypes.OCR3ConfigWithMeta({ configCount: 2, config: greenConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 2, greenConfig) @@ -976,7 +962,7 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu function test_Fuzz__stateFromConfigLength_Reverts(uint256 configLen) public { vm.assume(configLen > 2); - vm.expectRevert(abi.encodeWithSelector(CCIPCapabilityConfiguration.InvalidConfigLength.selector, configLen)); + vm.expectRevert(abi.encodeWithSelector(CCIPConfig.InvalidConfigLength.selector, configLen)); s_ccipCC.stateFromConfigLength(configLen); } @@ -984,10 +970,10 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu bytes32[] memory p2pIds = _makeBytes32Array(4, 0); bytes[] memory signers = _makeBytesArray(4, 10); bytes[] memory transmitters = _makeBytesArray(4, 20); - CCIPCapabilityConfiguration.OCR3Config[] memory cfgs = new CCIPCapabilityConfiguration.OCR3Config[](3); + CCIPConfigTypes.OCR3Config[] memory cfgs = new CCIPConfigTypes.OCR3Config[](3); for (uint256 i = 0; i < 3; i++) { - cfgs[i] = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + cfgs[i] = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -1007,10 +993,10 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu bytes32[] memory p2pIds = _makeBytes32Array(4, 0); bytes[] memory signers = _makeBytesArray(4, 10); bytes[] memory transmitters = _makeBytesArray(4, 20); - CCIPCapabilityConfiguration.OCR3Config[] memory cfgs = new CCIPCapabilityConfiguration.OCR3Config[](3); + CCIPConfigTypes.OCR3Config[] memory cfgs = new CCIPConfigTypes.OCR3Config[](3); for (uint256 i = 0; i < 3; i++) { - cfgs[i] = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Execution, + cfgs[i] = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Execution, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -1027,15 +1013,15 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu } function test__groupByPluginType_TooManyOCR3Configs_Reverts() public { - CCIPCapabilityConfiguration.OCR3Config[] memory cfgs = new CCIPCapabilityConfiguration.OCR3Config[](5); - vm.expectRevert(CCIPCapabilityConfiguration.TooManyOCR3Configs.selector); + CCIPConfigTypes.OCR3Config[] memory cfgs = new CCIPConfigTypes.OCR3Config[](5); + vm.expectRevert(CCIPConfig.TooManyOCR3Configs.selector); s_ccipCC.groupByPluginType(cfgs); } function test__validateConfigTransition_InitToRunning_WrongConfigCount_Reverts() public { uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config memory blueConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory blueConfig = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(_makeBytes32Array(4, 0), 0, 1), @@ -1047,24 +1033,22 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory newConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](1); - newConfig[0] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + CCIPConfigTypes.OCR3ConfigWithMeta[] memory newConfig = new CCIPConfigTypes.OCR3ConfigWithMeta[](1); + newConfig[0] = CCIPConfigTypes.OCR3ConfigWithMeta({ configCount: 0, config: blueConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 1, blueConfig) }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory currentConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](0); + CCIPConfigTypes.OCR3ConfigWithMeta[] memory currentConfig = new CCIPConfigTypes.OCR3ConfigWithMeta[](0); - vm.expectRevert(abi.encodeWithSelector(CCIPCapabilityConfiguration.WrongConfigCount.selector, 0, 1)); + vm.expectRevert(abi.encodeWithSelector(CCIPConfig.WrongConfigCount.selector, 0, 1)); s_ccipCC.validateConfigTransition(currentConfig, newConfig); } function test__validateConfigTransition_RunningToStaging_WrongConfigDigestBlueGreen_Reverts() public { uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config memory blueConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory blueConfig = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(_makeBytes32Array(4, 0), 0, 1), @@ -1075,8 +1059,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfigVersion: 30, offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.OCR3Config memory greenConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory greenConfig = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(_makeBytes32Array(4, 0), 0, 1), @@ -1088,22 +1072,20 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfig: bytes("commit-new") }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory currentConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](1); - currentConfig[0] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + CCIPConfigTypes.OCR3ConfigWithMeta[] memory currentConfig = new CCIPConfigTypes.OCR3ConfigWithMeta[](1); + currentConfig[0] = CCIPConfigTypes.OCR3ConfigWithMeta({ configCount: 1, config: blueConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 1, blueConfig) }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory newConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](2); - newConfig[0] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + CCIPConfigTypes.OCR3ConfigWithMeta[] memory newConfig = new CCIPConfigTypes.OCR3ConfigWithMeta[](2); + newConfig[0] = CCIPConfigTypes.OCR3ConfigWithMeta({ configCount: 1, config: blueConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 3, blueConfig) // wrong config digest (due to diff config count) }); - newConfig[1] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + newConfig[1] = CCIPConfigTypes.OCR3ConfigWithMeta({ configCount: 2, config: greenConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 2, greenConfig) @@ -1111,7 +1093,7 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu vm.expectRevert( abi.encodeWithSelector( - CCIPCapabilityConfiguration.WrongConfigDigestBlueGreen.selector, + CCIPConfig.WrongConfigDigestBlueGreen.selector, s_ccipCC.computeConfigDigest(donId, 3, blueConfig), s_ccipCC.computeConfigDigest(donId, 1, blueConfig) ) @@ -1121,8 +1103,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu function test__validateConfigTransition_RunningToStaging_WrongConfigCount_Reverts() public { uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config memory blueConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory blueConfig = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(_makeBytes32Array(4, 0), 0, 1), @@ -1133,8 +1115,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfigVersion: 30, offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.OCR3Config memory greenConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory greenConfig = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(_makeBytes32Array(4, 0), 0, 1), @@ -1146,35 +1128,33 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfig: bytes("commit-new") }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory currentConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](1); - currentConfig[0] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + CCIPConfigTypes.OCR3ConfigWithMeta[] memory currentConfig = new CCIPConfigTypes.OCR3ConfigWithMeta[](1); + currentConfig[0] = CCIPConfigTypes.OCR3ConfigWithMeta({ configCount: 1, config: blueConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 1, blueConfig) }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory newConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](2); - newConfig[0] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + CCIPConfigTypes.OCR3ConfigWithMeta[] memory newConfig = new CCIPConfigTypes.OCR3ConfigWithMeta[](2); + newConfig[0] = CCIPConfigTypes.OCR3ConfigWithMeta({ configCount: 1, config: blueConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 1, blueConfig) }); - newConfig[1] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + newConfig[1] = CCIPConfigTypes.OCR3ConfigWithMeta({ configCount: 3, // wrong config count config: greenConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 3, greenConfig) }); - vm.expectRevert(abi.encodeWithSelector(CCIPCapabilityConfiguration.WrongConfigCount.selector, 3, 2)); + vm.expectRevert(abi.encodeWithSelector(CCIPConfig.WrongConfigCount.selector, 3, 2)); s_ccipCC.validateConfigTransition(currentConfig, newConfig); } function test__validateConfigTransition_StagingToRunning_WrongConfigDigest_Reverts() public { uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config memory blueConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory blueConfig = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(_makeBytes32Array(4, 0), 0, 1), @@ -1185,8 +1165,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfigVersion: 30, offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.OCR3Config memory greenConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory greenConfig = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(_makeBytes32Array(4, 0), 0, 1), @@ -1198,22 +1178,20 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfig: bytes("commit-new") }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory currentConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](2); - currentConfig[0] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + CCIPConfigTypes.OCR3ConfigWithMeta[] memory currentConfig = new CCIPConfigTypes.OCR3ConfigWithMeta[](2); + currentConfig[0] = CCIPConfigTypes.OCR3ConfigWithMeta({ configCount: 1, config: blueConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 1, blueConfig) }); - currentConfig[1] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + currentConfig[1] = CCIPConfigTypes.OCR3ConfigWithMeta({ configCount: 2, config: greenConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 2, greenConfig) }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory newConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](1); - newConfig[0] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + CCIPConfigTypes.OCR3ConfigWithMeta[] memory newConfig = new CCIPConfigTypes.OCR3ConfigWithMeta[](1); + newConfig[0] = CCIPConfigTypes.OCR3ConfigWithMeta({ configCount: 2, config: greenConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 3, greenConfig) // wrong config digest @@ -1221,7 +1199,7 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu vm.expectRevert( abi.encodeWithSelector( - CCIPCapabilityConfiguration.WrongConfigDigest.selector, + CCIPConfig.WrongConfigDigest.selector, s_ccipCC.computeConfigDigest(donId, 3, greenConfig), s_ccipCC.computeConfigDigest(donId, 2, greenConfig) ) @@ -1230,23 +1208,21 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu } function test__validateConfigTransition_NonExistentConfigTransition_Reverts() public { - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory currentConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](3); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory newConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](1); - vm.expectRevert(CCIPCapabilityConfiguration.NonExistentConfigTransition.selector); + CCIPConfigTypes.OCR3ConfigWithMeta[] memory currentConfig = new CCIPConfigTypes.OCR3ConfigWithMeta[](3); + CCIPConfigTypes.OCR3ConfigWithMeta[] memory newConfig = new CCIPConfigTypes.OCR3ConfigWithMeta[](1); + vm.expectRevert(CCIPConfig.NonExistentConfigTransition.selector); s_ccipCC.validateConfigTransition(currentConfig, newConfig); } } -contract CCIPCapabilityConfiguration__updatePluginConfig is CCIPCapabilityConfigurationSetup { +contract CCIPConfig__updatePluginConfig is CCIPConfigSetup { // Successes. function test__updatePluginConfig_InitToRunning_Success() public { (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config memory blueConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory blueConfig = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -1257,14 +1233,14 @@ contract CCIPCapabilityConfiguration__updatePluginConfig is CCIPCapabilityConfig offchainConfigVersion: 30, offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.OCR3Config[] memory configs = new CCIPCapabilityConfiguration.OCR3Config[](1); + CCIPConfigTypes.OCR3Config[] memory configs = new CCIPConfigTypes.OCR3Config[](1); configs[0] = blueConfig; - s_ccipCC.updatePluginConfig(donId, CCIPCapabilityConfiguration.PluginType.Commit, configs); + s_ccipCC.updatePluginConfig(donId, Internal.OCRPluginType.Commit, configs); // should see the updated config in the contract state. - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory storedConfig = - s_ccipCC.getOCRConfig(donId, CCIPCapabilityConfiguration.PluginType.Commit); + CCIPConfigTypes.OCR3ConfigWithMeta[] memory storedConfig = + s_ccipCC.getOCRConfig(donId, Internal.OCRPluginType.Commit); assertEq(storedConfig.length, 1, "don config length must be 1"); assertEq(storedConfig[0].configCount, uint64(1), "config count must be 1"); assertEq(uint256(storedConfig[0].config.pluginType), uint256(blueConfig.pluginType), "plugin type must match"); @@ -1274,9 +1250,9 @@ contract CCIPCapabilityConfiguration__updatePluginConfig is CCIPCapabilityConfig (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); // add blue config. uint32 donId = 1; - CCIPCapabilityConfiguration.PluginType pluginType = CCIPCapabilityConfiguration.PluginType.Commit; - CCIPCapabilityConfiguration.OCR3Config memory blueConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + Internal.OCRPluginType pluginType = Internal.OCRPluginType.Commit; + CCIPConfigTypes.OCR3Config memory blueConfig = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -1287,13 +1263,13 @@ contract CCIPCapabilityConfiguration__updatePluginConfig is CCIPCapabilityConfig offchainConfigVersion: 30, offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.OCR3Config[] memory startConfigs = new CCIPCapabilityConfiguration.OCR3Config[](1); + CCIPConfigTypes.OCR3Config[] memory startConfigs = new CCIPConfigTypes.OCR3Config[](1); startConfigs[0] = blueConfig; // add blue AND green config to indicate an update. - s_ccipCC.updatePluginConfig(donId, CCIPCapabilityConfiguration.PluginType.Commit, startConfigs); - CCIPCapabilityConfiguration.OCR3Config memory greenConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + s_ccipCC.updatePluginConfig(donId, Internal.OCRPluginType.Commit, startConfigs); + CCIPConfigTypes.OCR3Config memory greenConfig = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -1304,27 +1280,23 @@ contract CCIPCapabilityConfiguration__updatePluginConfig is CCIPCapabilityConfig offchainConfigVersion: 30, offchainConfig: bytes("commit-new") }); - CCIPCapabilityConfiguration.OCR3Config[] memory blueAndGreen = new CCIPCapabilityConfiguration.OCR3Config[](2); + CCIPConfigTypes.OCR3Config[] memory blueAndGreen = new CCIPConfigTypes.OCR3Config[](2); blueAndGreen[0] = blueConfig; blueAndGreen[1] = greenConfig; - s_ccipCC.updatePluginConfig(donId, CCIPCapabilityConfiguration.PluginType.Commit, blueAndGreen); + s_ccipCC.updatePluginConfig(donId, Internal.OCRPluginType.Commit, blueAndGreen); // should see the updated config in the contract state. - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory storedConfig = - s_ccipCC.getOCRConfig(donId, CCIPCapabilityConfiguration.PluginType.Commit); + CCIPConfigTypes.OCR3ConfigWithMeta[] memory storedConfig = + s_ccipCC.getOCRConfig(donId, Internal.OCRPluginType.Commit); assertEq(storedConfig.length, 2, "don config length must be 2"); // 0 index is blue config, 1 index is green config. assertEq(storedConfig[1].configCount, uint64(2), "config count must be 2"); assertEq( - uint256(storedConfig[0].config.pluginType), - uint256(CCIPCapabilityConfiguration.PluginType.Commit), - "plugin type must match" + uint256(storedConfig[0].config.pluginType), uint256(Internal.OCRPluginType.Commit), "plugin type must match" ); assertEq( - uint256(storedConfig[1].config.pluginType), - uint256(CCIPCapabilityConfiguration.PluginType.Commit), - "plugin type must match" + uint256(storedConfig[1].config.pluginType), uint256(Internal.OCRPluginType.Commit), "plugin type must match" ); assertEq(storedConfig[0].config.offchainConfig, bytes("commit"), "blue offchain config must match"); assertEq(storedConfig[1].config.offchainConfig, bytes("commit-new"), "green offchain config must match"); @@ -1334,9 +1306,9 @@ contract CCIPCapabilityConfiguration__updatePluginConfig is CCIPCapabilityConfig (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); // add blue config. uint32 donId = 1; - CCIPCapabilityConfiguration.PluginType pluginType = CCIPCapabilityConfiguration.PluginType.Commit; - CCIPCapabilityConfiguration.OCR3Config memory blueConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + Internal.OCRPluginType pluginType = Internal.OCRPluginType.Commit; + CCIPConfigTypes.OCR3Config memory blueConfig = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -1347,13 +1319,13 @@ contract CCIPCapabilityConfiguration__updatePluginConfig is CCIPCapabilityConfig offchainConfigVersion: 30, offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.OCR3Config[] memory startConfigs = new CCIPCapabilityConfiguration.OCR3Config[](1); + CCIPConfigTypes.OCR3Config[] memory startConfigs = new CCIPConfigTypes.OCR3Config[](1); startConfigs[0] = blueConfig; // add blue AND green config to indicate an update. - s_ccipCC.updatePluginConfig(donId, CCIPCapabilityConfiguration.PluginType.Commit, startConfigs); - CCIPCapabilityConfiguration.OCR3Config memory greenConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + s_ccipCC.updatePluginConfig(donId, Internal.OCRPluginType.Commit, startConfigs); + CCIPConfigTypes.OCR3Config memory greenConfig = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -1364,45 +1336,39 @@ contract CCIPCapabilityConfiguration__updatePluginConfig is CCIPCapabilityConfig offchainConfigVersion: 30, offchainConfig: bytes("commit-new") }); - CCIPCapabilityConfiguration.OCR3Config[] memory blueAndGreen = new CCIPCapabilityConfiguration.OCR3Config[](2); + CCIPConfigTypes.OCR3Config[] memory blueAndGreen = new CCIPConfigTypes.OCR3Config[](2); blueAndGreen[0] = blueConfig; blueAndGreen[1] = greenConfig; - s_ccipCC.updatePluginConfig(donId, CCIPCapabilityConfiguration.PluginType.Commit, blueAndGreen); + s_ccipCC.updatePluginConfig(donId, Internal.OCRPluginType.Commit, blueAndGreen); // should see the updated config in the contract state. - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory storedConfig = - s_ccipCC.getOCRConfig(donId, CCIPCapabilityConfiguration.PluginType.Commit); + CCIPConfigTypes.OCR3ConfigWithMeta[] memory storedConfig = + s_ccipCC.getOCRConfig(donId, Internal.OCRPluginType.Commit); assertEq(storedConfig.length, 2, "don config length must be 2"); // 0 index is blue config, 1 index is green config. assertEq(storedConfig[1].configCount, uint64(2), "config count must be 2"); assertEq( - uint256(storedConfig[0].config.pluginType), - uint256(CCIPCapabilityConfiguration.PluginType.Commit), - "plugin type must match" + uint256(storedConfig[0].config.pluginType), uint256(Internal.OCRPluginType.Commit), "plugin type must match" ); assertEq( - uint256(storedConfig[1].config.pluginType), - uint256(CCIPCapabilityConfiguration.PluginType.Commit), - "plugin type must match" + uint256(storedConfig[1].config.pluginType), uint256(Internal.OCRPluginType.Commit), "plugin type must match" ); assertEq(storedConfig[0].config.offchainConfig, bytes("commit"), "blue offchain config must match"); assertEq(storedConfig[1].config.offchainConfig, bytes("commit-new"), "green offchain config must match"); // promote green to blue. - CCIPCapabilityConfiguration.OCR3Config[] memory promote = new CCIPCapabilityConfiguration.OCR3Config[](1); + CCIPConfigTypes.OCR3Config[] memory promote = new CCIPConfigTypes.OCR3Config[](1); promote[0] = greenConfig; - s_ccipCC.updatePluginConfig(donId, CCIPCapabilityConfiguration.PluginType.Commit, promote); + s_ccipCC.updatePluginConfig(donId, Internal.OCRPluginType.Commit, promote); // should see the updated config in the contract state. - storedConfig = s_ccipCC.getOCRConfig(donId, CCIPCapabilityConfiguration.PluginType.Commit); + storedConfig = s_ccipCC.getOCRConfig(donId, Internal.OCRPluginType.Commit); assertEq(storedConfig.length, 1, "don config length must be 1"); assertEq(storedConfig[0].configCount, uint64(2), "config count must be 2"); assertEq( - uint256(storedConfig[0].config.pluginType), - uint256(CCIPCapabilityConfiguration.PluginType.Commit), - "plugin type must match" + uint256(storedConfig[0].config.pluginType), uint256(Internal.OCRPluginType.Commit), "plugin type must match" ); assertEq(storedConfig[0].config.offchainConfig, bytes("commit-new"), "green offchain config must match"); } @@ -1410,37 +1376,37 @@ contract CCIPCapabilityConfiguration__updatePluginConfig is CCIPCapabilityConfig // Reverts. function test__updatePluginConfig_InvalidConfigLength_Reverts() public { uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config[] memory newConfig = new CCIPCapabilityConfiguration.OCR3Config[](3); - vm.expectRevert(abi.encodeWithSelector(CCIPCapabilityConfiguration.InvalidConfigLength.selector, uint256(3))); - s_ccipCC.updatePluginConfig(donId, CCIPCapabilityConfiguration.PluginType.Commit, newConfig); + CCIPConfigTypes.OCR3Config[] memory newConfig = new CCIPConfigTypes.OCR3Config[](3); + vm.expectRevert(abi.encodeWithSelector(CCIPConfig.InvalidConfigLength.selector, uint256(3))); + s_ccipCC.updatePluginConfig(donId, Internal.OCRPluginType.Commit, newConfig); } function test__updatePluginConfig_InvalidConfigStateTransition_Reverts() public { uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config[] memory newConfig = new CCIPCapabilityConfiguration.OCR3Config[](2); + CCIPConfigTypes.OCR3Config[] memory newConfig = new CCIPConfigTypes.OCR3Config[](2); // 0 -> 2 is an invalid state transition. - vm.expectRevert(abi.encodeWithSelector(CCIPCapabilityConfiguration.InvalidConfigStateTransition.selector, 0, 2)); - s_ccipCC.updatePluginConfig(donId, CCIPCapabilityConfiguration.PluginType.Commit, newConfig); + vm.expectRevert(abi.encodeWithSelector(CCIPConfig.InvalidConfigStateTransition.selector, 0, 2)); + s_ccipCC.updatePluginConfig(donId, Internal.OCRPluginType.Commit, newConfig); } } -contract CCIPCapabilityConfiguration_beforeCapabilityConfigSet is CCIPCapabilityConfigurationSetup { +contract CCIPConfig_beforeCapabilityConfigSet is CCIPConfigSetup { // Successes. function test_beforeCapabilityConfigSet_ZeroLengthConfig_Success() public { - changePrank(CAPABILITY_REGISTRY); + changePrank(CAPABILITIES_REGISTRY); - CCIPCapabilityConfiguration.OCR3Config[] memory configs = new CCIPCapabilityConfiguration.OCR3Config[](0); + CCIPConfigTypes.OCR3Config[] memory configs = new CCIPConfigTypes.OCR3Config[](0); bytes memory encodedConfigs = abi.encode(configs); s_ccipCC.beforeCapabilityConfigSet(new bytes32[](0), encodedConfigs, 1, 1); } function test_beforeCapabilityConfigSet_CommitConfigOnly_Success() public { (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); - changePrank(CAPABILITY_REGISTRY); + changePrank(CAPABILITIES_REGISTRY); uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config memory blueConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory blueConfig = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -1451,30 +1417,28 @@ contract CCIPCapabilityConfiguration_beforeCapabilityConfigSet is CCIPCapability offchainConfigVersion: 30, offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.OCR3Config[] memory configs = new CCIPCapabilityConfiguration.OCR3Config[](1); + CCIPConfigTypes.OCR3Config[] memory configs = new CCIPConfigTypes.OCR3Config[](1); configs[0] = blueConfig; bytes memory encoded = abi.encode(configs); s_ccipCC.beforeCapabilityConfigSet(new bytes32[](0), encoded, 1, donId); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory storedConfigs = - s_ccipCC.getOCRConfig(donId, CCIPCapabilityConfiguration.PluginType.Commit); + CCIPConfigTypes.OCR3ConfigWithMeta[] memory storedConfigs = + s_ccipCC.getOCRConfig(donId, Internal.OCRPluginType.Commit); assertEq(storedConfigs.length, 1, "config length must be 1"); assertEq(storedConfigs[0].configCount, uint64(1), "config count must be 1"); assertEq( - uint256(storedConfigs[0].config.pluginType), - uint256(CCIPCapabilityConfiguration.PluginType.Commit), - "plugin type must be commit" + uint256(storedConfigs[0].config.pluginType), uint256(Internal.OCRPluginType.Commit), "plugin type must be commit" ); } function test_beforeCapabilityConfigSet_ExecConfigOnly_Success() public { (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); - changePrank(CAPABILITY_REGISTRY); + changePrank(CAPABILITIES_REGISTRY); uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config memory blueConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Execution, + CCIPConfigTypes.OCR3Config memory blueConfig = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Execution, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -1485,30 +1449,30 @@ contract CCIPCapabilityConfiguration_beforeCapabilityConfigSet is CCIPCapability offchainConfigVersion: 30, offchainConfig: bytes("exec") }); - CCIPCapabilityConfiguration.OCR3Config[] memory configs = new CCIPCapabilityConfiguration.OCR3Config[](1); + CCIPConfigTypes.OCR3Config[] memory configs = new CCIPConfigTypes.OCR3Config[](1); configs[0] = blueConfig; bytes memory encoded = abi.encode(configs); s_ccipCC.beforeCapabilityConfigSet(new bytes32[](0), encoded, 1, donId); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory storedConfigs = - s_ccipCC.getOCRConfig(donId, CCIPCapabilityConfiguration.PluginType.Execution); + CCIPConfigTypes.OCR3ConfigWithMeta[] memory storedConfigs = + s_ccipCC.getOCRConfig(donId, Internal.OCRPluginType.Execution); assertEq(storedConfigs.length, 1, "config length must be 1"); assertEq(storedConfigs[0].configCount, uint64(1), "config count must be 1"); assertEq( uint256(storedConfigs[0].config.pluginType), - uint256(CCIPCapabilityConfiguration.PluginType.Execution), + uint256(Internal.OCRPluginType.Execution), "plugin type must be execution" ); } function test_beforeCapabilityConfigSet_CommitAndExecConfig_Success() public { (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); - changePrank(CAPABILITY_REGISTRY); + changePrank(CAPABILITIES_REGISTRY); uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config memory blueCommitConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfigTypes.OCR3Config memory blueCommitConfig = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -1519,8 +1483,8 @@ contract CCIPCapabilityConfiguration_beforeCapabilityConfigSet is CCIPCapability offchainConfigVersion: 30, offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.OCR3Config memory blueExecConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Execution, + CCIPConfigTypes.OCR3Config memory blueExecConfig = CCIPConfigTypes.OCR3Config({ + pluginType: Internal.OCRPluginType.Execution, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -1531,42 +1495,42 @@ contract CCIPCapabilityConfiguration_beforeCapabilityConfigSet is CCIPCapability offchainConfigVersion: 30, offchainConfig: bytes("exec") }); - CCIPCapabilityConfiguration.OCR3Config[] memory configs = new CCIPCapabilityConfiguration.OCR3Config[](2); + CCIPConfigTypes.OCR3Config[] memory configs = new CCIPConfigTypes.OCR3Config[](2); configs[0] = blueExecConfig; configs[1] = blueCommitConfig; bytes memory encoded = abi.encode(configs); s_ccipCC.beforeCapabilityConfigSet(new bytes32[](0), encoded, 1, donId); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory storedExecConfigs = - s_ccipCC.getOCRConfig(donId, CCIPCapabilityConfiguration.PluginType.Execution); + CCIPConfigTypes.OCR3ConfigWithMeta[] memory storedExecConfigs = + s_ccipCC.getOCRConfig(donId, Internal.OCRPluginType.Execution); assertEq(storedExecConfigs.length, 1, "config length must be 1"); assertEq(storedExecConfigs[0].configCount, uint64(1), "config count must be 1"); assertEq( uint256(storedExecConfigs[0].config.pluginType), - uint256(CCIPCapabilityConfiguration.PluginType.Execution), + uint256(Internal.OCRPluginType.Execution), "plugin type must be execution" ); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory storedCommitConfigs = - s_ccipCC.getOCRConfig(donId, CCIPCapabilityConfiguration.PluginType.Commit); + CCIPConfigTypes.OCR3ConfigWithMeta[] memory storedCommitConfigs = + s_ccipCC.getOCRConfig(donId, Internal.OCRPluginType.Commit); assertEq(storedCommitConfigs.length, 1, "config length must be 1"); assertEq(storedCommitConfigs[0].configCount, uint64(1), "config count must be 1"); assertEq( uint256(storedCommitConfigs[0].config.pluginType), - uint256(CCIPCapabilityConfiguration.PluginType.Commit), + uint256(Internal.OCRPluginType.Commit), "plugin type must be commit" ); } // Reverts. - function test_beforeCapabilityConfigSet_OnlyCapabilityRegistryCanCall_Reverts() public { + function test_beforeCapabilityConfigSet_OnlyCapabilitiesRegistryCanCall_Reverts() public { bytes32[] memory nodes = new bytes32[](0); bytes memory config = bytes(""); uint64 configCount = 1; uint32 donId = 1; - vm.expectRevert(CCIPCapabilityConfiguration.OnlyCapabilityRegistryCanCall.selector); + vm.expectRevert(CCIPConfig.OnlyCapabilitiesRegistryCanCall.selector); s_ccipCC.beforeCapabilityConfigSet(nodes, config, configCount, donId); } } diff --git a/contracts/src/v0.8/ccip/test/commitStore/CommitStore.t.sol b/contracts/src/v0.8/ccip/test/commitStore/CommitStore.t.sol index d937b5654a..7598f9ccb6 100644 --- a/contracts/src/v0.8/ccip/test/commitStore/CommitStore.t.sol +++ b/contracts/src/v0.8/ccip/test/commitStore/CommitStore.t.sol @@ -55,13 +55,8 @@ contract CommitStoreRealRMNSetup is PriceRegistrySetup, OCR2BaseSetup { OCR2BaseSetup.setUp(); RMN.Voter[] memory voters = new RMN.Voter[](1); - voters[0] = RMN.Voter({ - blessVoteAddr: BLESS_VOTE_ADDR, - curseVoteAddr: address(9999), - curseUnvoteAddr: address(19999), - blessWeight: 1, - curseWeight: 1 - }); + voters[0] = + RMN.Voter({blessVoteAddr: BLESS_VOTE_ADDR, curseVoteAddr: address(9999), blessWeight: 1, curseWeight: 1}); // Overwrite base mock rmn with real. s_rmn = new RMN(RMN.Config({voters: voters, blessWeightThreshold: 1, curseWeightThreshold: 1})); s_commitStore = new CommitStoreHelper( @@ -424,7 +419,7 @@ contract CommitStore_report is CommitStoreSetup { } function test_Unhealthy_Revert() public { - s_mockRMN.voteToCurse(bytes16(type(uint128).max)); + s_mockRMN.setGlobalCursed(true); vm.expectRevert(CommitStore.CursedByRMN.selector); bytes memory report; s_commitStore.report(report, ++s_latestEpochAndRound); @@ -587,14 +582,14 @@ contract CommitStore_isUnpausedAndRMNHealthy is CommitStoreSetup { assertTrue(s_commitStore.isUnpausedAndNotCursed()); // Test rmn - s_mockRMN.voteToCurse(bytes16(type(uint128).max)); + s_mockRMN.setGlobalCursed(true); assertFalse(s_commitStore.isUnpausedAndNotCursed()); - RMN.UnvoteToCurseRecord[] memory records = new RMN.UnvoteToCurseRecord[](1); - records[0] = RMN.UnvoteToCurseRecord({curseVoteAddr: OWNER, cursesHash: bytes32(uint256(0)), forceUnvote: true}); - s_mockRMN.ownerUnvoteToCurse(records); + s_mockRMN.setGlobalCursed(false); + // TODO: also test with s_mockRMN.setChainCursed(sourceChainSelector), + // also for other similar tests (e.g., OffRamp, OnRamp) assertTrue(s_commitStore.isUnpausedAndNotCursed()); - s_mockRMN.voteToCurse(bytes16(type(uint128).max)); + s_mockRMN.setGlobalCursed(true); s_commitStore.pause(); assertFalse(s_commitStore.isUnpausedAndNotCursed()); } diff --git a/contracts/src/v0.8/ccip/test/e2e/End2End.t.sol b/contracts/src/v0.8/ccip/test/e2e/End2End.t.sol index ad2aecdde9..816862cbdf 100644 --- a/contracts/src/v0.8/ccip/test/e2e/End2End.t.sol +++ b/contracts/src/v0.8/ccip/test/e2e/End2End.t.sol @@ -62,6 +62,8 @@ contract E2E is EVM2EVMOnRampSetup, CommitStoreSetup, EVM2EVMOffRampSetup { s_commitStore.report(commitReport, ++s_latestEpochAndRound); vm.pauseGasMetering(); + s_mockRMN.setTaggedRootBlessed(IRMN.TaggedRoot({commitStore: address(s_commitStore), root: merkleRoots[0]}), true); + bytes32[] memory proofs = new bytes32[](0); uint256 timestamp = s_commitStore.verify(merkleRoots, proofs, 2 ** 2 - 1); assertEq(BLOCK_TIME, timestamp); diff --git a/contracts/src/v0.8/ccip/test/e2e/MultiRampsEnd2End.sol b/contracts/src/v0.8/ccip/test/e2e/MultiRampsEnd2End.sol index 7a32d20344..1d9a99f182 100644 --- a/contracts/src/v0.8/ccip/test/e2e/MultiRampsEnd2End.sol +++ b/contracts/src/v0.8/ccip/test/e2e/MultiRampsEnd2End.sol @@ -14,7 +14,7 @@ import "../onRamp/EVM2EVMMultiOnRampSetup.t.sol"; /// 2. Commit multiple merkle roots (1 for each source chain). /// 3. Batch execute all the committed messages. contract MultiRampsE2E is EVM2EVMMultiOnRampSetup, EVM2EVMMultiOffRampSetup { - using Internal for Internal.EVM2EVMMessage; + using Internal for Internal.Any2EVMRampMessage; Router internal s_sourceRouter2; EVM2EVMMultiOnRampHelper internal s_onRamp2; @@ -81,7 +81,7 @@ contract MultiRampsE2E is EVM2EVMMultiOnRampSetup, EVM2EVMMultiOffRampSetup { s_sourceRouter2.applyRampUpdates(onRampUpdates, new Router.OffRamp[](0), new Router.OffRamp[](0)); // Deploy offramp - _deployOffRamp(s_destRouter, s_mockRMN); + _deployOffRamp(s_destRouter, s_mockRMN, s_inboundNonceManager); // Enable source chains on offramp EVM2EVMMultiOffRamp.SourceChainConfigArgs[] memory sourceChainConfigs = @@ -89,14 +89,13 @@ contract MultiRampsE2E is EVM2EVMMultiOnRampSetup, EVM2EVMMultiOffRampSetup { sourceChainConfigs[0] = EVM2EVMMultiOffRamp.SourceChainConfigArgs({ sourceChainSelector: SOURCE_CHAIN_SELECTOR, isEnabled: true, - prevOffRamp: address(0), - onRamp: address(s_onRamp) + // Must match OnRamp address + onRamp: abi.encode(address(s_onRamp)) }); sourceChainConfigs[1] = EVM2EVMMultiOffRamp.SourceChainConfigArgs({ sourceChainSelector: SOURCE_CHAIN_SELECTOR + 1, isEnabled: true, - prevOffRamp: address(0), - onRamp: address(s_onRamp2) + onRamp: abi.encode(address(s_onRamp2)) }); _setupMultipleOffRampsFromConfigs(sourceChainConfigs); @@ -110,10 +109,10 @@ contract MultiRampsE2E is EVM2EVMMultiOnRampSetup, EVM2EVMMultiOffRampSetup { uint256 balance1Pre = token1.balanceOf(OWNER); // Send messages - Internal.EVM2EVMMessage[] memory messages1 = new Internal.EVM2EVMMessage[](2); + Internal.Any2EVMRampMessage[] memory messages1 = new Internal.Any2EVMRampMessage[](2); 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); - Internal.EVM2EVMMessage[] memory messages2 = new Internal.EVM2EVMMessage[](1); + Internal.Any2EVMRampMessage[] memory messages2 = new Internal.Any2EVMRampMessage[](1); messages2[0] = _sendRequest(1, SOURCE_CHAIN_SELECTOR + 1, 1, s_metadataHash2, s_sourceRouter2, s_tokenAdminRegistry2); @@ -126,13 +125,10 @@ contract MultiRampsE2E is EVM2EVMMultiOnRampSetup, EVM2EVMMultiOffRampSetup { // Commit bytes32[] memory hashedMessages1 = new bytes32[](2); - hashedMessages1[0] = messages1[0]._hash(s_metadataHash); - messages1[0].messageId = hashedMessages1[0]; - hashedMessages1[1] = messages1[1]._hash(s_metadataHash); - messages1[1].messageId = hashedMessages1[1]; + hashedMessages1[0] = messages1[0]._hash(abi.encode(address(s_onRamp))); + hashedMessages1[1] = messages1[1]._hash(abi.encode(address(s_onRamp))); bytes32[] memory hashedMessages2 = new bytes32[](1); - hashedMessages2[0] = messages2[0]._hash(s_metadataHash2); - messages2[0].messageId = hashedMessages2[0]; + hashedMessages2[0] = messages2[0]._hash(abi.encode(address(s_onRamp2))); bytes32[] memory merkleRoots = new bytes32[](2); merkleRoots[0] = MerkleHelper.getMerkleRoot(hashedMessages1); @@ -141,12 +137,12 @@ contract MultiRampsE2E is EVM2EVMMultiOnRampSetup, EVM2EVMMultiOffRampSetup { EVM2EVMMultiOffRamp.MerkleRoot[] memory roots = new EVM2EVMMultiOffRamp.MerkleRoot[](2); roots[0] = EVM2EVMMultiOffRamp.MerkleRoot({ sourceChainSelector: SOURCE_CHAIN_SELECTOR, - interval: EVM2EVMMultiOffRamp.Interval(messages1[0].sequenceNumber, messages1[1].sequenceNumber), + interval: EVM2EVMMultiOffRamp.Interval(messages1[0].header.sequenceNumber, messages1[1].header.sequenceNumber), merkleRoot: merkleRoots[0] }); roots[1] = EVM2EVMMultiOffRamp.MerkleRoot({ sourceChainSelector: SOURCE_CHAIN_SELECTOR + 1, - interval: EVM2EVMMultiOffRamp.Interval(messages2[0].sequenceNumber, messages2[0].sequenceNumber), + interval: EVM2EVMMultiOffRamp.Interval(messages2[0].header.sequenceNumber, messages2[0].header.sequenceNumber), merkleRoot: merkleRoots[1] }); @@ -157,6 +153,9 @@ contract MultiRampsE2E is EVM2EVMMultiOnRampSetup, EVM2EVMMultiOffRampSetup { _commit(report, ++s_latestSequenceNumber); vm.pauseGasMetering(); + 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]; @@ -175,8 +174,8 @@ contract MultiRampsE2E is EVM2EVMMultiOnRampSetup, EVM2EVMMultiOffRampSetup { vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( SOURCE_CHAIN_SELECTOR, - messages1[0].sequenceNumber, - messages1[0].messageId, + messages1[0].header.sequenceNumber, + messages1[0].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); @@ -184,8 +183,8 @@ contract MultiRampsE2E is EVM2EVMMultiOnRampSetup, EVM2EVMMultiOffRampSetup { vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( SOURCE_CHAIN_SELECTOR, - messages1[1].sequenceNumber, - messages1[1].messageId, + messages1[1].header.sequenceNumber, + messages1[1].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); @@ -193,8 +192,8 @@ contract MultiRampsE2E is EVM2EVMMultiOnRampSetup, EVM2EVMMultiOffRampSetup { vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( SOURCE_CHAIN_SELECTOR + 1, - messages2[0].sequenceNumber, - messages2[0].messageId, + messages2[0].header.sequenceNumber, + messages2[0].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); @@ -214,7 +213,7 @@ contract MultiRampsE2E is EVM2EVMMultiOnRampSetup, EVM2EVMMultiOffRampSetup { bytes32 metadataHash, Router router, TokenAdminRegistry tokenAdminRegistry - ) public returns (Internal.EVM2EVMMessage memory) { + ) public returns (Internal.Any2EVMRampMessage memory) { Client.EVM2AnyMessage memory message = _generateTokenMessage(); uint256 expectedFee = router.getFee(DEST_CHAIN_SELECTOR, message); @@ -241,6 +240,20 @@ contract MultiRampsE2E is EVM2EVMMultiOnRampSetup, EVM2EVMMultiOffRampSetup { router.ccipSend(DEST_CHAIN_SELECTOR, message); vm.pauseGasMetering(); - return msgEvent; + return Internal.Any2EVMRampMessage({ + header: Internal.RampMessageHeader({ + messageId: msgEvent.messageId, + sourceChainSelector: sourceChainSelector, + destChainSelector: DEST_CHAIN_SELECTOR, + sequenceNumber: msgEvent.sequenceNumber, + nonce: msgEvent.nonce + }), + sender: abi.encode(msgEvent.sender), + data: msgEvent.data, + receiver: msgEvent.receiver, + gasLimit: msgEvent.gasLimit, + tokenAmounts: msgEvent.tokenAmounts, + sourceTokenData: msgEvent.sourceTokenData + }); } } diff --git a/contracts/src/v0.8/ccip/test/helpers/CCIPCapabilityConfigurationHelper.sol b/contracts/src/v0.8/ccip/test/helpers/CCIPCapabilityConfigurationHelper.sol deleted file mode 100644 index 7acc65f9bd..0000000000 --- a/contracts/src/v0.8/ccip/test/helpers/CCIPCapabilityConfigurationHelper.sol +++ /dev/null @@ -1,57 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -pragma solidity ^0.8.24; - -import {CCIPCapabilityConfiguration} from "../../capability/CCIPCapabilityConfiguration.sol"; - -contract CCIPCapabilityConfigurationHelper is CCIPCapabilityConfiguration { - constructor(address capabilityRegistry) CCIPCapabilityConfiguration(capabilityRegistry) {} - - function stateFromConfigLength(uint256 configLength) public pure returns (ConfigState) { - return _stateFromConfigLength(configLength); - } - - function validateConfigStateTransition(ConfigState currentState, ConfigState newState) public pure { - _validateConfigStateTransition(currentState, newState); - } - - function validateConfigTransition( - OCR3ConfigWithMeta[] memory currentConfig, - OCR3ConfigWithMeta[] memory newConfigWithMeta - ) public pure { - _validateConfigTransition(currentConfig, newConfigWithMeta); - } - - function computeNewConfigWithMeta( - uint32 donId, - OCR3ConfigWithMeta[] memory currentConfig, - OCR3Config[] memory newConfig, - ConfigState currentState, - ConfigState newState - ) public view returns (OCR3ConfigWithMeta[] memory) { - return _computeNewConfigWithMeta(donId, currentConfig, newConfig, currentState, newState); - } - - function groupByPluginType(OCR3Config[] memory ocr3Configs) - public - pure - returns (OCR3Config[] memory commitConfigs, OCR3Config[] memory execConfigs) - { - return _groupByPluginType(ocr3Configs); - } - - function computeConfigDigest( - uint32 donId, - uint64 configCount, - OCR3Config memory ocr3Config - ) public pure returns (bytes32) { - return _computeConfigDigest(donId, configCount, ocr3Config); - } - - function validateConfig(OCR3Config memory cfg) public view { - _validateConfig(cfg); - } - - function updatePluginConfig(uint32 donId, PluginType pluginType, OCR3Config[] memory newConfig) public { - _updatePluginConfig(donId, pluginType, newConfig); - } -} diff --git a/contracts/src/v0.8/ccip/test/helpers/CCIPConfigHelper.sol b/contracts/src/v0.8/ccip/test/helpers/CCIPConfigHelper.sol new file mode 100644 index 0000000000..74f03890d3 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/helpers/CCIPConfigHelper.sol @@ -0,0 +1,66 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.24; + +import {CCIPConfig} from "../../capability/CCIPConfig.sol"; +import {CCIPConfigTypes} from "../../capability/libraries/CCIPConfigTypes.sol"; +import {Internal} from "../../libraries/Internal.sol"; + +contract CCIPConfigHelper is CCIPConfig { + constructor(address capabilitiesRegistry) CCIPConfig(capabilitiesRegistry) {} + + function stateFromConfigLength(uint256 configLength) public pure returns (CCIPConfigTypes.ConfigState) { + return _stateFromConfigLength(configLength); + } + + function validateConfigStateTransition( + CCIPConfigTypes.ConfigState currentState, + CCIPConfigTypes.ConfigState newState + ) public pure { + _validateConfigStateTransition(currentState, newState); + } + + function validateConfigTransition( + CCIPConfigTypes.OCR3ConfigWithMeta[] memory currentConfig, + CCIPConfigTypes.OCR3ConfigWithMeta[] memory newConfigWithMeta + ) public pure { + _validateConfigTransition(currentConfig, newConfigWithMeta); + } + + function computeNewConfigWithMeta( + uint32 donId, + CCIPConfigTypes.OCR3ConfigWithMeta[] memory currentConfig, + CCIPConfigTypes.OCR3Config[] memory newConfig, + CCIPConfigTypes.ConfigState currentState, + CCIPConfigTypes.ConfigState newState + ) public view returns (CCIPConfigTypes.OCR3ConfigWithMeta[] memory) { + return _computeNewConfigWithMeta(donId, currentConfig, newConfig, currentState, newState); + } + + function groupByPluginType(CCIPConfigTypes.OCR3Config[] memory ocr3Configs) + public + pure + returns (CCIPConfigTypes.OCR3Config[] memory commitConfigs, CCIPConfigTypes.OCR3Config[] memory execConfigs) + { + return _groupByPluginType(ocr3Configs); + } + + function computeConfigDigest( + uint32 donId, + uint64 configCount, + CCIPConfigTypes.OCR3Config memory ocr3Config + ) public pure returns (bytes32) { + return _computeConfigDigest(donId, configCount, ocr3Config); + } + + function validateConfig(CCIPConfigTypes.OCR3Config memory cfg) public view { + _validateConfig(cfg); + } + + function updatePluginConfig( + uint32 donId, + Internal.OCRPluginType pluginType, + CCIPConfigTypes.OCR3Config[] memory newConfig + ) public { + _updatePluginConfig(donId, pluginType, newConfig); + } +} diff --git a/contracts/src/v0.8/ccip/test/helpers/EVM2EVMMultiOffRampHelper.sol b/contracts/src/v0.8/ccip/test/helpers/EVM2EVMMultiOffRampHelper.sol index 83b9569425..0e2202869e 100644 --- a/contracts/src/v0.8/ccip/test/helpers/EVM2EVMMultiOffRampHelper.sol +++ b/contracts/src/v0.8/ccip/test/helpers/EVM2EVMMultiOffRampHelper.sol @@ -26,10 +26,6 @@ contract EVM2EVMMultiOffRampHelper is EVM2EVMMultiOffRamp, IgnoreContractSize { return s_executionStates[sourceChainSelector][bitmapIndex]; } - function metadataHash(uint64 sourceChainSelector, address onRamp) external view returns (bytes32) { - return _metadataHash(sourceChainSelector, onRamp, Internal.EVM_2_EVM_MESSAGE_HASH); - } - function releaseOrMintSingleToken( uint256 sourceTokenAmount, bytes calldata originalSender, @@ -57,7 +53,7 @@ contract EVM2EVMMultiOffRampHelper is EVM2EVMMultiOffRamp, IgnoreContractSize { } function trialExecute( - Internal.EVM2EVMMessage memory message, + Internal.Any2EVMRampMessage memory message, bytes[] memory offchainTokenData ) external returns (Internal.MessageExecutionState, bytes memory) { return _trialExecute(message, offchainTokenData); diff --git a/contracts/src/v0.8/ccip/test/helpers/MessageHasher.sol b/contracts/src/v0.8/ccip/test/helpers/MessageHasher.sol new file mode 100644 index 0000000000..755b326c0d --- /dev/null +++ b/contracts/src/v0.8/ccip/test/helpers/MessageHasher.sol @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {Client} from "../../libraries/Client.sol"; +import {Internal} from "../../libraries/Internal.sol"; + +/// @notice MessageHasher is a contract that utility functions to hash an Any2EVMRampMessage +/// and encode various preimages for the final hash of the message. +contract MessageHasher { + function hash(Internal.Any2EVMRampMessage memory message, bytes memory onRamp) public pure returns (bytes32) { + return Internal._hash(message, onRamp); + } + + function encodeTokenAmountsHashPreimage(Client.EVMTokenAmount[] memory tokenAmounts) + public + pure + returns (bytes memory) + { + return abi.encode(tokenAmounts); + } + + function encodeSourceTokenDataHashPreimage(bytes[] memory sourceTokenData) public pure returns (bytes memory) { + return abi.encode(sourceTokenData); + } + + function encodeMetadataHashPreimage( + bytes32 any2EVMMessageHash, + uint64 sourceChainSelector, + uint64 destChainSelector, + bytes memory onRamp + ) public pure returns (bytes memory) { + return abi.encode(any2EVMMessageHash, sourceChainSelector, destChainSelector, onRamp); + } + + function encodeFixedSizeFieldsHashPreimage( + bytes32 messageId, + bytes memory sender, + address receiver, + uint64 sequenceNumber, + uint256 gasLimit, + uint64 nonce + ) public pure returns (bytes memory) { + return abi.encode(messageId, sender, receiver, sequenceNumber, gasLimit, nonce); + } + + function encodeFinalHashPreimage( + bytes32 leafDomainSeparator, + bytes32 implicitMetadataHash, + bytes32 fixedSizeFieldsHash, + bytes32 dataHash, + bytes32 tokenAmountsHash, + bytes32 sourceTokenDataHash + ) public pure returns (bytes memory) { + return abi.encode( + leafDomainSeparator, implicitMetadataHash, fixedSizeFieldsHash, dataHash, tokenAmountsHash, sourceTokenDataHash + ); + } +} diff --git a/contracts/src/v0.8/ccip/test/mocks/MockRMN.sol b/contracts/src/v0.8/ccip/test/mocks/MockRMN.sol index 250ef397a0..3f7b0200e6 100644 --- a/contracts/src/v0.8/ccip/test/mocks/MockRMN.sol +++ b/contracts/src/v0.8/ccip/test/mocks/MockRMN.sol @@ -5,53 +5,51 @@ import {RMN} from "../../RMN.sol"; import {IRMN} from "../../interfaces/IRMN.sol"; import {OwnerIsCreator} from "./../../../shared/access/OwnerIsCreator.sol"; -contract MockRMN is IRMN, OwnerIsCreator { +/// @notice WARNING: This contract is to be only used for testing, all methods are unprotected. +contract MockRMN is IRMN { error CustomError(bytes err); - bool private s_curse; - bytes private s_err; - RMN.VersionedConfig private s_versionedConfig; - mapping(bytes16 subject => bool cursed) private s_curseBySubject; + bytes private s_isCursedRevert; - function isCursed() external view override returns (bool) { - if (s_err.length != 0) { - revert CustomError(s_err); - } - return s_curse; - } + bool private s_globalCursed; + mapping(bytes16 subject => bool cursed) private s_cursedBySubject; + mapping(address commitStore => mapping(bytes32 root => bool blessed)) private s_blessedByRoot; - function isCursed(bytes16 subject) external view override returns (bool) { - if (s_err.length != 0) { - revert CustomError(s_err); - } - return s_curse || s_curseBySubject[subject]; + function setTaggedRootBlessed(IRMN.TaggedRoot calldata taggedRoot, bool blessed) external { + s_blessedByRoot[taggedRoot.commitStore][taggedRoot.root] = blessed; } - function voteToCurse(bytes32) external { - s_curse = true; + function setGlobalCursed(bool cursed) external { + s_globalCursed = cursed; } - function voteToCurse(bytes32, bytes16 subject) external { - s_curseBySubject[subject] = true; + function setChainCursed(uint64 chainSelector, bool cursed) external { + s_cursedBySubject[bytes16(uint128(chainSelector))] = cursed; } - function ownerUnvoteToCurse(RMN.UnvoteToCurseRecord[] memory) external { - s_curse = false; + /// @notice Setting a revert error with length of 0 will disable reverts + /// @dev Useful to test revert handling of ARMProxy + function setIsCursedRevert(bytes calldata revertErr) external { + s_isCursedRevert = revertErr; } - function ownerUnvoteToCurse(RMN.UnvoteToCurseRecord[] memory, bytes16 subject) external { - s_curseBySubject[subject] = false; - } + // IRMN implementation follows - function setRevert(bytes memory err) external { - s_err = err; + function isCursed() external view returns (bool) { + if (s_isCursedRevert.length > 0) { + revert CustomError(s_isCursedRevert); + } + return s_globalCursed; } - function isBlessed(IRMN.TaggedRoot calldata) external view override returns (bool) { - return !s_curse; + function isCursed(bytes16 subject) external view returns (bool) { + if (s_isCursedRevert.length > 0) { + revert CustomError(s_isCursedRevert); + } + return s_globalCursed || s_cursedBySubject[subject]; } - function getConfigDetails() external view returns (uint32 version, uint32 blockNumber, RMN.Config memory config) { - return (s_versionedConfig.configVersion, s_versionedConfig.blockNumber, s_versionedConfig.config); + function isBlessed(IRMN.TaggedRoot calldata taggedRoot) external view returns (bool) { + return s_blessedByRoot[taggedRoot.commitStore][taggedRoot.root]; } } diff --git a/contracts/src/v0.8/ccip/test/mocks/MockRMN1_0.sol b/contracts/src/v0.8/ccip/test/mocks/MockRMN1_0.sol new file mode 100644 index 0000000000..44ffc23b78 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/mocks/MockRMN1_0.sol @@ -0,0 +1,91 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {IRMN} from "../../interfaces/IRMN.sol"; +import {OwnerIsCreator} from "./../../../shared/access/OwnerIsCreator.sol"; + +// Inlined from RMN 1.0 contract. +// solhint-disable gas-struct-packing +contract RMN { + struct Voter { + address blessVoteAddr; + address curseVoteAddr; + address curseUnvoteAddr; + uint8 blessWeight; + uint8 curseWeight; + } + + struct Config { + Voter[] voters; + uint16 blessWeightThreshold; + uint16 curseWeightThreshold; + } + + struct VersionedConfig { + Config config; + uint32 configVersion; + uint32 blockNumber; + } + + struct UnvoteToCurseRecord { + address curseVoteAddr; + bytes32 cursesHash; + bool forceUnvote; + } +} + +/// @dev Retained almost as-is from commit 88f285b94c23d0c684d337064758a5edde380fe2 for compatibility with offchain +/// tests and scripts. Internal structs of the RMN 1.0 contract that were depended on have been inlined. +/// @dev This contract should no longer be used for any new tests or scripts. +/// @notice WARNING: This contract is to be only used for testing, all methods are unprotected. +// TODO: remove this contract when tests and scripts are updated +contract MockRMN is IRMN, OwnerIsCreator { + error CustomError(bytes err); + + bool private s_curse; + bytes private s_err; + RMN.VersionedConfig private s_versionedConfig; + mapping(bytes16 subject => bool cursed) private s_curseBySubject; + + function isCursed() external view override returns (bool) { + if (s_err.length != 0) { + revert CustomError(s_err); + } + return s_curse; + } + + function isCursed(bytes16 subject) external view override returns (bool) { + if (s_err.length != 0) { + revert CustomError(s_err); + } + return s_curse || s_curseBySubject[subject]; + } + + function voteToCurse(bytes32) external { + s_curse = true; + } + + function voteToCurse(bytes32, bytes16 subject) external { + s_curseBySubject[subject] = true; + } + + function ownerUnvoteToCurse(RMN.UnvoteToCurseRecord[] memory) external { + s_curse = false; + } + + function ownerUnvoteToCurse(RMN.UnvoteToCurseRecord[] memory, bytes16 subject) external { + s_curseBySubject[subject] = false; + } + + function setRevert(bytes memory err) external { + s_err = err; + } + + function isBlessed(IRMN.TaggedRoot calldata) external view override returns (bool) { + return !s_curse; + } + + function getConfigDetails() external view returns (uint32 version, uint32 blockNumber, RMN.Config memory config) { + return (s_versionedConfig.configVersion, s_versionedConfig.blockNumber, s_versionedConfig.config); + } +} diff --git a/contracts/src/v0.8/ccip/test/offRamp/EVM2EVMMultiOffRamp.t.sol b/contracts/src/v0.8/ccip/test/offRamp/EVM2EVMMultiOffRamp.t.sol index 3827307739..c994cf5698 100644 --- a/contracts/src/v0.8/ccip/test/offRamp/EVM2EVMMultiOffRamp.t.sol +++ b/contracts/src/v0.8/ccip/test/offRamp/EVM2EVMMultiOffRamp.t.sol @@ -8,6 +8,7 @@ import {IRMN} from "../../interfaces/IRMN.sol"; import {ITokenAdminRegistry} from "../../interfaces/ITokenAdminRegistry.sol"; import {CallWithExactGas} from "../../../shared/call/CallWithExactGas.sol"; +import {NonceManager} from "../../NonceManager.sol"; import {PriceRegistry} from "../../PriceRegistry.sol"; import {RMN} from "../../RMN.sol"; import {Router} from "../../Router.sol"; @@ -28,18 +29,18 @@ import {ConformingReceiver} from "../helpers/receivers/ConformingReceiver.sol"; import {MaybeRevertMessageReceiver} from "../helpers/receivers/MaybeRevertMessageReceiver.sol"; import {MaybeRevertMessageReceiverNo165} from "../helpers/receivers/MaybeRevertMessageReceiverNo165.sol"; import {ReentrancyAbuserMultiRamp} from "../helpers/receivers/ReentrancyAbuserMultiRamp.sol"; -import {MockCommitStore} from "../mocks/MockCommitStore.sol"; import {EVM2EVMMultiOffRampSetup} from "./EVM2EVMMultiOffRampSetup.t.sol"; +import {Vm} from "forge-std/Vm.sol"; import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; -import {Vm} from "forge-std/Vm.sol"; contract EVM2EVMMultiOffRamp_constructor is EVM2EVMMultiOffRampSetup { function test_Constructor_Success() public { EVM2EVMMultiOffRamp.StaticConfig memory staticConfig = EVM2EVMMultiOffRamp.StaticConfig({ chainSelector: DEST_CHAIN_SELECTOR, rmnProxy: address(s_mockRMN), - tokenAdminRegistry: address(s_tokenAdminRegistry) + tokenAdminRegistry: address(s_tokenAdminRegistry), + nonceManager: address(s_inboundNonceManager) }); EVM2EVMMultiOffRamp.DynamicConfig memory dynamicConfig = _generateDynamicMultiOffRampConfig(address(s_destRouter), address(s_priceRegistry)); @@ -48,32 +49,20 @@ contract EVM2EVMMultiOffRamp_constructor is EVM2EVMMultiOffRampSetup { new EVM2EVMMultiOffRamp.SourceChainConfigArgs[](2); sourceChainConfigs[0] = EVM2EVMMultiOffRamp.SourceChainConfigArgs({ sourceChainSelector: SOURCE_CHAIN_SELECTOR_1, - isEnabled: true, - prevOffRamp: address(0), - onRamp: ON_RAMP_ADDRESS_1 + onRamp: ON_RAMP_ADDRESS_1, + isEnabled: true }); sourceChainConfigs[1] = EVM2EVMMultiOffRamp.SourceChainConfigArgs({ sourceChainSelector: SOURCE_CHAIN_SELECTOR_1 + 1, - isEnabled: true, - prevOffRamp: address(0), - onRamp: address(uint160(ON_RAMP_ADDRESS_1) + 1) + onRamp: ON_RAMP_ADDRESS_2, + isEnabled: true }); - EVM2EVMMultiOffRamp.SourceChainConfig memory expectedSourceChainConfig1 = EVM2EVMMultiOffRamp.SourceChainConfig({ - isEnabled: true, - minSeqNr: 1, - prevOffRamp: address(0), - onRamp: sourceChainConfigs[0].onRamp, - metadataHash: s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, sourceChainConfigs[0].onRamp) - }); + EVM2EVMMultiOffRamp.SourceChainConfig memory expectedSourceChainConfig1 = + EVM2EVMMultiOffRamp.SourceChainConfig({isEnabled: true, minSeqNr: 1, onRamp: sourceChainConfigs[0].onRamp}); - EVM2EVMMultiOffRamp.SourceChainConfig memory expectedSourceChainConfig2 = EVM2EVMMultiOffRamp.SourceChainConfig({ - isEnabled: true, - minSeqNr: 1, - prevOffRamp: address(0), - onRamp: sourceChainConfigs[1].onRamp, - metadataHash: s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1 + 1, sourceChainConfigs[1].onRamp) - }); + EVM2EVMMultiOffRamp.SourceChainConfig memory expectedSourceChainConfig2 = + EVM2EVMMultiOffRamp.SourceChainConfig({isEnabled: true, minSeqNr: 1, onRamp: sourceChainConfigs[1].onRamp}); vm.expectEmit(); emit EVM2EVMMultiOffRamp.StaticConfigSet(staticConfig); @@ -151,9 +140,8 @@ contract EVM2EVMMultiOffRamp_constructor is EVM2EVMMultiOffRampSetup { new EVM2EVMMultiOffRamp.SourceChainConfigArgs[](1); sourceChainConfigs[0] = EVM2EVMMultiOffRamp.SourceChainConfigArgs({ sourceChainSelector: SOURCE_CHAIN_SELECTOR_1, - isEnabled: true, - prevOffRamp: address(0), - onRamp: address(0) + onRamp: new bytes(0), + isEnabled: true }); vm.expectRevert(EVM2EVMMultiOffRamp.ZeroAddressNotAllowed.selector); @@ -162,7 +150,8 @@ contract EVM2EVMMultiOffRamp_constructor is EVM2EVMMultiOffRampSetup { EVM2EVMMultiOffRamp.StaticConfig({ chainSelector: DEST_CHAIN_SELECTOR, rmnProxy: address(s_mockRMN), - tokenAdminRegistry: address(s_tokenAdminRegistry) + tokenAdminRegistry: address(s_tokenAdminRegistry), + nonceManager: address(s_inboundNonceManager) }), sourceChainConfigs ); @@ -174,12 +163,8 @@ contract EVM2EVMMultiOffRamp_constructor is EVM2EVMMultiOffRampSetup { EVM2EVMMultiOffRamp.SourceChainConfigArgs[] memory sourceChainConfigs = new EVM2EVMMultiOffRamp.SourceChainConfigArgs[](1); - sourceChainConfigs[0] = EVM2EVMMultiOffRamp.SourceChainConfigArgs({ - sourceChainSelector: 0, - isEnabled: true, - prevOffRamp: address(0), - onRamp: address(0) - }); + sourceChainConfigs[0] = + EVM2EVMMultiOffRamp.SourceChainConfigArgs({sourceChainSelector: 0, onRamp: ON_RAMP_ADDRESS_1, isEnabled: true}); vm.expectRevert(EVM2EVMMultiOffRamp.ZeroChainSelectorNotAllowed.selector); @@ -187,7 +172,8 @@ contract EVM2EVMMultiOffRamp_constructor is EVM2EVMMultiOffRampSetup { EVM2EVMMultiOffRamp.StaticConfig({ chainSelector: DEST_CHAIN_SELECTOR, rmnProxy: address(s_mockRMN), - tokenAdminRegistry: address(s_tokenAdminRegistry) + tokenAdminRegistry: address(s_tokenAdminRegistry), + nonceManager: address(s_inboundNonceManager) }), sourceChainConfigs ); @@ -206,7 +192,8 @@ contract EVM2EVMMultiOffRamp_constructor is EVM2EVMMultiOffRampSetup { EVM2EVMMultiOffRamp.StaticConfig({ chainSelector: DEST_CHAIN_SELECTOR, rmnProxy: ZERO_ADDRESS, - tokenAdminRegistry: address(s_tokenAdminRegistry) + tokenAdminRegistry: address(s_tokenAdminRegistry), + nonceManager: address(s_inboundNonceManager) }), sourceChainConfigs ); @@ -225,7 +212,8 @@ contract EVM2EVMMultiOffRamp_constructor is EVM2EVMMultiOffRampSetup { EVM2EVMMultiOffRamp.StaticConfig({ chainSelector: 0, rmnProxy: address(s_mockRMN), - tokenAdminRegistry: address(s_tokenAdminRegistry) + tokenAdminRegistry: address(s_tokenAdminRegistry), + nonceManager: address(s_inboundNonceManager) }), sourceChainConfigs ); @@ -244,7 +232,28 @@ contract EVM2EVMMultiOffRamp_constructor is EVM2EVMMultiOffRampSetup { EVM2EVMMultiOffRamp.StaticConfig({ chainSelector: DEST_CHAIN_SELECTOR, rmnProxy: address(s_mockRMN), - tokenAdminRegistry: ZERO_ADDRESS + tokenAdminRegistry: ZERO_ADDRESS, + nonceManager: address(s_inboundNonceManager) + }), + sourceChainConfigs + ); + } + + function test_ZeroNonceManager_Revert() public { + uint64[] memory sourceChainSelectors = new uint64[](1); + sourceChainSelectors[0] = SOURCE_CHAIN_SELECTOR_1; + + EVM2EVMMultiOffRamp.SourceChainConfigArgs[] memory sourceChainConfigs = + new EVM2EVMMultiOffRamp.SourceChainConfigArgs[](0); + + vm.expectRevert(EVM2EVMMultiOffRamp.ZeroAddressNotAllowed.selector); + + s_offRamp = new EVM2EVMMultiOffRampHelper( + EVM2EVMMultiOffRamp.StaticConfig({ + chainSelector: DEST_CHAIN_SELECTOR, + rmnProxy: address(s_mockRMN), + tokenAdminRegistry: address(s_tokenAdminRegistry), + nonceManager: ZERO_ADDRESS }), sourceChainConfigs ); @@ -309,74 +318,6 @@ contract EVM2EVMMultiOffRamp_setDynamicConfig is EVM2EVMMultiOffRampSetup { } } -contract EVM2EVMMultiOffRamp_metadataHash is EVM2EVMMultiOffRampSetup { - function test_MetadataHash_Success() public view { - bytes32 h = s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); - assertEq( - h, - keccak256( - abi.encode(Internal.EVM_2_EVM_MESSAGE_HASH, SOURCE_CHAIN_SELECTOR_1, DEST_CHAIN_SELECTOR, ON_RAMP_ADDRESS_1) - ) - ); - } - - function test_MetadataHashChangesOnSourceChain_Success() public view { - bytes32 h = s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1 + 1, ON_RAMP_ADDRESS_1); - assertEq( - h, - keccak256( - abi.encode(Internal.EVM_2_EVM_MESSAGE_HASH, SOURCE_CHAIN_SELECTOR_1 + 1, DEST_CHAIN_SELECTOR, ON_RAMP_ADDRESS_1) - ) - ); - assertTrue(h != s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); - } - - function test_MetadataHashChangesOnOnRampAddress_Success() public view { - address mockOnRampAddress = address(uint160(ON_RAMP_ADDRESS_1) + 1); - bytes32 h = s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, mockOnRampAddress); - assertEq( - h, - keccak256( - abi.encode(Internal.EVM_2_EVM_MESSAGE_HASH, SOURCE_CHAIN_SELECTOR_1, DEST_CHAIN_SELECTOR, mockOnRampAddress) - ) - ); - assertTrue(h != s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); - } - - // NOTE: to get a reliable result, set fuzz runs to at least 1mil - /// forge-config: default.fuzz.runs = 32 - /// forge-config: ccip.fuzz.runs = 10000 - function test_Fuzz__MetadataHash_NoCollisions( - uint64 destChainSelector, - uint64 sourceChainSelector1, - uint64 sourceChainSelector2, - address onRamp1, - address onRamp2 - ) public { - // Edge case: metadata hash should be the same when values match - if (sourceChainSelector1 == sourceChainSelector2 && onRamp1 == onRamp2) { - return; - } - - // Disallow 0 source chain selectors - vm.assume(sourceChainSelector1 != 0); - vm.assume(sourceChainSelector2 != 0); - vm.assume(destChainSelector != 0); - - EVM2EVMMultiOffRamp.StaticConfig memory staticConfig = s_offRamp.getStaticConfig(); - EVM2EVMMultiOffRamp.SourceChainConfigArgs[] memory sourceChainConfigs = - new EVM2EVMMultiOffRamp.SourceChainConfigArgs[](0); - - staticConfig.chainSelector = destChainSelector; - s_offRamp = new EVM2EVMMultiOffRampHelper(staticConfig, sourceChainConfigs); - - bytes32 h1 = s_offRamp.metadataHash(sourceChainSelector1, onRamp1); - bytes32 h2 = s_offRamp.metadataHash(sourceChainSelector2, onRamp2); - - assertTrue(h1 != h2); - } -} - contract EVM2EVMMultiOffRamp_ccipReceive is EVM2EVMMultiOffRampSetup { // Reverts @@ -397,109 +338,109 @@ contract EVM2EVMMultiOffRamp_executeSingleReport is EVM2EVMMultiOffRampSetup { } function test_SingleMessageNoTokens_Success() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - messages[0].sourceChainSelector, - messages[0].sequenceNumber, - messages[0].messageId, + messages[0].header.sourceChainSelector, + messages[0].header.sequenceNumber, + messages[0].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); s_offRamp.executeSingleReport(_generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0)); - messages[0].nonce++; - messages[0].sequenceNumber++; - messages[0].messageId = - Internal._hash(messages[0], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); + messages[0].header.nonce++; + messages[0].header.sequenceNumber++; + messages[0].header.messageId = Internal._hash(messages[0], ON_RAMP_ADDRESS_1); vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - messages[0].sourceChainSelector, - messages[0].sequenceNumber, - messages[0].messageId, + messages[0].header.sourceChainSelector, + messages[0].header.sequenceNumber, + messages[0].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); - uint64 nonceBefore = s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender); + uint64 nonceBefore = s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender); s_offRamp.executeSingleReport(_generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0)); - assertGt(s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender), nonceBefore); + assertGt(s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender), nonceBefore); } function test_SingleMessageNoTokensUnordered_Success() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); - messages[0].nonce = 0; - messages[0].messageId = - Internal._hash(messages[0], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + messages[0].header.nonce = 0; + messages[0].header.messageId = Internal._hash(messages[0], ON_RAMP_ADDRESS_1); vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - messages[0].sourceChainSelector, - messages[0].sequenceNumber, - messages[0].messageId, + messages[0].header.sourceChainSelector, + messages[0].header.sequenceNumber, + messages[0].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); // Nonce never increments on unordered messages. - uint64 nonceBefore = s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender); + uint64 nonceBefore = s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender); s_offRamp.executeSingleReport(_generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0)); assertEq( - s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender), + s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender), nonceBefore, "nonce must remain unchanged on unordered messages" ); - messages[0].sequenceNumber++; - messages[0].messageId = - Internal._hash(messages[0], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); + messages[0].header.sequenceNumber++; + messages[0].header.messageId = Internal._hash(messages[0], ON_RAMP_ADDRESS_1); vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - messages[0].sourceChainSelector, - messages[0].sequenceNumber, - messages[0].messageId, + messages[0].header.sourceChainSelector, + messages[0].header.sequenceNumber, + messages[0].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); // Nonce never increments on unordered messages. - nonceBefore = s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender); + nonceBefore = s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender); s_offRamp.executeSingleReport(_generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0)); assertEq( - s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender), + s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender), nonceBefore, "nonce must remain unchanged on unordered messages" ); } function test_SingleMessageNoTokensOtherChain_Success() public { - Internal.EVM2EVMMessage[] memory messagesChain1 = + Internal.Any2EVMRampMessage[] memory messagesChain1 = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); s_offRamp.executeSingleReport( _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messagesChain1), new uint256[](0) ); - uint64 nonceChain1 = s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, messagesChain1[0].sender); + uint64 nonceChain1 = s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messagesChain1[0].sender); assertGt(nonceChain1, 0); - Internal.EVM2EVMMessage[] memory messagesChain2 = + Internal.Any2EVMRampMessage[] memory messagesChain2 = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_3, ON_RAMP_ADDRESS_3); - assertEq(s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_3, messagesChain2[0].sender), 0); + assertEq(s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_3, messagesChain2[0].sender), 0); s_offRamp.executeSingleReport( _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_3, messagesChain2), new uint256[](0) ); - assertGt(s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_3, messagesChain2[0].sender), 0); + assertGt(s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_3, messagesChain2[0].sender), 0); // Other chain's nonce is unaffected - assertEq(s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, messagesChain1[0].sender), nonceChain1); + assertEq(s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messagesChain1[0].sender), nonceChain1); } function test_ReceiverError_Success() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); bytes memory realError1 = new bytes(2); realError1[0] = 0xbe; @@ -507,14 +448,13 @@ contract EVM2EVMMultiOffRamp_executeSingleReport is EVM2EVMMultiOffRampSetup { s_reverting_receiver.setErr(realError1); messages[0].receiver = address(s_reverting_receiver); - messages[0].messageId = - Internal._hash(messages[0], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); + messages[0].header.messageId = Internal._hash(messages[0], ON_RAMP_ADDRESS_1); vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - messages[0].sourceChainSelector, - messages[0].sequenceNumber, - messages[0].messageId, + messages[0].header.sourceChainSelector, + messages[0].header.sequenceNumber, + messages[0].header.messageId, Internal.MessageExecutionState.FAILURE, abi.encodeWithSelector( EVM2EVMMultiOffRamp.ReceiverError.selector, @@ -522,56 +462,57 @@ contract EVM2EVMMultiOffRamp_executeSingleReport is EVM2EVMMultiOffRampSetup { ) ); // Nonce should increment on non-strict - assertEq(uint64(0), s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, address(OWNER))); + assertEq(uint64(0), s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, abi.encode(OWNER))); s_offRamp.executeSingleReport(_generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0)); - assertEq(uint64(1), s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, address(OWNER))); + assertEq(uint64(1), s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, abi.encode(OWNER))); } function test_SkippedIncorrectNonce_Success() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); - messages[0].nonce++; - messages[0].messageId = - Internal._hash(messages[0], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); + messages[0].header.nonce++; + messages[0].header.messageId = Internal._hash(messages[0], ON_RAMP_ADDRESS_1); vm.expectEmit(); - emit EVM2EVMMultiOffRamp.SkippedIncorrectNonce( - messages[0].sourceChainSelector, messages[0].nonce, messages[0].sender + emit NonceManager.SkippedIncorrectNonce( + messages[0].header.sourceChainSelector, messages[0].header.nonce, messages[0].sender ); s_offRamp.executeSingleReport(_generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0)); } function test_SkippedIncorrectNonceStillExecutes_Success() public { - Internal.EVM2EVMMessage[] memory messages = _generateMessagesWithTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateMessagesWithTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); - messages[1].nonce++; - messages[1].messageId = - Internal._hash(messages[1], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); + messages[1].header.nonce++; + messages[1].header.messageId = Internal._hash(messages[1], ON_RAMP_ADDRESS_1); vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( SOURCE_CHAIN_SELECTOR_1, - messages[0].sequenceNumber, - messages[0].messageId, + messages[0].header.sequenceNumber, + messages[0].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); vm.expectEmit(); - emit EVM2EVMMultiOffRamp.SkippedIncorrectNonce(SOURCE_CHAIN_SELECTOR_1, messages[1].nonce, messages[1].sender); + emit NonceManager.SkippedIncorrectNonce(SOURCE_CHAIN_SELECTOR_1, messages[1].header.nonce, messages[1].sender); s_offRamp.executeSingleReport(_generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0)); } function test__execute_SkippedAlreadyExecutedMessage_Success() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - messages[0].sourceChainSelector, - messages[0].sequenceNumber, - messages[0].messageId, + messages[0].header.sourceChainSelector, + messages[0].header.sequenceNumber, + messages[0].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); @@ -579,22 +520,22 @@ contract EVM2EVMMultiOffRamp_executeSingleReport is EVM2EVMMultiOffRampSetup { s_offRamp.executeSingleReport(_generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0)); vm.expectEmit(); - emit EVM2EVMMultiOffRamp.SkippedAlreadyExecutedMessage(SOURCE_CHAIN_SELECTOR_1, messages[0].sequenceNumber); + emit EVM2EVMMultiOffRamp.SkippedAlreadyExecutedMessage(SOURCE_CHAIN_SELECTOR_1, messages[0].header.sequenceNumber); s_offRamp.executeSingleReport(_generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0)); } function test__execute_SkippedAlreadyExecutedMessageUnordered_Success() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); - messages[0].nonce = 0; - messages[0].messageId = - Internal._hash(messages[0], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + messages[0].header.nonce = 0; + messages[0].header.messageId = Internal._hash(messages[0], ON_RAMP_ADDRESS_1); vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - messages[0].sourceChainSelector, - messages[0].sequenceNumber, - messages[0].messageId, + messages[0].header.sourceChainSelector, + messages[0].header.sequenceNumber, + messages[0].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); @@ -602,7 +543,7 @@ contract EVM2EVMMultiOffRamp_executeSingleReport is EVM2EVMMultiOffRampSetup { s_offRamp.executeSingleReport(_generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0)); vm.expectEmit(); - emit EVM2EVMMultiOffRamp.SkippedAlreadyExecutedMessage(SOURCE_CHAIN_SELECTOR_1, messages[0].sequenceNumber); + emit EVM2EVMMultiOffRamp.SkippedAlreadyExecutedMessage(SOURCE_CHAIN_SELECTOR_1, messages[0].header.sequenceNumber); s_offRamp.executeSingleReport(_generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0)); } @@ -610,17 +551,17 @@ contract EVM2EVMMultiOffRamp_executeSingleReport is EVM2EVMMultiOffRampSetup { // Send a message to a contract that does not implement the CCIPReceiver interface // This should execute successfully. function test_SingleMessageToNonCCIPReceiver_Success() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); MaybeRevertMessageReceiverNo165 newReceiver = new MaybeRevertMessageReceiverNo165(true); messages[0].receiver = address(newReceiver); - messages[0].messageId = - Internal._hash(messages[0], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); + messages[0].header.messageId = Internal._hash(messages[0], ON_RAMP_ADDRESS_1); vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - messages[0].sourceChainSelector, - messages[0].sequenceNumber, - messages[0].messageId, + messages[0].header.sourceChainSelector, + messages[0].header.sequenceNumber, + messages[0].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); @@ -630,13 +571,14 @@ contract EVM2EVMMultiOffRamp_executeSingleReport is EVM2EVMMultiOffRampSetup { function test_SingleMessagesNoTokensSuccess_gas() public { vm.pauseGasMetering(); - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - messages[0].sourceChainSelector, - messages[0].sequenceNumber, - messages[0].messageId, + messages[0].header.sourceChainSelector, + messages[0].header.sequenceNumber, + messages[0].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); @@ -649,17 +591,17 @@ contract EVM2EVMMultiOffRamp_executeSingleReport is EVM2EVMMultiOffRampSetup { function test_TwoMessagesWithTokensSuccess_gas() public { vm.pauseGasMetering(); - Internal.EVM2EVMMessage[] memory messages = _generateMessagesWithTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateMessagesWithTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); // Set message 1 to use another receiver to simulate more fair gas costs messages[1].receiver = address(s_secondary_receiver); - messages[1].messageId = - Internal._hash(messages[1], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); + messages[1].header.messageId = Internal._hash(messages[1], ON_RAMP_ADDRESS_1); vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( SOURCE_CHAIN_SELECTOR_1, - messages[0].sequenceNumber, - messages[0].messageId, + messages[0].header.sequenceNumber, + messages[0].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); @@ -667,8 +609,8 @@ contract EVM2EVMMultiOffRamp_executeSingleReport is EVM2EVMMultiOffRampSetup { vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( SOURCE_CHAIN_SELECTOR_1, - messages[1].sequenceNumber, - messages[1].messageId, + messages[1].header.sequenceNumber, + messages[1].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); @@ -680,17 +622,17 @@ contract EVM2EVMMultiOffRamp_executeSingleReport is EVM2EVMMultiOffRampSetup { } function test_TwoMessagesWithTokensAndGE_Success() public { - Internal.EVM2EVMMessage[] memory messages = _generateMessagesWithTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateMessagesWithTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); // Set message 1 to use another receiver to simulate more fair gas costs messages[1].receiver = address(s_secondary_receiver); - messages[1].messageId = - Internal._hash(messages[1], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); + messages[1].header.messageId = Internal._hash(messages[1], ON_RAMP_ADDRESS_1); vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( SOURCE_CHAIN_SELECTOR_1, - messages[0].sequenceNumber, - messages[0].messageId, + messages[0].header.sequenceNumber, + messages[0].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); @@ -698,21 +640,21 @@ contract EVM2EVMMultiOffRamp_executeSingleReport is EVM2EVMMultiOffRampSetup { vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( SOURCE_CHAIN_SELECTOR_1, - messages[1].sequenceNumber, - messages[1].messageId, + messages[1].header.sequenceNumber, + messages[1].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); - assertEq(uint64(0), s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, OWNER)); + assertEq(uint64(0), s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, abi.encode(OWNER))); s_offRamp.executeSingleReport( _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), _getGasLimitsFromMessages(messages) ); - assertEq(uint64(2), s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, OWNER)); + assertEq(uint64(2), s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, abi.encode(OWNER))); } function test_Fuzz_InterleavingOrderedAndUnorderedMessages_Success(bool[7] memory orderings) public { - Internal.EVM2EVMMessage[] memory messages = new Internal.EVM2EVMMessage[](orderings.length); + Internal.Any2EVMRampMessage[] memory messages = new Internal.Any2EVMRampMessage[](orderings.length); // number of tokens needs to be capped otherwise we hit UnsupportedNumberOfTokens. Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](3); for (uint256 i = 0; i < 3; ++i) { @@ -724,22 +666,21 @@ contract EVM2EVMMultiOffRamp_executeSingleReport is EVM2EVMMultiOffRampSetup { messages[i] = _generateAny2EVMMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, uint64(i + 1), tokenAmounts, !orderings[i]); if (orderings[i]) { - messages[i].nonce = ++expectedNonce; + messages[i].header.nonce = ++expectedNonce; } - messages[i].messageId = - Internal._hash(messages[i], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); + messages[i].header.messageId = Internal._hash(messages[i], ON_RAMP_ADDRESS_1); vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( SOURCE_CHAIN_SELECTOR_1, - messages[i].sequenceNumber, - messages[i].messageId, + messages[i].header.sequenceNumber, + messages[i].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); } - uint64 nonceBefore = s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, OWNER); + uint64 nonceBefore = s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, abi.encode(OWNER)); assertEq(uint64(0), nonceBefore, "nonce before exec should be 0"); s_offRamp.executeSingleReport( _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), _getGasLimitsFromMessages(messages) @@ -747,17 +688,20 @@ contract EVM2EVMMultiOffRamp_executeSingleReport is EVM2EVMMultiOffRampSetup { // all executions should succeed. for (uint256 i = 0; i < orderings.length; ++i) { assertEq( - uint256(s_offRamp.getExecutionState(SOURCE_CHAIN_SELECTOR_1, messages[i].sequenceNumber)), + uint256(s_offRamp.getExecutionState(SOURCE_CHAIN_SELECTOR_1, messages[i].header.sequenceNumber)), uint256(Internal.MessageExecutionState.SUCCESS) ); } - assertEq(nonceBefore + expectedNonce, s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, OWNER)); + assertEq( + nonceBefore + expectedNonce, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, abi.encode(OWNER)) + ); } function test_InvalidSourcePoolAddress_Success() public { address fakePoolAddress = address(0x0000000000333333); - Internal.EVM2EVMMessage[] memory messages = _generateMessagesWithTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateMessagesWithTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); messages[0].sourceTokenData[0] = abi.encode( Internal.SourceTokenData({ sourcePoolAddress: abi.encode(fakePoolAddress), @@ -766,16 +710,14 @@ contract EVM2EVMMultiOffRamp_executeSingleReport is EVM2EVMMultiOffRampSetup { }) ); - messages[0].messageId = - Internal._hash(messages[0], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); - messages[1].messageId = - Internal._hash(messages[1], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); + messages[0].header.messageId = Internal._hash(messages[0], ON_RAMP_ADDRESS_1); + messages[1].header.messageId = Internal._hash(messages[1], ON_RAMP_ADDRESS_1); vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( SOURCE_CHAIN_SELECTOR_1, - messages[0].sequenceNumber, - messages[0].messageId, + messages[0].header.sequenceNumber, + messages[0].header.messageId, Internal.MessageExecutionState.FAILURE, abi.encodeWithSelector( EVM2EVMMultiOffRamp.TokenHandlingError.selector, @@ -787,9 +729,7 @@ contract EVM2EVMMultiOffRamp_executeSingleReport is EVM2EVMMultiOffRampSetup { } function test_WithCurseOnAnotherSourceChain_Success() public { - s_mockRMN.voteToCurse( - 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, bytes16(uint128(SOURCE_CHAIN_SELECTOR_2)) - ); + s_mockRMN.setChainCursed(SOURCE_CHAIN_SELECTOR_2, true); s_offRamp.executeSingleReport( _generateReportFromMessages( SOURCE_CHAIN_SELECTOR_1, _generateMessagesWithTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1) @@ -800,39 +740,42 @@ contract EVM2EVMMultiOffRamp_executeSingleReport is EVM2EVMMultiOffRampSetup { // Reverts - function test_InvalidMessageId_Revert() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); - messages[0].nonce++; - // MessageID no longer matches hash. - Internal.ExecutionReportSingleChain memory executionReport = - _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages); - vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOffRamp.InvalidMessageId.selector, messages[0].messageId)); - s_offRamp.executeSingleReport(executionReport, new uint256[](0)); - } + function test_MismatchingDestChainSelector_Revert() public { + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_3, ON_RAMP_ADDRESS_3); + messages[0].header.destChainSelector = DEST_CHAIN_SELECTOR + 1; - function test_MismatchingSourceChainSelector_Revert() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_3, ON_RAMP_ADDRESS_3); - messages[0].sourceChainSelector = SOURCE_CHAIN_SELECTOR_1; - // MessageID no longer matches hash. Internal.ExecutionReportSingleChain memory executionReport = _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages); - vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOffRamp.InvalidMessageId.selector, messages[0].messageId)); + + vm.expectRevert( + abi.encodeWithSelector( + EVM2EVMMultiOffRamp.InvalidMessageDestChainSelector.selector, messages[0].header.destChainSelector + ) + ); s_offRamp.executeSingleReport(executionReport, new uint256[](0)); } - function test_MismatchingOnRampAddress_Revert() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); - messages[0].messageId = - Internal._hash(messages[0], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_3)); - // MessageID no longer matches hash. + function test_MismatchingOnRampRoot_Revert() public { + s_offRamp.setVerifyOverrideResult(SOURCE_CHAIN_SELECTOR_1, 0); + + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + + EVM2EVMMultiOffRamp.CommitReport memory commitReport = _constructCommitReport( + // Root against mismatching on ramp + Internal._hash(messages[0], ON_RAMP_ADDRESS_3) + ); + _commit(commitReport, s_latestSequenceNumber); + Internal.ExecutionReportSingleChain memory executionReport = _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages); - vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOffRamp.InvalidMessageId.selector, messages[0].messageId)); + vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOffRamp.RootNotCommitted.selector, SOURCE_CHAIN_SELECTOR_1)); s_offRamp.executeSingleReport(executionReport, new uint256[](0)); } function test_Unhealthy_Revert() public { - s_mockRMN.voteToCurse(bytes16(type(uint128).max)); + s_mockRMN.setGlobalCursed(true); vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOffRamp.CursedByRMN.selector, SOURCE_CHAIN_SELECTOR_1)); s_offRamp.executeSingleReport( _generateReportFromMessages( @@ -841,9 +784,7 @@ contract EVM2EVMMultiOffRamp_executeSingleReport is EVM2EVMMultiOffRampSetup { new uint256[](0) ); // Uncurse should succeed - RMN.UnvoteToCurseRecord[] memory records = new RMN.UnvoteToCurseRecord[](1); - records[0] = RMN.UnvoteToCurseRecord({curseVoteAddr: OWNER, cursesHash: bytes32(uint256(0)), forceUnvote: true}); - s_mockRMN.ownerUnvoteToCurse(records); + s_mockRMN.setGlobalCursed(false); s_offRamp.executeSingleReport( _generateReportFromMessages( SOURCE_CHAIN_SELECTOR_1, _generateMessagesWithTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1) @@ -853,8 +794,7 @@ contract EVM2EVMMultiOffRamp_executeSingleReport is EVM2EVMMultiOffRampSetup { } function test_UnhealthySingleChainCurse_Revert() public { - bytes16 subject = bytes16(uint128(SOURCE_CHAIN_SELECTOR_1)); - s_mockRMN.voteToCurse(0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, subject); + s_mockRMN.setChainCursed(SOURCE_CHAIN_SELECTOR_1, true); vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOffRamp.CursedByRMN.selector, SOURCE_CHAIN_SELECTOR_1)); s_offRamp.executeSingleReport( _generateReportFromMessages( @@ -863,9 +803,7 @@ contract EVM2EVMMultiOffRamp_executeSingleReport is EVM2EVMMultiOffRampSetup { new uint256[](0) ); // Uncurse should succeed - RMN.UnvoteToCurseRecord[] memory records = new RMN.UnvoteToCurseRecord[](1); - records[0] = RMN.UnvoteToCurseRecord({curseVoteAddr: OWNER, cursesHash: bytes32(uint256(0)), forceUnvote: true}); - s_mockRMN.ownerUnvoteToCurse(records, subject); + s_mockRMN.setChainCursed(SOURCE_CHAIN_SELECTOR_1, false); s_offRamp.executeSingleReport( _generateReportFromMessages( SOURCE_CHAIN_SELECTOR_1, _generateMessagesWithTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1) @@ -892,7 +830,7 @@ contract EVM2EVMMultiOffRamp_executeSingleReport is EVM2EVMMultiOffRampSetup { sourceChainSelector: SOURCE_CHAIN_SELECTOR_1, proofs: new bytes32[](0), proofFlagBits: 0, - messages: new Internal.EVM2EVMMessage[](0), + messages: new Internal.Any2EVMRampMessage[](0), offchainTokenData: new bytes[][](0) }), new uint256[](0) @@ -903,7 +841,8 @@ contract EVM2EVMMultiOffRamp_executeSingleReport is EVM2EVMMultiOffRampSetup { s_offRamp.setVerifyOverrideResult(SOURCE_CHAIN_SELECTOR_1, 0); vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOffRamp.RootNotCommitted.selector, SOURCE_CHAIN_SELECTOR_1)); - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); s_offRamp.executeSingleReport( _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), _getGasLimitsFromMessages(messages) ); @@ -916,7 +855,8 @@ contract EVM2EVMMultiOffRamp_executeSingleReport is EVM2EVMMultiOffRampSetup { abi.encodeWithSelector(EVM2EVMMultiOffRamp.ManualExecutionNotYetEnabled.selector, SOURCE_CHAIN_SELECTOR_1) ); - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); s_offRamp.executeSingleReport( _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), _getGasLimitsFromMessages(messages) ); @@ -924,43 +864,45 @@ contract EVM2EVMMultiOffRamp_executeSingleReport is EVM2EVMMultiOffRampSetup { function test_NonExistingSourceChain_Revert() public { uint64 newSourceChainSelector = SOURCE_CHAIN_SELECTOR_1 + 1; - address newOnRamp = address(uint160(ON_RAMP_ADDRESS_1) + 1); + bytes memory newOnRamp = abi.encode(ON_RAMP_ADDRESS, 1); - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(newSourceChainSelector, newOnRamp); + Internal.Any2EVMRampMessage[] memory messages = _generateSingleBasicMessage(newSourceChainSelector, newOnRamp); vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOffRamp.SourceChainNotEnabled.selector, newSourceChainSelector)); s_offRamp.executeSingleReport(_generateReportFromMessages(newSourceChainSelector, messages), new uint256[](0)); } function test_DisabledSourceChain_Revert() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_2, ON_RAMP_ADDRESS_2); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_2, ON_RAMP_ADDRESS_2); vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOffRamp.SourceChainNotEnabled.selector, SOURCE_CHAIN_SELECTOR_2)); s_offRamp.executeSingleReport(_generateReportFromMessages(SOURCE_CHAIN_SELECTOR_2, messages), new uint256[](0)); } function test_TokenDataMismatch_Revert() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); Internal.ExecutionReportSingleChain memory report = _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages); report.offchainTokenData[0] = new bytes[](messages[0].tokenAmounts.length + 1); vm.expectRevert( abi.encodeWithSelector( - EVM2EVMMultiOffRamp.TokenDataMismatch.selector, SOURCE_CHAIN_SELECTOR_1, messages[0].sequenceNumber + EVM2EVMMultiOffRamp.TokenDataMismatch.selector, SOURCE_CHAIN_SELECTOR_1, messages[0].header.sequenceNumber ) ); s_offRamp.executeSingleReport(report, new uint256[](0)); } function test_RouterYULCall_Revert() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); // gas limit too high, Router's external call should revert messages[0].gasLimit = 1e36; messages[0].receiver = address(new ConformingReceiver(address(s_destRouter), s_destFeeToken)); - messages[0].messageId = - Internal._hash(messages[0], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); + messages[0].header.messageId = Internal._hash(messages[0], ON_RAMP_ADDRESS_1); Internal.ExecutionReportSingleChain memory executionReport = _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages); @@ -968,7 +910,7 @@ contract EVM2EVMMultiOffRamp_executeSingleReport is EVM2EVMMultiOffRampSetup { vm.expectRevert( abi.encodeWithSelector( EVM2EVMMultiOffRamp.ExecutionError.selector, - messages[0].messageId, + messages[0].header.messageId, abi.encodeWithSelector(CallWithExactGas.NotEnoughGasForCall.selector) ) ); @@ -976,7 +918,8 @@ contract EVM2EVMMultiOffRamp_executeSingleReport is EVM2EVMMultiOffRampSetup { } function test_RetryFailedMessageWithoutManualExecution_Revert() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); bytes memory realError1 = new bytes(2); realError1[0] = 0xbe; @@ -984,14 +927,13 @@ contract EVM2EVMMultiOffRamp_executeSingleReport is EVM2EVMMultiOffRampSetup { s_reverting_receiver.setErr(realError1); messages[0].receiver = address(s_reverting_receiver); - messages[0].messageId = - Internal._hash(messages[0], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); + messages[0].header.messageId = Internal._hash(messages[0], ON_RAMP_ADDRESS_1); vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - messages[0].sourceChainSelector, - messages[0].sequenceNumber, - messages[0].messageId, + messages[0].header.sourceChainSelector, + messages[0].header.sequenceNumber, + messages[0].header.messageId, Internal.MessageExecutionState.FAILURE, abi.encodeWithSelector( EVM2EVMMultiOffRamp.ReceiverError.selector, @@ -1002,276 +944,24 @@ contract EVM2EVMMultiOffRamp_executeSingleReport is EVM2EVMMultiOffRampSetup { vm.expectRevert( abi.encodeWithSelector( - EVM2EVMMultiOffRamp.AlreadyAttempted.selector, SOURCE_CHAIN_SELECTOR_1, messages[0].sequenceNumber + EVM2EVMMultiOffRamp.AlreadyAttempted.selector, SOURCE_CHAIN_SELECTOR_1, messages[0].header.sequenceNumber ) ); s_offRamp.executeSingleReport(_generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0)); } -} - -contract EVM2EVMMultiOffRamp_execute_upgrade is EVM2EVMMultiOffRampSetup { - EVM2EVMOffRampHelper internal s_prevOffRamp; - EVM2EVMOffRampHelper[] internal s_nestedPrevOffRamps; - - function setUp() public virtual override { - super.setUp(); - - ICommitStore mockPrevCommitStore = new MockCommitStore(); - s_prevOffRamp = _deploySingleLaneOffRamp( - mockPrevCommitStore, s_destRouter, address(0), SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1 - ); - - s_nestedPrevOffRamps = new EVM2EVMOffRampHelper[](2); - s_nestedPrevOffRamps[0] = _deploySingleLaneOffRamp( - mockPrevCommitStore, s_destRouter, address(0), SOURCE_CHAIN_SELECTOR_2, ON_RAMP_ADDRESS_2 - ); - s_nestedPrevOffRamps[1] = _deploySingleLaneOffRamp( - mockPrevCommitStore, s_destRouter, address(s_nestedPrevOffRamps[0]), SOURCE_CHAIN_SELECTOR_2, ON_RAMP_ADDRESS_2 - ); - EVM2EVMMultiOffRamp.SourceChainConfigArgs[] memory sourceChainConfigs = - new EVM2EVMMultiOffRamp.SourceChainConfigArgs[](3); - sourceChainConfigs[0] = EVM2EVMMultiOffRamp.SourceChainConfigArgs({ + function _constructCommitReport(bytes32 merkleRoot) internal view returns (EVM2EVMMultiOffRamp.CommitReport memory) { + EVM2EVMMultiOffRamp.MerkleRoot[] memory roots = new EVM2EVMMultiOffRamp.MerkleRoot[](1); + roots[0] = EVM2EVMMultiOffRamp.MerkleRoot({ sourceChainSelector: SOURCE_CHAIN_SELECTOR_1, - isEnabled: true, - prevOffRamp: address(s_prevOffRamp), - onRamp: ON_RAMP_ADDRESS_1 - }); - sourceChainConfigs[1] = EVM2EVMMultiOffRamp.SourceChainConfigArgs({ - sourceChainSelector: SOURCE_CHAIN_SELECTOR_2, - isEnabled: true, - prevOffRamp: address(s_nestedPrevOffRamps[1]), - onRamp: ON_RAMP_ADDRESS_2 - }); - sourceChainConfigs[2] = EVM2EVMMultiOffRamp.SourceChainConfigArgs({ - sourceChainSelector: SOURCE_CHAIN_SELECTOR_3, - isEnabled: true, - prevOffRamp: address(0), - onRamp: ON_RAMP_ADDRESS_3 + interval: EVM2EVMMultiOffRamp.Interval(1, 2), + merkleRoot: merkleRoot }); - _setupMultipleOffRampsFromConfigs(sourceChainConfigs); - - s_offRamp.setVerifyOverrideResult(SOURCE_CHAIN_SELECTOR_1, 1); - s_offRamp.setVerifyOverrideResult(SOURCE_CHAIN_SELECTOR_3, 1); - } - - function test_Upgraded_Success() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); - vm.expectEmit(); - emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - SOURCE_CHAIN_SELECTOR_1, - messages[0].sequenceNumber, - messages[0].messageId, - Internal.MessageExecutionState.SUCCESS, - "" - ); - - s_offRamp.executeSingleReport(_generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0)); - } - - function test_NoPrevOffRampForChain_Success() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); - uint64 startNonceChain3 = s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_3, messages[0].sender); - s_prevOffRamp.execute(_generateSingleRampReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0)); - - // Nonce unchanged for chain 3 - assertEq(startNonceChain3, s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_3, messages[0].sender)); - - Internal.EVM2EVMMessage[] memory messagesChain3 = - _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_3, ON_RAMP_ADDRESS_3); - vm.expectEmit(); - emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - SOURCE_CHAIN_SELECTOR_3, - messagesChain3[0].sequenceNumber, - messagesChain3[0].messageId, - Internal.MessageExecutionState.SUCCESS, - "" - ); - - s_offRamp.executeSingleReport( - _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_3, messagesChain3), new uint256[](0) - ); - assertEq(startNonceChain3 + 1, s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_3, messagesChain3[0].sender)); - } - - function test_UpgradedSenderNoncesReadsPreviousRamp_Success() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); - uint64 startNonce = s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender); - - for (uint64 i = 1; i < 4; ++i) { - s_prevOffRamp.execute(_generateSingleRampReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0)); - - // messages contains a single message - update for the next execution - messages[0].nonce++; - messages[0].sequenceNumber++; - messages[0].messageId = Internal._hash(messages[0], s_prevOffRamp.metadataHash()); - - assertEq(startNonce + i, s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender)); - } - } - - function test_UpgradedSenderNoncesReadsPreviousRampTransitive_Success() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_2, ON_RAMP_ADDRESS_2); - uint64 startNonce = s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_2, messages[0].sender); - - for (uint64 i = 1; i < 4; ++i) { - s_nestedPrevOffRamps[0].execute( - _generateSingleRampReportFromMessages(SOURCE_CHAIN_SELECTOR_2, messages), new uint256[](0) - ); - - // messages contains a single message - update for the next execution - messages[0].nonce++; - messages[0].sequenceNumber++; - messages[0].messageId = Internal._hash(messages[0], s_nestedPrevOffRamps[0].metadataHash()); - - // Read through prev sender nonce through prevOffRamp -> prevPrevOffRamp - assertEq(startNonce + i, s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_2, messages[0].sender)); - } - } - - function test_UpgradedNonceStartsAtV1Nonce_Success() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); - - uint64 startNonce = s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender); - s_prevOffRamp.execute(_generateSingleRampReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0)); - - assertEq(startNonce + 1, s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender)); - - messages[0].nonce++; - messages[0].messageId = - Internal._hash(messages[0], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); - - vm.expectEmit(); - emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - SOURCE_CHAIN_SELECTOR_1, - messages[0].sequenceNumber, - messages[0].messageId, - Internal.MessageExecutionState.SUCCESS, - "" - ); - - s_offRamp.executeSingleReport(_generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0)); - assertEq(startNonce + 2, s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender)); - - messages[0].nonce++; - messages[0].sequenceNumber++; - messages[0].messageId = - Internal._hash(messages[0], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); - - vm.expectEmit(); - emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - SOURCE_CHAIN_SELECTOR_1, - messages[0].sequenceNumber, - messages[0].messageId, - Internal.MessageExecutionState.SUCCESS, - "" - ); - - s_offRamp.executeSingleReport(_generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0)); - assertEq(startNonce + 3, s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender)); - } - - function test_UpgradedNonceNewSenderStartsAtZero_Success() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); - - s_prevOffRamp.execute(_generateSingleRampReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0)); - - address newSender = address(1234567); - messages[0].sender = newSender; - messages[0].messageId = - Internal._hash(messages[0], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); - - vm.expectEmit(); - emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - SOURCE_CHAIN_SELECTOR_1, - messages[0].sequenceNumber, - messages[0].messageId, - Internal.MessageExecutionState.SUCCESS, - "" - ); - - // new sender nonce in new offramp should go from 0 -> 1 - assertEq(s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, newSender), 0); - s_offRamp.executeSingleReport(_generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0)); - assertEq(s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, newSender), 1); - } - - function test_UpgradedOffRampNonceSkipsIfMsgInFlight_Success() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); - - address newSender = address(1234567); - messages[0].sender = newSender; - messages[0].nonce = 2; - messages[0].messageId = - Internal._hash(messages[0], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); - - uint64 startNonce = s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender); - - // new offramp sees msg nonce higher than senderNonce - // it waits for previous offramp to execute - vm.expectEmit(); - emit EVM2EVMMultiOffRamp.SkippedSenderWithPreviousRampMessageInflight( - SOURCE_CHAIN_SELECTOR_1, messages[0].nonce, newSender - ); - s_offRamp.executeSingleReport(_generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0)); - assertEq(startNonce, s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender)); - - messages[0].nonce = 1; - messages[0].messageId = Internal._hash(messages[0], s_prevOffRamp.metadataHash()); - - // previous offramp executes msg and increases nonce - s_prevOffRamp.execute(_generateSingleRampReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0)); - assertEq(startNonce + 1, s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender)); - - messages[0].nonce = 2; - messages[0].messageId = - Internal._hash(messages[0], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); - - // new offramp is able to execute - vm.expectEmit(); - emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - SOURCE_CHAIN_SELECTOR_1, - messages[0].sequenceNumber, - messages[0].messageId, - Internal.MessageExecutionState.SUCCESS, - "" - ); - - s_offRamp.executeSingleReport(_generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0)); - assertEq(startNonce + 2, s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender)); - } - - function test_UpgradedWithMultiRamp_Revert() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); - vm.expectEmit(); - emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - SOURCE_CHAIN_SELECTOR_1, - messages[0].sequenceNumber, - messages[0].messageId, - Internal.MessageExecutionState.SUCCESS, - "" - ); - s_offRamp.executeSingleReport(_generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0)); - - address prevOffRamp = address(s_offRamp); - _deployOffRamp(s_destRouter, s_mockRMN); - - EVM2EVMMultiOffRamp.SourceChainConfigArgs[] memory sourceChainConfigs = - new EVM2EVMMultiOffRamp.SourceChainConfigArgs[](1); - sourceChainConfigs[0] = EVM2EVMMultiOffRamp.SourceChainConfigArgs({ - sourceChainSelector: SOURCE_CHAIN_SELECTOR_1, - isEnabled: true, - prevOffRamp: address(prevOffRamp), - onRamp: ON_RAMP_ADDRESS_1 + return EVM2EVMMultiOffRamp.CommitReport({ + priceUpdates: getSingleTokenPriceUpdateStruct(s_sourceFeeToken, 4e18), + merkleRoots: roots }); - _setupMultipleOffRampsFromConfigs(sourceChainConfigs); - - vm.expectRevert(); - s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender); - - vm.expectRevert(); - s_offRamp.executeSingleReport(_generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[](0)); } } @@ -1283,13 +973,14 @@ contract EVM2EVMMultiOffRamp_executeSingleMessage is EVM2EVMMultiOffRampSetup { } function test_executeSingleMessage_NoTokens_Success() public { - Internal.EVM2EVMMessage memory message = + Internal.Any2EVMRampMessage memory message = _generateAny2EVMMessageNoTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 1); s_offRamp.executeSingleMessage(message, new bytes[](message.tokenAmounts.length)); } function test_executeSingleMessage_WithTokens_Success() public { - Internal.EVM2EVMMessage memory message = _generateMessagesWithTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)[0]; + Internal.Any2EVMRampMessage memory message = + _generateMessagesWithTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)[0]; bytes[] memory offchainTokenData = new bytes[](message.tokenAmounts.length); Internal.SourceTokenData memory sourceTokenData = abi.decode(message.sourceTokenData[0], (Internal.SourceTokenData)); @@ -1298,7 +989,7 @@ contract EVM2EVMMultiOffRamp_executeSingleMessage is EVM2EVMMultiOffRampSetup { abi.encodeWithSelector( LockReleaseTokenPool.releaseOrMint.selector, Pool.ReleaseOrMintInV1({ - originalSender: abi.encode(message.sender), + originalSender: message.sender, receiver: message.receiver, amount: message.tokenAmounts[0].amount, localToken: s_destTokenBySourceToken[message.tokenAmounts[0].token], @@ -1318,13 +1009,13 @@ contract EVM2EVMMultiOffRamp_executeSingleMessage is EVM2EVMMultiOffRampSetup { vm.startPrank(OWNER); _enableInboundMessageValidator(); vm.startPrank(address(s_offRamp)); - Internal.EVM2EVMMessage memory message = + Internal.Any2EVMRampMessage memory message = _generateAny2EVMMessageNoTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 1); s_offRamp.executeSingleMessage(message, new bytes[](message.tokenAmounts.length)); } function test_NonContract_Success() public { - Internal.EVM2EVMMessage memory message = + Internal.Any2EVMRampMessage memory message = _generateAny2EVMMessageNoTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 1); message.receiver = STRANGER; s_offRamp.executeSingleMessage(message, new bytes[](message.tokenAmounts.length)); @@ -1338,7 +1029,7 @@ contract EVM2EVMMultiOffRamp_executeSingleMessage is EVM2EVMMultiOffRampSetup { emit TokenPool.Released(address(s_offRamp), STRANGER, amounts[0]); vm.expectEmit(); emit TokenPool.Minted(address(s_offRamp), STRANGER, amounts[1]); - Internal.EVM2EVMMessage memory message = + Internal.Any2EVMRampMessage memory message = _generateAny2EVMMessageWithTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 1, amounts); message.receiver = STRANGER; s_offRamp.executeSingleMessage(message, new bytes[](message.tokenAmounts.length)); @@ -1353,7 +1044,7 @@ contract EVM2EVMMultiOffRamp_executeSingleMessage is EVM2EVMMultiOffRampSetup { bytes memory errorMessage = "Random token pool issue"; - Internal.EVM2EVMMessage memory message = + Internal.Any2EVMRampMessage memory message = _generateAny2EVMMessageWithTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 1, amounts); s_maybeRevertingPool.setShouldRevert(errorMessage); @@ -1363,7 +1054,7 @@ contract EVM2EVMMultiOffRamp_executeSingleMessage is EVM2EVMMultiOffRampSetup { } function test_ZeroGasDONExecution_Revert() public { - Internal.EVM2EVMMessage memory message = + Internal.Any2EVMRampMessage memory message = _generateAny2EVMMessageNoTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 1); message.gasLimit = 0; @@ -1374,7 +1065,7 @@ contract EVM2EVMMultiOffRamp_executeSingleMessage is EVM2EVMMultiOffRampSetup { function test_MessageSender_Revert() public { vm.stopPrank(); - Internal.EVM2EVMMessage memory message = + Internal.Any2EVMRampMessage memory message = _generateAny2EVMMessageNoTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 1); vm.expectRevert(EVM2EVMMultiOffRamp.CanOnlySelfCall.selector); s_offRamp.executeSingleMessage(message, new bytes[](message.tokenAmounts.length)); @@ -1385,9 +1076,9 @@ contract EVM2EVMMultiOffRamp_executeSingleMessage is EVM2EVMMultiOffRampSetup { vm.startPrank(OWNER); _enableInboundMessageValidator(); vm.startPrank(address(s_offRamp)); - Internal.EVM2EVMMessage memory message = + Internal.Any2EVMRampMessage memory message = _generateAny2EVMMessageNoTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 1); - s_inboundMessageValidator.setMessageIdValidationState(message.messageId, true); + s_inboundMessageValidator.setMessageIdValidationState(message.header.messageId, true); vm.expectRevert( abi.encodeWithSelector( IMessageInterceptor.MessageValidationError.selector, @@ -1403,15 +1094,15 @@ contract EVM2EVMMultiOffRamp_executeSingleMessage is EVM2EVMMultiOffRampSetup { _enableInboundMessageValidator(); vm.startPrank(address(s_offRamp)); - Internal.EVM2EVMMessage memory message = + Internal.Any2EVMRampMessage memory message = _generateAny2EVMMessageNoTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 1); // Setup the receiver to a non-CCIP Receiver, which will skip the Router call (but should still perform the validation) MaybeRevertMessageReceiverNo165 newReceiver = new MaybeRevertMessageReceiverNo165(true); message.receiver = address(newReceiver); - message.messageId = Internal._hash(message, s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); + message.header.messageId = Internal._hash(message, ON_RAMP_ADDRESS_1); - s_inboundMessageValidator.setMessageIdValidationState(message.messageId, true); + s_inboundMessageValidator.setMessageIdValidationState(message.header.messageId, true); vm.expectRevert( abi.encodeWithSelector( IMessageInterceptor.MessageValidationError.selector, @@ -1431,25 +1122,26 @@ contract EVM2EVMMultiOffRamp_batchExecute is EVM2EVMMultiOffRampSetup { } function test_SingleReport_Success() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - messages[0].sourceChainSelector, - messages[0].sequenceNumber, - messages[0].messageId, + messages[0].header.sourceChainSelector, + messages[0].header.sequenceNumber, + messages[0].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); - uint64 nonceBefore = s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender); + uint64 nonceBefore = s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender); s_offRamp.batchExecute(_generateBatchReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[][](1)); - assertGt(s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender), nonceBefore); + assertGt(s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender), nonceBefore); } function test_MultipleReportsSameChain_Success() public { - Internal.EVM2EVMMessage[] memory messages1 = new Internal.EVM2EVMMessage[](2); - Internal.EVM2EVMMessage[] memory messages2 = new Internal.EVM2EVMMessage[](1); + Internal.Any2EVMRampMessage[] memory messages1 = new Internal.Any2EVMRampMessage[](2); + Internal.Any2EVMRampMessage[] memory messages2 = new Internal.Any2EVMRampMessage[](1); messages1[0] = _generateAny2EVMMessageNoTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 1); messages1[1] = _generateAny2EVMMessageNoTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 2); @@ -1461,39 +1153,39 @@ contract EVM2EVMMultiOffRamp_batchExecute is EVM2EVMMultiOffRampSetup { vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - messages1[0].sourceChainSelector, - messages1[0].sequenceNumber, - messages1[0].messageId, + messages1[0].header.sourceChainSelector, + messages1[0].header.sequenceNumber, + messages1[0].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - messages1[1].sourceChainSelector, - messages1[1].sequenceNumber, - messages1[1].messageId, + messages1[1].header.sourceChainSelector, + messages1[1].header.sequenceNumber, + messages1[1].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - messages2[0].sourceChainSelector, - messages2[0].sequenceNumber, - messages2[0].messageId, + messages2[0].header.sourceChainSelector, + messages2[0].header.sequenceNumber, + messages2[0].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); - uint64 nonceBefore = s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, messages1[0].sender); + uint64 nonceBefore = s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messages1[0].sender); s_offRamp.batchExecute(reports, new uint256[][](2)); - assertGt(s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, messages1[0].sender), nonceBefore); + assertGt(s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messages1[0].sender), nonceBefore); } function test_MultipleReportsDifferentChains_Success() public { - Internal.EVM2EVMMessage[] memory messages1 = new Internal.EVM2EVMMessage[](2); - Internal.EVM2EVMMessage[] memory messages2 = new Internal.EVM2EVMMessage[](1); + Internal.Any2EVMRampMessage[] memory messages1 = new Internal.Any2EVMRampMessage[](2); + Internal.Any2EVMRampMessage[] memory messages2 = new Internal.Any2EVMRampMessage[](1); messages1[0] = _generateAny2EVMMessageNoTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 1); messages1[1] = _generateAny2EVMMessageNoTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 2); @@ -1505,35 +1197,35 @@ contract EVM2EVMMultiOffRamp_batchExecute is EVM2EVMMultiOffRampSetup { vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - messages1[0].sourceChainSelector, - messages1[0].sequenceNumber, - messages1[0].messageId, + messages1[0].header.sourceChainSelector, + messages1[0].header.sequenceNumber, + messages1[0].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - messages1[1].sourceChainSelector, - messages1[1].sequenceNumber, - messages1[1].messageId, + messages1[1].header.sourceChainSelector, + messages1[1].header.sequenceNumber, + messages1[1].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - messages2[0].sourceChainSelector, - messages2[0].sequenceNumber, - messages2[0].messageId, + messages2[0].header.sourceChainSelector, + messages2[0].header.sequenceNumber, + messages2[0].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); s_offRamp.batchExecute(reports, new uint256[][](2)); - uint64 nonceChain1 = s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, messages1[0].sender); - uint64 nonceChain3 = s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_3, messages2[0].sender); + uint64 nonceChain1 = s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messages1[0].sender); + uint64 nonceChain3 = s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_3, messages2[0].sender); assertTrue(nonceChain1 != nonceChain3); assertGt(nonceChain1, 0); @@ -1541,7 +1233,8 @@ contract EVM2EVMMultiOffRamp_batchExecute is EVM2EVMMultiOffRampSetup { } function test_MultipleReportsSkipDuplicate_Success() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); Internal.ExecutionReportSingleChain[] memory reports = new Internal.ExecutionReportSingleChain[](2); reports[0] = _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages); @@ -1549,15 +1242,15 @@ contract EVM2EVMMultiOffRamp_batchExecute is EVM2EVMMultiOffRampSetup { vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - messages[0].sourceChainSelector, - messages[0].sequenceNumber, - messages[0].messageId, + messages[0].header.sourceChainSelector, + messages[0].header.sequenceNumber, + messages[0].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); vm.expectEmit(); - emit EVM2EVMMultiOffRamp.SkippedAlreadyExecutedMessage(SOURCE_CHAIN_SELECTOR_1, messages[0].sequenceNumber); + emit EVM2EVMMultiOffRamp.SkippedAlreadyExecutedMessage(SOURCE_CHAIN_SELECTOR_1, messages[0].header.sequenceNumber); s_offRamp.batchExecute(reports, new uint256[][](2)); } @@ -1569,7 +1262,7 @@ contract EVM2EVMMultiOffRamp_batchExecute is EVM2EVMMultiOffRampSetup { } function test_Unhealthy_Revert() public { - s_mockRMN.voteToCurse(bytes16(type(uint128).max)); + s_mockRMN.setGlobalCursed(true); vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOffRamp.CursedByRMN.selector, SOURCE_CHAIN_SELECTOR_1)); s_offRamp.batchExecute( _generateBatchReportFromMessages( @@ -1578,9 +1271,7 @@ contract EVM2EVMMultiOffRamp_batchExecute is EVM2EVMMultiOffRampSetup { new uint256[][](1) ); // Uncurse should succeed - RMN.UnvoteToCurseRecord[] memory records = new RMN.UnvoteToCurseRecord[](1); - records[0] = RMN.UnvoteToCurseRecord({curseVoteAddr: OWNER, cursesHash: bytes32(uint256(0)), forceUnvote: true}); - s_mockRMN.ownerUnvoteToCurse(records); + s_mockRMN.setGlobalCursed(false); s_offRamp.batchExecute( _generateBatchReportFromMessages( SOURCE_CHAIN_SELECTOR_1, _generateMessagesWithTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1) @@ -1590,8 +1281,8 @@ contract EVM2EVMMultiOffRamp_batchExecute is EVM2EVMMultiOffRampSetup { } function test_OutOfBoundsGasLimitsAccess_Revert() public { - Internal.EVM2EVMMessage[] memory messages1 = new Internal.EVM2EVMMessage[](2); - Internal.EVM2EVMMessage[] memory messages2 = new Internal.EVM2EVMMessage[](1); + Internal.Any2EVMRampMessage[] memory messages1 = new Internal.Any2EVMRampMessage[](2); + Internal.Any2EVMRampMessage[] memory messages2 = new Internal.Any2EVMRampMessage[](1); messages1[0] = _generateAny2EVMMessageNoTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 1); messages1[1] = _generateAny2EVMMessageNoTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 2); @@ -1616,10 +1307,10 @@ contract EVM2EVMMultiOffRamp_manuallyExecute is EVM2EVMMultiOffRampSetup { } function test_manuallyExecute_Success() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); messages[0].receiver = address(s_reverting_receiver); - messages[0].messageId = - Internal._hash(messages[0], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); + messages[0].header.messageId = Internal._hash(messages[0], ON_RAMP_ADDRESS_1); s_offRamp.batchExecute(_generateBatchReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[][](1)); s_reverting_receiver.setRevert(false); @@ -1627,8 +1318,8 @@ contract EVM2EVMMultiOffRamp_manuallyExecute is EVM2EVMMultiOffRampSetup { vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( SOURCE_CHAIN_SELECTOR_1, - messages[0].sequenceNumber, - messages[0].messageId, + messages[0].header.sequenceNumber, + messages[0].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); @@ -1639,10 +1330,10 @@ contract EVM2EVMMultiOffRamp_manuallyExecute is EVM2EVMMultiOffRampSetup { } function test_manuallyExecute_WithGasOverride_Success() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); messages[0].receiver = address(s_reverting_receiver); - messages[0].messageId = - Internal._hash(messages[0], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); + messages[0].header.messageId = Internal._hash(messages[0], ON_RAMP_ADDRESS_1); s_offRamp.batchExecute(_generateBatchReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[][](1)); s_reverting_receiver.setRevert(false); @@ -1650,8 +1341,8 @@ contract EVM2EVMMultiOffRamp_manuallyExecute is EVM2EVMMultiOffRampSetup { vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( SOURCE_CHAIN_SELECTOR_1, - messages[0].sequenceNumber, - messages[0].messageId, + messages[0].header.sequenceNumber, + messages[0].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); @@ -1664,20 +1355,22 @@ contract EVM2EVMMultiOffRamp_manuallyExecute is EVM2EVMMultiOffRampSetup { } function test_manuallyExecute_DoesNotRevertIfUntouched_Success() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); messages[0].receiver = address(s_reverting_receiver); - messages[0].messageId = - Internal._hash(messages[0], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); + messages[0].header.messageId = Internal._hash(messages[0], ON_RAMP_ADDRESS_1); - assertEq(messages[0].nonce - 1, s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender)); + assertEq( + messages[0].header.nonce - 1, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender) + ); s_reverting_receiver.setRevert(true); vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( SOURCE_CHAIN_SELECTOR_1, - messages[0].sequenceNumber, - messages[0].messageId, + messages[0].header.sequenceNumber, + messages[0].header.messageId, Internal.MessageExecutionState.FAILURE, abi.encodeWithSelector( EVM2EVMMultiOffRamp.ReceiverError.selector, @@ -1690,25 +1383,25 @@ contract EVM2EVMMultiOffRamp_manuallyExecute is EVM2EVMMultiOffRampSetup { s_offRamp.manuallyExecute(_generateBatchReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), gasLimitOverrides); - assertEq(messages[0].nonce, s_offRamp.getSenderNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender)); + assertEq( + messages[0].header.nonce, s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, messages[0].sender) + ); } function test_manuallyExecute_WithMultiReportGasOverride_Success() public { - Internal.EVM2EVMMessage[] memory messages1 = new Internal.EVM2EVMMessage[](3); - Internal.EVM2EVMMessage[] memory messages2 = new Internal.EVM2EVMMessage[](2); + Internal.Any2EVMRampMessage[] memory messages1 = new Internal.Any2EVMRampMessage[](3); + Internal.Any2EVMRampMessage[] memory messages2 = new Internal.Any2EVMRampMessage[](2); for (uint64 i = 0; i < 3; ++i) { messages1[i] = _generateAny2EVMMessageNoTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, i + 1); messages1[i].receiver = address(s_reverting_receiver); - messages1[i].messageId = - Internal._hash(messages1[i], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); + messages1[i].header.messageId = Internal._hash(messages1[i], ON_RAMP_ADDRESS_1); } for (uint64 i = 0; i < 2; ++i) { messages2[i] = _generateAny2EVMMessageNoTokens(SOURCE_CHAIN_SELECTOR_3, ON_RAMP_ADDRESS_3, i + 1); messages2[i].receiver = address(s_reverting_receiver); - messages2[i].messageId = - Internal._hash(messages2[i], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_3, ON_RAMP_ADDRESS_3)); + messages2[i].header.messageId = Internal._hash(messages2[i], ON_RAMP_ADDRESS_3); } Internal.ExecutionReportSingleChain[] memory reports = new Internal.ExecutionReportSingleChain[](2); @@ -1727,8 +1420,8 @@ contract EVM2EVMMultiOffRamp_manuallyExecute is EVM2EVMMultiOffRampSetup { vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( SOURCE_CHAIN_SELECTOR_1, - messages1[i].sequenceNumber, - messages1[i].messageId, + messages1[i].header.sequenceNumber, + messages1[i].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); @@ -1740,8 +1433,8 @@ contract EVM2EVMMultiOffRamp_manuallyExecute is EVM2EVMMultiOffRampSetup { vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( SOURCE_CHAIN_SELECTOR_3, - messages2[i].sequenceNumber, - messages2[i].messageId, + messages2[i].header.sequenceNumber, + messages2[i].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); @@ -1753,20 +1446,19 @@ contract EVM2EVMMultiOffRamp_manuallyExecute is EVM2EVMMultiOffRampSetup { } function test_manuallyExecute_WithPartialMessages_Success() public { - Internal.EVM2EVMMessage[] memory messages = new Internal.EVM2EVMMessage[](3); + Internal.Any2EVMRampMessage[] memory messages = new Internal.Any2EVMRampMessage[](3); for (uint64 i = 0; i < 3; ++i) { messages[i] = _generateAny2EVMMessageNoTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, i + 1); } messages[1].receiver = address(s_reverting_receiver); - messages[1].messageId = - Internal._hash(messages[1], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); + messages[1].header.messageId = Internal._hash(messages[1], ON_RAMP_ADDRESS_1); vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( SOURCE_CHAIN_SELECTOR_1, - messages[0].sequenceNumber, - messages[0].messageId, + messages[0].header.sequenceNumber, + messages[0].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); @@ -1774,8 +1466,8 @@ contract EVM2EVMMultiOffRamp_manuallyExecute is EVM2EVMMultiOffRampSetup { vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( SOURCE_CHAIN_SELECTOR_1, - messages[1].sequenceNumber, - messages[1].messageId, + messages[1].header.sequenceNumber, + messages[1].header.messageId, Internal.MessageExecutionState.FAILURE, abi.encodeWithSelector( EVM2EVMMultiOffRamp.ReceiverError.selector, @@ -1786,8 +1478,8 @@ contract EVM2EVMMultiOffRamp_manuallyExecute is EVM2EVMMultiOffRampSetup { vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( SOURCE_CHAIN_SELECTOR_1, - messages[2].sequenceNumber, - messages[2].messageId, + messages[2].header.sequenceNumber, + messages[2].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); @@ -1797,7 +1489,7 @@ contract EVM2EVMMultiOffRamp_manuallyExecute is EVM2EVMMultiOffRampSetup { s_reverting_receiver.setRevert(false); // Only the 2nd message reverted - Internal.EVM2EVMMessage[] memory newMessages = new Internal.EVM2EVMMessage[](1); + Internal.Any2EVMRampMessage[] memory newMessages = new Internal.Any2EVMRampMessage[](1); newMessages[0] = messages[1]; uint256[][] memory gasLimitOverrides = new uint256[][](1); @@ -1807,8 +1499,8 @@ contract EVM2EVMMultiOffRamp_manuallyExecute is EVM2EVMMultiOffRampSetup { vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( SOURCE_CHAIN_SELECTOR_1, - newMessages[0].sequenceNumber, - newMessages[0].messageId, + newMessages[0].header.sequenceNumber, + newMessages[0].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); @@ -1817,17 +1509,17 @@ contract EVM2EVMMultiOffRamp_manuallyExecute is EVM2EVMMultiOffRampSetup { } function test_manuallyExecute_LowGasLimit_Success() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); messages[0].gasLimit = 1; messages[0].receiver = address(new ConformingReceiver(address(s_destRouter), s_destFeeToken)); - messages[0].messageId = - Internal._hash(messages[0], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); + messages[0].header.messageId = Internal._hash(messages[0], ON_RAMP_ADDRESS_1); vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( SOURCE_CHAIN_SELECTOR_1, - messages[0].sequenceNumber, - messages[0].messageId, + messages[0].header.sequenceNumber, + messages[0].header.messageId, Internal.MessageExecutionState.FAILURE, abi.encodeWithSelector(EVM2EVMMultiOffRamp.ReceiverError.selector, "") ); @@ -1843,8 +1535,8 @@ contract EVM2EVMMultiOffRamp_manuallyExecute is EVM2EVMMultiOffRampSetup { vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( SOURCE_CHAIN_SELECTOR_1, - messages[0].sequenceNumber, - messages[0].messageId, + messages[0].header.sequenceNumber, + messages[0].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); @@ -1854,7 +1546,8 @@ contract EVM2EVMMultiOffRamp_manuallyExecute is EVM2EVMMultiOffRampSetup { // Reverts function test_manuallyExecute_ForkedChain_Revert() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); Internal.ExecutionReportSingleChain[] memory reports = _generateBatchReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages); @@ -1870,7 +1563,7 @@ contract EVM2EVMMultiOffRamp_manuallyExecute is EVM2EVMMultiOffRampSetup { } function test_ManualExecGasLimitMismatchSingleReport_Revert() public { - Internal.EVM2EVMMessage[] memory messages = new Internal.EVM2EVMMessage[](2); + Internal.Any2EVMRampMessage[] memory messages = new Internal.Any2EVMRampMessage[](2); messages[0] = _generateAny2EVMMessageNoTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 1); messages[1] = _generateAny2EVMMessageNoTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 2); @@ -1901,8 +1594,8 @@ contract EVM2EVMMultiOffRamp_manuallyExecute is EVM2EVMMultiOffRampSetup { } function test_manuallyExecute_GasLimitMismatchMultipleReports_Revert() public { - Internal.EVM2EVMMessage[] memory messages1 = new Internal.EVM2EVMMessage[](2); - Internal.EVM2EVMMessage[] memory messages2 = new Internal.EVM2EVMMessage[](1); + Internal.Any2EVMRampMessage[] memory messages1 = new Internal.Any2EVMRampMessage[](2); + Internal.Any2EVMRampMessage[] memory messages2 = new Internal.Any2EVMRampMessage[](1); messages1[0] = _generateAny2EVMMessageNoTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 1); messages1[1] = _generateAny2EVMMessageNoTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 2); @@ -1944,7 +1637,8 @@ contract EVM2EVMMultiOffRamp_manuallyExecute is EVM2EVMMultiOffRampSetup { } function test_ManualExecInvalidGasLimit_Revert() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); uint256[][] memory gasLimitOverrides = new uint256[][](1); gasLimitOverrides[0] = _getGasLimitsFromMessages(messages); @@ -1959,11 +1653,11 @@ contract EVM2EVMMultiOffRamp_manuallyExecute is EVM2EVMMultiOffRampSetup { } function test_manuallyExecute_FailedTx_Revert() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); messages[0].receiver = address(s_reverting_receiver); - messages[0].messageId = - Internal._hash(messages[0], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); + messages[0].header.messageId = Internal._hash(messages[0], ON_RAMP_ADDRESS_1); s_offRamp.batchExecute(_generateBatchReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages), new uint256[][](1)); @@ -1975,7 +1669,7 @@ contract EVM2EVMMultiOffRamp_manuallyExecute is EVM2EVMMultiOffRampSetup { vm.expectRevert( abi.encodeWithSelector( EVM2EVMMultiOffRamp.ExecutionError.selector, - messages[0].messageId, + messages[0].header.messageId, abi.encodeWithSelector( EVM2EVMMultiOffRamp.ReceiverError.selector, abi.encodeWithSelector(MaybeRevertMessageReceiver.CustomError.selector, bytes("")) @@ -1997,10 +1691,10 @@ contract EVM2EVMMultiOffRamp_manuallyExecute is EVM2EVMMultiOffRampSetup { // For this test any message will be flagged as correct by the // commitStore. In a real scenario the abuser would have to actually // send the message that they want to replay. - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); messages[0].tokenAmounts = new Client.EVMTokenAmount[](1); messages[0].tokenAmounts[0] = Client.EVMTokenAmount({token: s_sourceFeeToken, amount: tokenAmount}); - messages[0].receiver = address(receiver); messages[0].sourceTokenData = new bytes[](1); messages[0].sourceTokenData[0] = abi.encode( Internal.SourceTokenData({ @@ -2010,8 +1704,9 @@ contract EVM2EVMMultiOffRamp_manuallyExecute is EVM2EVMMultiOffRampSetup { }) ); - messages[0].messageId = - Internal._hash(messages[0], s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1)); + messages[0].receiver = address(receiver); + + messages[0].header.messageId = Internal._hash(messages[0], ON_RAMP_ADDRESS_1); Internal.ExecutionReportSingleChain memory report = _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages); @@ -2026,14 +1721,16 @@ contract EVM2EVMMultiOffRamp_manuallyExecute is EVM2EVMMultiOffRampSetup { // This means the first tx is marked `FAILURE` with the error message of the second tx. vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - messages[0].sourceChainSelector, - messages[0].sequenceNumber, - messages[0].messageId, + messages[0].header.sourceChainSelector, + messages[0].header.sequenceNumber, + messages[0].header.messageId, Internal.MessageExecutionState.FAILURE, abi.encodeWithSelector( EVM2EVMMultiOffRamp.ReceiverError.selector, abi.encodeWithSelector( - EVM2EVMMultiOffRamp.AlreadyExecuted.selector, messages[0].sourceChainSelector, messages[0].sequenceNumber + EVM2EVMMultiOffRamp.AlreadyExecuted.selector, + messages[0].header.sourceChainSelector, + messages[0].header.sequenceNumber ) ) ); @@ -2054,15 +1751,16 @@ contract EVM2EVMMultiOffRamp_execute is EVM2EVMMultiOffRampSetup { // Asserts that execute completes function test_SingleReport_Success() public { - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); Internal.ExecutionReportSingleChain[] memory reports = _generateBatchReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages); vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( SOURCE_CHAIN_SELECTOR_1, - messages[0].sequenceNumber, - messages[0].messageId, + messages[0].header.sequenceNumber, + messages[0].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); @@ -2076,8 +1774,8 @@ contract EVM2EVMMultiOffRamp_execute is EVM2EVMMultiOffRampSetup { } function test_MultipleReports_Success() public { - Internal.EVM2EVMMessage[] memory messages1 = new Internal.EVM2EVMMessage[](2); - Internal.EVM2EVMMessage[] memory messages2 = new Internal.EVM2EVMMessage[](1); + Internal.Any2EVMRampMessage[] memory messages1 = new Internal.Any2EVMRampMessage[](2); + Internal.Any2EVMRampMessage[] memory messages2 = new Internal.Any2EVMRampMessage[](1); messages1[0] = _generateAny2EVMMessageNoTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 1); messages1[1] = _generateAny2EVMMessageNoTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 2); @@ -2089,27 +1787,27 @@ contract EVM2EVMMultiOffRamp_execute is EVM2EVMMultiOffRampSetup { vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - messages1[0].sourceChainSelector, - messages1[0].sequenceNumber, - messages1[0].messageId, + messages1[0].header.sourceChainSelector, + messages1[0].header.sequenceNumber, + messages1[0].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - messages1[1].sourceChainSelector, - messages1[1].sequenceNumber, - messages1[1].messageId, + messages1[1].header.sourceChainSelector, + messages1[1].header.sequenceNumber, + messages1[1].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - messages2[0].sourceChainSelector, - messages2[0].sequenceNumber, - messages2[0].messageId, + messages2[0].header.sourceChainSelector, + messages2[0].header.sequenceNumber, + messages2[0].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); @@ -2125,7 +1823,7 @@ contract EVM2EVMMultiOffRamp_execute is EVM2EVMMultiOffRampSetup { function test_LargeBatch_Success() public { Internal.ExecutionReportSingleChain[] memory reports = new Internal.ExecutionReportSingleChain[](10); for (uint64 i = 0; i < reports.length; ++i) { - Internal.EVM2EVMMessage[] memory messages = new Internal.EVM2EVMMessage[](3); + Internal.Any2EVMRampMessage[] memory messages = new Internal.Any2EVMRampMessage[](3); messages[0] = _generateAny2EVMMessageNoTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 1 + i * 3); messages[1] = _generateAny2EVMMessageNoTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 2 + i * 3); messages[2] = _generateAny2EVMMessageNoTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 3 + i * 3); @@ -2137,9 +1835,9 @@ contract EVM2EVMMultiOffRamp_execute is EVM2EVMMultiOffRampSetup { for (uint64 j = 0; j < reports[i].messages.length; ++j) { vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - reports[i].messages[j].sourceChainSelector, - reports[i].messages[j].sequenceNumber, - reports[i].messages[j].messageId, + reports[i].messages[j].header.sourceChainSelector, + reports[i].messages[j].header.sequenceNumber, + reports[i].messages[j].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); @@ -2157,8 +1855,8 @@ contract EVM2EVMMultiOffRamp_execute is EVM2EVMMultiOffRampSetup { function test_MultipleReportsWithPartialValidationFailures_Success() public { _enableInboundMessageValidator(); - Internal.EVM2EVMMessage[] memory messages1 = new Internal.EVM2EVMMessage[](2); - Internal.EVM2EVMMessage[] memory messages2 = new Internal.EVM2EVMMessage[](1); + Internal.Any2EVMRampMessage[] memory messages1 = new Internal.Any2EVMRampMessage[](2); + Internal.Any2EVMRampMessage[] memory messages2 = new Internal.Any2EVMRampMessage[](1); messages1[0] = _generateAny2EVMMessageNoTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 1); messages1[1] = _generateAny2EVMMessageNoTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 2); @@ -2168,14 +1866,14 @@ contract EVM2EVMMultiOffRamp_execute is EVM2EVMMultiOffRampSetup { reports[0] = _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages1); reports[1] = _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages2); - s_inboundMessageValidator.setMessageIdValidationState(messages1[0].messageId, true); - s_inboundMessageValidator.setMessageIdValidationState(messages2[0].messageId, true); + s_inboundMessageValidator.setMessageIdValidationState(messages1[0].header.messageId, true); + s_inboundMessageValidator.setMessageIdValidationState(messages2[0].header.messageId, true); vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - messages1[0].sourceChainSelector, - messages1[0].sequenceNumber, - messages1[0].messageId, + messages1[0].header.sourceChainSelector, + messages1[0].header.sequenceNumber, + messages1[0].header.messageId, Internal.MessageExecutionState.FAILURE, abi.encodeWithSelector( IMessageInterceptor.MessageValidationError.selector, @@ -2185,18 +1883,18 @@ contract EVM2EVMMultiOffRamp_execute is EVM2EVMMultiOffRampSetup { vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - messages1[1].sourceChainSelector, - messages1[1].sequenceNumber, - messages1[1].messageId, + messages1[1].header.sourceChainSelector, + messages1[1].header.sequenceNumber, + messages1[1].header.messageId, Internal.MessageExecutionState.SUCCESS, "" ); vm.expectEmit(); emit EVM2EVMMultiOffRamp.ExecutionStateChanged( - messages2[0].sourceChainSelector, - messages2[0].sequenceNumber, - messages2[0].messageId, + messages2[0].header.sourceChainSelector, + messages2[0].header.sequenceNumber, + messages2[0].header.messageId, Internal.MessageExecutionState.FAILURE, abi.encodeWithSelector( IMessageInterceptor.MessageValidationError.selector, @@ -2217,7 +1915,8 @@ contract EVM2EVMMultiOffRamp_execute is EVM2EVMMultiOffRampSetup { function test_UnauthorizedTransmitter_Revert() public { bytes32[3] memory reportContext = [s_configDigestExec, s_configDigestExec, s_configDigestExec]; - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); Internal.ExecutionReportSingleChain[] memory reports = _generateBatchReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages); @@ -2229,7 +1928,8 @@ contract EVM2EVMMultiOffRamp_execute is EVM2EVMMultiOffRampSetup { _redeployOffRampWithNoOCRConfigs(); s_offRamp.setVerifyOverrideResult(SOURCE_CHAIN_SELECTOR_1, 1); - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); Internal.ExecutionReportSingleChain[] memory reports = _generateBatchReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages); @@ -2255,7 +1955,8 @@ contract EVM2EVMMultiOffRamp_execute is EVM2EVMMultiOffRampSetup { }); s_offRamp.setOCR3Configs(ocrConfigs); - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); Internal.ExecutionReportSingleChain[] memory reports = _generateBatchReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages); @@ -2283,7 +1984,8 @@ contract EVM2EVMMultiOffRamp_execute is EVM2EVMMultiOffRampSetup { }); s_offRamp.setOCR3Configs(ocrConfigs); - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); Internal.ExecutionReportSingleChain[] memory reports = _generateBatchReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages); @@ -2312,7 +2014,8 @@ contract EVM2EVMMultiOffRamp_execute is EVM2EVMMultiOffRampSetup { function test_NonArray_Revert() public { bytes32[3] memory reportContext = [s_configDigestExec, s_configDigestExec, s_configDigestExec]; - Internal.EVM2EVMMessage[] memory messages = _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); + Internal.Any2EVMRampMessage[] memory messages = + _generateSingleBasicMessage(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1); Internal.ExecutionReportSingleChain memory report = _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages); vm.startPrank(s_validTransmitters[0]); @@ -2484,7 +2187,7 @@ contract EVM2EVMMultiOffRamp_trialExecute is EVM2EVMMultiOffRampSetup { amounts[0] = 1000; amounts[1] = 50; - Internal.EVM2EVMMessage memory message = + Internal.Any2EVMRampMessage memory message = _generateAny2EVMMessageWithTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 1, amounts); IERC20 dstToken0 = IERC20(s_destTokens[0]); uint256 startingBalance = dstToken0.balanceOf(message.receiver); @@ -2508,7 +2211,7 @@ contract EVM2EVMMultiOffRamp_trialExecute is EVM2EVMMultiOffRampSetup { bytes memory errorMessage = "Random token pool issue"; - Internal.EVM2EVMMessage memory message = + Internal.Any2EVMRampMessage memory message = _generateAny2EVMMessageWithTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 1, amounts); s_maybeRevertingPool.setShouldRevert(errorMessage); @@ -2528,7 +2231,7 @@ contract EVM2EVMMultiOffRamp_trialExecute is EVM2EVMMultiOffRampSetup { bytes memory errorMessage = abi.encodeWithSelector(RateLimiter.BucketOverfilled.selector); - Internal.EVM2EVMMessage memory message = + Internal.Any2EVMRampMessage memory message = _generateAny2EVMMessageWithTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 1, amounts); s_maybeRevertingPool.setShouldRevert(errorMessage); @@ -2542,7 +2245,7 @@ contract EVM2EVMMultiOffRamp_trialExecute is EVM2EVMMultiOffRampSetup { function test_TokenPoolIsNotAContract_Success() public { uint256[] memory amounts = new uint256[](2); amounts[0] = 10000; - Internal.EVM2EVMMessage memory message = + Internal.Any2EVMRampMessage memory message = _generateAny2EVMMessageWithTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 1, amounts); // Happy path, pool is correct @@ -2562,12 +2265,7 @@ contract EVM2EVMMultiOffRamp_trialExecute is EVM2EVMMultiOffRampSetup { }) ); - message.messageId = Internal._hash( - message, - keccak256( - abi.encode(Internal.EVM_2_EVM_MESSAGE_HASH, SOURCE_CHAIN_SELECTOR_1, DEST_CHAIN_SELECTOR, ON_RAMP_ADDRESS_1) - ) - ); + message.header.messageId = Internal._hash(message, ON_RAMP_ADDRESS_1); // Unhappy path, no revert but marked as failed. (newState, err) = s_offRamp.trialExecute(message, new bytes[](message.tokenAmounts.length)); @@ -2585,12 +2283,7 @@ contract EVM2EVMMultiOffRamp_trialExecute is EVM2EVMMultiOffRampSetup { }) ); - message.messageId = Internal._hash( - message, - keccak256( - abi.encode(Internal.EVM_2_EVM_MESSAGE_HASH, SOURCE_CHAIN_SELECTOR_1, DEST_CHAIN_SELECTOR, ON_RAMP_ADDRESS_1) - ) - ); + message.header.messageId = Internal._hash(message, ON_RAMP_ADDRESS_1); (newState, err) = s_offRamp.trialExecute(message, new bytes[](message.tokenAmounts.length)); @@ -2985,19 +2678,13 @@ contract EVM2EVMMultiOffRamp_applySourceChainConfigUpdates is EVM2EVMMultiOffRam new EVM2EVMMultiOffRamp.SourceChainConfigArgs[](1); sourceChainConfigs[0] = EVM2EVMMultiOffRamp.SourceChainConfigArgs({ sourceChainSelector: SOURCE_CHAIN_SELECTOR_1, - isEnabled: true, - prevOffRamp: address(0), - onRamp: ON_RAMP_ADDRESS_1 - }); - - EVM2EVMMultiOffRamp.SourceChainConfig memory expectedSourceChainConfig = EVM2EVMMultiOffRamp.SourceChainConfig({ - isEnabled: true, - minSeqNr: 1, - prevOffRamp: address(0), onRamp: ON_RAMP_ADDRESS_1, - metadataHash: s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1) + isEnabled: true }); + EVM2EVMMultiOffRamp.SourceChainConfig memory expectedSourceChainConfig = + EVM2EVMMultiOffRamp.SourceChainConfig({isEnabled: true, minSeqNr: 1, onRamp: ON_RAMP_ADDRESS_1}); + vm.expectEmit(); emit EVM2EVMMultiOffRamp.SourceChainSelectorAdded(SOURCE_CHAIN_SELECTOR_1); @@ -3014,21 +2701,15 @@ contract EVM2EVMMultiOffRamp_applySourceChainConfigUpdates is EVM2EVMMultiOffRam new EVM2EVMMultiOffRamp.SourceChainConfigArgs[](1); sourceChainConfigs[0] = EVM2EVMMultiOffRamp.SourceChainConfigArgs({ sourceChainSelector: SOURCE_CHAIN_SELECTOR_1, - isEnabled: true, - prevOffRamp: address(0), - onRamp: ON_RAMP_ADDRESS_1 + onRamp: ON_RAMP_ADDRESS_1, + isEnabled: true }); s_offRamp.applySourceChainConfigUpdates(sourceChainConfigs); sourceChainConfigs[0].isEnabled = false; - EVM2EVMMultiOffRamp.SourceChainConfig memory expectedSourceChainConfig = EVM2EVMMultiOffRamp.SourceChainConfig({ - isEnabled: false, - minSeqNr: 1, - prevOffRamp: address(0), - onRamp: sourceChainConfigs[0].onRamp, - metadataHash: s_offRamp.metadataHash(SOURCE_CHAIN_SELECTOR_1, sourceChainConfigs[0].onRamp) - }); + EVM2EVMMultiOffRamp.SourceChainConfig memory expectedSourceChainConfig = + EVM2EVMMultiOffRamp.SourceChainConfig({isEnabled: false, minSeqNr: 1, onRamp: ON_RAMP_ADDRESS_1}); vm.expectEmit(); emit EVM2EVMMultiOffRamp.SourceChainConfigSet(SOURCE_CHAIN_SELECTOR_1, expectedSourceChainConfig); @@ -3052,21 +2733,18 @@ contract EVM2EVMMultiOffRamp_applySourceChainConfigUpdates is EVM2EVMMultiOffRam new EVM2EVMMultiOffRamp.SourceChainConfigArgs[](3); sourceChainConfigs[0] = EVM2EVMMultiOffRamp.SourceChainConfigArgs({ sourceChainSelector: SOURCE_CHAIN_SELECTOR_1, - isEnabled: true, - prevOffRamp: address(0), - onRamp: ON_RAMP_ADDRESS_1 + onRamp: abi.encode(ON_RAMP_ADDRESS_1, 0), + isEnabled: true }); sourceChainConfigs[1] = EVM2EVMMultiOffRamp.SourceChainConfigArgs({ sourceChainSelector: SOURCE_CHAIN_SELECTOR_1 + 1, - isEnabled: false, - prevOffRamp: address(999), - onRamp: address(uint160(ON_RAMP_ADDRESS_1) + 7) + onRamp: abi.encode(ON_RAMP_ADDRESS_1, 1), + isEnabled: false }); sourceChainConfigs[2] = EVM2EVMMultiOffRamp.SourceChainConfigArgs({ sourceChainSelector: SOURCE_CHAIN_SELECTOR_1 + 2, - isEnabled: true, - prevOffRamp: address(1000), - onRamp: address(uint160(ON_RAMP_ADDRESS_1) + 42) + onRamp: abi.encode(ON_RAMP_ADDRESS_1, 2), + isEnabled: true }); EVM2EVMMultiOffRamp.SourceChainConfig[] memory expectedSourceChainConfigs = @@ -3075,9 +2753,7 @@ contract EVM2EVMMultiOffRamp_applySourceChainConfigUpdates is EVM2EVMMultiOffRam expectedSourceChainConfigs[i] = EVM2EVMMultiOffRamp.SourceChainConfig({ isEnabled: sourceChainConfigs[i].isEnabled, minSeqNr: 1, - prevOffRamp: sourceChainConfigs[i].prevOffRamp, - onRamp: sourceChainConfigs[i].onRamp, - metadataHash: s_offRamp.metadataHash(sourceChainConfigs[i].sourceChainSelector, sourceChainConfigs[i].onRamp) + onRamp: abi.encode(ON_RAMP_ADDRESS_1, i) }); vm.expectEmit(); @@ -3091,15 +2767,10 @@ contract EVM2EVMMultiOffRamp_applySourceChainConfigUpdates is EVM2EVMMultiOffRam s_offRamp.applySourceChainConfigUpdates(sourceChainConfigs); - // uint64[] memory resultSourceChainSelectors = s_offRamp.getSourceChainSelectors(); - // assertEq(resultSourceChainSelectors.length, 3); - for (uint256 i = 0; i < 3; ++i) { _assertSourceChainConfigEquality( s_offRamp.getSourceChainConfig(sourceChainConfigs[i].sourceChainSelector), expectedSourceChainConfigs[i] ); - - // assertEq(resultSourceChainSelectors[i], sourceChainConfigs[i].sourceChainSelector); } } @@ -3108,32 +2779,27 @@ contract EVM2EVMMultiOffRamp_applySourceChainConfigUpdates is EVM2EVMMultiOffRam ) public { // Skip invalid inputs vm.assume(sourceChainConfigArgs.sourceChainSelector != 0); - vm.assume(sourceChainConfigArgs.onRamp != address(0)); + vm.assume(sourceChainConfigArgs.onRamp.length != 0); EVM2EVMMultiOffRamp.SourceChainConfigArgs[] memory sourceChainConfigs = new EVM2EVMMultiOffRamp.SourceChainConfigArgs[](2); sourceChainConfigs[0] = EVM2EVMMultiOffRamp.SourceChainConfigArgs({ sourceChainSelector: SOURCE_CHAIN_SELECTOR_1, - isEnabled: true, - prevOffRamp: address(42), - onRamp: ON_RAMP_ADDRESS_1 + onRamp: ON_RAMP_ADDRESS_1, + isEnabled: true }); sourceChainConfigs[1] = sourceChainConfigArgs; // Handle cases when an update occurs - bool isNewChain = true; - if (sourceChainConfigs[1].sourceChainSelector == SOURCE_CHAIN_SELECTOR_1) { - sourceChainConfigs[1].prevOffRamp = sourceChainConfigs[0].prevOffRamp; + bool isNewChain = sourceChainConfigs[1].sourceChainSelector != SOURCE_CHAIN_SELECTOR_1; + if (!isNewChain) { sourceChainConfigs[1].onRamp = sourceChainConfigs[0].onRamp; - isNewChain = false; } EVM2EVMMultiOffRamp.SourceChainConfig memory expectedSourceChainConfig = EVM2EVMMultiOffRamp.SourceChainConfig({ isEnabled: sourceChainConfigArgs.isEnabled, minSeqNr: 1, - prevOffRamp: sourceChainConfigArgs.prevOffRamp, - onRamp: sourceChainConfigArgs.onRamp, - metadataHash: s_offRamp.metadataHash(sourceChainConfigArgs.sourceChainSelector, sourceChainConfigArgs.onRamp) + onRamp: sourceChainConfigArgs.onRamp }); if (isNewChain) { @@ -3158,9 +2824,8 @@ contract EVM2EVMMultiOffRamp_applySourceChainConfigUpdates is EVM2EVMMultiOffRam new EVM2EVMMultiOffRamp.SourceChainConfigArgs[](1); sourceChainConfigs[0] = EVM2EVMMultiOffRamp.SourceChainConfigArgs({ sourceChainSelector: SOURCE_CHAIN_SELECTOR_1, - isEnabled: true, - prevOffRamp: address(0), - onRamp: address(0) + onRamp: new bytes(0), + isEnabled: true }); vm.expectRevert(EVM2EVMMultiOffRamp.ZeroAddressNotAllowed.selector); @@ -3170,12 +2835,8 @@ contract EVM2EVMMultiOffRamp_applySourceChainConfigUpdates is EVM2EVMMultiOffRam function test_ZeroSourceChainSelector_Revert() public { EVM2EVMMultiOffRamp.SourceChainConfigArgs[] memory sourceChainConfigs = new EVM2EVMMultiOffRamp.SourceChainConfigArgs[](1); - sourceChainConfigs[0] = EVM2EVMMultiOffRamp.SourceChainConfigArgs({ - sourceChainSelector: 0, - isEnabled: true, - prevOffRamp: address(0), - onRamp: ON_RAMP_ADDRESS_1 - }); + sourceChainConfigs[0] = + EVM2EVMMultiOffRamp.SourceChainConfigArgs({sourceChainSelector: 0, onRamp: ON_RAMP_ADDRESS_1, isEnabled: true}); vm.expectRevert(EVM2EVMMultiOffRamp.ZeroChainSelectorNotAllowed.selector); s_offRamp.applySourceChainConfigUpdates(sourceChainConfigs); @@ -3186,51 +2847,13 @@ contract EVM2EVMMultiOffRamp_applySourceChainConfigUpdates is EVM2EVMMultiOffRam new EVM2EVMMultiOffRamp.SourceChainConfigArgs[](1); sourceChainConfigs[0] = EVM2EVMMultiOffRamp.SourceChainConfigArgs({ sourceChainSelector: SOURCE_CHAIN_SELECTOR_1, - isEnabled: true, - prevOffRamp: address(0), - onRamp: ON_RAMP_ADDRESS_1 - }); - - s_offRamp.applySourceChainConfigUpdates(sourceChainConfigs); - - sourceChainConfigs[0].onRamp = address(uint160(sourceChainConfigs[0].onRamp) + 1); - - vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOffRamp.InvalidStaticConfig.selector, SOURCE_CHAIN_SELECTOR_1)); - s_offRamp.applySourceChainConfigUpdates(sourceChainConfigs); - } - - function test_ReplaceExistingChainPrevOffRamp_Revert() public { - EVM2EVMMultiOffRamp.SourceChainConfigArgs[] memory sourceChainConfigs = - new EVM2EVMMultiOffRamp.SourceChainConfigArgs[](1); - sourceChainConfigs[0] = EVM2EVMMultiOffRamp.SourceChainConfigArgs({ - sourceChainSelector: SOURCE_CHAIN_SELECTOR_1, - isEnabled: true, - prevOffRamp: address(0), - onRamp: ON_RAMP_ADDRESS_1 - }); - - s_offRamp.applySourceChainConfigUpdates(sourceChainConfigs); - - sourceChainConfigs[0].prevOffRamp = address(uint160(sourceChainConfigs[0].prevOffRamp) + 1); - - vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOffRamp.InvalidStaticConfig.selector, SOURCE_CHAIN_SELECTOR_1)); - s_offRamp.applySourceChainConfigUpdates(sourceChainConfigs); - } - - function test_ReplaceExistingChainOnRampAndPrevOffRamp_Revert() public { - EVM2EVMMultiOffRamp.SourceChainConfigArgs[] memory sourceChainConfigs = - new EVM2EVMMultiOffRamp.SourceChainConfigArgs[](1); - sourceChainConfigs[0] = EVM2EVMMultiOffRamp.SourceChainConfigArgs({ - sourceChainSelector: SOURCE_CHAIN_SELECTOR_1, - isEnabled: true, - prevOffRamp: address(0), - onRamp: ON_RAMP_ADDRESS_1 + onRamp: ON_RAMP_ADDRESS_1, + isEnabled: true }); s_offRamp.applySourceChainConfigUpdates(sourceChainConfigs); - sourceChainConfigs[0].onRamp = address(uint160(sourceChainConfigs[0].onRamp) + 1); - sourceChainConfigs[0].prevOffRamp = address(uint160(sourceChainConfigs[0].prevOffRamp) + 1); + sourceChainConfigs[0].onRamp = ON_RAMP_ADDRESS_2; vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOffRamp.InvalidStaticConfig.selector, SOURCE_CHAIN_SELECTOR_1)); s_offRamp.applySourceChainConfigUpdates(sourceChainConfigs); @@ -3533,7 +3156,7 @@ contract EVM2EVMMultiOffRamp_commit is EVM2EVMMultiOffRampSetup { } function test_Unhealthy_Revert() public { - s_mockRMN.voteToCurse(0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); + s_mockRMN.setGlobalCursed(true); EVM2EVMMultiOffRamp.MerkleRoot[] memory roots = new EVM2EVMMultiOffRamp.MerkleRoot[](1); roots[0] = EVM2EVMMultiOffRamp.MerkleRoot({ sourceChainSelector: SOURCE_CHAIN_SELECTOR_1, @@ -3678,7 +3301,7 @@ contract EVM2EVMMultiOffRamp_resetUnblessedRoots is EVM2EVMMultiOffRampSetup { function setUp() public virtual override { super.setUp(); _setupRealRMN(); - _deployOffRamp(s_destRouter, s_realRMN); + _deployOffRamp(s_destRouter, s_realRMN, s_inboundNonceManager); _setupMultipleOffRamps(); } @@ -3744,7 +3367,7 @@ contract EVM2EVMMultiOffRamp_verify is EVM2EVMMultiOffRampSetup { function setUp() public virtual override { super.setUp(); _setupRealRMN(); - _deployOffRamp(s_destRouter, s_realRMN); + _deployOffRamp(s_destRouter, s_realRMN, s_inboundNonceManager); _setupMultipleOffRamps(); } diff --git a/contracts/src/v0.8/ccip/test/offRamp/EVM2EVMMultiOffRampSetup.t.sol b/contracts/src/v0.8/ccip/test/offRamp/EVM2EVMMultiOffRampSetup.t.sol index 4e35e5241c..7355d6a072 100644 --- a/contracts/src/v0.8/ccip/test/offRamp/EVM2EVMMultiOffRampSetup.t.sol +++ b/contracts/src/v0.8/ccip/test/offRamp/EVM2EVMMultiOffRampSetup.t.sol @@ -8,11 +8,11 @@ import {ICommitStore} from "../../interfaces/ICommitStore.sol"; import {IRMN} from "../../interfaces/IRMN.sol"; import {AuthorizedCallers} from "../../../shared/access/AuthorizedCallers.sol"; +import {NonceManager} from "../../NonceManager.sol"; import {RMN} from "../../RMN.sol"; import {Router} from "../../Router.sol"; import {Client} from "../../libraries/Client.sol"; import {Internal} from "../../libraries/Internal.sol"; - import {MultiOCR3Base} from "../../ocr/MultiOCR3Base.sol"; import {EVM2EVMMultiOffRamp} from "../../offRamp/EVM2EVMMultiOffRamp.sol"; import {EVM2EVMOffRamp} from "../../offRamp/EVM2EVMOffRamp.sol"; @@ -22,7 +22,6 @@ import {TokenSetup} from "../TokenSetup.t.sol"; import {EVM2EVMMultiOffRampHelper} from "../helpers/EVM2EVMMultiOffRampHelper.sol"; import {EVM2EVMOffRampHelper} from "../helpers/EVM2EVMOffRampHelper.sol"; import {MaybeRevertingBurnMintTokenPool} from "../helpers/MaybeRevertingBurnMintTokenPool.sol"; - import {MessageInterceptorHelper} from "../helpers/MessageInterceptorHelper.sol"; import {MaybeRevertMessageReceiver} from "../helpers/receivers/MaybeRevertMessageReceiver.sol"; import {MockCommitStore} from "../mocks/MockCommitStore.sol"; @@ -36,9 +35,9 @@ contract EVM2EVMMultiOffRampSetup is TokenSetup, PriceRegistrySetup, MultiOCR3Ba uint64 internal constant SOURCE_CHAIN_SELECTOR_2 = 6433500567565415381; uint64 internal constant SOURCE_CHAIN_SELECTOR_3 = 4051577828743386545; - address internal constant ON_RAMP_ADDRESS_1 = ON_RAMP_ADDRESS; - address internal constant ON_RAMP_ADDRESS_2 = 0xaA3f843Cf8E33B1F02dd28303b6bD87B1aBF8AE4; - address internal constant ON_RAMP_ADDRESS_3 = 0x71830C37Cb193e820de488Da111cfbFcC680a1b9; + bytes internal constant ON_RAMP_ADDRESS_1 = abi.encode(ON_RAMP_ADDRESS); + bytes internal constant ON_RAMP_ADDRESS_2 = abi.encode(0xaA3f843Cf8E33B1F02dd28303b6bD87B1aBF8AE4); + bytes internal constant ON_RAMP_ADDRESS_3 = abi.encode(0x71830C37Cb193e820de488Da111cfbFcC680a1b9); address internal constant BLESS_VOTE_ADDR = address(8888); @@ -50,6 +49,7 @@ contract EVM2EVMMultiOffRampSetup is TokenSetup, PriceRegistrySetup, MultiOCR3Ba EVM2EVMMultiOffRampHelper internal s_offRamp; MessageInterceptorHelper internal s_inboundMessageValidator; + NonceManager internal s_inboundNonceManager; RMN internal s_realRMN; address internal s_sourceTokenPool = makeAddr("sourceTokenPool"); @@ -71,11 +71,12 @@ contract EVM2EVMMultiOffRampSetup is TokenSetup, PriceRegistrySetup, MultiOCR3Ba s_reverting_receiver = new MaybeRevertMessageReceiver(true); s_maybeRevertingPool = MaybeRevertingBurnMintTokenPool(s_destPoolByToken[s_destTokens[1]]); + s_inboundNonceManager = new NonceManager(new address[](0)); - _deployOffRamp(s_destRouter, s_mockRMN); + _deployOffRamp(s_destRouter, s_mockRMN, s_inboundNonceManager); } - function _deployOffRamp(Router router, IRMN rmnProxy) internal { + function _deployOffRamp(Router router, IRMN rmnProxy, NonceManager nonceManager) internal { EVM2EVMMultiOffRamp.SourceChainConfigArgs[] memory sourceChainConfigs = new EVM2EVMMultiOffRamp.SourceChainConfigArgs[](0); @@ -83,7 +84,8 @@ contract EVM2EVMMultiOffRampSetup is TokenSetup, PriceRegistrySetup, MultiOCR3Ba EVM2EVMMultiOffRamp.StaticConfig({ chainSelector: DEST_CHAIN_SELECTOR, rmnProxy: address(rmnProxy), - tokenAdminRegistry: address(s_tokenAdminRegistry) + tokenAdminRegistry: address(s_tokenAdminRegistry), + nonceManager: address(nonceManager) }), sourceChainConfigs ); @@ -112,6 +114,12 @@ contract EVM2EVMMultiOffRampSetup is TokenSetup, PriceRegistrySetup, MultiOCR3Ba s_offRamp.setDynamicConfig(_generateDynamicMultiOffRampConfig(address(router), address(s_priceRegistry))); s_offRamp.setOCR3Configs(ocrConfigs); + address[] memory authorizedCallers = new address[](1); + authorizedCallers[0] = address(s_offRamp); + NonceManager(nonceManager).applyAuthorizedCallerUpdates( + AuthorizedCallers.AuthorizedCallerArgs({addedCallers: authorizedCallers, removedCallers: new address[](0)}) + ); + address[] memory priceUpdaters = new address[](1); priceUpdaters[0] = address(s_offRamp); s_priceRegistry.applyAuthorizedCallerUpdates( @@ -167,21 +175,18 @@ contract EVM2EVMMultiOffRampSetup is TokenSetup, PriceRegistrySetup, MultiOCR3Ba new EVM2EVMMultiOffRamp.SourceChainConfigArgs[](3); sourceChainConfigs[0] = EVM2EVMMultiOffRamp.SourceChainConfigArgs({ sourceChainSelector: SOURCE_CHAIN_SELECTOR_1, - isEnabled: true, - prevOffRamp: address(0), - onRamp: ON_RAMP_ADDRESS_1 + onRamp: ON_RAMP_ADDRESS_1, + isEnabled: true }); sourceChainConfigs[1] = EVM2EVMMultiOffRamp.SourceChainConfigArgs({ sourceChainSelector: SOURCE_CHAIN_SELECTOR_2, - isEnabled: false, - prevOffRamp: address(0), - onRamp: ON_RAMP_ADDRESS_2 + onRamp: ON_RAMP_ADDRESS_2, + isEnabled: false }); sourceChainConfigs[2] = EVM2EVMMultiOffRamp.SourceChainConfigArgs({ sourceChainSelector: SOURCE_CHAIN_SELECTOR_3, - isEnabled: true, - prevOffRamp: address(0), - onRamp: ON_RAMP_ADDRESS_3 + onRamp: ON_RAMP_ADDRESS_3, + isEnabled: true }); _setupMultipleOffRampsFromConfigs(sourceChainConfigs); } @@ -191,17 +196,17 @@ contract EVM2EVMMultiOffRampSetup is TokenSetup, PriceRegistrySetup, MultiOCR3Ba { s_offRamp.applySourceChainConfigUpdates(sourceChainConfigs); - Router.OnRamp[] memory onRampUpdates = new Router.OnRamp[](sourceChainConfigs.length); - Router.OffRamp[] memory offRampUpdates = new Router.OffRamp[](2 * onRampUpdates.length); + Router.OnRamp[] memory onRampUpdates = new Router.OnRamp[](0); + Router.OffRamp[] memory offRampUpdates = new Router.OffRamp[](2 * sourceChainConfigs.length); for (uint256 i = 0; i < sourceChainConfigs.length; ++i) { uint64 sourceChainSelector = sourceChainConfigs[i].sourceChainSelector; - onRampUpdates[i] = Router.OnRamp({destChainSelector: DEST_CHAIN_SELECTOR, onRamp: sourceChainConfigs[i].onRamp}); - offRampUpdates[2 * i] = Router.OffRamp({sourceChainSelector: sourceChainSelector, offRamp: address(s_offRamp)}); - offRampUpdates[2 * i + 1] = - Router.OffRamp({sourceChainSelector: sourceChainSelector, offRamp: address(sourceChainConfigs[i].prevOffRamp)}); + offRampUpdates[2 * i + 1] = Router.OffRamp({ + sourceChainSelector: sourceChainSelector, + offRamp: s_inboundNonceManager.getPreviousRamps(sourceChainSelector).prevOffRamp + }); } s_destRouter.applyRampUpdates(onRampUpdates, new Router.OffRamp[](0), offRampUpdates); @@ -236,7 +241,7 @@ contract EVM2EVMMultiOffRampSetup is TokenSetup, PriceRegistrySetup, MultiOCR3Ba }); } - function _convertToGeneralMessage(Internal.EVM2EVMMessage memory original) + function _convertToGeneralMessage(Internal.Any2EVMRampMessage memory original) internal view returns (Client.Any2EVMMessage memory message) @@ -255,8 +260,8 @@ contract EVM2EVMMultiOffRampSetup is TokenSetup, PriceRegistrySetup, MultiOCR3Ba } return Client.Any2EVMMessage({ - messageId: original.messageId, - sourceChainSelector: original.sourceChainSelector, + messageId: original.header.messageId, + sourceChainSelector: original.header.sourceChainSelector, sender: abi.encode(original.sender), data: original.data, destTokenAmounts: destTokenAmounts @@ -265,18 +270,18 @@ contract EVM2EVMMultiOffRampSetup is TokenSetup, PriceRegistrySetup, MultiOCR3Ba function _generateAny2EVMMessageNoTokens( uint64 sourceChainSelector, - address onRamp, + bytes memory onRamp, uint64 sequenceNumber - ) internal view returns (Internal.EVM2EVMMessage memory) { + ) internal view returns (Internal.Any2EVMRampMessage memory) { return _generateAny2EVMMessage(sourceChainSelector, onRamp, sequenceNumber, new Client.EVMTokenAmount[](0), false); } function _generateAny2EVMMessageWithTokens( uint64 sourceChainSelector, - address onRamp, + bytes memory onRamp, uint64 sequenceNumber, uint256[] memory amounts - ) internal view returns (Internal.EVM2EVMMessage memory) { + ) internal view returns (Internal.Any2EVMRampMessage memory) { Client.EVMTokenAmount[] memory tokenAmounts = getCastedSourceEVMTokenAmountsWithZeroAmounts(); for (uint256 i = 0; i < tokenAmounts.length; ++i) { tokenAmounts[i].amount = amounts[i]; @@ -286,26 +291,26 @@ contract EVM2EVMMultiOffRampSetup is TokenSetup, PriceRegistrySetup, MultiOCR3Ba function _generateAny2EVMMessage( uint64 sourceChainSelector, - address onRamp, + bytes memory onRamp, uint64 sequenceNumber, Client.EVMTokenAmount[] memory tokenAmounts, bool allowOutOfOrderExecution - ) internal view returns (Internal.EVM2EVMMessage memory) { + ) internal view returns (Internal.Any2EVMRampMessage memory) { bytes memory data = abi.encode(0); - Internal.EVM2EVMMessage memory message = Internal.EVM2EVMMessage({ - sequenceNumber: sequenceNumber, - sender: OWNER, - nonce: allowOutOfOrderExecution ? 0 : sequenceNumber, - gasLimit: GAS_LIMIT, - strict: false, - sourceChainSelector: sourceChainSelector, - receiver: address(s_receiver), + Internal.Any2EVMRampMessage memory message = Internal.Any2EVMRampMessage({ + header: Internal.RampMessageHeader({ + messageId: "", + sourceChainSelector: sourceChainSelector, + destChainSelector: DEST_CHAIN_SELECTOR, + sequenceNumber: sequenceNumber, + nonce: allowOutOfOrderExecution ? 0 : sequenceNumber + }), + sender: abi.encode(OWNER), data: data, + receiver: address(s_receiver), tokenAmounts: tokenAmounts, sourceTokenData: new bytes[](tokenAmounts.length), - feeToken: s_destFeeToken, - feeTokenAmount: uint256(0), - messageId: "" + gasLimit: GAS_LIMIT }); // Correctly set the TokenDataPayload for each token. Tokens have to be set up in the TokenSetup. @@ -319,27 +324,25 @@ contract EVM2EVMMultiOffRampSetup is TokenSetup, PriceRegistrySetup, MultiOCR3Ba ); } - message.messageId = Internal._hash( - message, keccak256(abi.encode(Internal.EVM_2_EVM_MESSAGE_HASH, sourceChainSelector, DEST_CHAIN_SELECTOR, onRamp)) - ); + message.header.messageId = Internal._hash(message, onRamp); return message; } function _generateSingleBasicMessage( uint64 sourceChainSelector, - address onRamp - ) internal view returns (Internal.EVM2EVMMessage[] memory) { - Internal.EVM2EVMMessage[] memory messages = new Internal.EVM2EVMMessage[](1); + bytes memory onRamp + ) internal view returns (Internal.Any2EVMRampMessage[] memory) { + Internal.Any2EVMRampMessage[] memory messages = new Internal.Any2EVMRampMessage[](1); messages[0] = _generateAny2EVMMessageNoTokens(sourceChainSelector, onRamp, 1); return messages; } function _generateMessagesWithTokens( uint64 sourceChainSelector, - address onRamp - ) internal view returns (Internal.EVM2EVMMessage[] memory) { - Internal.EVM2EVMMessage[] memory messages = new Internal.EVM2EVMMessage[](2); + bytes memory onRamp + ) internal view returns (Internal.Any2EVMRampMessage[] memory) { + Internal.Any2EVMRampMessage[] memory messages = new Internal.Any2EVMRampMessage[](2); Client.EVMTokenAmount[] memory tokenAmounts = getCastedSourceEVMTokenAmountsWithZeroAmounts(); tokenAmounts[0].amount = 1e18; tokenAmounts[1].amount = 5e18; @@ -349,24 +352,9 @@ contract EVM2EVMMultiOffRampSetup is TokenSetup, PriceRegistrySetup, MultiOCR3Ba return messages; } - function _generateSingleRampReportFromMessages( - uint64 sourceChainSelector, - Internal.EVM2EVMMessage[] memory messages - ) internal pure returns (Internal.ExecutionReport memory) { - Internal.ExecutionReportSingleChain memory singleChainReport = - _generateReportFromMessages(sourceChainSelector, messages); - - return Internal.ExecutionReport({ - proofs: singleChainReport.proofs, - proofFlagBits: singleChainReport.proofFlagBits, - messages: singleChainReport.messages, - offchainTokenData: singleChainReport.offchainTokenData - }); - } - function _generateReportFromMessages( uint64 sourceChainSelector, - Internal.EVM2EVMMessage[] memory messages + Internal.Any2EVMRampMessage[] memory messages ) internal pure returns (Internal.ExecutionReportSingleChain memory) { bytes[][] memory offchainTokenData = new bytes[][](messages.length); @@ -385,14 +373,14 @@ contract EVM2EVMMultiOffRampSetup is TokenSetup, PriceRegistrySetup, MultiOCR3Ba function _generateBatchReportFromMessages( uint64 sourceChainSelector, - Internal.EVM2EVMMessage[] memory messages + Internal.Any2EVMRampMessage[] memory messages ) internal pure returns (Internal.ExecutionReportSingleChain[] memory) { Internal.ExecutionReportSingleChain[] memory reports = new Internal.ExecutionReportSingleChain[](1); reports[0] = _generateReportFromMessages(sourceChainSelector, messages); return reports; } - function _getGasLimitsFromMessages(Internal.EVM2EVMMessage[] memory messages) + function _getGasLimitsFromMessages(Internal.Any2EVMRampMessage[] memory messages) internal pure returns (uint256[] memory) @@ -423,9 +411,7 @@ contract EVM2EVMMultiOffRampSetup is TokenSetup, PriceRegistrySetup, MultiOCR3Ba ) internal pure { assertEq(config1.isEnabled, config2.isEnabled); assertEq(config1.minSeqNr, config2.minSeqNr); - assertEq(config1.prevOffRamp, config2.prevOffRamp); assertEq(config1.onRamp, config2.onRamp); - assertEq(config1.metadataHash, config2.metadataHash); } function _getDefaultSourceTokenData(Client.EVMTokenAmount[] memory srcTokenAmounts) @@ -457,12 +443,18 @@ contract EVM2EVMMultiOffRampSetup is TokenSetup, PriceRegistrySetup, MultiOCR3Ba EVM2EVMMultiOffRamp.StaticConfig({ chainSelector: DEST_CHAIN_SELECTOR, rmnProxy: address(s_mockRMN), - tokenAdminRegistry: address(s_tokenAdminRegistry) + tokenAdminRegistry: address(s_tokenAdminRegistry), + nonceManager: address(s_inboundNonceManager) }), new EVM2EVMMultiOffRamp.SourceChainConfigArgs[](0) ); s_offRamp.setDynamicConfig(_generateDynamicMultiOffRampConfig(address(s_destRouter), address(s_priceRegistry))); + address[] memory authorizedCallers = new address[](1); + authorizedCallers[0] = address(s_offRamp); + s_inboundNonceManager.applyAuthorizedCallerUpdates( + AuthorizedCallers.AuthorizedCallerArgs({addedCallers: authorizedCallers, removedCallers: new address[](0)}) + ); _setupMultipleOffRamps(); address[] memory priceUpdaters = new address[](1); @@ -474,13 +466,8 @@ contract EVM2EVMMultiOffRampSetup is TokenSetup, PriceRegistrySetup, MultiOCR3Ba function _setupRealRMN() internal { RMN.Voter[] memory voters = new RMN.Voter[](1); - voters[0] = RMN.Voter({ - blessVoteAddr: BLESS_VOTE_ADDR, - curseVoteAddr: address(9999), - curseUnvoteAddr: address(19999), - blessWeight: 1, - curseWeight: 1 - }); + voters[0] = + RMN.Voter({blessVoteAddr: BLESS_VOTE_ADDR, curseVoteAddr: address(9999), blessWeight: 1, curseWeight: 1}); // Overwrite base mock rmn with real. s_realRMN = new RMN(RMN.Config({voters: voters, blessWeightThreshold: 1, curseWeightThreshold: 1})); } diff --git a/contracts/src/v0.8/ccip/test/offRamp/EVM2EVMOffRamp.t.sol b/contracts/src/v0.8/ccip/test/offRamp/EVM2EVMOffRamp.t.sol index 18013636bf..e94184e3c5 100644 --- a/contracts/src/v0.8/ccip/test/offRamp/EVM2EVMOffRamp.t.sol +++ b/contracts/src/v0.8/ccip/test/offRamp/EVM2EVMOffRamp.t.sol @@ -629,13 +629,11 @@ contract EVM2EVMOffRamp_execute is EVM2EVMOffRampSetup { } function test_Unhealthy_Revert() public { - s_mockRMN.voteToCurse(bytes16(type(uint128).max)); + s_mockRMN.setGlobalCursed(true); vm.expectRevert(EVM2EVMOffRamp.CursedByRMN.selector); s_offRamp.execute(_generateReportFromMessages(_generateMessagesWithTokens()), new uint256[](0)); // Uncurse should succeed - RMN.UnvoteToCurseRecord[] memory records = new RMN.UnvoteToCurseRecord[](1); - records[0] = RMN.UnvoteToCurseRecord({curseVoteAddr: OWNER, cursesHash: bytes32(uint256(0)), forceUnvote: true}); - s_mockRMN.ownerUnvoteToCurse(records); + s_mockRMN.setGlobalCursed(false); s_offRamp.execute(_generateReportFromMessages(_generateMessagesWithTokens()), new uint256[](0)); } diff --git a/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMMultiOnRamp.t.sol b/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMMultiOnRamp.t.sol index f888e020c9..2b16c87e2e 100644 --- a/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMMultiOnRamp.t.sol +++ b/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMMultiOnRamp.t.sol @@ -24,7 +24,7 @@ contract EVM2EVMMultiOnRamp_constructor is EVM2EVMMultiOnRampSetup { chainSelector: SOURCE_CHAIN_SELECTOR, maxFeeJuelsPerMsg: MAX_MSG_FEES_JUELS, rmnProxy: address(s_mockRMN), - nonceManager: address(s_nonceManager), + nonceManager: address(s_outboundNonceManager), tokenAdminRegistry: address(s_tokenAdminRegistry) }); EVM2EVMMultiOnRamp.DynamicConfig memory dynamicConfig = @@ -56,7 +56,7 @@ contract EVM2EVMMultiOnRamp_constructor is EVM2EVMMultiOnRampSetup { ); _deployOnRamp( - SOURCE_CHAIN_SELECTOR, address(s_sourceRouter), address(s_nonceManager), address(s_tokenAdminRegistry) + SOURCE_CHAIN_SELECTOR, address(s_sourceRouter), address(s_outboundNonceManager), address(s_tokenAdminRegistry) ); EVM2EVMMultiOnRamp.DestChainConfig memory expectedDestChainConfig = EVM2EVMMultiOnRamp.DestChainConfig({ @@ -99,7 +99,7 @@ contract EVM2EVMMultiOnRamp_constructor is EVM2EVMMultiOnRampSetup { chainSelector: SOURCE_CHAIN_SELECTOR, maxFeeJuelsPerMsg: MAX_NOP_FEES_JUELS, rmnProxy: address(s_mockRMN), - nonceManager: address(s_nonceManager), + nonceManager: address(s_outboundNonceManager), tokenAdminRegistry: address(s_tokenAdminRegistry) }), _generateDynamicMultiOnRampConfig(address(s_sourceRouter), address(s_priceRegistry)), @@ -117,7 +117,7 @@ contract EVM2EVMMultiOnRamp_constructor is EVM2EVMMultiOnRampSetup { chainSelector: 0, maxFeeJuelsPerMsg: MAX_NOP_FEES_JUELS, rmnProxy: address(s_mockRMN), - nonceManager: address(s_nonceManager), + nonceManager: address(s_outboundNonceManager), tokenAdminRegistry: address(s_tokenAdminRegistry) }), _generateDynamicMultiOnRampConfig(address(s_sourceRouter), address(s_priceRegistry)), @@ -135,7 +135,7 @@ contract EVM2EVMMultiOnRamp_constructor is EVM2EVMMultiOnRampSetup { chainSelector: SOURCE_CHAIN_SELECTOR, maxFeeJuelsPerMsg: MAX_NOP_FEES_JUELS, rmnProxy: address(0), - nonceManager: address(s_nonceManager), + nonceManager: address(s_outboundNonceManager), tokenAdminRegistry: address(s_tokenAdminRegistry) }), _generateDynamicMultiOnRampConfig(address(s_sourceRouter), address(s_priceRegistry)), @@ -171,7 +171,7 @@ contract EVM2EVMMultiOnRamp_constructor is EVM2EVMMultiOnRampSetup { chainSelector: SOURCE_CHAIN_SELECTOR, maxFeeJuelsPerMsg: MAX_NOP_FEES_JUELS, rmnProxy: address(s_mockRMN), - nonceManager: address(s_nonceManager), + nonceManager: address(s_outboundNonceManager), tokenAdminRegistry: address(0) }), _generateDynamicMultiOnRampConfig(address(s_sourceRouter), address(s_priceRegistry)), @@ -489,7 +489,7 @@ contract EVM2EVMMultiOnRamp_forwardFromRouter is EVM2EVMMultiOnRampSetup { Client.EVM2AnyMessage memory message = _generateEmptyMessage(); for (uint64 i = 1; i < 4; ++i) { - uint64 nonceBefore = s_nonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER); + uint64 nonceBefore = s_outboundNonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER); uint64 sequenceNumberBefore = s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR).sequenceNumber; vm.expectEmit(); @@ -497,7 +497,7 @@ contract EVM2EVMMultiOnRamp_forwardFromRouter is EVM2EVMMultiOnRampSetup { s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 0, OWNER); - uint64 nonceAfter = s_nonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER); + uint64 nonceAfter = s_outboundNonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER); uint64 sequenceNumberAfter = s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR).sequenceNumber; assertEq(nonceAfter, nonceBefore + 1); assertEq(sequenceNumberAfter, sequenceNumberBefore + 1); @@ -511,7 +511,7 @@ contract EVM2EVMMultiOnRamp_forwardFromRouter is EVM2EVMMultiOnRampSetup { ); for (uint64 i = 1; i < 4; ++i) { - uint64 nonceBefore = s_nonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER); + uint64 nonceBefore = s_outboundNonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER); uint64 sequenceNumberBefore = s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR).sequenceNumber; vm.expectEmit(); @@ -519,7 +519,7 @@ contract EVM2EVMMultiOnRamp_forwardFromRouter is EVM2EVMMultiOnRampSetup { s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 0, OWNER); - uint64 nonceAfter = s_nonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER); + uint64 nonceAfter = s_outboundNonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER); uint64 sequenceNumberAfter = s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR).sequenceNumber; assertEq(nonceAfter, nonceBefore); assertEq(sequenceNumberAfter, sequenceNumberBefore + 1); @@ -629,7 +629,7 @@ contract EVM2EVMMultiOnRamp_forwardFromRouter is EVM2EVMMultiOnRampSetup { } function test_Unhealthy_Revert() public { - s_mockRMN.voteToCurse(bytes16(type(uint128).max)); + s_mockRMN.setGlobalCursed(true); vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOnRamp.CursedByRMN.selector, DEST_CHAIN_SELECTOR)); s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, _generateEmptyMessage(), 0, OWNER); } diff --git a/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMMultiOnRampSetup.t.sol b/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMMultiOnRampSetup.t.sol index 5b62b0f8e4..d9e2921421 100644 --- a/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMMultiOnRampSetup.t.sol +++ b/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMMultiOnRampSetup.t.sol @@ -35,7 +35,7 @@ contract EVM2EVMMultiOnRampSetup is TokenSetup, PriceRegistrySetup { EVM2EVMMultiOnRampHelper internal s_onRamp; MessageInterceptorHelper internal s_outboundMessageValidator; address[] internal s_offRamps; - NonceManager internal s_nonceManager; + NonceManager internal s_outboundNonceManager; address internal s_destTokenPool = makeAddr("destTokenPool"); address internal s_destToken = makeAddr("destToken"); @@ -104,9 +104,9 @@ contract EVM2EVMMultiOnRampSetup is TokenSetup, PriceRegistrySetup { ); s_outboundMessageValidator = new MessageInterceptorHelper(); - s_nonceManager = new NonceManager(new address[](0)); + s_outboundNonceManager = new NonceManager(new address[](0)); (s_onRamp, s_metadataHash) = _deployOnRamp( - SOURCE_CHAIN_SELECTOR, address(s_sourceRouter), address(s_nonceManager), address(s_tokenAdminRegistry) + SOURCE_CHAIN_SELECTOR, address(s_sourceRouter), address(s_outboundNonceManager), address(s_tokenAdminRegistry) ); s_offRamps = new address[](2); diff --git a/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMOnRamp.t.sol b/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMOnRamp.t.sol index fe0b908a42..197a87b708 100644 --- a/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMOnRamp.t.sol +++ b/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMOnRamp.t.sol @@ -544,7 +544,7 @@ contract EVM2EVMOnRamp_forwardFromRouter is EVM2EVMOnRampSetup { } function test_Unhealthy_Revert() public { - s_mockRMN.voteToCurse(bytes16(type(uint128).max)); + s_mockRMN.setGlobalCursed(true); vm.expectRevert(EVM2EVMOnRamp.CursedByRMN.selector); s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, _generateEmptyMessage(), 0, OWNER); } diff --git a/contracts/src/v0.8/ccip/test/pools/BurnFromMintTokenPool.t.sol b/contracts/src/v0.8/ccip/test/pools/BurnFromMintTokenPool.t.sol index 51c49938c6..290c4ae153 100644 --- a/contracts/src/v0.8/ccip/test/pools/BurnFromMintTokenPool.t.sol +++ b/contracts/src/v0.8/ccip/test/pools/BurnFromMintTokenPool.t.sol @@ -67,7 +67,7 @@ contract BurnFromMintTokenPool_lockOrBurn is BurnFromMintTokenPoolSetup { // Should not burn tokens if cursed. function test_PoolBurnRevertNotHealthy_Revert() public { - s_mockRMN.voteToCurse(bytes16(0)); + s_mockRMN.setGlobalCursed(true); uint256 before = s_burnMintERC677.balanceOf(address(s_pool)); vm.startPrank(s_burnMintOnRamp); diff --git a/contracts/src/v0.8/ccip/test/pools/BurnMintTokenPool.t.sol b/contracts/src/v0.8/ccip/test/pools/BurnMintTokenPool.t.sol index b23f54f1cd..c628c510d4 100644 --- a/contracts/src/v0.8/ccip/test/pools/BurnMintTokenPool.t.sol +++ b/contracts/src/v0.8/ccip/test/pools/BurnMintTokenPool.t.sol @@ -70,7 +70,7 @@ contract BurnMintTokenPool_lockOrBurn is BurnMintTokenPoolSetup { // Should not burn tokens if cursed. function test_PoolBurnRevertNotHealthy_Revert() public { - s_mockRMN.voteToCurse(bytes16(0)); + s_mockRMN.setGlobalCursed(true); uint256 before = s_burnMintERC677.balanceOf(address(s_pool)); vm.startPrank(s_burnMintOnRamp); @@ -130,7 +130,7 @@ contract BurnMintTokenPool_releaseOrMint is BurnMintTokenPoolSetup { function test_PoolMintNotHealthy_Revert() public { // Should not mint tokens if cursed. - s_mockRMN.voteToCurse(bytes16(0)); + s_mockRMN.setGlobalCursed(true); uint256 before = s_burnMintERC677.balanceOf(OWNER); vm.startPrank(s_burnMintOffRamp); diff --git a/contracts/src/v0.8/ccip/test/pools/BurnWithFromMintTokenPool.t.sol b/contracts/src/v0.8/ccip/test/pools/BurnWithFromMintTokenPool.t.sol index ab4df477be..22362ee4a5 100644 --- a/contracts/src/v0.8/ccip/test/pools/BurnWithFromMintTokenPool.t.sol +++ b/contracts/src/v0.8/ccip/test/pools/BurnWithFromMintTokenPool.t.sol @@ -68,7 +68,7 @@ contract BurnWithFromMintTokenPool_lockOrBurn is BurnWithFromMintTokenPoolSetup // Should not burn tokens if cursed. function test_PoolBurnRevertNotHealthy_Revert() public { - s_mockRMN.voteToCurse(bytes16(0)); + s_mockRMN.setGlobalCursed(true); uint256 before = s_burnMintERC677.balanceOf(address(s_pool)); vm.startPrank(s_burnMintOnRamp); diff --git a/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool.t.sol b/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool.t.sol index 42aae6f642..97d0d4e894 100644 --- a/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool.t.sol +++ b/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool.t.sol @@ -150,7 +150,7 @@ contract LockReleaseTokenPool_lockOrBurn is LockReleaseTokenPoolSetup { function test_PoolBurnRevertNotHealthy_Revert() public { // Should not burn tokens if cursed. - s_mockRMN.voteToCurse(bytes16(0)); + s_mockRMN.setGlobalCursed(true); uint256 before = s_token.balanceOf(address(s_lockReleaseTokenPoolWithAllowList)); vm.startPrank(s_allowedOnRamp); @@ -287,7 +287,7 @@ contract LockReleaseTokenPool_releaseOrMint is LockReleaseTokenPoolSetup { function test_PoolMintNotHealthy_Revert() public { // Should not mint tokens if cursed. - s_mockRMN.voteToCurse(bytes16(0)); + s_mockRMN.setGlobalCursed(true); uint256 before = s_token.balanceOf(OWNER); vm.startPrank(s_allowedOffRamp); vm.expectRevert(TokenPool.CursedByRMN.selector); diff --git a/contracts/src/v0.8/ccip/test/router/Router.t.sol b/contracts/src/v0.8/ccip/test/router/Router.t.sol index fdd6c3ab86..cfe01e3c41 100644 --- a/contracts/src/v0.8/ccip/test/router/Router.t.sol +++ b/contracts/src/v0.8/ccip/test/router/Router.t.sol @@ -296,7 +296,7 @@ contract Router_ccipSend is EVM2EVMOnRampSetup { function test_WhenNotHealthy_Revert() public { Client.EVM2AnyMessage memory message = _generateEmptyMessage(); - s_mockRMN.voteToCurse(bytes16(0)); + s_mockRMN.setGlobalCursed(true); vm.expectRevert(Router.BadARMSignal.selector); s_sourceRouter.ccipSend(DEST_CHAIN_SELECTOR, message); } @@ -864,7 +864,7 @@ contract Router_routeMessage is EVM2EVMOffRampSetup { } function test_WhenNotHealthy_Revert() public { - s_mockRMN.voteToCurse(bytes16(0)); + s_mockRMN.setGlobalCursed(true); vm.expectRevert(Router.BadARMSignal.selector); s_destRouter.routeMessage( generateReceiverMessage(SOURCE_CHAIN_SELECTOR), GAS_FOR_CALL_EXACT_CHECK, 100_000, address(s_receiver) diff --git a/core/cmd/solana_node_commands_test.go b/core/cmd/solana_node_commands_test.go index adc699de79..a778bbcce3 100644 --- a/core/cmd/solana_node_commands_test.go +++ b/core/cmd/solana_node_commands_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/pelletier/go-toml/v2" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/core/gethwrappers/ccip/generated/arm_contract/arm_contract.go b/core/gethwrappers/ccip/generated/arm_contract/arm_contract.go index 83daac3356..e5cb17ded0 100644 --- a/core/gethwrappers/ccip/generated/arm_contract/arm_contract.go +++ b/core/gethwrappers/ccip/generated/arm_contract/arm_contract.go @@ -41,23 +41,36 @@ type RMNConfig struct { CurseWeightThreshold uint16 } -type RMNUnvoteToCurseRecord struct { +type RMNOwnerUnvoteToCurseRequest struct { CurseVoteAddr common.Address - CursesHash [32]byte + Unit RMNUnvoteToCurseRequest ForceUnvote bool } +type RMNRecordedCurseRelatedOp struct { + Tag uint8 + BlockTimestamp uint64 + Cursed bool + CurseVoteAddr common.Address + Subject [16]byte + CurseId [16]byte +} + +type RMNUnvoteToCurseRequest struct { + Subject [16]byte + CursesHash [28]byte +} + type RMNVoter struct { - BlessVoteAddr common.Address - CurseVoteAddr common.Address - CurseUnvoteAddr common.Address - BlessWeight uint8 - CurseWeight uint8 + BlessVoteAddr common.Address + CurseVoteAddr common.Address + BlessWeight uint8 + CurseWeight uint8 } var ARMContractMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"blessVoteAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"curseVoteAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"curseUnvoteAddr\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"blessWeight\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"curseWeight\",\"type\":\"uint8\"}],\"internalType\":\"structRMN.Voter[]\",\"name\":\"voters\",\"type\":\"tuple[]\"},{\"internalType\":\"uint16\",\"name\":\"blessWeightThreshold\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"curseWeightThreshold\",\"type\":\"uint16\"}],\"internalType\":\"structRMN.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"curseId\",\"type\":\"bytes32\"}],\"name\":\"AlreadyVotedToCurse\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidConfig\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidCurseState\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expectedCursesHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actualCursesHash\",\"type\":\"bytes32\"}],\"name\":\"InvalidCursesHash\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"}],\"name\":\"InvalidVoter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustRecoverFromCurse\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"commitStore\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"structIRMN.TaggedRoot\",\"name\":\"taggedRoot\",\"type\":\"tuple\"}],\"name\":\"AlreadyBlessed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"commitStore\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"structIRMN.TaggedRoot\",\"name\":\"taggedRoot\",\"type\":\"tuple\"}],\"name\":\"AlreadyVotedToBless\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"},{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"blessVoteAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"curseVoteAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"curseUnvoteAddr\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"blessWeight\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"curseWeight\",\"type\":\"uint8\"}],\"internalType\":\"structRMN.Voter[]\",\"name\":\"voters\",\"type\":\"tuple[]\"},{\"internalType\":\"uint16\",\"name\":\"blessWeightThreshold\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"curseWeightThreshold\",\"type\":\"uint16\"}],\"indexed\":false,\"internalType\":\"structRMN.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"Cursed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"OwnerCursed\",\"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\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"RecoveredFromCurse\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"weight\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"voteCount\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"cursesHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"accumulatedWeight\",\"type\":\"uint16\"}],\"name\":\"ReusedVotesToCurse\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"expectedCursesHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"actualCursesHash\",\"type\":\"bytes32\"}],\"name\":\"SkippedUnvoteToCurse\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"commitStore\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"structIRMN.TaggedRoot\",\"name\":\"taggedRoot\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"wasBlessed\",\"type\":\"bool\"}],\"name\":\"TaggedRootBlessVotesReset\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"commitStore\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"structIRMN.TaggedRoot\",\"name\":\"taggedRoot\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"accumulatedWeight\",\"type\":\"uint16\"}],\"name\":\"TaggedRootBlessed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"weight\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"voteCount\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"cursesHash\",\"type\":\"bytes32\"}],\"name\":\"UnvotedToCurse\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"commitStore\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"structIRMN.TaggedRoot\",\"name\":\"taggedRoot\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"weight\",\"type\":\"uint8\"}],\"name\":\"VotedToBless\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"weight\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"voteCount\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"curseId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"cursesHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"accumulatedWeight\",\"type\":\"uint16\"}],\"name\":\"VotedToCurse\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"commitStore\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"internalType\":\"structIRMN.TaggedRoot\",\"name\":\"taggedRoot\",\"type\":\"tuple\"}],\"name\":\"getBlessProgress\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"blessVoteAddrs\",\"type\":\"address[]\"},{\"internalType\":\"uint16\",\"name\":\"accumulatedWeight\",\"type\":\"uint16\"},{\"internalType\":\"bool\",\"name\":\"blessed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfigDetails\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"version\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blockNumber\",\"type\":\"uint32\"},{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"blessVoteAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"curseVoteAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"curseUnvoteAddr\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"blessWeight\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"curseWeight\",\"type\":\"uint8\"}],\"internalType\":\"structRMN.Voter[]\",\"name\":\"voters\",\"type\":\"tuple[]\"},{\"internalType\":\"uint16\",\"name\":\"blessWeightThreshold\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"curseWeightThreshold\",\"type\":\"uint16\"}],\"internalType\":\"structRMN.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurseProgress\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"curseVoteAddrs\",\"type\":\"address[]\"},{\"internalType\":\"uint32[]\",\"name\":\"voteCounts\",\"type\":\"uint32[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"cursesHashes\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint16\",\"name\":\"accumulatedWeight\",\"type\":\"uint16\"},{\"internalType\":\"bool\",\"name\":\"cursed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"commitStore\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"internalType\":\"structIRMN.TaggedRoot\",\"name\":\"taggedRoot\",\"type\":\"tuple\"}],\"name\":\"isBlessed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes16\",\"name\":\"\",\"type\":\"bytes16\"}],\"name\":\"isCursed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isCursed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ownerCurse\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"commitStore\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"internalType\":\"structIRMN.TaggedRoot[]\",\"name\":\"taggedRoots\",\"type\":\"tuple[]\"}],\"name\":\"ownerResetBlessVotes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"curseVoteAddr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"cursesHash\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"forceUnvote\",\"type\":\"bool\"}],\"internalType\":\"structRMN.UnvoteToCurseRecord[]\",\"name\":\"unvoteRecords\",\"type\":\"tuple[]\"}],\"name\":\"ownerUnvoteToCurse\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"blessVoteAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"curseVoteAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"curseUnvoteAddr\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"blessWeight\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"curseWeight\",\"type\":\"uint8\"}],\"internalType\":\"structRMN.Voter[]\",\"name\":\"voters\",\"type\":\"tuple[]\"},{\"internalType\":\"uint16\",\"name\":\"blessWeightThreshold\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"curseWeightThreshold\",\"type\":\"uint16\"}],\"internalType\":\"structRMN.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"curseVoteAddr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"cursesHash\",\"type\":\"bytes32\"}],\"name\":\"unvoteToCurse\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"commitStore\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"internalType\":\"structIRMN.TaggedRoot[]\",\"name\":\"taggedRoots\",\"type\":\"tuple[]\"}],\"name\":\"voteToBless\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"curseId\",\"type\":\"bytes32\"}],\"name\":\"voteToCurse\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60806040523480156200001157600080fd5b5060405162004c2538038062004c25833981016040819052620000349162000e20565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be816200013a565b5050604080516080808201835260008083526020830181905260608301526001600160801b03928201929092529150600190620000fd90829062000fad565b82604001516001600160801b0316901c6001600160801b0316101562000127576200012762000fc9565b506200013381620001e5565b506200115b565b336001600160a01b03821603620001945760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b620001fa600954640100000000900460ff1690565b1562000219576040516306523e6560e51b815260040160405180910390fd5b620002248162000a0c565b62000242576040516306b7c75960e31b815260040160405180910390fd5b6040805160028054608060208202840181019094526060830181815260009484928491879085015b82821015620002e85760008481526020908190206040805160a0810182526003860290920180546001600160a01b0390811684526001808301548216858701526002909201549081169284019290925260ff600160a01b830481166060850152600160a81b909204909116608083015290835290920191016200026a565b505050908252506001919091015461ffff808216602080850191909152620100009283900482166040948501528601516003805494880151831690930263ffffffff1990941691161791909117905590505b600254156200045a576002805460009190620003599060019062000fad565b815481106200036c576200036c62000fdf565b600091825260208083206040805160a081018252600390940290910180546001600160a01b03908116808652600183015482168686019081526002938401548084168887015260ff600160a01b8204811660608a0152600160a81b90910416608088015290875260058552838720805465ffffffffffff19169055511685526007909252909220805460ff1916905581549092508062000410576200041062000ff5565b60008281526020902060036000199092019182020180546001600160a01b03199081168255600182018054909116905560020180546001600160b01b03191690559055506200033a565b60005b8251518110156200052e5782518051600291908390811062000483576200048362000fdf565b602090810291909101810151825460018181018555600094855293839020825160039092020180546001600160a01b039283166001600160a01b03199182161782559383015181860180549184169190951617909355604082015160029093018054606084015160809094015160ff908116600160a81b0260ff60a81b1991909516600160a01b026001600160a81b031990921695909316949094179390931716179055016200045d565b5060048054600090620005479063ffffffff166200100b565b82546101009290920a63ffffffff8181021990931691831602179091556004541660005b83515160ff821610156200071557600084600001518260ff168151811062000597576200059762000fdf565b602090810291909101810151604080516060808201835263ffffffff88811683528185015160ff90811684880190815289821685870190815287516001600160a01b03908116600090815260058b52888120975188549451935190871664ffffffffff1990951694909417640100000000938616939093029290921760ff60281b1916650100000000009385169390930292909217909555855160a08101875260018082526080808a01518516838c019081528a8c01805186168a526007808e528b8b205462010000908190048a16878e019081529d8d015188169a87019a8b52825188168c52818f528c8c20860154948701948552915187168b52909c52989097209151825498519951965161ffff1990991690151561ff0019161761010099909416989098029290921762010000600160d01b03191693909216909602600160301b600160d01b031916919091176601000000000000939091169290920291909117835551910155506200070d8162001031565b90506200056b565b506004805463ffffffff4381166401000000000263ffffffff60201b1990921691909117909155604051908216907f7cf8e698b191db138396ab0eae2ad5b3fe353fd014fd5956b034b86f2d605cfd906200077290869062001053565b60405180910390a2604080516060810182528482015161ffff168152600060208201819052918101829052905b83515160ff821610156200096157600084600001518260ff1681518110620007cb57620007cb62000fdf565b6020908102919091018101518101516001600160a01b03808216600090815260078452604090819020815160a081018352815460ff808216151580845261010083049091169783019790975263ffffffff62010000820416938201939093526601000000000000909204909216606082015260019091015460808201529092509062000881576001600160a01b038216600090815260076020526040812080546001600160d01b0319168155600101556200094b565b805180156200089a57506000816040015163ffffffff16115b156200094b57806020015160ff1684602001818151620008bb919062001106565b61ffff1690525060208082015160408084015160808501519388015191516001600160a01b0387169463ffffffff8b16947fb4a70189a30e3d3b9c77d291f83699633e70ab4427fc3644a955ab4cca077b03946200094294919391929160ff94909416845263ffffffff929092166020840152604083015261ffff16606082015260800190565b60405180910390a35b505080620009599062001031565b90506200079f565b508051602082015161ffff91821691161080156040830152620009c0578163ffffffff167f6ec7e144a45fa03ed986874794df08b5b6bbbb27ed6454b4e6eaa74248b5e33342604051620009b791815260200190565b60405180910390a25b805160098054602084015160409094015115156401000000000260ff60201b1961ffff958616620100000263ffffffff1990931695909416949094171791909116919091179055505050565b805151600090158062000a2157508151516080105b8062000a335750602082015161ffff16155b8062000a455750604082015161ffff16155b1562000a5357506000919050565b6000806000846000015151600362000a6c91906200112b565b6001600160401b0381111562000a865762000a8662000d45565b60405190808252806020026020018201604052801562000ab0578160200160208202803683370190505b50905060005b85515181101562000c755760008660000151828151811062000adc5762000adc62000fdf565b6020026020010151905060006001600160a01b031681600001516001600160a01b0316148062000b17575060208101516001600160a01b0316155b8062000b2e575060408101516001600160a01b0316155b8062000b505750606081015160ff1615801562000b505750608081015160ff16155b1562000b63575060009695505050505050565b80518362000b738460036200112b565b62000b8090600062001145565b8151811062000b935762000b9362000fdf565b6001600160a01b039092166020928302919091018201528101518362000bbb8460036200112b565b62000bc890600162001145565b8151811062000bdb5762000bdb62000fdf565b6001600160a01b039092166020928302919091019091015260408101518362000c068460036200112b565b62000c1390600262001145565b8151811062000c265762000c2662000fdf565b6001600160a01b0390921660209283029190910190910152606081015162000c529060ff168662001145565b9450806080015160ff168462000c69919062001145565b93505060010162000ab6565b5060005b815181101562000d1a57600082828151811062000c9a5762000c9a62000fdf565b60200260200101519050600082600162000cb5919062001145565b90505b835181101562000d0f5783818151811062000cd75762000cd762000fdf565b60200260200101516001600160a01b0316826001600160a01b03160362000d0657506000979650505050505050565b60010162000cb8565b505060010162000c79565b50846020015161ffff16831015801562000d3c5750846040015161ffff168210155b95945050505050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b038111828210171562000d805762000d8062000d45565b60405290565b60405160a081016001600160401b038111828210171562000d805762000d8062000d45565b604051601f8201601f191681016001600160401b038111828210171562000dd65762000dd662000d45565b604052919050565b80516001600160a01b038116811462000df657600080fd5b919050565b805160ff8116811462000df657600080fd5b805161ffff8116811462000df657600080fd5b6000602080838503121562000e3457600080fd5b82516001600160401b038082111562000e4c57600080fd5b8185019150606080838803121562000e6357600080fd5b62000e6d62000d5b565b83518381111562000e7d57600080fd5b8401601f8101891362000e8f57600080fd5b80518481111562000ea45762000ea462000d45565b62000eb4878260051b0162000dab565b818152878101955060a091820283018801918b83111562000ed457600080fd5b928801925b8284101562000f625780848d03121562000ef35760008081fd5b62000efd62000d86565b62000f088562000dde565b815262000f178a860162000dde565b8a820152604062000f2a81870162000dde565b9082015262000f3b85880162000dfb565b87820152608062000f4e81870162000dfb565b908201528752958801959283019262000ed9565b5083525062000f75905084860162000e0d565b8582015262000f876040850162000e0d565b6040820152979650505050505050565b634e487b7160e01b600052601160045260246000fd5b8181038181111562000fc35762000fc362000f97565b92915050565b634e487b7160e01b600052600160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b600063ffffffff80831681810362001027576200102762000f97565b6001019392505050565b600060ff821660ff81036200104a576200104a62000f97565b60010192915050565b60006020808352608080840185516060808588015282825180855260a0945060a089019150868401935060005b81811015620010d857845180516001600160a01b0390811685528982015181168a860152604080830151909116908501528481015160ff90811686860152908801511687840152938701939185019160010162001080565b50509488015161ffff8116604089015294604089015161ffff811660608a0152955098975050505050505050565b61ffff81811683821601908082111562001124576200112462000f97565b5092915050565b808202811582820484141762000fc35762000fc362000f97565b8082018082111562000fc35762000fc362000f97565b613aba806200116b6000396000f3fe608060405234801561001057600080fd5b506004361061011b5760003560e01c80634d616771116100b25780639799861111610081578063e4bbc05c11610066578063e4bbc05c1461029c578063f2fde38b146102a4578063f33f2895146102b757600080fd5b80639799861114610276578063ba86a1f01461028957600080fd5b80634d61677114610220578063618af1281461023357806379ba5097146102465780638da5cb5b1461024e57600080fd5b8063397796f7116100ee578063397796f7146101ca5780633987d651146101dd5780633f42ab73146101f657806347cf2b601461020d57600080fd5b8063119a352714610120578063181f5a77146101355780632cbc26bb1461018757806335aea869146101b7575b600080fd5b61013361012e36600461317f565b6102d9565b005b6101716040518060400160405280600d81526020017f524d4e20312e352e302d6465760000000000000000000000000000000000000081525081565b60405161017e9190613198565b60405180910390f35b6101a7610195366004613205565b50600954640100000000900460ff1690565b604051901515815260200161017e565b6101336101c5366004613272565b610765565b600954640100000000900460ff166101a7565b6101e5610afa565b60405161017e9594939291906132ee565b6101fe610efb565b60405161017e93929190613448565b61013361021b36600461355e565b611033565b6101a761022e3660046136b6565b611047565b6101336102413660046136ce565b6110d9565b61013361158a565b60005460405173ffffffffffffffffffffffffffffffffffffffff909116815260200161017e565b610133610284366004613743565b611687565b610133610297366004613743565b611bb4565b610133611d8c565b6101336102b23660046137a6565b611e51565b6102ca6102c53660046136b6565b611e62565b60405161017e939291906137c1565b33600090815260076020908152604091829020825160a081018452815460ff808216151580845261010083049091169483019490945263ffffffff6201000082041694820194909452660100000000000090930473ffffffffffffffffffffffffffffffffffffffff16606084015260010154608083015261038e576040517f669f262e0000000000000000000000000000000000000000000000000000000081523360048201526024015b60405180910390fd5b33600090815260086020908152604080832085845290915290205460ff16156103ec576040517f9baf703d00000000000000000000000000000000000000000000000000000000815233600482015260248101839052604401610385565b3360009081526008602090815260408083208584529091529081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558101805161043e9061381e565b63ffffffff16905260808101516040805160208101929092528101839052606001604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001815291815281516020928301206080840190815233600090815260078452829020845181548686015187860180516060808b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00009095169515157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169590951761010060ff94851602177fffffffffffff000000000000000000000000000000000000000000000000ffff166201000063ffffffff92831681027fffffffffffff0000000000000000000000000000000000000000ffffffffffff1691909117660100000000000073ffffffffffffffffffffffffffffffffffffffff9096169590950294909417865595516001958601558651938401875260095461ffff8082168652938104909316978401979097526401000000009091041615159381019390935292519192911690036105fa57816020015160ff16816020018181516105f29190613841565b61ffff169052505b60045460208381015160408086015160808088015187860151845160ff909616865263ffffffff93841696860196909652928401899052606084019290925261ffff90931690820152911690339082907f8e5ceca76dae647f687fccbe8d42a3796e68330812669bd5003b938dacb1b6dd9060a00160405180910390a381604001511580156106995750816000015161ffff16826020015161ffff1610155b156106e35760016040838101919091525142815263ffffffff8216907f6ec7e144a45fa03ed986874794df08b5b6bbbb27ed6454b4e6eaa74248b5e3339060200160405180910390a25b5080516009805460208401516040909401511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff61ffff95861662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000909316959094169490941717919091169190911790555050565b73ffffffffffffffffffffffffffffffffffffffff808316600090815260076020908152604091829020825160a081018452815460ff808216151583526101008204169382019390935263ffffffff62010000840416938101939093526601000000000000909104909216606082015260019091015460808201526107f560095460ff6401000000009091041690565b1561082c576040517fca47cca000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806060015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610897576040517f669f262e000000000000000000000000000000000000000000000000000000008152336004820152602401610385565b805115806108ad5750604081015163ffffffff16155b156108e4576040517f9ff6d96b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818160800151146109315760808101516040517f79aa5c5f000000000000000000000000000000000000000000000000000000008152600481019190915260248101839052604401610385565b6004546020820151604080840151905173ffffffffffffffffffffffffffffffffffffffff87169363ffffffff16927f56c9f1d1001236f66c1e5d598905029b4093031f31aead3449a53d832eade225926109a992889060ff93909316835263ffffffff919091166020830152604082015260600190565b60405180910390a3600060408281018281526080840183815273ffffffffffffffffffffffffffffffffffffffff878116855260076020908152939094208551815494870151935160608801517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00009096169115157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169190911761010060ff909516948502177fffffffffffff000000000000000000000000000000000000000000000000ffff166201000063ffffffff90921682027fffffffffffff0000000000000000000000000000000000000000ffffffffffff16176601000000000000959096169490940294909417845551600190930192909255600980549091600291610adb9185910461ffff16613863565b92506101000a81548161ffff021916908361ffff160217905550505050565b60095460028054604080516020808402820181019092528281526060948594859462010000830461ffff169464010000000090930460ff16936000938493919290849084015b82821015610bec5760008481526020908190206040805160a08101825260038602909201805473ffffffffffffffffffffffffffffffffffffffff90811684526001808301548216858701526002909201549081169284019290925260ff74010000000000000000000000000000000000000000830481166060850152750100000000000000000000000000000000000000000090920490911660808301529083529092019101610b40565b50505050905060005b8151811015610cbb57600060076000848481518110610c1657610c1661387e565b60209081029190910181015181015173ffffffffffffffffffffffffffffffffffffffff9081168352828201939093526040918201600020825160a081018452815460ff808216151583526101008204169382019390935263ffffffff6201000084041693810184905266010000000000009092049093166060820152600190920154608083015290915015610cb257610caf846138ad565b93505b50600101610bf5565b508167ffffffffffffffff811115610cd557610cd5613471565b604051908082528060200260200182016040528015610cfe578160200160208202803683370190505b5096508167ffffffffffffffff811115610d1a57610d1a613471565b604051908082528060200260200182016040528015610d43578160200160208202803683370190505b5095508167ffffffffffffffff811115610d5f57610d5f613471565b604051908082528060200260200182016040528015610d88578160200160208202803683370190505b5094506000805b8251811015610ef0576000838281518110610dac57610dac61387e565b60209081029190910181015181015173ffffffffffffffffffffffffffffffffffffffff808216600090815260078452604090819020815160a081018352815460ff808216151583526101008204169682019690965263ffffffff6201000087041692810183905266010000000000009095049092166060850152600190910154608084015290925015610ee657818b8581518110610e4d57610e4d61387e565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505080604001518a8581518110610e9e57610e9e61387e565b602002602001019063ffffffff16908163ffffffff16815250508060800151898581518110610ecf57610ecf61387e565b6020908102919091010152610ee3846138ad565b93505b5050600101610d8f565b505050509091929394565b6040805160608082018352808252600060208084018290528385018290526004548551600280549384028201608090810190985294810183815263ffffffff808416986401000000009094041696959194919385939192859285015b828210156110035760008481526020908190206040805160a08101825260038602909201805473ffffffffffffffffffffffffffffffffffffffff90811684526001808301548216858701526002909201549081169284019290925260ff74010000000000000000000000000000000000000000830481166060850152750100000000000000000000000000000000000000000090920490911660808301529083529092019101610f57565b505050908252506001919091015461ffff8082166020840152620100009091041660409091015292939192919050565b61103b612128565b611044816121a9565b50565b60006006816110a561105e368690038601866138e5565b80516020918201516040805173ffffffffffffffffffffffffffffffffffffffff909316838501528281019190915280518083038201815260609092019052805191012090565b8152602081019190915260400160002054760100000000000000000000000000000000000000000000900460ff1692915050565b6110e1612128565b60005b818110156114055760008383838181106111005761110061387e565b905060600201803603810190611116919061393c565b805173ffffffffffffffffffffffffffffffffffffffff908116600090815260076020908152604091829020825160a081018452815460ff808216151583526101008204169382019390935263ffffffff6201000084041681850152660100000000000090920490931660608201526001909201546080830152820151919250901580156111ac57508160200151816080015114155b156112145781516080820151602080850151604080519384529183015273ffffffffffffffffffffffffffffffffffffffff909216917ff4e3b20447f3f83360469333a2578825ae355d192dd6f59c6516d832fa425a53910160405180910390a250506113fd565b8051158061122a5750604081015163ffffffff16155b156112365750506113fd565b81516004546020838101516040808601516080870151825160ff909416845263ffffffff918216948401949094529082019290925273ffffffffffffffffffffffffffffffffffffffff909316929116907f56c9f1d1001236f66c1e5d598905029b4093031f31aead3449a53d832eade2259060600160405180910390a36000604082810182815260808401838152855173ffffffffffffffffffffffffffffffffffffffff908116855260076020908152939094208551815494870151935160608801517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00009096169115157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169190911761010060ff909516948502177fffffffffffff000000000000000000000000000000000000000000000000ffff166201000063ffffffff90921682027fffffffffffff0000000000000000000000000000000000000000ffffffffffff161766010000000000009590961694909402949094178455516001909301929092556009805490916002916113e09185910461ffff16613863565b92506101000a81548161ffff021916908361ffff16021790555050505b6001016110e4565b50600954640100000000900460ff16801561142e575060095461ffff8082166201000090920416105b1561158657600980547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff1690556040517f08c773aaf7568c6b9110dcdfc13c27177410582ee30e157d1aa306b49d603eb790600090a160408051600280546080602082028401810190945260608301818152611586948492849160009085015b8282101561155a5760008481526020908190206040805160a08101825260038602909201805473ffffffffffffffffffffffffffffffffffffffff90811684526001808301548216858701526002909201549081169284019290925260ff740100000000000000000000000000000000000000008304811660608501527501000000000000000000000000000000000000000000909204909116608083015290835290920191016114ae565b505050908252506001919091015461ffff808216602084015262010000909104166040909101526121a9565b5050565b60015473ffffffffffffffffffffffffffffffffffffffff16331461160b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610385565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b600954640100000000900460ff16156116cc576040517fca47cca000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600454336000908152600560209081526040918290208251606081018452905463ffffffff81811680845260ff6401000000008404811695850195909552650100000000009092049093169382019390935292169190821461175c576040517f669f262e000000000000000000000000000000000000000000000000000000008152336004820152602401610385565b60005b83811015611bad57600085858381811061177b5761177b61387e565b90506040020180360381019061179191906138e5565b905060006117e08280516020918201516040805173ffffffffffffffffffffffffffffffffffffffff909316838501528281019190915280518083038201815260609092019052805191012090565b6000818152600660209081526040918290208251608081018452905463ffffffff81168252640100000000810461ffff1692820192909252660100000000000082046fffffffffffffffffffffffffffffffff1692810192909252760100000000000000000000000000000000000000000000900460ff161580156060830152919250906118c5573373ffffffffffffffffffffffffffffffffffffffff168663ffffffff167f274d6d5b916b0a53974b7ab86c844b97a2e03a60f658cd9a4b1c028b604d7bf1856040516118b5919061398a565b60405180910390a3505050611ba5565b8563ffffffff16816000015163ffffffff161461190857506040805160808101825263ffffffff8716815260006020820181905291810182905260608101919091525b61191a81604001518660400151612c7a565b1561196c573373ffffffffffffffffffffffffffffffffffffffff168663ffffffff167f6dfbb745226fa630aeb1b9557d17d508ddb789a04f0cb873ec16e58beb8beead856040516118b5919061398a565b61197e81604001518660400151612cb4565b6fffffffffffffffffffffffffffffffff166040820152602080860151908201805160ff909216916119b1908390613841565b61ffff1690525060208581015160408051865173ffffffffffffffffffffffffffffffffffffffff168152868401519381019390935260ff9091168282015251339163ffffffff8916917f2a08a2bd2798f0aae9a843f0f4ad4de488c1b3d5f04049940cfed736ad69fb979181900360600190a3600354602082015161ffff918216911610611ab85760016060820152602081015160405163ffffffff8816917f8257378aa73bf8e4ada848713526584a3dcee0fd3db3beed7397f7a7f5067cc991611aaf918791825173ffffffffffffffffffffffffffffffffffffffff1681526020928301519281019290925261ffff16604082015260600190565b60405180910390a25b6000918252600660209081526040928390208251815492840151948401516060909401511515760100000000000000000000000000000000000000000000027fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff6fffffffffffffffffffffffffffffffff909516660100000000000002949094167fffffffffffffffffff0000000000000000000000000000000000ffffffffffff61ffff909616640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000090941663ffffffff90921691909117929092179390931617179055505b60010161175f565b5050505050565b611bbc612128565b60045463ffffffff1660005b82811015611d86576000848483818110611be457611be461387e565b905060400201803603810190611bfa91906138e5565b90506000611c498280516020918201516040805173ffffffffffffffffffffffffffffffffffffffff909316838501528281019190915280518083038201815260609092019052805191012090565b60008181526006602081815260408084208151608081018352815463ffffffff808216835261ffff640100000000830416838701526fffffffffffffffffffffffffffffffff66010000000000008304169483019490945260ff76010000000000000000000000000000000000000000000082041615156060830190815296889052949093527fffffffffffffffffff000000000000000000000000000000000000000000000090931690925591518251939450919281169087161480611d0d5750805b15611d775760408051855173ffffffffffffffffffffffffffffffffffffffff1681526020808701519082015282151581830152905163ffffffff8816917f7d15a6eebaa019ea7d5b7d38937c51ebd3befbfdf51bb630a694fd28635bbcba919081900360600190a25b50505050806001019050611bc8565b50505050565b611d94612128565b6040514281527f367ba81ba03ea9fa7ee089ecfb43b1c35e0935bc87a472abf615b7580dc16b799060200160405180910390a1600954640100000000900460ff16611e4f57600980547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff1664010000000017905560045460405163ffffffff909116907f6ec7e144a45fa03ed986874794df08b5b6bbbb27ed6454b4e6eaa74248b5e33390611e469042815260200190565b60405180910390a25b565b611e59612128565b61104481612cd7565b606060008080611e7a61105e368790038701876138e5565b6000818152600660209081526040918290208251608081018452905463ffffffff808216808452640100000000830461ffff1694840194909452660100000000000082046fffffffffffffffffffffffffffffffff1694830194909452760100000000000000000000000000000000000000000000900460ff1615156060820181905260045490965093945092909116900361211f5760208101516040820151909450611f2681612dcc565b60ff1667ffffffffffffffff811115611f4157611f41613471565b604051908082528060200260200182016040528015611f6a578160200160208202803683370190505b506002805460408051602080840282018101909252828152939950600093929190849084015b8282101561203c5760008481526020908190206040805160a08101825260038602909201805473ffffffffffffffffffffffffffffffffffffffff90811684526001808301548216858701526002909201549081169284019290925260ff74010000000000000000000000000000000000000000830481166060850152750100000000000000000000000000000000000000000090920490911660808301529083529092019101611f90565b5050505090506000805b825181101561211a576120ac84600560008685815181106120695761206961387e565b6020908102919091018101515173ffffffffffffffffffffffffffffffffffffffff1682528101919091526040016000205465010000000000900460ff16612c7a565b15612112578281815181106120c3576120c361387e565b6020026020010151600001518983815181106120e1576120e161387e565b73ffffffffffffffffffffffffffffffffffffffff9092166020928302919091019091015261210f826138ad565b91505b600101612046565b505050505b50509193909250565b60005473ffffffffffffffffffffffffffffffffffffffff163314611e4f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610385565b600954640100000000900460ff16156121ee576040517fca47cca000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6121f781612e0b565b61222d576040517f35be3ac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160028054608060208202840181019094526060830181815260009484928491879085015b828210156123015760008481526020908190206040805160a08101825260038602909201805473ffffffffffffffffffffffffffffffffffffffff90811684526001808301548216858701526002909201549081169284019290925260ff74010000000000000000000000000000000000000000830481166060850152750100000000000000000000000000000000000000000090920490911660808301529083529092019101612255565b505050908252506001919091015461ffff80821660208085019190915262010000928390048216604094850152860151600380549488015183169093027fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000090941691161791909117905590505b6002541561253957600280546000919061238a906001906139b7565b8154811061239a5761239a61387e565b600091825260208083206040805160a0810182526003909402909101805473ffffffffffffffffffffffffffffffffffffffff908116808652600183015482168686019081526002938401548084168887015260ff740100000000000000000000000000000000000000008204811660608a015275010000000000000000000000000000000000000000009091041660808801529087526005855283872080547fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000016905551168552600790925290922080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690558154909250806124a2576124a26139ca565b60008281526020902060037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019182020180547fffffffffffffffffffffffff00000000000000000000000000000000000000009081168255600182018054909116905560020180547fffffffffffffffffffff0000000000000000000000000000000000000000000016905590555061236e565b60005b8251518110156126835782518051600291908390811061255e5761255e61387e565b6020908102919091018101518254600181810185556000948552938390208251600390920201805473ffffffffffffffffffffffffffffffffffffffff9283167fffffffffffffffffffffffff00000000000000000000000000000000000000009182161782559383015181860180549184169190951617909355604082015160029093018054606084015160809094015160ff9081167501000000000000000000000000000000000000000000027fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff9190951674010000000000000000000000000000000000000000027fffffffffffffffffffffff000000000000000000000000000000000000000000909216959093169490941793909317161790550161253c565b506004805460009061269a9063ffffffff1661381e565b82546101009290920a63ffffffff8181021990931691831602179091556004541660005b83515160ff8216101561290857600084600001518260ff16815181106126e6576126e661387e565b602090810291909101810151604080516060808201835263ffffffff88811683528185015160ff908116848801908152898216858701908152875173ffffffffffffffffffffffffffffffffffffffff908116600090815260058b5288812097518854945193519087167fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000009095169490941764010000000093861693909302929092177fffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffff16650100000000009385169390930292909217909555855160a08101875260018082526080808a01518516838c019081528a8c01805186168a526007808e528b8b205462010000908190048a16878e019081529d8d015188169a87019a8b52825188168c52818f528c8c20860154948701948552915187168b52909c5298909720915182549851995196517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00009099169015157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16176101009990941698909802929092177fffffffffffff000000000000000000000000000000000000000000000000ffff16939092169096027fffffffffffff0000000000000000000000000000000000000000ffffffffffff1691909117660100000000000093909116929092029190911783555191015550612901816139f9565b90506126be565b506004805463ffffffff438116640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff90921691909117909155604051908216907f7cf8e698b191db138396ab0eae2ad5b3fe353fd014fd5956b034b86f2d605cfd9061297b908690613a18565b60405180910390a2604080516060810182528482015161ffff168152600060208201819052918101829052905b83515160ff82161015612b9b57600084600001518260ff16815181106129d0576129d061387e565b60209081029190910181015181015173ffffffffffffffffffffffffffffffffffffffff808216600090815260078452604090819020815160a081018352815460ff808216151580845261010083049091169783019790975263ffffffff620100008204169382019390935266010000000000009092049092166060820152600190910154608082015290925090612ab65773ffffffffffffffffffffffffffffffffffffffff8216600090815260076020526040812080547fffffffffffff000000000000000000000000000000000000000000000000000016815560010155612b88565b80518015612ace57506000816040015163ffffffff16115b15612b8857806020015160ff1684602001818151612aec9190613841565b61ffff16905250602080820151604080840151608085015193880151915173ffffffffffffffffffffffffffffffffffffffff87169463ffffffff8b16947fb4a70189a30e3d3b9c77d291f83699633e70ab4427fc3644a955ab4cca077b0394612b7f94919391929160ff94909416845263ffffffff929092166020840152604083015261ffff16606082015260800190565b60405180910390a35b505080612b94906139f9565b90506129a8565b508051602082015161ffff91821691161080156040830152612bf8578163ffffffff167f6ec7e144a45fa03ed986874794df08b5b6bbbb27ed6454b4e6eaa74248b5e33342604051612bef91815260200190565b60405180910390a25b80516009805460208401516040909401511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff61ffff95861662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000090931695909416949094171791909116919091179055505050565b600060808260ff1610612c8f57612c8f613a2b565b50600160ff82161b82166fffffffffffffffffffffffffffffffff1615155b92915050565b600060808260ff1610612cc957612cc9613a2b565b50600160ff919091161b1790565b3373ffffffffffffffffffffffffffffffffffffffff821603612d56576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610385565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60005b6fffffffffffffffffffffffffffffffff821615612e0657612df2600183613a5a565b90911690612dff816139f9565b9050612dcf565b919050565b8051516000901580612e1f57508151516080105b80612e305750602082015161ffff16155b80612e415750604082015161ffff16155b15612e4e57506000919050565b60008060008460000151516003612e659190613a83565b67ffffffffffffffff811115612e7d57612e7d613471565b604051908082528060200260200182016040528015612ea6578160200160208202803683370190505b50905060005b8551518110156130a357600086600001518281518110612ece57612ece61387e565b60200260200101519050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff161480612f2f5750602081015173ffffffffffffffffffffffffffffffffffffffff16155b80612f525750604081015173ffffffffffffffffffffffffffffffffffffffff16155b80612f725750606081015160ff16158015612f725750608081015160ff16155b15612f84575060009695505050505050565b805183612f92846003613a83565b612f9d906000613a9a565b81518110612fad57612fad61387e565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910182015281015183612fe0846003613a83565b612feb906001613a9a565b81518110612ffb57612ffb61387e565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910190910152604081015183613031846003613a83565b61303c906002613a9a565b8151811061304c5761304c61387e565b73ffffffffffffffffffffffffffffffffffffffff9092166020928302919091019091015260608101516130839060ff1686613a9a565b9450806080015160ff16846130989190613a9a565b935050600101612eac565b5060005b81518110156131555760008282815181106130c4576130c461387e565b6020026020010151905060008260016130dd9190613a9a565b90505b835181101561314b578381815181106130fb576130fb61387e565b602002602001015173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361314357506000979650505050505050565b6001016130e0565b50506001016130a7565b50846020015161ffff1683101580156131765750846040015161ffff168210155b95945050505050565b60006020828403121561319157600080fd5b5035919050565b60006020808352835180602085015260005b818110156131c6578581018301518582016040015282016131aa565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b60006020828403121561321757600080fd5b81357fffffffffffffffffffffffffffffffff000000000000000000000000000000008116811461324757600080fd5b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114612e0657600080fd5b6000806040838503121561328557600080fd5b61328e8361324e565b946020939093013593505050565b60008151808452602080850194506020840160005b838110156132e357815173ffffffffffffffffffffffffffffffffffffffff16875295820195908201906001016132b1565b509495945050505050565b60a08152600061330160a083018861329c565b82810360208481019190915287518083528882019282019060005b8181101561333e57845163ffffffff168352938301939183019160010161331c565b50508481036040860152875180825290820192508188019060005b8181101561337557825185529383019391830191600101613359565b50505061ffff8616606085015250905082151560808301525b9695505050505050565b8051606080845281518482018190526000926080916020918201918388019190865b8281101561341f578451805173ffffffffffffffffffffffffffffffffffffffff908116865283820151811684870152604080830151909116908601528781015160ff908116898701529087015116868501529381019360a0909301926001016133ba565b508781015161ffff81168a830152955050506040860151935061338e604088018561ffff169052565b600063ffffffff8086168352808516602084015250606060408301526131766060830184613398565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516060810167ffffffffffffffff811182821017156134c3576134c3613471565b60405290565b60405160a0810167ffffffffffffffff811182821017156134c3576134c3613471565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561353357613533613471565b604052919050565b803560ff81168114612e0657600080fd5b803561ffff81168114612e0657600080fd5b6000602080838503121561357157600080fd5b823567ffffffffffffffff8082111561358957600080fd5b8185019150606080838803121561359f57600080fd5b6135a76134a0565b8335838111156135b657600080fd5b8401601f810189136135c757600080fd5b8035848111156135d9576135d9613471565b6135e7878260051b016134ec565b818152878101955060a091820283018801918b83111561360657600080fd5b928801925b828410156136855780848d0312156136235760008081fd5b61362b6134c9565b6136348561324e565b81526136418a860161324e565b8a820152604061365281870161324e565b9082015261366185880161353b565b87820152608061367281870161353b565b908201528752958801959283019261360b565b50835250613696905084860161354c565b858201526136a66040850161354c565b6040820152979650505050505050565b6000604082840312156136c857600080fd5b50919050565b600080602083850312156136e157600080fd5b823567ffffffffffffffff808211156136f957600080fd5b818501915085601f83011261370d57600080fd5b81358181111561371c57600080fd5b86602060608302850101111561373157600080fd5b60209290920196919550909350505050565b6000806020838503121561375657600080fd5b823567ffffffffffffffff8082111561376e57600080fd5b818501915085601f83011261378257600080fd5b81358181111561379157600080fd5b8660208260061b850101111561373157600080fd5b6000602082840312156137b857600080fd5b6132478261324e565b6060815260006137d4606083018661329c565b61ffff94909416602083015250901515604090910152919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff808316818103613837576138376137ef565b6001019392505050565b61ffff81811683821601908082111561385c5761385c6137ef565b5092915050565b61ffff82811682821603908082111561385c5761385c6137ef565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036138de576138de6137ef565b5060010190565b6000604082840312156138f757600080fd5b6040516040810181811067ffffffffffffffff8211171561391a5761391a613471565b6040526139268361324e565b8152602083013560208201528091505092915050565b60006060828403121561394e57600080fd5b6139566134a0565b61395f8361324e565b8152602083013560208201526040830135801515811461397e57600080fd5b60408201529392505050565b815173ffffffffffffffffffffffffffffffffffffffff1681526020808301519082015260408101612cae565b81810381811115612cae57612cae6137ef565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600060ff821660ff8103613a0f57613a0f6137ef565b60010192915050565b6020815260006132476020830184613398565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b6fffffffffffffffffffffffffffffffff82811682821603908082111561385c5761385c6137ef565b8082028115828204841417612cae57612cae6137ef565b80820180821115612cae57612cae6137ef56fea164736f6c6343000818000a", + ABI: "[{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"blessVoteAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"curseVoteAddr\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"blessWeight\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"curseWeight\",\"type\":\"uint8\"}],\"internalType\":\"structRMN.Voter[]\",\"name\":\"voters\",\"type\":\"tuple[]\"},{\"internalType\":\"uint16\",\"name\":\"blessWeightThreshold\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"curseWeightThreshold\",\"type\":\"uint16\"}],\"internalType\":\"structRMN.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"InvalidConfig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"internalType\":\"bytes16\",\"name\":\"curseId\",\"type\":\"bytes16\"}],\"name\":\"ReusedCurseId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SubjectsMustBeStrictlyIncreasing\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"}],\"name\":\"UnauthorizedVoter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnvoteToCurseNoop\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VoteToBlessForbiddenDuringActiveGlobalCurse\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VoteToBlessNoop\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VoteToCurseNoop\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"commitStore\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"structIRMN.TaggedRoot\",\"name\":\"taggedRoot\",\"type\":\"tuple\"}],\"name\":\"AlreadyBlessed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"commitStore\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"structIRMN.TaggedRoot\",\"name\":\"taggedRoot\",\"type\":\"tuple\"}],\"name\":\"AlreadyVotedToBless\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"},{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"blessVoteAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"curseVoteAddr\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"blessWeight\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"curseWeight\",\"type\":\"uint8\"}],\"internalType\":\"structRMN.Voter[]\",\"name\":\"voters\",\"type\":\"tuple[]\"},{\"internalType\":\"uint16\",\"name\":\"blessWeightThreshold\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"curseWeightThreshold\",\"type\":\"uint16\"}],\"indexed\":false,\"internalType\":\"structRMN.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes16\",\"name\":\"subject\",\"type\":\"bytes16\"}],\"name\":\"CurseLifted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes16\",\"name\":\"subject\",\"type\":\"bytes16\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockTimestamp\",\"type\":\"uint64\"}],\"name\":\"Cursed\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"commitStore\",\"type\":\"address\"}],\"name\":\"PermaBlessedCommitStoreAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"commitStore\",\"type\":\"address\"}],\"name\":\"PermaBlessedCommitStoreRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes16\",\"name\":\"subject\",\"type\":\"bytes16\"},{\"indexed\":false,\"internalType\":\"bytes28\",\"name\":\"onchainCursesHash\",\"type\":\"bytes28\"},{\"indexed\":false,\"internalType\":\"bytes28\",\"name\":\"cursesHash\",\"type\":\"bytes28\"}],\"name\":\"SkippedUnvoteToCurse\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"commitStore\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"structIRMN.TaggedRoot\",\"name\":\"taggedRoot\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"wasBlessed\",\"type\":\"bool\"}],\"name\":\"TaggedRootBlessVotesReset\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"commitStore\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"structIRMN.TaggedRoot\",\"name\":\"taggedRoot\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"accumulatedWeight\",\"type\":\"uint16\"}],\"name\":\"TaggedRootBlessed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes16\",\"name\":\"subject\",\"type\":\"bytes16\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"weight\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes28\",\"name\":\"cursesHash\",\"type\":\"bytes28\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"remainingAccumulatedWeight\",\"type\":\"uint16\"}],\"name\":\"UnvotedToCurse\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"commitStore\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"structIRMN.TaggedRoot\",\"name\":\"taggedRoot\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"weight\",\"type\":\"uint8\"}],\"name\":\"VotedToBless\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes16\",\"name\":\"subject\",\"type\":\"bytes16\"},{\"indexed\":false,\"internalType\":\"bytes16\",\"name\":\"curseId\",\"type\":\"bytes16\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"weight\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockTimestamp\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes28\",\"name\":\"cursesHash\",\"type\":\"bytes28\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"accumulatedWeight\",\"type\":\"uint16\"}],\"name\":\"VotedToCurse\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"commitStore\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"internalType\":\"structIRMN.TaggedRoot\",\"name\":\"taggedRoot\",\"type\":\"tuple\"}],\"name\":\"getBlessProgress\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"blessVoteAddrs\",\"type\":\"address[]\"},{\"internalType\":\"uint16\",\"name\":\"accumulatedWeight\",\"type\":\"uint16\"},{\"internalType\":\"bool\",\"name\":\"blessed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfigDetails\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"version\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blockNumber\",\"type\":\"uint32\"},{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"blessVoteAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"curseVoteAddr\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"blessWeight\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"curseWeight\",\"type\":\"uint8\"}],\"internalType\":\"structRMN.Voter[]\",\"name\":\"voters\",\"type\":\"tuple[]\"},{\"internalType\":\"uint16\",\"name\":\"blessWeightThreshold\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"curseWeightThreshold\",\"type\":\"uint16\"}],\"internalType\":\"structRMN.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes16\",\"name\":\"subject\",\"type\":\"bytes16\"}],\"name\":\"getCurseProgress\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"curseVoteAddrs\",\"type\":\"address[]\"},{\"internalType\":\"bytes28[]\",\"name\":\"cursesHashes\",\"type\":\"bytes28[]\"},{\"internalType\":\"uint16\",\"name\":\"accumulatedWeight\",\"type\":\"uint16\"},{\"internalType\":\"bool\",\"name\":\"cursed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCursedSubjectsCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPermaBlessedCommitStores\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"offset\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"limit\",\"type\":\"uint256\"}],\"name\":\"getRecordedCurseRelatedOps\",\"outputs\":[{\"components\":[{\"internalType\":\"enumRMN.RecordedCurseRelatedOpTag\",\"name\":\"tag\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"blockTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"cursed\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"curseVoteAddr\",\"type\":\"address\"},{\"internalType\":\"bytes16\",\"name\":\"subject\",\"type\":\"bytes16\"},{\"internalType\":\"bytes16\",\"name\":\"curseId\",\"type\":\"bytes16\"}],\"internalType\":\"structRMN.RecordedCurseRelatedOp[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRecordedCurseRelatedOpsCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"commitStore\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"internalType\":\"structIRMN.TaggedRoot\",\"name\":\"taggedRoot\",\"type\":\"tuple\"}],\"name\":\"isBlessed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes16\",\"name\":\"subject\",\"type\":\"bytes16\"}],\"name\":\"isCursed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isCursed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes16\",\"name\":\"curseId\",\"type\":\"bytes16\"},{\"internalType\":\"bytes16[]\",\"name\":\"subjects\",\"type\":\"bytes16[]\"}],\"name\":\"ownerCurse\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"removes\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"adds\",\"type\":\"address[]\"}],\"name\":\"ownerRemoveThenAddPermaBlessedCommitStores\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"commitStore\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"internalType\":\"structIRMN.TaggedRoot[]\",\"name\":\"taggedRoots\",\"type\":\"tuple[]\"}],\"name\":\"ownerResetBlessVotes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"curseVoteAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"bytes16\",\"name\":\"subject\",\"type\":\"bytes16\"},{\"internalType\":\"bytes28\",\"name\":\"cursesHash\",\"type\":\"bytes28\"}],\"internalType\":\"structRMN.UnvoteToCurseRequest\",\"name\":\"unit\",\"type\":\"tuple\"},{\"internalType\":\"bool\",\"name\":\"forceUnvote\",\"type\":\"bool\"}],\"internalType\":\"structRMN.OwnerUnvoteToCurseRequest[]\",\"name\":\"ownerUnvoteToCurseRequests\",\"type\":\"tuple[]\"}],\"name\":\"ownerUnvoteToCurse\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"blessVoteAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"curseVoteAddr\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"blessWeight\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"curseWeight\",\"type\":\"uint8\"}],\"internalType\":\"structRMN.Voter[]\",\"name\":\"voters\",\"type\":\"tuple[]\"},{\"internalType\":\"uint16\",\"name\":\"blessWeightThreshold\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"curseWeightThreshold\",\"type\":\"uint16\"}],\"internalType\":\"structRMN.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes16\",\"name\":\"subject\",\"type\":\"bytes16\"},{\"internalType\":\"bytes28\",\"name\":\"cursesHash\",\"type\":\"bytes28\"}],\"internalType\":\"structRMN.UnvoteToCurseRequest[]\",\"name\":\"unvoteToCurseRequests\",\"type\":\"tuple[]\"}],\"name\":\"unvoteToCurse\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"commitStore\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"internalType\":\"structIRMN.TaggedRoot[]\",\"name\":\"taggedRoots\",\"type\":\"tuple[]\"}],\"name\":\"voteToBless\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes16\",\"name\":\"curseId\",\"type\":\"bytes16\"},{\"internalType\":\"bytes16[]\",\"name\":\"subjects\",\"type\":\"bytes16[]\"}],\"name\":\"voteToCurse\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60806040523480156200001157600080fd5b506040516200596238038062005962833981016040819052620000349162000aff565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be8162000138565b505060408051608081018252600080825260208201819052918101919091526001600160c81b03606082015290506001620000fb81601062000c7d565b82606001516001600160c81b0316901c6001600160c81b0316101562000125576200012562000c99565b506200013181620001e3565b5062000e14565b336001600160a01b03821603620001925760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b620001ee816200071d565b6200020c576040516306b7c75960e31b815260040160405180910390fd5b602081015160038054604084015161ffff908116620100000263ffffffff199092169316929092179190911790555b60025415620003465760028054600091906200025a9060019062000c7d565b815481106200026d576200026d62000caf565b6000918252602080832060408051608081018252600294850290920180546001600160a01b0390811680855260019092015480821685870190815260ff600160a01b8304811687870152600160a81b909204909116606086015291875260058552828720805465ffffffffffff19169055905116855260099092529220805461ffff191690558054919250908062000309576200030962000cc5565b60008281526020902060026000199092019182020180546001600160a01b031916815560010180546001600160b01b03191690559055506200023b565b60005b81515181101562000403578151805160029190839081106200036f576200036f62000caf565b602090810291909101810151825460018181018555600094855293839020825160029092020180546001600160a01b039283166001600160a01b0319909116178155928201519284018054604084015160609094015160ff908116600160a81b0260ff60a81b1991909516600160a01b026001600160a81b0319909216959093169490941793909317161790550162000349565b50600480546000906200041c9063ffffffff1662000cdb565b82546101009290920a63ffffffff8181021990931691831602179091556004541660005b82515160ff821610156200054157600083600001518260ff16815181106200046c576200046c62000caf565b602090810291909101810151604080516060808201835263ffffffff80891683528385015160ff90811684880190815289821685870190815287516001600160a01b03908116600090815260058b5288812097518854945193518616650100000000000260ff60281b199487166401000000000264ffffffffff1990961691909716179390931791909116939093179094558587015190911683526009909552919020805491909201519092166101000261ffff1990921691909117600117905550620005398162000d01565b905062000440565b506001600160a01b0360005260096020527f3bddde647ecb7992f4c710d4e1d59d07614508581f7c22c879a79d28544538a7805461ffff191660011790556004805463ffffffff4381166401000000000263ffffffff60201b1990921691909117909155604051908216907f8c49fda8177c5c8c768eb39634bc6773695c7181711537b822451c12b2efd2a990620005db90859062000d23565b60405180910390a26040805160c08101825260048082526001600160401b03421660208301526000928201839052606082018390526080820183905260a08201839052600c80546001808201835591909452825160029094027fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7018054939490939092849260ff19909216919084908111156200067c576200067c62000dce565b021790555060208201518154604084015160608501516001600160a01b03166a010000000000000000000002600160501b600160f01b031991151569010000000000000000000260ff60481b196001600160401b039095166101000294909416610100600160501b031990931692909217929092179190911617815560808083015160a090930151811c600160801b0292901c919091176001909101555050565b80515160009015806200073257508151516010105b80620007445750602082015161ffff16155b80620007565750604082015161ffff16155b156200076457506000919050565b600080600084600001515160026200077d919062000de4565b6001600160401b0381111562000797576200079762000a24565b604051908082528060200260200182016040528015620007c1578160200160208202803683370190505b50905060005b8551518110156200095457600086600001518281518110620007ed57620007ed62000caf565b6020026020010151905060006001600160a01b031681600001516001600160a01b0316148062000828575060208101516001600160a01b0316155b806200083f575060208101516001600160a01b0316155b8062000858575060208101516001600160a01b03908116145b806200087a5750604081015160ff161580156200087a5750606081015160ff16155b156200088d575060009695505050505050565b8051836200089d84600262000de4565b620008aa90600062000dfe565b81518110620008bd57620008bd62000caf565b6001600160a01b0390921660209283029190910182015281015183620008e584600262000de4565b620008f290600162000dfe565b8151811062000905576200090562000caf565b6001600160a01b03909216602092830291909101909101526040810151620009319060ff168662000dfe565b9450806060015160ff168462000948919062000dfe565b935050600101620007c7565b5060005b8151811015620009f957600082828151811062000979576200097962000caf565b60200260200101519050600082600162000994919062000dfe565b90505b8351811015620009ee57838181518110620009b657620009b662000caf565b60200260200101516001600160a01b0316826001600160a01b031603620009e557506000979650505050505050565b60010162000997565b505060010162000958565b50846020015161ffff16831015801562000a1b5750846040015161ffff168210155b95945050505050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b038111828210171562000a5f5762000a5f62000a24565b60405290565b604051608081016001600160401b038111828210171562000a5f5762000a5f62000a24565b604051601f8201601f191681016001600160401b038111828210171562000ab55762000ab562000a24565b604052919050565b80516001600160a01b038116811462000ad557600080fd5b919050565b805160ff8116811462000ad557600080fd5b805161ffff8116811462000ad557600080fd5b6000602080838503121562000b1357600080fd5b82516001600160401b038082111562000b2b57600080fd5b8185019150606080838803121562000b4257600080fd5b62000b4c62000a3a565b83518381111562000b5c57600080fd5b8401601f8101891362000b6e57600080fd5b80518481111562000b835762000b8362000a24565b62000b93878260051b0162000a8a565b818152878101955060079190911b82018701908a82111562000bb457600080fd5b918701915b8183101562000c33576080838c03121562000bd45760008081fd5b62000bde62000a65565b62000be98462000abd565b815262000bf889850162000abd565b89820152604062000c0b81860162000ada565b9082015262000c1c84870162000ada565b818701528652948701946080929092019162000bb9565b83525062000c45905084860162000aec565b8582015262000c576040850162000aec565b6040820152979650505050505050565b634e487b7160e01b600052601160045260246000fd5b8181038181111562000c935762000c9362000c67565b92915050565b634e487b7160e01b600052600160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b600063ffffffff80831681810362000cf75762000cf762000c67565b6001019392505050565b600060ff821660ff810362000d1a5762000d1a62000c67565b60010192915050565b60006020808352608080840185516060808588015282825180855260a0890191508684019450600093505b8084101562000da157845180516001600160a01b03908116845288820151168884015260408082015160ff9081169185019190915290840151168383015293860193600193909301929085019062000d4e565b509488015161ffff8116604089015294604089015161ffff811660608a0152955098975050505050505050565b634e487b7160e01b600052602160045260246000fd5b808202811582820484141762000c935762000c9362000c67565b8082018082111562000c935762000c9362000c67565b614b3e8062000e246000396000f3fe608060405234801561001057600080fd5b50600436106101825760003560e01c8063631ec73e116100d8578063979986111161008c578063d927f26711610066578063d927f26714610354578063f2fde38b14610374578063f33f28951461038757600080fd5b8063979986111461030b578063ba86a1f01461031e578063bd147ef41461033157600080fd5b806379ba5097116100bd57806379ba5097146102d35780638da5cb5b146102db578063970b8fc21461030357600080fd5b8063631ec73e146102ad5780636ba0526d146102c057600080fd5b8063397796f71161013a5780634102e4f4116101145780634102e4f4146102745780634d61677114610287578063586abe3c1461029a57600080fd5b8063397796f7146102425780633d0cf6101461024a5780633f42ab731461025d57600080fd5b8063181f5a771161016b578063181f5a77146101ba5780632cbc26bb14610203578063328d716c1461022657600080fd5b80630b009be21461018757806315c65588146101a5575b600080fd5b61018f6103a9565b60405161019c9190613e3f565b60405180910390f35b6101b86101b3366004613fdd565b6103ba565b005b6101f66040518060400160405280600d81526020017f524d4e20312e352e302d6465760000000000000000000000000000000000000081525081565b60405161019c9190614083565b6102166102113660046140f0565b6104e6565b604051901515815260200161019c565b600b5467ffffffffffffffff165b60405190815260200161019c565b6102166105b1565b6101b86102583660046141a0565b61068b565b6102656107ff565b60405161019c939291906142b3565b6101b86102823660046142ff565b610929565b610216610295366004614439565b61093d565b6101b86102a8366004614451565b6109cd565b6101b86102bb3660046144fc565b610a87565b6101b86102ce366004614451565b610ca0565b6101b8610d13565b60005460405173ffffffffffffffffffffffffffffffffffffffff909116815260200161019c565b600c54610234565b6101b86103193660046145d0565b610e10565b6101b861032c3660046145d0565b611368565b61034461033f3660046140f0565b61150d565b60405161019c9493929190614645565b6103676103623660046146b6565b611946565b60405161019c9190614707565b6101b8610382366004614800565b611b68565b61039a610395366004614439565b611b79565b60405161019c9392919061481b565b60606103b56007611de1565b905090565b336000818152600960205260409020805460ff16610421576040517f85412e7f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff831660048201526024015b60405180910390fd5b60045463ffffffff166000805b85518110156104a757600086828151811061044b5761044b614849565b602002602001015190506000610465858360000151611df5565b905060008061047b6001888b8760008d89611fd6565b91509150801561048d5761048d614878565b85806104965750815b95505050505080600101905061042e565b50806104df576040517ffb106b6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050565b600b5460009067ffffffffffffffff16810361050457506000919050565b7f0100000000000000000000000000000100000000000000000000000000000000600052600a6020527fcf943f0e419056430919a3fdfd72276bc0b123ebdd670f4152b82bffbfb8bb385468010000000000000000900460ff16806105a657507fffffffffffffffffffffffffffffffff0000000000000000000000000000000082166000908152600a602052604090205468010000000000000000900460ff165b92915050565b919050565b600b5460009067ffffffffffffffff1681036105cd5750600090565b7f0100000000000000000000000000000100000000000000000000000000000000600052600a6020527fcf943f0e419056430919a3fdfd72276bc0b123ebdd670f4152b82bffbfb8bb385468010000000000000000900460ff16806103b55750507f0100000000000000000000000000000000000000000000000000000000000000600052600a6020527f1d4cd6d2639449a552dbfb463b59316946d78c518b3170daa4a4c217bef019ba5468010000000000000000900460ff1690565b6106936126a4565b60005b8251811015610746576106cc8382815181106106b4576106b4614849565b6020026020010151600761272790919063ffffffff16565b1561073e577fdca892154bbc36d0c05ccd01b3d0411875cb1b841fcdeebb384e5d0d6eb06b4483828151811061070457610704614849565b6020026020010151604051610735919073ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b60405180910390a15b600101610696565b5060005b81518110156107fa5761078082828151811061076857610768614849565b6020026020010151600761274990919063ffffffff16565b156107f2577f66b4b4752c65ae8cd2f3a0a48c7dc8b2118c60d5ea15514992eb2ddf56c9cb158282815181106107b8576107b8614849565b60200260200101516040516107e9919073ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b60405180910390a15b60010161074a565b505050565b6040805160608082018352808252600060208084018290528385018290526004548551600280549384028201608090810190985294810183815263ffffffff808416986401000000009094041696959194919385939192859285015b828210156108f95760008481526020908190206040805160808101825260028602909201805473ffffffffffffffffffffffffffffffffffffffff90811684526001918201549081168486015260ff740100000000000000000000000000000000000000008204811693850193909352750100000000000000000000000000000000000000000090049091166060830152908352909201910161085b565b505050908252506001919091015461ffff8082166020840152620100009091041660409091015292939192919050565b6109316126a4565b61093a8161276b565b50565b600060068161099b610954368690038601866148a7565b80516020918201516040805173ffffffffffffffffffffffffffffffffffffffff909316838501528281019190915280518083038201815260609092019052805191012090565b815260208101919091526040016000205460ff16806105a657506105a66109c56020840184614800565b600790612eef565b337fffffffffffffffffffffffff000000000000000000000000000000000000000181016109fd576109fd614878565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600960205260409020805460ff16610a75576040517f85412e7f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152602401610418565b610a8182858584612f1e565b50505050565b610a8f6126a4565b600454600090819063ffffffff16815b8451811015610b66576000858281518110610abc57610abc614849565b602002602001015190506000610ada84836020015160000151611df5565b9050600080610b3d600087866000015187602001518860400151600960008b6000015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002089611fd6565b915091508680610b4a5750815b96508780610b555750805b975050505050806001019050610a9f565b508215610c615760408051600280546080602082028401810190945260608301818152610c61948492849160009085015b82821015610c355760008481526020908190206040805160808101825260028602909201805473ffffffffffffffffffffffffffffffffffffffff90811684526001918201549081168486015260ff7401000000000000000000000000000000000000000082048116938501939093527501000000000000000000000000000000000000000000900490911660608301529083529092019101610b97565b505050908252506001919091015461ffff8082166020840152620100009091041660409091015261276b565b8180610c6a5750825b610a81576040517ffb106b6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ca86126a4565b73ffffffffffffffffffffffffffffffffffffffff60005260096020527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f3bddde647ecb7992f4c710d4e1d59d07614508581f7c22c879a79d28544538a7610a8182858584612f1e565b60015473ffffffffffffffffffffffffffffffffffffffff163314610d94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610418565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610e397f01000000000000000000000000000001000000000000000000000000000000006104e6565b15610e70576040517fcde2d97c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600454336000908152600560209081526040918290208251606081018452905463ffffffff81811680845260ff64010000000084048116958501959095526501000000000090920490931693820193909352921691908214610f00576040517f85412e7f000000000000000000000000000000000000000000000000000000008152336004820152602401610418565b600160005b8481101561132f576000868683818110610f2157610f21614849565b905060400201803603810190610f3791906148a7565b90506000610f868280516020918201516040805173ffffffffffffffffffffffffffffffffffffffff909316838501528281019190915280518083038201815260609092019052805191012090565b6000818152600660209081526040918290208251608081018452905460ff81161580158352610100820463ffffffff169383019390935265010000000000810461ffff169382019390935267010000000000000090920478ffffffffffffffffffffffffffffffffffffffffffffffffff16606083015291925090611062573373ffffffffffffffffffffffffffffffffffffffff168763ffffffff167f274d6d5b916b0a53974b7ab86c844b97a2e03a60f658cd9a4b1c028b604d7bf18560405161105291906148e0565b60405180910390a3505050611327565b8663ffffffff16816020015163ffffffff16146110a8575060408051608081018252600080825263ffffffff89166020830152918101829052606081019190915261110c565b6110ba816060015187604001516136d6565b1561110c573373ffffffffffffffffffffffffffffffffffffffff168763ffffffff167f6dfbb745226fa630aeb1b9557d17d508ddb789a04f0cb873ec16e58beb8beead8560405161105291906148e0565b6000945061112281606001518760400151613718565b78ffffffffffffffffffffffffffffffffffffffffffffffffff166060820152602086015160408201805160ff9092169161115e90839061493c565b61ffff1690525060208681015160408051865173ffffffffffffffffffffffffffffffffffffffff168152868401519381019390935260ff9091168282015251339163ffffffff8a16917f2a08a2bd2798f0aae9a843f0f4ad4de488c1b3d5f04049940cfed736ad69fb979181900360600190a3600354604082015161ffff91821691161061125757600181526040808201518151855173ffffffffffffffffffffffffffffffffffffffff1681526020808701519082015261ffff90911681830152905163ffffffff8916917f8257378aa73bf8e4ada848713526584a3dcee0fd3db3beed7397f7a7f5067cc9919081900360600190a25b60009182526006602090815260409283902082518154928401519484015160609094015178ffffffffffffffffffffffffffffffffffffffffffffffffff166701000000000000000266ffffffffffffff61ffff90951665010000000000029490941664ffffffffff63ffffffff909616610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ff921515929092167fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000090941693909317179390931617179055505b600101610f05565b5080156104df576040517f604c767700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6113706126a4565b60045463ffffffff1660005b82811015610a8157600084848381811061139857611398614849565b9050604002018036038101906113ae91906148a7565b905060006113fd8280516020918201516040805173ffffffffffffffffffffffffffffffffffffffff909316838501528281019190915280518083038201815260609092019052805191012090565b60008181526006602081815260408084208151608081018352815460ff811615158252610100810463ffffffff90811683870190815265010000000000830461ffff169584019590955267010000000000000090910478ffffffffffffffffffffffffffffffffffffffffffffffffff16606083015287875294909352939093558051925193945092878216911614806114945750805b156114fe5760408051855173ffffffffffffffffffffffffffffffffffffffff1681526020808701519082015282151581830152905163ffffffff8816917f7d15a6eebaa019ea7d5b7d38937c51ebd3befbfdf51bb630a694fd28635bbcba919081900360600190a25b5050505080600101905061137c565b600454604080516002805460806020820284018101909452606083810182815290958695600095869563ffffffff9093169486949193928492918491879085015b828210156115ec5760008481526020908190206040805160808101825260028602909201805473ffffffffffffffffffffffffffffffffffffffff90811684526001918201549081168486015260ff740100000000000000000000000000000000000000008204811693850193909352750100000000000000000000000000000000000000000090049091166060830152908352909201910161154e565b505050908252506001919091015461ffff80821660208085019190915262010000909204166040928301527fffffffffffffffffffffffffffffffff000000000000000000000000000000008a166000908152600a909152908120805460ff6801000000000000000082041696509293509163ffffffff80861691161080156116725750845b6000965090508560015b60028111611939578451515b6000808760000151518310156116e35787518051849081106116ac576116ac614849565b6020026020010151602001519150876000015183815181106116d0576116d0614849565b602002602001015160600151905061170a565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff905060005b73ffffffffffffffffffffffffffffffffffffffff82166000908152600188016020908152604080832081518083019092525463ffffffff811682526401000000009004821b63ffffffff19169181019190915290878061177a57508a63ffffffff16826000015163ffffffff16145b8061179a575073ffffffffffffffffffffffffffffffffffffffff848116145b80156117b05750602082015163ffffffff191615155b9050801561186d57856001036117d0576117c987614957565b965061186d565b85600203610182576117e560ff84168e61493c565b9c506117f08761498f565b9650838f888151811061180557611805614849565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505081602001518e888151811061185657611856614849565b63ffffffff19909216602092830291909101909101525b84156118835761187c8561498f565b945061188c565b50505050611895565b50505050611688565b81600103611928578267ffffffffffffffff8111156118b6576118b6613e52565b6040519080825280602002602001820160405280156118df578160200160208202803683370190505b509a508267ffffffffffffffff8111156118fb576118fb613e52565b604051908082528060200260200182016040528015611924578160200160208202803683370190505b5099505b5061193281614957565b905061167c565b5050505050509193509193565b600c5460609060009061195984866149c4565b11611965575081611988565b600c5484101561198457600c5461197d9085906149d7565b9050611988565b5060005b60008167ffffffffffffffff8111156119a3576119a3613e52565b604051908082528060200260200182016040528015611a2157816020015b6040805160c08101825260008082526020808301829052928201819052606082018190526080820181905260a082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816119c15790505b50905060005b82811015611b5f57600c611a3b82886149c4565b81548110611a4b57611a4b614849565b600091825260209091206040805160c081019091526002909202018054829060ff166004811115611a7e57611a7e6146d8565b6004811115611a8f57611a8f6146d8565b81528154610100810467ffffffffffffffff1660208301526901000000000000000000810460ff16151560408301526a0100000000000000000000900473ffffffffffffffffffffffffffffffffffffffff166060820152600190910154608081811b7fffffffffffffffffffffffffffffffff0000000000000000000000000000000090811682850152700100000000000000000000000000000000909204901b1660a0909101528251839083908110611b4c57611b4c614849565b6020908102919091010152600101611a27565b50949350505050565b611b706126a4565b61093a8161373b565b606060008080611b91610954368790038701876148a7565b6000818152600660209081526040918290208251608081018452905460ff81161515808352610100820463ffffffff90811694840185905265010000000000830461ffff169584019590955267010000000000000090910478ffffffffffffffffffffffffffffffffffffffffffffffffff166060830152600454909650939450929091169003611dd85760408101516060820151909450611c3281613830565b60ff1667ffffffffffffffff811115611c4d57611c4d613e52565b604051908082528060200260200182016040528015611c76578160200160208202803683370190505b506002805460408051602080840282018101909252828152939950600093929190849084015b82821015611d3a5760008481526020908190206040805160808101825260028602909201805473ffffffffffffffffffffffffffffffffffffffff90811684526001918201549081168486015260ff7401000000000000000000000000000000000000000082048116938501939093527501000000000000000000000000000000000000000000900490911660608301529083529092019101611c9c565b5050505090506000805b82518160ff161015611dd357611d5a84826136d6565b15611dc357828160ff1681518110611d7457611d74614849565b602002602001015160000151898381518110611d9257611d92614849565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910190910152611dc082614957565b91505b611dcc816149ea565b9050611d44565b505050505b50509193909250565b60606000611dee8361389f565b9392505050565b7fffffffffffffffffffffffffffffffff0000000000000000000000000000000081166000908152600a60205260408120805463ffffffff858116911614611dee57805463ffffffff19811663ffffffff861690811783556003547fffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000909216176201000090910461ffff1664010000000002177fffffffffffffffffffffffffffffffffffffffffffffffff0000ffffffffffff1680825568010000000000000000900460ff1615611dee57600260005b8154811015611fcd576000826000018281548110611ee657611ee6614849565b6000918252602080832060016002909302018281015473ffffffffffffffffffffffffffffffffffffffff1684529187019052604090912080549192509063ffffffff808a169116108015611f4d57508054640100000000900460201b63ffffffff191615155b15611fc357805463ffffffff191663ffffffff891617815560018201548554750100000000000000000000000000000000000000000090910460ff16908690600690611fa89084906601000000000000900461ffff1661493c565b92506101000a81548161ffff021916908361ffff1602179055505b5050600101611ec6565b50509392505050565b6000806001896001811115611fed57611fed6146d8565b148061200a57506000896001811115612008576120086146d8565b145b61201657612016614878565b8480612037575073ffffffffffffffffffffffffffffffffffffffff878116145b80612056575073ffffffffffffffffffffffffffffffffffffffff8716155b1561207c57600089600181111561206f5761206f6146d8565b1461207c5761207c614878565b73ffffffffffffffffffffffffffffffffffffffff8716600090815260018401602090815260409182902082518084019093525463ffffffff811683526401000000009004811b63ffffffff191690820152845460ff16801561210d575073ffffffffffffffffffffffffffffffffffffffff888116148061210d57508863ffffffff16816000015163ffffffff16145b80156121235750602081015163ffffffff191615155b801561214b5750866020015163ffffffff1916816020015163ffffffff1916148061214b5750855b156122765773ffffffffffffffffffffffffffffffffffffffff881660009081526001858101602052604082209190915585548554919450610100900460ff169085906006906121aa9084906601000000000000900461ffff16614a09565b825461010092830a61ffff818102199092169282160291909117909255895188546020808d01518a54604080517fffffffffffffffffffffffffffffffff0000000000000000000000000000000090961686529590930460ff169184019190915263ffffffff1916828401526601000000000000900490921660608301525173ffffffffffffffffffffffffffffffffffffffff8b16925063ffffffff8c16917fa96a155bd67c927a6c056befbd979b78465e2b2f1276bf7d4e90a31d4f430aa8919081900360800190a35b6000808b600181111561228b5761228b6146d8565b1480156122b3575083806122b3575073ffffffffffffffffffffffffffffffffffffffff8916155b90508080156122cf5750845468010000000000000000900460ff165b80156122e157506122df856138fb565b155b156123b45784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff168555600b80546001945060009061232a9067ffffffffffffffff16614a24565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055507f65d0e78c3625f0956f58610cf0fb157eaf627683258875ef29af2f71d25ac8fd88600001516040516123ab91907fffffffffffffffffffffffffffffffff0000000000000000000000000000000091909116815260200190565b60405180910390a15b83806123bd5750825b15612605576000808c60018111156123d7576123d76146d8565b036123f25787156123ea5750600361240f565b50600261240f565b60018c6001811115612406576124066146d8565b03610182575060015b600c6040518060c0016040528083600481111561242e5761242e6146d8565b81526020014267ffffffffffffffff168152885468010000000000000000900460ff16151560208083019190915273ffffffffffffffffffffffffffffffffffffffff8e1660408301528c517fffffffffffffffffffffffffffffffff00000000000000000000000000000000166060830152600060809092018290528354600180820186559483529120825160029092020180549293909283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0090911690836004811115612500576125006146d8565b0217905550602082015181546040840151606085015173ffffffffffffffffffffffffffffffffffffffff166a0100000000000000000000027fffff0000000000000000000000000000000000000000ffffffffffffffffffff9115156901000000000000000000027fffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffff67ffffffffffffffff90951661010002949094167fffffffffffffffffffffffffffffffffffffffffffff000000000000000000ff90931692909217929092179190911617815560808083015160a090930151811c7001000000000000000000000000000000000292901c9190911760019091015550612696565b8751602080840151818b0151604080517fffffffffffffffffffffffffffffffff00000000000000000000000000000000909516855263ffffffff1992831693850193909352169082015273ffffffffffffffffffffffffffffffffffffffff8a16907fbabb0d7099e6ca14a29fad2a2cfb4fda2bd30f97cb3c27e546174bfb4277c1cc9060600160405180910390a25b505097509795505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314612725576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610418565b565b6000611dee8373ffffffffffffffffffffffffffffffffffffffff841661395c565b6000611dee8373ffffffffffffffffffffffffffffffffffffffff8416613a56565b61277481613aa5565b6127aa576040517f35be3ac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602081015160038054604084015161ffff908116620100000263ffffffff199092169316929092179190911790555b6002541561298e5760028054600091906127f5906001906149d7565b8154811061280557612805614849565b60009182526020808320604080516080810182526002948502909201805473ffffffffffffffffffffffffffffffffffffffff90811680855260019092015480821685870190815260ff740100000000000000000000000000000000000000008304811687870152750100000000000000000000000000000000000000000090920490911660608601529187526005855282872080547fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000016905590511685526009909252922080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001690558054919250908061290457612904614a66565b60008281526020902060027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019182020180547fffffffffffffffffffffffff000000000000000000000000000000000000000016815560010180547fffffffffffffffffffff000000000000000000000000000000000000000000001690559055506127d9565b60005b815151811015612ac1578151805160029190839081106129b3576129b3614849565b6020908102919091018101518254600181810185556000948552938390208251600290920201805473ffffffffffffffffffffffffffffffffffffffff9283167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116178155928201519284018054604084015160609094015160ff9081167501000000000000000000000000000000000000000000027fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff9190951674010000000000000000000000000000000000000000027fffffffffffffffffffffff0000000000000000000000000000000000000000009092169590931694909417939093171617905501612991565b5060048054600090612ad89063ffffffff16614a95565b82546101009290920a63ffffffff8181021990931691831602179091556004541660005b82515160ff82161015612c5557600083600001518260ff1681518110612b2457612b24614849565b602090810291909101810151604080516060808201835263ffffffff80891683528385015160ff908116848801908152898216858701908152875173ffffffffffffffffffffffffffffffffffffffff908116600090815260058b528881209751885494519351861665010000000000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffff948716640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000009096169190971617939093179190911693909317909455858701519091168352600990955291902080549190920151909216610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000090921691909117600117905550612c4e816149ea565b9050612afc565b5073ffffffffffffffffffffffffffffffffffffffff60005260096020527f3bddde647ecb7992f4c710d4e1d59d07614508581f7c22c879a79d28544538a780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001660011790556004805463ffffffff438116640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff90921691909117909155604051908216907f8c49fda8177c5c8c768eb39634bc6773695c7181711537b822451c12b2efd2a990612d2f908590614ab8565b60405180910390a26040805160c081018252600480825267ffffffffffffffff421660208301526000928201839052606082018390526080820183905260a08201839052600c80546001808201835591909452825160029094027fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c701805493949093909284927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0090921691908490811115612dec57612dec6146d8565b0217905550602082015181546040840151606085015173ffffffffffffffffffffffffffffffffffffffff166a0100000000000000000000027fffff0000000000000000000000000000000000000000ffffffffffffffffffff9115156901000000000000000000027fffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffff67ffffffffffffffff90951661010002949094167fffffffffffffffffffffffffffffffffffffffffffff000000000000000000ff90931692909217929092179190911617815560808083015160a090930151811c7001000000000000000000000000000000000292901c919091176001909101555050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001830160205260408120541515611dee565b8151600003612f59576040517f55e9b08b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fffffffffffffffffffffffffffffffff000000000000000000000000000000008316600090815260018201602052604090205460ff1615613007576040517f078f340000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff851660048201527fffffffffffffffffffffffffffffffff0000000000000000000000000000000084166024820152604401610418565b7fffffffffffffffffffffffffffffffff000000000000000000000000000000008316600090815260018281016020526040822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016909117905560045463ffffffff16905b83518110156136ce57600181101580156130ed575083818151811061309657613096614849565b60200260200101516fffffffffffffffffffffffffffffffff1916846001836130bf91906149d7565b815181106130cf576130cf614849565b60200260200101516fffffffffffffffffffffffffffffffff191610155b15613124576040517f2432d8ea00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600084828151811061313857613138614849565b60200260200101519050600061314e8483611df5565b73ffffffffffffffffffffffffffffffffffffffff8981166000818152600184016020908152604080832081518083019092525463ffffffff811682526401000000009004821b63ffffffff19169181019190915293945091148015906131be5750815163ffffffff8088169116105b806131d25750602082015163ffffffff1916155b15613225575085548254600091610100900460ff169084906006906132069084906601000000000000900461ffff1661493c565b92506101000a81548161ffff021916908361ffff16021790555061322c565b5060208101515b60408051808201825263ffffffff88168152815163ffffffff1984166020828101919091527fffffffffffffffffffffffffffffffff000000000000000000000000000000008d16828501528351808303850181526060909201909352805190830120909182019063ffffffff1916905273ffffffffffffffffffffffffffffffffffffffff8b166000818152600186016020908152604090912083518285015190921c6401000000000263ffffffff92831617905589549294509091908816907f8137bc8a8d712aaa27bfc6506d5566ac405618bd53f9831b8ca6b6fe5442ee7a9087908d9060ff610100909104166133234290565b6020898101518b54604080517fffffffffffffffffffffffffffffffff000000000000000000000000000000009889168152979096169287019290925260ff9093169385019390935267ffffffffffffffff16606084015263ffffffff191660808301526601000000000000900461ffff1660a082015260c00160405180910390a363ffffffff1981161580156133c85750825468010000000000000000900460ff16155b80156133d857506133d8836138fb565b156134c35782547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff1668010000000000000000178355600b80546000906134289067ffffffffffffffff16614acb565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508563ffffffff167fcfdbfd8ce9a56b5f7c202c0e102184d24f47ca87121dc165063fc4c290957bde8561347e4290565b604080517fffffffffffffffffffffffffffffffff00000000000000000000000000000000909316835267ffffffffffffffff90911660208301520160405180910390a25b6040805160c081018252600080825267ffffffffffffffff42166020830152855460ff680100000000000000009091041615159282019290925273ffffffffffffffffffffffffffffffffffffffff8c1660608201527fffffffffffffffffffffffffffffffff0000000000000000000000000000000086811660808301528b1660a0820152600c80546001808201835591909352815160029093027fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c701805492939092909183917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016908360048111156135c0576135c06146d8565b0217905550602082015181546040840151606085015173ffffffffffffffffffffffffffffffffffffffff166a0100000000000000000000027fffff0000000000000000000000000000000000000000ffffffffffffffffffff9115156901000000000000000000027fffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffff67ffffffffffffffff90951661010002949094167fffffffffffffffffffffffffffffffffffffffffffff000000000000000000ff90931692909217929092179190911617815560808083015160a090930151811c7001000000000000000000000000000000000292901c9190911760019182015594909401935061306f92505050565b505050505050565b600060108260ff16106136eb576136eb614878565b50600160ff82161b821678ffffffffffffffffffffffffffffffffffffffffffffffffff16151592915050565b600060108260ff161061372d5761372d614878565b50600160ff919091161b1790565b3373ffffffffffffffffffffffffffffffffffffffff8216036137ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610418565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60006201000078ffffffffffffffffffffffffffffffffffffffffffffffffff83161061385f5761385f614878565b78ffffffffffffffffffffffffffffffffffffffffffffffffff8216156105ac5761388b600183614ae8565b90911690613898816149ea565b905061385f565b6060816000018054806020026020016040519081016040528092919081815260200182805480156138ef57602002820191906000526020600020905b8154815260200190600101908083116138db575b50505050509050919050565b73ffffffffffffffffffffffffffffffffffffffff600090815260018201602090815260408220546401000000009004901b63ffffffff19161515806105a65750505461ffff64010000000082048116660100000000000090920416101590565b60008181526001830160205260408120548015613a455760006139806001836149d7565b8554909150600090613994906001906149d7565b90508181146139f95760008660000182815481106139b4576139b4614849565b90600052602060002001549050808760000184815481106139d7576139d7614849565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613a0a57613a0a614a66565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506105a6565b60009150506105a6565b5092915050565b6000818152600183016020526040812054613a9d575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556105a6565b5060006105a6565b8051516000901580613ab957508151516010105b80613aca5750602082015161ffff16155b80613adb5750604082015161ffff16155b15613ae857506000919050565b60008060008460000151516002613aff9190614b1a565b67ffffffffffffffff811115613b1757613b17613e52565b604051908082528060200260200182016040528015613b40578160200160208202803683370190505b50905060005b855151811015613d1157600086600001518281518110613b6857613b68614849565b60200260200101519050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff161480613bc95750602081015173ffffffffffffffffffffffffffffffffffffffff16155b80613bec5750602081015173ffffffffffffffffffffffffffffffffffffffff16155b80613c115750602081015173ffffffffffffffffffffffffffffffffffffffff908116145b80613c315750604081015160ff16158015613c315750606081015160ff16155b15613c43575060009695505050505050565b805183613c51846002614b1a565b613c5c9060006149c4565b81518110613c6c57613c6c614849565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910182015281015183613c9f846002614b1a565b613caa9060016149c4565b81518110613cba57613cba614849565b73ffffffffffffffffffffffffffffffffffffffff909216602092830291909101909101526040810151613cf19060ff16866149c4565b9450806060015160ff1684613d0691906149c4565b935050600101613b46565b5060005b8151811015613dc3576000828281518110613d3257613d32614849565b602002602001015190506000826001613d4b91906149c4565b90505b8351811015613db957838181518110613d6957613d69614849565b602002602001015173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603613db157506000979650505050505050565b600101613d4e565b5050600101613d15565b50846020015161ffff168310158015613de45750846040015161ffff168210155b95945050505050565b60008151808452602080850194506020840160005b83811015613e3457815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101613e02565b509495945050505050565b602081526000611dee6020830184613ded565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715613ea457613ea4613e52565b60405290565b6040516060810167ffffffffffffffff81118282101715613ea457613ea4613e52565b6040516080810167ffffffffffffffff81118282101715613ea457613ea4613e52565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613f3757613f37613e52565b604052919050565b600067ffffffffffffffff821115613f5957613f59613e52565b5060051b60200190565b80357fffffffffffffffffffffffffffffffff00000000000000000000000000000000811681146105ac57600080fd5b600060408284031215613fa557600080fd5b613fad613e81565b9050613fb882613f63565b8152602082013563ffffffff1981168114613fd257600080fd5b602082015292915050565b60006020808385031215613ff057600080fd5b823567ffffffffffffffff81111561400757600080fd5b8301601f8101851361401857600080fd5b803561402b61402682613f3f565b613ef0565b8082825260208201915060208360061b85010192508783111561404d57600080fd5b6020840193505b82841015614078576140668885613f93565b82528482019150604084019350614054565b979650505050505050565b60006020808352835180602085015260005b818110156140b157858101830151858201604001528201614095565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b60006020828403121561410257600080fd5b611dee82613f63565b803573ffffffffffffffffffffffffffffffffffffffff811681146105ac57600080fd5b600082601f83011261414057600080fd5b8135602061415061402683613f3f565b8083825260208201915060208460051b87010193508684111561417257600080fd5b602086015b84811015614195576141888161410b565b8352918301918301614177565b509695505050505050565b600080604083850312156141b357600080fd5b823567ffffffffffffffff808211156141cb57600080fd5b6141d78683870161412f565b935060208501359150808211156141ed57600080fd5b506141fa8582860161412f565b9150509250929050565b8051606080845281518482018190526000926080916020918201918388019190865b82811015614280578451805173ffffffffffffffffffffffffffffffffffffffff908116865283820151168386015260408082015160ff908116918701919091529088015116878501529381019392850192600101614226565b508781015161ffff81168a83015295505050604086015193506142a9604088018561ffff169052565b9695505050505050565b600063ffffffff808616835280851660208401525060606040830152613de46060830184614204565b803560ff811681146105ac57600080fd5b803561ffff811681146105ac57600080fd5b6000602080838503121561431257600080fd5b823567ffffffffffffffff8082111561432a57600080fd5b8185019150606080838803121561434057600080fd5b614348613eaa565b83358381111561435757600080fd5b84019250601f8301881361436a57600080fd5b823561437861402682613f3f565b81815260079190911b8401860190868101908a83111561439757600080fd5b948701945b82861015614409576080868c0312156143b55760008081fd5b6143bd613ecd565b6143c68761410b565b81526143d389880161410b565b8982015260406143e48189016142dc565b908201526143f38787016142dc565b818701528252608095909501949087019061439c565b83525061441990508486016142ed565b85820152614429604085016142ed565b6040820152979650505050505050565b60006040828403121561444b57600080fd5b50919050565b6000806040838503121561446457600080fd5b61446d83613f63565b915060208084013567ffffffffffffffff81111561448a57600080fd5b8401601f8101861361449b57600080fd5b80356144a961402682613f3f565b81815260059190911b820183019083810190888311156144c857600080fd5b928401925b828410156144ed576144de84613f63565b825292840192908401906144cd565b80955050505050509250929050565b6000602080838503121561450f57600080fd5b823567ffffffffffffffff81111561452657600080fd5b8301601f8101851361453757600080fd5b803561454561402682613f3f565b81815260079190911b8201830190838101908783111561456457600080fd5b928401925b8284101561407857608084890312156145825760008081fd5b61458a613eaa565b6145938561410b565b81526145a189878701613f93565b86820152606085013580151581146145b95760008081fd5b604082015282526080939093019290840190614569565b600080602083850312156145e357600080fd5b823567ffffffffffffffff808211156145fb57600080fd5b818501915085601f83011261460f57600080fd5b81358181111561461e57600080fd5b8660208260061b850101111561463357600080fd5b60209290920196919550909350505050565b6080815260006146586080830187613ded565b82810360208481019190915286518083528782019282019060005b8181101561469657845163ffffffff191683529383019391830191600101614673565b505061ffff96909616604085015250505090151560609091015292915050565b600080604083850312156146c957600080fd5b50508035926020909101359150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60208082528251828201819052600091906040908185019086840185805b838110156147f2578251805160058110614766577f4e487b710000000000000000000000000000000000000000000000000000000084526021600452602484fd5b86528088015167ffffffffffffffff16888701528681015115158787015260608082015173ffffffffffffffffffffffffffffffffffffffff16908701526080808201517fffffffffffffffffffffffffffffffff000000000000000000000000000000009081169188019190915260a091820151169086015260c09094019391860191600101614725565b509298975050505050505050565b60006020828403121561481257600080fd5b611dee8261410b565b60608152600061482e6060830186613ded565b61ffff94909416602083015250901515604090910152919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b6000604082840312156148b957600080fd5b6148c1613e81565b6148ca8361410b565b8152602083013560208201528091505092915050565b815173ffffffffffffffffffffffffffffffffffffffff16815260208083015190820152604081016105a6565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b61ffff818116838216019080821115613a4f57613a4f61490d565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036149885761498861490d565b5060010190565b60008161499e5761499e61490d565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b808201808211156105a6576105a661490d565b818103818111156105a6576105a661490d565b600060ff821660ff8103614a0057614a0061490d565b60010192915050565b61ffff828116828216039080821115613a4f57613a4f61490d565b600067ffffffffffffffff821680614a3e57614a3e61490d565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600063ffffffff808316818103614aae57614aae61490d565b6001019392505050565b602081526000611dee6020830184614204565b600067ffffffffffffffff808316818103614aae57614aae61490d565b78ffffffffffffffffffffffffffffffffffffffffffffffffff828116828216039080821115613a4f57613a4f61490d565b80820281158282048414176105a6576105a661490d56fea164736f6c6343000818000a", } var ARMContractABI = ARMContractMetaData.ABI @@ -258,11 +271,11 @@ func (_ARMContract *ARMContractCallerSession) GetConfigDetails() (GetConfigDetai return _ARMContract.Contract.GetConfigDetails(&_ARMContract.CallOpts) } -func (_ARMContract *ARMContractCaller) GetCurseProgress(opts *bind.CallOpts) (GetCurseProgress, +func (_ARMContract *ARMContractCaller) GetCurseProgress(opts *bind.CallOpts, subject [16]byte) (GetCurseProgress, error) { var out []interface{} - err := _ARMContract.contract.Call(opts, &out, "getCurseProgress") + err := _ARMContract.contract.Call(opts, &out, "getCurseProgress", subject) outstruct := new(GetCurseProgress) if err != nil { @@ -270,25 +283,112 @@ func (_ARMContract *ARMContractCaller) GetCurseProgress(opts *bind.CallOpts) (Ge } outstruct.CurseVoteAddrs = *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) - outstruct.VoteCounts = *abi.ConvertType(out[1], new([]uint32)).(*[]uint32) - outstruct.CursesHashes = *abi.ConvertType(out[2], new([][32]byte)).(*[][32]byte) - outstruct.AccumulatedWeight = *abi.ConvertType(out[3], new(uint16)).(*uint16) - outstruct.Cursed = *abi.ConvertType(out[4], new(bool)).(*bool) + outstruct.CursesHashes = *abi.ConvertType(out[1], new([][28]byte)).(*[][28]byte) + outstruct.AccumulatedWeight = *abi.ConvertType(out[2], new(uint16)).(*uint16) + outstruct.Cursed = *abi.ConvertType(out[3], new(bool)).(*bool) return *outstruct, err } -func (_ARMContract *ARMContractSession) GetCurseProgress() (GetCurseProgress, +func (_ARMContract *ARMContractSession) GetCurseProgress(subject [16]byte) (GetCurseProgress, error) { - return _ARMContract.Contract.GetCurseProgress(&_ARMContract.CallOpts) + return _ARMContract.Contract.GetCurseProgress(&_ARMContract.CallOpts, subject) } -func (_ARMContract *ARMContractCallerSession) GetCurseProgress() (GetCurseProgress, +func (_ARMContract *ARMContractCallerSession) GetCurseProgress(subject [16]byte) (GetCurseProgress, error) { - return _ARMContract.Contract.GetCurseProgress(&_ARMContract.CallOpts) + return _ARMContract.Contract.GetCurseProgress(&_ARMContract.CallOpts, subject) +} + +func (_ARMContract *ARMContractCaller) GetCursedSubjectsCount(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ARMContract.contract.Call(opts, &out, "getCursedSubjectsCount") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_ARMContract *ARMContractSession) GetCursedSubjectsCount() (*big.Int, error) { + return _ARMContract.Contract.GetCursedSubjectsCount(&_ARMContract.CallOpts) +} + +func (_ARMContract *ARMContractCallerSession) GetCursedSubjectsCount() (*big.Int, error) { + return _ARMContract.Contract.GetCursedSubjectsCount(&_ARMContract.CallOpts) +} + +func (_ARMContract *ARMContractCaller) GetPermaBlessedCommitStores(opts *bind.CallOpts) ([]common.Address, error) { + var out []interface{} + err := _ARMContract.contract.Call(opts, &out, "getPermaBlessedCommitStores") + + if err != nil { + return *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + + return out0, err + +} + +func (_ARMContract *ARMContractSession) GetPermaBlessedCommitStores() ([]common.Address, error) { + return _ARMContract.Contract.GetPermaBlessedCommitStores(&_ARMContract.CallOpts) +} + +func (_ARMContract *ARMContractCallerSession) GetPermaBlessedCommitStores() ([]common.Address, error) { + return _ARMContract.Contract.GetPermaBlessedCommitStores(&_ARMContract.CallOpts) +} + +func (_ARMContract *ARMContractCaller) GetRecordedCurseRelatedOps(opts *bind.CallOpts, offset *big.Int, limit *big.Int) ([]RMNRecordedCurseRelatedOp, error) { + var out []interface{} + err := _ARMContract.contract.Call(opts, &out, "getRecordedCurseRelatedOps", offset, limit) + + if err != nil { + return *new([]RMNRecordedCurseRelatedOp), err + } + + out0 := *abi.ConvertType(out[0], new([]RMNRecordedCurseRelatedOp)).(*[]RMNRecordedCurseRelatedOp) + + return out0, err + +} + +func (_ARMContract *ARMContractSession) GetRecordedCurseRelatedOps(offset *big.Int, limit *big.Int) ([]RMNRecordedCurseRelatedOp, error) { + return _ARMContract.Contract.GetRecordedCurseRelatedOps(&_ARMContract.CallOpts, offset, limit) +} + +func (_ARMContract *ARMContractCallerSession) GetRecordedCurseRelatedOps(offset *big.Int, limit *big.Int) ([]RMNRecordedCurseRelatedOp, error) { + return _ARMContract.Contract.GetRecordedCurseRelatedOps(&_ARMContract.CallOpts, offset, limit) +} + +func (_ARMContract *ARMContractCaller) GetRecordedCurseRelatedOpsCount(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ARMContract.contract.Call(opts, &out, "getRecordedCurseRelatedOpsCount") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_ARMContract *ARMContractSession) GetRecordedCurseRelatedOpsCount() (*big.Int, error) { + return _ARMContract.Contract.GetRecordedCurseRelatedOpsCount(&_ARMContract.CallOpts) +} + +func (_ARMContract *ARMContractCallerSession) GetRecordedCurseRelatedOpsCount() (*big.Int, error) { + return _ARMContract.Contract.GetRecordedCurseRelatedOpsCount(&_ARMContract.CallOpts) } func (_ARMContract *ARMContractCaller) IsBlessed(opts *bind.CallOpts, taggedRoot IRMNTaggedRoot) (bool, error) { @@ -313,9 +413,9 @@ func (_ARMContract *ARMContractCallerSession) IsBlessed(taggedRoot IRMNTaggedRoo return _ARMContract.Contract.IsBlessed(&_ARMContract.CallOpts, taggedRoot) } -func (_ARMContract *ARMContractCaller) IsCursed(opts *bind.CallOpts, arg0 [16]byte) (bool, error) { +func (_ARMContract *ARMContractCaller) IsCursed(opts *bind.CallOpts, subject [16]byte) (bool, error) { var out []interface{} - err := _ARMContract.contract.Call(opts, &out, "isCursed", arg0) + err := _ARMContract.contract.Call(opts, &out, "isCursed", subject) if err != nil { return *new(bool), err @@ -327,12 +427,12 @@ func (_ARMContract *ARMContractCaller) IsCursed(opts *bind.CallOpts, arg0 [16]by } -func (_ARMContract *ARMContractSession) IsCursed(arg0 [16]byte) (bool, error) { - return _ARMContract.Contract.IsCursed(&_ARMContract.CallOpts, arg0) +func (_ARMContract *ARMContractSession) IsCursed(subject [16]byte) (bool, error) { + return _ARMContract.Contract.IsCursed(&_ARMContract.CallOpts, subject) } -func (_ARMContract *ARMContractCallerSession) IsCursed(arg0 [16]byte) (bool, error) { - return _ARMContract.Contract.IsCursed(&_ARMContract.CallOpts, arg0) +func (_ARMContract *ARMContractCallerSession) IsCursed(subject [16]byte) (bool, error) { + return _ARMContract.Contract.IsCursed(&_ARMContract.CallOpts, subject) } func (_ARMContract *ARMContractCaller) IsCursed0(opts *bind.CallOpts) (bool, error) { @@ -413,16 +513,28 @@ func (_ARMContract *ARMContractTransactorSession) AcceptOwnership() (*types.Tran return _ARMContract.Contract.AcceptOwnership(&_ARMContract.TransactOpts) } -func (_ARMContract *ARMContractTransactor) OwnerCurse(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ARMContract.contract.Transact(opts, "ownerCurse") +func (_ARMContract *ARMContractTransactor) OwnerCurse(opts *bind.TransactOpts, curseId [16]byte, subjects [][16]byte) (*types.Transaction, error) { + return _ARMContract.contract.Transact(opts, "ownerCurse", curseId, subjects) +} + +func (_ARMContract *ARMContractSession) OwnerCurse(curseId [16]byte, subjects [][16]byte) (*types.Transaction, error) { + return _ARMContract.Contract.OwnerCurse(&_ARMContract.TransactOpts, curseId, subjects) +} + +func (_ARMContract *ARMContractTransactorSession) OwnerCurse(curseId [16]byte, subjects [][16]byte) (*types.Transaction, error) { + return _ARMContract.Contract.OwnerCurse(&_ARMContract.TransactOpts, curseId, subjects) +} + +func (_ARMContract *ARMContractTransactor) OwnerRemoveThenAddPermaBlessedCommitStores(opts *bind.TransactOpts, removes []common.Address, adds []common.Address) (*types.Transaction, error) { + return _ARMContract.contract.Transact(opts, "ownerRemoveThenAddPermaBlessedCommitStores", removes, adds) } -func (_ARMContract *ARMContractSession) OwnerCurse() (*types.Transaction, error) { - return _ARMContract.Contract.OwnerCurse(&_ARMContract.TransactOpts) +func (_ARMContract *ARMContractSession) OwnerRemoveThenAddPermaBlessedCommitStores(removes []common.Address, adds []common.Address) (*types.Transaction, error) { + return _ARMContract.Contract.OwnerRemoveThenAddPermaBlessedCommitStores(&_ARMContract.TransactOpts, removes, adds) } -func (_ARMContract *ARMContractTransactorSession) OwnerCurse() (*types.Transaction, error) { - return _ARMContract.Contract.OwnerCurse(&_ARMContract.TransactOpts) +func (_ARMContract *ARMContractTransactorSession) OwnerRemoveThenAddPermaBlessedCommitStores(removes []common.Address, adds []common.Address) (*types.Transaction, error) { + return _ARMContract.Contract.OwnerRemoveThenAddPermaBlessedCommitStores(&_ARMContract.TransactOpts, removes, adds) } func (_ARMContract *ARMContractTransactor) OwnerResetBlessVotes(opts *bind.TransactOpts, taggedRoots []IRMNTaggedRoot) (*types.Transaction, error) { @@ -437,16 +549,16 @@ func (_ARMContract *ARMContractTransactorSession) OwnerResetBlessVotes(taggedRoo return _ARMContract.Contract.OwnerResetBlessVotes(&_ARMContract.TransactOpts, taggedRoots) } -func (_ARMContract *ARMContractTransactor) OwnerUnvoteToCurse(opts *bind.TransactOpts, unvoteRecords []RMNUnvoteToCurseRecord) (*types.Transaction, error) { - return _ARMContract.contract.Transact(opts, "ownerUnvoteToCurse", unvoteRecords) +func (_ARMContract *ARMContractTransactor) OwnerUnvoteToCurse(opts *bind.TransactOpts, ownerUnvoteToCurseRequests []RMNOwnerUnvoteToCurseRequest) (*types.Transaction, error) { + return _ARMContract.contract.Transact(opts, "ownerUnvoteToCurse", ownerUnvoteToCurseRequests) } -func (_ARMContract *ARMContractSession) OwnerUnvoteToCurse(unvoteRecords []RMNUnvoteToCurseRecord) (*types.Transaction, error) { - return _ARMContract.Contract.OwnerUnvoteToCurse(&_ARMContract.TransactOpts, unvoteRecords) +func (_ARMContract *ARMContractSession) OwnerUnvoteToCurse(ownerUnvoteToCurseRequests []RMNOwnerUnvoteToCurseRequest) (*types.Transaction, error) { + return _ARMContract.Contract.OwnerUnvoteToCurse(&_ARMContract.TransactOpts, ownerUnvoteToCurseRequests) } -func (_ARMContract *ARMContractTransactorSession) OwnerUnvoteToCurse(unvoteRecords []RMNUnvoteToCurseRecord) (*types.Transaction, error) { - return _ARMContract.Contract.OwnerUnvoteToCurse(&_ARMContract.TransactOpts, unvoteRecords) +func (_ARMContract *ARMContractTransactorSession) OwnerUnvoteToCurse(ownerUnvoteToCurseRequests []RMNOwnerUnvoteToCurseRequest) (*types.Transaction, error) { + return _ARMContract.Contract.OwnerUnvoteToCurse(&_ARMContract.TransactOpts, ownerUnvoteToCurseRequests) } func (_ARMContract *ARMContractTransactor) SetConfig(opts *bind.TransactOpts, config RMNConfig) (*types.Transaction, error) { @@ -473,16 +585,16 @@ func (_ARMContract *ARMContractTransactorSession) TransferOwnership(to common.Ad return _ARMContract.Contract.TransferOwnership(&_ARMContract.TransactOpts, to) } -func (_ARMContract *ARMContractTransactor) UnvoteToCurse(opts *bind.TransactOpts, curseVoteAddr common.Address, cursesHash [32]byte) (*types.Transaction, error) { - return _ARMContract.contract.Transact(opts, "unvoteToCurse", curseVoteAddr, cursesHash) +func (_ARMContract *ARMContractTransactor) UnvoteToCurse(opts *bind.TransactOpts, unvoteToCurseRequests []RMNUnvoteToCurseRequest) (*types.Transaction, error) { + return _ARMContract.contract.Transact(opts, "unvoteToCurse", unvoteToCurseRequests) } -func (_ARMContract *ARMContractSession) UnvoteToCurse(curseVoteAddr common.Address, cursesHash [32]byte) (*types.Transaction, error) { - return _ARMContract.Contract.UnvoteToCurse(&_ARMContract.TransactOpts, curseVoteAddr, cursesHash) +func (_ARMContract *ARMContractSession) UnvoteToCurse(unvoteToCurseRequests []RMNUnvoteToCurseRequest) (*types.Transaction, error) { + return _ARMContract.Contract.UnvoteToCurse(&_ARMContract.TransactOpts, unvoteToCurseRequests) } -func (_ARMContract *ARMContractTransactorSession) UnvoteToCurse(curseVoteAddr common.Address, cursesHash [32]byte) (*types.Transaction, error) { - return _ARMContract.Contract.UnvoteToCurse(&_ARMContract.TransactOpts, curseVoteAddr, cursesHash) +func (_ARMContract *ARMContractTransactorSession) UnvoteToCurse(unvoteToCurseRequests []RMNUnvoteToCurseRequest) (*types.Transaction, error) { + return _ARMContract.Contract.UnvoteToCurse(&_ARMContract.TransactOpts, unvoteToCurseRequests) } func (_ARMContract *ARMContractTransactor) VoteToBless(opts *bind.TransactOpts, taggedRoots []IRMNTaggedRoot) (*types.Transaction, error) { @@ -497,16 +609,16 @@ func (_ARMContract *ARMContractTransactorSession) VoteToBless(taggedRoots []IRMN return _ARMContract.Contract.VoteToBless(&_ARMContract.TransactOpts, taggedRoots) } -func (_ARMContract *ARMContractTransactor) VoteToCurse(opts *bind.TransactOpts, curseId [32]byte) (*types.Transaction, error) { - return _ARMContract.contract.Transact(opts, "voteToCurse", curseId) +func (_ARMContract *ARMContractTransactor) VoteToCurse(opts *bind.TransactOpts, curseId [16]byte, subjects [][16]byte) (*types.Transaction, error) { + return _ARMContract.contract.Transact(opts, "voteToCurse", curseId, subjects) } -func (_ARMContract *ARMContractSession) VoteToCurse(curseId [32]byte) (*types.Transaction, error) { - return _ARMContract.Contract.VoteToCurse(&_ARMContract.TransactOpts, curseId) +func (_ARMContract *ARMContractSession) VoteToCurse(curseId [16]byte, subjects [][16]byte) (*types.Transaction, error) { + return _ARMContract.Contract.VoteToCurse(&_ARMContract.TransactOpts, curseId, subjects) } -func (_ARMContract *ARMContractTransactorSession) VoteToCurse(curseId [32]byte) (*types.Transaction, error) { - return _ARMContract.Contract.VoteToCurse(&_ARMContract.TransactOpts, curseId) +func (_ARMContract *ARMContractTransactorSession) VoteToCurse(curseId [16]byte, subjects [][16]byte) (*types.Transaction, error) { + return _ARMContract.Contract.VoteToCurse(&_ARMContract.TransactOpts, curseId, subjects) } type ARMContractAlreadyBlessedIterator struct { @@ -911,8 +1023,8 @@ func (_ARMContract *ARMContractFilterer) ParseConfigSet(log types.Log) (*ARMCont return event, nil } -type ARMContractCursedIterator struct { - Event *ARMContractCursed +type ARMContractCurseLiftedIterator struct { + Event *ARMContractCurseLifted contract *bind.BoundContract event string @@ -923,7 +1035,7 @@ type ARMContractCursedIterator struct { fail error } -func (it *ARMContractCursedIterator) Next() bool { +func (it *ARMContractCurseLiftedIterator) Next() bool { if it.fail != nil { return false @@ -932,7 +1044,7 @@ func (it *ARMContractCursedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ARMContractCursed) + it.Event = new(ARMContractCurseLifted) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -947,7 +1059,7 @@ func (it *ARMContractCursedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(ARMContractCursed) + it.Event = new(ARMContractCurseLifted) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -962,43 +1074,32 @@ func (it *ARMContractCursedIterator) Next() bool { } } -func (it *ARMContractCursedIterator) Error() error { +func (it *ARMContractCurseLiftedIterator) Error() error { return it.fail } -func (it *ARMContractCursedIterator) Close() error { +func (it *ARMContractCurseLiftedIterator) Close() error { it.sub.Unsubscribe() return nil } -type ARMContractCursed struct { - ConfigVersion uint32 - Timestamp *big.Int - Raw types.Log +type ARMContractCurseLifted struct { + Subject [16]byte + Raw types.Log } -func (_ARMContract *ARMContractFilterer) FilterCursed(opts *bind.FilterOpts, configVersion []uint32) (*ARMContractCursedIterator, error) { - - var configVersionRule []interface{} - for _, configVersionItem := range configVersion { - configVersionRule = append(configVersionRule, configVersionItem) - } +func (_ARMContract *ARMContractFilterer) FilterCurseLifted(opts *bind.FilterOpts) (*ARMContractCurseLiftedIterator, error) { - logs, sub, err := _ARMContract.contract.FilterLogs(opts, "Cursed", configVersionRule) + logs, sub, err := _ARMContract.contract.FilterLogs(opts, "CurseLifted") if err != nil { return nil, err } - return &ARMContractCursedIterator{contract: _ARMContract.contract, event: "Cursed", logs: logs, sub: sub}, nil + return &ARMContractCurseLiftedIterator{contract: _ARMContract.contract, event: "CurseLifted", logs: logs, sub: sub}, nil } -func (_ARMContract *ARMContractFilterer) WatchCursed(opts *bind.WatchOpts, sink chan<- *ARMContractCursed, configVersion []uint32) (event.Subscription, error) { - - var configVersionRule []interface{} - for _, configVersionItem := range configVersion { - configVersionRule = append(configVersionRule, configVersionItem) - } +func (_ARMContract *ARMContractFilterer) WatchCurseLifted(opts *bind.WatchOpts, sink chan<- *ARMContractCurseLifted) (event.Subscription, error) { - logs, sub, err := _ARMContract.contract.WatchLogs(opts, "Cursed", configVersionRule) + logs, sub, err := _ARMContract.contract.WatchLogs(opts, "CurseLifted") if err != nil { return nil, err } @@ -1008,8 +1109,8 @@ func (_ARMContract *ARMContractFilterer) WatchCursed(opts *bind.WatchOpts, sink select { case log := <-logs: - event := new(ARMContractCursed) - if err := _ARMContract.contract.UnpackLog(event, "Cursed", log); err != nil { + event := new(ARMContractCurseLifted) + if err := _ARMContract.contract.UnpackLog(event, "CurseLifted", log); err != nil { return err } event.Raw = log @@ -1030,17 +1131,17 @@ func (_ARMContract *ARMContractFilterer) WatchCursed(opts *bind.WatchOpts, sink }), nil } -func (_ARMContract *ARMContractFilterer) ParseCursed(log types.Log) (*ARMContractCursed, error) { - event := new(ARMContractCursed) - if err := _ARMContract.contract.UnpackLog(event, "Cursed", log); err != nil { +func (_ARMContract *ARMContractFilterer) ParseCurseLifted(log types.Log) (*ARMContractCurseLifted, error) { + event := new(ARMContractCurseLifted) + if err := _ARMContract.contract.UnpackLog(event, "CurseLifted", log); err != nil { return nil, err } event.Raw = log return event, nil } -type ARMContractOwnerCursedIterator struct { - Event *ARMContractOwnerCursed +type ARMContractCursedIterator struct { + Event *ARMContractCursed contract *bind.BoundContract event string @@ -1051,7 +1152,7 @@ type ARMContractOwnerCursedIterator struct { fail error } -func (it *ARMContractOwnerCursedIterator) Next() bool { +func (it *ARMContractCursedIterator) Next() bool { if it.fail != nil { return false @@ -1060,7 +1161,7 @@ func (it *ARMContractOwnerCursedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ARMContractOwnerCursed) + it.Event = new(ARMContractCursed) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1075,7 +1176,7 @@ func (it *ARMContractOwnerCursedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(ARMContractOwnerCursed) + it.Event = new(ARMContractCursed) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1090,32 +1191,44 @@ func (it *ARMContractOwnerCursedIterator) Next() bool { } } -func (it *ARMContractOwnerCursedIterator) Error() error { +func (it *ARMContractCursedIterator) Error() error { return it.fail } -func (it *ARMContractOwnerCursedIterator) Close() error { +func (it *ARMContractCursedIterator) Close() error { it.sub.Unsubscribe() return nil } -type ARMContractOwnerCursed struct { - Timestamp *big.Int - Raw types.Log +type ARMContractCursed struct { + ConfigVersion uint32 + Subject [16]byte + BlockTimestamp uint64 + Raw types.Log } -func (_ARMContract *ARMContractFilterer) FilterOwnerCursed(opts *bind.FilterOpts) (*ARMContractOwnerCursedIterator, error) { +func (_ARMContract *ARMContractFilterer) FilterCursed(opts *bind.FilterOpts, configVersion []uint32) (*ARMContractCursedIterator, error) { + + var configVersionRule []interface{} + for _, configVersionItem := range configVersion { + configVersionRule = append(configVersionRule, configVersionItem) + } - logs, sub, err := _ARMContract.contract.FilterLogs(opts, "OwnerCursed") + logs, sub, err := _ARMContract.contract.FilterLogs(opts, "Cursed", configVersionRule) if err != nil { return nil, err } - return &ARMContractOwnerCursedIterator{contract: _ARMContract.contract, event: "OwnerCursed", logs: logs, sub: sub}, nil + return &ARMContractCursedIterator{contract: _ARMContract.contract, event: "Cursed", logs: logs, sub: sub}, nil } -func (_ARMContract *ARMContractFilterer) WatchOwnerCursed(opts *bind.WatchOpts, sink chan<- *ARMContractOwnerCursed) (event.Subscription, error) { +func (_ARMContract *ARMContractFilterer) WatchCursed(opts *bind.WatchOpts, sink chan<- *ARMContractCursed, configVersion []uint32) (event.Subscription, error) { - logs, sub, err := _ARMContract.contract.WatchLogs(opts, "OwnerCursed") + var configVersionRule []interface{} + for _, configVersionItem := range configVersion { + configVersionRule = append(configVersionRule, configVersionItem) + } + + logs, sub, err := _ARMContract.contract.WatchLogs(opts, "Cursed", configVersionRule) if err != nil { return nil, err } @@ -1125,8 +1238,8 @@ func (_ARMContract *ARMContractFilterer) WatchOwnerCursed(opts *bind.WatchOpts, select { case log := <-logs: - event := new(ARMContractOwnerCursed) - if err := _ARMContract.contract.UnpackLog(event, "OwnerCursed", log); err != nil { + event := new(ARMContractCursed) + if err := _ARMContract.contract.UnpackLog(event, "Cursed", log); err != nil { return err } event.Raw = log @@ -1147,9 +1260,9 @@ func (_ARMContract *ARMContractFilterer) WatchOwnerCursed(opts *bind.WatchOpts, }), nil } -func (_ARMContract *ARMContractFilterer) ParseOwnerCursed(log types.Log) (*ARMContractOwnerCursed, error) { - event := new(ARMContractOwnerCursed) - if err := _ARMContract.contract.UnpackLog(event, "OwnerCursed", log); err != nil { +func (_ARMContract *ARMContractFilterer) ParseCursed(log types.Log) (*ARMContractCursed, error) { + event := new(ARMContractCursed) + if err := _ARMContract.contract.UnpackLog(event, "Cursed", log); err != nil { return nil, err } event.Raw = log @@ -1428,8 +1541,8 @@ func (_ARMContract *ARMContractFilterer) ParseOwnershipTransferred(log types.Log return event, nil } -type ARMContractRecoveredFromCurseIterator struct { - Event *ARMContractRecoveredFromCurse +type ARMContractPermaBlessedCommitStoreAddedIterator struct { + Event *ARMContractPermaBlessedCommitStoreAdded contract *bind.BoundContract event string @@ -1440,7 +1553,7 @@ type ARMContractRecoveredFromCurseIterator struct { fail error } -func (it *ARMContractRecoveredFromCurseIterator) Next() bool { +func (it *ARMContractPermaBlessedCommitStoreAddedIterator) Next() bool { if it.fail != nil { return false @@ -1449,7 +1562,7 @@ func (it *ARMContractRecoveredFromCurseIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ARMContractRecoveredFromCurse) + it.Event = new(ARMContractPermaBlessedCommitStoreAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1464,7 +1577,7 @@ func (it *ARMContractRecoveredFromCurseIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(ARMContractRecoveredFromCurse) + it.Event = new(ARMContractPermaBlessedCommitStoreAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1479,31 +1592,32 @@ func (it *ARMContractRecoveredFromCurseIterator) Next() bool { } } -func (it *ARMContractRecoveredFromCurseIterator) Error() error { +func (it *ARMContractPermaBlessedCommitStoreAddedIterator) Error() error { return it.fail } -func (it *ARMContractRecoveredFromCurseIterator) Close() error { +func (it *ARMContractPermaBlessedCommitStoreAddedIterator) Close() error { it.sub.Unsubscribe() return nil } -type ARMContractRecoveredFromCurse struct { - Raw types.Log +type ARMContractPermaBlessedCommitStoreAdded struct { + CommitStore common.Address + Raw types.Log } -func (_ARMContract *ARMContractFilterer) FilterRecoveredFromCurse(opts *bind.FilterOpts) (*ARMContractRecoveredFromCurseIterator, error) { +func (_ARMContract *ARMContractFilterer) FilterPermaBlessedCommitStoreAdded(opts *bind.FilterOpts) (*ARMContractPermaBlessedCommitStoreAddedIterator, error) { - logs, sub, err := _ARMContract.contract.FilterLogs(opts, "RecoveredFromCurse") + logs, sub, err := _ARMContract.contract.FilterLogs(opts, "PermaBlessedCommitStoreAdded") if err != nil { return nil, err } - return &ARMContractRecoveredFromCurseIterator{contract: _ARMContract.contract, event: "RecoveredFromCurse", logs: logs, sub: sub}, nil + return &ARMContractPermaBlessedCommitStoreAddedIterator{contract: _ARMContract.contract, event: "PermaBlessedCommitStoreAdded", logs: logs, sub: sub}, nil } -func (_ARMContract *ARMContractFilterer) WatchRecoveredFromCurse(opts *bind.WatchOpts, sink chan<- *ARMContractRecoveredFromCurse) (event.Subscription, error) { +func (_ARMContract *ARMContractFilterer) WatchPermaBlessedCommitStoreAdded(opts *bind.WatchOpts, sink chan<- *ARMContractPermaBlessedCommitStoreAdded) (event.Subscription, error) { - logs, sub, err := _ARMContract.contract.WatchLogs(opts, "RecoveredFromCurse") + logs, sub, err := _ARMContract.contract.WatchLogs(opts, "PermaBlessedCommitStoreAdded") if err != nil { return nil, err } @@ -1513,8 +1627,8 @@ func (_ARMContract *ARMContractFilterer) WatchRecoveredFromCurse(opts *bind.Watc select { case log := <-logs: - event := new(ARMContractRecoveredFromCurse) - if err := _ARMContract.contract.UnpackLog(event, "RecoveredFromCurse", log); err != nil { + event := new(ARMContractPermaBlessedCommitStoreAdded) + if err := _ARMContract.contract.UnpackLog(event, "PermaBlessedCommitStoreAdded", log); err != nil { return err } event.Raw = log @@ -1535,17 +1649,17 @@ func (_ARMContract *ARMContractFilterer) WatchRecoveredFromCurse(opts *bind.Watc }), nil } -func (_ARMContract *ARMContractFilterer) ParseRecoveredFromCurse(log types.Log) (*ARMContractRecoveredFromCurse, error) { - event := new(ARMContractRecoveredFromCurse) - if err := _ARMContract.contract.UnpackLog(event, "RecoveredFromCurse", log); err != nil { +func (_ARMContract *ARMContractFilterer) ParsePermaBlessedCommitStoreAdded(log types.Log) (*ARMContractPermaBlessedCommitStoreAdded, error) { + event := new(ARMContractPermaBlessedCommitStoreAdded) + if err := _ARMContract.contract.UnpackLog(event, "PermaBlessedCommitStoreAdded", log); err != nil { return nil, err } event.Raw = log return event, nil } -type ARMContractReusedVotesToCurseIterator struct { - Event *ARMContractReusedVotesToCurse +type ARMContractPermaBlessedCommitStoreRemovedIterator struct { + Event *ARMContractPermaBlessedCommitStoreRemoved contract *bind.BoundContract event string @@ -1556,7 +1670,7 @@ type ARMContractReusedVotesToCurseIterator struct { fail error } -func (it *ARMContractReusedVotesToCurseIterator) Next() bool { +func (it *ARMContractPermaBlessedCommitStoreRemovedIterator) Next() bool { if it.fail != nil { return false @@ -1565,7 +1679,7 @@ func (it *ARMContractReusedVotesToCurseIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ARMContractReusedVotesToCurse) + it.Event = new(ARMContractPermaBlessedCommitStoreRemoved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1580,7 +1694,7 @@ func (it *ARMContractReusedVotesToCurseIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(ARMContractReusedVotesToCurse) + it.Event = new(ARMContractPermaBlessedCommitStoreRemoved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1595,55 +1709,32 @@ func (it *ARMContractReusedVotesToCurseIterator) Next() bool { } } -func (it *ARMContractReusedVotesToCurseIterator) Error() error { +func (it *ARMContractPermaBlessedCommitStoreRemovedIterator) Error() error { return it.fail } -func (it *ARMContractReusedVotesToCurseIterator) Close() error { +func (it *ARMContractPermaBlessedCommitStoreRemovedIterator) Close() error { it.sub.Unsubscribe() return nil } -type ARMContractReusedVotesToCurse struct { - ConfigVersion uint32 - Voter common.Address - Weight uint8 - VoteCount uint32 - CursesHash [32]byte - AccumulatedWeight uint16 - Raw types.Log +type ARMContractPermaBlessedCommitStoreRemoved struct { + CommitStore common.Address + Raw types.Log } -func (_ARMContract *ARMContractFilterer) FilterReusedVotesToCurse(opts *bind.FilterOpts, configVersion []uint32, voter []common.Address) (*ARMContractReusedVotesToCurseIterator, error) { +func (_ARMContract *ARMContractFilterer) FilterPermaBlessedCommitStoreRemoved(opts *bind.FilterOpts) (*ARMContractPermaBlessedCommitStoreRemovedIterator, error) { - var configVersionRule []interface{} - for _, configVersionItem := range configVersion { - configVersionRule = append(configVersionRule, configVersionItem) - } - var voterRule []interface{} - for _, voterItem := range voter { - voterRule = append(voterRule, voterItem) - } - - logs, sub, err := _ARMContract.contract.FilterLogs(opts, "ReusedVotesToCurse", configVersionRule, voterRule) + logs, sub, err := _ARMContract.contract.FilterLogs(opts, "PermaBlessedCommitStoreRemoved") if err != nil { return nil, err } - return &ARMContractReusedVotesToCurseIterator{contract: _ARMContract.contract, event: "ReusedVotesToCurse", logs: logs, sub: sub}, nil + return &ARMContractPermaBlessedCommitStoreRemovedIterator{contract: _ARMContract.contract, event: "PermaBlessedCommitStoreRemoved", logs: logs, sub: sub}, nil } -func (_ARMContract *ARMContractFilterer) WatchReusedVotesToCurse(opts *bind.WatchOpts, sink chan<- *ARMContractReusedVotesToCurse, configVersion []uint32, voter []common.Address) (event.Subscription, error) { - - var configVersionRule []interface{} - for _, configVersionItem := range configVersion { - configVersionRule = append(configVersionRule, configVersionItem) - } - var voterRule []interface{} - for _, voterItem := range voter { - voterRule = append(voterRule, voterItem) - } +func (_ARMContract *ARMContractFilterer) WatchPermaBlessedCommitStoreRemoved(opts *bind.WatchOpts, sink chan<- *ARMContractPermaBlessedCommitStoreRemoved) (event.Subscription, error) { - logs, sub, err := _ARMContract.contract.WatchLogs(opts, "ReusedVotesToCurse", configVersionRule, voterRule) + logs, sub, err := _ARMContract.contract.WatchLogs(opts, "PermaBlessedCommitStoreRemoved") if err != nil { return nil, err } @@ -1653,8 +1744,8 @@ func (_ARMContract *ARMContractFilterer) WatchReusedVotesToCurse(opts *bind.Watc select { case log := <-logs: - event := new(ARMContractReusedVotesToCurse) - if err := _ARMContract.contract.UnpackLog(event, "ReusedVotesToCurse", log); err != nil { + event := new(ARMContractPermaBlessedCommitStoreRemoved) + if err := _ARMContract.contract.UnpackLog(event, "PermaBlessedCommitStoreRemoved", log); err != nil { return err } event.Raw = log @@ -1675,9 +1766,9 @@ func (_ARMContract *ARMContractFilterer) WatchReusedVotesToCurse(opts *bind.Watc }), nil } -func (_ARMContract *ARMContractFilterer) ParseReusedVotesToCurse(log types.Log) (*ARMContractReusedVotesToCurse, error) { - event := new(ARMContractReusedVotesToCurse) - if err := _ARMContract.contract.UnpackLog(event, "ReusedVotesToCurse", log); err != nil { +func (_ARMContract *ARMContractFilterer) ParsePermaBlessedCommitStoreRemoved(log types.Log) (*ARMContractPermaBlessedCommitStoreRemoved, error) { + event := new(ARMContractPermaBlessedCommitStoreRemoved) + if err := _ARMContract.contract.UnpackLog(event, "PermaBlessedCommitStoreRemoved", log); err != nil { return nil, err } event.Raw = log @@ -1745,10 +1836,11 @@ func (it *ARMContractSkippedUnvoteToCurseIterator) Close() error { } type ARMContractSkippedUnvoteToCurse struct { - Voter common.Address - ExpectedCursesHash [32]byte - ActualCursesHash [32]byte - Raw types.Log + Voter common.Address + Subject [16]byte + OnchainCursesHash [28]byte + CursesHash [28]byte + Raw types.Log } func (_ARMContract *ARMContractFilterer) FilterSkippedUnvoteToCurse(opts *bind.FilterOpts, voter []common.Address) (*ARMContractSkippedUnvoteToCurseIterator, error) { @@ -2132,12 +2224,13 @@ func (it *ARMContractUnvotedToCurseIterator) Close() error { } type ARMContractUnvotedToCurse struct { - ConfigVersion uint32 - Voter common.Address - Weight uint8 - VoteCount uint32 - CursesHash [32]byte - Raw types.Log + ConfigVersion uint32 + Voter common.Address + Subject [16]byte + Weight uint8 + CursesHash [28]byte + RemainingAccumulatedWeight uint16 + Raw types.Log } func (_ARMContract *ARMContractFilterer) FilterUnvotedToCurse(opts *bind.FilterOpts, configVersion []uint32, voter []common.Address) (*ARMContractUnvotedToCurseIterator, error) { @@ -2411,10 +2504,11 @@ func (it *ARMContractVotedToCurseIterator) Close() error { type ARMContractVotedToCurse struct { ConfigVersion uint32 Voter common.Address + Subject [16]byte + CurseId [16]byte Weight uint8 - VoteCount uint32 - CurseId [32]byte - CursesHash [32]byte + BlockTimestamp uint64 + CursesHash [28]byte AccumulatedWeight uint16 Raw types.Log } @@ -2501,8 +2595,7 @@ type GetConfigDetails struct { } type GetCurseProgress struct { CurseVoteAddrs []common.Address - VoteCounts []uint32 - CursesHashes [][32]byte + CursesHashes [][28]byte AccumulatedWeight uint16 Cursed bool } @@ -2515,18 +2608,18 @@ func (_ARMContract *ARMContract) ParseLog(log types.Log) (generated.AbigenLog, e return _ARMContract.ParseAlreadyVotedToBless(log) case _ARMContract.abi.Events["ConfigSet"].ID: return _ARMContract.ParseConfigSet(log) + case _ARMContract.abi.Events["CurseLifted"].ID: + return _ARMContract.ParseCurseLifted(log) case _ARMContract.abi.Events["Cursed"].ID: return _ARMContract.ParseCursed(log) - case _ARMContract.abi.Events["OwnerCursed"].ID: - return _ARMContract.ParseOwnerCursed(log) case _ARMContract.abi.Events["OwnershipTransferRequested"].ID: return _ARMContract.ParseOwnershipTransferRequested(log) case _ARMContract.abi.Events["OwnershipTransferred"].ID: return _ARMContract.ParseOwnershipTransferred(log) - case _ARMContract.abi.Events["RecoveredFromCurse"].ID: - return _ARMContract.ParseRecoveredFromCurse(log) - case _ARMContract.abi.Events["ReusedVotesToCurse"].ID: - return _ARMContract.ParseReusedVotesToCurse(log) + case _ARMContract.abi.Events["PermaBlessedCommitStoreAdded"].ID: + return _ARMContract.ParsePermaBlessedCommitStoreAdded(log) + case _ARMContract.abi.Events["PermaBlessedCommitStoreRemoved"].ID: + return _ARMContract.ParsePermaBlessedCommitStoreRemoved(log) case _ARMContract.abi.Events["SkippedUnvoteToCurse"].ID: return _ARMContract.ParseSkippedUnvoteToCurse(log) case _ARMContract.abi.Events["TaggedRootBlessVotesReset"].ID: @@ -2554,15 +2647,15 @@ func (ARMContractAlreadyVotedToBless) Topic() common.Hash { } func (ARMContractConfigSet) Topic() common.Hash { - return common.HexToHash("0x7cf8e698b191db138396ab0eae2ad5b3fe353fd014fd5956b034b86f2d605cfd") + return common.HexToHash("0x8c49fda8177c5c8c768eb39634bc6773695c7181711537b822451c12b2efd2a9") } -func (ARMContractCursed) Topic() common.Hash { - return common.HexToHash("0x6ec7e144a45fa03ed986874794df08b5b6bbbb27ed6454b4e6eaa74248b5e333") +func (ARMContractCurseLifted) Topic() common.Hash { + return common.HexToHash("0x65d0e78c3625f0956f58610cf0fb157eaf627683258875ef29af2f71d25ac8fd") } -func (ARMContractOwnerCursed) Topic() common.Hash { - return common.HexToHash("0x367ba81ba03ea9fa7ee089ecfb43b1c35e0935bc87a472abf615b7580dc16b79") +func (ARMContractCursed) Topic() common.Hash { + return common.HexToHash("0xcfdbfd8ce9a56b5f7c202c0e102184d24f47ca87121dc165063fc4c290957bde") } func (ARMContractOwnershipTransferRequested) Topic() common.Hash { @@ -2573,16 +2666,16 @@ func (ARMContractOwnershipTransferred) Topic() common.Hash { return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") } -func (ARMContractRecoveredFromCurse) Topic() common.Hash { - return common.HexToHash("0x08c773aaf7568c6b9110dcdfc13c27177410582ee30e157d1aa306b49d603eb7") +func (ARMContractPermaBlessedCommitStoreAdded) Topic() common.Hash { + return common.HexToHash("0x66b4b4752c65ae8cd2f3a0a48c7dc8b2118c60d5ea15514992eb2ddf56c9cb15") } -func (ARMContractReusedVotesToCurse) Topic() common.Hash { - return common.HexToHash("0xb4a70189a30e3d3b9c77d291f83699633e70ab4427fc3644a955ab4cca077b03") +func (ARMContractPermaBlessedCommitStoreRemoved) Topic() common.Hash { + return common.HexToHash("0xdca892154bbc36d0c05ccd01b3d0411875cb1b841fcdeebb384e5d0d6eb06b44") } func (ARMContractSkippedUnvoteToCurse) Topic() common.Hash { - return common.HexToHash("0xf4e3b20447f3f83360469333a2578825ae355d192dd6f59c6516d832fa425a53") + return common.HexToHash("0xbabb0d7099e6ca14a29fad2a2cfb4fda2bd30f97cb3c27e546174bfb4277c1cc") } func (ARMContractTaggedRootBlessVotesReset) Topic() common.Hash { @@ -2594,7 +2687,7 @@ func (ARMContractTaggedRootBlessed) Topic() common.Hash { } func (ARMContractUnvotedToCurse) Topic() common.Hash { - return common.HexToHash("0x56c9f1d1001236f66c1e5d598905029b4093031f31aead3449a53d832eade225") + return common.HexToHash("0xa96a155bd67c927a6c056befbd979b78465e2b2f1276bf7d4e90a31d4f430aa8") } func (ARMContractVotedToBless) Topic() common.Hash { @@ -2602,7 +2695,7 @@ func (ARMContractVotedToBless) Topic() common.Hash { } func (ARMContractVotedToCurse) Topic() common.Hash { - return common.HexToHash("0x8e5ceca76dae647f687fccbe8d42a3796e68330812669bd5003b938dacb1b6dd") + return common.HexToHash("0x8137bc8a8d712aaa27bfc6506d5566ac405618bd53f9831b8ca6b6fe5442ee7a") } func (_ARMContract *ARMContract) Address() common.Address { @@ -2618,13 +2711,21 @@ type ARMContractInterface interface { error) - GetCurseProgress(opts *bind.CallOpts) (GetCurseProgress, + GetCurseProgress(opts *bind.CallOpts, subject [16]byte) (GetCurseProgress, error) + GetCursedSubjectsCount(opts *bind.CallOpts) (*big.Int, error) + + GetPermaBlessedCommitStores(opts *bind.CallOpts) ([]common.Address, error) + + GetRecordedCurseRelatedOps(opts *bind.CallOpts, offset *big.Int, limit *big.Int) ([]RMNRecordedCurseRelatedOp, error) + + GetRecordedCurseRelatedOpsCount(opts *bind.CallOpts) (*big.Int, error) + IsBlessed(opts *bind.CallOpts, taggedRoot IRMNTaggedRoot) (bool, error) - IsCursed(opts *bind.CallOpts, arg0 [16]byte) (bool, error) + IsCursed(opts *bind.CallOpts, subject [16]byte) (bool, error) IsCursed0(opts *bind.CallOpts) (bool, error) @@ -2634,21 +2735,23 @@ type ARMContractInterface interface { AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) - OwnerCurse(opts *bind.TransactOpts) (*types.Transaction, error) + OwnerCurse(opts *bind.TransactOpts, curseId [16]byte, subjects [][16]byte) (*types.Transaction, error) + + OwnerRemoveThenAddPermaBlessedCommitStores(opts *bind.TransactOpts, removes []common.Address, adds []common.Address) (*types.Transaction, error) OwnerResetBlessVotes(opts *bind.TransactOpts, taggedRoots []IRMNTaggedRoot) (*types.Transaction, error) - OwnerUnvoteToCurse(opts *bind.TransactOpts, unvoteRecords []RMNUnvoteToCurseRecord) (*types.Transaction, error) + OwnerUnvoteToCurse(opts *bind.TransactOpts, ownerUnvoteToCurseRequests []RMNOwnerUnvoteToCurseRequest) (*types.Transaction, error) SetConfig(opts *bind.TransactOpts, config RMNConfig) (*types.Transaction, error) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) - UnvoteToCurse(opts *bind.TransactOpts, curseVoteAddr common.Address, cursesHash [32]byte) (*types.Transaction, error) + UnvoteToCurse(opts *bind.TransactOpts, unvoteToCurseRequests []RMNUnvoteToCurseRequest) (*types.Transaction, error) VoteToBless(opts *bind.TransactOpts, taggedRoots []IRMNTaggedRoot) (*types.Transaction, error) - VoteToCurse(opts *bind.TransactOpts, curseId [32]byte) (*types.Transaction, error) + VoteToCurse(opts *bind.TransactOpts, curseId [16]byte, subjects [][16]byte) (*types.Transaction, error) FilterAlreadyBlessed(opts *bind.FilterOpts, configVersion []uint32, voter []common.Address) (*ARMContractAlreadyBlessedIterator, error) @@ -2668,17 +2771,17 @@ type ARMContractInterface interface { ParseConfigSet(log types.Log) (*ARMContractConfigSet, error) - FilterCursed(opts *bind.FilterOpts, configVersion []uint32) (*ARMContractCursedIterator, error) + FilterCurseLifted(opts *bind.FilterOpts) (*ARMContractCurseLiftedIterator, error) - WatchCursed(opts *bind.WatchOpts, sink chan<- *ARMContractCursed, configVersion []uint32) (event.Subscription, error) + WatchCurseLifted(opts *bind.WatchOpts, sink chan<- *ARMContractCurseLifted) (event.Subscription, error) - ParseCursed(log types.Log) (*ARMContractCursed, error) + ParseCurseLifted(log types.Log) (*ARMContractCurseLifted, error) - FilterOwnerCursed(opts *bind.FilterOpts) (*ARMContractOwnerCursedIterator, error) + FilterCursed(opts *bind.FilterOpts, configVersion []uint32) (*ARMContractCursedIterator, error) - WatchOwnerCursed(opts *bind.WatchOpts, sink chan<- *ARMContractOwnerCursed) (event.Subscription, error) + WatchCursed(opts *bind.WatchOpts, sink chan<- *ARMContractCursed, configVersion []uint32) (event.Subscription, error) - ParseOwnerCursed(log types.Log) (*ARMContractOwnerCursed, error) + ParseCursed(log types.Log) (*ARMContractCursed, error) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ARMContractOwnershipTransferRequestedIterator, error) @@ -2692,17 +2795,17 @@ type ARMContractInterface interface { ParseOwnershipTransferred(log types.Log) (*ARMContractOwnershipTransferred, error) - FilterRecoveredFromCurse(opts *bind.FilterOpts) (*ARMContractRecoveredFromCurseIterator, error) + FilterPermaBlessedCommitStoreAdded(opts *bind.FilterOpts) (*ARMContractPermaBlessedCommitStoreAddedIterator, error) - WatchRecoveredFromCurse(opts *bind.WatchOpts, sink chan<- *ARMContractRecoveredFromCurse) (event.Subscription, error) + WatchPermaBlessedCommitStoreAdded(opts *bind.WatchOpts, sink chan<- *ARMContractPermaBlessedCommitStoreAdded) (event.Subscription, error) - ParseRecoveredFromCurse(log types.Log) (*ARMContractRecoveredFromCurse, error) + ParsePermaBlessedCommitStoreAdded(log types.Log) (*ARMContractPermaBlessedCommitStoreAdded, error) - FilterReusedVotesToCurse(opts *bind.FilterOpts, configVersion []uint32, voter []common.Address) (*ARMContractReusedVotesToCurseIterator, error) + FilterPermaBlessedCommitStoreRemoved(opts *bind.FilterOpts) (*ARMContractPermaBlessedCommitStoreRemovedIterator, error) - WatchReusedVotesToCurse(opts *bind.WatchOpts, sink chan<- *ARMContractReusedVotesToCurse, configVersion []uint32, voter []common.Address) (event.Subscription, error) + WatchPermaBlessedCommitStoreRemoved(opts *bind.WatchOpts, sink chan<- *ARMContractPermaBlessedCommitStoreRemoved) (event.Subscription, error) - ParseReusedVotesToCurse(log types.Log) (*ARMContractReusedVotesToCurse, error) + ParsePermaBlessedCommitStoreRemoved(log types.Log) (*ARMContractPermaBlessedCommitStoreRemoved, error) FilterSkippedUnvoteToCurse(opts *bind.FilterOpts, voter []common.Address) (*ARMContractSkippedUnvoteToCurseIterator, error) diff --git a/core/gethwrappers/ccip/generated/ccip_capability_configuration/ccip_capability_configuration.go b/core/gethwrappers/ccip/generated/ccip_capability_configuration/ccip_capability_configuration.go deleted file mode 100644 index 58fb7d5bd2..0000000000 --- a/core/gethwrappers/ccip/generated/ccip_capability_configuration/ccip_capability_configuration.go +++ /dev/null @@ -1,1079 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package ccip_capability_configuration - -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 CCIPCapabilityConfigurationChainConfig struct { - Readers [][32]byte - FChain uint8 - Config []byte -} - -type CCIPCapabilityConfigurationChainConfigInfo struct { - ChainSelector uint64 - ChainConfig CCIPCapabilityConfigurationChainConfig -} - -type CCIPCapabilityConfigurationOCR3Config struct { - PluginType uint8 - ChainSelector uint64 - F uint8 - OffchainConfigVersion uint64 - OfframpAddress []byte - BootstrapP2PIds [][32]byte - P2pIds [][32]byte - Signers [][]byte - Transmitters [][]byte - OffchainConfig []byte -} - -type CCIPCapabilityConfigurationOCR3ConfigWithMeta struct { - Config CCIPCapabilityConfigurationOCR3Config - ConfigCount uint64 - ConfigDigest [32]byte -} - -var CCIPCapabilityConfigurationMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"capabilityRegistry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainConfigNotSetForChain\",\"type\":\"error\"},{\"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\":\"enumCCIPCapabilityConfiguration.ConfigState\",\"name\":\"currentState\",\"type\":\"uint8\"},{\"internalType\":\"enumCCIPCapabilityConfiguration.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\":\"OnlyCapabilityRegistryCanCall\",\"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\":\"TooManyBootstrapP2PIds\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManyOCR3Configs\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManySigners\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManyTransmitters\",\"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\"},{\"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\":\"structCCIPCapabilityConfiguration.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\":\"structCCIPCapabilityConfiguration.ChainConfig\",\"name\":\"chainConfig\",\"type\":\"tuple\"}],\"internalType\":\"structCCIPCapabilityConfiguration.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\":[],\"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\":\"structCCIPCapabilityConfiguration.ChainConfig\",\"name\":\"chainConfig\",\"type\":\"tuple\"}],\"internalType\":\"structCCIPCapabilityConfiguration.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\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"enumCCIPCapabilityConfiguration.PluginType\",\"name\":\"pluginType\",\"type\":\"uint8\"}],\"name\":\"getOCRConfig\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"enumCCIPCapabilityConfiguration.PluginType\",\"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\":\"bootstrapP2PIds\",\"type\":\"bytes32[]\"},{\"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\":\"structCCIPCapabilityConfiguration.OCR3Config\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"configCount\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"internalType\":\"structCCIPCapabilityConfiguration.OCR3ConfigWithMeta[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"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: "0x60a06040523480156200001157600080fd5b506040516200403e3803806200403e83398101604081905262000034916200017e565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620000d3565b5050506001600160a01b0316608052620001b0565b336001600160a01b038216036200012d5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000602082840312156200019157600080fd5b81516001600160a01b0381168114620001a957600080fd5b9392505050565b608051613e6b620001d360003960008181610d640152610ff90152613e6b6000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c80638da5cb5b11610076578063f2fde38b1161005b578063f2fde38b1461014e578063f442c89a14610161578063fba64a7c1461017457600080fd5b80638da5cb5b14610111578063ddc042a81461013957600080fd5b8063181f5a77146100a85780634bd0473f146100c657806379ba5097146100e65780638318ed5d146100f0575b600080fd5b6100b0610187565b6040516100bd9190612cda565b60405180910390f35b6100d96100d4366004612d1e565b6101a3565b6040516100bd9190612e4a565b6100ee610674565b005b6100b06100fe366004613027565b5060408051602081019091526000815290565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100bd565b610141610776565b6040516100bd9190613088565b6100ee61015c366004613118565b610968565b6100ee61016f36600461319a565b61097c565b6100ee61018236600461321e565b610d4c565b604051806060016040528060258152602001613e3a6025913981565b63ffffffff821660009081526005602052604081206060918360018111156101cd576101cd612d53565b60018111156101de576101de612d53565b8152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b8282101561066757600084815260209020604080516101a08101909152600984029091018054829060608201908390829060ff16600181111561025157610251612d53565b600181111561026257610262612d53565b8152815467ffffffffffffffff61010082048116602084015260ff690100000000000000000083041660408401526a01000000000000000000009091041660608201526001820180546080909201916102ba906132db565b80601f01602080910402602001604051908101604052809291908181526020018280546102e6906132db565b80156103335780601f1061030857610100808354040283529160200191610333565b820191906000526020600020905b81548152906001019060200180831161031657829003601f168201915b505050505081526020016002820180548060200260200160405190810160405280929190818152602001828054801561038b57602002820191906000526020600020905b815481526020019060010190808311610377575b50505050508152602001600382018054806020026020016040519081016040528092919081815260200182805480156103e357602002820191906000526020600020905b8154815260200190600101908083116103cf575b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b828210156104bd578382906000526020600020018054610430906132db565b80601f016020809104026020016040519081016040528092919081815260200182805461045c906132db565b80156104a95780601f1061047e576101008083540402835291602001916104a9565b820191906000526020600020905b81548152906001019060200180831161048c57829003601f168201915b505050505081526020019060010190610411565b50505050815260200160058201805480602002602001604051908101604052809291908181526020016000905b82821015610596578382906000526020600020018054610509906132db565b80601f0160208091040260200160405190810160405280929190818152602001828054610535906132db565b80156105825780601f1061055757610100808354040283529160200191610582565b820191906000526020600020905b81548152906001019060200180831161056557829003601f168201915b5050505050815260200190600101906104ea565b5050505081526020016006820180546105ae906132db565b80601f01602080910402602001604051908101604052809291908181526020018280546105da906132db565b80156106275780601f106105fc57610100808354040283529160200191610627565b820191906000526020600020905b81548152906001019060200180831161060a57829003601f168201915b505050919092525050508152600782015467ffffffffffffffff16602080830191909152600890920154604090910152908252600192909201910161020c565b5050505090505b92915050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146106fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b606060006107846003610e0d565b905060006107926003610e21565b67ffffffffffffffff8111156107aa576107aa61332e565b6040519080825280602002602001820160405280156107e357816020015b6107d0612a07565b8152602001906001900390816107c85790505b50905060005b82518110156109615760008382815181106108065761080661335d565b60209081029190910181015160408051808201825267ffffffffffffffff83168082526000908152600285528290208251815460808188028301810190955260608201818152959750929586019490939192849284919084018282801561088c57602002820191906000526020600020905b815481526020019060010190808311610878575b5050509183525050600182015460ff1660208201526002820180546040909201916108b6906132db565b80601f01602080910402602001604051908101604052809291908181526020018280546108e2906132db565b801561092f5780601f106109045761010080835404028352916020019161092f565b820191906000526020600020905b81548152906001019060200180831161091257829003601f168201915b50505050508152505081525083838151811061094d5761094d61335d565b6020908102919091010152506001016107e9565b5092915050565b610970610e2b565b61097981610eae565b50565b610984610e2b565b60005b83811015610b6a576109cb8585838181106109a4576109a461335d565b90506020020160208101906109b9919061338c565b60039067ffffffffffffffff16610fa3565b610a35578484828181106109e1576109e161335d565b90506020020160208101906109f6919061338c565b6040517f1bd4d2d200000000000000000000000000000000000000000000000000000000815267ffffffffffffffff90911660048201526024016106f1565b60026000868684818110610a4b57610a4b61335d565b9050602002016020810190610a60919061338c565b67ffffffffffffffff1681526020810191909152604001600090812090610a878282612a4f565b6001820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055610abf600283016000612a6d565b5050610afd858583818110610ad657610ad661335d565b9050602002016020810190610aeb919061338c565b60039067ffffffffffffffff16610fbb565b507f2a680691fef3b2d105196805935232c661ce703e92d464ef0b94a7bc62d714f0858583818110610b3157610b3161335d565b9050602002016020810190610b46919061338c565b60405167ffffffffffffffff909116815260200160405180910390a1600101610987565b5060005b81811015610d45576000838383818110610b8a57610b8a61335d565b9050602002810190610b9c91906133a7565b610baa9060208101906133e5565b610bb3906135e7565b80519091506000858585818110610bcc57610bcc61335d565b9050602002810190610bde91906133a7565b610bec90602081019061338c565b905060005b8251811015610c2457610c1c838281518110610c0f57610c0f61335d565b6020026020010151610fc7565b600101610bf1565b50826020015160ff16600003610c66576040517fa9b3766e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff81166000908152600260209081526040909120845180518693610c96928492910190612aa7565b5060208201516001820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff90921691909117905560408201516002820190610ce390826136ce565b50610cfd91506003905067ffffffffffffffff83166110e1565b507f05dd57854af2c291a94ea52e7c43d80bc3be7fa73022f98b735dea86642fa5e08184604051610d2f9291906137e8565b60405180910390a1505050806001019050610b6e565b5050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610dbb576040517f7b2485a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610dc984860186613893565b9050600080610dd7836110ed565b8151919350915015610def57610def84600084611346565b805115610e0257610e0284600183611346565b505050505050505050565b60606000610e1a83611b27565b9392505050565b600061066e825490565b60005473ffffffffffffffffffffffffffffffffffffffff163314610eac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016106f1565b565b3373ffffffffffffffffffffffffffffffffffffffff821603610f2d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016106f1565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60008181526001830160205260408120541515610e1a565b6000610e1a8383611b83565b6040517f50c946fe000000000000000000000000000000000000000000000000000000008152600481018290526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906350c946fe90602401600060405180830381865afa158015611055573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261109b9190810190613aa5565b5060408101519091506110dd576040517f8907a4fa000000000000000000000000000000000000000000000000000000008152600481018390526024016106f1565b5050565b6000610e1a8383611c76565b606080600460ff168351111561112f576040517f8854586400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160028082526060820190925290816020015b6111b36040805161014081019091528060008152602001600067ffffffffffffffff168152602001600060ff168152602001600067ffffffffffffffff1681526020016060815260200160608152602001606081526020016060815260200160608152602001606081525090565b81526020019060019003908161114557505060408051600280825260608201909252919350602082015b61124b6040805161014081019091528060008152602001600067ffffffffffffffff168152602001600060ff168152602001600067ffffffffffffffff1681526020016060815260200160608152602001606081526020016060815260200160608152602001606081525090565b8152602001906001900390816111dd57905050905060008060005b85518110156113395760008682815181106112835761128361335d565b60200260200101516000015160018111156112a0576112a0612d53565b036112ed578581815181106112b7576112b761335d565b60200260200101518584815181106112d1576112d161335d565b6020026020010181905250826112e690613bd3565b9250611331565b8581815181106112ff576112ff61335d565b60200260200101518483815181106113195761131961335d565b60200260200101819052508161132e90613bd3565b91505b600101611266565b5090835281529092909150565b63ffffffff831660009081526005602052604081208184600181111561136e5761136e612d53565b600181111561137f5761137f612d53565b8152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b8282101561180857600084815260209020604080516101a08101909152600984029091018054829060608201908390829060ff1660018111156113f2576113f2612d53565b600181111561140357611403612d53565b8152815467ffffffffffffffff61010082048116602084015260ff690100000000000000000083041660408401526a010000000000000000000090910416606082015260018201805460809092019161145b906132db565b80601f0160208091040260200160405190810160405280929190818152602001828054611487906132db565b80156114d45780601f106114a9576101008083540402835291602001916114d4565b820191906000526020600020905b8154815290600101906020018083116114b757829003601f168201915b505050505081526020016002820180548060200260200160405190810160405280929190818152602001828054801561152c57602002820191906000526020600020905b815481526020019060010190808311611518575b505050505081526020016003820180548060200260200160405190810160405280929190818152602001828054801561158457602002820191906000526020600020905b815481526020019060010190808311611570575b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b8282101561165e5783829060005260206000200180546115d1906132db565b80601f01602080910402602001604051908101604052809291908181526020018280546115fd906132db565b801561164a5780601f1061161f5761010080835404028352916020019161164a565b820191906000526020600020905b81548152906001019060200180831161162d57829003601f168201915b5050505050815260200190600101906115b2565b50505050815260200160058201805480602002602001604051908101604052809291908181526020016000905b828210156117375783829060005260206000200180546116aa906132db565b80601f01602080910402602001604051908101604052809291908181526020018280546116d6906132db565b80156117235780601f106116f857610100808354040283529160200191611723565b820191906000526020600020905b81548152906001019060200180831161170657829003601f168201915b50505050508152602001906001019061168b565b50505050815260200160068201805461174f906132db565b80601f016020809104026020016040519081016040528092919081815260200182805461177b906132db565b80156117c85780601f1061179d576101008083540402835291602001916117c8565b820191906000526020600020905b8154815290600101906020018083116117ab57829003601f168201915b505050919092525050508152600782015467ffffffffffffffff1660208083019190915260089092015460409091015290825260019290920191016113ad565b505050509050600061181a8251611cc5565b905060006118288451611cc5565b90506118348282611d17565b60006118438785878686611dd3565b905061184f84826121bf565b63ffffffff871660009081526005602052604081209087600181111561187757611877612d53565b600181111561188857611888612d53565b815260200190815260200160002060006118a29190612af2565b60005b8151811015611b1d5763ffffffff88166000908152600560205260408120908860018111156118d6576118d6612d53565b60018111156118e7576118e7612d53565b81526020019081526020016000208282815181106119075761190761335d565b6020908102919091018101518254600181810185556000948552929093208151805160099095029091018054929490939192849283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690838181111561197157611971612d53565b021790555060208201518154604084015160608501517fffffffffffffffffffffffffffffffffffffffffffff000000000000000000ff90921661010067ffffffffffffffff948516027fffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffff1617690100000000000000000060ff90921691909102177fffffffffffffffffffffffffffff0000000000000000ffffffffffffffffffff166a0100000000000000000000929091169190910217815560808201516001820190611a4090826136ce565b5060a08201518051611a5c916002840191602090910190612aa7565b5060c08201518051611a78916003840191602090910190612aa7565b5060e08201518051611a94916004840191602090910190612b13565b506101008201518051611ab1916005840191602090910190612b13565b506101208201516006820190611ac790826136ce565b50505060208201516007820180547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff9092169190911790556040909101516008909101556001016118a5565b5050505050505050565b606081600001805480602002602001604051908101604052809291908181526020018280548015611b7757602002820191906000526020600020905b815481526020019060010190808311611b63575b50505050509050919050565b60008181526001830160205260408120548015611c6c576000611ba7600183613c0b565b8554909150600090611bbb90600190613c0b565b9050818114611c20576000866000018281548110611bdb57611bdb61335d565b9060005260206000200154905080876000018481548110611bfe57611bfe61335d565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611c3157611c31613c1e565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061066e565b600091505061066e565b6000818152600183016020526040812054611cbd5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561066e565b50600061066e565b60006002821115611d05576040517f3e478526000000000000000000000000000000000000000000000000000000008152600481018390526024016106f1565b81600281111561066e5761066e612d53565b6000826002811115611d2b57611d2b612d53565b826002811115611d3d57611d3d612d53565b611d479190613c4d565b90508060011480611d935750807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff148015611d9357506002836002811115611d9157611d91612d53565b145b15611d9d57505050565b82826040517f0a6b675b0000000000000000000000000000000000000000000000000000000081526004016106f1929190613c7d565b60606000845167ffffffffffffffff811115611df157611df161332e565b604051908082528060200260200182016040528015611e1a578160200160208202803683370190505b5090506000846002811115611e3157611e31612d53565b148015611e4f57506001836002811115611e4d57611e4d612d53565b145b15611e9057600181600081518110611e6957611e6961335d565b602002602001019067ffffffffffffffff16908167ffffffffffffffff1681525050611ff8565b6001846002811115611ea457611ea4612d53565b148015611ec257506002836002811115611ec057611ec0612d53565b145b15611f595785600081518110611eda57611eda61335d565b60200260200101516020015181600081518110611ef957611ef961335d565b602002602001019067ffffffffffffffff16908167ffffffffffffffff168152505085600081518110611f2e57611f2e61335d565b6020026020010151602001516001611f469190613c98565b81600181518110611e6957611e6961335d565b6002846002811115611f6d57611f6d612d53565b148015611f8b57506001836002811115611f8957611f89612d53565b145b15611fc25785600181518110611fa357611fa361335d565b60200260200101516020015181600081518110611e6957611e6961335d565b83836040517f0a6b675b0000000000000000000000000000000000000000000000000000000081526004016106f1929190613c7d565b6000855167ffffffffffffffff8111156120145761201461332e565b6040519080825280602002602001820160405280156120ca57816020015b604080516101a081018252600060608083018281526080840183905260a0840183905260c0840183905260e084018290526101008401829052610120840182905261014084018290526101608401829052610180840191909152825260208083018290529282015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816120325790505b50905060005b82518110156121b3576120fb8782815181106120ee576120ee61335d565b602002602001015161253e565b60405180606001604052808883815181106121185761211861335d565b602002602001015181526020018483815181106121375761213761335d565b602002602001015167ffffffffffffffff16815260200161218b8b8685815181106121645761216461335d565b60200260200101518b868151811061217e5761217e61335d565b6020026020010151612932565b8152508282815181106121a0576121a061335d565b60209081029190910101526001016120d0565b50979650505050505050565b81518151811580156121d15750806001145b1561227357826000815181106121e9576121e961335d565b60200260200101516020015167ffffffffffffffff1660011461226d57826000815181106122195761221961335d565b60209081029190910181015101516040517fc1658eb800000000000000000000000000000000000000000000000000000000815267ffffffffffffffff9091166004820152600160248201526044016106f1565b50505050565b8160011480156122835750806002145b15612439578360008151811061229b5761229b61335d565b602002602001015160400151836000815181106122ba576122ba61335d565b6020026020010151604001511461234657826000815181106122de576122de61335d565b602002602001015160400151846000815181106122fd576122fd61335d565b6020026020010151604001516040517fc7ccdd7f0000000000000000000000000000000000000000000000000000000081526004016106f1929190918252602082015260400190565b836000815181106123595761235961335d565b60200260200101516020015160016123719190613c98565b67ffffffffffffffff168360018151811061238e5761238e61335d565b60200260200101516020015167ffffffffffffffff161461226d57826001815181106123bc576123bc61335d565b602002602001015160200151846000815181106123db576123db61335d565b60200260200101516020015160016123f39190613c98565b6040517fc1658eb800000000000000000000000000000000000000000000000000000000815267ffffffffffffffff9283166004820152911660248201526044016106f1565b8160021480156124495750806001145b1561250c57836001815181106124615761246161335d565b602002602001015160400151836000815181106124805761248061335d565b6020026020010151604001511461226d57826000815181106124a4576124a461335d565b602002602001015160400151846001815181106124c3576124c361335d565b6020026020010151604001516040517f9e9756700000000000000000000000000000000000000000000000000000000081526004016106f1929190918252602082015260400190565b6040517f1f1b2bb600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806020015167ffffffffffffffff16600003612586576040517f698cf8e000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008151600181111561259b5761259b612d53565b141580156125bc57506001815160018111156125b9576125b9612d53565b14155b156125f3576040517f3302dbd700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806080015151600003612632576040517f358c192700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602081015161264d9060039067ffffffffffffffff16610fa3565b6126955760208101516040517f1bd4d2d200000000000000000000000000000000000000000000000000000000815267ffffffffffffffff90911660048201526024016106f1565b60e081015151601f10156126d5576040517f1b925da600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61010081015151601f1015612716576040517f645960ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208082015167ffffffffffffffff166000908152600290915260408120600101546127469060ff166003613cb9565b612751906001613cd5565b60ff169050808261010001515110156127a857610100820151516040517f548dd21f0000000000000000000000000000000000000000000000000000000081526004810191909152602481018290526044016106f1565b816040015160ff166000036127e9576040517f39d1a4d000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408201516127f9906003613cb9565b60ff168260e001515111612839576040517f4856694e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8160e00151518260c001515114158061285d5750816101000151518260c001515114155b156128b85760c08201515160e083015151610100840151516040517fba900f6d0000000000000000000000000000000000000000000000000000000081526004810193909352602483019190915260448201526064016106f1565b8160c00151518260a001515111156128fc576040517f8473d80700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8260e001515181101561292d576129258360c001518281518110610c0f57610c0f61335d565b6001016128ff565b505050565b60008082602001518584600001518560800151878760a001518860c001518960e001518a61010001518b604001518c606001518d61012001516040516020016129869c9b9a99989796959493929190613d59565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101207dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e0a000000000000000000000000000000000000000000000000000000000000179150509392505050565b6040518060400160405280600067ffffffffffffffff168152602001612a4a604051806060016040528060608152602001600060ff168152602001606081525090565b905290565b50805460008255906000526020600020908101906109799190612b65565b508054612a79906132db565b6000825580601f10612a89575050565b601f0160209004906000526020600020908101906109799190612b65565b828054828255906000526020600020908101928215612ae2579160200282015b82811115612ae2578251825591602001919060010190612ac7565b50612aee929150612b65565b5090565b50805460008255600902906000526020600020908101906109799190612b7a565b828054828255906000526020600020908101928215612b59579160200282015b82811115612b595782518290612b4990826136ce565b5091602001919060010190612b33565b50612aee929150612c3b565b5b80821115612aee5760008155600101612b66565b80821115612aee5780547fffffffffffffffffffffffffffff00000000000000000000000000000000000016815560008181612bb96001830182612a6d565b612bc7600283016000612a4f565b612bd5600383016000612a4f565b612be3600483016000612c58565b612bf1600583016000612c58565b612bff600683016000612a6d565b5050506007810180547fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000016905560006008820155600901612b7a565b80821115612aee576000612c4f8282612a6d565b50600101612c3b565b50805460008255906000526020600020908101906109799190612c3b565b6000815180845260005b81811015612c9c57602081850181015186830182015201612c80565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000610e1a6020830184612c76565b63ffffffff8116811461097957600080fd5b8035612d0a81612ced565b919050565b803560028110612d0a57600080fd5b60008060408385031215612d3157600080fd5b8235612d3c81612ced565b9150612d4a60208401612d0f565b90509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60028110612d9257612d92612d53565b9052565b60008151808452602080850194506020840160005b83811015612dc757815187529582019590820190600101612dab565b509495945050505050565b60008282518085526020808601955060208260051b8401016020860160005b84811015612e3d577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0868403018952612e2b838351612c76565b98840198925090830190600101612df1565b5090979650505050505050565b600060208083018184528085518083526040925060408601915060408160051b87010184880160005b83811015613019577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0898403018552815160608151818652612eb88287018251612d82565b898101516080612ed38189018367ffffffffffffffff169052565b8a830151915060a0612ee9818a018460ff169052565b938301519360c09250612f078984018667ffffffffffffffff169052565b818401519450610140915060e082818b0152612f276101a08b0187612c76565b95508185015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa0610100818c890301818d0152612f668885612d96565b97508587015195506101209350818c890301848d0152612f868887612d96565b9750828701519550818c890301858d0152612fa18887612dd2565b975080870151955050808b8803016101608c0152612fbf8786612dd2565b9650828601519550808b8803016101808c01525050505050612fe18282612c76565b91505088820151612ffd8a87018267ffffffffffffffff169052565b5090870151938701939093529386019390860190600101612e73565b509098975050505050505050565b60006020828403121561303957600080fd5b8135610e1a81612ced565b60008151606084526130596060850182612d96565b905060ff60208401511660208501526040830151848203604086015261307f8282612c76565b95945050505050565b600060208083018184528085518083526040925060408601915060408160051b87010184880160005b83811015613019578883037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc00185528151805167ffffffffffffffff16845287015187840187905261310587850182613044565b95880195935050908601906001016130b1565b60006020828403121561312a57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114610e1a57600080fd5b60008083601f84011261316057600080fd5b50813567ffffffffffffffff81111561317857600080fd5b6020830191508360208260051b850101111561319357600080fd5b9250929050565b600080600080604085870312156131b057600080fd5b843567ffffffffffffffff808211156131c857600080fd5b6131d48883890161314e565b909650945060208701359150808211156131ed57600080fd5b506131fa8782880161314e565b95989497509550505050565b803567ffffffffffffffff81168114612d0a57600080fd5b6000806000806000806080878903121561323757600080fd5b863567ffffffffffffffff8082111561324f57600080fd5b61325b8a838b0161314e565b9098509650602089013591508082111561327457600080fd5b818901915089601f83011261328857600080fd5b81358181111561329757600080fd5b8a60208285010111156132a957600080fd5b6020830196508095505050506132c160408801613206565b91506132cf60608801612cff565b90509295509295509295565b600181811c908216806132ef57607f821691505b602082108103613328577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006020828403121561339e57600080fd5b610e1a82613206565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc18336030181126133db57600080fd5b9190910192915050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa18336030181126133db57600080fd5b604051610140810167ffffffffffffffff8111828210171561343d5761343d61332e565b60405290565b6040516080810167ffffffffffffffff8111828210171561343d5761343d61332e565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156134ad576134ad61332e565b604052919050565b600067ffffffffffffffff8211156134cf576134cf61332e565b5060051b60200190565b600082601f8301126134ea57600080fd5b813560206134ff6134fa836134b5565b613466565b8083825260208201915060208460051b87010193508684111561352157600080fd5b602086015b8481101561353d5780358352918301918301613526565b509695505050505050565b803560ff81168114612d0a57600080fd5b600082601f83011261356a57600080fd5b813567ffffffffffffffff8111156135845761358461332e565b6135b560207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601613466565b8181528460208386010111156135ca57600080fd5b816020850160208301376000918101602001919091529392505050565b6000606082360312156135f957600080fd5b6040516060810167ffffffffffffffff828210818311171561361d5761361d61332e565b81604052843591508082111561363257600080fd5b61363e368387016134d9565b835261364c60208601613548565b6020840152604085013591508082111561366557600080fd5b5061367236828601613559565b60408301525092915050565b601f82111561292d576000816000526020600020601f850160051c810160208610156136a75750805b601f850160051c820191505b818110156136c6578281556001016136b3565b505050505050565b815167ffffffffffffffff8111156136e8576136e861332e565b6136fc816136f684546132db565b8461367e565b602080601f83116001811461374f57600084156137195750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556136c6565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561379c5788860151825594840194600190910190840161377d565b50858210156137d857878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b67ffffffffffffffff8316815260406020820152600061380b6040830184613044565b949350505050565b600082601f83011261382457600080fd5b813560206138346134fa836134b5565b82815260059290921b8401810191818101908684111561385357600080fd5b8286015b8481101561353d57803567ffffffffffffffff8111156138775760008081fd5b6138858986838b0101613559565b845250918301918301613857565b600060208083850312156138a657600080fd5b823567ffffffffffffffff808211156138be57600080fd5b818501915085601f8301126138d257600080fd5b81356138e06134fa826134b5565b81815260059190911b830184019084810190888311156138ff57600080fd5b8585015b83811015613a8d5780358581111561391a57600080fd5b8601610140818c037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001121561394f57600080fd5b613957613419565b613962898301612d0f565b815261397060408301613206565b8982015261398060608301613548565b604082015261399160808301613206565b606082015260a0820135878111156139a857600080fd5b6139b68d8b83860101613559565b60808301525060c0820135878111156139ce57600080fd5b6139dc8d8b838601016134d9565b60a08301525060e0820135878111156139f457600080fd5b613a028d8b838601016134d9565b60c0830152506101008083013588811115613a1c57600080fd5b613a2a8e8c83870101613813565b60e0840152506101208084013589811115613a4457600080fd5b613a528f8d83880101613813565b8385015250610140840135915088821115613a6c57600080fd5b613a7a8e8c84870101613559565b9083015250845250918601918601613903565b5098975050505050505050565b8051612d0a81612ced565b60008060408385031215613ab857600080fd5b825167ffffffffffffffff80821115613ad057600080fd5b9084019060808287031215613ae457600080fd5b613aec613443565b8251613af781612ced565b81526020838101518183015260408085015190830152606084015183811115613b1f57600080fd5b80850194505087601f850112613b3457600080fd5b83519250613b446134fa846134b5565b83815260059390931b84018101928181019089851115613b6357600080fd5b948201945b84861015613b8157855182529482019490820190613b68565b8060608501525050819550613b97818801613a9a565b9450505050509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613c0457613c04613ba4565b5060010190565b8181038181111561066e5761066e613ba4565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b818103600083128015838313168383128216171561096157610961613ba4565b60038110612d9257612d92612d53565b60408101613c8b8285613c6d565b610e1a6020830184613c6d565b67ffffffffffffffff81811683821601908082111561096157610961613ba4565b60ff818116838216029081169081811461096157610961613ba4565b60ff818116838216019081111561066e5761066e613ba4565b60008282518085526020808601955060208260051b8401016020860160005b84811015612e3d577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0868403018952613d47838351612c76565b98840198925090830190600101613d0d565b67ffffffffffffffff8d16815263ffffffff8c166020820152613d7f604082018c612d82565b61018060608201526000613d9761018083018c612c76565b67ffffffffffffffff8b16608084015282810360a0840152613db9818b612d96565b905082810360c0840152613dcd818a612d96565b905082810360e0840152613de18189613cee565b9050828103610100840152613df68188613cee565b60ff8716610120850152905067ffffffffffffffff8516610140840152828103610160840152613e268185612c76565b9f9e50505050505050505050505050505056fe434349504361706162696c697479436f6e66696775726174696f6e20312e362e302d646576a164736f6c6343000818000a", -} - -var CCIPCapabilityConfigurationABI = CCIPCapabilityConfigurationMetaData.ABI - -var CCIPCapabilityConfigurationBin = CCIPCapabilityConfigurationMetaData.Bin - -func DeployCCIPCapabilityConfiguration(auth *bind.TransactOpts, backend bind.ContractBackend, capabilityRegistry common.Address) (common.Address, *types.Transaction, *CCIPCapabilityConfiguration, error) { - parsed, err := CCIPCapabilityConfigurationMetaData.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(CCIPCapabilityConfigurationBin), backend, capabilityRegistry) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &CCIPCapabilityConfiguration{address: address, abi: *parsed, CCIPCapabilityConfigurationCaller: CCIPCapabilityConfigurationCaller{contract: contract}, CCIPCapabilityConfigurationTransactor: CCIPCapabilityConfigurationTransactor{contract: contract}, CCIPCapabilityConfigurationFilterer: CCIPCapabilityConfigurationFilterer{contract: contract}}, nil -} - -type CCIPCapabilityConfiguration struct { - address common.Address - abi abi.ABI - CCIPCapabilityConfigurationCaller - CCIPCapabilityConfigurationTransactor - CCIPCapabilityConfigurationFilterer -} - -type CCIPCapabilityConfigurationCaller struct { - contract *bind.BoundContract -} - -type CCIPCapabilityConfigurationTransactor struct { - contract *bind.BoundContract -} - -type CCIPCapabilityConfigurationFilterer struct { - contract *bind.BoundContract -} - -type CCIPCapabilityConfigurationSession struct { - Contract *CCIPCapabilityConfiguration - CallOpts bind.CallOpts - TransactOpts bind.TransactOpts -} - -type CCIPCapabilityConfigurationCallerSession struct { - Contract *CCIPCapabilityConfigurationCaller - CallOpts bind.CallOpts -} - -type CCIPCapabilityConfigurationTransactorSession struct { - Contract *CCIPCapabilityConfigurationTransactor - TransactOpts bind.TransactOpts -} - -type CCIPCapabilityConfigurationRaw struct { - Contract *CCIPCapabilityConfiguration -} - -type CCIPCapabilityConfigurationCallerRaw struct { - Contract *CCIPCapabilityConfigurationCaller -} - -type CCIPCapabilityConfigurationTransactorRaw struct { - Contract *CCIPCapabilityConfigurationTransactor -} - -func NewCCIPCapabilityConfiguration(address common.Address, backend bind.ContractBackend) (*CCIPCapabilityConfiguration, error) { - abi, err := abi.JSON(strings.NewReader(CCIPCapabilityConfigurationABI)) - if err != nil { - return nil, err - } - contract, err := bindCCIPCapabilityConfiguration(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &CCIPCapabilityConfiguration{address: address, abi: abi, CCIPCapabilityConfigurationCaller: CCIPCapabilityConfigurationCaller{contract: contract}, CCIPCapabilityConfigurationTransactor: CCIPCapabilityConfigurationTransactor{contract: contract}, CCIPCapabilityConfigurationFilterer: CCIPCapabilityConfigurationFilterer{contract: contract}}, nil -} - -func NewCCIPCapabilityConfigurationCaller(address common.Address, caller bind.ContractCaller) (*CCIPCapabilityConfigurationCaller, error) { - contract, err := bindCCIPCapabilityConfiguration(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &CCIPCapabilityConfigurationCaller{contract: contract}, nil -} - -func NewCCIPCapabilityConfigurationTransactor(address common.Address, transactor bind.ContractTransactor) (*CCIPCapabilityConfigurationTransactor, error) { - contract, err := bindCCIPCapabilityConfiguration(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &CCIPCapabilityConfigurationTransactor{contract: contract}, nil -} - -func NewCCIPCapabilityConfigurationFilterer(address common.Address, filterer bind.ContractFilterer) (*CCIPCapabilityConfigurationFilterer, error) { - contract, err := bindCCIPCapabilityConfiguration(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &CCIPCapabilityConfigurationFilterer{contract: contract}, nil -} - -func bindCCIPCapabilityConfiguration(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := CCIPCapabilityConfigurationMetaData.GetAbi() - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _CCIPCapabilityConfiguration.Contract.CCIPCapabilityConfigurationCaller.contract.Call(opts, result, method, params...) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.Contract.CCIPCapabilityConfigurationTransactor.contract.Transfer(opts) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.Contract.CCIPCapabilityConfigurationTransactor.contract.Transact(opts, method, params...) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _CCIPCapabilityConfiguration.Contract.contract.Call(opts, result, method, params...) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.Contract.contract.Transfer(opts) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.Contract.contract.Transact(opts, method, params...) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationCaller) GetAllChainConfigs(opts *bind.CallOpts) ([]CCIPCapabilityConfigurationChainConfigInfo, error) { - var out []interface{} - err := _CCIPCapabilityConfiguration.contract.Call(opts, &out, "getAllChainConfigs") - - if err != nil { - return *new([]CCIPCapabilityConfigurationChainConfigInfo), err - } - - out0 := *abi.ConvertType(out[0], new([]CCIPCapabilityConfigurationChainConfigInfo)).(*[]CCIPCapabilityConfigurationChainConfigInfo) - - return out0, err - -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationSession) GetAllChainConfigs() ([]CCIPCapabilityConfigurationChainConfigInfo, error) { - return _CCIPCapabilityConfiguration.Contract.GetAllChainConfigs(&_CCIPCapabilityConfiguration.CallOpts) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationCallerSession) GetAllChainConfigs() ([]CCIPCapabilityConfigurationChainConfigInfo, error) { - return _CCIPCapabilityConfiguration.Contract.GetAllChainConfigs(&_CCIPCapabilityConfiguration.CallOpts) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationCaller) GetCapabilityConfiguration(opts *bind.CallOpts, arg0 uint32) ([]byte, error) { - var out []interface{} - err := _CCIPCapabilityConfiguration.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 (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationSession) GetCapabilityConfiguration(arg0 uint32) ([]byte, error) { - return _CCIPCapabilityConfiguration.Contract.GetCapabilityConfiguration(&_CCIPCapabilityConfiguration.CallOpts, arg0) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationCallerSession) GetCapabilityConfiguration(arg0 uint32) ([]byte, error) { - return _CCIPCapabilityConfiguration.Contract.GetCapabilityConfiguration(&_CCIPCapabilityConfiguration.CallOpts, arg0) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationCaller) GetOCRConfig(opts *bind.CallOpts, donId uint32, pluginType uint8) ([]CCIPCapabilityConfigurationOCR3ConfigWithMeta, error) { - var out []interface{} - err := _CCIPCapabilityConfiguration.contract.Call(opts, &out, "getOCRConfig", donId, pluginType) - - if err != nil { - return *new([]CCIPCapabilityConfigurationOCR3ConfigWithMeta), err - } - - out0 := *abi.ConvertType(out[0], new([]CCIPCapabilityConfigurationOCR3ConfigWithMeta)).(*[]CCIPCapabilityConfigurationOCR3ConfigWithMeta) - - return out0, err - -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationSession) GetOCRConfig(donId uint32, pluginType uint8) ([]CCIPCapabilityConfigurationOCR3ConfigWithMeta, error) { - return _CCIPCapabilityConfiguration.Contract.GetOCRConfig(&_CCIPCapabilityConfiguration.CallOpts, donId, pluginType) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationCallerSession) GetOCRConfig(donId uint32, pluginType uint8) ([]CCIPCapabilityConfigurationOCR3ConfigWithMeta, error) { - return _CCIPCapabilityConfiguration.Contract.GetOCRConfig(&_CCIPCapabilityConfiguration.CallOpts, donId, pluginType) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _CCIPCapabilityConfiguration.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 (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationSession) Owner() (common.Address, error) { - return _CCIPCapabilityConfiguration.Contract.Owner(&_CCIPCapabilityConfiguration.CallOpts) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationCallerSession) Owner() (common.Address, error) { - return _CCIPCapabilityConfiguration.Contract.Owner(&_CCIPCapabilityConfiguration.CallOpts) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { - var out []interface{} - err := _CCIPCapabilityConfiguration.contract.Call(opts, &out, "typeAndVersion") - - if err != nil { - return *new(string), err - } - - out0 := *abi.ConvertType(out[0], new(string)).(*string) - - return out0, err - -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationSession) TypeAndVersion() (string, error) { - return _CCIPCapabilityConfiguration.Contract.TypeAndVersion(&_CCIPCapabilityConfiguration.CallOpts) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationCallerSession) TypeAndVersion() (string, error) { - return _CCIPCapabilityConfiguration.Contract.TypeAndVersion(&_CCIPCapabilityConfiguration.CallOpts) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.contract.Transact(opts, "acceptOwnership") -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationSession) AcceptOwnership() (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.Contract.AcceptOwnership(&_CCIPCapabilityConfiguration.TransactOpts) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationTransactorSession) AcceptOwnership() (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.Contract.AcceptOwnership(&_CCIPCapabilityConfiguration.TransactOpts) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationTransactor) ApplyChainConfigUpdates(opts *bind.TransactOpts, chainSelectorRemoves []uint64, chainConfigAdds []CCIPCapabilityConfigurationChainConfigInfo) (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.contract.Transact(opts, "applyChainConfigUpdates", chainSelectorRemoves, chainConfigAdds) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationSession) ApplyChainConfigUpdates(chainSelectorRemoves []uint64, chainConfigAdds []CCIPCapabilityConfigurationChainConfigInfo) (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.Contract.ApplyChainConfigUpdates(&_CCIPCapabilityConfiguration.TransactOpts, chainSelectorRemoves, chainConfigAdds) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationTransactorSession) ApplyChainConfigUpdates(chainSelectorRemoves []uint64, chainConfigAdds []CCIPCapabilityConfigurationChainConfigInfo) (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.Contract.ApplyChainConfigUpdates(&_CCIPCapabilityConfiguration.TransactOpts, chainSelectorRemoves, chainConfigAdds) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationTransactor) BeforeCapabilityConfigSet(opts *bind.TransactOpts, arg0 [][32]byte, config []byte, arg2 uint64, donId uint32) (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.contract.Transact(opts, "beforeCapabilityConfigSet", arg0, config, arg2, donId) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationSession) BeforeCapabilityConfigSet(arg0 [][32]byte, config []byte, arg2 uint64, donId uint32) (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.Contract.BeforeCapabilityConfigSet(&_CCIPCapabilityConfiguration.TransactOpts, arg0, config, arg2, donId) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationTransactorSession) BeforeCapabilityConfigSet(arg0 [][32]byte, config []byte, arg2 uint64, donId uint32) (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.Contract.BeforeCapabilityConfigSet(&_CCIPCapabilityConfiguration.TransactOpts, arg0, config, arg2, donId) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.contract.Transact(opts, "transferOwnership", to) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.Contract.TransferOwnership(&_CCIPCapabilityConfiguration.TransactOpts, to) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.Contract.TransferOwnership(&_CCIPCapabilityConfiguration.TransactOpts, to) -} - -type CCIPCapabilityConfigurationCapabilityConfigurationSetIterator struct { - Event *CCIPCapabilityConfigurationCapabilityConfigurationSet - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *CCIPCapabilityConfigurationCapabilityConfigurationSetIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(CCIPCapabilityConfigurationCapabilityConfigurationSet) - 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(CCIPCapabilityConfigurationCapabilityConfigurationSet) - 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 *CCIPCapabilityConfigurationCapabilityConfigurationSetIterator) Error() error { - return it.fail -} - -func (it *CCIPCapabilityConfigurationCapabilityConfigurationSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type CCIPCapabilityConfigurationCapabilityConfigurationSet struct { - Raw types.Log -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) FilterCapabilityConfigurationSet(opts *bind.FilterOpts) (*CCIPCapabilityConfigurationCapabilityConfigurationSetIterator, error) { - - logs, sub, err := _CCIPCapabilityConfiguration.contract.FilterLogs(opts, "CapabilityConfigurationSet") - if err != nil { - return nil, err - } - return &CCIPCapabilityConfigurationCapabilityConfigurationSetIterator{contract: _CCIPCapabilityConfiguration.contract, event: "CapabilityConfigurationSet", logs: logs, sub: sub}, nil -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) WatchCapabilityConfigurationSet(opts *bind.WatchOpts, sink chan<- *CCIPCapabilityConfigurationCapabilityConfigurationSet) (event.Subscription, error) { - - logs, sub, err := _CCIPCapabilityConfiguration.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(CCIPCapabilityConfigurationCapabilityConfigurationSet) - if err := _CCIPCapabilityConfiguration.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 (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) ParseCapabilityConfigurationSet(log types.Log) (*CCIPCapabilityConfigurationCapabilityConfigurationSet, error) { - event := new(CCIPCapabilityConfigurationCapabilityConfigurationSet) - if err := _CCIPCapabilityConfiguration.contract.UnpackLog(event, "CapabilityConfigurationSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type CCIPCapabilityConfigurationChainConfigRemovedIterator struct { - Event *CCIPCapabilityConfigurationChainConfigRemoved - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *CCIPCapabilityConfigurationChainConfigRemovedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(CCIPCapabilityConfigurationChainConfigRemoved) - 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(CCIPCapabilityConfigurationChainConfigRemoved) - 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 *CCIPCapabilityConfigurationChainConfigRemovedIterator) Error() error { - return it.fail -} - -func (it *CCIPCapabilityConfigurationChainConfigRemovedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type CCIPCapabilityConfigurationChainConfigRemoved struct { - ChainSelector uint64 - Raw types.Log -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) FilterChainConfigRemoved(opts *bind.FilterOpts) (*CCIPCapabilityConfigurationChainConfigRemovedIterator, error) { - - logs, sub, err := _CCIPCapabilityConfiguration.contract.FilterLogs(opts, "ChainConfigRemoved") - if err != nil { - return nil, err - } - return &CCIPCapabilityConfigurationChainConfigRemovedIterator{contract: _CCIPCapabilityConfiguration.contract, event: "ChainConfigRemoved", logs: logs, sub: sub}, nil -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) WatchChainConfigRemoved(opts *bind.WatchOpts, sink chan<- *CCIPCapabilityConfigurationChainConfigRemoved) (event.Subscription, error) { - - logs, sub, err := _CCIPCapabilityConfiguration.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(CCIPCapabilityConfigurationChainConfigRemoved) - if err := _CCIPCapabilityConfiguration.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 (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) ParseChainConfigRemoved(log types.Log) (*CCIPCapabilityConfigurationChainConfigRemoved, error) { - event := new(CCIPCapabilityConfigurationChainConfigRemoved) - if err := _CCIPCapabilityConfiguration.contract.UnpackLog(event, "ChainConfigRemoved", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type CCIPCapabilityConfigurationChainConfigSetIterator struct { - Event *CCIPCapabilityConfigurationChainConfigSet - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *CCIPCapabilityConfigurationChainConfigSetIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(CCIPCapabilityConfigurationChainConfigSet) - 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(CCIPCapabilityConfigurationChainConfigSet) - 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 *CCIPCapabilityConfigurationChainConfigSetIterator) Error() error { - return it.fail -} - -func (it *CCIPCapabilityConfigurationChainConfigSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type CCIPCapabilityConfigurationChainConfigSet struct { - ChainSelector uint64 - ChainConfig CCIPCapabilityConfigurationChainConfig - Raw types.Log -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) FilterChainConfigSet(opts *bind.FilterOpts) (*CCIPCapabilityConfigurationChainConfigSetIterator, error) { - - logs, sub, err := _CCIPCapabilityConfiguration.contract.FilterLogs(opts, "ChainConfigSet") - if err != nil { - return nil, err - } - return &CCIPCapabilityConfigurationChainConfigSetIterator{contract: _CCIPCapabilityConfiguration.contract, event: "ChainConfigSet", logs: logs, sub: sub}, nil -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) WatchChainConfigSet(opts *bind.WatchOpts, sink chan<- *CCIPCapabilityConfigurationChainConfigSet) (event.Subscription, error) { - - logs, sub, err := _CCIPCapabilityConfiguration.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(CCIPCapabilityConfigurationChainConfigSet) - if err := _CCIPCapabilityConfiguration.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 (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) ParseChainConfigSet(log types.Log) (*CCIPCapabilityConfigurationChainConfigSet, error) { - event := new(CCIPCapabilityConfigurationChainConfigSet) - if err := _CCIPCapabilityConfiguration.contract.UnpackLog(event, "ChainConfigSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type CCIPCapabilityConfigurationOwnershipTransferRequestedIterator struct { - Event *CCIPCapabilityConfigurationOwnershipTransferRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *CCIPCapabilityConfigurationOwnershipTransferRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(CCIPCapabilityConfigurationOwnershipTransferRequested) - 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(CCIPCapabilityConfigurationOwnershipTransferRequested) - 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 *CCIPCapabilityConfigurationOwnershipTransferRequestedIterator) Error() error { - return it.fail -} - -func (it *CCIPCapabilityConfigurationOwnershipTransferRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type CCIPCapabilityConfigurationOwnershipTransferRequested struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPCapabilityConfigurationOwnershipTransferRequestedIterator, 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 := _CCIPCapabilityConfiguration.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) - if err != nil { - return nil, err - } - return &CCIPCapabilityConfigurationOwnershipTransferRequestedIterator{contract: _CCIPCapabilityConfiguration.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *CCIPCapabilityConfigurationOwnershipTransferRequested, 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 := _CCIPCapabilityConfiguration.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(CCIPCapabilityConfigurationOwnershipTransferRequested) - if err := _CCIPCapabilityConfiguration.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 (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) ParseOwnershipTransferRequested(log types.Log) (*CCIPCapabilityConfigurationOwnershipTransferRequested, error) { - event := new(CCIPCapabilityConfigurationOwnershipTransferRequested) - if err := _CCIPCapabilityConfiguration.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type CCIPCapabilityConfigurationOwnershipTransferredIterator struct { - Event *CCIPCapabilityConfigurationOwnershipTransferred - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *CCIPCapabilityConfigurationOwnershipTransferredIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(CCIPCapabilityConfigurationOwnershipTransferred) - 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(CCIPCapabilityConfigurationOwnershipTransferred) - 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 *CCIPCapabilityConfigurationOwnershipTransferredIterator) Error() error { - return it.fail -} - -func (it *CCIPCapabilityConfigurationOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type CCIPCapabilityConfigurationOwnershipTransferred struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPCapabilityConfigurationOwnershipTransferredIterator, 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 := _CCIPCapabilityConfiguration.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) - if err != nil { - return nil, err - } - return &CCIPCapabilityConfigurationOwnershipTransferredIterator{contract: _CCIPCapabilityConfiguration.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *CCIPCapabilityConfigurationOwnershipTransferred, 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 := _CCIPCapabilityConfiguration.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(CCIPCapabilityConfigurationOwnershipTransferred) - if err := _CCIPCapabilityConfiguration.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 (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) ParseOwnershipTransferred(log types.Log) (*CCIPCapabilityConfigurationOwnershipTransferred, error) { - event := new(CCIPCapabilityConfigurationOwnershipTransferred) - if err := _CCIPCapabilityConfiguration.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfiguration) ParseLog(log types.Log) (generated.AbigenLog, error) { - switch log.Topics[0] { - case _CCIPCapabilityConfiguration.abi.Events["CapabilityConfigurationSet"].ID: - return _CCIPCapabilityConfiguration.ParseCapabilityConfigurationSet(log) - case _CCIPCapabilityConfiguration.abi.Events["ChainConfigRemoved"].ID: - return _CCIPCapabilityConfiguration.ParseChainConfigRemoved(log) - case _CCIPCapabilityConfiguration.abi.Events["ChainConfigSet"].ID: - return _CCIPCapabilityConfiguration.ParseChainConfigSet(log) - case _CCIPCapabilityConfiguration.abi.Events["OwnershipTransferRequested"].ID: - return _CCIPCapabilityConfiguration.ParseOwnershipTransferRequested(log) - case _CCIPCapabilityConfiguration.abi.Events["OwnershipTransferred"].ID: - return _CCIPCapabilityConfiguration.ParseOwnershipTransferred(log) - - default: - return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) - } -} - -func (CCIPCapabilityConfigurationCapabilityConfigurationSet) Topic() common.Hash { - return common.HexToHash("0x84ad7751b744c9e2ee77da1d902b428aec7f0a343d67a24bbe2142e6f58a8d0f") -} - -func (CCIPCapabilityConfigurationChainConfigRemoved) Topic() common.Hash { - return common.HexToHash("0x2a680691fef3b2d105196805935232c661ce703e92d464ef0b94a7bc62d714f0") -} - -func (CCIPCapabilityConfigurationChainConfigSet) Topic() common.Hash { - return common.HexToHash("0x05dd57854af2c291a94ea52e7c43d80bc3be7fa73022f98b735dea86642fa5e0") -} - -func (CCIPCapabilityConfigurationOwnershipTransferRequested) Topic() common.Hash { - return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") -} - -func (CCIPCapabilityConfigurationOwnershipTransferred) Topic() common.Hash { - return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfiguration) Address() common.Address { - return _CCIPCapabilityConfiguration.address -} - -type CCIPCapabilityConfigurationInterface interface { - GetAllChainConfigs(opts *bind.CallOpts) ([]CCIPCapabilityConfigurationChainConfigInfo, error) - - GetCapabilityConfiguration(opts *bind.CallOpts, arg0 uint32) ([]byte, error) - - GetOCRConfig(opts *bind.CallOpts, donId uint32, pluginType uint8) ([]CCIPCapabilityConfigurationOCR3ConfigWithMeta, error) - - Owner(opts *bind.CallOpts) (common.Address, error) - - TypeAndVersion(opts *bind.CallOpts) (string, error) - - AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) - - ApplyChainConfigUpdates(opts *bind.TransactOpts, chainSelectorRemoves []uint64, chainConfigAdds []CCIPCapabilityConfigurationChainConfigInfo) (*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) (*CCIPCapabilityConfigurationCapabilityConfigurationSetIterator, error) - - WatchCapabilityConfigurationSet(opts *bind.WatchOpts, sink chan<- *CCIPCapabilityConfigurationCapabilityConfigurationSet) (event.Subscription, error) - - ParseCapabilityConfigurationSet(log types.Log) (*CCIPCapabilityConfigurationCapabilityConfigurationSet, error) - - FilterChainConfigRemoved(opts *bind.FilterOpts) (*CCIPCapabilityConfigurationChainConfigRemovedIterator, error) - - WatchChainConfigRemoved(opts *bind.WatchOpts, sink chan<- *CCIPCapabilityConfigurationChainConfigRemoved) (event.Subscription, error) - - ParseChainConfigRemoved(log types.Log) (*CCIPCapabilityConfigurationChainConfigRemoved, error) - - FilterChainConfigSet(opts *bind.FilterOpts) (*CCIPCapabilityConfigurationChainConfigSetIterator, error) - - WatchChainConfigSet(opts *bind.WatchOpts, sink chan<- *CCIPCapabilityConfigurationChainConfigSet) (event.Subscription, error) - - ParseChainConfigSet(log types.Log) (*CCIPCapabilityConfigurationChainConfigSet, error) - - FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPCapabilityConfigurationOwnershipTransferRequestedIterator, error) - - WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *CCIPCapabilityConfigurationOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferRequested(log types.Log) (*CCIPCapabilityConfigurationOwnershipTransferRequested, error) - - FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPCapabilityConfigurationOwnershipTransferredIterator, error) - - WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *CCIPCapabilityConfigurationOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferred(log types.Log) (*CCIPCapabilityConfigurationOwnershipTransferred, error) - - ParseLog(log types.Log) (generated.AbigenLog, error) - - Address() common.Address -} diff --git a/core/gethwrappers/ccip/generated/ccip_config/ccip_config.go b/core/gethwrappers/ccip/generated/ccip_config/ccip_config.go new file mode 100644 index 0000000000..3d879a047c --- /dev/null +++ b/core/gethwrappers/ccip/generated/ccip_config/ccip_config.go @@ -0,0 +1,1103 @@ +// 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 + BootstrapP2PIds [][32]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\":\"ChainConfigNotSetForChain\",\"type\":\"error\"},{\"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\":\"TooManyBootstrapP2PIds\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManyOCR3Configs\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManySigners\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManyTransmitters\",\"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\"},{\"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\":[],\"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\":[{\"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\":\"bootstrapP2PIds\",\"type\":\"bytes32[]\"},{\"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: "0x60a06040523480156200001157600080fd5b506040516200417c3803806200417c83398101604081905262000034916200017e565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620000d3565b5050506001600160a01b0316608052620001b0565b336001600160a01b038216036200012d5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000602082840312156200019157600080fd5b81516001600160a01b0381168114620001a957600080fd5b9392505050565b608051613fa9620001d360003960008181610e4e01526110e30152613fa96000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c80638da5cb5b11610076578063f2fde38b1161005b578063f2fde38b146101bc578063f442c89a146101cf578063fba64a7c146101e257600080fd5b80638da5cb5b1461017f578063ddc042a8146101a757600080fd5b80634bd0473f116100a75780634bd0473f1461013457806379ba5097146101545780638318ed5d1461015e57600080fd5b806301ffc9a7146100c3578063181f5a77146100eb575b600080fd5b6100d66100d1366004612d5f565b6101f5565b60405190151581526020015b60405180910390f35b6101276040518060400160405280601481526020017f43434950436f6e66696720312e362e302d64657600000000000000000000000081525081565b6040516100e29190612e05565b610147610142366004612e49565b61028e565b6040516100e29190612f75565b61015c61075e565b005b61012761016c366004613152565b5060408051602081019091526000815290565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100e2565b6101af610860565b6040516100e291906131b3565b61015c6101ca366004613243565b610a52565b61015c6101dd3660046132c5565b610a66565b61015c6101f0366004613349565b610e36565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f78bea72100000000000000000000000000000000000000000000000000000000148061028857507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b63ffffffff821660009081526005602052604081206060918360018111156102b8576102b8612e7e565b60018111156102c9576102c9612e7e565b8152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b8282101561075257600084815260209020604080516101a08101909152600984029091018054829060608201908390829060ff16600181111561033c5761033c612e7e565b600181111561034d5761034d612e7e565b8152815467ffffffffffffffff61010082048116602084015260ff690100000000000000000083041660408401526a01000000000000000000009091041660608201526001820180546080909201916103a590613406565b80601f01602080910402602001604051908101604052809291908181526020018280546103d190613406565b801561041e5780601f106103f35761010080835404028352916020019161041e565b820191906000526020600020905b81548152906001019060200180831161040157829003601f168201915b505050505081526020016002820180548060200260200160405190810160405280929190818152602001828054801561047657602002820191906000526020600020905b815481526020019060010190808311610462575b50505050508152602001600382018054806020026020016040519081016040528092919081815260200182805480156104ce57602002820191906000526020600020905b8154815260200190600101908083116104ba575b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b828210156105a857838290600052602060002001805461051b90613406565b80601f016020809104026020016040519081016040528092919081815260200182805461054790613406565b80156105945780601f1061056957610100808354040283529160200191610594565b820191906000526020600020905b81548152906001019060200180831161057757829003601f168201915b5050505050815260200190600101906104fc565b50505050815260200160058201805480602002602001604051908101604052809291908181526020016000905b828210156106815783829060005260206000200180546105f490613406565b80601f016020809104026020016040519081016040528092919081815260200182805461062090613406565b801561066d5780601f106106425761010080835404028352916020019161066d565b820191906000526020600020905b81548152906001019060200180831161065057829003601f168201915b5050505050815260200190600101906105d5565b50505050815260200160068201805461069990613406565b80601f01602080910402602001604051908101604052809291908181526020018280546106c590613406565b80156107125780601f106106e757610100808354040283529160200191610712565b820191906000526020600020905b8154815290600101906020018083116106f557829003601f168201915b505050919092525050508152600782015467ffffffffffffffff1660208083019190915260089092015460409091015290825260019290920191016102f7565b50505050905092915050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146107e4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6060600061086e6003610ef7565b9050600061087c6003610f0b565b67ffffffffffffffff81111561089457610894613459565b6040519080825280602002602001820160405280156108cd57816020015b6108ba612af0565b8152602001906001900390816108b25790505b50905060005b8251811015610a4b5760008382815181106108f0576108f0613488565b60209081029190910181015160408051808201825267ffffffffffffffff83168082526000908152600285528290208251815460808188028301810190955260608201818152959750929586019490939192849284919084018282801561097657602002820191906000526020600020905b815481526020019060010190808311610962575b5050509183525050600182015460ff1660208201526002820180546040909201916109a090613406565b80601f01602080910402602001604051908101604052809291908181526020018280546109cc90613406565b8015610a195780601f106109ee57610100808354040283529160200191610a19565b820191906000526020600020905b8154815290600101906020018083116109fc57829003601f168201915b505050505081525050815250838381518110610a3757610a37613488565b6020908102919091010152506001016108d3565b5092915050565b610a5a610f15565b610a6381610f98565b50565b610a6e610f15565b60005b83811015610c5457610ab5858583818110610a8e57610a8e613488565b9050602002016020810190610aa391906134b7565b60039067ffffffffffffffff1661108d565b610b1f57848482818110610acb57610acb613488565b9050602002016020810190610ae091906134b7565b6040517f1bd4d2d200000000000000000000000000000000000000000000000000000000815267ffffffffffffffff90911660048201526024016107db565b60026000868684818110610b3557610b35613488565b9050602002016020810190610b4a91906134b7565b67ffffffffffffffff1681526020810191909152604001600090812090610b718282612b38565b6001820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055610ba9600283016000612b56565b5050610be7858583818110610bc057610bc0613488565b9050602002016020810190610bd591906134b7565b60039067ffffffffffffffff166110a5565b507f2a680691fef3b2d105196805935232c661ce703e92d464ef0b94a7bc62d714f0858583818110610c1b57610c1b613488565b9050602002016020810190610c3091906134b7565b60405167ffffffffffffffff909116815260200160405180910390a1600101610a71565b5060005b81811015610e2f576000838383818110610c7457610c74613488565b9050602002810190610c8691906134d2565b610c94906020810190613510565b610c9d90613712565b80519091506000858585818110610cb657610cb6613488565b9050602002810190610cc891906134d2565b610cd69060208101906134b7565b905060005b8251811015610d0e57610d06838281518110610cf957610cf9613488565b60200260200101516110b1565b600101610cdb565b50826020015160ff16600003610d50576040517fa9b3766e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff81166000908152600260209081526040909120845180518693610d80928492910190612b90565b5060208201516001820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff90921691909117905560408201516002820190610dcd90826137f9565b50610de791506003905067ffffffffffffffff83166111ca565b507f05dd57854af2c291a94ea52e7c43d80bc3be7fa73022f98b735dea86642fa5e08184604051610e19929190613913565b60405180910390a1505050806001019050610c58565b5050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610ea5576040517fac7a7efd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610eb3848601866139be565b9050600080610ec1836111d6565b8151919350915015610ed957610ed98460008461142f565b805115610eec57610eec8460018361142f565b505050505050505050565b60606000610f0483611c10565b9392505050565b6000610288825490565b60005473ffffffffffffffffffffffffffffffffffffffff163314610f96576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016107db565b565b3373ffffffffffffffffffffffffffffffffffffffff821603611017576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016107db565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60008181526001830160205260408120541515610f04565b6000610f048383611c6c565b6040517f50c946fe000000000000000000000000000000000000000000000000000000008152600481018290526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906350c946fe90602401600060405180830381865afa15801561113f573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526111859190810190613c2f565b60808101519091506111c6576040517f8907a4fa000000000000000000000000000000000000000000000000000000008152600481018390526024016107db565b5050565b6000610f048383611d5f565b606080600460ff1683511115611218576040517f8854586400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160028082526060820190925290816020015b61129c6040805161014081019091528060008152602001600067ffffffffffffffff168152602001600060ff168152602001600067ffffffffffffffff1681526020016060815260200160608152602001606081526020016060815260200160608152602001606081525090565b81526020019060019003908161122e57505060408051600280825260608201909252919350602082015b6113346040805161014081019091528060008152602001600067ffffffffffffffff168152602001600060ff168152602001600067ffffffffffffffff1681526020016060815260200160608152602001606081526020016060815260200160608152602001606081525090565b8152602001906001900390816112c657905050905060008060005b855181101561142257600086828151811061136c5761136c613488565b602002602001015160000151600181111561138957611389612e7e565b036113d6578581815181106113a0576113a0613488565b60200260200101518584815181106113ba576113ba613488565b6020026020010181905250826113cf90613d36565b925061141a565b8581815181106113e8576113e8613488565b602002602001015184838151811061140257611402613488565b60200260200101819052508161141790613d36565b91505b60010161134f565b5090835281529092909150565b63ffffffff831660009081526005602052604081208184600181111561145757611457612e7e565b600181111561146857611468612e7e565b8152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b828210156118f157600084815260209020604080516101a08101909152600984029091018054829060608201908390829060ff1660018111156114db576114db612e7e565b60018111156114ec576114ec612e7e565b8152815467ffffffffffffffff61010082048116602084015260ff690100000000000000000083041660408401526a010000000000000000000090910416606082015260018201805460809092019161154490613406565b80601f016020809104026020016040519081016040528092919081815260200182805461157090613406565b80156115bd5780601f10611592576101008083540402835291602001916115bd565b820191906000526020600020905b8154815290600101906020018083116115a057829003601f168201915b505050505081526020016002820180548060200260200160405190810160405280929190818152602001828054801561161557602002820191906000526020600020905b815481526020019060010190808311611601575b505050505081526020016003820180548060200260200160405190810160405280929190818152602001828054801561166d57602002820191906000526020600020905b815481526020019060010190808311611659575b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b828210156117475783829060005260206000200180546116ba90613406565b80601f01602080910402602001604051908101604052809291908181526020018280546116e690613406565b80156117335780601f1061170857610100808354040283529160200191611733565b820191906000526020600020905b81548152906001019060200180831161171657829003601f168201915b50505050508152602001906001019061169b565b50505050815260200160058201805480602002602001604051908101604052809291908181526020016000905b8282101561182057838290600052602060002001805461179390613406565b80601f01602080910402602001604051908101604052809291908181526020018280546117bf90613406565b801561180c5780601f106117e15761010080835404028352916020019161180c565b820191906000526020600020905b8154815290600101906020018083116117ef57829003601f168201915b505050505081526020019060010190611774565b50505050815260200160068201805461183890613406565b80601f016020809104026020016040519081016040528092919081815260200182805461186490613406565b80156118b15780601f10611886576101008083540402835291602001916118b1565b820191906000526020600020905b81548152906001019060200180831161189457829003601f168201915b505050919092525050508152600782015467ffffffffffffffff166020808301919091526008909201546040909101529082526001929092019101611496565b50505050905060006119038251611dae565b905060006119118451611dae565b905061191d8282611e00565b600061192c8785878686611ebc565b905061193884826122a8565b63ffffffff871660009081526005602052604081209087600181111561196057611960612e7e565b600181111561197157611971612e7e565b8152602001908152602001600020600061198b9190612bdb565b60005b8151811015611c065763ffffffff88166000908152600560205260408120908860018111156119bf576119bf612e7e565b60018111156119d0576119d0612e7e565b81526020019081526020016000208282815181106119f0576119f0613488565b6020908102919091018101518254600181810185556000948552929093208151805160099095029091018054929490939192849283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016908381811115611a5a57611a5a612e7e565b021790555060208201518154604084015160608501517fffffffffffffffffffffffffffffffffffffffffffff000000000000000000ff90921661010067ffffffffffffffff948516027fffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffff1617690100000000000000000060ff90921691909102177fffffffffffffffffffffffffffff0000000000000000ffffffffffffffffffff166a0100000000000000000000929091169190910217815560808201516001820190611b2990826137f9565b5060a08201518051611b45916002840191602090910190612b90565b5060c08201518051611b61916003840191602090910190612b90565b5060e08201518051611b7d916004840191602090910190612bfc565b506101008201518051611b9a916005840191602090910190612bfc565b506101208201516006820190611bb090826137f9565b50505060208201516007820180547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff90921691909117905560409091015160089091015560010161198e565b5050505050505050565b606081600001805480602002602001604051908101604052809291908181526020018280548015611c6057602002820191906000526020600020905b815481526020019060010190808311611c4c575b50505050509050919050565b60008181526001830160205260408120548015611d55576000611c90600183613d6e565b8554909150600090611ca490600190613d6e565b9050818114611d09576000866000018281548110611cc457611cc4613488565b9060005260206000200154905080876000018481548110611ce757611ce7613488565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611d1a57611d1a613d81565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610288565b6000915050610288565b6000818152600183016020526040812054611da657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610288565b506000610288565b60006002821115611dee576040517f3e478526000000000000000000000000000000000000000000000000000000008152600481018390526024016107db565b81600281111561028857610288612e7e565b6000826002811115611e1457611e14612e7e565b826002811115611e2657611e26612e7e565b611e309190613db0565b90508060011480611e7c5750807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff148015611e7c57506002836002811115611e7a57611e7a612e7e565b145b15611e8657505050565b82826040517f0a6b675b0000000000000000000000000000000000000000000000000000000081526004016107db929190613de0565b60606000845167ffffffffffffffff811115611eda57611eda613459565b604051908082528060200260200182016040528015611f03578160200160208202803683370190505b5090506000846002811115611f1a57611f1a612e7e565b148015611f3857506001836002811115611f3657611f36612e7e565b145b15611f7957600181600081518110611f5257611f52613488565b602002602001019067ffffffffffffffff16908167ffffffffffffffff16815250506120e1565b6001846002811115611f8d57611f8d612e7e565b148015611fab57506002836002811115611fa957611fa9612e7e565b145b156120425785600081518110611fc357611fc3613488565b60200260200101516020015181600081518110611fe257611fe2613488565b602002602001019067ffffffffffffffff16908167ffffffffffffffff16815250508560008151811061201757612017613488565b602002602001015160200151600161202f9190613dfb565b81600181518110611f5257611f52613488565b600284600281111561205657612056612e7e565b1480156120745750600183600281111561207257612072612e7e565b145b156120ab578560018151811061208c5761208c613488565b60200260200101516020015181600081518110611f5257611f52613488565b83836040517f0a6b675b0000000000000000000000000000000000000000000000000000000081526004016107db929190613de0565b6000855167ffffffffffffffff8111156120fd576120fd613459565b6040519080825280602002602001820160405280156121b357816020015b604080516101a081018252600060608083018281526080840183905260a0840183905260c0840183905260e084018290526101008401829052610120840182905261014084018290526101608401829052610180840191909152825260208083018290529282015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90920191018161211b5790505b50905060005b825181101561229c576121e48782815181106121d7576121d7613488565b6020026020010151612627565b604051806060016040528088838151811061220157612201613488565b6020026020010151815260200184838151811061222057612220613488565b602002602001015167ffffffffffffffff1681526020016122748b86858151811061224d5761224d613488565b60200260200101518b868151811061226757612267613488565b6020026020010151612a1b565b81525082828151811061228957612289613488565b60209081029190910101526001016121b9565b50979650505050505050565b81518151811580156122ba5750806001145b1561235c57826000815181106122d2576122d2613488565b60200260200101516020015167ffffffffffffffff16600114612356578260008151811061230257612302613488565b60209081029190910181015101516040517fc1658eb800000000000000000000000000000000000000000000000000000000815267ffffffffffffffff9091166004820152600160248201526044016107db565b50505050565b81600114801561236c5750806002145b15612522578360008151811061238457612384613488565b602002602001015160400151836000815181106123a3576123a3613488565b6020026020010151604001511461242f57826000815181106123c7576123c7613488565b602002602001015160400151846000815181106123e6576123e6613488565b6020026020010151604001516040517fc7ccdd7f0000000000000000000000000000000000000000000000000000000081526004016107db929190918252602082015260400190565b8360008151811061244257612442613488565b602002602001015160200151600161245a9190613dfb565b67ffffffffffffffff168360018151811061247757612477613488565b60200260200101516020015167ffffffffffffffff161461235657826001815181106124a5576124a5613488565b602002602001015160200151846000815181106124c4576124c4613488565b60200260200101516020015160016124dc9190613dfb565b6040517fc1658eb800000000000000000000000000000000000000000000000000000000815267ffffffffffffffff9283166004820152911660248201526044016107db565b8160021480156125325750806001145b156125f5578360018151811061254a5761254a613488565b6020026020010151604001518360008151811061256957612569613488565b60200260200101516040015114612356578260008151811061258d5761258d613488565b602002602001015160400151846001815181106125ac576125ac613488565b6020026020010151604001516040517f9e9756700000000000000000000000000000000000000000000000000000000081526004016107db929190918252602082015260400190565b6040517f1f1b2bb600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806020015167ffffffffffffffff1660000361266f576040517f698cf8e000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008151600181111561268457612684612e7e565b141580156126a557506001815160018111156126a2576126a2612e7e565b14155b156126dc576040517f3302dbd700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80608001515160000361271b576040517f358c192700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208101516127369060039067ffffffffffffffff1661108d565b61277e5760208101516040517f1bd4d2d200000000000000000000000000000000000000000000000000000000815267ffffffffffffffff90911660048201526024016107db565b60e081015151601f10156127be576040517f1b925da600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61010081015151601f10156127ff576040517f645960ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208082015167ffffffffffffffff1660009081526002909152604081206001015461282f9060ff166003613e1c565b61283a906001613e38565b60ff1690508082610100015151101561289157610100820151516040517f548dd21f0000000000000000000000000000000000000000000000000000000081526004810191909152602481018290526044016107db565b816040015160ff166000036128d2576040517f39d1a4d000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408201516128e2906003613e1c565b60ff168260e001515111612922576040517f4856694e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8160e00151518260c00151511415806129465750816101000151518260c001515114155b156129a15760c08201515160e083015151610100840151516040517fba900f6d0000000000000000000000000000000000000000000000000000000081526004810193909352602483019190915260448201526064016107db565b8160c00151518260a001515111156129e5576040517f8473d80700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8260e0015151811015612a1657612a0e8360c001518281518110610cf957610cf9613488565b6001016129e8565b505050565b60008082602001518584600001518560800151878760a001518860c001518960e001518a61010001518b604001518c606001518d6101200151604051602001612a6f9c9b9a99989796959493929190613ebc565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101207dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e0a000000000000000000000000000000000000000000000000000000000000179150509392505050565b6040518060400160405280600067ffffffffffffffff168152602001612b33604051806060016040528060608152602001600060ff168152602001606081525090565b905290565b5080546000825590600052602060002090810190610a639190612c4e565b508054612b6290613406565b6000825580601f10612b72575050565b601f016020900490600052602060002090810190610a639190612c4e565b828054828255906000526020600020908101928215612bcb579160200282015b82811115612bcb578251825591602001919060010190612bb0565b50612bd7929150612c4e565b5090565b5080546000825560090290600052602060002090810190610a639190612c63565b828054828255906000526020600020908101928215612c42579160200282015b82811115612c425782518290612c3290826137f9565b5091602001919060010190612c1c565b50612bd7929150612d24565b5b80821115612bd75760008155600101612c4f565b80821115612bd75780547fffffffffffffffffffffffffffff00000000000000000000000000000000000016815560008181612ca26001830182612b56565b612cb0600283016000612b38565b612cbe600383016000612b38565b612ccc600483016000612d41565b612cda600583016000612d41565b612ce8600683016000612b56565b5050506007810180547fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000016905560006008820155600901612c63565b80821115612bd7576000612d388282612b56565b50600101612d24565b5080546000825590600052602060002090810190610a639190612d24565b600060208284031215612d7157600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610f0457600080fd5b6000815180845260005b81811015612dc757602081850181015186830182015201612dab565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000610f046020830184612da1565b63ffffffff81168114610a6357600080fd5b8035612e3581612e18565b919050565b803560028110612e3557600080fd5b60008060408385031215612e5c57600080fd5b8235612e6781612e18565b9150612e7560208401612e3a565b90509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60028110612ebd57612ebd612e7e565b9052565b60008151808452602080850194506020840160005b83811015612ef257815187529582019590820190600101612ed6565b509495945050505050565b60008282518085526020808601955060208260051b8401016020860160005b84811015612f68577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0868403018952612f56838351612da1565b98840198925090830190600101612f1c565b5090979650505050505050565b600060208083018184528085518083526040925060408601915060408160051b87010184880160005b83811015613144577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0898403018552815160608151818652612fe38287018251612ead565b898101516080612ffe8189018367ffffffffffffffff169052565b8a830151915060a0613014818a018460ff169052565b938301519360c092506130328984018667ffffffffffffffff169052565b818401519450610140915060e082818b01526130526101a08b0187612da1565b95508185015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa0610100818c890301818d01526130918885612ec1565b97508587015195506101209350818c890301848d01526130b18887612ec1565b9750828701519550818c890301858d01526130cc8887612efd565b975080870151955050808b8803016101608c01526130ea8786612efd565b9650828601519550808b8803016101808c0152505050505061310c8282612da1565b915050888201516131288a87018267ffffffffffffffff169052565b5090870151938701939093529386019390860190600101612f9e565b509098975050505050505050565b60006020828403121561316457600080fd5b8135610f0481612e18565b60008151606084526131846060850182612ec1565b905060ff6020840151166020850152604083015184820360408601526131aa8282612da1565b95945050505050565b600060208083018184528085518083526040925060408601915060408160051b87010184880160005b83811015613144578883037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc00185528151805167ffffffffffffffff1684528701518784018790526132308785018261316f565b95880195935050908601906001016131dc565b60006020828403121561325557600080fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114610f0457600080fd5b60008083601f84011261328b57600080fd5b50813567ffffffffffffffff8111156132a357600080fd5b6020830191508360208260051b85010111156132be57600080fd5b9250929050565b600080600080604085870312156132db57600080fd5b843567ffffffffffffffff808211156132f357600080fd5b6132ff88838901613279565b9096509450602087013591508082111561331857600080fd5b5061332587828801613279565b95989497509550505050565b803567ffffffffffffffff81168114612e3557600080fd5b6000806000806000806080878903121561336257600080fd5b863567ffffffffffffffff8082111561337a57600080fd5b6133868a838b01613279565b9098509650602089013591508082111561339f57600080fd5b818901915089601f8301126133b357600080fd5b8135818111156133c257600080fd5b8a60208285010111156133d457600080fd5b6020830196508095505050506133ec60408801613331565b91506133fa60608801612e2a565b90509295509295509295565b600181811c9082168061341a57607f821691505b602082108103613453577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156134c957600080fd5b610f0482613331565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc183360301811261350657600080fd5b9190910192915050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa183360301811261350657600080fd5b604051610140810167ffffffffffffffff8111828210171561356857613568613459565b60405290565b60405160e0810167ffffffffffffffff8111828210171561356857613568613459565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156135d8576135d8613459565b604052919050565b600067ffffffffffffffff8211156135fa576135fa613459565b5060051b60200190565b600082601f83011261361557600080fd5b8135602061362a613625836135e0565b613591565b8083825260208201915060208460051b87010193508684111561364c57600080fd5b602086015b848110156136685780358352918301918301613651565b509695505050505050565b803560ff81168114612e3557600080fd5b600082601f83011261369557600080fd5b813567ffffffffffffffff8111156136af576136af613459565b6136e060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601613591565b8181528460208386010111156136f557600080fd5b816020850160208301376000918101602001919091529392505050565b60006060823603121561372457600080fd5b6040516060810167ffffffffffffffff828210818311171561374857613748613459565b81604052843591508082111561375d57600080fd5b61376936838701613604565b835261377760208601613673565b6020840152604085013591508082111561379057600080fd5b5061379d36828601613684565b60408301525092915050565b601f821115612a16576000816000526020600020601f850160051c810160208610156137d25750805b601f850160051c820191505b818110156137f1578281556001016137de565b505050505050565b815167ffffffffffffffff81111561381357613813613459565b613827816138218454613406565b846137a9565b602080601f83116001811461387a57600084156138445750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556137f1565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156138c7578886015182559484019460019091019084016138a8565b508582101561390357878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b67ffffffffffffffff83168152604060208201526000613936604083018461316f565b949350505050565b600082601f83011261394f57600080fd5b8135602061395f613625836135e0565b82815260059290921b8401810191818101908684111561397e57600080fd5b8286015b8481101561366857803567ffffffffffffffff8111156139a25760008081fd5b6139b08986838b0101613684565b845250918301918301613982565b600060208083850312156139d157600080fd5b823567ffffffffffffffff808211156139e957600080fd5b818501915085601f8301126139fd57600080fd5b8135613a0b613625826135e0565b81815260059190911b83018401908481019088831115613a2a57600080fd5b8585015b83811015613bb857803585811115613a4557600080fd5b8601610140818c037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0011215613a7a57600080fd5b613a82613544565b613a8d898301612e3a565b8152613a9b60408301613331565b89820152613aab60608301613673565b6040820152613abc60808301613331565b606082015260a082013587811115613ad357600080fd5b613ae18d8b83860101613684565b60808301525060c082013587811115613af957600080fd5b613b078d8b83860101613604565b60a08301525060e082013587811115613b1f57600080fd5b613b2d8d8b83860101613604565b60c0830152506101008083013588811115613b4757600080fd5b613b558e8c8387010161393e565b60e0840152506101208084013589811115613b6f57600080fd5b613b7d8f8d8388010161393e565b8385015250610140840135915088821115613b9757600080fd5b613ba58e8c84870101613684565b9083015250845250918601918601613a2e565b5098975050505050505050565b8051612e3581612e18565b600082601f830112613be157600080fd5b81516020613bf1613625836135e0565b8083825260208201915060208460051b870101935086841115613c1357600080fd5b602086015b848110156136685780518352918301918301613c18565b600060208284031215613c4157600080fd5b815167ffffffffffffffff80821115613c5957600080fd5b9083019060e08286031215613c6d57600080fd5b613c7561356e565b613c7e83613bc5565b8152613c8c60208401613bc5565b6020820152613c9d60408401613bc5565b6040820152606083015160608201526080830151608082015260a083015182811115613cc857600080fd5b613cd487828601613bd0565b60a08301525060c083015182811115613cec57600080fd5b613cf887828601613bd0565b60c08301525095945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613d6757613d67613d07565b5060010190565b8181038181111561028857610288613d07565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b8181036000831280158383131683831282161715610a4b57610a4b613d07565b60038110612ebd57612ebd612e7e565b60408101613dee8285613dd0565b610f046020830184613dd0565b67ffffffffffffffff818116838216019080821115610a4b57610a4b613d07565b60ff8181168382160290811690818114610a4b57610a4b613d07565b60ff818116838216019081111561028857610288613d07565b60008282518085526020808601955060208260051b8401016020860160005b84811015612f68577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0868403018952613eaa838351612da1565b98840198925090830190600101613e70565b67ffffffffffffffff8d16815263ffffffff8c166020820152613ee2604082018c612ead565b61018060608201526000613efa61018083018c612da1565b67ffffffffffffffff8b16608084015282810360a0840152613f1c818b612ec1565b905082810360c0840152613f30818a612ec1565b905082810360e0840152613f448189613e51565b9050828103610100840152613f598188613e51565b60ff8716610120850152905067ffffffffffffffff8516610140840152828103610160840152613f898185612da1565b9f9e50505050505050505050505050505056fea164736f6c6343000818000a", +} + +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) ([]CCIPConfigTypesChainConfigInfo, error) { + var out []interface{} + err := _CCIPConfig.contract.Call(opts, &out, "getAllChainConfigs") + + if err != nil { + return *new([]CCIPConfigTypesChainConfigInfo), err + } + + out0 := *abi.ConvertType(out[0], new([]CCIPConfigTypesChainConfigInfo)).(*[]CCIPConfigTypesChainConfigInfo) + + return out0, err + +} + +func (_CCIPConfig *CCIPConfigSession) GetAllChainConfigs() ([]CCIPConfigTypesChainConfigInfo, error) { + return _CCIPConfig.Contract.GetAllChainConfigs(&_CCIPConfig.CallOpts) +} + +func (_CCIPConfig *CCIPConfigCallerSession) GetAllChainConfigs() ([]CCIPConfigTypesChainConfigInfo, error) { + return _CCIPConfig.Contract.GetAllChainConfigs(&_CCIPConfig.CallOpts) +} + +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) 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) ([]CCIPConfigTypesChainConfigInfo, error) + + GetCapabilityConfiguration(opts *bind.CallOpts, arg0 uint32) ([]byte, 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/evm_2_evm_multi_offramp/evm_2_evm_multi_offramp.go b/core/gethwrappers/ccip/generated/evm_2_evm_multi_offramp/evm_2_evm_multi_offramp.go index 70f1c46dda..b2fcdc4670 100644 --- a/core/gethwrappers/ccip/generated/evm_2_evm_multi_offramp/evm_2_evm_multi_offramp.go +++ b/core/gethwrappers/ccip/generated/evm_2_evm_multi_offramp/evm_2_evm_multi_offramp.go @@ -69,24 +69,22 @@ type EVM2EVMMultiOffRampMerkleRoot struct { } type EVM2EVMMultiOffRampSourceChainConfig struct { - IsEnabled bool - MinSeqNr uint64 - PrevOffRamp common.Address - OnRamp common.Address - MetadataHash [32]byte + IsEnabled bool + MinSeqNr uint64 + OnRamp []byte } type EVM2EVMMultiOffRampSourceChainConfigArgs struct { SourceChainSelector uint64 IsEnabled bool - PrevOffRamp common.Address - OnRamp common.Address + OnRamp []byte } type EVM2EVMMultiOffRampStaticConfig struct { ChainSelector uint64 RmnProxy common.Address TokenAdminRegistry common.Address + NonceManager common.Address } type EVM2EVMMultiOffRampUnblessedRoot struct { @@ -94,25 +92,19 @@ type EVM2EVMMultiOffRampUnblessedRoot struct { MerkleRoot [32]byte } -type InternalEVM2EVMMessage struct { - SourceChainSelector uint64 - Sender common.Address - Receiver common.Address - SequenceNumber uint64 - GasLimit *big.Int - Strict bool - Nonce uint64 - FeeToken common.Address - FeeTokenAmount *big.Int - Data []byte - TokenAmounts []ClientEVMTokenAmount - SourceTokenData [][]byte - MessageId [32]byte +type InternalAny2EVMRampMessage struct { + Header InternalRampMessageHeader + Sender []byte + Data []byte + Receiver common.Address + GasLimit *big.Int + TokenAmounts []ClientEVMTokenAmount + SourceTokenData [][]byte } type InternalExecutionReportSingleChain struct { SourceChainSelector uint64 - Messages []InternalEVM2EVMMessage + Messages []InternalAny2EVMRampMessage OffchainTokenData [][][]byte Proofs [][32]byte ProofFlagBits *big.Int @@ -128,6 +120,14 @@ type InternalPriceUpdates struct { GasPriceUpdates []InternalGasPriceUpdate } +type InternalRampMessageHeader struct { + MessageId [32]byte + SourceChainSelector uint64 + DestChainSelector uint64 + SequenceNumber uint64 + Nonce uint64 +} + type InternalTokenPriceUpdate struct { SourceToken common.Address UsdPerToken *big.Int @@ -156,8 +156,8 @@ type MultiOCR3BaseOCRConfigArgs struct { } var EVM2EVMMultiOffRampMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAdminRegistry\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOffRamp.StaticConfig\",\"name\":\"staticConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"prevOffRamp\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"onRamp\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOffRamp.SourceChainConfigArgs[]\",\"name\":\"sourceChainConfigs\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"}],\"name\":\"AlreadyAttempted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"}],\"name\":\"AlreadyExecuted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CanOnlySelfCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"ConfigDigestMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"}],\"name\":\"CursedByRMN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EmptyReport\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"error\",\"type\":\"bytes\"}],\"name\":\"ExecutionError\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"}],\"name\":\"ForkedChain\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"enumMultiOCR3Base.InvalidConfigErrorType\",\"name\":\"errorType\",\"type\":\"uint8\"}],\"name\":\"InvalidConfig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"got\",\"type\":\"uint256\"}],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"encodedAddress\",\"type\":\"bytes\"}],\"name\":\"InvalidEVMAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"min\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"max\",\"type\":\"uint64\"}],\"internalType\":\"structEVM2EVMMultiOffRamp.Interval\",\"name\":\"interval\",\"type\":\"tuple\"}],\"name\":\"InvalidInterval\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"newLimit\",\"type\":\"uint256\"}],\"name\":\"InvalidManualExecutionGasLimit\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"InvalidMessageId\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"},{\"internalType\":\"enumInternal.MessageExecutionState\",\"name\":\"newState\",\"type\":\"uint8\"}],\"name\":\"InvalidNewState\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidProof\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRoot\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"}],\"name\":\"InvalidStaticConfig\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LeavesCannotBeEmpty\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ManualExecutionGasLimitMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"}],\"name\":\"ManualExecutionNotYetEnabled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"errorReason\",\"type\":\"bytes\"}],\"name\":\"MessageValidationError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NonUniqueSignatures\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"notPool\",\"type\":\"address\"}],\"name\":\"NotACompatiblePool\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OracleCannotBeZeroAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"error\",\"type\":\"bytes\"}],\"name\":\"ReceiverError\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"}],\"name\":\"RootAlreadyCommitted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"}],\"name\":\"RootNotCommitted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SignaturesOutOfRegistration\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"}],\"name\":\"SourceChainNotEnabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StaleCommitReport\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"ocrPluginType\",\"type\":\"uint8\"}],\"name\":\"StaticConfigCannotBeChanged\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"}],\"name\":\"TokenDataMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"error\",\"type\":\"bytes\"}],\"name\":\"TokenHandlingError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnauthorizedSigner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnauthorizedTransmitter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnexpectedTokenData\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"}],\"name\":\"WrongMessageLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WrongNumberOfSignatures\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroChainSelectorNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sourceToken\",\"type\":\"address\"},{\"internalType\":\"uint224\",\"name\":\"usdPerToken\",\"type\":\"uint224\"}],\"internalType\":\"structInternal.TokenPriceUpdate[]\",\"name\":\"tokenPriceUpdates\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint224\",\"name\":\"usdPerUnitGas\",\"type\":\"uint224\"}],\"internalType\":\"structInternal.GasPriceUpdate[]\",\"name\":\"gasPriceUpdates\",\"type\":\"tuple[]\"}],\"internalType\":\"structInternal.PriceUpdates\",\"name\":\"priceUpdates\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"min\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"max\",\"type\":\"uint64\"}],\"internalType\":\"structEVM2EVMMultiOffRamp.Interval\",\"name\":\"interval\",\"type\":\"tuple\"},{\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"}],\"internalType\":\"structEVM2EVMMultiOffRamp.MerkleRoot[]\",\"name\":\"merkleRoots\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structEVM2EVMMultiOffRamp.CommitReport\",\"name\":\"report\",\"type\":\"tuple\"}],\"name\":\"CommitReportAccepted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"ocrPluginType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"F\",\"type\":\"uint8\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"permissionLessExecutionThresholdSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxTokenTransferGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPoolReleaseOrMintGas\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"messageValidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"priceRegistry\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structEVM2EVMMultiOffRamp.DynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"}],\"name\":\"DynamicConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"enumInternal.MessageExecutionState\",\"name\":\"state\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"returnData\",\"type\":\"bytes\"}],\"name\":\"ExecutionStateChanged\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"name\":\"RootRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"}],\"name\":\"SkippedAlreadyExecutedMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"SkippedIncorrectNonce\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"SkippedSenderWithPreviousRampMessageInflight\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint64\",\"name\":\"minSeqNr\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"prevOffRamp\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"onRamp\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"metadataHash\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"structEVM2EVMMultiOffRamp.SourceChainConfig\",\"name\":\"sourceConfig\",\"type\":\"tuple\"}],\"name\":\"SourceChainConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"}],\"name\":\"SourceChainSelectorAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAdminRegistry\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structEVM2EVMMultiOffRamp.StaticConfig\",\"name\":\"staticConfig\",\"type\":\"tuple\"}],\"name\":\"StaticConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint8\",\"name\":\"ocrPluginType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"}],\"name\":\"Transmitted\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"prevOffRamp\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"onRamp\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOffRamp.SourceChainConfigArgs[]\",\"name\":\"sourceChainConfigUpdates\",\"type\":\"tuple[]\"}],\"name\":\"applySourceChainConfigUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"destTokenAmounts\",\"type\":\"tuple[]\"}],\"internalType\":\"structClient.Any2EVMMessage\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"ccipReceive\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[3]\",\"name\":\"reportContext\",\"type\":\"bytes32[3]\"},{\"internalType\":\"bytes\",\"name\":\"report\",\"type\":\"bytes\"},{\"internalType\":\"bytes32[]\",\"name\":\"rs\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"ss\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"rawVs\",\"type\":\"bytes32\"}],\"name\":\"commit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[3]\",\"name\":\"reportContext\",\"type\":\"bytes32[3]\"},{\"internalType\":\"bytes\",\"name\":\"report\",\"type\":\"bytes\"}],\"name\":\"execute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"strict\",\"type\":\"bool\"},{\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"feeTokenAmount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"tokenAmounts\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes[]\",\"name\":\"sourceTokenData\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"internalType\":\"structInternal.EVM2EVMMessage\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"bytes[]\",\"name\":\"offchainTokenData\",\"type\":\"bytes[]\"}],\"name\":\"executeSingleMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDynamicConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"permissionLessExecutionThresholdSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxTokenTransferGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPoolReleaseOrMintGas\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"messageValidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"priceRegistry\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOffRamp.DynamicConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"}],\"name\":\"getExecutionState\",\"outputs\":[{\"internalType\":\"enumInternal.MessageExecutionState\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLatestPriceSequenceNumber\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"name\":\"getMerkleRoot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"getSenderNonce\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"}],\"name\":\"getSourceChainConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint64\",\"name\":\"minSeqNr\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"prevOffRamp\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"onRamp\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"metadataHash\",\"type\":\"bytes32\"}],\"internalType\":\"structEVM2EVMMultiOffRamp.SourceChainConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStaticConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAdminRegistry\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOffRamp.StaticConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"name\":\"isBlessed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"ocrPluginType\",\"type\":\"uint8\"}],\"name\":\"latestConfigDetails\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"F\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"n\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"isSignatureVerificationEnabled\",\"type\":\"bool\"}],\"internalType\":\"structMultiOCR3Base.ConfigInfo\",\"name\":\"configInfo\",\"type\":\"tuple\"},{\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"}],\"internalType\":\"structMultiOCR3Base.OCRConfig\",\"name\":\"ocrConfig\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"strict\",\"type\":\"bool\"},{\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"feeTokenAmount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"tokenAmounts\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes[]\",\"name\":\"sourceTokenData\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"internalType\":\"structInternal.EVM2EVMMessage[]\",\"name\":\"messages\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes[][]\",\"name\":\"offchainTokenData\",\"type\":\"bytes[][]\"},{\"internalType\":\"bytes32[]\",\"name\":\"proofs\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"proofFlagBits\",\"type\":\"uint256\"}],\"internalType\":\"structInternal.ExecutionReportSingleChain[]\",\"name\":\"reports\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256[][]\",\"name\":\"gasLimitOverrides\",\"type\":\"uint256[][]\"}],\"name\":\"manuallyExecute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"}],\"internalType\":\"structEVM2EVMMultiOffRamp.UnblessedRoot[]\",\"name\":\"rootToReset\",\"type\":\"tuple[]\"}],\"name\":\"resetUnblessedRoots\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"permissionLessExecutionThresholdSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxTokenTransferGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPoolReleaseOrMintGas\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"messageValidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"priceRegistry\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOffRamp.DynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"}],\"name\":\"setDynamicConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"ocrPluginType\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"F\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"isSignatureVerificationEnabled\",\"type\":\"bool\"},{\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"}],\"internalType\":\"structMultiOCR3Base.OCRConfigArgs[]\",\"name\":\"ocrConfigArgs\",\"type\":\"tuple[]\"}],\"name\":\"setOCR3Configs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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: "0x6101006040523480156200001257600080fd5b506040516200678738038062006787833981016040819052620000359162000648565b33806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf81620001c1565b5050466080525060208201516001600160a01b03161580620000ec575060408201516001600160a01b0316155b156200010b576040516342bcdf7f60e11b815260040160405180910390fd5b81516001600160401b0316600003620001375760405163c656089560e01b815260040160405180910390fd5b81516001600160401b0390811660a052602080840180516001600160a01b0390811660c05260408087018051831660e052815188519096168652925182169385019390935290511682820152517f2f56698ec552a5d53d27d6f4b3dd8b6989f6426b6151a36aff61160c1d07efdf9181900360600190a1620001b9816200026c565b5050620007d0565b336001600160a01b038216036200021b5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60005b81518110156200051c576000828281518110620002905762000290620007ba565b60200260200101519050600081600001519050806001600160401b0316600003620002ce5760405163c656089560e01b815260040160405180910390fd5b60608201516001600160a01b0316620002fa576040516342bcdf7f60e11b815260040160405180910390fd5b6001600160401b038116600090815260076020526040902060018101546001600160a01b031662000400576200035c8284606001517f8acd72527118c8324937b1a42e02cd246697c3b633f1742f3cae11de233722b36200052060201b60201c565b600282015560608301516001820180546001600160a01b039283166001600160a01b03199091161790556040808501518354610100600160481b03199190931669010000000000000000000216610100600160e81b031990921691909117610100178255516001600160401b03831681527ff4c1390c70e5c0f491ae1ccbc06f9117cbbadf2767b247b3bc203280f24c0fb99060200160405180910390a16200046f565b606083015160018201546001600160a01b03908116911614158062000444575060408301518154690100000000000000000090046001600160a01b03908116911614155b156200046f5760405163c39a620560e01b81526001600160401b038316600482015260240162000083565b6020830151815490151560ff199091161781556040516001600160401b038316907fa73c588738263db34ef8c1942db8f99559bc6696f6a812d42e76bafb4c0e8d309062000505908490815460ff811615158252600881901c6001600160401b0316602083015260481c6001600160a01b0390811660408301526001830154166060820152600290910154608082015260a00190565b60405180910390a25050508060010190506200026f565b5050565b60a0805160408051602081018590526001600160401b0380881692820192909252911660608201526001600160a01b0384166080820152600091016040516020818303038152906040528051906020012090509392505050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715620005b557620005b56200057a565b60405290565b604051608081016001600160401b0381118282101715620005b557620005b56200057a565b604051601f8201601f191681016001600160401b03811182821017156200060b576200060b6200057a565b604052919050565b80516001600160401b03811681146200062b57600080fd5b919050565b80516001600160a01b03811681146200062b57600080fd5b6000808284036080808212156200065e57600080fd5b6060808312156200066e57600080fd5b6200067862000590565b9250620006858662000613565b835260206200069681880162000630565b818501526040620006aa6040890162000630565b604086015260608801519496506001600160401b0380861115620006cd57600080fd5b858901955089601f870112620006e257600080fd5b855181811115620006f757620006f76200057a565b62000707848260051b01620005e0565b818152848101925060079190911b87018401908b8211156200072857600080fd5b968401965b81881015620007a85786888d031215620007475760008081fd5b62000751620005bb565b6200075c8962000613565b8152858901518015158114620007725760008081fd5b818701526200078389860162000630565b8582015262000794878a0162000630565b81880152835296860196918401916200072d565b80985050505050505050509250929050565b634e487b7160e01b600052603260045260246000fd5b60805160a05160c05160e051615f5a6200082d6000396000818161021301526131a40152600081816101e401528181611573015261162a0152600081816101b401526130c6015260008181611bc60152611c120152615f5a6000f3fe608060405234801561001057600080fd5b50600436106101825760003560e01c806385572ffb116100d8578063d2a15d351161008c578063f52121a511610066578063f52121a514610668578063f716f99f1461067b578063ff888fb11461068e57600080fd5b8063d2a15d3514610534578063e9d68a8e14610547578063f2fde38b1461065557600080fd5b80638da5cb5b116100bd5780638da5cb5b146104b4578063c673e584146104cf578063ccd37ba3146104ef57600080fd5b806385572ffb146104935780638b364334146104a157600080fd5b8063403b2d631161013a5780637437ff9f116101145780637437ff9f1461036357806379ba5097146104785780637f63b7111461048057600080fd5b8063403b2d631461031d578063542625af146103305780635e36480c1461034357600080fd5b80632d04ab761161016b5780632d04ab76146102ce578063311cd513146102e35780633f4b04aa146102f657600080fd5b806306285c6914610187578063181f5a7714610285575b600080fd5b610243604080516060810182526000808252602082018190529181019190915260405180606001604052807f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff1681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316815250905090565b60408051825167ffffffffffffffff1681526020808401516001600160a01b039081169183019190915292820151909216908201526060015b60405180910390f35b6102c16040518060400160405280601d81526020017f45564d3245564d4d756c74694f666652616d7020312e362e302d64657600000081525081565b60405161027c91906141e0565b6102e16102dc36600461428b565b6106b1565b005b6102e16102f136600461433e565b610a77565b600b5467ffffffffffffffff165b60405167ffffffffffffffff909116815260200161027c565b6102e161032b3660046144eb565b610ae0565b6102e161033e366004614b0f565b610c9d565b610356610351366004614c3a565b610e42565b60405161027c9190614c9d565b61040f6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a0810191909152506040805160c0810182526004546001600160a01b03808216835263ffffffff74010000000000000000000000000000000000000000830481166020850152600160c01b8304811694840194909452600160e01b90910490921660608201526005548216608082015260065490911660a082015290565b60405161027c9190600060c0820190506001600160a01b03808451168352602084015163ffffffff808216602086015280604087015116604086015280606087015116606086015250508060808501511660808401528060a08501511660a08401525092915050565b6102e1610e98565b6102e161048e366004614cab565b610f56565b6102e1610182366004614d8f565b6103046104af366004614dca565b610f6a565b6000546040516001600160a01b03909116815260200161027c565b6104e26104dd366004614e09565b610f80565b60405161027c9190614e69565b6105266104fd366004614ede565b67ffffffffffffffff919091166000908152600a60209081526040808320938352929052205490565b60405190815260200161027c565b6102e1610542366004614f0a565b6110de565b6105f8610555366004614f7f565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091525067ffffffffffffffff908116600090815260076020908152604091829020825160a081018452815460ff8116151582526101008104909516928101929092526001600160a01b0369010000000000000000009094048416928201929092526001820154909216606083015260020154608082015290565b60405161027c9190600060a08201905082511515825267ffffffffffffffff602084015116602083015260408301516001600160a01b03808216604085015280606086015116606085015250506080830151608083015292915050565b6102e1610663366004614f9c565b611198565b6102e1610676366004614fb9565b6111a9565b6102e1610689366004615085565b6114db565b6106a161069c3660046151d0565b61151d565b604051901515815260200161027c565b60006106bf87890189615361565b805151519091501515806106d857508051602001515115155b156107d857600b5460208a01359067ffffffffffffffff8083169116101561079757600b805467ffffffffffffffff191667ffffffffffffffff831617905560065482516040517f3937306f0000000000000000000000000000000000000000000000000000000081526001600160a01b0390921691633937306f916107609160040161559f565b600060405180830381600087803b15801561077a57600080fd5b505af115801561078e573d6000803e3d6000fd5b505050506107d6565b8160200151516000036107d6576040517f2261116700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b60005b8160200151518110156109c057600082602001518281518110610800576108006154cc565b6020026020010151905060008160000151905061081c816115de565b6000610827826116e0565b602084015151815491925067ffffffffffffffff90811661010090920416141580610869575060208084015190810151905167ffffffffffffffff9182169116115b156108b257825160208401516040517feefb0cac0000000000000000000000000000000000000000000000000000000081526108a99291906004016155b2565b60405180910390fd5b6040830151806108ee576040517f504570e300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b835167ffffffffffffffff166000908152600a60209081526040808320848452909152902054156109615783516040517f32cf0cbf00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff9091166004820152602481018290526044016108a9565b60208085015101516109749060016155fd565b825468ffffffffffffffff00191661010067ffffffffffffffff92831602179092559251166000908152600a6020908152604080832094835293905291909120429055506001016107db565b507f3a3950e13dd607cc37980db0ef14266c40d2bba9c01b2e44bfe549808883095d816040516109f09190615625565b60405180910390a1610a6c60008a8a8a8a8a8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808e0282810182019093528d82529093508d92508c9182918501908490808284376000920191909152508b9250611740915050565b505050505050505050565b610ab7610a86828401846156c2565b6040805160008082526020820190925290610ab1565b6060815260200190600190039081610a9c5790505b50611ab7565b604080516000808252602082019092529050610ada600185858585866000611740565b50505050565b610ae8611b67565b60a08101516001600160a01b03161580610b0a575080516001600160a01b0316155b15610b41576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516004805460208085018051604080880180516060808b0180516001600160a01b039b8c167fffffffffffffffff000000000000000000000000000000000000000000000000909a168a177401000000000000000000000000000000000000000063ffffffff988916021777ffffffffffffffffffffffffffffffffffffffffffffffff16600160c01b948816949094026001600160e01b031693909317600160e01b93871693909302929092179098556080808b0180516005805473ffffffffffffffffffffffffffffffffffffffff19908116928e1692909217905560a0808e01805160068054909416908f161790925586519a8b5297518716988a0198909852925185169388019390935251909216958501959095525185169383019390935251909216908201527f0da37fd00459f4f5f0b8210d31525e4910ae674b8bab34b561d146bb45773a4c9060c00160405180910390a150565b610ca5611bc3565b815181518114610ce1576040517f83e3f56400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b81811015610e32576000848281518110610d0057610d006154cc565b60200260200101519050600081602001515190506000858481518110610d2857610d286154cc565b6020026020010151905080518214610d6c576040517f83e3f56400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b82811015610e23576000828281518110610d8b57610d8b6154cc565b6020026020010151905080600014158015610dc6575084602001518281518110610db757610db76154cc565b60200260200101516080015181105b15610e1a5784516040517fc8e9605100000000000000000000000000000000000000000000000000000000815267ffffffffffffffff909116600482015260248101839052604481018290526064016108a9565b50600101610d6f565b50505050806001019050610ce4565b50610e3d8383611ab7565b505050565b6000610e50600160046156f7565b6002610e5d608085615720565b67ffffffffffffffff16610e719190615747565b610e7b8585611c44565b901c166003811115610e8f57610e8f614c73565b90505b92915050565b6001546001600160a01b03163314610ef25760405162461bcd60e51b815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016108a9565b600080543373ffffffffffffffffffffffffffffffffffffffff19808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610f5e611b67565b610f6781611c8b565b50565b600080610f778484611f9c565b50949350505050565b610fc36040805160e081019091526000606082018181526080830182905260a0830182905260c08301919091528190815260200160608152602001606081525090565b60ff808316600090815260026020818152604092839020835160e081018552815460608201908152600183015480881660808401526101008104881660a0840152620100009004909616151560c08201529485529182018054845181840281018401909552808552929385830193909283018282801561106c57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161104e575b50505050508152602001600382018054806020026020016040519081016040528092919081815260200182805480156110ce57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116110b0575b5050505050815250509050919050565b6110e6611b67565b60005b81811015610e3d576000838383818110611105576111056154cc565b90506040020180360381019061111b919061575e565b905061112a816020015161151d565b61118f57805167ffffffffffffffff166000908152600a602090815260408083208285018051855290835281842093909355915191519182527f202f1139a3e334b6056064c0e9b19fd07e44a88d8f6e5ded571b24cf8c371f12910160405180910390a15b506001016110e9565b6111a0611b67565b610f67816120ad565b3330146111e2576040517f371a732800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080516000808252602082019092528161121f565b60408051808201909152600080825260208201528152602001906001900390816111f85790505b5061014084015151909150156112805761127d836101400151846020015160405160200161125c91906001600160a01b0391909116815260200190565b60408051601f19818403018152918152860151865161016088015187612163565b90505b600061128c8483612210565b6005549091506001600160a01b03168015611379576040517f08d450a10000000000000000000000000000000000000000000000000000000081526001600160a01b038216906308d450a1906112e6908590600401615846565b600060405180830381600087803b15801561130057600080fd5b505af1925050508015611311575060015b611379573d80801561133f576040519150601f19603f3d011682016040523d82523d6000602084013e611344565b606091505b50806040517f09c253250000000000000000000000000000000000000000000000000000000081526004016108a991906141e0565b6101208501515115801561138f57506080850151155b806113a6575060408501516001600160a01b03163b155b806113e6575060408501516113e4906001600160a01b03167f85572ffb000000000000000000000000000000000000000000000000000000006122b3565b155b156113f2575050505050565b60048054608087015160408089015190517f3cf9798300000000000000000000000000000000000000000000000000000000815260009485946001600160a01b031693633cf979839361144d938a9361138893929101615859565b6000604051808303816000875af115801561146c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261149491908101906158da565b5091509150816114d257806040517f0a8d6e8c0000000000000000000000000000000000000000000000000000000081526004016108a991906141e0565b50505050505050565b6114e3611b67565b60005b815181101561151957611511828281518110611504576115046154cc565b60200260200101516122cf565b6001016114e6565b5050565b6040805180820182523081526020810183815291517f4d61677100000000000000000000000000000000000000000000000000000000815290516001600160a01b039081166004830152915160248201526000917f00000000000000000000000000000000000000000000000000000000000000001690634d61677190604401602060405180830381865afa1580156115ba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e929190615934565b6040517f2cbc26bb000000000000000000000000000000000000000000000000000000008152608082901b77ffffffffffffffff000000000000000000000000000000001660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632cbc26bb90602401602060405180830381865afa158015611679573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061169d9190615934565b15610f67576040517ffdbd6a7200000000000000000000000000000000000000000000000000000000815267ffffffffffffffff821660048201526024016108a9565b67ffffffffffffffff81166000908152600760205260408120805460ff16610e92576040517fed053c5900000000000000000000000000000000000000000000000000000000815267ffffffffffffffff841660048201526024016108a9565b60ff8781166000908152600260209081526040808320815160808101835281548152600190910154808616938201939093526101008304851691810191909152620100009091049092161515606083015287359061179f8760a4615951565b90508260600151156117e75784516117b8906020615747565b86516117c5906020615747565b6117d09060a0615951565b6117da9190615951565b6117e49082615951565b90505b368114611829576040517f8e1192e1000000000000000000000000000000000000000000000000000000008152600481018290523660248201526044016108a9565b50815181146118715781516040517f93df584c0000000000000000000000000000000000000000000000000000000081526004810191909152602481018290526044016108a9565b611879611bc3565b60ff808a16600090815260036020908152604080832033845282528083208151808301909252805480861683529394919390928401916101009091041660028111156118c7576118c7614c73565b60028111156118d8576118d8614c73565b90525090506002816020015160028111156118f5576118f5614c73565b1480156119495750600260008b60ff1660ff168152602001908152602001600020600301816000015160ff1681548110611931576119316154cc565b6000918252602090912001546001600160a01b031633145b61197f576040517fda0f08e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50816060015115611a6157602082015161199a906001615964565b60ff168551146119d6576040517f71253a2500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8351855114611a11576040517fa75d88af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008787604051611a2392919061597d565b604051908190038120611a3a918b9060200161598d565b604051602081830303815290604052805190602001209050611a5f8a828888886125da565b505b6040805182815260208a81013567ffffffffffffffff169082015260ff8b16917f198d6990ef96613a9026203077e422916918b03ff47f0be6bee7b02d8e139ef0910160405180910390a2505050505050505050565b8151600003611af1576040517ebf199700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805160408051600080825260208201909252911591905b8451811015611b6057611b58858281518110611b2657611b266154cc565b602002602001015184611b5257858381518110611b4557611b456154cc565b60200260200101516127f1565b836127f1565b600101611b08565b5050505050565b6000546001600160a01b03163314611bc15760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016108a9565b565b467f000000000000000000000000000000000000000000000000000000000000000014611bc1576040517f0f01ce850000000000000000000000000000000000000000000000000000000081527f000000000000000000000000000000000000000000000000000000000000000060048201524660248201526044016108a9565b67ffffffffffffffff8216600090815260096020526040812081611c696080856159a1565b67ffffffffffffffff1681526020810191909152604001600020549392505050565b60005b8151811015611519576000828281518110611cab57611cab6154cc565b602002602001015190506000816000015190508067ffffffffffffffff16600003611d02576040517fc656089500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608201516001600160a01b0316611d46576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8116600090815260076020526040902060018101546001600160a01b0316611e6957611da08284606001517f8acd72527118c8324937b1a42e02cd246697c3b633f1742f3cae11de233722b36130c0565b600282015560608301516001820180546001600160a01b0392831673ffffffffffffffffffffffffffffffffffffffff19909116179055604080850151835468ffffffffffffffff001991909316690100000000000000000002167fffffff00000000000000000000000000000000000000000000000000000000ff909216919091176101001782555167ffffffffffffffff831681527ff4c1390c70e5c0f491ae1ccbc06f9117cbbadf2767b247b3bc203280f24c0fb99060200160405180910390a1611eef565b606083015160018201546001600160a01b039081169116141580611eac575060408301518154690100000000000000000090046001600160a01b03908116911614155b15611eef576040517fc39a620500000000000000000000000000000000000000000000000000000000815267ffffffffffffffff831660048201526024016108a9565b6020830151815490151560ff1990911617815560405167ffffffffffffffff8316907fa73c588738263db34ef8c1942db8f99559bc6696f6a812d42e76bafb4c0e8d3090611f86908490815460ff811615158252600881901c67ffffffffffffffff16602083015260481c6001600160a01b0390811660408301526001830154166060820152600290910154608082015260a00190565b60405180910390a2505050806001019050611c8e565b67ffffffffffffffff80831660009081526008602090815260408083206001600160a01b0386168452909152812054909182911680820361209f5767ffffffffffffffff8516600090815260076020526040902054690100000000000000000090046001600160a01b0316801561209d576040517f856c82470000000000000000000000000000000000000000000000000000000081526001600160a01b03868116600483015282169063856c824790602401602060405180830381865afa15801561206c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061209091906159c8565b60019350935050506120a6565b505b9150600090505b9250929050565b336001600160a01b038216036121055760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016108a9565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b8560005b8751811015612205576121e0888281518110612185576121856154cc565b6020026020010151602001518888888886815181106121a6576121a66154cc565b60200260200101518060200190518101906121c191906159e5565b8887815181106121d3576121d36154cc565b6020026020010151613143565b8282815181106121f2576121f26154cc565b6020908102919091010152600101612167565b509695505050505050565b6040805160a08101825260008082526020820152606091810182905281810182905260808101919091526040518060a001604052808461018001518152602001846000015167ffffffffffffffff168152602001846020015160405160200161228891906001600160a01b0391909116815260200190565b6040516020818303038152906040528152602001846101200151815260200183815250905092915050565b60006122be836134bc565b8015610e8f5750610e8f8383613508565b806040015160ff166000036122fa576000604051631b3fab5160e11b81526004016108a99190615a9a565b60208082015160ff8082166000908152600290935260408320600181015492939092839216900361234b576060840151600182018054911515620100000262ff0000199092169190911790556123a0565b6060840151600182015460ff62010000909104161515901515146123a0576040517f87f6037c00000000000000000000000000000000000000000000000000000000815260ff841660048201526024016108a9565b60a08401518051601f60ff821611156123cf576001604051631b3fab5160e11b81526004016108a99190615a9a565b612435858560030180548060200260200160405190810160405280929190818152602001828054801561242b57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161240d575b50505050506135aa565b856060015115612547576124a3858560020180548060200260200160405190810160405280929190818152602001828054801561242b576020028201919060005260206000209081546001600160a01b0316815260019091019060200180831161240d5750505050506135aa565b608086015180516124bd90600287019060208401906140ee565b50805160018501805461ff00191661010060ff841690810291909117909155601f1015612500576002604051631b3fab5160e11b81526004016108a99190615a9a565b6040880151612510906003615ab4565b60ff168160ff1611612538576003604051631b3fab5160e11b81526004016108a99190615a9a565b61254487836001613613565b50505b61255385836002613613565b815161256890600386019060208501906140ee565b5060408681015160018501805460ff191660ff8316179055875180865560a089015192517fab8b1b57514019638d7b5ce9c638fe71366fe8e2be1c40a7a80f1733d0e9f547936125c1938a939260028b01929190615ad0565b60405180910390a16125d285613793565b505050505050565b6125e261415c565b835160005b818110156127e7576000600188868460208110612606576126066154cc565b61261391901a601b615964565b898581518110612625576126256154cc565b602002602001015189868151811061263f5761263f6154cc565b60200260200101516040516000815260200160405260405161267d949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa15801561269f573d6000803e3d6000fd5b505060408051601f1981015160ff808e166000908152600360209081528582206001600160a01b0385168352815285822085870190965285548084168652939750909550929392840191610100900416600281111561270057612700614c73565b600281111561271157612711614c73565b905250905060018160200151600281111561272e5761272e614c73565b14612765576040517fca31867a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8051859060ff16601f811061277c5761277c6154cc565b6020020151156127b8576040517ff67bc7c400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600185826000015160ff16601f81106127d3576127d36154cc565b9115156020909202015250506001016125e7565b5050505050505050565b81516127fc816115de565b6000612807826116e0565b602085015151909150600081900361284a576040517ebf199700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8460400151518114612888576040517f57e0e08300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008167ffffffffffffffff8111156128a3576128a3614392565b6040519080825280602002602001820160405280156128cc578160200160208202803683370190505b50905060005b82811015612991576000876020015182815181106128f2576128f26154cc565b6020026020010151905061290a8186600201546137af565b83838151811061291c5761291c6154cc565b602002602001018181525050806101800151838381518110612940576129406154cc565b602002602001015114612988578061018001516040517f345039be0000000000000000000000000000000000000000000000000000000081526004016108a991815260200190565b506001016128d2565b5060006129a8858389606001518a6080015161390b565b9050806000036129f0576040517f7dd17a7e00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff861660048201526024016108a9565b8551151560005b84811015610a6c57600089602001518281518110612a1757612a176154cc565b602002602001015190506000612a31898360600151610e42565b90506002816003811115612a4757612a47614c73565b03612a9d5760608201516040805167ffffffffffffffff808d16825290921660208301527f3b575419319662b2a6f5e2467d84521517a3382b908eb3d557bb3fdb0c50e23c910160405180910390a150506130b8565b6000816003811115612ab157612ab1614c73565b1480612ace57506003816003811115612acc57612acc614c73565b145b612b1e5760608201516040517f25507e7f00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff808c16600483015290911660248201526044016108a9565b8315612bff5760045460009074010000000000000000000000000000000000000000900463ffffffff16612b5287426156f7565b1190508080612b7257506003826003811115612b7057612b70614c73565b145b612bb4576040517fa9cfc86200000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8b1660048201526024016108a9565b8a8481518110612bc657612bc66154cc565b6020026020010151600014612bf9578a8481518110612be757612be76154cc565b60200260200101518360800181815250505b50612c64565b6000816003811115612c1357612c13614c73565b14612c645760608201516040517f3ef2a99c00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff808c16600483015290911660248201526044016108a9565b60c082015167ffffffffffffffff1615612e2057600080612c898b8560200151611f9c565b915091508015612d785760c084015167ffffffffffffffff16612cad8360016155fd565b67ffffffffffffffff1614612d305760c084015160208501516040517f5444a3301c7c42dd164cbf6ba4b72bf02504f86c049b06a27fc2b662e334bdbd92612d1f928f9267ffffffffffffffff93841681529190921660208201526001600160a01b0391909116604082015260600190565b60405180910390a1505050506130b8565b67ffffffffffffffff8b81166000908152600860209081526040808320888301516001600160a01b031684529091529020805467ffffffffffffffff19169184169190911790555b6000836003811115612d8c57612d8c614c73565b03612e1d5760c084015167ffffffffffffffff16612dab8360016155fd565b67ffffffffffffffff1614612e1d5760c084015160208501516040517f852dc8e405695593e311bd83991cf39b14a328f304935eac6d3d55617f911d8992612d1f928f9267ffffffffffffffff93841681529190921660208201526001600160a01b0391909116604082015260600190565b50505b60008b604001518481518110612e3857612e386154cc565b6020026020010151905080518361014001515114612e9c5760608301516040517f1cfe6d8b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff808d16600483015290911660248201526044016108a9565b612eac8a84606001516001613961565b600080612eb98584613a09565b91509150612ecc8c866060015184613961565b868015612eea57506003826003811115612ee857612ee8614c73565b145b8015612f0857506000846003811115612f0557612f05614c73565b14155b15612f4857846101800151816040517f2b11b8d90000000000000000000000000000000000000000000000000000000081526004016108a9929190615b56565b6003826003811115612f5c57612f5c614c73565b14158015612f7c57506002826003811115612f7957612f79614c73565b14155b15612fbc5760608501516040517f926c5a3e0000000000000000000000000000000000000000000000000000000081526108a9918e918590600401615b6f565b60008560c0015167ffffffffffffffff16118015612feb57506000846003811115612fe957612fe9614c73565b145b156130595767ffffffffffffffff808d166000908152600860209081526040808320898301516001600160a01b0316845290915281208054909216919061303183615b95565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550505b846101800151856060015167ffffffffffffffff168d67ffffffffffffffff167f8c324ce1367b83031769f6a813e3bb4c117aba2185789d66b98b791405be6df285856040516130aa929190615bbc565b60405180910390a450505050505b6001016129f7565b600081847f000000000000000000000000000000000000000000000000000000000000000085604051602001613123949392919093845267ffffffffffffffff9283166020850152911660408301526001600160a01b0316606082015260800190565b6040516020818303038152906040528051906020012090505b9392505050565b604080518082019091526000808252602082015260006131668460200151613c53565b6040517fbbe4f6db0000000000000000000000000000000000000000000000000000000081526001600160a01b0380831660048301529192506000917f0000000000000000000000000000000000000000000000000000000000000000169063bbe4f6db90602401602060405180830381865afa1580156131eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061320f9190615bdc565b90506001600160a01b038116158061325757506132556001600160a01b0382167faff2afbf000000000000000000000000000000000000000000000000000000006122b3565b155b15613299576040517fae9b4ce90000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016108a9565b600080613364633907753760e01b6040518061010001604052808d81526020018b67ffffffffffffffff1681526020018c6001600160a01b031681526020018e8152602001876001600160a01b031681526020018a6000015181526020018a604001518152602001898152506040516024016133159190615bf9565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152600454859063ffffffff600160e01b909104166113886084613c95565b509150915081613389578060405163e1cd550960e01b81526004016108a991906141e0565b80516020146133d15780516040517f78ef80240000000000000000000000000000000000000000000000000000000081526020600482015260248101919091526044016108a9565b6000818060200190518101906133e79190615cd0565b604080516001600160a01b038d16602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167fa9059cbb0000000000000000000000000000000000000000000000000000000017905260045491925061346a918790600160c01b900463ffffffff166113886084613c95565b50909350915082613490578160405163e1cd550960e01b81526004016108a991906141e0565b604080518082019091526001600160a01b03909516855260208501525091925050509695505050505050565b60006134e8827f01ffc9a700000000000000000000000000000000000000000000000000000000613508565b8015610e925750613501826001600160e01b0319613508565b1592915050565b604080516001600160e01b03198316602480830191909152825180830390910181526044909101909152602080820180516001600160e01b03167f01ffc9a700000000000000000000000000000000000000000000000000000000178152825160009392849283928392918391908a617530fa92503d91506000519050828015613593575060208210155b801561359f5750600081115b979650505050505050565b60005b8151811015610e3d5760ff8316600090815260036020526040812083519091908490849081106135df576135df6154cc565b6020908102919091018101516001600160a01b03168252810191909152604001600020805461ffff191690556001016135ad565b60005b82518160ff161015610ada576000838260ff1681518110613639576136396154cc565b602002602001015190506000600281111561365657613656614c73565b60ff80871660009081526003602090815260408083206001600160a01b0387168452909152902054610100900416600281111561369557613695614c73565b146136b6576004604051631b3fab5160e11b81526004016108a99190615a9a565b6001600160a01b0381166136f6576040517fd6c62c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60405180604001604052808360ff16815260200184600281111561371c5761371c614c73565b905260ff80871660009081526003602090815260408083206001600160a01b0387168452825290912083518154931660ff198416811782559184015190929091839161ffff19161761010083600281111561377957613779614c73565b0217905550905050508061378c90615ce9565b9050613616565b60ff8116610f6757600b805467ffffffffffffffff1916905550565b60008060001b8284602001518560400151866060015187608001518860a001518960c001518a60e001518b61010001516040516020016138459897969594939291906001600160a01b039889168152968816602088015267ffffffffffffffff95861660408801526060870194909452911515608086015290921660a0840152921660c082015260e08101919091526101000190565b604051602081830303815290604052805190602001208561012001518051906020012086610140015160405160200161387e9190615d08565b604051602081830303815290604052805190602001208761016001516040516020016138aa9190615dbd565b60408051601f198184030181528282528051602091820120908301979097528101949094526060840192909252608083015260a082015260c081019190915260e0015b60405160208183030381529060405280519060200120905092915050565b600080613919858585613dbb565b90506139248161151d565b613932576000915050613959565b67ffffffffffffffff86166000908152600a60209081526040808320938352929052205490505b949350505050565b60006002613970608085615720565b67ffffffffffffffff166139849190615747565b905060006139928585611c44565b9050816139a1600160046156f7565b901b1916818360038111156139b8576139b8614c73565b67ffffffffffffffff871660009081526009602052604081209190921b929092179182916139e76080886159a1565b67ffffffffffffffff1681526020810191909152604001600020555050505050565b6040517ff52121a5000000000000000000000000000000000000000000000000000000008152600090606090309063f52121a590613a4d9087908790600401615dd0565b600060405180830381600087803b158015613a6757600080fd5b505af1925050508015613a78575060015b613c38573d808015613aa6576040519150601f19603f3d011682016040523d82523d6000602084013e613aab565b606091505b506000613ab782615f15565b90507f0a8d6e8c000000000000000000000000000000000000000000000000000000006001600160e01b031982161480613b01575063e1cd550960e01b6001600160e01b03198216145b80613b1c575063046b337b60e51b6001600160e01b03198216145b80613b5057507f78ef8024000000000000000000000000000000000000000000000000000000006001600160e01b03198216145b80613b8457507f0c3b563c000000000000000000000000000000000000000000000000000000006001600160e01b03198216145b80613bb857507fae9b4ce9000000000000000000000000000000000000000000000000000000006001600160e01b03198216145b80613bec57507f09c25325000000000000000000000000000000000000000000000000000000006001600160e01b03198216145b15613bfd57506003925090506120a6565b856101800151826040517f2b11b8d90000000000000000000000000000000000000000000000000000000081526004016108a9929190615b56565b50506040805160208101909152600081526002909250929050565b60008151602014613c79578160405163046b337b60e51b81526004016108a991906141e0565b610e9282806020019051810190613c909190615cd0565b614059565b6000606060008361ffff1667ffffffffffffffff811115613cb857613cb8614392565b6040519080825280601f01601f191660200182016040528015613ce2576020820181803683370190505b509150863b613d15577f0c3b563c0000000000000000000000000000000000000000000000000000000060005260046000fd5b5a85811015613d48577fafa32a2c0000000000000000000000000000000000000000000000000000000060005260046000fd5b8590036040810481038710613d81577f37c3be290000000000000000000000000000000000000000000000000000000060005260046000fd5b505a6000808a5160208c0160008c8cf193505a900390503d84811115613da45750835b808352806000602085013e50955095509592505050565b8251825160009190818303613dfc576040517f11a6b26400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6101018211801590613e1057506101018111155b613e2d576040516309bde33960e01b815260040160405180910390fd5b60001982820101610100811115613e57576040516309bde33960e01b815260040160405180910390fd5b80600003613e845786600081518110613e7257613e726154cc565b6020026020010151935050505061313c565b60008167ffffffffffffffff811115613e9f57613e9f614392565b604051908082528060200260200182016040528015613ec8578160200160208202803683370190505b50905060008080805b85811015613ff25760006001821b8b811603613f2c5788851015613f15578c5160018601958e918110613f0657613f066154cc565b60200260200101519050613f4e565b8551600185019487918110613f0657613f066154cc565b8b5160018401938d918110613f4357613f436154cc565b602002602001015190505b600089861015613f7e578d5160018701968f918110613f6f57613f6f6154cc565b60200260200101519050613fa0565b8651600186019588918110613f9557613f956154cc565b602002602001015190505b82851115613fc1576040516309bde33960e01b815260040160405180910390fd5b613fcb82826140ad565b878481518110613fdd57613fdd6154cc565b60209081029190910101525050600101613ed1565b50600185038214801561400457508683145b801561400f57508581145b61402c576040516309bde33960e01b815260040160405180910390fd5b836001860381518110614041576140416154cc565b60200260200101519750505050505050509392505050565b60006001600160a01b03821180614071575061040082105b156140a95760408051602081018490520160408051601f198184030181529082905263046b337b60e51b82526108a9916004016141e0565b5090565b60008183106140c5576140c082846140cb565b610e8f565b610e8f83835b6040805160016020820152908101839052606081018290526000906080016138ed565b828054828255906000526020600020908101928215614150579160200282015b82811115614150578251825473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0390911617825560209092019160019091019061410e565b506140a992915061417b565b604051806103e00160405280601f906020820280368337509192915050565b5b808211156140a9576000815560010161417c565b60005b838110156141ab578181015183820152602001614193565b50506000910152565b600081518084526141cc816020860160208601614190565b601f01601f19169290920160200192915050565b602081526000610e8f60208301846141b4565b8060608101831015610e9257600080fd5b60008083601f84011261421657600080fd5b50813567ffffffffffffffff81111561422e57600080fd5b6020830191508360208285010111156120a657600080fd5b60008083601f84011261425857600080fd5b50813567ffffffffffffffff81111561427057600080fd5b6020830191508360208260051b85010111156120a657600080fd5b60008060008060008060008060e0898b0312156142a757600080fd5b6142b18a8a6141f3565b9750606089013567ffffffffffffffff808211156142ce57600080fd5b6142da8c838d01614204565b909950975060808b01359150808211156142f357600080fd5b6142ff8c838d01614246565b909750955060a08b013591508082111561431857600080fd5b506143258b828c01614246565b999c989b50969995989497949560c00135949350505050565b60008060006080848603121561435357600080fd5b61435d85856141f3565b9250606084013567ffffffffffffffff81111561437957600080fd5b61438586828701614204565b9497909650939450505050565b634e487b7160e01b600052604160045260246000fd5b60405160c0810167ffffffffffffffff811182821017156143cb576143cb614392565b60405290565b6040805190810167ffffffffffffffff811182821017156143cb576143cb614392565b6040516101a0810167ffffffffffffffff811182821017156143cb576143cb614392565b60405160a0810167ffffffffffffffff811182821017156143cb576143cb614392565b6040516080810167ffffffffffffffff811182821017156143cb576143cb614392565b6040516060810167ffffffffffffffff811182821017156143cb576143cb614392565b604051601f8201601f1916810167ffffffffffffffff811182821017156144aa576144aa614392565b604052919050565b6001600160a01b0381168114610f6757600080fd5b80356144d2816144b2565b919050565b803563ffffffff811681146144d257600080fd5b600060c082840312156144fd57600080fd5b6145056143a8565b8235614510816144b2565b815261451e602084016144d7565b602082015261452f604084016144d7565b6040820152614540606084016144d7565b60608201526080830135614553816144b2565b608082015260a0830135614566816144b2565b60a08201529392505050565b600067ffffffffffffffff82111561458c5761458c614392565b5060051b60200190565b67ffffffffffffffff81168114610f6757600080fd5b80356144d281614596565b8015158114610f6757600080fd5b80356144d2816145b7565b600067ffffffffffffffff8211156145ea576145ea614392565b50601f01601f191660200190565b600082601f83011261460957600080fd5b813561461c614617826145d0565b614481565b81815284602083860101111561463157600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f83011261465f57600080fd5b8135602061466f61461783614572565b82815260069290921b8401810191818101908684111561468e57600080fd5b8286015b8481101561220557604081890312156146ab5760008081fd5b6146b36143d1565b81356146be816144b2565b81528185013585820152835291830191604001614692565b600082601f8301126146e757600080fd5b813560206146f761461783614572565b82815260059290921b8401810191818101908684111561471657600080fd5b8286015b8481101561220557803567ffffffffffffffff81111561473a5760008081fd5b6147488986838b01016145f8565b84525091830191830161471a565b60006101a0828403121561476957600080fd5b6147716143f4565b905061477c826145ac565b815261478a602083016144c7565b602082015261479b604083016144c7565b60408201526147ac606083016145ac565b6060820152608082013560808201526147c760a083016145c5565b60a08201526147d860c083016145ac565b60c08201526147e960e083016144c7565b60e082015261010082810135908201526101208083013567ffffffffffffffff8082111561481657600080fd5b614822868387016145f8565b8385015261014092508285013591508082111561483e57600080fd5b61484a8683870161464e565b8385015261016092508285013591508082111561486657600080fd5b50614873858286016146d6565b82840152505061018080830135818301525092915050565b600082601f83011261489c57600080fd5b813560206148ac61461783614572565b82815260059290921b840181019181810190868411156148cb57600080fd5b8286015b8481101561220557803567ffffffffffffffff8111156148ef5760008081fd5b6148fd8986838b0101614756565b8452509183019183016148cf565b600082601f83011261491c57600080fd5b8135602061492c61461783614572565b82815260059290921b8401810191818101908684111561494b57600080fd5b8286015b8481101561220557803567ffffffffffffffff81111561496f5760008081fd5b61497d8986838b01016146d6565b84525091830191830161494f565b600082601f83011261499c57600080fd5b813560206149ac61461783614572565b8083825260208201915060208460051b8701019350868411156149ce57600080fd5b602086015b8481101561220557803583529183019183016149d3565b600082601f8301126149fb57600080fd5b81356020614a0b61461783614572565b82815260059290921b84018101918181019086841115614a2a57600080fd5b8286015b8481101561220557803567ffffffffffffffff80821115614a4f5760008081fd5b9088019060a0828b03601f1901811315614a695760008081fd5b614a71614418565b614a7c8885016145ac565b815260408085013584811115614a925760008081fd5b614aa08e8b8389010161488b565b8a8401525060608086013585811115614ab95760008081fd5b614ac78f8c838a010161490b565b8385015250608091508186013585811115614ae25760008081fd5b614af08f8c838a010161498b565b9184019190915250919093013590830152508352918301918301614a2e565b6000806040808486031215614b2357600080fd5b833567ffffffffffffffff80821115614b3b57600080fd5b614b47878388016149ea565b9450602091508186013581811115614b5e57600080fd5b8601601f81018813614b6f57600080fd5b8035614b7d61461782614572565b81815260059190911b8201840190848101908a831115614b9c57600080fd5b8584015b83811015614c2857803586811115614bb85760008081fd5b8501603f81018d13614bca5760008081fd5b87810135614bda61461782614572565b81815260059190911b82018a0190898101908f831115614bfa5760008081fd5b928b01925b82841015614c185783358252928a0192908a0190614bff565b8652505050918601918601614ba0565b50809750505050505050509250929050565b60008060408385031215614c4d57600080fd5b8235614c5881614596565b91506020830135614c6881614596565b809150509250929050565b634e487b7160e01b600052602160045260246000fd5b60048110614c9957614c99614c73565b9052565b60208101610e928284614c89565b60006020808385031215614cbe57600080fd5b823567ffffffffffffffff811115614cd557600080fd5b8301601f81018513614ce657600080fd5b8035614cf461461782614572565b81815260079190911b82018301908381019087831115614d1357600080fd5b928401925b8284101561359f5760808489031215614d315760008081fd5b614d3961443b565b8435614d4481614596565b815284860135614d53816145b7565b81870152604085810135614d66816144b2565b90820152606085810135614d79816144b2565b9082015282526080939093019290840190614d18565b600060208284031215614da157600080fd5b813567ffffffffffffffff811115614db857600080fd5b820160a0818503121561313c57600080fd5b60008060408385031215614ddd57600080fd5b8235614de881614596565b91506020830135614c68816144b2565b803560ff811681146144d257600080fd5b600060208284031215614e1b57600080fd5b610e8f82614df8565b60008151808452602080850194506020840160005b83811015614e5e5781516001600160a01b031687529582019590820190600101614e39565b509495945050505050565b60208152600082518051602084015260ff602082015116604084015260ff604082015116606084015260608101511515608084015250602083015160c060a0840152614eb860e0840182614e24565b90506040840151601f198483030160c0850152614ed58282614e24565b95945050505050565b60008060408385031215614ef157600080fd5b8235614efc81614596565b946020939093013593505050565b60008060208385031215614f1d57600080fd5b823567ffffffffffffffff80821115614f3557600080fd5b818501915085601f830112614f4957600080fd5b813581811115614f5857600080fd5b8660208260061b8501011115614f6d57600080fd5b60209290920196919550909350505050565b600060208284031215614f9157600080fd5b813561313c81614596565b600060208284031215614fae57600080fd5b813561313c816144b2565b60008060408385031215614fcc57600080fd5b823567ffffffffffffffff80821115614fe457600080fd5b614ff086838701614756565b9350602085013591508082111561500657600080fd5b50615013858286016146d6565b9150509250929050565b600082601f83011261502e57600080fd5b8135602061503e61461783614572565b8083825260208201915060208460051b87010193508684111561506057600080fd5b602086015b84811015612205578035615078816144b2565b8352918301918301615065565b6000602080838503121561509857600080fd5b823567ffffffffffffffff808211156150b057600080fd5b818501915085601f8301126150c457600080fd5b81356150d261461782614572565b81815260059190911b830184019084810190888311156150f157600080fd5b8585015b838110156151c35780358581111561510c57600080fd5b860160c0818c03601f190112156151235760008081fd5b61512b6143a8565b888201358152604061513e818401614df8565b8a830152606061514f818501614df8565b82840152608091506151628285016145c5565b9083015260a0838101358981111561517a5760008081fd5b6151888f8d8388010161501d565b838501525060c08401359150888211156151a25760008081fd5b6151b08e8c8487010161501d565b90830152508452509186019186016150f5565b5098975050505050505050565b6000602082840312156151e257600080fd5b5035919050565b80356001600160e01b03811681146144d257600080fd5b600082601f83011261521157600080fd5b8135602061522161461783614572565b82815260069290921b8401810191818101908684111561524057600080fd5b8286015b84811015612205576040818903121561525d5760008081fd5b6152656143d1565b813561527081614596565b815261527d8286016151e9565b81860152835291830191604001615244565b600082601f8301126152a057600080fd5b813560206152b061461783614572565b82815260079290921b840181019181810190868411156152cf57600080fd5b8286015b848110156122055780880360808112156152ed5760008081fd5b6152f561445e565b823561530081614596565b81526040601f1983018113156153165760008081fd5b61531e6143d1565b92508684013561532d81614596565b83528381013561533c81614596565b83880152818701929092526060830135918101919091528352918301916080016152d3565b6000602080838503121561537457600080fd5b823567ffffffffffffffff8082111561538c57600080fd5b818501915060408083880312156153a257600080fd5b6153aa6143d1565b8335838111156153b957600080fd5b84016040818a0312156153cb57600080fd5b6153d36143d1565b8135858111156153e257600080fd5b8201601f81018b136153f357600080fd5b803561540161461782614572565b81815260069190911b8201890190898101908d83111561542057600080fd5b928a01925b828410156154705787848f03121561543d5760008081fd5b6154456143d1565b8435615450816144b2565b815261545d858d016151e9565b818d0152825292870192908a0190615425565b84525050508187013593508484111561548857600080fd5b6154948a858401615200565b81880152825250838501359150828211156154ae57600080fd5b6154ba8883860161528f565b85820152809550505050505092915050565b634e487b7160e01b600052603260045260246000fd5b805160408084528151848201819052600092602091908201906060870190855b8181101561553957835180516001600160a01b031684528501516001600160e01b0316858401529284019291850191600101615502565b50508583015187820388850152805180835290840192506000918401905b80831015615593578351805167ffffffffffffffff1683528501516001600160e01b031685830152928401926001929092019190850190615557565b50979650505050505050565b602081526000610e8f60208301846154e2565b67ffffffffffffffff831681526060810161313c6020830184805167ffffffffffffffff908116835260209182015116910152565b634e487b7160e01b600052601160045260246000fd5b67ffffffffffffffff81811683821601908082111561561e5761561e6155e7565b5092915050565b60006020808352606084516040808487015261564460608701836154e2565b87850151878203601f19016040890152805180835290860193506000918601905b808310156151c357845167ffffffffffffffff8151168352878101516156a489850182805167ffffffffffffffff908116835260209182015116910152565b50840151828701529386019360019290920191608090910190615665565b6000602082840312156156d457600080fd5b813567ffffffffffffffff8111156156eb57600080fd5b613959848285016149ea565b81810381811115610e9257610e926155e7565b634e487b7160e01b600052601260045260246000fd5b600067ffffffffffffffff8084168061573b5761573b61570a565b92169190910692915050565b8082028115828204841417610e9257610e926155e7565b60006040828403121561577057600080fd5b6157786143d1565b823561578381614596565b81526020928301359281019290925250919050565b60008151808452602080850194506020840160005b83811015614e5e57815180516001600160a01b0316885260209081015190880152604087019650908201906001016157ad565b8051825267ffffffffffffffff60208201511660208301526000604082015160a0604085015261581360a08501826141b4565b90506060830151848203606086015261582c82826141b4565b91505060808301518482036080860152614ed58282615798565b602081526000610e8f60208301846157e0565b60808152600061586c60808301876157e0565b61ffff9590951660208301525060408101929092526001600160a01b0316606090910152919050565b600082601f8301126158a657600080fd5b81516158b4614617826145d0565b8181528460208386010111156158c957600080fd5b613959826020830160208701614190565b6000806000606084860312156158ef57600080fd5b83516158fa816145b7565b602085015190935067ffffffffffffffff81111561591757600080fd5b61592386828701615895565b925050604084015190509250925092565b60006020828403121561594657600080fd5b815161313c816145b7565b80820180821115610e9257610e926155e7565b60ff8181168382160190811115610e9257610e926155e7565b8183823760009101908152919050565b828152606082602083013760800192915050565b600067ffffffffffffffff808416806159bc576159bc61570a565b92169190910492915050565b6000602082840312156159da57600080fd5b815161313c81614596565b6000602082840312156159f757600080fd5b815167ffffffffffffffff80821115615a0f57600080fd5b9083019060608286031215615a2357600080fd5b615a2b61445e565b825182811115615a3a57600080fd5b615a4687828601615895565b825250602083015182811115615a5b57600080fd5b615a6787828601615895565b602083015250604083015182811115615a7f57600080fd5b615a8b87828601615895565b60408301525095945050505050565b6020810160058310615aae57615aae614c73565b91905290565b60ff818116838216029081169081811461561e5761561e6155e7565b600060a0820160ff88168352602087602085015260a0604085015281875480845260c086019150886000526020600020935060005b81811015615b2a5784546001600160a01b031683526001948501949284019201615b05565b50508481036060860152615b3e8188614e24565b935050505060ff831660808301529695505050505050565b82815260406020820152600061395960408301846141b4565b67ffffffffffffffff848116825283166020820152606081016139596040830184614c89565b600067ffffffffffffffff808316818103615bb257615bb26155e7565b6001019392505050565b615bc68184614c89565b60406020820152600061395960408301846141b4565b600060208284031215615bee57600080fd5b815161313c816144b2565b6020815260008251610100806020850152615c186101208501836141b4565b91506020850151615c35604086018267ffffffffffffffff169052565b5060408501516001600160a01b038116606086015250606085015160808501526080850151615c6f60a08601826001600160a01b03169052565b5060a0850151601f19808685030160c0870152615c8c84836141b4565b935060c08701519150808685030160e0870152615ca984836141b4565b935060e0870151915080868503018387015250615cc683826141b4565b9695505050505050565b600060208284031215615ce257600080fd5b5051919050565b600060ff821660ff8103615cff57615cff6155e7565b60010192915050565b6020808252825182820181905260009190848201906040850190845b81811015615d5757835180516001600160a01b031684526020908101519084015260408301938501939250600101615d24565b50909695505050505050565b60008282518085526020808601955060208260051b8401016020860160005b84811015615db057601f19868403018952615d9e8383516141b4565b98840198925090830190600101615d82565b5090979650505050505050565b602081526000610e8f6020830184615d63565b60408152615deb60408201845167ffffffffffffffff169052565b60006020840151615e0760608401826001600160a01b03169052565b5060408401516001600160a01b038116608084015250606084015167ffffffffffffffff811660a084015250608084015160c083015260a084015180151560e08401525060c0840151610100615e688185018367ffffffffffffffff169052565b60e08601519150610120615e86818601846001600160a01b03169052565b81870151925061014091508282860152808701519250506101a06101608181870152615eb66101e08701856141b4565b9350828801519250603f19610180818887030181890152615ed78686615798565b9550828a01519450818887030184890152615ef28686615d63565b9550808a01516101c089015250505050508281036020840152614ed58185615d63565b6000815160208301516001600160e01b031980821693506004831015615f455780818460040360031b1b83161693505b50505091905056fea164736f6c6343000818000a", + ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAdminRegistry\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"nonceManager\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOffRamp.StaticConfig\",\"name\":\"staticConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"onRamp\",\"type\":\"bytes\"}],\"internalType\":\"structEVM2EVMMultiOffRamp.SourceChainConfigArgs[]\",\"name\":\"sourceChainConfigs\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"}],\"name\":\"AlreadyAttempted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"}],\"name\":\"AlreadyExecuted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CanOnlySelfCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"ConfigDigestMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"}],\"name\":\"CursedByRMN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EmptyReport\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"error\",\"type\":\"bytes\"}],\"name\":\"ExecutionError\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"}],\"name\":\"ForkedChain\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"enumMultiOCR3Base.InvalidConfigErrorType\",\"name\":\"errorType\",\"type\":\"uint8\"}],\"name\":\"InvalidConfig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"got\",\"type\":\"uint256\"}],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"encodedAddress\",\"type\":\"bytes\"}],\"name\":\"InvalidEVMAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"min\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"max\",\"type\":\"uint64\"}],\"internalType\":\"structEVM2EVMMultiOffRamp.Interval\",\"name\":\"interval\",\"type\":\"tuple\"}],\"name\":\"InvalidInterval\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"newLimit\",\"type\":\"uint256\"}],\"name\":\"InvalidManualExecutionGasLimit\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"messageDestChainSelector\",\"type\":\"uint64\"}],\"name\":\"InvalidMessageDestChainSelector\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"},{\"internalType\":\"enumInternal.MessageExecutionState\",\"name\":\"newState\",\"type\":\"uint8\"}],\"name\":\"InvalidNewState\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidProof\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRoot\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"}],\"name\":\"InvalidStaticConfig\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LeavesCannotBeEmpty\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ManualExecutionGasLimitMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"}],\"name\":\"ManualExecutionNotYetEnabled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"errorReason\",\"type\":\"bytes\"}],\"name\":\"MessageValidationError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NonUniqueSignatures\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"notPool\",\"type\":\"address\"}],\"name\":\"NotACompatiblePool\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OracleCannotBeZeroAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"error\",\"type\":\"bytes\"}],\"name\":\"ReceiverError\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"}],\"name\":\"RootAlreadyCommitted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"}],\"name\":\"RootNotCommitted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SignaturesOutOfRegistration\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"}],\"name\":\"SourceChainNotEnabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StaleCommitReport\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"ocrPluginType\",\"type\":\"uint8\"}],\"name\":\"StaticConfigCannotBeChanged\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"}],\"name\":\"TokenDataMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"error\",\"type\":\"bytes\"}],\"name\":\"TokenHandlingError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnauthorizedSigner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnauthorizedTransmitter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnexpectedTokenData\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"}],\"name\":\"WrongMessageLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WrongNumberOfSignatures\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroChainSelectorNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sourceToken\",\"type\":\"address\"},{\"internalType\":\"uint224\",\"name\":\"usdPerToken\",\"type\":\"uint224\"}],\"internalType\":\"structInternal.TokenPriceUpdate[]\",\"name\":\"tokenPriceUpdates\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint224\",\"name\":\"usdPerUnitGas\",\"type\":\"uint224\"}],\"internalType\":\"structInternal.GasPriceUpdate[]\",\"name\":\"gasPriceUpdates\",\"type\":\"tuple[]\"}],\"internalType\":\"structInternal.PriceUpdates\",\"name\":\"priceUpdates\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"min\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"max\",\"type\":\"uint64\"}],\"internalType\":\"structEVM2EVMMultiOffRamp.Interval\",\"name\":\"interval\",\"type\":\"tuple\"},{\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"}],\"internalType\":\"structEVM2EVMMultiOffRamp.MerkleRoot[]\",\"name\":\"merkleRoots\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structEVM2EVMMultiOffRamp.CommitReport\",\"name\":\"report\",\"type\":\"tuple\"}],\"name\":\"CommitReportAccepted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"ocrPluginType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"F\",\"type\":\"uint8\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"permissionLessExecutionThresholdSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxTokenTransferGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPoolReleaseOrMintGas\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"messageValidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"priceRegistry\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structEVM2EVMMultiOffRamp.DynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"}],\"name\":\"DynamicConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"enumInternal.MessageExecutionState\",\"name\":\"state\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"returnData\",\"type\":\"bytes\"}],\"name\":\"ExecutionStateChanged\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"name\":\"RootRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"}],\"name\":\"SkippedAlreadyExecutedMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint64\",\"name\":\"minSeqNr\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"onRamp\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"structEVM2EVMMultiOffRamp.SourceChainConfig\",\"name\":\"sourceConfig\",\"type\":\"tuple\"}],\"name\":\"SourceChainConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"}],\"name\":\"SourceChainSelectorAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAdminRegistry\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"nonceManager\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structEVM2EVMMultiOffRamp.StaticConfig\",\"name\":\"staticConfig\",\"type\":\"tuple\"}],\"name\":\"StaticConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint8\",\"name\":\"ocrPluginType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"}],\"name\":\"Transmitted\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"onRamp\",\"type\":\"bytes\"}],\"internalType\":\"structEVM2EVMMultiOffRamp.SourceChainConfigArgs[]\",\"name\":\"sourceChainConfigUpdates\",\"type\":\"tuple[]\"}],\"name\":\"applySourceChainConfigUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"destTokenAmounts\",\"type\":\"tuple[]\"}],\"internalType\":\"structClient.Any2EVMMessage\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"ccipReceive\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[3]\",\"name\":\"reportContext\",\"type\":\"bytes32[3]\"},{\"internalType\":\"bytes\",\"name\":\"report\",\"type\":\"bytes\"},{\"internalType\":\"bytes32[]\",\"name\":\"rs\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"ss\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"rawVs\",\"type\":\"bytes32\"}],\"name\":\"commit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[3]\",\"name\":\"reportContext\",\"type\":\"bytes32[3]\"},{\"internalType\":\"bytes\",\"name\":\"report\",\"type\":\"bytes\"}],\"name\":\"execute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"}],\"internalType\":\"structInternal.RampMessageHeader\",\"name\":\"header\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"tokenAmounts\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes[]\",\"name\":\"sourceTokenData\",\"type\":\"bytes[]\"}],\"internalType\":\"structInternal.Any2EVMRampMessage\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"bytes[]\",\"name\":\"offchainTokenData\",\"type\":\"bytes[]\"}],\"name\":\"executeSingleMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDynamicConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"permissionLessExecutionThresholdSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxTokenTransferGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPoolReleaseOrMintGas\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"messageValidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"priceRegistry\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOffRamp.DynamicConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"}],\"name\":\"getExecutionState\",\"outputs\":[{\"internalType\":\"enumInternal.MessageExecutionState\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLatestPriceSequenceNumber\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"name\":\"getMerkleRoot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"}],\"name\":\"getSourceChainConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint64\",\"name\":\"minSeqNr\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"onRamp\",\"type\":\"bytes\"}],\"internalType\":\"structEVM2EVMMultiOffRamp.SourceChainConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStaticConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAdminRegistry\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"nonceManager\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOffRamp.StaticConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"name\":\"isBlessed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"ocrPluginType\",\"type\":\"uint8\"}],\"name\":\"latestConfigDetails\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"F\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"n\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"isSignatureVerificationEnabled\",\"type\":\"bool\"}],\"internalType\":\"structMultiOCR3Base.ConfigInfo\",\"name\":\"configInfo\",\"type\":\"tuple\"},{\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"}],\"internalType\":\"structMultiOCR3Base.OCRConfig\",\"name\":\"ocrConfig\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"}],\"internalType\":\"structInternal.RampMessageHeader\",\"name\":\"header\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"tokenAmounts\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes[]\",\"name\":\"sourceTokenData\",\"type\":\"bytes[]\"}],\"internalType\":\"structInternal.Any2EVMRampMessage[]\",\"name\":\"messages\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes[][]\",\"name\":\"offchainTokenData\",\"type\":\"bytes[][]\"},{\"internalType\":\"bytes32[]\",\"name\":\"proofs\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"proofFlagBits\",\"type\":\"uint256\"}],\"internalType\":\"structInternal.ExecutionReportSingleChain[]\",\"name\":\"reports\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256[][]\",\"name\":\"gasLimitOverrides\",\"type\":\"uint256[][]\"}],\"name\":\"manuallyExecute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"}],\"internalType\":\"structEVM2EVMMultiOffRamp.UnblessedRoot[]\",\"name\":\"rootToReset\",\"type\":\"tuple[]\"}],\"name\":\"resetUnblessedRoots\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"permissionLessExecutionThresholdSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxTokenTransferGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPoolReleaseOrMintGas\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"messageValidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"priceRegistry\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOffRamp.DynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"}],\"name\":\"setDynamicConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"ocrPluginType\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"F\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"isSignatureVerificationEnabled\",\"type\":\"bool\"},{\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"}],\"internalType\":\"structMultiOCR3Base.OCRConfigArgs[]\",\"name\":\"ocrConfigArgs\",\"type\":\"tuple[]\"}],\"name\":\"setOCR3Configs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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: "0x6101206040523480156200001257600080fd5b506040516200694f3803806200694f8339810160408190526200003591620005bd565b33806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf81620001ee565b5050466080525060208201516001600160a01b03161580620000ec575060408201516001600160a01b0316155b8062000103575060608201516001600160a01b0316155b1562000122576040516342bcdf7f60e11b815260040160405180910390fd5b81516001600160401b03166000036200014e5760405163c656089560e01b815260040160405180910390fd5b81516001600160401b0390811660a052602080840180516001600160a01b0390811660c05260408087018051831660e0526060808901805185166101005283518a519098168852945184169587019590955251821690850152905116908201527f683eb52ee924eb817377cfa8f41f238f4bb7a877da5267869dfffbad85f564d89060800160405180910390a1620001e68162000299565b505062000a03565b336001600160a01b03821603620002485760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60005b8151811015620004eb576000828281518110620002bd57620002bd620007cc565b60200260200101519050600081600001519050806001600160401b0316600003620002fb5760405163c656089560e01b815260040160405180910390fd5b6001600160401b03811660009081526007602052604081206001810180549192916200032790620007e2565b80601f01602080910402602001604051908101604052809291908181526020018280546200035590620007e2565b8015620003a65780601f106200037a57610100808354040283529160200191620003a6565b820191906000526020600020905b8154815290600101906020018083116200038857829003601f168201915b50505050509050600084604001519050815160000362000449578051600003620003e3576040516342bcdf7f60e11b815260040160405180910390fd5b60018301620003f3828262000873565b508254610100600160481b0319166101001783556040516001600160401b03851681527ff4c1390c70e5c0f491ae1ccbc06f9117cbbadf2767b247b3bc203280f24c0fb99060200160405180910390a162000484565b8080519060200120828051906020012014620004845760405163c39a620560e01b81526001600160401b038516600482015260240162000083565b6020850151835460ff19169015151783556040516001600160401b038516907f4f49973170c548fddd4a48341b75e131818913f38f44d47af57e8735eee588ba90620004d29086906200093f565b60405180910390a250505050508060010190506200029c565b5050565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b03811182821017156200052a576200052a620004ef565b60405290565b604051606081016001600160401b03811182821017156200052a576200052a620004ef565b604051601f8201601f191681016001600160401b0381118282101715620005805762000580620004ef565b604052919050565b80516001600160401b0381168114620005a057600080fd5b919050565b80516001600160a01b0381168114620005a057600080fd5b60008082840360a0811215620005d257600080fd5b6080811215620005e157600080fd5b50620005ec62000505565b620005f78462000588565b8152602062000608818601620005a5565b818301526200061a60408601620005a5565b60408301526200062d60608601620005a5565b606083015260808501519193506001600160401b03808311156200065057600080fd5b828601925086601f8401126200066557600080fd5b8251818111156200067a576200067a620004ef565b8060051b6200068b84820162000555565b918252848101840191848101908a841115620006a657600080fd5b85870192505b83831015620007bb57825185811115620006c557600080fd5b8701601f196060828e0382011215620006dd57600080fd5b620006e762000530565b620006f489840162000588565b8152604083015180151581146200070a57600080fd5b818a01526060830151888111156200072157600080fd5b8084019350508d603f8401126200073757600080fd5b88830151888111156200074e576200074e620004ef565b620007608a84601f8401160162000555565b92508083528e60408286010111156200077857600080fd5b60005b818110156200079957848101604001518482018c01528a016200077b565b5060009083018a015260408101919091528352509185019190850190620006ac565b809750505050505050509250929050565b634e487b7160e01b600052603260045260246000fd5b600181811c90821680620007f757607f821691505b6020821081036200081857634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200086e576000816000526020600020601f850160051c81016020861015620008495750805b601f850160051c820191505b818110156200086a5782815560010162000855565b5050505b505050565b81516001600160401b038111156200088f576200088f620004ef565b620008a781620008a08454620007e2565b846200081e565b602080601f831160018114620008df5760008415620008c65750858301515b600019600386901b1c1916600185901b1785556200086a565b600085815260208120601f198616915b828110156200091057888601518255948401946001909101908401620008ef565b50858210156200092f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6020808252825460ff811615158383015260081c6001600160401b031660408301526060808301526001808401805460009392919084906200098181620007e2565b80608089015260a06001831660008114620009a55760018114620009c257620009f4565b60ff19841660a08b015260a083151560051b8b01019450620009f4565b85600052602060002060005b84811015620009eb5781548c8201850152908801908901620009ce565b8b0160a0019550505b50929998505050505050505050565b60805160a05160c05160e05161010051615edd62000a726000396000818161023e0152612be101526000818161020f0152612ecb0152600081816101e0015281816115ca01526116810152600081816101b00152612755015260008181611fb901526120050152615edd6000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806385572ffb116100d8578063ccd37ba31161008c578063f2fde38b11610066578063f2fde38b146105b1578063f716f99f146105c4578063ff888fb1146105d757600080fd5b8063ccd37ba314610539578063d2a15d351461057e578063e9d68a8e1461059157600080fd5b8063a12a9870116100bd578063a12a9870146104f3578063bec0b14314610506578063c673e5841461051957600080fd5b806385572ffb146104ca5780638da5cb5b146104d857600080fd5b8063403b2d631161012f5780635ffb5ced116101145780635ffb5ced146103855780637437ff9f1461039857806379ba5097146104c257600080fd5b8063403b2d63146103525780635e36480c1461036557600080fd5b80632d04ab76116101605780632d04ab761461030e578063311cd513146103235780633f4b04aa1461033657600080fd5b806306285c691461017c578063181f5a77146102c5575b600080fd5b61026e60408051608081018252600080825260208201819052918101829052606081019190915260405180608001604052807f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff1681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316815250905090565b6040516102bc9190815167ffffffffffffffff1681526020808301516001600160a01b0390811691830191909152604080840151821690830152606092830151169181019190915260800190565b60405180910390f35b6103016040518060400160405280601d81526020017f45564d3245564d4d756c74694f666652616d7020312e362e302d64657600000081525081565b6040516102bc9190613f11565b61032161031c366004613fbc565b6105fa565b005b61032161033136600461406f565b6109c0565b600a5460405167ffffffffffffffff90911681526020016102bc565b6103216103603660046141f8565b610a29565b610378610373366004614297565b610bfb565b6040516102bc91906142f4565b610321610393366004614600565b610c51565b6104596040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a0810191909152506040805160c0810182526004546001600160a01b03808216835263ffffffff7401000000000000000000000000000000000000000083048116602085015278010000000000000000000000000000000000000000000000008304811694840194909452600160e01b90910490921660608201526005548216608082015260065490911660a082015290565b6040516102bc9190600060c0820190506001600160a01b03808451168352602084015163ffffffff808216602086015280604087015116604086015280606087015116606086015250508060808501511660808401528060a08501511660a08401525092915050565b610321610fa9565b610321610177366004614664565b6000546040516001600160a01b0390911681526020016102bc565b6103216105013660046146b8565b611067565b610321610514366004614a46565b61107b565b61052c610527366004614b82565b611220565b6040516102bc9190614be2565b610570610547366004614c57565b67ffffffffffffffff919091166000908152600960209081526040808320938352929052205490565b6040519081526020016102bc565b61032161058c366004614c81565b61137e565b6105a461059f366004614cf6565b611438565b6040516102bc9190614d11565b6103216105bf366004614d4c565b611521565b6103216105d2366004614dd1565b611532565b6105ea6105e5366004614f0f565b611574565b60405190151581526020016102bc565b600061060887890189615098565b8051515190915015158061062157508051602001515115155b1561072157600a5460208a01359067ffffffffffffffff808316911610156106e057600a805467ffffffffffffffff191667ffffffffffffffff831617905560065482516040517f3937306f0000000000000000000000000000000000000000000000000000000081526001600160a01b0390921691633937306f916106a9916004016152d6565b600060405180830381600087803b1580156106c357600080fd5b505af11580156106d7573d6000803e3d6000fd5b5050505061071f565b81602001515160000361071f576040517f2261116700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b60005b8160200151518110156109095760008260200151828151811061074957610749615203565b6020026020010151905060008160000151905061076581611635565b600061077082611737565b602084015151815491925067ffffffffffffffff908116610100909204161415806107b2575060208084015190810151905167ffffffffffffffff9182169116115b156107fb57825160208401516040517feefb0cac0000000000000000000000000000000000000000000000000000000081526107f29291906004016152e9565b60405180910390fd5b604083015180610837576040517f504570e300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b835167ffffffffffffffff166000908152600960209081526040808320848452909152902054156108aa5783516040517f32cf0cbf00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff9091166004820152602481018290526044016107f2565b60208085015101516108bd906001615334565b825468ffffffffffffffff00191661010067ffffffffffffffff928316021790925592511660009081526009602090815260408083209483529390529190912042905550600101610724565b507f3a3950e13dd607cc37980db0ef14266c40d2bba9c01b2e44bfe549808883095d81604051610939919061535c565b60405180910390a16109b560008a8a8a8a8a8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808e0282810182019093528d82529093508d92508c9182918501908490808284376000920191909152508b9250611797915050565b505050505050505050565b610a006109cf828401846153f9565b60408051600080825260208201909252906109fa565b60608152602001906001900390816109e55790505b50611b0e565b604080516000808252602082019092529050610a23600185858585866000611797565b50505050565b610a31611bbe565b60a08101516001600160a01b03161580610a53575080516001600160a01b0316155b15610a8a576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516004805460208085018051604080880180516060808b0180516001600160a01b039b8c167fffffffffffffffff000000000000000000000000000000000000000000000000909a168a177401000000000000000000000000000000000000000063ffffffff988916021777ffffffffffffffffffffffffffffffffffffffffffffffff167801000000000000000000000000000000000000000000000000948816949094026001600160e01b031693909317600160e01b93871693909302929092179098556080808b0180516005805473ffffffffffffffffffffffffffffffffffffffff19908116928e1692909217905560a0808e01805160068054909416908f161790925586519a8b5297518716988a0198909852925185169388019390935251909216958501959095525185169383019390935251909216908201527f0da37fd00459f4f5f0b8210d31525e4910ae674b8bab34b561d146bb45773a4c9060c00160405180910390a150565b6000610c096001600461542e565b6002610c16608085615457565b67ffffffffffffffff16610c2a919061547e565b610c348585611c1a565b901c166003811115610c4857610c486142ca565b90505b92915050565b333014610c8a576040517f371a732800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160008082526020820190925281610cc7565b6040805180820190915260008082526020820152815260200190600190039081610ca05790505b5060a08401515190915015610cff57610cfc8360a00151846020015185606001518660000151602001518760c0015187611c61565b90505b6040805160a0810182528451518152845160209081015167ffffffffffffffff1681830152808601518351600094840192610d3b929101613f11565b60408051601f19818403018152918152908252868101516020830152018390526005549091506001600160a01b03168015610e48576040517f08d450a10000000000000000000000000000000000000000000000000000000081526001600160a01b038216906308d450a190610db5908590600401615543565b600060405180830381600087803b158015610dcf57600080fd5b505af1925050508015610de0575060015b610e48573d808015610e0e576040519150601f19603f3d011682016040523d82523d6000602084013e610e13565b606091505b50806040517f09c253250000000000000000000000000000000000000000000000000000000081526004016107f29190613f11565b604085015151158015610e5d57506080850151155b80610e74575060608501516001600160a01b03163b155b80610eb457506060850151610eb2906001600160a01b03167f85572ffb00000000000000000000000000000000000000000000000000000000611d0e565b155b15610ec0575050505050565b60048054608087015160608801516040517f3cf9798300000000000000000000000000000000000000000000000000000000815260009485946001600160a01b031693633cf9798393610f1b938a9361138893929101615556565b6000604051808303816000875af1158015610f3a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f6291908101906155d7565b509150915081610fa057806040517f0a8d6e8c0000000000000000000000000000000000000000000000000000000081526004016107f29190613f11565b50505050505050565b6001546001600160a01b031633146110035760405162461bcd60e51b815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016107f2565b600080543373ffffffffffffffffffffffffffffffffffffffff19808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b61106f611bbe565b61107881611d2a565b50565b611083611fb6565b8151815181146110bf576040517f83e3f56400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156112105760008482815181106110de576110de615203565b6020026020010151905060008160200151519050600085848151811061110657611106615203565b602002602001015190508051821461114a576040517f83e3f56400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8281101561120157600082828151811061116957611169615203565b60200260200101519050806000141580156111a457508460200151828151811061119557611195615203565b60200260200101516080015181105b156111f85784516040517fc8e9605100000000000000000000000000000000000000000000000000000000815267ffffffffffffffff909116600482015260248101839052604481018290526064016107f2565b5060010161114d565b505050508060010190506110c2565b5061121b8383611b0e565b505050565b6112636040805160e081019091526000606082018181526080830182905260a0830182905260c08301919091528190815260200160608152602001606081525090565b60ff808316600090815260026020818152604092839020835160e081018552815460608201908152600183015480881660808401526101008104881660a0840152620100009004909616151560c08201529485529182018054845181840281018401909552808552929385830193909283018282801561130c57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116112ee575b505050505081526020016003820180548060200260200160405190810160405280929190818152602001828054801561136e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611350575b5050505050815250509050919050565b611386611bbe565b60005b8181101561121b5760008383838181106113a5576113a5615203565b9050604002018036038101906113bb9190615631565b90506113ca8160200151611574565b61142f57805167ffffffffffffffff1660009081526009602090815260408083208285018051855290835281842093909355915191519182527f202f1139a3e334b6056064c0e9b19fd07e44a88d8f6e5ded571b24cf8c371f12910160405180910390a15b50600101611389565b60408051606080820183526000808352602080840182905283850183905267ffffffffffffffff8681168352600782529185902085519384018652805460ff8116151585526101009004909216908301526001810180549394929391928401916114a19061566a565b80601f01602080910402602001604051908101604052809291908181526020018280546114cd9061566a565b801561136e5780601f106114ef5761010080835404028352916020019161136e565b820191906000526020600020905b8154815290600101906020018083116114fd57505050919092525091949350505050565b611529611bbe565b61107881612037565b61153a611bbe565b60005b81518110156115705761156882828151811061155b5761155b615203565b60200260200101516120ed565b60010161153d565b5050565b6040805180820182523081526020810183815291517f4d61677100000000000000000000000000000000000000000000000000000000815290516001600160a01b039081166004830152915160248201526000917f00000000000000000000000000000000000000000000000000000000000000001690634d61677190604401602060405180830381865afa158015611611573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4b91906156a4565b6040517f2cbc26bb000000000000000000000000000000000000000000000000000000008152608082901b77ffffffffffffffff000000000000000000000000000000001660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632cbc26bb90602401602060405180830381865afa1580156116d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f491906156a4565b15611078576040517ffdbd6a7200000000000000000000000000000000000000000000000000000000815267ffffffffffffffff821660048201526024016107f2565b67ffffffffffffffff81166000908152600760205260408120805460ff16610c4b576040517fed053c5900000000000000000000000000000000000000000000000000000000815267ffffffffffffffff841660048201526024016107f2565b60ff878116600090815260026020908152604080832081516080810183528154815260019091015480861693820193909352610100830485169181019190915262010000909104909216151560608301528735906117f68760a46156c1565b905082606001511561183e57845161180f90602061547e565b865161181c90602061547e565b6118279060a06156c1565b61183191906156c1565b61183b90826156c1565b90505b368114611880576040517f8e1192e1000000000000000000000000000000000000000000000000000000008152600481018290523660248201526044016107f2565b50815181146118c85781516040517f93df584c0000000000000000000000000000000000000000000000000000000081526004810191909152602481018290526044016107f2565b6118d0611fb6565b60ff808a166000908152600360209081526040808320338452825280832081518083019092528054808616835293949193909284019161010090910416600281111561191e5761191e6142ca565b600281111561192f5761192f6142ca565b905250905060028160200151600281111561194c5761194c6142ca565b1480156119a05750600260008b60ff1660ff168152602001908152602001600020600301816000015160ff168154811061198857611988615203565b6000918252602090912001546001600160a01b031633145b6119d6576040517fda0f08e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50816060015115611ab85760208201516119f19060016156d4565b60ff16855114611a2d576040517f71253a2500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8351855114611a68576040517fa75d88af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008787604051611a7a9291906156ed565b604051908190038120611a91918b906020016156fd565b604051602081830303815290604052805190602001209050611ab68a82888888612431565b505b6040805182815260208a81013567ffffffffffffffff169082015260ff8b16917f198d6990ef96613a9026203077e422916918b03ff47f0be6bee7b02d8e139ef0910160405180910390a2505050505050505050565b8151600003611b48576040517ebf199700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805160408051600080825260208201909252911591905b8451811015611bb757611baf858281518110611b7d57611b7d615203565b602002602001015184611ba957858381518110611b9c57611b9c615203565b6020026020010151612648565b83612648565b600101611b5f565b5050505050565b6000546001600160a01b03163314611c185760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016107f2565b565b67ffffffffffffffff8216600090815260086020526040812081611c3f608085615711565b67ffffffffffffffff1681526020810191909152604001600020549392505050565b8560005b8751811015611d0357611cde888281518110611c8357611c83615203565b602002602001015160200151888888888681518110611ca457611ca4615203565b6020026020010151806020019051810190611cbf9190615738565b888781518110611cd157611cd1615203565b6020026020010151612e6a565b828281518110611cf057611cf0615203565b6020908102919091010152600101611c65565b509695505050505050565b6000611d19836131f8565b8015610c485750610c488383613244565b60005b8151811015611570576000828281518110611d4a57611d4a615203565b602002602001015190506000816000015190508067ffffffffffffffff16600003611da1576040517fc656089500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff81166000908152600760205260408120600181018054919291611dcc9061566a565b80601f0160208091040260200160405190810160405280929190818152602001828054611df89061566a565b8015611e455780601f10611e1a57610100808354040283529160200191611e45565b820191906000526020600020905b815481529060010190602001808311611e2857829003601f168201915b505050505090506000846040015190508151600003611efe578051600003611e99576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018301611ea78282615835565b50825468ffffffffffffffff00191661010017835560405167ffffffffffffffff851681527ff4c1390c70e5c0f491ae1ccbc06f9117cbbadf2767b247b3bc203280f24c0fb99060200160405180910390a1611f51565b8080519060200120828051906020012014611f51576040517fc39a620500000000000000000000000000000000000000000000000000000000815267ffffffffffffffff851660048201526024016107f2565b6020850151835460ff191690151517835560405167ffffffffffffffff8516907f4f49973170c548fddd4a48341b75e131818913f38f44d47af57e8735eee588ba90611f9e9086906158f5565b60405180910390a25050505050806001019050611d2d565b467f000000000000000000000000000000000000000000000000000000000000000014611c18576040517f0f01ce850000000000000000000000000000000000000000000000000000000081527f000000000000000000000000000000000000000000000000000000000000000060048201524660248201526044016107f2565b336001600160a01b0382160361208f5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016107f2565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b806040015160ff16600003612118576000604051631b3fab5160e11b81526004016107f291906159b1565b60208082015160ff8082166000908152600290935260408320600181015492939092839216900361218557606084015160018201805491151562010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff9092169190911790556121da565b6060840151600182015460ff62010000909104161515901515146121da576040517f87f6037c00000000000000000000000000000000000000000000000000000000815260ff841660048201526024016107f2565b60a08401518051601f60ff82161115612209576001604051631b3fab5160e11b81526004016107f291906159b1565b61226f858560030180548060200260200160405190810160405280929190818152602001828054801561226557602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612247575b50505050506132e6565b85606001511561239e576122dd8585600201805480602002602001604051908101604052809291908181526020018280548015612265576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116122475750505050506132e6565b608086015180516122f79060028701906020840190613e1f565b5080516001850180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010060ff841690810291909117909155601f1015612357576002604051631b3fab5160e11b81526004016107f291906159b1565b60408801516123679060036159cb565b60ff168160ff161161238f576003604051631b3fab5160e11b81526004016107f291906159b1565b61239b8783600161334f565b50505b6123aa8583600261334f565b81516123bf9060038601906020850190613e1f565b5060408681015160018501805460ff191660ff8316179055875180865560a089015192517fab8b1b57514019638d7b5ce9c638fe71366fe8e2be1c40a7a80f1733d0e9f54793612418938a939260028b019291906159e7565b60405180910390a1612429856134cf565b505050505050565b612439613e8d565b835160005b8181101561263e57600060018886846020811061245d5761245d615203565b61246a91901a601b6156d4565b89858151811061247c5761247c615203565b602002602001015189868151811061249657612496615203565b6020026020010151604051600081526020016040526040516124d4949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa1580156124f6573d6000803e3d6000fd5b505060408051601f1981015160ff808e166000908152600360209081528582206001600160a01b03851683528152858220858701909652855480841686529397509095509293928401916101009004166002811115612557576125576142ca565b6002811115612568576125686142ca565b9052509050600181602001516002811115612585576125856142ca565b146125bc576040517fca31867a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8051859060ff16601f81106125d3576125d3615203565b60200201511561260f576040517ff67bc7c400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600185826000015160ff16601f811061262a5761262a615203565b91151560209092020152505060010161243e565b5050505050505050565b815161265381611635565b600061265e82611737565b60208501515190915060008190036126a1576040517ebf199700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84604001515181146126df576040517f57e0e08300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008167ffffffffffffffff8111156126fa576126fa6140c3565b604051908082528060200260200182016040528015612723578160200160208202803683370190505b50905060005b828110156128985760008760200151828151811061274957612749615203565b602002602001015190507f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff1681600001516040015167ffffffffffffffff16146127dc57805160409081015190517f38432a2200000000000000000000000000000000000000000000000000000000815267ffffffffffffffff90911660048201526024016107f2565b612872818660010180546127ef9061566a565b80601f016020809104026020016040519081016040528092919081815260200182805461281b9061566a565b80156128685780601f1061283d57610100808354040283529160200191612868565b820191906000526020600020905b81548152906001019060200180831161284b57829003601f168201915b50505050506134eb565b83838151811061288457612884615203565b602090810291909101015250600101612729565b5060006128af858389606001518a6080015161363d565b9050806000036128f7576040517f7dd17a7e00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff861660048201526024016107f2565b8551151560005b848110156109b55760008960200151828151811061291e5761291e615203565b60200260200101519050600061293c89836000015160600151610bfb565b90506002816003811115612952576129526142ca565b036129a9578151606001516040805167ffffffffffffffff808d16825290921660208301527f3b575419319662b2a6f5e2467d84521517a3382b908eb3d557bb3fdb0c50e23c910160405180910390a15050612e62565b60008160038111156129bd576129bd6142ca565b14806129da575060038160038111156129d8576129d86142ca565b145b612a2b578151606001516040517f25507e7f00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff808c16600483015290911660248201526044016107f2565b8315612b0c5760045460009074010000000000000000000000000000000000000000900463ffffffff16612a5f874261542e565b1190508080612a7f57506003826003811115612a7d57612a7d6142ca565b145b612ac1576040517fa9cfc86200000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8b1660048201526024016107f2565b8a8481518110612ad357612ad3615203565b6020026020010151600014612b06578a8481518110612af457612af4615203565b60200260200101518360800181815250505b50612b72565b6000816003811115612b2057612b206142ca565b14612b72578151606001516040517f3ef2a99c00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff808c16600483015290911660248201526044016107f2565b81516080015167ffffffffffffffff1615801590612ba157506000816003811115612b9f57612b9f6142ca565b145b15612c665781516080015160208301516040517fe0e03cae0000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263e0e03cae92612c18928e929190600401615a6d565b6020604051808303816000875af1158015612c37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c5b91906156a4565b612c66575050612e62565b60008b604001518481518110612c7e57612c7e615203565b6020026020010151905080518360a001515114612ce2578251606001516040517f1cfe6d8b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff808d16600483015290911660248201526044016107f2565b612cf68a8460000151606001516001613693565b600080612d03858461373b565b91509150612d1a8c86600001516060015184613693565b868015612d3857506003826003811115612d3657612d366142ca565b145b8015612d5657506000846003811115612d5357612d536142ca565b14155b15612d93578451516040517f2b11b8d90000000000000000000000000000000000000000000000000000000081526107f291908390600401615a9a565b6003826003811115612da757612da76142ca565b14158015612dc757506002826003811115612dc457612dc46142ca565b14155b15612e08578451606001516040517f926c5a3e0000000000000000000000000000000000000000000000000000000081526107f2918e918590600401615ab3565b8451805160609091015160405167ffffffffffffffff918216918f16907f8c324ce1367b83031769f6a813e3bb4c117aba2185789d66b98b791405be6df290612e549087908790615ad9565b60405180910390a450505050505b6001016128fe565b60408051808201909152600080825260208201526000612e8d8460200151613983565b6040517fbbe4f6db0000000000000000000000000000000000000000000000000000000081526001600160a01b0380831660048301529192506000917f0000000000000000000000000000000000000000000000000000000000000000169063bbe4f6db90602401602060405180830381865afa158015612f12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f369190615af9565b90506001600160a01b0381161580612f7e5750612f7c6001600160a01b0382167faff2afbf00000000000000000000000000000000000000000000000000000000611d0e565b155b15612fc0576040517fae9b4ce90000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016107f2565b60008061308b633907753760e01b6040518061010001604052808d81526020018b67ffffffffffffffff1681526020018c6001600160a01b031681526020018e8152602001876001600160a01b031681526020018a6000015181526020018a6040015181526020018981525060405160240161303c9190615b16565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152600454859063ffffffff600160e01b9091041661138860846139c5565b5091509150816130b0578060405163e1cd550960e01b81526004016107f29190613f11565b80516020146130f85780516040517f78ef80240000000000000000000000000000000000000000000000000000000081526020600482015260248101919091526044016107f2565b60008180602001905181019061310e9190615bed565b604080516001600160a01b038d16602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167fa9059cbb000000000000000000000000000000000000000000000000000000001790526004549192506131a69187907801000000000000000000000000000000000000000000000000900463ffffffff1661138860846139c5565b509093509150826131cc578160405163e1cd550960e01b81526004016107f29190613f11565b604080518082019091526001600160a01b03909516855260208501525091925050509695505050505050565b6000613224827f01ffc9a700000000000000000000000000000000000000000000000000000000613244565b8015610c4b575061323d826001600160e01b0319613244565b1592915050565b604080516001600160e01b03198316602480830191909152825180830390910181526044909101909152602080820180516001600160e01b03167f01ffc9a700000000000000000000000000000000000000000000000000000000178152825160009392849283928392918391908a617530fa92503d915060005190508280156132cf575060208210155b80156132db5750600081115b979650505050505050565b60005b815181101561121b5760ff83166000908152600360205260408120835190919084908490811061331b5761331b615203565b6020908102919091018101516001600160a01b03168252810191909152604001600020805461ffff191690556001016132e9565b60005b82518160ff161015610a23576000838260ff168151811061337557613375615203565b6020026020010151905060006002811115613392576133926142ca565b60ff80871660009081526003602090815260408083206001600160a01b038716845290915290205461010090041660028111156133d1576133d16142ca565b146133f2576004604051631b3fab5160e11b81526004016107f291906159b1565b6001600160a01b038116613432576040517fd6c62c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60405180604001604052808360ff168152602001846002811115613458576134586142ca565b905260ff80871660009081526003602090815260408083206001600160a01b0387168452825290912083518154931660ff198416811782559184015190929091839161ffff1916176101008360028111156134b5576134b56142ca565b021790555090505050806134c890615c06565b9050613352565b60ff811661107857600a805467ffffffffffffffff1916905550565b815160208082015160409283015192516000938493613531937f2425b0b9f9054c76ff151b0a175b18f37a4a4e82013a72e9f15c9caa095ed21f93909291889101615c25565b60408051601f1981840301815290829052805160209182012086518051888401516060808b0151908401516080808d0151950151959761357a9794969395929491939101615c58565b604051602081830303815290604052805190602001208560400151805190602001208660a001516040516020016135b19190615cab565b604051602081830303815290604052805190602001208760c001516040516020016135dc9190615d60565b60408051601f198184030181528282528051602091820120908301979097528101949094526060840192909252608083015260a082015260c081019190915260e0015b60405160208183030381529060405280519060200120905092915050565b60008061364b858585613aeb565b905061365681611574565b61366457600091505061368b565b67ffffffffffffffff86166000908152600960209081526040808320938352929052205490505b949350505050565b600060026136a2608085615457565b67ffffffffffffffff166136b6919061547e565b905060006136c48585611c1a565b9050816136d36001600461542e565b901b1916818360038111156136ea576136ea6142ca565b67ffffffffffffffff871660009081526008602052604081209190921b92909217918291613719608088615711565b67ffffffffffffffff1681526020810191909152604001600020555050505050565b6040517f5ffb5ced0000000000000000000000000000000000000000000000000000000081526000906060903090635ffb5ced9061377f9087908790600401615d73565b600060405180830381600087803b15801561379957600080fd5b505af19250505080156137aa575060015b613967573d8080156137d8576040519150601f19603f3d011682016040523d82523d6000602084013e6137dd565b606091505b5060006137e982615e98565b90507f0a8d6e8c000000000000000000000000000000000000000000000000000000006001600160e01b031982161480613833575063e1cd550960e01b6001600160e01b03198216145b8061384e575063046b337b60e51b6001600160e01b03198216145b8061388257507f78ef8024000000000000000000000000000000000000000000000000000000006001600160e01b03198216145b806138b657507f0c3b563c000000000000000000000000000000000000000000000000000000006001600160e01b03198216145b806138ea57507fae9b4ce9000000000000000000000000000000000000000000000000000000006001600160e01b03198216145b8061391e57507f09c25325000000000000000000000000000000000000000000000000000000006001600160e01b03198216145b1561392f575060039250905061397c565b8551516040517f2b11b8d90000000000000000000000000000000000000000000000000000000081526107f291908490600401615a9a565b50506040805160208101909152600081526002905b9250929050565b600081516020146139a9578160405163046b337b60e51b81526004016107f29190613f11565b610c4b828060200190518101906139c09190615bed565b613d8a565b6000606060008361ffff1667ffffffffffffffff8111156139e8576139e86140c3565b6040519080825280601f01601f191660200182016040528015613a12576020820181803683370190505b509150863b613a45577f0c3b563c0000000000000000000000000000000000000000000000000000000060005260046000fd5b5a85811015613a78577fafa32a2c0000000000000000000000000000000000000000000000000000000060005260046000fd5b8590036040810481038710613ab1577f37c3be290000000000000000000000000000000000000000000000000000000060005260046000fd5b505a6000808a5160208c0160008c8cf193505a900390503d84811115613ad45750835b808352806000602085013e50955095509592505050565b8251825160009190818303613b2c576040517f11a6b26400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6101018211801590613b4057506101018111155b613b5d576040516309bde33960e01b815260040160405180910390fd5b60001982820101610100811115613b87576040516309bde33960e01b815260040160405180910390fd5b80600003613bb45786600081518110613ba257613ba2615203565b60200260200101519350505050613d83565b60008167ffffffffffffffff811115613bcf57613bcf6140c3565b604051908082528060200260200182016040528015613bf8578160200160208202803683370190505b50905060008080805b85811015613d225760006001821b8b811603613c5c5788851015613c45578c5160018601958e918110613c3657613c36615203565b60200260200101519050613c7e565b8551600185019487918110613c3657613c36615203565b8b5160018401938d918110613c7357613c73615203565b602002602001015190505b600089861015613cae578d5160018701968f918110613c9f57613c9f615203565b60200260200101519050613cd0565b8651600186019588918110613cc557613cc5615203565b602002602001015190505b82851115613cf1576040516309bde33960e01b815260040160405180910390fd5b613cfb8282613dde565b878481518110613d0d57613d0d615203565b60209081029190910101525050600101613c01565b506001850382148015613d3457508683145b8015613d3f57508581145b613d5c576040516309bde33960e01b815260040160405180910390fd5b836001860381518110613d7157613d71615203565b60200260200101519750505050505050505b9392505050565b60006001600160a01b03821180613da2575061040082105b15613dda5760408051602081018490520160408051601f198184030181529082905263046b337b60e51b82526107f291600401613f11565b5090565b6000818310613df657613df18284613dfc565b610c48565b610c4883835b60408051600160208201529081018390526060810182905260009060800161361f565b828054828255906000526020600020908101928215613e81579160200282015b82811115613e81578251825473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909116178255602090920191600190910190613e3f565b50613dda929150613eac565b604051806103e00160405280601f906020820280368337509192915050565b5b80821115613dda5760008155600101613ead565b60005b83811015613edc578181015183820152602001613ec4565b50506000910152565b60008151808452613efd816020860160208601613ec1565b601f01601f19169290920160200192915050565b602081526000610c486020830184613ee5565b8060608101831015610c4b57600080fd5b60008083601f840112613f4757600080fd5b50813567ffffffffffffffff811115613f5f57600080fd5b60208301915083602082850101111561397c57600080fd5b60008083601f840112613f8957600080fd5b50813567ffffffffffffffff811115613fa157600080fd5b6020830191508360208260051b850101111561397c57600080fd5b60008060008060008060008060e0898b031215613fd857600080fd5b613fe28a8a613f24565b9750606089013567ffffffffffffffff80821115613fff57600080fd5b61400b8c838d01613f35565b909950975060808b013591508082111561402457600080fd5b6140308c838d01613f77565b909750955060a08b013591508082111561404957600080fd5b506140568b828c01613f77565b999c989b50969995989497949560c00135949350505050565b60008060006080848603121561408457600080fd5b61408e8585613f24565b9250606084013567ffffffffffffffff8111156140aa57600080fd5b6140b686828701613f35565b9497909650939450505050565b634e487b7160e01b600052604160045260246000fd5b60405160c0810167ffffffffffffffff811182821017156140fc576140fc6140c3565b60405290565b60405160a0810167ffffffffffffffff811182821017156140fc576140fc6140c3565b6040805190810167ffffffffffffffff811182821017156140fc576140fc6140c3565b60405160e0810167ffffffffffffffff811182821017156140fc576140fc6140c3565b6040516060810167ffffffffffffffff811182821017156140fc576140fc6140c3565b604051601f8201601f1916810167ffffffffffffffff811182821017156141b7576141b76140c3565b604052919050565b6001600160a01b038116811461107857600080fd5b80356141df816141bf565b919050565b803563ffffffff811681146141df57600080fd5b600060c0828403121561420a57600080fd5b6142126140d9565b823561421d816141bf565b815261422b602084016141e4565b602082015261423c604084016141e4565b604082015261424d606084016141e4565b60608201526080830135614260816141bf565b608082015260a0830135614273816141bf565b60a08201529392505050565b803567ffffffffffffffff811681146141df57600080fd5b600080604083850312156142aa57600080fd5b6142b38361427f565b91506142c16020840161427f565b90509250929050565b634e487b7160e01b600052602160045260246000fd5b600481106142f0576142f06142ca565b9052565b60208101610c4b82846142e0565b600060a0828403121561431457600080fd5b61431c614102565b90508135815261432e6020830161427f565b602082015261433f6040830161427f565b60408201526143506060830161427f565b60608201526143616080830161427f565b608082015292915050565b600067ffffffffffffffff821115614386576143866140c3565b50601f01601f191660200190565b600082601f8301126143a557600080fd5b81356143b86143b38261436c565b61418e565b8181528460208386010111156143cd57600080fd5b816020850160208301376000918101602001919091529392505050565b600067ffffffffffffffff821115614404576144046140c3565b5060051b60200190565b600082601f83011261441f57600080fd5b8135602061442f6143b3836143ea565b82815260069290921b8401810191818101908684111561444e57600080fd5b8286015b84811015611d03576040818903121561446b5760008081fd5b614473614125565b813561447e816141bf565b81528185013585820152835291830191604001614452565b600082601f8301126144a757600080fd5b813560206144b76143b3836143ea565b82815260059290921b840181019181810190868411156144d657600080fd5b8286015b84811015611d0357803567ffffffffffffffff8111156144fa5760008081fd5b6145088986838b0101614394565b8452509183019183016144da565b6000610160828403121561452957600080fd5b614531614148565b905061453d8383614302565b815260a082013567ffffffffffffffff8082111561455a57600080fd5b61456685838601614394565b602084015260c084013591508082111561457f57600080fd5b61458b85838601614394565b604084015261459c60e085016141d4565b606084015261010084013560808401526101208401359150808211156145c157600080fd5b6145cd8583860161440e565b60a08401526101408401359150808211156145e757600080fd5b506145f484828501614496565b60c08301525092915050565b6000806040838503121561461357600080fd5b823567ffffffffffffffff8082111561462b57600080fd5b61463786838701614516565b9350602085013591508082111561464d57600080fd5b5061465a85828601614496565b9150509250929050565b60006020828403121561467657600080fd5b813567ffffffffffffffff81111561468d57600080fd5b820160a08185031215613d8357600080fd5b801515811461107857600080fd5b80356141df8161469f565b600060208083850312156146cb57600080fd5b823567ffffffffffffffff808211156146e357600080fd5b818501915085601f8301126146f757600080fd5b81356147056143b3826143ea565b81815260059190911b8301840190848101908883111561472457600080fd5b8585015b838110156147b4578035858111156147405760008081fd5b86016060818c03601f19018113156147585760008081fd5b61476061416b565b61476b8a840161427f565b815260408084013561477c8161469f565b828c01529183013591888311156147935760008081fd5b6147a18e8c85870101614394565b9082015285525050918601918601614728565b5098975050505050505050565b600082601f8301126147d257600080fd5b813560206147e26143b3836143ea565b82815260059290921b8401810191818101908684111561480157600080fd5b8286015b84811015611d0357803567ffffffffffffffff8111156148255760008081fd5b6148338986838b0101614516565b845250918301918301614805565b600082601f83011261485257600080fd5b813560206148626143b3836143ea565b82815260059290921b8401810191818101908684111561488157600080fd5b8286015b84811015611d0357803567ffffffffffffffff8111156148a55760008081fd5b6148b38986838b0101614496565b845250918301918301614885565b600082601f8301126148d257600080fd5b813560206148e26143b3836143ea565b8083825260208201915060208460051b87010193508684111561490457600080fd5b602086015b84811015611d035780358352918301918301614909565b600082601f83011261493157600080fd5b813560206149416143b3836143ea565b82815260059290921b8401810191818101908684111561496057600080fd5b8286015b84811015611d0357803567ffffffffffffffff808211156149855760008081fd5b818901915060a080601f19848d030112156149a05760008081fd5b6149a8614102565b6149b388850161427f565b8152604080850135848111156149c95760008081fd5b6149d78e8b838901016147c1565b8a84015250606080860135858111156149f05760008081fd5b6149fe8f8c838a0101614841565b8385015250608091508186013585811115614a195760008081fd5b614a278f8c838a01016148c1565b9184019190915250919093013590830152508352918301918301614964565b6000806040808486031215614a5a57600080fd5b833567ffffffffffffffff80821115614a7257600080fd5b614a7e87838801614920565b9450602091508186013581811115614a9557600080fd5b8601601f81018813614aa657600080fd5b8035614ab46143b3826143ea565b81815260059190911b8201840190848101908a831115614ad357600080fd5b8584015b83811015614b5f57803586811115614aef5760008081fd5b8501603f81018d13614b015760008081fd5b87810135614b116143b3826143ea565b81815260059190911b82018a0190898101908f831115614b315760008081fd5b928b01925b82841015614b4f5783358252928a0192908a0190614b36565b8652505050918601918601614ad7565b50809750505050505050509250929050565b803560ff811681146141df57600080fd5b600060208284031215614b9457600080fd5b610c4882614b71565b60008151808452602080850194506020840160005b83811015614bd75781516001600160a01b031687529582019590820190600101614bb2565b509495945050505050565b60208152600082518051602084015260ff602082015116604084015260ff604082015116606084015260608101511515608084015250602083015160c060a0840152614c3160e0840182614b9d565b90506040840151601f198483030160c0850152614c4e8282614b9d565b95945050505050565b60008060408385031215614c6a57600080fd5b614c738361427f565b946020939093013593505050565b60008060208385031215614c9457600080fd5b823567ffffffffffffffff80821115614cac57600080fd5b818501915085601f830112614cc057600080fd5b813581811115614ccf57600080fd5b8660208260061b8501011115614ce457600080fd5b60209290920196919550909350505050565b600060208284031215614d0857600080fd5b610c488261427f565b6020815281511515602082015267ffffffffffffffff60208301511660408201526000604083015160608084015261368b6080840182613ee5565b600060208284031215614d5e57600080fd5b8135613d83816141bf565b600082601f830112614d7a57600080fd5b81356020614d8a6143b3836143ea565b8083825260208201915060208460051b870101935086841115614dac57600080fd5b602086015b84811015611d03578035614dc4816141bf565b8352918301918301614db1565b60006020808385031215614de457600080fd5b823567ffffffffffffffff80821115614dfc57600080fd5b818501915085601f830112614e1057600080fd5b8135614e1e6143b3826143ea565b81815260059190911b83018401908481019088831115614e3d57600080fd5b8585015b838110156147b457803585811115614e5857600080fd5b860160c0818c03601f19011215614e6f5760008081fd5b614e776140d9565b8882013581526040614e8a818401614b71565b8a8301526060614e9b818501614b71565b8284015260809150614eae8285016146ad565b9083015260a08381013589811115614ec65760008081fd5b614ed48f8d83880101614d69565b838501525060c0840135915088821115614eee5760008081fd5b614efc8e8c84870101614d69565b9083015250845250918601918601614e41565b600060208284031215614f2157600080fd5b5035919050565b80356001600160e01b03811681146141df57600080fd5b600082601f830112614f5057600080fd5b81356020614f606143b3836143ea565b82815260069290921b84018101918181019086841115614f7f57600080fd5b8286015b84811015611d035760408189031215614f9c5760008081fd5b614fa4614125565b614fad8261427f565b8152614fba858301614f28565b81860152835291830191604001614f83565b600082601f830112614fdd57600080fd5b81356020614fed6143b3836143ea565b82815260079290921b8401810191818101908684111561500c57600080fd5b8286015b84811015611d0357808803608081121561502a5760008081fd5b61503261416b565b61503b8361427f565b8152604080601f19840112156150515760008081fd5b615059614125565b925061506687850161427f565b835261507381850161427f565b8388015281870192909252606083013591810191909152835291830191608001615010565b600060208083850312156150ab57600080fd5b823567ffffffffffffffff808211156150c357600080fd5b818501915060408083880312156150d957600080fd5b6150e1614125565b8335838111156150f057600080fd5b84016040818a03121561510257600080fd5b61510a614125565b81358581111561511957600080fd5b8201601f81018b1361512a57600080fd5b80356151386143b3826143ea565b81815260069190911b8201890190898101908d83111561515757600080fd5b928a01925b828410156151a75787848f0312156151745760008081fd5b61517c614125565b8435615187816141bf565b8152615194858d01614f28565b818d0152825292870192908a019061515c565b8452505050818701359350848411156151bf57600080fd5b6151cb8a858401614f3f565b81880152825250838501359150828211156151e557600080fd5b6151f188838601614fcc565b85820152809550505050505092915050565b634e487b7160e01b600052603260045260246000fd5b805160408084528151848201819052600092602091908201906060870190855b8181101561527057835180516001600160a01b031684528501516001600160e01b0316858401529284019291850191600101615239565b50508583015187820388850152805180835290840192506000918401905b808310156152ca578351805167ffffffffffffffff1683528501516001600160e01b03168583015292840192600192909201919085019061528e565b50979650505050505050565b602081526000610c486020830184615219565b67ffffffffffffffff8316815260608101613d836020830184805167ffffffffffffffff908116835260209182015116910152565b634e487b7160e01b600052601160045260246000fd5b67ffffffffffffffff8181168382160190808211156153555761535561531e565b5092915050565b60006020808352606084516040808487015261537b6060870183615219565b87850151878203601f19016040890152805180835290860193506000918601905b808310156147b457845167ffffffffffffffff8151168352878101516153db89850182805167ffffffffffffffff908116835260209182015116910152565b5084015182870152938601936001929092019160809091019061539c565b60006020828403121561540b57600080fd5b813567ffffffffffffffff81111561542257600080fd5b61368b84828501614920565b81810381811115610c4b57610c4b61531e565b634e487b7160e01b600052601260045260246000fd5b600067ffffffffffffffff8084168061547257615472615441565b92169190910692915050565b8082028115828204841417610c4b57610c4b61531e565b60008151808452602080850194506020840160005b83811015614bd757815180516001600160a01b0316885260209081015190880152604087019650908201906001016154aa565b8051825267ffffffffffffffff60208201511660208301526000604082015160a0604085015261551060a0850182613ee5565b9050606083015184820360608601526155298282613ee5565b91505060808301518482036080860152614c4e8282615495565b602081526000610c4860208301846154dd565b60808152600061556960808301876154dd565b61ffff9590951660208301525060408101929092526001600160a01b0316606090910152919050565b600082601f8301126155a357600080fd5b81516155b16143b38261436c565b8181528460208386010111156155c657600080fd5b61368b826020830160208701613ec1565b6000806000606084860312156155ec57600080fd5b83516155f78161469f565b602085015190935067ffffffffffffffff81111561561457600080fd5b61562086828701615592565b925050604084015190509250925092565b60006040828403121561564357600080fd5b61564b614125565b6156548361427f565b8152602083013560208201528091505092915050565b600181811c9082168061567e57607f821691505b60208210810361569e57634e487b7160e01b600052602260045260246000fd5b50919050565b6000602082840312156156b657600080fd5b8151613d838161469f565b80820180821115610c4b57610c4b61531e565b60ff8181168382160190811115610c4b57610c4b61531e565b8183823760009101908152919050565b828152606082602083013760800192915050565b600067ffffffffffffffff8084168061572c5761572c615441565b92169190910492915050565b60006020828403121561574a57600080fd5b815167ffffffffffffffff8082111561576257600080fd5b908301906060828603121561577657600080fd5b61577e61416b565b82518281111561578d57600080fd5b61579987828601615592565b8252506020830151828111156157ae57600080fd5b6157ba87828601615592565b6020830152506040830151828111156157d257600080fd5b6157de87828601615592565b60408301525095945050505050565b601f82111561121b576000816000526020600020601f850160051c810160208610156158165750805b601f850160051c820191505b8181101561242957828155600101615822565b815167ffffffffffffffff81111561584f5761584f6140c3565b6158638161585d845461566a565b846157ed565b602080601f83116001811461589857600084156158805750858301515b600019600386901b1c1916600185901b178555612429565b600085815260208120601f198616915b828110156158c7578886015182559484019460019091019084016158a8565b50858210156158e55787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006020808352835460ff81161515602085015267ffffffffffffffff8160081c166040850152506001808501606080860152600081546159358161566a565b80608089015260a060018316600081146159565760018114615972576159a2565b60ff19841660a08b015260a083151560051b8b010194506159a2565b85600052602060002060005b848110156159995781548c820185015290880190890161597e565b8b0160a0019550505b50929998505050505050505050565b60208101600583106159c5576159c56142ca565b91905290565b60ff81811683821602908116908181146153555761535561531e565b600060a0820160ff88168352602087602085015260a0604085015281875480845260c086019150886000526020600020935060005b81811015615a415784546001600160a01b031683526001948501949284019201615a1c565b50508481036060860152615a558188614b9d565b935050505060ff831660808301529695505050505050565b600067ffffffffffffffff808616835280851660208401525060606040830152614c4e6060830184613ee5565b82815260406020820152600061368b6040830184613ee5565b67ffffffffffffffff8481168252831660208201526060810161368b60408301846142e0565b615ae381846142e0565b60406020820152600061368b6040830184613ee5565b600060208284031215615b0b57600080fd5b8151613d83816141bf565b6020815260008251610100806020850152615b35610120850183613ee5565b91506020850151615b52604086018267ffffffffffffffff169052565b5060408501516001600160a01b038116606086015250606085015160808501526080850151615b8c60a08601826001600160a01b03169052565b5060a0850151601f19808685030160c0870152615ba98483613ee5565b935060c08701519150808685030160e0870152615bc68483613ee5565b935060e0870151915080868503018387015250615be38382613ee5565b9695505050505050565b600060208284031215615bff57600080fd5b5051919050565b600060ff821660ff8103615c1c57615c1c61531e565b60010192915050565b848152600067ffffffffffffffff808616602084015280851660408401525060806060830152615be36080830184613ee5565b86815260c060208201526000615c7160c0830188613ee5565b6001600160a01b039690961660408301525067ffffffffffffffff9384166060820152608081019290925290911660a09091015292915050565b6020808252825182820181905260009190848201906040850190845b81811015615cfa57835180516001600160a01b031684526020908101519084015260408301938501939250600101615cc7565b50909695505050505050565b60008282518085526020808601955060208260051b8401016020860160005b84811015615d5357601f19868403018952615d41838351613ee5565b98840198925090830190600101615d25565b5090979650505050505050565b602081526000610c486020830184615d06565b60408152615dc460408201845180518252602081015167ffffffffffffffff808216602085015280604084015116604085015280606084015116606085015280608084015116608085015250505050565b600060208401516101608060e0850152615de26101a0850183613ee5565b915060408601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08086850301610100870152615e1f8483613ee5565b935060608801519150615e3e6101208701836001600160a01b03169052565b608088015161014087015260a08801519150808685030183870152615e638483615495565b935060c0880151925080868503016101808701525050615e838282615d06565b9150508281036020840152614c4e8185615d06565b6000815160208301516001600160e01b031980821693506004831015615ec85780818460040360031b1b83161693505b50505091905056fea164736f6c6343000818000a", } var EVM2EVMMultiOffRampABI = EVM2EVMMultiOffRampMetaData.ABI @@ -404,28 +404,6 @@ func (_EVM2EVMMultiOffRamp *EVM2EVMMultiOffRampCallerSession) GetMerkleRoot(sour return _EVM2EVMMultiOffRamp.Contract.GetMerkleRoot(&_EVM2EVMMultiOffRamp.CallOpts, sourceChainSelector, root) } -func (_EVM2EVMMultiOffRamp *EVM2EVMMultiOffRampCaller) GetSenderNonce(opts *bind.CallOpts, sourceChainSelector uint64, sender common.Address) (uint64, error) { - var out []interface{} - err := _EVM2EVMMultiOffRamp.contract.Call(opts, &out, "getSenderNonce", sourceChainSelector, sender) - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -func (_EVM2EVMMultiOffRamp *EVM2EVMMultiOffRampSession) GetSenderNonce(sourceChainSelector uint64, sender common.Address) (uint64, error) { - return _EVM2EVMMultiOffRamp.Contract.GetSenderNonce(&_EVM2EVMMultiOffRamp.CallOpts, sourceChainSelector, sender) -} - -func (_EVM2EVMMultiOffRamp *EVM2EVMMultiOffRampCallerSession) GetSenderNonce(sourceChainSelector uint64, sender common.Address) (uint64, error) { - return _EVM2EVMMultiOffRamp.Contract.GetSenderNonce(&_EVM2EVMMultiOffRamp.CallOpts, sourceChainSelector, sender) -} - func (_EVM2EVMMultiOffRamp *EVM2EVMMultiOffRampCaller) GetSourceChainConfig(opts *bind.CallOpts, sourceChainSelector uint64) (EVM2EVMMultiOffRampSourceChainConfig, error) { var out []interface{} err := _EVM2EVMMultiOffRamp.contract.Call(opts, &out, "getSourceChainConfig", sourceChainSelector) @@ -606,15 +584,15 @@ func (_EVM2EVMMultiOffRamp *EVM2EVMMultiOffRampTransactorSession) Execute(report return _EVM2EVMMultiOffRamp.Contract.Execute(&_EVM2EVMMultiOffRamp.TransactOpts, reportContext, report) } -func (_EVM2EVMMultiOffRamp *EVM2EVMMultiOffRampTransactor) ExecuteSingleMessage(opts *bind.TransactOpts, message InternalEVM2EVMMessage, offchainTokenData [][]byte) (*types.Transaction, error) { +func (_EVM2EVMMultiOffRamp *EVM2EVMMultiOffRampTransactor) ExecuteSingleMessage(opts *bind.TransactOpts, message InternalAny2EVMRampMessage, offchainTokenData [][]byte) (*types.Transaction, error) { return _EVM2EVMMultiOffRamp.contract.Transact(opts, "executeSingleMessage", message, offchainTokenData) } -func (_EVM2EVMMultiOffRamp *EVM2EVMMultiOffRampSession) ExecuteSingleMessage(message InternalEVM2EVMMessage, offchainTokenData [][]byte) (*types.Transaction, error) { +func (_EVM2EVMMultiOffRamp *EVM2EVMMultiOffRampSession) ExecuteSingleMessage(message InternalAny2EVMRampMessage, offchainTokenData [][]byte) (*types.Transaction, error) { return _EVM2EVMMultiOffRamp.Contract.ExecuteSingleMessage(&_EVM2EVMMultiOffRamp.TransactOpts, message, offchainTokenData) } -func (_EVM2EVMMultiOffRamp *EVM2EVMMultiOffRampTransactorSession) ExecuteSingleMessage(message InternalEVM2EVMMessage, offchainTokenData [][]byte) (*types.Transaction, error) { +func (_EVM2EVMMultiOffRamp *EVM2EVMMultiOffRampTransactorSession) ExecuteSingleMessage(message InternalAny2EVMRampMessage, offchainTokenData [][]byte) (*types.Transaction, error) { return _EVM2EVMMultiOffRamp.Contract.ExecuteSingleMessage(&_EVM2EVMMultiOffRamp.TransactOpts, message, offchainTokenData) } @@ -1687,244 +1665,6 @@ func (_EVM2EVMMultiOffRamp *EVM2EVMMultiOffRampFilterer) ParseSkippedAlreadyExec return event, nil } -type EVM2EVMMultiOffRampSkippedIncorrectNonceIterator struct { - Event *EVM2EVMMultiOffRampSkippedIncorrectNonce - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *EVM2EVMMultiOffRampSkippedIncorrectNonceIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(EVM2EVMMultiOffRampSkippedIncorrectNonce) - 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(EVM2EVMMultiOffRampSkippedIncorrectNonce) - 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 *EVM2EVMMultiOffRampSkippedIncorrectNonceIterator) Error() error { - return it.fail -} - -func (it *EVM2EVMMultiOffRampSkippedIncorrectNonceIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type EVM2EVMMultiOffRampSkippedIncorrectNonce struct { - SourceChainSelector uint64 - Nonce uint64 - Sender common.Address - Raw types.Log -} - -func (_EVM2EVMMultiOffRamp *EVM2EVMMultiOffRampFilterer) FilterSkippedIncorrectNonce(opts *bind.FilterOpts) (*EVM2EVMMultiOffRampSkippedIncorrectNonceIterator, error) { - - logs, sub, err := _EVM2EVMMultiOffRamp.contract.FilterLogs(opts, "SkippedIncorrectNonce") - if err != nil { - return nil, err - } - return &EVM2EVMMultiOffRampSkippedIncorrectNonceIterator{contract: _EVM2EVMMultiOffRamp.contract, event: "SkippedIncorrectNonce", logs: logs, sub: sub}, nil -} - -func (_EVM2EVMMultiOffRamp *EVM2EVMMultiOffRampFilterer) WatchSkippedIncorrectNonce(opts *bind.WatchOpts, sink chan<- *EVM2EVMMultiOffRampSkippedIncorrectNonce) (event.Subscription, error) { - - logs, sub, err := _EVM2EVMMultiOffRamp.contract.WatchLogs(opts, "SkippedIncorrectNonce") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(EVM2EVMMultiOffRampSkippedIncorrectNonce) - if err := _EVM2EVMMultiOffRamp.contract.UnpackLog(event, "SkippedIncorrectNonce", 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 (_EVM2EVMMultiOffRamp *EVM2EVMMultiOffRampFilterer) ParseSkippedIncorrectNonce(log types.Log) (*EVM2EVMMultiOffRampSkippedIncorrectNonce, error) { - event := new(EVM2EVMMultiOffRampSkippedIncorrectNonce) - if err := _EVM2EVMMultiOffRamp.contract.UnpackLog(event, "SkippedIncorrectNonce", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type EVM2EVMMultiOffRampSkippedSenderWithPreviousRampMessageInflightIterator struct { - Event *EVM2EVMMultiOffRampSkippedSenderWithPreviousRampMessageInflight - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *EVM2EVMMultiOffRampSkippedSenderWithPreviousRampMessageInflightIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(EVM2EVMMultiOffRampSkippedSenderWithPreviousRampMessageInflight) - 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(EVM2EVMMultiOffRampSkippedSenderWithPreviousRampMessageInflight) - 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 *EVM2EVMMultiOffRampSkippedSenderWithPreviousRampMessageInflightIterator) Error() error { - return it.fail -} - -func (it *EVM2EVMMultiOffRampSkippedSenderWithPreviousRampMessageInflightIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type EVM2EVMMultiOffRampSkippedSenderWithPreviousRampMessageInflight struct { - SourceChainSelector uint64 - Nonce uint64 - Sender common.Address - Raw types.Log -} - -func (_EVM2EVMMultiOffRamp *EVM2EVMMultiOffRampFilterer) FilterSkippedSenderWithPreviousRampMessageInflight(opts *bind.FilterOpts) (*EVM2EVMMultiOffRampSkippedSenderWithPreviousRampMessageInflightIterator, error) { - - logs, sub, err := _EVM2EVMMultiOffRamp.contract.FilterLogs(opts, "SkippedSenderWithPreviousRampMessageInflight") - if err != nil { - return nil, err - } - return &EVM2EVMMultiOffRampSkippedSenderWithPreviousRampMessageInflightIterator{contract: _EVM2EVMMultiOffRamp.contract, event: "SkippedSenderWithPreviousRampMessageInflight", logs: logs, sub: sub}, nil -} - -func (_EVM2EVMMultiOffRamp *EVM2EVMMultiOffRampFilterer) WatchSkippedSenderWithPreviousRampMessageInflight(opts *bind.WatchOpts, sink chan<- *EVM2EVMMultiOffRampSkippedSenderWithPreviousRampMessageInflight) (event.Subscription, error) { - - logs, sub, err := _EVM2EVMMultiOffRamp.contract.WatchLogs(opts, "SkippedSenderWithPreviousRampMessageInflight") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(EVM2EVMMultiOffRampSkippedSenderWithPreviousRampMessageInflight) - if err := _EVM2EVMMultiOffRamp.contract.UnpackLog(event, "SkippedSenderWithPreviousRampMessageInflight", 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 (_EVM2EVMMultiOffRamp *EVM2EVMMultiOffRampFilterer) ParseSkippedSenderWithPreviousRampMessageInflight(log types.Log) (*EVM2EVMMultiOffRampSkippedSenderWithPreviousRampMessageInflight, error) { - event := new(EVM2EVMMultiOffRampSkippedSenderWithPreviousRampMessageInflight) - if err := _EVM2EVMMultiOffRamp.contract.UnpackLog(event, "SkippedSenderWithPreviousRampMessageInflight", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - type EVM2EVMMultiOffRampSourceChainConfigSetIterator struct { Event *EVM2EVMMultiOffRampSourceChainConfigSet @@ -2434,10 +2174,6 @@ func (_EVM2EVMMultiOffRamp *EVM2EVMMultiOffRamp) ParseLog(log types.Log) (genera return _EVM2EVMMultiOffRamp.ParseRootRemoved(log) case _EVM2EVMMultiOffRamp.abi.Events["SkippedAlreadyExecutedMessage"].ID: return _EVM2EVMMultiOffRamp.ParseSkippedAlreadyExecutedMessage(log) - case _EVM2EVMMultiOffRamp.abi.Events["SkippedIncorrectNonce"].ID: - return _EVM2EVMMultiOffRamp.ParseSkippedIncorrectNonce(log) - case _EVM2EVMMultiOffRamp.abi.Events["SkippedSenderWithPreviousRampMessageInflight"].ID: - return _EVM2EVMMultiOffRamp.ParseSkippedSenderWithPreviousRampMessageInflight(log) case _EVM2EVMMultiOffRamp.abi.Events["SourceChainConfigSet"].ID: return _EVM2EVMMultiOffRamp.ParseSourceChainConfigSet(log) case _EVM2EVMMultiOffRamp.abi.Events["SourceChainSelectorAdded"].ID: @@ -2484,16 +2220,8 @@ func (EVM2EVMMultiOffRampSkippedAlreadyExecutedMessage) Topic() common.Hash { return common.HexToHash("0x3b575419319662b2a6f5e2467d84521517a3382b908eb3d557bb3fdb0c50e23c") } -func (EVM2EVMMultiOffRampSkippedIncorrectNonce) Topic() common.Hash { - return common.HexToHash("0x852dc8e405695593e311bd83991cf39b14a328f304935eac6d3d55617f911d89") -} - -func (EVM2EVMMultiOffRampSkippedSenderWithPreviousRampMessageInflight) Topic() common.Hash { - return common.HexToHash("0x5444a3301c7c42dd164cbf6ba4b72bf02504f86c049b06a27fc2b662e334bdbd") -} - func (EVM2EVMMultiOffRampSourceChainConfigSet) Topic() common.Hash { - return common.HexToHash("0xa73c588738263db34ef8c1942db8f99559bc6696f6a812d42e76bafb4c0e8d30") + return common.HexToHash("0x4f49973170c548fddd4a48341b75e131818913f38f44d47af57e8735eee588ba") } func (EVM2EVMMultiOffRampSourceChainSelectorAdded) Topic() common.Hash { @@ -2501,7 +2229,7 @@ func (EVM2EVMMultiOffRampSourceChainSelectorAdded) Topic() common.Hash { } func (EVM2EVMMultiOffRampStaticConfigSet) Topic() common.Hash { - return common.HexToHash("0x2f56698ec552a5d53d27d6f4b3dd8b6989f6426b6151a36aff61160c1d07efdf") + return common.HexToHash("0x683eb52ee924eb817377cfa8f41f238f4bb7a877da5267869dfffbad85f564d8") } func (EVM2EVMMultiOffRampTransmitted) Topic() common.Hash { @@ -2523,8 +2251,6 @@ type EVM2EVMMultiOffRampInterface interface { GetMerkleRoot(opts *bind.CallOpts, sourceChainSelector uint64, root [32]byte) (*big.Int, error) - GetSenderNonce(opts *bind.CallOpts, sourceChainSelector uint64, sender common.Address) (uint64, error) - GetSourceChainConfig(opts *bind.CallOpts, sourceChainSelector uint64) (EVM2EVMMultiOffRampSourceChainConfig, error) GetStaticConfig(opts *bind.CallOpts) (EVM2EVMMultiOffRampStaticConfig, error) @@ -2545,7 +2271,7 @@ type EVM2EVMMultiOffRampInterface interface { Execute(opts *bind.TransactOpts, reportContext [3][32]byte, report []byte) (*types.Transaction, error) - ExecuteSingleMessage(opts *bind.TransactOpts, message InternalEVM2EVMMessage, offchainTokenData [][]byte) (*types.Transaction, error) + ExecuteSingleMessage(opts *bind.TransactOpts, message InternalAny2EVMRampMessage, offchainTokenData [][]byte) (*types.Transaction, error) ManuallyExecute(opts *bind.TransactOpts, reports []InternalExecutionReportSingleChain, gasLimitOverrides [][]*big.Int) (*types.Transaction, error) @@ -2605,18 +2331,6 @@ type EVM2EVMMultiOffRampInterface interface { ParseSkippedAlreadyExecutedMessage(log types.Log) (*EVM2EVMMultiOffRampSkippedAlreadyExecutedMessage, error) - FilterSkippedIncorrectNonce(opts *bind.FilterOpts) (*EVM2EVMMultiOffRampSkippedIncorrectNonceIterator, error) - - WatchSkippedIncorrectNonce(opts *bind.WatchOpts, sink chan<- *EVM2EVMMultiOffRampSkippedIncorrectNonce) (event.Subscription, error) - - ParseSkippedIncorrectNonce(log types.Log) (*EVM2EVMMultiOffRampSkippedIncorrectNonce, error) - - FilterSkippedSenderWithPreviousRampMessageInflight(opts *bind.FilterOpts) (*EVM2EVMMultiOffRampSkippedSenderWithPreviousRampMessageInflightIterator, error) - - WatchSkippedSenderWithPreviousRampMessageInflight(opts *bind.WatchOpts, sink chan<- *EVM2EVMMultiOffRampSkippedSenderWithPreviousRampMessageInflight) (event.Subscription, error) - - ParseSkippedSenderWithPreviousRampMessageInflight(log types.Log) (*EVM2EVMMultiOffRampSkippedSenderWithPreviousRampMessageInflight, error) - FilterSourceChainConfigSet(opts *bind.FilterOpts, sourceChainSelector []uint64) (*EVM2EVMMultiOffRampSourceChainConfigSetIterator, error) WatchSourceChainConfigSet(opts *bind.WatchOpts, sink chan<- *EVM2EVMMultiOffRampSourceChainConfigSet, sourceChainSelector []uint64) (event.Subscription, error) diff --git a/core/gethwrappers/ccip/generated/evm_2_evm_multi_onramp/evm_2_evm_multi_onramp.go b/core/gethwrappers/ccip/generated/evm_2_evm_multi_onramp/evm_2_evm_multi_onramp.go index 6b45c341a0..fadeefb48b 100644 --- a/core/gethwrappers/ccip/generated/evm_2_evm_multi_onramp/evm_2_evm_multi_onramp.go +++ b/core/gethwrappers/ccip/generated/evm_2_evm_multi_onramp/evm_2_evm_multi_onramp.go @@ -137,8 +137,8 @@ type InternalEVM2EVMMessage struct { } var EVM2EVMMultiOnRampMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"linkToken\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"maxFeeJuelsPerMsg\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"nonceManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAdminRegistry\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.StaticConfig\",\"name\":\"staticConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"priceRegistry\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"messageValidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeAggregator\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint16\",\"name\":\"maxNumberOfTokensPerMsg\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxDataBytes\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerMsgGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerPayloadByte\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destDataAvailabilityOverheadGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerDataAvailabilityByte\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"destDataAvailabilityMultiplierBps\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"defaultTokenFeeUSDCents\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"defaultTxGasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"gasMultiplierWeiPerEth\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"networkFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"enforceOutOfOrder\",\"type\":\"bool\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DestChainDynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"prevOnRamp\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DestChainConfigArgs[]\",\"name\":\"destChainConfigArgs\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"premiumMultiplierWeiPerEth\",\"type\":\"uint64\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.PremiumMultiplierWeiPerEthArgs[]\",\"name\":\"premiumMultiplierWeiPerEthArgs\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"minFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"deciBps\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.TokenTransferFeeConfig\",\"name\":\"tokenTransferFeeConfig\",\"type\":\"tuple\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.TokenTransferFeeConfigSingleTokenArgs[]\",\"name\":\"tokenTransferFeeConfigs\",\"type\":\"tuple[]\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.TokenTransferFeeConfigArgs[]\",\"name\":\"tokenTransferFeeConfigArgs\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CannotSendZeroTokens\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"}],\"name\":\"CursedByRMN\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"}],\"name\":\"DestinationChainNotEnabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ExtraArgOutOfOrderExecutionMustBeTrue\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GetSupportedTokensFunctionalityRemovedCheckAdminRegistry\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidConfig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"destBytesOverhead\",\"type\":\"uint32\"}],\"name\":\"InvalidDestBytesOverhead\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"}],\"name\":\"InvalidDestChainConfig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"encodedAddress\",\"type\":\"bytes\"}],\"name\":\"InvalidEVMAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidExtraArgsTag\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"msgFeeJuels\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxFeeJuelsPerMsg\",\"type\":\"uint256\"}],\"name\":\"MessageFeeTooHigh\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MessageGasLimitTooHigh\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"actualSize\",\"type\":\"uint256\"}],\"name\":\"MessageTooLarge\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"errorReason\",\"type\":\"bytes\"}],\"name\":\"MessageValidationError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustBeCalledByRouter\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"NotAFeeToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByOwnerOrAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RouterMustSetOriginalSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SourceTokenDataTooLarge\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsupportedNumberOfTokens\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"UnsupportedToken\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"strict\",\"type\":\"bool\"},{\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"feeTokenAmount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"tokenAmounts\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes[]\",\"name\":\"sourceTokenData\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"structInternal.EVM2EVMMessage\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"CCIPSendRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"linkToken\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"maxFeeJuelsPerMsg\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"nonceManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAdminRegistry\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structEVM2EVMMultiOnRamp.StaticConfig\",\"name\":\"staticConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"priceRegistry\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"messageValidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeAggregator\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structEVM2EVMMultiOnRamp.DynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint16\",\"name\":\"maxNumberOfTokensPerMsg\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxDataBytes\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerMsgGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerPayloadByte\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destDataAvailabilityOverheadGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerDataAvailabilityByte\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"destDataAvailabilityMultiplierBps\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"defaultTokenFeeUSDCents\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"defaultTxGasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"gasMultiplierWeiPerEth\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"networkFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"enforceOutOfOrder\",\"type\":\"bool\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DestChainDynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"prevOnRamp\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"metadataHash\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"structEVM2EVMMultiOnRamp.DestChainConfig\",\"name\":\"destChainConfig\",\"type\":\"tuple\"}],\"name\":\"DestChainAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint16\",\"name\":\"maxNumberOfTokensPerMsg\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxDataBytes\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerMsgGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerPayloadByte\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destDataAvailabilityOverheadGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerDataAvailabilityByte\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"destDataAvailabilityMultiplierBps\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"defaultTokenFeeUSDCents\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"defaultTxGasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"gasMultiplierWeiPerEth\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"networkFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"enforceOutOfOrder\",\"type\":\"bool\"}],\"indexed\":false,\"internalType\":\"structEVM2EVMMultiOnRamp.DestChainDynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"}],\"name\":\"DestChainDynamicConfigUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"feeValueJuels\",\"type\":\"uint256\"}],\"name\":\"FeePaid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"feeAggregator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"FeeTokenWithdrawn\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"premiumMultiplierWeiPerEth\",\"type\":\"uint64\"}],\"name\":\"PremiumMultiplierWeiPerEthUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"destChainSelector\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"TokenTransferFeeConfigDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"minFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"deciBps\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"}],\"indexed\":false,\"internalType\":\"structEVM2EVMMultiOnRamp.TokenTransferFeeConfig\",\"name\":\"tokenTransferFeeConfig\",\"type\":\"tuple\"}],\"name\":\"TokenTransferFeeConfigUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint16\",\"name\":\"maxNumberOfTokensPerMsg\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxDataBytes\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerMsgGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerPayloadByte\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destDataAvailabilityOverheadGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerDataAvailabilityByte\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"destDataAvailabilityMultiplierBps\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"defaultTokenFeeUSDCents\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"defaultTxGasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"gasMultiplierWeiPerEth\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"networkFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"enforceOutOfOrder\",\"type\":\"bool\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DestChainDynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"prevOnRamp\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DestChainConfigArgs[]\",\"name\":\"destChainConfigArgs\",\"type\":\"tuple[]\"}],\"name\":\"applyDestChainConfigUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"premiumMultiplierWeiPerEth\",\"type\":\"uint64\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.PremiumMultiplierWeiPerEthArgs[]\",\"name\":\"premiumMultiplierWeiPerEthArgs\",\"type\":\"tuple[]\"}],\"name\":\"applyPremiumMultiplierWeiPerEthUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"minFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"deciBps\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.TokenTransferFeeConfig\",\"name\":\"tokenTransferFeeConfig\",\"type\":\"tuple\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.TokenTransferFeeConfigSingleTokenArgs[]\",\"name\":\"tokenTransferFeeConfigs\",\"type\":\"tuple[]\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.TokenTransferFeeConfigArgs[]\",\"name\":\"tokenTransferFeeConfigArgs\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.TokenTransferFeeConfigRemoveArgs[]\",\"name\":\"tokensToUseDefaultFeeConfigs\",\"type\":\"tuple[]\"}],\"name\":\"applyTokenTransferFeeConfigUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"tokenAmounts\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"}],\"internalType\":\"structClient.EVM2AnyMessage\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"feeTokenAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"originalSender\",\"type\":\"address\"}],\"name\":\"forwardFromRouter\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"}],\"name\":\"getDestChainConfig\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint16\",\"name\":\"maxNumberOfTokensPerMsg\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxDataBytes\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerMsgGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerPayloadByte\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destDataAvailabilityOverheadGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerDataAvailabilityByte\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"destDataAvailabilityMultiplierBps\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"defaultTokenFeeUSDCents\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"defaultTxGasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"gasMultiplierWeiPerEth\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"networkFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"enforceOutOfOrder\",\"type\":\"bool\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DestChainDynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"prevOnRamp\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"metadataHash\",\"type\":\"bytes32\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DestChainConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDynamicConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"priceRegistry\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"messageValidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeAggregator\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"}],\"name\":\"getExpectedNextSequenceNumber\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"tokenAmounts\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"}],\"internalType\":\"structClient.EVM2AnyMessage\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"getFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"feeTokenAmount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"},{\"internalType\":\"contractIERC20\",\"name\":\"sourceToken\",\"type\":\"address\"}],\"name\":\"getPoolBySourceToken\",\"outputs\":[{\"internalType\":\"contractIPoolV1\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getPremiumMultiplierWeiPerEth\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"premiumMultiplierWeiPerEth\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStaticConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"linkToken\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"maxFeeJuelsPerMsg\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"nonceManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAdminRegistry\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.StaticConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"getSupportedTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getTokenTransferFeeConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"minFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"deciBps\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.TokenTransferFeeConfig\",\"name\":\"tokenTransferFeeConfig\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"priceRegistry\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"messageValidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeAggregator\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"}],\"name\":\"setDynamicConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\"},{\"inputs\":[],\"name\":\"withdrawFeeTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x6101406040523480156200001257600080fd5b5060405162006b4538038062006b458339810160408190526200003591620014af565b33806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf8162000214565b505085516001600160a01b031615905080620000e6575060208501516001600160401b0316155b80620000fd575060608501516001600160a01b0316155b8062000114575060808501516001600160a01b0316155b806200012b575060a08501516001600160a01b0316155b156200014a576040516306b7c75960e31b815260040160405180910390fd5b84516001600160a01b0390811660a090815260208701516001600160401b031660c05260408701516001600160601b031660809081526060880151831660e0528701518216610100528601511661012052620001a684620002bf565b620001b18362000482565b620001bc8262000a00565b60408051600080825260208201909252620002099183919062000202565b6040805180820190915260008082526020820152815260200190600190039081620001da5790505b5062000acc565b5050505050620018f7565b336001600160a01b038216036200026e5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60208101516001600160a01b03161580620002e5575060608101516001600160a01b0316155b1562000304576040516306b7c75960e31b815260040160405180910390fd5b8051600280546001600160a01b039283166001600160a01b0319918216179091556020808401516003805491851691841691909117905560408085015160048054918616918516919091179055606080860151600580549187169190951617909355805160c0808201835260a080518716835290516001600160401b031693820193909352608080516001600160601b03168284015260e05186169482019490945261010051851693810193909352610120519093169082015290517f4012fe74115805c44a121d8f9edc3d234df8f05f53b52864b8e5e8a30384b8aa916200047791849082516001600160a01b0390811682526020808501516001600160401b0316818401526040808601516001600160601b03168185015260608087015184168186015260808088015185169086015260a0968701518416968501969096528451831660c085015290840151821660e084015283015181166101008301529190920151166101208201526101400190565b60405180910390a150565b60005b8151811015620009fc576000828281518110620004a657620004a6620015f5565b602002602001015190506000838381518110620004c757620004c7620015f5565b6020026020010151600001519050806001600160401b031660001480620004fe5750602082015161018001516001600160401b0316155b15620005295760405163c35aa79d60e01b81526001600160401b038216600482015260240162000083565b600060066000836001600160401b03166001600160401b0316815260200190815260200160002090506000836040015190506000604051806080016040528086602001518152602001836001600160a01b031681526020018460020160149054906101000a90046001600160401b03166001600160401b031681526020018460030154815250905080600001518360000160008201518160000160006101000a81548160ff02191690831515021790555060208201518160000160016101000a81548161ffff021916908361ffff16021790555060408201518160000160036101000a81548163ffffffff021916908363ffffffff16021790555060608201518160000160076101000a81548163ffffffff021916908363ffffffff160217905550608082015181600001600b6101000a81548163ffffffff021916908363ffffffff16021790555060a082015181600001600f6101000a81548161ffff021916908361ffff16021790555060c08201518160000160116101000a81548163ffffffff021916908363ffffffff16021790555060e08201518160000160156101000a81548161ffff021916908361ffff1602179055506101008201518160000160176101000a81548161ffff021916908361ffff1602179055506101208201518160000160196101000a81548161ffff021916908361ffff16021790555061014082015181600001601b6101000a81548163ffffffff021916908363ffffffff1602179055506101608201518160010160006101000a81548163ffffffff021916908363ffffffff1602179055506101808201518160010160046101000a8154816001600160401b0302191690836001600160401b031602179055506101a082015181600101600c6101000a8154816001600160401b0302191690836001600160401b031602179055506101c08201518160010160146101000a81548163ffffffff021916908363ffffffff1602179055506101e08201518160010160186101000a81548160ff02191690831515021790555090505082600301546000801b03620009195760c051604080517f8acd72527118c8324937b1a42e02cd246697c3b633f1742f3cae11de233722b360208201526001600160401b0392831691810191909152908516606082015230608082015260a00160408051601f1981840301815291905280516020909101206060820181905260038401556001600160a01b03821615620008d0576002830180546001600160a01b0319166001600160a01b0384161790555b836001600160401b03167f4be92415590c4554edbd7d3fbf308eeb6e5d00ababade0791f835b4a18416ed6846040516200090b91906200160b565b60405180910390a2620009eb565b60028301546001600160a01b03838116911614620009565760405163c35aa79d60e01b81526001600160401b038516600482015260240162000083565b60208560200151610160015163ffffffff161015620009a357602085015161016001516040516312766e0160e11b81526000600482015263ffffffff909116602482015260440162000083565b836001600160401b03167f1173725509a61aed633c58cd12e31c104cd26ca24f6c270c8ac81c5f6f12e8e98660200151604051620009e29190620017b5565b60405180910390a25b505050505080600101905062000485565b5050565b60005b8151811015620009fc57600082828151811062000a245762000a24620015f5565b6020026020010151600001519050600083838151811062000a495762000a49620015f5565b6020908102919091018101518101516001600160a01b03841660008181526007845260409081902080546001600160401b0319166001600160401b0385169081179091559051908152919350917fbb77da6f7210cdd16904228a9360133d1d7dfff99b1bc75f128da5b53e28f97d910160405180910390a2505060010162000a03565b60005b825181101562000d3957600083828151811062000af05762000af0620015f5565b6020026020010151905060008160000151905060005b82602001515181101562000d2a5760008360200151828151811062000b2f5762000b2f620015f5565b602002602001015160200151905060008460200151838151811062000b585762000b58620015f5565b60200260200101516000015190506020826080015163ffffffff16101562000bb15760808201516040516312766e0160e11b81526001600160a01b038316600482015263ffffffff909116602482015260440162000083565b6001600160401b03841660008181526008602090815260408083206001600160a01b0386168085529083529281902086518154938801518389015160608a015160808b015160a08c01511515600160901b0260ff60901b1963ffffffff928316600160701b021664ffffffffff60701b199383166a01000000000000000000000263ffffffff60501b1961ffff90961668010000000000000000029590951665ffffffffffff60401b19968416640100000000026001600160401b0319909b16939097169290921798909817939093169390931717919091161792909217909155519091907f94967ae9ea7729ad4f54021c1981765d2b1d954f7c92fbec340aa0a54f46b8b59062000d17908690600060c08201905063ffffffff80845116835280602085015116602084015261ffff60408501511660408401528060608501511660608401528060808501511660808401525060a0830151151560a083015292915050565b60405180910390a3505060010162000b06565b50505080600101905062000acf565b5060005b815181101562000dff57600082828151811062000d5e5762000d5e620015f5565b6020026020010151600001519050600083838151811062000d835762000d83620015f5565b6020908102919091018101518101516001600160401b03841660008181526008845260408082206001600160a01b038516808452955280822080546001600160981b03191690555192945090917ffa22e84f9c809b5b7e94f084eb45cf17a5e4703cecef8f27ed35e54b719bffcd9190a3505060010162000d3d565b505050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b038111828210171562000e3f5762000e3f62000e04565b60405290565b60405161020081016001600160401b038111828210171562000e3f5762000e3f62000e04565b604080519081016001600160401b038111828210171562000e3f5762000e3f62000e04565b60405160c081016001600160401b038111828210171562000e3f5762000e3f62000e04565b604051601f8201601f191681016001600160401b038111828210171562000ee05762000ee062000e04565b604052919050565b80516001600160a01b038116811462000f0057600080fd5b919050565b80516001600160401b038116811462000f0057600080fd5b60006080828403121562000f3057600080fd5b604051608081016001600160401b038111828210171562000f555762000f5562000e04565b60405290508062000f668362000ee8565b815262000f766020840162000ee8565b602082015262000f896040840162000ee8565b604082015262000f9c6060840162000ee8565b60608201525092915050565b60006001600160401b0382111562000fc45762000fc462000e04565b5060051b60200190565b8051801515811462000f0057600080fd5b805161ffff8116811462000f0057600080fd5b805163ffffffff8116811462000f0057600080fd5b600082601f8301126200101957600080fd5b81516020620010326200102c8362000fa8565b62000eb5565b82815261024092830285018201928282019190878511156200105357600080fd5b8387015b85811015620012125780890382811215620010725760008081fd5b6200107c62000e1a565b620010878362000f05565b815261020080601f19840112156200109f5760008081fd5b620010a962000e45565b9250620010b888850162000fce565b83526040620010c981860162000fdf565b898501526060620010dc81870162000ff2565b828601526080620010ef81880162000ff2565b8287015260a091506200110482880162000ff2565b9086015260c06200111787820162000fdf565b8287015260e091506200112c82880162000ff2565b908601526101006200114087820162000fdf565b8287015261012091506200115682880162000fdf565b908601526101406200116a87820162000fdf565b8287015261016091506200118082880162000ff2565b908601526101806200119487820162000ff2565b828701526101a09150620011aa82880162000f05565b908601526101c0620011be87820162000f05565b828701526101e09150620011d482880162000ff2565b90860152620011e586840162000fce565b81860152508389840152620011fe610220860162000ee8565b908301525085525092840192810162001057565b5090979650505050505050565b600082601f8301126200123157600080fd5b81516020620012446200102c8362000fa8565b82815260069290921b840181019181810190868411156200126457600080fd5b8286015b84811015620012ba5760408189031215620012835760008081fd5b6200128d62000e6b565b620012988262000ee8565b8152620012a785830162000f05565b8186015283529183019160400162001268565b509695505050505050565b600082601f830112620012d757600080fd5b81516020620012ea6200102c8362000fa8565b82815260059290921b840181019181810190868411156200130a57600080fd5b8286015b84811015620012ba5780516001600160401b03808211156200132f57600080fd5b908801906040601f19838c0381018213156200134a57600080fd5b6200135462000e6b565b6200136189860162000f05565b815282850151848111156200137557600080fd5b8086019550508c603f8601126200138b57600080fd5b888501519350620013a06200102c8562000fa8565b84815260e09094028501830193898101908e861115620013bf57600080fd5b958401955b858710156200149857868f0360e0811215620013df57600080fd5b620013e962000e6b565b620013f48962000ee8565b815260c086830112156200140757600080fd5b6200141162000e90565b9150620014208d8a0162000ff2565b82526200142f878a0162000ff2565b8d8301526200144160608a0162000fdf565b878301526200145360808a0162000ff2565b60608301526200146660a08a0162000ff2565b60808301526200147960c08a0162000fce565b60a0830152808d0191909152825260e09690960195908a0190620013c4565b828b0152508752505050928401925083016200130e565b60008060008060008587036101a0811215620014ca57600080fd5b60c0811215620014d957600080fd5b50620014e462000e90565b620014ef8762000ee8565b8152620014ff6020880162000f05565b602082015260408701516001600160601b03811681146200151f57600080fd5b6040820152620015326060880162000ee8565b6060820152620015456080880162000ee8565b60808201526200155860a0880162000ee8565b60a082015294506200156e8760c0880162000f1d565b6101408701519094506001600160401b03808211156200158d57600080fd5b6200159b89838a0162001007565b9450610160880151915080821115620015b357600080fd5b620015c189838a016200121f565b9350610180880151915080821115620015d957600080fd5b50620015e888828901620012c5565b9150509295509295909350565b634e487b7160e01b600052603260045260246000fd5b815460ff81161515825261026082019061ffff600882901c8116602085015263ffffffff601883901c811660408601526200165360608601828560381c1663ffffffff169052565b6200166b60808601828560581c1663ffffffff169052565b6200168160a08601838560781c1661ffff169052565b6200169960c08601828560881c1663ffffffff169052565b620016af60e08601838560a81c1661ffff169052565b620016c66101008601838560b81c1661ffff169052565b620016dd6101208601838560c81c1661ffff169052565b620016f66101408601828560d81c1663ffffffff169052565b600186015463ffffffff8282161661016087015292506001600160401b03602084901c811661018087015291506200173f6101a08601838560601c166001600160401b03169052565b620017586101c08601828560a01c1663ffffffff169052565b506200176f6101e0850160ff8460c01c1615159052565b60028501546001600160a01b0381166102008601529150620017a26102208501828460a01c166001600160401b03169052565b5050600383015461024083015292915050565b81511515815261020081016020830151620017d6602084018261ffff169052565b506040830151620017ef604084018263ffffffff169052565b50606083015162001808606084018263ffffffff169052565b50608083015162001821608084018263ffffffff169052565b5060a08301516200183860a084018261ffff169052565b5060c08301516200185160c084018263ffffffff169052565b5060e08301516200186860e084018261ffff169052565b506101008381015161ffff9081169184019190915261012080850151909116908301526101408084015163ffffffff9081169184019190915261016080850151821690840152610180808501516001600160401b03908116918501919091526101a080860151909116908401526101c080850151909116908301526101e0928301511515929091019190915290565b60805160a05160c05160e0516101005161012051615195620019b0600039600081816102da01528181610f260152612adf0152600081816102ab01528181612ab7015261323e01526000818161027c01528181612a8d0152612bf30152600081816102180152818161265001528181612a2801526130f90152600081816101e901528181612a0301528181612eda0152612f8401526000818161024801528181612a5a0152818161304601526130b601526151956000f3fe608060405234801561001057600080fd5b50600436106101515760003560e01c806379ba5097116100cd578063a69c64c011610081578063df0aa9e911610066578063df0aa9e9146108c0578063f2fde38b146108d3578063fbca3b74146108e657600080fd5b8063a69c64c01461089a578063a6f3ab6c146108ad57600080fd5b80638da5cb5b116100b25780638da5cb5b146108635780639041be3d14610874578063932e53c81461088757600080fd5b806379ba5097146106f857806382b49eb01461070057600080fd5b80633a019940116101245780636def4ce7116101095780636def4ce7146103b65780637437ff9f14610672578063770e2dc4146106e557600080fd5b80633a0199401461038157806348a98aa41461038b57600080fd5b8063061877e31461015657806306285c69146101a7578063181f5a771461031757806320487ded14610360575b600080fd5b610189610164366004613945565b6001600160a01b031660009081526007602052604090205467ffffffffffffffff1690565b60405167ffffffffffffffff90911681526020015b60405180910390f35b61030a6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a08101919091526040518060c001604052807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020017f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff1681526020017f00000000000000000000000000000000000000000000000000000000000000006bffffffffffffffffffffffff1681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316815250905090565b60405161019e9190613962565b6103536040518060400160405280601c81526020017f45564d3245564d4d756c74694f6e52616d7020312e362e302d6465760000000081525081565b60405161019e9190613a1e565b61037361036e366004613a6a565b610906565b60405190815260200161019e565b610389610d27565b005b61039e610399366004613aba565b610eeb565b6040516001600160a01b03909116815260200161019e565b6106656103c4366004613af3565b604080516102808101825260006080820181815260a0830182905260c0830182905260e08301829052610100830182905261012083018290526101408301829052610160830182905261018083018290526101a083018290526101c083018290526101e08301829052610200830182905261022083018290526102408301829052610260830182905282526020820181905291810182905260608101919091525067ffffffffffffffff908116600090815260066020908152604091829020825161028081018452815460ff80821615156080840190815261ffff610100808504821660a087015263ffffffff63010000008604811660c08801526701000000000000008604811660e08801526b01000000000000000000000086048116918701919091526f01000000000000000000000000000000850482166101208701527101000000000000000000000000000000000085048116610140870152750100000000000000000000000000000000000000000085048216610160870152770100000000000000000000000000000000000000000000008504821661018087015279010000000000000000000000000000000000000000000000000085049091166101a08601527b0100000000000000000000000000000000000000000000000000000090930483166101c085015260018501548084166101e0860152640100000000810489166102008601526c010000000000000000000000008104891661022086015274010000000000000000000000000000000000000000808204909416610240860152780100000000000000000000000000000000000000000000000090049091161515610260840152825260028301546001600160a01b0381169483019490945290920490931691810191909152600390910154606082015290565b60405161019e9190613c41565b6106d860408051608081018252600080825260208201819052918101829052606081019190915250604080516080810182526002546001600160a01b03908116825260035481166020830152600454811692820192909252600554909116606082015290565b60405161019e9190613c8e565b6103896106f3366004613ec1565b610f9a565b610389610fb0565b61080361070e366004613aba565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a08101919091525067ffffffffffffffff9190911660009081526008602090815260408083206001600160a01b0394909416835292815290829020825160c081018452905463ffffffff8082168352640100000000820481169383019390935268010000000000000000810461ffff16938201939093526a01000000000000000000008304821660608201526e01000000000000000000000000000083049091166080820152720100000000000000000000000000000000000090910460ff16151560a082015290565b60405161019e9190600060c08201905063ffffffff80845116835280602085015116602084015261ffff60408501511660408401528060608501511660608401528060808501511660808401525060a0830151151560a083015292915050565b6000546001600160a01b031661039e565b610189610882366004613af3565b611079565b61038961089536600461413b565b6110bd565b6103896108a8366004614348565b6110d1565b6103896108bb366004614406565b6110e2565b6103736108ce36600461448b565b6110f3565b6103896108e1366004613945565b61157b565b6108f96108f4366004613af3565b61158c565b60405161019e91906144f7565b67ffffffffffffffff82166000908152600660205260408120805460ff1661096b576040517f99ac52f200000000000000000000000000000000000000000000000000000000815267ffffffffffffffff851660048201526024015b60405180910390fd5b600061099961097d6080860186614544565b6001850154640100000000900467ffffffffffffffff166115c0565b90506109ca856109ac6020870187614544565b84519091506109be6040890189614592565b9050856020015161172d565b60006007816109df6080880160608901613945565b6001600160a01b03168152602081019190915260400160009081205467ffffffffffffffff169150819003610a5c57610a1e6080860160608701613945565b6040517fa7499d200000000000000000000000000000000000000000000000000000000081526001600160a01b039091166004820152602401610962565b60035460009081906001600160a01b031663ffdb4b37610a8260808a0160608b01613945565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b03909116600482015267ffffffffffffffff8b1660248201526044016040805180830381865afa158015610aed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b119190614608565b90925090506000808080610b2860408c018c614592565b90501115610b6357610b578b610b4460808d0160608e01613945565b87610b5260408f018f614592565b6118a3565b91945092509050610b9a565b6001880154610b979074010000000000000000000000000000000000000000900463ffffffff16662386f26fc10000614661565b92505b875460009077010000000000000000000000000000000000000000000000900461ffff1615610c0657610c038c6dffffffffffffffffffffffffffff607088901c16610be960208f018f614544565b90508e8060400190610bfb9190614592565b905086611c94565b90505b600089600101600c9054906101000a900467ffffffffffffffff1667ffffffffffffffff168463ffffffff168b600001600f9054906101000a900461ffff1661ffff168e8060200190610c599190614544565b610c64929150614661565b8c548c51610c87916b010000000000000000000000900463ffffffff1690614678565b610c919190614678565b610c9b9190614678565b610cb5906dffffffffffffffffffffffffffff8916614661565b610cbf9190614661565b90507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff87168282610cf667ffffffffffffffff8c1689614661565b610d009190614678565b610d0a9190614678565b610d14919061468b565b9a50505050505050505050505b92915050565b600354604080517fcdc73d5100000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163cdc73d5191600480830192869291908290030181865afa158015610d89573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610db191908101906146c6565b6005549091506001600160a01b031660005b8251811015610ee6576000838281518110610de057610de0614755565b60209081029190910101516040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529091506000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610e4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e729190614784565b90508015610edc57610e8e6001600160a01b0383168583611d9a565b816001600160a01b0316846001600160a01b03167f508d7d183612c18fc339b42618912b9fa3239f631dd7ec0671f950200a0fa66e83604051610ed391815260200190565b60405180910390a35b5050600101610dc3565b505050565b6040517fbbe4f6db0000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301526000917f00000000000000000000000000000000000000000000000000000000000000009091169063bbe4f6db90602401602060405180830381865afa158015610f6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f93919061479d565b9392505050565b610fa2611e1a565b610fac8282611e76565b5050565b6001546001600160a01b0316331461100a5760405162461bcd60e51b815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610962565b60008054337fffffffffffffffffffffffff0000000000000000000000000000000000000000808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b67ffffffffffffffff8082166000908152600660205260408120600201549091610d21917401000000000000000000000000000000000000000090041660016147ba565b6110c5611e1a565b6110ce81612256565b50565b6110d9611e1a565b6110ce81612849565b6110ea611e1a565b6110ce81612926565b67ffffffffffffffff841660009081526006602052604081208161111a8288888888612b3f565b905060005b8161014001515181101561151157600061113c6040890189614592565b8381811061114c5761114c614755565b90506040020180360381019061116291906147e2565b905080602001516000036111a2576040517f5cf0444900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006111b28a8360000151610eeb565b90506001600160a01b038116158061126857506040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527faff2afbf0000000000000000000000000000000000000000000000000000000060048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa158015611242573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611266919061481c565b155b156112ad5781516040517fbf16aab60000000000000000000000000000000000000000000000000000000081526001600160a01b039091166004820152602401610962565b6000816001600160a01b0316639a4575b96040518060a001604052808d80600001906112d99190614544565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509082525067ffffffffffffffff8f166020808301919091526001600160a01b03808e16604080850191909152918901516060840152885116608090920191909152517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526113849190600401614839565b6000604051808303816000875af11580156113a3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526113cb9190810190614906565b9050602081602001515111801561142c575067ffffffffffffffff8b16600090815260086020908152604080832086516001600160a01b0316845282529091205490820151516e01000000000000000000000000000090910463ffffffff16105b156114715782516040517f36f536ca0000000000000000000000000000000000000000000000000000000081526001600160a01b039091166004820152602401610962565b805161147c906133f7565b5060408051606081019091526001600160a01b03831660808201528060a0810160405160208183030381529060405281526020018260000151815260200182602001518152506040516020016114d29190614997565b60405160208183030381529060405285610160015185815181106114f8576114f8614755565b602002602001018190525050505080600101905061111f565b50611520818360030154613452565b61018082015260405167ffffffffffffffff8816907fc79f9c3e610deac14de4e704195fe17eab0983ee9916866bc04d16a00f54daa690611562908490614aa2565b60405180910390a261018001519150505b949350505050565b611583611e1a565b6110ce816135ad565b60606040517f9e7177c800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805180820190915260008082526020820152600083900361160157506040805180820190915267ffffffffffffffff8216815260006020820152610f93565b600061160d8486614bd7565b90507fe7e230f0000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000082160161167a576116658460048188614c1f565b8101906116729190614c49565b915050610f93565b7f6859a837000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008216016116fb5760408051808201909152806116db866004818a614c1f565b8101906116e89190614c81565b815260006020909101529150610f939050565b6040517f5247fdce00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8516600090815260066020526040902080546301000000900463ffffffff168511156117a65780546040517f86933789000000000000000000000000000000000000000000000000000000008152630100000090910463ffffffff16600482015260248101869052604401610962565b8054670100000000000000900463ffffffff168411156117f2576040517f4c4fc93a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054610100900461ffff16831115611836576040517f4c056b6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018101547801000000000000000000000000000000000000000000000000900460ff168015611864575081155b1561189b576040517fee433e9900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050565b6000808083815b81811015611c875760008787838181106118c6576118c6614755565b9050604002018036038101906118dc91906147e2565b905060006001600160a01b03166118f78c8360000151610eeb565b6001600160a01b0316036119455780516040517fbf16aab60000000000000000000000000000000000000000000000000000000081526001600160a01b039091166004820152602401610962565b67ffffffffffffffff8b16600090815260086020908152604080832084516001600160a01b03168452825291829020825160c081018452905463ffffffff8082168352640100000000820481169383019390935268010000000000000000810461ffff16938201939093526a01000000000000000000008304821660608201526e01000000000000000000000000000083049091166080820152720100000000000000000000000000000000000090910460ff16151560a08201819052611ab35767ffffffffffffffff8c1660009081526006602052604090208054611a5390790100000000000000000000000000000000000000000000000000900461ffff16662386f26fc10000614661565b611a5d9089614678565b8154909850611a91907b01000000000000000000000000000000000000000000000000000000900463ffffffff1688614c9a565b6001820154909750611aa99063ffffffff1687614c9a565b9550505050611c7f565b604081015160009061ffff1615611bcf5760008c6001600160a01b031684600001516001600160a01b031614611b725760035484516040517f4ab35b0b0000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690634ab35b0b90602401602060405180830381865afa158015611b47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b6b9190614cb7565b9050611b75565b508a5b620186a0836040015161ffff16611bb78660200151847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1661366e90919063ffffffff16565b611bc19190614661565b611bcb919061468b565b9150505b6060820151611bde9088614c9a565b9650816080015186611bf09190614c9a565b8251909650600090611c0f9063ffffffff16662386f26fc10000614661565b905080821015611c2e57611c23818a614678565b985050505050611c7f565b6000836020015163ffffffff16662386f26fc10000611c4d9190614661565b905080831115611c6d57611c61818b614678565b99505050505050611c7f565b611c77838b614678565b995050505050505b6001016118aa565b5050955095509592505050565b60008063ffffffff8316611ca9608086614661565b611cb587610220614678565b611cbf9190614678565b611cc99190614678565b67ffffffffffffffff8816600090815260066020526040812080549293509171010000000000000000000000000000000000810463ffffffff1690611d2b907501000000000000000000000000000000000000000000900461ffff1685614661565b611d359190614678565b825490915077010000000000000000000000000000000000000000000000900461ffff16611d736dffffffffffffffffffffffffffff8a1683614661565b611d7d9190614661565b611d8d90655af3107a4000614661565b9998505050505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610ee69084906136ab565b6000546001600160a01b03163314611e745760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610962565b565b60005b825181101561217f576000838281518110611e9657611e96614755565b6020026020010151905060008160000151905060005b82602001515181101561217157600083602001518281518110611ed157611ed1614755565b6020026020010151602001519050600084602001518381518110611ef757611ef7614755565b60200260200101516000015190506020826080015163ffffffff161015611f675760808201516040517f24ecdc020000000000000000000000000000000000000000000000000000000081526001600160a01b038316600482015263ffffffff9091166024820152604401610962565b67ffffffffffffffff841660008181526008602090815260408083206001600160a01b0386168085529083529281902086518154938801518389015160608a015160808b015160a08c015115157201000000000000000000000000000000000000027fffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffff63ffffffff9283166e01000000000000000000000000000002167fffffffffffffffffffffffffff0000000000ffffffffffffffffffffffffffff9383166a0100000000000000000000027fffffffffffffffffffffffffffffffffffff00000000ffffffffffffffffffff61ffff9096166801000000000000000002959095167fffffffffffffffffffffffffffffffffffff000000000000ffffffffffffffff968416640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000909b16939097169290921798909817939093169390931717919091161792909217909155519091907f94967ae9ea7729ad4f54021c1981765d2b1d954f7c92fbec340aa0a54f46b8b59061215f908690600060c08201905063ffffffff80845116835280602085015116602084015261ffff60408501511660408401528060608501511660608401528060808501511660808401525060a0830151151560a083015292915050565b60405180910390a35050600101611eac565b505050806001019050611e79565b5060005b8151811015610ee65760008282815181106121a0576121a0614755565b602002602001015160000151905060008383815181106121c2576121c2614755565b60209081029190910181015181015167ffffffffffffffff841660008181526008845260408082206001600160a01b038516808452955280822080547fffffffffffffffffffffffffff000000000000000000000000000000000000001690555192945090917ffa22e84f9c809b5b7e94f084eb45cf17a5e4703cecef8f27ed35e54b719bffcd9190a35050600101612183565b60005b8151811015610fac57600082828151811061227657612276614755565b60200260200101519050600083838151811061229457612294614755565b60200260200101516000015190508067ffffffffffffffff16600014806122cc57506020820151610180015167ffffffffffffffff16155b1561230f576040517fc35aa79d00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff82166004820152602401610962565b6000600660008367ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002090506000836040015190506000604051806080016040528086602001518152602001836001600160a01b031681526020018460020160149054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020018460030154815250905080600001518360000160008201518160000160006101000a81548160ff02191690831515021790555060208201518160000160016101000a81548161ffff021916908361ffff16021790555060408201518160000160036101000a81548163ffffffff021916908363ffffffff16021790555060608201518160000160076101000a81548163ffffffff021916908363ffffffff160217905550608082015181600001600b6101000a81548163ffffffff021916908363ffffffff16021790555060a082015181600001600f6101000a81548161ffff021916908361ffff16021790555060c08201518160000160116101000a81548163ffffffff021916908363ffffffff16021790555060e08201518160000160156101000a81548161ffff021916908361ffff1602179055506101008201518160000160176101000a81548161ffff021916908361ffff1602179055506101208201518160000160196101000a81548161ffff021916908361ffff16021790555061014082015181600001601b6101000a81548163ffffffff021916908363ffffffff1602179055506101608201518160010160006101000a81548163ffffffff021916908363ffffffff1602179055506101808201518160010160046101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506101a082015181600101600c6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506101c08201518160010160146101000a81548163ffffffff021916908363ffffffff1602179055506101e08201518160010160186101000a81548160ff02191690831515021790555090505082600301546000801b0361273957604080517f8acd72527118c8324937b1a42e02cd246697c3b633f1742f3cae11de233722b3602082015267ffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811692820192909252908516606082015230608082015260a00160408051601f1981840301815291905280516020909101206060820181905260038401556001600160a01b038216156126f2576002830180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0384161790555b8367ffffffffffffffff167f4be92415590c4554edbd7d3fbf308eeb6e5d00ababade0791f835b4a18416ed68460405161272c9190614cd2565b60405180910390a2612839565b60028301546001600160a01b0383811691161461278e576040517fc35aa79d00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff85166004820152602401610962565b60208560200151610160015163ffffffff1610156127f257602085015161016001516040517f24ecdc020000000000000000000000000000000000000000000000000000000081526000600482015263ffffffff9091166024820152604401610962565b8367ffffffffffffffff167f1173725509a61aed633c58cd12e31c104cd26ca24f6c270c8ac81c5f6f12e8e986602001516040516128309190614e73565b60405180910390a25b5050505050806001019050612259565b60005b8151811015610fac57600082828151811061286957612869614755565b6020026020010151600001519050600083838151811061288b5761288b614755565b6020908102919091018101518101516001600160a01b03841660008181526007845260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff85169081179091559051908152919350917fbb77da6f7210cdd16904228a9360133d1d7dfff99b1bc75f128da5b53e28f97d910160405180910390a2505060010161284c565b60208101516001600160a01b0316158061294b575060608101516001600160a01b0316155b15612982576040517f35be3ac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8051600280547fffffffffffffffffffffffff00000000000000000000000000000000000000009081166001600160a01b03938416179091556020808401516003805484169185169190911790556040808501516004805485169186169190911790556060808601516005805490951690861617909355805160c0810182527f0000000000000000000000000000000000000000000000000000000000000000851681527f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff16928101929092527f00000000000000000000000000000000000000000000000000000000000000006bffffffffffffffffffffffff16828201527f00000000000000000000000000000000000000000000000000000000000000008416928201929092527f0000000000000000000000000000000000000000000000000000000000000000831660808201527f000000000000000000000000000000000000000000000000000000000000000090921660a0830152517f4012fe74115805c44a121d8f9edc3d234df8f05f53b52864b8e5e8a30384b8aa91612b34918490614e82565b60405180910390a150565b604080516101a08101825260008082526020820181905291810182905260608082018390526080820183905260a0820183905260c0820183905260e082018390526101008201839052610120820181905261014082018190526101608201526101808101919091526040517f2cbc26bb000000000000000000000000000000000000000000000000000000008152608086901b77ffffffffffffffff000000000000000000000000000000001660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632cbc26bb90602401602060405180830381865afa158015612c42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c66919061481c565b15612ca9576040517ffdbd6a7200000000000000000000000000000000000000000000000000000000815267ffffffffffffffff86166004820152602401610962565b6001600160a01b038216612ce9576040517fa4ec747900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03163314612d2d576040517f1c0a352900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b855460ff16612d74576040517f99ac52f200000000000000000000000000000000000000000000000000000000815267ffffffffffffffff86166004820152602401610962565b6000612da2612d866080870187614544565b60018a0154640100000000900467ffffffffffffffff166115c0565b90506000612db36040870187614592565b9150612dda905087612dc86020890189614544565b9050846000015184866020015161172d565b8015612ece576004546001600160a01b03168015612ecc576040517fe0a0e5060000000000000000000000000000000000000000000000000000000081526001600160a01b0382169063e0a0e50690612e39908b908b90600401614fe4565b600060405180830381600087803b158015612e5357600080fd5b505af1925050508015612e64575060015b612ecc573d808015612e92576040519150601f19603f3d011682016040523d82523d6000602084013e612e97565b606091505b50806040517f09c253250000000000000000000000000000000000000000000000000000000081526004016109629190613a1e565b505b60006001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016612f0a6080890160608a01613945565b6001600160a01b031603612f1f575084612ff2565b6003546001600160a01b03166241e5be612f3f60808a0160608b01613945565b60405160e083901b7fffffffff000000000000000000000000000000000000000000000000000000001681526001600160a01b039182166004820152602481018a90527f00000000000000000000000000000000000000000000000000000000000000009091166044820152606401602060405180830381865afa158015612fcb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fef9190614784565b90505b6130026080880160608901613945565b6001600160a01b03167f075a2720282fdf622141dae0b048ef90a21a7e57c134c76912d19d006b3b3f6f8260405161303c91815260200190565b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000006bffffffffffffffffffffffff168111156130e3576040517f6a92a483000000000000000000000000000000000000000000000000000000008152600481018290526bffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166024820152604401610962565b604080516101a08101825267ffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001681526001600160a01b038716602082015290810161317461313a8a80614544565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506133f792505050565b6001600160a01b031681526020018a600201601481819054906101000a900467ffffffffffffffff166131a690615102565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905567ffffffffffffffff1681526020018460000151815260200160001515815260200184602001516132b0576040517fea458c0c00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8b1660048201526001600160a01b0388811660248301527f0000000000000000000000000000000000000000000000000000000000000000169063ea458c0c906044016020604051808303816000875af1158015613287573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132ab9190615129565b6132b3565b60005b67ffffffffffffffff1681526020016132d260808a0160608b01613945565b6001600160a01b031681526020018781526020018880602001906132f69190614544565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509082525060200161333d60408a018a614592565b808060200260200160405190810160405280939291908181526020016000905b828210156133895761337a604083028601368190038101906147e2565b8152602001906001019061335d565b505050505081526020018367ffffffffffffffff8111156133ac576133ac613cca565b6040519080825280602002602001820160405280156133df57816020015b60608152602001906001900390816133ca5790505b50815260006020909101529998505050505050505050565b6000815160201461343657816040517f8d666f600000000000000000000000000000000000000000000000000000000081526004016109629190613a1e565b610d218280602001905181019061344d9190614784565b613790565b60008060001b8284602001518560400151866060015187608001518860a001518960c001518a60e001518b61010001516040516020016134e89897969594939291906001600160a01b039889168152968816602088015267ffffffffffffffff95861660408801526060870194909452911515608086015290921660a0840152921660c082015260e08101919091526101000190565b60405160208183030381529060405280519060200120856101200151805190602001208661014001516040516020016135219190615146565b6040516020818303038152906040528051906020012087610160015160405160200161354d9190615159565b60408051601f198184030181528282528051602091820120908301979097528101949094526060840192909252608083015260a082015260c081019190915260e00160405160208183030381529060405280519060200120905092915050565b336001600160a01b038216036136055760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610962565b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000670de0b6b3a76400006136a1837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8616614661565b610f93919061468b565b6000613700826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166137fd9092919063ffffffff16565b805190915015610ee6578080602001905181019061371e919061481c565b610ee65760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610962565b60006001600160a01b038211806137a8575061040082105b156137f95760408051602081018490520160408051601f19818403018152908290527f8d666f6000000000000000000000000000000000000000000000000000000000825261096291600401613a1e565b5090565b6060611573848460008585600080866001600160a01b03168587604051613824919061516c565b60006040518083038185875af1925050503d8060008114613861576040519150601f19603f3d011682016040523d82523d6000602084013e613866565b606091505b509150915061387787838387613882565b979650505050505050565b606083156138f15782516000036138ea576001600160a01b0385163b6138ea5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610962565b5081611573565b61157383838151156139065781518083602001fd5b8060405162461bcd60e51b81526004016109629190613a1e565b6001600160a01b03811681146110ce57600080fd5b803561394081613920565b919050565b60006020828403121561395757600080fd5b8135610f9381613920565b60c08101610d2182846001600160a01b0380825116835267ffffffffffffffff60208301511660208401526bffffffffffffffffffffffff60408301511660408401528060608301511660608401528060808301511660808401528060a08301511660a0840152505050565b60005b838110156139e95781810151838201526020016139d1565b50506000910152565b60008151808452613a0a8160208601602086016139ce565b601f01601f19169290920160200192915050565b602081526000610f9360208301846139f2565b67ffffffffffffffff811681146110ce57600080fd5b803561394081613a31565b600060a08284031215613a6457600080fd5b50919050565b60008060408385031215613a7d57600080fd5b8235613a8881613a31565b9150602083013567ffffffffffffffff811115613aa457600080fd5b613ab085828601613a52565b9150509250929050565b60008060408385031215613acd57600080fd5b8235613ad881613a31565b91506020830135613ae881613920565b809150509250929050565b600060208284031215613b0557600080fd5b8135610f9381613a31565b8051151582526020810151613b2b602084018261ffff169052565b506040810151613b43604084018263ffffffff169052565b506060810151613b5b606084018263ffffffff169052565b506080810151613b73608084018263ffffffff169052565b5060a0810151613b8960a084018261ffff169052565b5060c0810151613ba160c084018263ffffffff169052565b5060e0810151613bb760e084018261ffff169052565b506101008181015161ffff9081169184019190915261012080830151909116908301526101408082015163ffffffff90811691840191909152610160808301518216908401526101808083015167ffffffffffffffff908116918501919091526101a080840151909116908401526101c080830151909116908301526101e0908101511515910152565b600061026082019050613c55828451613b10565b60208301516001600160a01b0316610200830152604083015167ffffffffffffffff166102208301526060909201516102409091015290565b60808101610d21828480516001600160a01b03908116835260208083015182169084015260408083015182169084015260609182015116910152565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715613d1c57613d1c613cca565b60405290565b60405160c0810167ffffffffffffffff81118282101715613d1c57613d1c613cca565b6040516060810167ffffffffffffffff81118282101715613d1c57613d1c613cca565b604051610200810167ffffffffffffffff81118282101715613d1c57613d1c613cca565b604051601f8201601f1916810167ffffffffffffffff81118282101715613db557613db5613cca565b604052919050565b600067ffffffffffffffff821115613dd757613dd7613cca565b5060051b60200190565b803563ffffffff8116811461394057600080fd5b803561ffff8116811461394057600080fd5b80151581146110ce57600080fd5b803561394081613e07565b600082601f830112613e3157600080fd5b81356020613e46613e4183613dbd565b613d8c565b82815260069290921b84018101918181019086841115613e6557600080fd5b8286015b84811015613eb65760408189031215613e825760008081fd5b613e8a613cf9565b8135613e9581613a31565b815281850135613ea481613920565b81860152835291830191604001613e69565b509695505050505050565b60008060408385031215613ed457600080fd5b67ffffffffffffffff83351115613eea57600080fd5b83601f843585010112613efc57600080fd5b613f0c613e418435850135613dbd565b8335840180358083526020808401939260059290921b90910101861015613f3257600080fd5b602085358601015b85358601803560051b016020018110156141055767ffffffffffffffff81351115613f6457600080fd5b6040601f19823588358901018903011215613f7e57600080fd5b613f86613cf9565b613f996020833589358a01010135613a31565b863587018235016020810135825267ffffffffffffffff6040909101351115613fc157600080fd5b86358701823501604081013501603f81018913613fdd57600080fd5b613fed613e416020830135613dbd565b602082810135808352908201919060e00283016040018b101561400f57600080fd5b604083015b604060e06020860135028501018110156140ec5760e0818d03121561403857600080fd5b614040613cf9565b61404a8235613920565b8135815260c0601f19838f0301121561406257600080fd5b61406a613d22565b61407660208401613de1565b815261408460408401613de1565b602082015261409560608401613df5565b60408201526140a660808401613de1565b60608201526140b760a08401613de1565b60808201526140c960c0840135613e07565b60c083013560a0820152602082810191909152908452929092019160e001614014565b5060208481019190915292865250509283019201613f3a565b5092505067ffffffffffffffff6020840135111561412257600080fd5b6141328460208501358501613e20565b90509250929050565b6000602080838503121561414e57600080fd5b823567ffffffffffffffff81111561416557600080fd5b8301601f8101851361417657600080fd5b8035614184613e4182613dbd565b81815261024091820283018401918482019190888411156141a457600080fd5b938501935b8385101561433c57848903818112156141c25760008081fd5b6141ca613d45565b86356141d581613a31565b8152610200601f1983018113156141ec5760008081fd5b6141f4613d68565b9250614201898901613e15565b83526040614210818a01613df5565b8a8501526060614221818b01613de1565b828601526080614232818c01613de1565b8287015260a09150614245828c01613de1565b9086015260c06142568b8201613df5565b8287015260e09150614269828c01613de1565b9086015261010061427b8b8201613df5565b82870152610120915061428f828c01613df5565b908601526101406142a18b8201613df5565b8287015261016091506142b5828c01613de1565b908601526101806142c78b8201613de1565b828701526101a091506142db828c01613a47565b908601526101c06142ed8b8201613a47565b828701526101e09150614301828c01613de1565b908601526143108a8401613e15565b8186015250838a8401526143276102208a01613935565b908301525084525093840193918501916141a9565b50979650505050505050565b6000602080838503121561435b57600080fd5b823567ffffffffffffffff81111561437257600080fd5b8301601f8101851361438357600080fd5b8035614391613e4182613dbd565b81815260069190911b820183019083810190878311156143b057600080fd5b928401925b8284101561387757604084890312156143ce5760008081fd5b6143d6613cf9565b84356143e181613920565b8152848601356143f081613a31565b81870152825260409390930192908401906143b5565b60006080828403121561441857600080fd5b6040516080810181811067ffffffffffffffff8211171561443b5761443b613cca565b604052823561444981613920565b8152602083013561445981613920565b6020820152604083013561446c81613920565b6040820152606083013561447f81613920565b60608201529392505050565b600080600080608085870312156144a157600080fd5b84356144ac81613a31565b9350602085013567ffffffffffffffff8111156144c857600080fd5b6144d487828801613a52565b9350506040850135915060608501356144ec81613920565b939692955090935050565b6020808252825182820181905260009190848201906040850190845b818110156145385783516001600160a01b031683529284019291840191600101614513565b50909695505050505050565b6000808335601e1984360301811261455b57600080fd5b83018035915067ffffffffffffffff82111561457657600080fd5b60200191503681900382131561458b57600080fd5b9250929050565b6000808335601e198436030181126145a957600080fd5b83018035915067ffffffffffffffff8211156145c457600080fd5b6020019150600681901b360382131561458b57600080fd5b80517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8116811461394057600080fd5b6000806040838503121561461b57600080fd5b614624836145dc565b9150614132602084016145dc565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082028115828204841417610d2157610d21614632565b80820180821115610d2157610d21614632565b6000826146c1577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600060208083850312156146d957600080fd5b825167ffffffffffffffff8111156146f057600080fd5b8301601f8101851361470157600080fd5b805161470f613e4182613dbd565b81815260059190911b8201830190838101908783111561472e57600080fd5b928401925b8284101561387757835161474681613920565b82529284019290840190614733565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006020828403121561479657600080fd5b5051919050565b6000602082840312156147af57600080fd5b8151610f9381613920565b67ffffffffffffffff8181168382160190808211156147db576147db614632565b5092915050565b6000604082840312156147f457600080fd5b6147fc613cf9565b823561480781613920565b81526020928301359281019290925250919050565b60006020828403121561482e57600080fd5b8151610f9381613e07565b602081526000825160a0602084015261485560c08401826139f2565b905067ffffffffffffffff602085015116604084015260408401516001600160a01b038082166060860152606086015160808601528060808701511660a086015250508091505092915050565b600082601f8301126148b357600080fd5b815167ffffffffffffffff8111156148cd576148cd613cca565b6148e06020601f19601f84011601613d8c565b8181528460208386010111156148f557600080fd5b6115738260208301602087016139ce565b60006020828403121561491857600080fd5b815167ffffffffffffffff8082111561493057600080fd5b908301906040828603121561494457600080fd5b61494c613cf9565b82518281111561495b57600080fd5b614967878286016148a2565b82525060208301518281111561497c57600080fd5b614988878286016148a2565b60208301525095945050505050565b6020815260008251606060208401526149b360808401826139f2565b90506020840151601f19808584030160408601526149d183836139f2565b92506040860151915080858403016060860152506149ef82826139f2565b95945050505050565b60008151808452602080850194506020840160005b83811015614a3d57815180516001600160a01b031688528301518388015260409096019590820190600101614a0d565b509495945050505050565b60008282518085526020808601955060208260051b8401016020860160005b84811015614a9557601f19868403018952614a838383516139f2565b98840198925090830190600101614a67565b5090979650505050505050565b60208152614abd60208201835167ffffffffffffffff169052565b60006020830151614ad960408401826001600160a01b03169052565b5060408301516001600160a01b038116606084015250606083015167ffffffffffffffff8116608084015250608083015160a083015260a0830151614b2260c084018215159052565b5060c083015167ffffffffffffffff811660e08401525060e0830151610100614b55818501836001600160a01b03169052565b840151610120848101919091528401516101a061014080860182905291925090614b836101c08601846139f2565b9250808601519050601f19610160818786030181880152614ba485846149f8565b945080880151925050610180818786030181880152614bc38584614a48565b970151959092019490945250929392505050565b7fffffffff000000000000000000000000000000000000000000000000000000008135818116916004851015614c175780818660040360031b1b83161692505b505092915050565b60008085851115614c2f57600080fd5b83861115614c3c57600080fd5b5050820193919092039150565b600060408284031215614c5b57600080fd5b614c63613cf9565b823581526020830135614c7581613e07565b60208201529392505050565b600060208284031215614c9357600080fd5b5035919050565b63ffffffff8181168382160190808211156147db576147db614632565b600060208284031215614cc957600080fd5b610f93826145dc565b815460ff81161515825261026082019061ffff600882901c8116602085015263ffffffff601883901c81166040860152614d1960608601828560381c1663ffffffff169052565b614d3060808601828560581c1663ffffffff169052565b614d4560a08601838560781c1661ffff169052565b614d5c60c08601828560881c1663ffffffff169052565b614d7160e08601838560a81c1661ffff169052565b614d876101008601838560b81c1661ffff169052565b614d9d6101208601838560c81c1661ffff169052565b614db56101408601828560d81c1663ffffffff169052565b600186015463ffffffff82821616610160870152925067ffffffffffffffff602084901c81166101808701529150614dff6101a08601838560601c1667ffffffffffffffff169052565b614e176101c08601828560a01c1663ffffffff169052565b50614e2d6101e0850160ff8460c01c1615159052565b60028501546001600160a01b0381166102008601529150614e606102208501828460a01c1667ffffffffffffffff169052565b5050600383015461024083015292915050565b6102008101610d218284613b10565b6101408101614eef82856001600160a01b0380825116835267ffffffffffffffff60208301511660208401526bffffffffffffffffffffffff60408301511660408401528060608301511660608401528060808301511660808401528060a08301511660a0840152505050565b82516001600160a01b0390811660c08401526020840151811660e084015260408401518116610100840152606084015116610120830152610f93565b6000808335601e19843603018112614f4257600080fd5b830160208101925035905067ffffffffffffffff811115614f6257600080fd5b80360382131561458b57600080fd5b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b8183526000602080850194508260005b85811015614a3d578135614fbf81613920565b6001600160a01b03168752818301358388015260409687019690910190600101614fac565b600067ffffffffffffffff8085168352604060208401526150058485614f2b565b60a0604086015261501a60e086018284614f71565b91505061502a6020860186614f2b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc080878503016060880152615060848385614f71565b935060408801359250601e1988360301831261507b57600080fd5b6020928801928301923591508482111561509457600080fd5b8160061b36038313156150a657600080fd5b808785030160808801526150bb848385614f9c565b94506150c960608901613935565b6001600160a01b03811660a089015293506150e76080890189614f2b565b94509250808786030160c08801525050613877838383614f71565b600067ffffffffffffffff80831681810361511f5761511f614632565b6001019392505050565b60006020828403121561513b57600080fd5b8151610f9381613a31565b602081526000610f9360208301846149f8565b602081526000610f936020830184614a48565b6000825161517e8184602087016139ce565b919091019291505056fea164736f6c6343000818000a", + ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"linkToken\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"maxFeeJuelsPerMsg\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"nonceManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAdminRegistry\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.StaticConfig\",\"name\":\"staticConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"priceRegistry\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"messageValidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeAggregator\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint16\",\"name\":\"maxNumberOfTokensPerMsg\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxDataBytes\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerMsgGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerPayloadByte\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destDataAvailabilityOverheadGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerDataAvailabilityByte\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"destDataAvailabilityMultiplierBps\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"defaultTokenFeeUSDCents\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"defaultTxGasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"gasMultiplierWeiPerEth\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"networkFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"enforceOutOfOrder\",\"type\":\"bool\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DestChainDynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"prevOnRamp\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DestChainConfigArgs[]\",\"name\":\"destChainConfigArgs\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"premiumMultiplierWeiPerEth\",\"type\":\"uint64\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.PremiumMultiplierWeiPerEthArgs[]\",\"name\":\"premiumMultiplierWeiPerEthArgs\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"minFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"deciBps\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.TokenTransferFeeConfig\",\"name\":\"tokenTransferFeeConfig\",\"type\":\"tuple\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.TokenTransferFeeConfigSingleTokenArgs[]\",\"name\":\"tokenTransferFeeConfigs\",\"type\":\"tuple[]\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.TokenTransferFeeConfigArgs[]\",\"name\":\"tokenTransferFeeConfigArgs\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CannotSendZeroTokens\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"}],\"name\":\"CursedByRMN\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"}],\"name\":\"DestinationChainNotEnabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ExtraArgOutOfOrderExecutionMustBeTrue\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GetSupportedTokensFunctionalityRemovedCheckAdminRegistry\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidConfig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"destBytesOverhead\",\"type\":\"uint32\"}],\"name\":\"InvalidDestBytesOverhead\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"}],\"name\":\"InvalidDestChainConfig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"encodedAddress\",\"type\":\"bytes\"}],\"name\":\"InvalidEVMAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidExtraArgsTag\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"msgFeeJuels\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxFeeJuelsPerMsg\",\"type\":\"uint256\"}],\"name\":\"MessageFeeTooHigh\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MessageGasLimitTooHigh\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"actualSize\",\"type\":\"uint256\"}],\"name\":\"MessageTooLarge\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"errorReason\",\"type\":\"bytes\"}],\"name\":\"MessageValidationError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustBeCalledByRouter\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"NotAFeeToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByOwnerOrAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RouterMustSetOriginalSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SourceTokenDataTooLarge\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsupportedNumberOfTokens\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"UnsupportedToken\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"strict\",\"type\":\"bool\"},{\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"feeTokenAmount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"tokenAmounts\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes[]\",\"name\":\"sourceTokenData\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"structInternal.EVM2EVMMessage\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"CCIPSendRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"linkToken\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"maxFeeJuelsPerMsg\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"nonceManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAdminRegistry\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structEVM2EVMMultiOnRamp.StaticConfig\",\"name\":\"staticConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"priceRegistry\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"messageValidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeAggregator\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structEVM2EVMMultiOnRamp.DynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint16\",\"name\":\"maxNumberOfTokensPerMsg\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxDataBytes\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerMsgGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerPayloadByte\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destDataAvailabilityOverheadGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerDataAvailabilityByte\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"destDataAvailabilityMultiplierBps\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"defaultTokenFeeUSDCents\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"defaultTxGasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"gasMultiplierWeiPerEth\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"networkFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"enforceOutOfOrder\",\"type\":\"bool\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DestChainDynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"prevOnRamp\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"metadataHash\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"structEVM2EVMMultiOnRamp.DestChainConfig\",\"name\":\"destChainConfig\",\"type\":\"tuple\"}],\"name\":\"DestChainAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint16\",\"name\":\"maxNumberOfTokensPerMsg\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxDataBytes\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerMsgGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerPayloadByte\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destDataAvailabilityOverheadGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerDataAvailabilityByte\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"destDataAvailabilityMultiplierBps\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"defaultTokenFeeUSDCents\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"defaultTxGasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"gasMultiplierWeiPerEth\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"networkFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"enforceOutOfOrder\",\"type\":\"bool\"}],\"indexed\":false,\"internalType\":\"structEVM2EVMMultiOnRamp.DestChainDynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"}],\"name\":\"DestChainDynamicConfigUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"feeValueJuels\",\"type\":\"uint256\"}],\"name\":\"FeePaid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"feeAggregator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"FeeTokenWithdrawn\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"premiumMultiplierWeiPerEth\",\"type\":\"uint64\"}],\"name\":\"PremiumMultiplierWeiPerEthUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"TokenTransferFeeConfigDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"minFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"deciBps\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"}],\"indexed\":false,\"internalType\":\"structEVM2EVMMultiOnRamp.TokenTransferFeeConfig\",\"name\":\"tokenTransferFeeConfig\",\"type\":\"tuple\"}],\"name\":\"TokenTransferFeeConfigUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint16\",\"name\":\"maxNumberOfTokensPerMsg\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxDataBytes\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerMsgGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerPayloadByte\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destDataAvailabilityOverheadGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerDataAvailabilityByte\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"destDataAvailabilityMultiplierBps\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"defaultTokenFeeUSDCents\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"defaultTxGasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"gasMultiplierWeiPerEth\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"networkFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"enforceOutOfOrder\",\"type\":\"bool\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DestChainDynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"prevOnRamp\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DestChainConfigArgs[]\",\"name\":\"destChainConfigArgs\",\"type\":\"tuple[]\"}],\"name\":\"applyDestChainConfigUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"premiumMultiplierWeiPerEth\",\"type\":\"uint64\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.PremiumMultiplierWeiPerEthArgs[]\",\"name\":\"premiumMultiplierWeiPerEthArgs\",\"type\":\"tuple[]\"}],\"name\":\"applyPremiumMultiplierWeiPerEthUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"minFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"deciBps\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.TokenTransferFeeConfig\",\"name\":\"tokenTransferFeeConfig\",\"type\":\"tuple\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.TokenTransferFeeConfigSingleTokenArgs[]\",\"name\":\"tokenTransferFeeConfigs\",\"type\":\"tuple[]\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.TokenTransferFeeConfigArgs[]\",\"name\":\"tokenTransferFeeConfigArgs\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.TokenTransferFeeConfigRemoveArgs[]\",\"name\":\"tokensToUseDefaultFeeConfigs\",\"type\":\"tuple[]\"}],\"name\":\"applyTokenTransferFeeConfigUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"tokenAmounts\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"}],\"internalType\":\"structClient.EVM2AnyMessage\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"feeTokenAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"originalSender\",\"type\":\"address\"}],\"name\":\"forwardFromRouter\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"}],\"name\":\"getDestChainConfig\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint16\",\"name\":\"maxNumberOfTokensPerMsg\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxDataBytes\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerMsgGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerPayloadByte\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destDataAvailabilityOverheadGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerDataAvailabilityByte\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"destDataAvailabilityMultiplierBps\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"defaultTokenFeeUSDCents\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"defaultTxGasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"gasMultiplierWeiPerEth\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"networkFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"enforceOutOfOrder\",\"type\":\"bool\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DestChainDynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"prevOnRamp\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"metadataHash\",\"type\":\"bytes32\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DestChainConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDynamicConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"priceRegistry\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"messageValidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeAggregator\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"}],\"name\":\"getExpectedNextSequenceNumber\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"tokenAmounts\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"}],\"internalType\":\"structClient.EVM2AnyMessage\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"getFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"feeTokenAmount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"},{\"internalType\":\"contractIERC20\",\"name\":\"sourceToken\",\"type\":\"address\"}],\"name\":\"getPoolBySourceToken\",\"outputs\":[{\"internalType\":\"contractIPoolV1\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getPremiumMultiplierWeiPerEth\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"premiumMultiplierWeiPerEth\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStaticConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"linkToken\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"maxFeeJuelsPerMsg\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"nonceManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAdminRegistry\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.StaticConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"getSupportedTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getTokenTransferFeeConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"minFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"deciBps\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.TokenTransferFeeConfig\",\"name\":\"tokenTransferFeeConfig\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"priceRegistry\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"messageValidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeAggregator\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"}],\"name\":\"setDynamicConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\"},{\"inputs\":[],\"name\":\"withdrawFeeTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x6101406040523480156200001257600080fd5b5060405162006b4538038062006b458339810160408190526200003591620014af565b33806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf8162000214565b505085516001600160a01b031615905080620000e6575060208501516001600160401b0316155b80620000fd575060608501516001600160a01b0316155b8062000114575060808501516001600160a01b0316155b806200012b575060a08501516001600160a01b0316155b156200014a576040516306b7c75960e31b815260040160405180910390fd5b84516001600160a01b0390811660a090815260208701516001600160401b031660c05260408701516001600160601b031660809081526060880151831660e0528701518216610100528601511661012052620001a684620002bf565b620001b18362000482565b620001bc8262000a00565b60408051600080825260208201909252620002099183919062000202565b6040805180820190915260008082526020820152815260200190600190039081620001da5790505b5062000acc565b5050505050620018f7565b336001600160a01b038216036200026e5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60208101516001600160a01b03161580620002e5575060608101516001600160a01b0316155b1562000304576040516306b7c75960e31b815260040160405180910390fd5b8051600280546001600160a01b039283166001600160a01b0319918216179091556020808401516003805491851691841691909117905560408085015160048054918616918516919091179055606080860151600580549187169190951617909355805160c0808201835260a080518716835290516001600160401b031693820193909352608080516001600160601b03168284015260e05186169482019490945261010051851693810193909352610120519093169082015290517f4012fe74115805c44a121d8f9edc3d234df8f05f53b52864b8e5e8a30384b8aa916200047791849082516001600160a01b0390811682526020808501516001600160401b0316818401526040808601516001600160601b03168185015260608087015184168186015260808088015185169086015260a0968701518416968501969096528451831660c085015290840151821660e084015283015181166101008301529190920151166101208201526101400190565b60405180910390a150565b60005b8151811015620009fc576000828281518110620004a657620004a6620015f5565b602002602001015190506000838381518110620004c757620004c7620015f5565b6020026020010151600001519050806001600160401b031660001480620004fe5750602082015161018001516001600160401b0316155b15620005295760405163c35aa79d60e01b81526001600160401b038216600482015260240162000083565b600060066000836001600160401b03166001600160401b0316815260200190815260200160002090506000836040015190506000604051806080016040528086602001518152602001836001600160a01b031681526020018460020160149054906101000a90046001600160401b03166001600160401b031681526020018460030154815250905080600001518360000160008201518160000160006101000a81548160ff02191690831515021790555060208201518160000160016101000a81548161ffff021916908361ffff16021790555060408201518160000160036101000a81548163ffffffff021916908363ffffffff16021790555060608201518160000160076101000a81548163ffffffff021916908363ffffffff160217905550608082015181600001600b6101000a81548163ffffffff021916908363ffffffff16021790555060a082015181600001600f6101000a81548161ffff021916908361ffff16021790555060c08201518160000160116101000a81548163ffffffff021916908363ffffffff16021790555060e08201518160000160156101000a81548161ffff021916908361ffff1602179055506101008201518160000160176101000a81548161ffff021916908361ffff1602179055506101208201518160000160196101000a81548161ffff021916908361ffff16021790555061014082015181600001601b6101000a81548163ffffffff021916908363ffffffff1602179055506101608201518160010160006101000a81548163ffffffff021916908363ffffffff1602179055506101808201518160010160046101000a8154816001600160401b0302191690836001600160401b031602179055506101a082015181600101600c6101000a8154816001600160401b0302191690836001600160401b031602179055506101c08201518160010160146101000a81548163ffffffff021916908363ffffffff1602179055506101e08201518160010160186101000a81548160ff02191690831515021790555090505082600301546000801b03620009195760c051604080517f8acd72527118c8324937b1a42e02cd246697c3b633f1742f3cae11de233722b360208201526001600160401b0392831691810191909152908516606082015230608082015260a00160408051601f1981840301815291905280516020909101206060820181905260038401556001600160a01b03821615620008d0576002830180546001600160a01b0319166001600160a01b0384161790555b836001600160401b03167f4be92415590c4554edbd7d3fbf308eeb6e5d00ababade0791f835b4a18416ed6846040516200090b91906200160b565b60405180910390a2620009eb565b60028301546001600160a01b03838116911614620009565760405163c35aa79d60e01b81526001600160401b038516600482015260240162000083565b60208560200151610160015163ffffffff161015620009a357602085015161016001516040516312766e0160e11b81526000600482015263ffffffff909116602482015260440162000083565b836001600160401b03167f1173725509a61aed633c58cd12e31c104cd26ca24f6c270c8ac81c5f6f12e8e98660200151604051620009e29190620017b5565b60405180910390a25b505050505080600101905062000485565b5050565b60005b8151811015620009fc57600082828151811062000a245762000a24620015f5565b6020026020010151600001519050600083838151811062000a495762000a49620015f5565b6020908102919091018101518101516001600160a01b03841660008181526007845260409081902080546001600160401b0319166001600160401b0385169081179091559051908152919350917fbb77da6f7210cdd16904228a9360133d1d7dfff99b1bc75f128da5b53e28f97d910160405180910390a2505060010162000a03565b60005b825181101562000d3957600083828151811062000af05762000af0620015f5565b6020026020010151905060008160000151905060005b82602001515181101562000d2a5760008360200151828151811062000b2f5762000b2f620015f5565b602002602001015160200151905060008460200151838151811062000b585762000b58620015f5565b60200260200101516000015190506020826080015163ffffffff16101562000bb15760808201516040516312766e0160e11b81526001600160a01b038316600482015263ffffffff909116602482015260440162000083565b6001600160401b03841660008181526008602090815260408083206001600160a01b0386168085529083529281902086518154938801518389015160608a015160808b015160a08c01511515600160901b0260ff60901b1963ffffffff928316600160701b021664ffffffffff60701b199383166a01000000000000000000000263ffffffff60501b1961ffff90961668010000000000000000029590951665ffffffffffff60401b19968416640100000000026001600160401b0319909b16939097169290921798909817939093169390931717919091161792909217909155519091907f94967ae9ea7729ad4f54021c1981765d2b1d954f7c92fbec340aa0a54f46b8b59062000d17908690600060c08201905063ffffffff80845116835280602085015116602084015261ffff60408501511660408401528060608501511660608401528060808501511660808401525060a0830151151560a083015292915050565b60405180910390a3505060010162000b06565b50505080600101905062000acf565b5060005b815181101562000dff57600082828151811062000d5e5762000d5e620015f5565b6020026020010151600001519050600083838151811062000d835762000d83620015f5565b6020908102919091018101518101516001600160401b03841660008181526008845260408082206001600160a01b038516808452955280822080546001600160981b03191690555192945090917f4de5b1bcbca6018c11303a2c3f4a4b4f22a1c741d8c4ba430d246ac06c5ddf8b9190a3505060010162000d3d565b505050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b038111828210171562000e3f5762000e3f62000e04565b60405290565b60405161020081016001600160401b038111828210171562000e3f5762000e3f62000e04565b604080519081016001600160401b038111828210171562000e3f5762000e3f62000e04565b60405160c081016001600160401b038111828210171562000e3f5762000e3f62000e04565b604051601f8201601f191681016001600160401b038111828210171562000ee05762000ee062000e04565b604052919050565b80516001600160a01b038116811462000f0057600080fd5b919050565b80516001600160401b038116811462000f0057600080fd5b60006080828403121562000f3057600080fd5b604051608081016001600160401b038111828210171562000f555762000f5562000e04565b60405290508062000f668362000ee8565b815262000f766020840162000ee8565b602082015262000f896040840162000ee8565b604082015262000f9c6060840162000ee8565b60608201525092915050565b60006001600160401b0382111562000fc45762000fc462000e04565b5060051b60200190565b8051801515811462000f0057600080fd5b805161ffff8116811462000f0057600080fd5b805163ffffffff8116811462000f0057600080fd5b600082601f8301126200101957600080fd5b81516020620010326200102c8362000fa8565b62000eb5565b82815261024092830285018201928282019190878511156200105357600080fd5b8387015b85811015620012125780890382811215620010725760008081fd5b6200107c62000e1a565b620010878362000f05565b815261020080601f19840112156200109f5760008081fd5b620010a962000e45565b9250620010b888850162000fce565b83526040620010c981860162000fdf565b898501526060620010dc81870162000ff2565b828601526080620010ef81880162000ff2565b8287015260a091506200110482880162000ff2565b9086015260c06200111787820162000fdf565b8287015260e091506200112c82880162000ff2565b908601526101006200114087820162000fdf565b8287015261012091506200115682880162000fdf565b908601526101406200116a87820162000fdf565b8287015261016091506200118082880162000ff2565b908601526101806200119487820162000ff2565b828701526101a09150620011aa82880162000f05565b908601526101c0620011be87820162000f05565b828701526101e09150620011d482880162000ff2565b90860152620011e586840162000fce565b81860152508389840152620011fe610220860162000ee8565b908301525085525092840192810162001057565b5090979650505050505050565b600082601f8301126200123157600080fd5b81516020620012446200102c8362000fa8565b82815260069290921b840181019181810190868411156200126457600080fd5b8286015b84811015620012ba5760408189031215620012835760008081fd5b6200128d62000e6b565b620012988262000ee8565b8152620012a785830162000f05565b8186015283529183019160400162001268565b509695505050505050565b600082601f830112620012d757600080fd5b81516020620012ea6200102c8362000fa8565b82815260059290921b840181019181810190868411156200130a57600080fd5b8286015b84811015620012ba5780516001600160401b03808211156200132f57600080fd5b908801906040601f19838c0381018213156200134a57600080fd5b6200135462000e6b565b6200136189860162000f05565b815282850151848111156200137557600080fd5b8086019550508c603f8601126200138b57600080fd5b888501519350620013a06200102c8562000fa8565b84815260e09094028501830193898101908e861115620013bf57600080fd5b958401955b858710156200149857868f0360e0811215620013df57600080fd5b620013e962000e6b565b620013f48962000ee8565b815260c086830112156200140757600080fd5b6200141162000e90565b9150620014208d8a0162000ff2565b82526200142f878a0162000ff2565b8d8301526200144160608a0162000fdf565b878301526200145360808a0162000ff2565b60608301526200146660a08a0162000ff2565b60808301526200147960c08a0162000fce565b60a0830152808d0191909152825260e09690960195908a0190620013c4565b828b0152508752505050928401925083016200130e565b60008060008060008587036101a0811215620014ca57600080fd5b60c0811215620014d957600080fd5b50620014e462000e90565b620014ef8762000ee8565b8152620014ff6020880162000f05565b602082015260408701516001600160601b03811681146200151f57600080fd5b6040820152620015326060880162000ee8565b6060820152620015456080880162000ee8565b60808201526200155860a0880162000ee8565b60a082015294506200156e8760c0880162000f1d565b6101408701519094506001600160401b03808211156200158d57600080fd5b6200159b89838a0162001007565b9450610160880151915080821115620015b357600080fd5b620015c189838a016200121f565b9350610180880151915080821115620015d957600080fd5b50620015e888828901620012c5565b9150509295509295909350565b634e487b7160e01b600052603260045260246000fd5b815460ff81161515825261026082019061ffff600882901c8116602085015263ffffffff601883901c811660408601526200165360608601828560381c1663ffffffff169052565b6200166b60808601828560581c1663ffffffff169052565b6200168160a08601838560781c1661ffff169052565b6200169960c08601828560881c1663ffffffff169052565b620016af60e08601838560a81c1661ffff169052565b620016c66101008601838560b81c1661ffff169052565b620016dd6101208601838560c81c1661ffff169052565b620016f66101408601828560d81c1663ffffffff169052565b600186015463ffffffff8282161661016087015292506001600160401b03602084901c811661018087015291506200173f6101a08601838560601c166001600160401b03169052565b620017586101c08601828560a01c1663ffffffff169052565b506200176f6101e0850160ff8460c01c1615159052565b60028501546001600160a01b0381166102008601529150620017a26102208501828460a01c166001600160401b03169052565b5050600383015461024083015292915050565b81511515815261020081016020830151620017d6602084018261ffff169052565b506040830151620017ef604084018263ffffffff169052565b50606083015162001808606084018263ffffffff169052565b50608083015162001821608084018263ffffffff169052565b5060a08301516200183860a084018261ffff169052565b5060c08301516200185160c084018263ffffffff169052565b5060e08301516200186860e084018261ffff169052565b506101008381015161ffff9081169184019190915261012080850151909116908301526101408084015163ffffffff9081169184019190915261016080850151821690840152610180808501516001600160401b03908116918501919091526101a080860151909116908401526101c080850151909116908301526101e0928301511515929091019190915290565b60805160a05160c05160e0516101005161012051615195620019b0600039600081816102da01528181610f260152612adf0152600081816102ab01528181612ab7015261323e01526000818161027c01528181612a8d0152612bf30152600081816102180152818161265001528181612a2801526130f90152600081816101e901528181612a0301528181612eda0152612f8401526000818161024801528181612a5a0152818161304601526130b601526151956000f3fe608060405234801561001057600080fd5b50600436106101515760003560e01c806379ba5097116100cd578063a69c64c011610081578063df0aa9e911610066578063df0aa9e9146108c0578063f2fde38b146108d3578063fbca3b74146108e657600080fd5b8063a69c64c01461089a578063a6f3ab6c146108ad57600080fd5b80638da5cb5b116100b25780638da5cb5b146108635780639041be3d14610874578063932e53c81461088757600080fd5b806379ba5097146106f857806382b49eb01461070057600080fd5b80633a019940116101245780636def4ce7116101095780636def4ce7146103b65780637437ff9f14610672578063770e2dc4146106e557600080fd5b80633a0199401461038157806348a98aa41461038b57600080fd5b8063061877e31461015657806306285c69146101a7578063181f5a771461031757806320487ded14610360575b600080fd5b610189610164366004613945565b6001600160a01b031660009081526007602052604090205467ffffffffffffffff1690565b60405167ffffffffffffffff90911681526020015b60405180910390f35b61030a6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a08101919091526040518060c001604052807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020017f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff1681526020017f00000000000000000000000000000000000000000000000000000000000000006bffffffffffffffffffffffff1681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316815250905090565b60405161019e9190613962565b6103536040518060400160405280601c81526020017f45564d3245564d4d756c74694f6e52616d7020312e362e302d6465760000000081525081565b60405161019e9190613a1e565b61037361036e366004613a6a565b610906565b60405190815260200161019e565b610389610d27565b005b61039e610399366004613aba565b610eeb565b6040516001600160a01b03909116815260200161019e565b6106656103c4366004613af3565b604080516102808101825260006080820181815260a0830182905260c0830182905260e08301829052610100830182905261012083018290526101408301829052610160830182905261018083018290526101a083018290526101c083018290526101e08301829052610200830182905261022083018290526102408301829052610260830182905282526020820181905291810182905260608101919091525067ffffffffffffffff908116600090815260066020908152604091829020825161028081018452815460ff80821615156080840190815261ffff610100808504821660a087015263ffffffff63010000008604811660c08801526701000000000000008604811660e08801526b01000000000000000000000086048116918701919091526f01000000000000000000000000000000850482166101208701527101000000000000000000000000000000000085048116610140870152750100000000000000000000000000000000000000000085048216610160870152770100000000000000000000000000000000000000000000008504821661018087015279010000000000000000000000000000000000000000000000000085049091166101a08601527b0100000000000000000000000000000000000000000000000000000090930483166101c085015260018501548084166101e0860152640100000000810489166102008601526c010000000000000000000000008104891661022086015274010000000000000000000000000000000000000000808204909416610240860152780100000000000000000000000000000000000000000000000090049091161515610260840152825260028301546001600160a01b0381169483019490945290920490931691810191909152600390910154606082015290565b60405161019e9190613c41565b6106d860408051608081018252600080825260208201819052918101829052606081019190915250604080516080810182526002546001600160a01b03908116825260035481166020830152600454811692820192909252600554909116606082015290565b60405161019e9190613c8e565b6103896106f3366004613ec1565b610f9a565b610389610fb0565b61080361070e366004613aba565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a08101919091525067ffffffffffffffff9190911660009081526008602090815260408083206001600160a01b0394909416835292815290829020825160c081018452905463ffffffff8082168352640100000000820481169383019390935268010000000000000000810461ffff16938201939093526a01000000000000000000008304821660608201526e01000000000000000000000000000083049091166080820152720100000000000000000000000000000000000090910460ff16151560a082015290565b60405161019e9190600060c08201905063ffffffff80845116835280602085015116602084015261ffff60408501511660408401528060608501511660608401528060808501511660808401525060a0830151151560a083015292915050565b6000546001600160a01b031661039e565b610189610882366004613af3565b611079565b61038961089536600461413b565b6110bd565b6103896108a8366004614348565b6110d1565b6103896108bb366004614406565b6110e2565b6103736108ce36600461448b565b6110f3565b6103896108e1366004613945565b61157b565b6108f96108f4366004613af3565b61158c565b60405161019e91906144f7565b67ffffffffffffffff82166000908152600660205260408120805460ff1661096b576040517f99ac52f200000000000000000000000000000000000000000000000000000000815267ffffffffffffffff851660048201526024015b60405180910390fd5b600061099961097d6080860186614544565b6001850154640100000000900467ffffffffffffffff166115c0565b90506109ca856109ac6020870187614544565b84519091506109be6040890189614592565b9050856020015161172d565b60006007816109df6080880160608901613945565b6001600160a01b03168152602081019190915260400160009081205467ffffffffffffffff169150819003610a5c57610a1e6080860160608701613945565b6040517fa7499d200000000000000000000000000000000000000000000000000000000081526001600160a01b039091166004820152602401610962565b60035460009081906001600160a01b031663ffdb4b37610a8260808a0160608b01613945565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b03909116600482015267ffffffffffffffff8b1660248201526044016040805180830381865afa158015610aed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b119190614608565b90925090506000808080610b2860408c018c614592565b90501115610b6357610b578b610b4460808d0160608e01613945565b87610b5260408f018f614592565b6118a3565b91945092509050610b9a565b6001880154610b979074010000000000000000000000000000000000000000900463ffffffff16662386f26fc10000614661565b92505b875460009077010000000000000000000000000000000000000000000000900461ffff1615610c0657610c038c6dffffffffffffffffffffffffffff607088901c16610be960208f018f614544565b90508e8060400190610bfb9190614592565b905086611c94565b90505b600089600101600c9054906101000a900467ffffffffffffffff1667ffffffffffffffff168463ffffffff168b600001600f9054906101000a900461ffff1661ffff168e8060200190610c599190614544565b610c64929150614661565b8c548c51610c87916b010000000000000000000000900463ffffffff1690614678565b610c919190614678565b610c9b9190614678565b610cb5906dffffffffffffffffffffffffffff8916614661565b610cbf9190614661565b90507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff87168282610cf667ffffffffffffffff8c1689614661565b610d009190614678565b610d0a9190614678565b610d14919061468b565b9a50505050505050505050505b92915050565b600354604080517fcdc73d5100000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163cdc73d5191600480830192869291908290030181865afa158015610d89573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610db191908101906146c6565b6005549091506001600160a01b031660005b8251811015610ee6576000838281518110610de057610de0614755565b60209081029190910101516040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529091506000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610e4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e729190614784565b90508015610edc57610e8e6001600160a01b0383168583611d9a565b816001600160a01b0316846001600160a01b03167f508d7d183612c18fc339b42618912b9fa3239f631dd7ec0671f950200a0fa66e83604051610ed391815260200190565b60405180910390a35b5050600101610dc3565b505050565b6040517fbbe4f6db0000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301526000917f00000000000000000000000000000000000000000000000000000000000000009091169063bbe4f6db90602401602060405180830381865afa158015610f6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f93919061479d565b9392505050565b610fa2611e1a565b610fac8282611e76565b5050565b6001546001600160a01b0316331461100a5760405162461bcd60e51b815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610962565b60008054337fffffffffffffffffffffffff0000000000000000000000000000000000000000808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b67ffffffffffffffff8082166000908152600660205260408120600201549091610d21917401000000000000000000000000000000000000000090041660016147ba565b6110c5611e1a565b6110ce81612256565b50565b6110d9611e1a565b6110ce81612849565b6110ea611e1a565b6110ce81612926565b67ffffffffffffffff841660009081526006602052604081208161111a8288888888612b3f565b905060005b8161014001515181101561151157600061113c6040890189614592565b8381811061114c5761114c614755565b90506040020180360381019061116291906147e2565b905080602001516000036111a2576040517f5cf0444900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006111b28a8360000151610eeb565b90506001600160a01b038116158061126857506040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527faff2afbf0000000000000000000000000000000000000000000000000000000060048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa158015611242573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611266919061481c565b155b156112ad5781516040517fbf16aab60000000000000000000000000000000000000000000000000000000081526001600160a01b039091166004820152602401610962565b6000816001600160a01b0316639a4575b96040518060a001604052808d80600001906112d99190614544565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509082525067ffffffffffffffff8f166020808301919091526001600160a01b03808e16604080850191909152918901516060840152885116608090920191909152517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526113849190600401614839565b6000604051808303816000875af11580156113a3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526113cb9190810190614906565b9050602081602001515111801561142c575067ffffffffffffffff8b16600090815260086020908152604080832086516001600160a01b0316845282529091205490820151516e01000000000000000000000000000090910463ffffffff16105b156114715782516040517f36f536ca0000000000000000000000000000000000000000000000000000000081526001600160a01b039091166004820152602401610962565b805161147c906133f7565b5060408051606081019091526001600160a01b03831660808201528060a0810160405160208183030381529060405281526020018260000151815260200182602001518152506040516020016114d29190614997565b60405160208183030381529060405285610160015185815181106114f8576114f8614755565b602002602001018190525050505080600101905061111f565b50611520818360030154613452565b61018082015260405167ffffffffffffffff8816907fc79f9c3e610deac14de4e704195fe17eab0983ee9916866bc04d16a00f54daa690611562908490614aa2565b60405180910390a261018001519150505b949350505050565b611583611e1a565b6110ce816135ad565b60606040517f9e7177c800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805180820190915260008082526020820152600083900361160157506040805180820190915267ffffffffffffffff8216815260006020820152610f93565b600061160d8486614bd7565b90507fe7e230f0000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000082160161167a576116658460048188614c1f565b8101906116729190614c49565b915050610f93565b7f6859a837000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008216016116fb5760408051808201909152806116db866004818a614c1f565b8101906116e89190614c81565b815260006020909101529150610f939050565b6040517f5247fdce00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8516600090815260066020526040902080546301000000900463ffffffff168511156117a65780546040517f86933789000000000000000000000000000000000000000000000000000000008152630100000090910463ffffffff16600482015260248101869052604401610962565b8054670100000000000000900463ffffffff168411156117f2576040517f4c4fc93a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054610100900461ffff16831115611836576040517f4c056b6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018101547801000000000000000000000000000000000000000000000000900460ff168015611864575081155b1561189b576040517fee433e9900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050565b6000808083815b81811015611c875760008787838181106118c6576118c6614755565b9050604002018036038101906118dc91906147e2565b905060006001600160a01b03166118f78c8360000151610eeb565b6001600160a01b0316036119455780516040517fbf16aab60000000000000000000000000000000000000000000000000000000081526001600160a01b039091166004820152602401610962565b67ffffffffffffffff8b16600090815260086020908152604080832084516001600160a01b03168452825291829020825160c081018452905463ffffffff8082168352640100000000820481169383019390935268010000000000000000810461ffff16938201939093526a01000000000000000000008304821660608201526e01000000000000000000000000000083049091166080820152720100000000000000000000000000000000000090910460ff16151560a08201819052611ab35767ffffffffffffffff8c1660009081526006602052604090208054611a5390790100000000000000000000000000000000000000000000000000900461ffff16662386f26fc10000614661565b611a5d9089614678565b8154909850611a91907b01000000000000000000000000000000000000000000000000000000900463ffffffff1688614c9a565b6001820154909750611aa99063ffffffff1687614c9a565b9550505050611c7f565b604081015160009061ffff1615611bcf5760008c6001600160a01b031684600001516001600160a01b031614611b725760035484516040517f4ab35b0b0000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690634ab35b0b90602401602060405180830381865afa158015611b47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b6b9190614cb7565b9050611b75565b508a5b620186a0836040015161ffff16611bb78660200151847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1661366e90919063ffffffff16565b611bc19190614661565b611bcb919061468b565b9150505b6060820151611bde9088614c9a565b9650816080015186611bf09190614c9a565b8251909650600090611c0f9063ffffffff16662386f26fc10000614661565b905080821015611c2e57611c23818a614678565b985050505050611c7f565b6000836020015163ffffffff16662386f26fc10000611c4d9190614661565b905080831115611c6d57611c61818b614678565b99505050505050611c7f565b611c77838b614678565b995050505050505b6001016118aa565b5050955095509592505050565b60008063ffffffff8316611ca9608086614661565b611cb587610220614678565b611cbf9190614678565b611cc99190614678565b67ffffffffffffffff8816600090815260066020526040812080549293509171010000000000000000000000000000000000810463ffffffff1690611d2b907501000000000000000000000000000000000000000000900461ffff1685614661565b611d359190614678565b825490915077010000000000000000000000000000000000000000000000900461ffff16611d736dffffffffffffffffffffffffffff8a1683614661565b611d7d9190614661565b611d8d90655af3107a4000614661565b9998505050505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610ee69084906136ab565b6000546001600160a01b03163314611e745760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610962565b565b60005b825181101561217f576000838281518110611e9657611e96614755565b6020026020010151905060008160000151905060005b82602001515181101561217157600083602001518281518110611ed157611ed1614755565b6020026020010151602001519050600084602001518381518110611ef757611ef7614755565b60200260200101516000015190506020826080015163ffffffff161015611f675760808201516040517f24ecdc020000000000000000000000000000000000000000000000000000000081526001600160a01b038316600482015263ffffffff9091166024820152604401610962565b67ffffffffffffffff841660008181526008602090815260408083206001600160a01b0386168085529083529281902086518154938801518389015160608a015160808b015160a08c015115157201000000000000000000000000000000000000027fffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffff63ffffffff9283166e01000000000000000000000000000002167fffffffffffffffffffffffffff0000000000ffffffffffffffffffffffffffff9383166a0100000000000000000000027fffffffffffffffffffffffffffffffffffff00000000ffffffffffffffffffff61ffff9096166801000000000000000002959095167fffffffffffffffffffffffffffffffffffff000000000000ffffffffffffffff968416640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000909b16939097169290921798909817939093169390931717919091161792909217909155519091907f94967ae9ea7729ad4f54021c1981765d2b1d954f7c92fbec340aa0a54f46b8b59061215f908690600060c08201905063ffffffff80845116835280602085015116602084015261ffff60408501511660408401528060608501511660608401528060808501511660808401525060a0830151151560a083015292915050565b60405180910390a35050600101611eac565b505050806001019050611e79565b5060005b8151811015610ee65760008282815181106121a0576121a0614755565b602002602001015160000151905060008383815181106121c2576121c2614755565b60209081029190910181015181015167ffffffffffffffff841660008181526008845260408082206001600160a01b038516808452955280822080547fffffffffffffffffffffffffff000000000000000000000000000000000000001690555192945090917f4de5b1bcbca6018c11303a2c3f4a4b4f22a1c741d8c4ba430d246ac06c5ddf8b9190a35050600101612183565b60005b8151811015610fac57600082828151811061227657612276614755565b60200260200101519050600083838151811061229457612294614755565b60200260200101516000015190508067ffffffffffffffff16600014806122cc57506020820151610180015167ffffffffffffffff16155b1561230f576040517fc35aa79d00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff82166004820152602401610962565b6000600660008367ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002090506000836040015190506000604051806080016040528086602001518152602001836001600160a01b031681526020018460020160149054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020018460030154815250905080600001518360000160008201518160000160006101000a81548160ff02191690831515021790555060208201518160000160016101000a81548161ffff021916908361ffff16021790555060408201518160000160036101000a81548163ffffffff021916908363ffffffff16021790555060608201518160000160076101000a81548163ffffffff021916908363ffffffff160217905550608082015181600001600b6101000a81548163ffffffff021916908363ffffffff16021790555060a082015181600001600f6101000a81548161ffff021916908361ffff16021790555060c08201518160000160116101000a81548163ffffffff021916908363ffffffff16021790555060e08201518160000160156101000a81548161ffff021916908361ffff1602179055506101008201518160000160176101000a81548161ffff021916908361ffff1602179055506101208201518160000160196101000a81548161ffff021916908361ffff16021790555061014082015181600001601b6101000a81548163ffffffff021916908363ffffffff1602179055506101608201518160010160006101000a81548163ffffffff021916908363ffffffff1602179055506101808201518160010160046101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506101a082015181600101600c6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506101c08201518160010160146101000a81548163ffffffff021916908363ffffffff1602179055506101e08201518160010160186101000a81548160ff02191690831515021790555090505082600301546000801b0361273957604080517f8acd72527118c8324937b1a42e02cd246697c3b633f1742f3cae11de233722b3602082015267ffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811692820192909252908516606082015230608082015260a00160408051601f1981840301815291905280516020909101206060820181905260038401556001600160a01b038216156126f2576002830180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0384161790555b8367ffffffffffffffff167f4be92415590c4554edbd7d3fbf308eeb6e5d00ababade0791f835b4a18416ed68460405161272c9190614cd2565b60405180910390a2612839565b60028301546001600160a01b0383811691161461278e576040517fc35aa79d00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff85166004820152602401610962565b60208560200151610160015163ffffffff1610156127f257602085015161016001516040517f24ecdc020000000000000000000000000000000000000000000000000000000081526000600482015263ffffffff9091166024820152604401610962565b8367ffffffffffffffff167f1173725509a61aed633c58cd12e31c104cd26ca24f6c270c8ac81c5f6f12e8e986602001516040516128309190614e73565b60405180910390a25b5050505050806001019050612259565b60005b8151811015610fac57600082828151811061286957612869614755565b6020026020010151600001519050600083838151811061288b5761288b614755565b6020908102919091018101518101516001600160a01b03841660008181526007845260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff85169081179091559051908152919350917fbb77da6f7210cdd16904228a9360133d1d7dfff99b1bc75f128da5b53e28f97d910160405180910390a2505060010161284c565b60208101516001600160a01b0316158061294b575060608101516001600160a01b0316155b15612982576040517f35be3ac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8051600280547fffffffffffffffffffffffff00000000000000000000000000000000000000009081166001600160a01b03938416179091556020808401516003805484169185169190911790556040808501516004805485169186169190911790556060808601516005805490951690861617909355805160c0810182527f0000000000000000000000000000000000000000000000000000000000000000851681527f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff16928101929092527f00000000000000000000000000000000000000000000000000000000000000006bffffffffffffffffffffffff16828201527f00000000000000000000000000000000000000000000000000000000000000008416928201929092527f0000000000000000000000000000000000000000000000000000000000000000831660808201527f000000000000000000000000000000000000000000000000000000000000000090921660a0830152517f4012fe74115805c44a121d8f9edc3d234df8f05f53b52864b8e5e8a30384b8aa91612b34918490614e82565b60405180910390a150565b604080516101a08101825260008082526020820181905291810182905260608082018390526080820183905260a0820183905260c0820183905260e082018390526101008201839052610120820181905261014082018190526101608201526101808101919091526040517f2cbc26bb000000000000000000000000000000000000000000000000000000008152608086901b77ffffffffffffffff000000000000000000000000000000001660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632cbc26bb90602401602060405180830381865afa158015612c42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c66919061481c565b15612ca9576040517ffdbd6a7200000000000000000000000000000000000000000000000000000000815267ffffffffffffffff86166004820152602401610962565b6001600160a01b038216612ce9576040517fa4ec747900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03163314612d2d576040517f1c0a352900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b855460ff16612d74576040517f99ac52f200000000000000000000000000000000000000000000000000000000815267ffffffffffffffff86166004820152602401610962565b6000612da2612d866080870187614544565b60018a0154640100000000900467ffffffffffffffff166115c0565b90506000612db36040870187614592565b9150612dda905087612dc86020890189614544565b9050846000015184866020015161172d565b8015612ece576004546001600160a01b03168015612ecc576040517fe0a0e5060000000000000000000000000000000000000000000000000000000081526001600160a01b0382169063e0a0e50690612e39908b908b90600401614fe4565b600060405180830381600087803b158015612e5357600080fd5b505af1925050508015612e64575060015b612ecc573d808015612e92576040519150601f19603f3d011682016040523d82523d6000602084013e612e97565b606091505b50806040517f09c253250000000000000000000000000000000000000000000000000000000081526004016109629190613a1e565b505b60006001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016612f0a6080890160608a01613945565b6001600160a01b031603612f1f575084612ff2565b6003546001600160a01b03166241e5be612f3f60808a0160608b01613945565b60405160e083901b7fffffffff000000000000000000000000000000000000000000000000000000001681526001600160a01b039182166004820152602481018a90527f00000000000000000000000000000000000000000000000000000000000000009091166044820152606401602060405180830381865afa158015612fcb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fef9190614784565b90505b6130026080880160608901613945565b6001600160a01b03167f075a2720282fdf622141dae0b048ef90a21a7e57c134c76912d19d006b3b3f6f8260405161303c91815260200190565b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000006bffffffffffffffffffffffff168111156130e3576040517f6a92a483000000000000000000000000000000000000000000000000000000008152600481018290526bffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166024820152604401610962565b604080516101a08101825267ffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001681526001600160a01b038716602082015290810161317461313a8a80614544565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506133f792505050565b6001600160a01b031681526020018a600201601481819054906101000a900467ffffffffffffffff166131a690615102565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905567ffffffffffffffff1681526020018460000151815260200160001515815260200184602001516132b0576040517fea458c0c00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8b1660048201526001600160a01b0388811660248301527f0000000000000000000000000000000000000000000000000000000000000000169063ea458c0c906044016020604051808303816000875af1158015613287573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132ab9190615129565b6132b3565b60005b67ffffffffffffffff1681526020016132d260808a0160608b01613945565b6001600160a01b031681526020018781526020018880602001906132f69190614544565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509082525060200161333d60408a018a614592565b808060200260200160405190810160405280939291908181526020016000905b828210156133895761337a604083028601368190038101906147e2565b8152602001906001019061335d565b505050505081526020018367ffffffffffffffff8111156133ac576133ac613cca565b6040519080825280602002602001820160405280156133df57816020015b60608152602001906001900390816133ca5790505b50815260006020909101529998505050505050505050565b6000815160201461343657816040517f8d666f600000000000000000000000000000000000000000000000000000000081526004016109629190613a1e565b610d218280602001905181019061344d9190614784565b613790565b60008060001b8284602001518560400151866060015187608001518860a001518960c001518a60e001518b61010001516040516020016134e89897969594939291906001600160a01b039889168152968816602088015267ffffffffffffffff95861660408801526060870194909452911515608086015290921660a0840152921660c082015260e08101919091526101000190565b60405160208183030381529060405280519060200120856101200151805190602001208661014001516040516020016135219190615146565b6040516020818303038152906040528051906020012087610160015160405160200161354d9190615159565b60408051601f198184030181528282528051602091820120908301979097528101949094526060840192909252608083015260a082015260c081019190915260e00160405160208183030381529060405280519060200120905092915050565b336001600160a01b038216036136055760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610962565b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000670de0b6b3a76400006136a1837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8616614661565b610f93919061468b565b6000613700826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166137fd9092919063ffffffff16565b805190915015610ee6578080602001905181019061371e919061481c565b610ee65760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610962565b60006001600160a01b038211806137a8575061040082105b156137f95760408051602081018490520160408051601f19818403018152908290527f8d666f6000000000000000000000000000000000000000000000000000000000825261096291600401613a1e565b5090565b6060611573848460008585600080866001600160a01b03168587604051613824919061516c565b60006040518083038185875af1925050503d8060008114613861576040519150601f19603f3d011682016040523d82523d6000602084013e613866565b606091505b509150915061387787838387613882565b979650505050505050565b606083156138f15782516000036138ea576001600160a01b0385163b6138ea5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610962565b5081611573565b61157383838151156139065781518083602001fd5b8060405162461bcd60e51b81526004016109629190613a1e565b6001600160a01b03811681146110ce57600080fd5b803561394081613920565b919050565b60006020828403121561395757600080fd5b8135610f9381613920565b60c08101610d2182846001600160a01b0380825116835267ffffffffffffffff60208301511660208401526bffffffffffffffffffffffff60408301511660408401528060608301511660608401528060808301511660808401528060a08301511660a0840152505050565b60005b838110156139e95781810151838201526020016139d1565b50506000910152565b60008151808452613a0a8160208601602086016139ce565b601f01601f19169290920160200192915050565b602081526000610f9360208301846139f2565b67ffffffffffffffff811681146110ce57600080fd5b803561394081613a31565b600060a08284031215613a6457600080fd5b50919050565b60008060408385031215613a7d57600080fd5b8235613a8881613a31565b9150602083013567ffffffffffffffff811115613aa457600080fd5b613ab085828601613a52565b9150509250929050565b60008060408385031215613acd57600080fd5b8235613ad881613a31565b91506020830135613ae881613920565b809150509250929050565b600060208284031215613b0557600080fd5b8135610f9381613a31565b8051151582526020810151613b2b602084018261ffff169052565b506040810151613b43604084018263ffffffff169052565b506060810151613b5b606084018263ffffffff169052565b506080810151613b73608084018263ffffffff169052565b5060a0810151613b8960a084018261ffff169052565b5060c0810151613ba160c084018263ffffffff169052565b5060e0810151613bb760e084018261ffff169052565b506101008181015161ffff9081169184019190915261012080830151909116908301526101408082015163ffffffff90811691840191909152610160808301518216908401526101808083015167ffffffffffffffff908116918501919091526101a080840151909116908401526101c080830151909116908301526101e0908101511515910152565b600061026082019050613c55828451613b10565b60208301516001600160a01b0316610200830152604083015167ffffffffffffffff166102208301526060909201516102409091015290565b60808101610d21828480516001600160a01b03908116835260208083015182169084015260408083015182169084015260609182015116910152565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715613d1c57613d1c613cca565b60405290565b60405160c0810167ffffffffffffffff81118282101715613d1c57613d1c613cca565b6040516060810167ffffffffffffffff81118282101715613d1c57613d1c613cca565b604051610200810167ffffffffffffffff81118282101715613d1c57613d1c613cca565b604051601f8201601f1916810167ffffffffffffffff81118282101715613db557613db5613cca565b604052919050565b600067ffffffffffffffff821115613dd757613dd7613cca565b5060051b60200190565b803563ffffffff8116811461394057600080fd5b803561ffff8116811461394057600080fd5b80151581146110ce57600080fd5b803561394081613e07565b600082601f830112613e3157600080fd5b81356020613e46613e4183613dbd565b613d8c565b82815260069290921b84018101918181019086841115613e6557600080fd5b8286015b84811015613eb65760408189031215613e825760008081fd5b613e8a613cf9565b8135613e9581613a31565b815281850135613ea481613920565b81860152835291830191604001613e69565b509695505050505050565b60008060408385031215613ed457600080fd5b67ffffffffffffffff83351115613eea57600080fd5b83601f843585010112613efc57600080fd5b613f0c613e418435850135613dbd565b8335840180358083526020808401939260059290921b90910101861015613f3257600080fd5b602085358601015b85358601803560051b016020018110156141055767ffffffffffffffff81351115613f6457600080fd5b6040601f19823588358901018903011215613f7e57600080fd5b613f86613cf9565b613f996020833589358a01010135613a31565b863587018235016020810135825267ffffffffffffffff6040909101351115613fc157600080fd5b86358701823501604081013501603f81018913613fdd57600080fd5b613fed613e416020830135613dbd565b602082810135808352908201919060e00283016040018b101561400f57600080fd5b604083015b604060e06020860135028501018110156140ec5760e0818d03121561403857600080fd5b614040613cf9565b61404a8235613920565b8135815260c0601f19838f0301121561406257600080fd5b61406a613d22565b61407660208401613de1565b815261408460408401613de1565b602082015261409560608401613df5565b60408201526140a660808401613de1565b60608201526140b760a08401613de1565b60808201526140c960c0840135613e07565b60c083013560a0820152602082810191909152908452929092019160e001614014565b5060208481019190915292865250509283019201613f3a565b5092505067ffffffffffffffff6020840135111561412257600080fd5b6141328460208501358501613e20565b90509250929050565b6000602080838503121561414e57600080fd5b823567ffffffffffffffff81111561416557600080fd5b8301601f8101851361417657600080fd5b8035614184613e4182613dbd565b81815261024091820283018401918482019190888411156141a457600080fd5b938501935b8385101561433c57848903818112156141c25760008081fd5b6141ca613d45565b86356141d581613a31565b8152610200601f1983018113156141ec5760008081fd5b6141f4613d68565b9250614201898901613e15565b83526040614210818a01613df5565b8a8501526060614221818b01613de1565b828601526080614232818c01613de1565b8287015260a09150614245828c01613de1565b9086015260c06142568b8201613df5565b8287015260e09150614269828c01613de1565b9086015261010061427b8b8201613df5565b82870152610120915061428f828c01613df5565b908601526101406142a18b8201613df5565b8287015261016091506142b5828c01613de1565b908601526101806142c78b8201613de1565b828701526101a091506142db828c01613a47565b908601526101c06142ed8b8201613a47565b828701526101e09150614301828c01613de1565b908601526143108a8401613e15565b8186015250838a8401526143276102208a01613935565b908301525084525093840193918501916141a9565b50979650505050505050565b6000602080838503121561435b57600080fd5b823567ffffffffffffffff81111561437257600080fd5b8301601f8101851361438357600080fd5b8035614391613e4182613dbd565b81815260069190911b820183019083810190878311156143b057600080fd5b928401925b8284101561387757604084890312156143ce5760008081fd5b6143d6613cf9565b84356143e181613920565b8152848601356143f081613a31565b81870152825260409390930192908401906143b5565b60006080828403121561441857600080fd5b6040516080810181811067ffffffffffffffff8211171561443b5761443b613cca565b604052823561444981613920565b8152602083013561445981613920565b6020820152604083013561446c81613920565b6040820152606083013561447f81613920565b60608201529392505050565b600080600080608085870312156144a157600080fd5b84356144ac81613a31565b9350602085013567ffffffffffffffff8111156144c857600080fd5b6144d487828801613a52565b9350506040850135915060608501356144ec81613920565b939692955090935050565b6020808252825182820181905260009190848201906040850190845b818110156145385783516001600160a01b031683529284019291840191600101614513565b50909695505050505050565b6000808335601e1984360301811261455b57600080fd5b83018035915067ffffffffffffffff82111561457657600080fd5b60200191503681900382131561458b57600080fd5b9250929050565b6000808335601e198436030181126145a957600080fd5b83018035915067ffffffffffffffff8211156145c457600080fd5b6020019150600681901b360382131561458b57600080fd5b80517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8116811461394057600080fd5b6000806040838503121561461b57600080fd5b614624836145dc565b9150614132602084016145dc565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082028115828204841417610d2157610d21614632565b80820180821115610d2157610d21614632565b6000826146c1577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600060208083850312156146d957600080fd5b825167ffffffffffffffff8111156146f057600080fd5b8301601f8101851361470157600080fd5b805161470f613e4182613dbd565b81815260059190911b8201830190838101908783111561472e57600080fd5b928401925b8284101561387757835161474681613920565b82529284019290840190614733565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006020828403121561479657600080fd5b5051919050565b6000602082840312156147af57600080fd5b8151610f9381613920565b67ffffffffffffffff8181168382160190808211156147db576147db614632565b5092915050565b6000604082840312156147f457600080fd5b6147fc613cf9565b823561480781613920565b81526020928301359281019290925250919050565b60006020828403121561482e57600080fd5b8151610f9381613e07565b602081526000825160a0602084015261485560c08401826139f2565b905067ffffffffffffffff602085015116604084015260408401516001600160a01b038082166060860152606086015160808601528060808701511660a086015250508091505092915050565b600082601f8301126148b357600080fd5b815167ffffffffffffffff8111156148cd576148cd613cca565b6148e06020601f19601f84011601613d8c565b8181528460208386010111156148f557600080fd5b6115738260208301602087016139ce565b60006020828403121561491857600080fd5b815167ffffffffffffffff8082111561493057600080fd5b908301906040828603121561494457600080fd5b61494c613cf9565b82518281111561495b57600080fd5b614967878286016148a2565b82525060208301518281111561497c57600080fd5b614988878286016148a2565b60208301525095945050505050565b6020815260008251606060208401526149b360808401826139f2565b90506020840151601f19808584030160408601526149d183836139f2565b92506040860151915080858403016060860152506149ef82826139f2565b95945050505050565b60008151808452602080850194506020840160005b83811015614a3d57815180516001600160a01b031688528301518388015260409096019590820190600101614a0d565b509495945050505050565b60008282518085526020808601955060208260051b8401016020860160005b84811015614a9557601f19868403018952614a838383516139f2565b98840198925090830190600101614a67565b5090979650505050505050565b60208152614abd60208201835167ffffffffffffffff169052565b60006020830151614ad960408401826001600160a01b03169052565b5060408301516001600160a01b038116606084015250606083015167ffffffffffffffff8116608084015250608083015160a083015260a0830151614b2260c084018215159052565b5060c083015167ffffffffffffffff811660e08401525060e0830151610100614b55818501836001600160a01b03169052565b840151610120848101919091528401516101a061014080860182905291925090614b836101c08601846139f2565b9250808601519050601f19610160818786030181880152614ba485846149f8565b945080880151925050610180818786030181880152614bc38584614a48565b970151959092019490945250929392505050565b7fffffffff000000000000000000000000000000000000000000000000000000008135818116916004851015614c175780818660040360031b1b83161692505b505092915050565b60008085851115614c2f57600080fd5b83861115614c3c57600080fd5b5050820193919092039150565b600060408284031215614c5b57600080fd5b614c63613cf9565b823581526020830135614c7581613e07565b60208201529392505050565b600060208284031215614c9357600080fd5b5035919050565b63ffffffff8181168382160190808211156147db576147db614632565b600060208284031215614cc957600080fd5b610f93826145dc565b815460ff81161515825261026082019061ffff600882901c8116602085015263ffffffff601883901c81166040860152614d1960608601828560381c1663ffffffff169052565b614d3060808601828560581c1663ffffffff169052565b614d4560a08601838560781c1661ffff169052565b614d5c60c08601828560881c1663ffffffff169052565b614d7160e08601838560a81c1661ffff169052565b614d876101008601838560b81c1661ffff169052565b614d9d6101208601838560c81c1661ffff169052565b614db56101408601828560d81c1663ffffffff169052565b600186015463ffffffff82821616610160870152925067ffffffffffffffff602084901c81166101808701529150614dff6101a08601838560601c1667ffffffffffffffff169052565b614e176101c08601828560a01c1663ffffffff169052565b50614e2d6101e0850160ff8460c01c1615159052565b60028501546001600160a01b0381166102008601529150614e606102208501828460a01c1667ffffffffffffffff169052565b5050600383015461024083015292915050565b6102008101610d218284613b10565b6101408101614eef82856001600160a01b0380825116835267ffffffffffffffff60208301511660208401526bffffffffffffffffffffffff60408301511660408401528060608301511660608401528060808301511660808401528060a08301511660a0840152505050565b82516001600160a01b0390811660c08401526020840151811660e084015260408401518116610100840152606084015116610120830152610f93565b6000808335601e19843603018112614f4257600080fd5b830160208101925035905067ffffffffffffffff811115614f6257600080fd5b80360382131561458b57600080fd5b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b8183526000602080850194508260005b85811015614a3d578135614fbf81613920565b6001600160a01b03168752818301358388015260409687019690910190600101614fac565b600067ffffffffffffffff8085168352604060208401526150058485614f2b565b60a0604086015261501a60e086018284614f71565b91505061502a6020860186614f2b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc080878503016060880152615060848385614f71565b935060408801359250601e1988360301831261507b57600080fd5b6020928801928301923591508482111561509457600080fd5b8160061b36038313156150a657600080fd5b808785030160808801526150bb848385614f9c565b94506150c960608901613935565b6001600160a01b03811660a089015293506150e76080890189614f2b565b94509250808786030160c08801525050613877838383614f71565b600067ffffffffffffffff80831681810361511f5761511f614632565b6001019392505050565b60006020828403121561513b57600080fd5b8151610f9381613a31565b602081526000610f9360208301846149f8565b602081526000610f936020830184614a48565b6000825161517e8184602087016139ce565b919091019291505056fea164736f6c6343000818000a", } var EVM2EVMMultiOnRampABI = EVM2EVMMultiOnRampMetaData.ABI @@ -1960,12 +1960,12 @@ func (it *EVM2EVMMultiOnRampTokenTransferFeeConfigDeletedIterator) Close() error } type EVM2EVMMultiOnRampTokenTransferFeeConfigDeleted struct { - DestChainSelector *big.Int + DestChainSelector uint64 Token common.Address Raw types.Log } -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) FilterTokenTransferFeeConfigDeleted(opts *bind.FilterOpts, destChainSelector []*big.Int, token []common.Address) (*EVM2EVMMultiOnRampTokenTransferFeeConfigDeletedIterator, error) { +func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) FilterTokenTransferFeeConfigDeleted(opts *bind.FilterOpts, destChainSelector []uint64, token []common.Address) (*EVM2EVMMultiOnRampTokenTransferFeeConfigDeletedIterator, error) { var destChainSelectorRule []interface{} for _, destChainSelectorItem := range destChainSelector { @@ -1983,7 +1983,7 @@ func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) FilterTokenTransferFeeCon return &EVM2EVMMultiOnRampTokenTransferFeeConfigDeletedIterator{contract: _EVM2EVMMultiOnRamp.contract, event: "TokenTransferFeeConfigDeleted", logs: logs, sub: sub}, nil } -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) WatchTokenTransferFeeConfigDeleted(opts *bind.WatchOpts, sink chan<- *EVM2EVMMultiOnRampTokenTransferFeeConfigDeleted, destChainSelector []*big.Int, token []common.Address) (event.Subscription, error) { +func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) WatchTokenTransferFeeConfigDeleted(opts *bind.WatchOpts, sink chan<- *EVM2EVMMultiOnRampTokenTransferFeeConfigDeleted, destChainSelector []uint64, token []common.Address) (event.Subscription, error) { var destChainSelectorRule []interface{} for _, destChainSelectorItem := range destChainSelector { @@ -2245,7 +2245,7 @@ func (EVM2EVMMultiOnRampPremiumMultiplierWeiPerEthUpdated) Topic() common.Hash { } func (EVM2EVMMultiOnRampTokenTransferFeeConfigDeleted) Topic() common.Hash { - return common.HexToHash("0xfa22e84f9c809b5b7e94f084eb45cf17a5e4703cecef8f27ed35e54b719bffcd") + return common.HexToHash("0x4de5b1bcbca6018c11303a2c3f4a4b4f22a1c741d8c4ba430d246ac06c5ddf8b") } func (EVM2EVMMultiOnRampTokenTransferFeeConfigUpdated) Topic() common.Hash { @@ -2355,9 +2355,9 @@ type EVM2EVMMultiOnRampInterface interface { ParsePremiumMultiplierWeiPerEthUpdated(log types.Log) (*EVM2EVMMultiOnRampPremiumMultiplierWeiPerEthUpdated, error) - FilterTokenTransferFeeConfigDeleted(opts *bind.FilterOpts, destChainSelector []*big.Int, token []common.Address) (*EVM2EVMMultiOnRampTokenTransferFeeConfigDeletedIterator, error) + FilterTokenTransferFeeConfigDeleted(opts *bind.FilterOpts, destChainSelector []uint64, token []common.Address) (*EVM2EVMMultiOnRampTokenTransferFeeConfigDeletedIterator, error) - WatchTokenTransferFeeConfigDeleted(opts *bind.WatchOpts, sink chan<- *EVM2EVMMultiOnRampTokenTransferFeeConfigDeleted, destChainSelector []*big.Int, token []common.Address) (event.Subscription, error) + WatchTokenTransferFeeConfigDeleted(opts *bind.WatchOpts, sink chan<- *EVM2EVMMultiOnRampTokenTransferFeeConfigDeleted, destChainSelector []uint64, token []common.Address) (event.Subscription, error) ParseTokenTransferFeeConfigDeleted(log types.Log) (*EVM2EVMMultiOnRampTokenTransferFeeConfigDeleted, error) diff --git a/core/gethwrappers/ccip/generated/message_hasher/message_hasher.go b/core/gethwrappers/ccip/generated/message_hasher/message_hasher.go new file mode 100644 index 0000000000..f41fb552d4 --- /dev/null +++ b/core/gethwrappers/ccip/generated/message_hasher/message_hasher.go @@ -0,0 +1,345 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package message_hasher + +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 ClientEVMTokenAmount struct { + Token common.Address + Amount *big.Int +} + +type InternalAny2EVMRampMessage struct { + Header InternalRampMessageHeader + Sender []byte + Data []byte + Receiver common.Address + GasLimit *big.Int + TokenAmounts []ClientEVMTokenAmount + SourceTokenData [][]byte +} + +type InternalRampMessageHeader struct { + MessageId [32]byte + SourceChainSelector uint64 + DestChainSelector uint64 + SequenceNumber uint64 + Nonce uint64 +} + +var MessageHasherMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"leafDomainSeparator\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"implicitMetadataHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"fixedSizeFieldsHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"dataHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"tokenAmountsHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"sourceTokenDataHash\",\"type\":\"bytes32\"}],\"name\":\"encodeFinalHashPreimage\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"}],\"name\":\"encodeFixedSizeFieldsHashPreimage\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"any2EVMMessageHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"onRamp\",\"type\":\"bytes\"}],\"name\":\"encodeMetadataHashPreimage\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"sourceTokenData\",\"type\":\"bytes[]\"}],\"name\":\"encodeSourceTokenDataHashPreimage\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"tokenAmounts\",\"type\":\"tuple[]\"}],\"name\":\"encodeTokenAmountsHashPreimage\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"}],\"internalType\":\"structInternal.RampMessageHeader\",\"name\":\"header\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"sender\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"tokenAmounts\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes[]\",\"name\":\"sourceTokenData\",\"type\":\"bytes[]\"}],\"internalType\":\"structInternal.Any2EVMRampMessage\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"onRamp\",\"type\":\"bytes\"}],\"name\":\"hash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b50610bb8806100206000396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c8063bf0619ad11610050578063bf0619ad146100d0578063c2cfa165146100e3578063cd34ba82146100f657600080fd5b80633b61b52e14610077578063a1e747df1461009d578063a91d3aeb146100bd575b600080fd5b61008a6100853660046106e3565b610109565b6040519081526020015b60405180910390f35b6100b06100ab366004610812565b61011c565b60405161009491906108de565b6100b06100cb3660046108f1565b61014e565b6100b06100de366004610972565b610186565b6100b06100f13660046109b5565b6101bd565b6100b06101043660046109f2565b6101e6565b600061011583836101f9565b9392505050565b6060848484846040516020016101359493929190610a27565b6040516020818303038152906040529050949350505050565b606086868686868660405160200161016b96959493929190610a64565b60405160208183030381529060405290509695505050505050565b604080516020810188905290810186905260608181018690526080820185905260a0820184905260c082018390529060e00161016b565b6060816040516020016101d09190610ac4565b6040516020818303038152906040529050919050565b6060816040516020016101d09190610b46565b81516020808201516040928301519251600093849361023f937f2425b0b9f9054c76ff151b0a175b18f37a4a4e82013a72e9f15c9caa095ed21f93909291889101610a27565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052805160209182012086518051888401516060808b0151908401516080808d015195015195976102a69794969395929491939101610a64565b604051602081830303815290604052805190602001208560400151805190602001208660a001516040516020016102dd9190610b46565b604051602081830303815290604052805190602001208760c001516040516020016103089190610ac4565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120908301979097528101949094526060840192909252608083015260a082015260c081019190915260e00160405160208183030381529060405280519060200120905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156103d8576103d8610386565b60405290565b60405160e0810167ffffffffffffffff811182821017156103d8576103d8610386565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561044857610448610386565b604052919050565b803567ffffffffffffffff8116811461046857600080fd5b919050565b600060a0828403121561047f57600080fd5b60405160a0810181811067ffffffffffffffff821117156104a2576104a2610386565b604052823581529050806104b860208401610450565b60208201526104c960408401610450565b60408201526104da60608401610450565b60608201526104eb60808401610450565b60808201525092915050565b600082601f83011261050857600080fd5b813567ffffffffffffffff81111561052257610522610386565b61055360207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601610401565b81815284602083860101111561056857600080fd5b816020850160208301376000918101602001919091529392505050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461046857600080fd5b600067ffffffffffffffff8211156105c3576105c3610386565b5060051b60200190565b600082601f8301126105de57600080fd5b813560206105f36105ee836105a9565b610401565b82815260069290921b8401810191818101908684111561061257600080fd5b8286015b84811015610658576040818903121561062f5760008081fd5b6106376103b5565b61064082610585565b81528185013585820152835291830191604001610616565b509695505050505050565b600082601f83011261067457600080fd5b813560206106846105ee836105a9565b82815260059290921b840181019181810190868411156106a357600080fd5b8286015b8481101561065857803567ffffffffffffffff8111156106c75760008081fd5b6106d58986838b01016104f7565b8452509183019183016106a7565b600080604083850312156106f657600080fd5b823567ffffffffffffffff8082111561070e57600080fd5b90840190610160828703121561072357600080fd5b61072b6103de565b610735878461046d565b815260a08301358281111561074957600080fd5b610755888286016104f7565b60208301525060c08301358281111561076d57600080fd5b610779888286016104f7565b60408301525061078b60e08401610585565b60608201526101008301356080820152610120830135828111156107ae57600080fd5b6107ba888286016105cd565b60a083015250610140830135828111156107d357600080fd5b6107df88828601610663565b60c083015250935060208501359150808211156107fb57600080fd5b50610808858286016104f7565b9150509250929050565b6000806000806080858703121561082857600080fd5b8435935061083860208601610450565b925061084660408601610450565b9150606085013567ffffffffffffffff81111561086257600080fd5b61086e878288016104f7565b91505092959194509250565b6000815180845260005b818110156108a057602081850181015186830182015201610884565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000610115602083018461087a565b60008060008060008060c0878903121561090a57600080fd5b86359550602087013567ffffffffffffffff81111561092857600080fd5b61093489828a016104f7565b95505061094360408801610585565b935061095160608801610450565b92506080870135915061096660a08801610450565b90509295509295509295565b60008060008060008060c0878903121561098b57600080fd5b505084359660208601359650604086013595606081013595506080810135945060a0013592509050565b6000602082840312156109c757600080fd5b813567ffffffffffffffff8111156109de57600080fd5b6109ea84828501610663565b949350505050565b600060208284031215610a0457600080fd5b813567ffffffffffffffff811115610a1b57600080fd5b6109ea848285016105cd565b848152600067ffffffffffffffff808616602084015280851660408401525060806060830152610a5a608083018461087a565b9695505050505050565b86815260c060208201526000610a7d60c083018861087a565b73ffffffffffffffffffffffffffffffffffffffff9690961660408301525067ffffffffffffffff9384166060820152608081019290925290911660a09091015292915050565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b82811015610b39577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0888603018452610b2785835161087a565b94509285019290850190600101610aed565b5092979650505050505050565b602080825282518282018190526000919060409081850190868401855b82811015610b9e578151805173ffffffffffffffffffffffffffffffffffffffff168552860151868501529284019290850190600101610b63565b509197965050505050505056fea164736f6c6343000818000a", +} + +var MessageHasherABI = MessageHasherMetaData.ABI + +var MessageHasherBin = MessageHasherMetaData.Bin + +func DeployMessageHasher(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *MessageHasher, error) { + parsed, err := MessageHasherMetaData.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(MessageHasherBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &MessageHasher{address: address, abi: *parsed, MessageHasherCaller: MessageHasherCaller{contract: contract}, MessageHasherTransactor: MessageHasherTransactor{contract: contract}, MessageHasherFilterer: MessageHasherFilterer{contract: contract}}, nil +} + +type MessageHasher struct { + address common.Address + abi abi.ABI + MessageHasherCaller + MessageHasherTransactor + MessageHasherFilterer +} + +type MessageHasherCaller struct { + contract *bind.BoundContract +} + +type MessageHasherTransactor struct { + contract *bind.BoundContract +} + +type MessageHasherFilterer struct { + contract *bind.BoundContract +} + +type MessageHasherSession struct { + Contract *MessageHasher + CallOpts bind.CallOpts + TransactOpts bind.TransactOpts +} + +type MessageHasherCallerSession struct { + Contract *MessageHasherCaller + CallOpts bind.CallOpts +} + +type MessageHasherTransactorSession struct { + Contract *MessageHasherTransactor + TransactOpts bind.TransactOpts +} + +type MessageHasherRaw struct { + Contract *MessageHasher +} + +type MessageHasherCallerRaw struct { + Contract *MessageHasherCaller +} + +type MessageHasherTransactorRaw struct { + Contract *MessageHasherTransactor +} + +func NewMessageHasher(address common.Address, backend bind.ContractBackend) (*MessageHasher, error) { + abi, err := abi.JSON(strings.NewReader(MessageHasherABI)) + if err != nil { + return nil, err + } + contract, err := bindMessageHasher(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &MessageHasher{address: address, abi: abi, MessageHasherCaller: MessageHasherCaller{contract: contract}, MessageHasherTransactor: MessageHasherTransactor{contract: contract}, MessageHasherFilterer: MessageHasherFilterer{contract: contract}}, nil +} + +func NewMessageHasherCaller(address common.Address, caller bind.ContractCaller) (*MessageHasherCaller, error) { + contract, err := bindMessageHasher(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &MessageHasherCaller{contract: contract}, nil +} + +func NewMessageHasherTransactor(address common.Address, transactor bind.ContractTransactor) (*MessageHasherTransactor, error) { + contract, err := bindMessageHasher(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &MessageHasherTransactor{contract: contract}, nil +} + +func NewMessageHasherFilterer(address common.Address, filterer bind.ContractFilterer) (*MessageHasherFilterer, error) { + contract, err := bindMessageHasher(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &MessageHasherFilterer{contract: contract}, nil +} + +func bindMessageHasher(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := MessageHasherMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +func (_MessageHasher *MessageHasherRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MessageHasher.Contract.MessageHasherCaller.contract.Call(opts, result, method, params...) +} + +func (_MessageHasher *MessageHasherRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MessageHasher.Contract.MessageHasherTransactor.contract.Transfer(opts) +} + +func (_MessageHasher *MessageHasherRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MessageHasher.Contract.MessageHasherTransactor.contract.Transact(opts, method, params...) +} + +func (_MessageHasher *MessageHasherCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MessageHasher.Contract.contract.Call(opts, result, method, params...) +} + +func (_MessageHasher *MessageHasherTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MessageHasher.Contract.contract.Transfer(opts) +} + +func (_MessageHasher *MessageHasherTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MessageHasher.Contract.contract.Transact(opts, method, params...) +} + +func (_MessageHasher *MessageHasherCaller) EncodeFinalHashPreimage(opts *bind.CallOpts, leafDomainSeparator [32]byte, implicitMetadataHash [32]byte, fixedSizeFieldsHash [32]byte, dataHash [32]byte, tokenAmountsHash [32]byte, sourceTokenDataHash [32]byte) ([]byte, error) { + var out []interface{} + err := _MessageHasher.contract.Call(opts, &out, "encodeFinalHashPreimage", leafDomainSeparator, implicitMetadataHash, fixedSizeFieldsHash, dataHash, tokenAmountsHash, sourceTokenDataHash) + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +func (_MessageHasher *MessageHasherSession) EncodeFinalHashPreimage(leafDomainSeparator [32]byte, implicitMetadataHash [32]byte, fixedSizeFieldsHash [32]byte, dataHash [32]byte, tokenAmountsHash [32]byte, sourceTokenDataHash [32]byte) ([]byte, error) { + return _MessageHasher.Contract.EncodeFinalHashPreimage(&_MessageHasher.CallOpts, leafDomainSeparator, implicitMetadataHash, fixedSizeFieldsHash, dataHash, tokenAmountsHash, sourceTokenDataHash) +} + +func (_MessageHasher *MessageHasherCallerSession) EncodeFinalHashPreimage(leafDomainSeparator [32]byte, implicitMetadataHash [32]byte, fixedSizeFieldsHash [32]byte, dataHash [32]byte, tokenAmountsHash [32]byte, sourceTokenDataHash [32]byte) ([]byte, error) { + return _MessageHasher.Contract.EncodeFinalHashPreimage(&_MessageHasher.CallOpts, leafDomainSeparator, implicitMetadataHash, fixedSizeFieldsHash, dataHash, tokenAmountsHash, sourceTokenDataHash) +} + +func (_MessageHasher *MessageHasherCaller) EncodeFixedSizeFieldsHashPreimage(opts *bind.CallOpts, messageId [32]byte, sender []byte, receiver common.Address, sequenceNumber uint64, gasLimit *big.Int, nonce uint64) ([]byte, error) { + var out []interface{} + err := _MessageHasher.contract.Call(opts, &out, "encodeFixedSizeFieldsHashPreimage", messageId, sender, receiver, sequenceNumber, gasLimit, nonce) + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +func (_MessageHasher *MessageHasherSession) EncodeFixedSizeFieldsHashPreimage(messageId [32]byte, sender []byte, receiver common.Address, sequenceNumber uint64, gasLimit *big.Int, nonce uint64) ([]byte, error) { + return _MessageHasher.Contract.EncodeFixedSizeFieldsHashPreimage(&_MessageHasher.CallOpts, messageId, sender, receiver, sequenceNumber, gasLimit, nonce) +} + +func (_MessageHasher *MessageHasherCallerSession) EncodeFixedSizeFieldsHashPreimage(messageId [32]byte, sender []byte, receiver common.Address, sequenceNumber uint64, gasLimit *big.Int, nonce uint64) ([]byte, error) { + return _MessageHasher.Contract.EncodeFixedSizeFieldsHashPreimage(&_MessageHasher.CallOpts, messageId, sender, receiver, sequenceNumber, gasLimit, nonce) +} + +func (_MessageHasher *MessageHasherCaller) EncodeMetadataHashPreimage(opts *bind.CallOpts, any2EVMMessageHash [32]byte, sourceChainSelector uint64, destChainSelector uint64, onRamp []byte) ([]byte, error) { + var out []interface{} + err := _MessageHasher.contract.Call(opts, &out, "encodeMetadataHashPreimage", any2EVMMessageHash, sourceChainSelector, destChainSelector, onRamp) + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +func (_MessageHasher *MessageHasherSession) EncodeMetadataHashPreimage(any2EVMMessageHash [32]byte, sourceChainSelector uint64, destChainSelector uint64, onRamp []byte) ([]byte, error) { + return _MessageHasher.Contract.EncodeMetadataHashPreimage(&_MessageHasher.CallOpts, any2EVMMessageHash, sourceChainSelector, destChainSelector, onRamp) +} + +func (_MessageHasher *MessageHasherCallerSession) EncodeMetadataHashPreimage(any2EVMMessageHash [32]byte, sourceChainSelector uint64, destChainSelector uint64, onRamp []byte) ([]byte, error) { + return _MessageHasher.Contract.EncodeMetadataHashPreimage(&_MessageHasher.CallOpts, any2EVMMessageHash, sourceChainSelector, destChainSelector, onRamp) +} + +func (_MessageHasher *MessageHasherCaller) EncodeSourceTokenDataHashPreimage(opts *bind.CallOpts, sourceTokenData [][]byte) ([]byte, error) { + var out []interface{} + err := _MessageHasher.contract.Call(opts, &out, "encodeSourceTokenDataHashPreimage", sourceTokenData) + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +func (_MessageHasher *MessageHasherSession) EncodeSourceTokenDataHashPreimage(sourceTokenData [][]byte) ([]byte, error) { + return _MessageHasher.Contract.EncodeSourceTokenDataHashPreimage(&_MessageHasher.CallOpts, sourceTokenData) +} + +func (_MessageHasher *MessageHasherCallerSession) EncodeSourceTokenDataHashPreimage(sourceTokenData [][]byte) ([]byte, error) { + return _MessageHasher.Contract.EncodeSourceTokenDataHashPreimage(&_MessageHasher.CallOpts, sourceTokenData) +} + +func (_MessageHasher *MessageHasherCaller) EncodeTokenAmountsHashPreimage(opts *bind.CallOpts, tokenAmounts []ClientEVMTokenAmount) ([]byte, error) { + var out []interface{} + err := _MessageHasher.contract.Call(opts, &out, "encodeTokenAmountsHashPreimage", tokenAmounts) + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +func (_MessageHasher *MessageHasherSession) EncodeTokenAmountsHashPreimage(tokenAmounts []ClientEVMTokenAmount) ([]byte, error) { + return _MessageHasher.Contract.EncodeTokenAmountsHashPreimage(&_MessageHasher.CallOpts, tokenAmounts) +} + +func (_MessageHasher *MessageHasherCallerSession) EncodeTokenAmountsHashPreimage(tokenAmounts []ClientEVMTokenAmount) ([]byte, error) { + return _MessageHasher.Contract.EncodeTokenAmountsHashPreimage(&_MessageHasher.CallOpts, tokenAmounts) +} + +func (_MessageHasher *MessageHasherCaller) Hash(opts *bind.CallOpts, message InternalAny2EVMRampMessage, onRamp []byte) ([32]byte, error) { + var out []interface{} + err := _MessageHasher.contract.Call(opts, &out, "hash", message, onRamp) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +func (_MessageHasher *MessageHasherSession) Hash(message InternalAny2EVMRampMessage, onRamp []byte) ([32]byte, error) { + return _MessageHasher.Contract.Hash(&_MessageHasher.CallOpts, message, onRamp) +} + +func (_MessageHasher *MessageHasherCallerSession) Hash(message InternalAny2EVMRampMessage, onRamp []byte) ([32]byte, error) { + return _MessageHasher.Contract.Hash(&_MessageHasher.CallOpts, message, onRamp) +} + +func (_MessageHasher *MessageHasher) Address() common.Address { + return _MessageHasher.address +} + +type MessageHasherInterface interface { + EncodeFinalHashPreimage(opts *bind.CallOpts, leafDomainSeparator [32]byte, implicitMetadataHash [32]byte, fixedSizeFieldsHash [32]byte, dataHash [32]byte, tokenAmountsHash [32]byte, sourceTokenDataHash [32]byte) ([]byte, error) + + EncodeFixedSizeFieldsHashPreimage(opts *bind.CallOpts, messageId [32]byte, sender []byte, receiver common.Address, sequenceNumber uint64, gasLimit *big.Int, nonce uint64) ([]byte, error) + + EncodeMetadataHashPreimage(opts *bind.CallOpts, any2EVMMessageHash [32]byte, sourceChainSelector uint64, destChainSelector uint64, onRamp []byte) ([]byte, error) + + EncodeSourceTokenDataHashPreimage(opts *bind.CallOpts, sourceTokenData [][]byte) ([]byte, error) + + EncodeTokenAmountsHashPreimage(opts *bind.CallOpts, tokenAmounts []ClientEVMTokenAmount) ([]byte, error) + + Hash(opts *bind.CallOpts, message InternalAny2EVMRampMessage, onRamp []byte) ([32]byte, 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 new file mode 100644 index 0000000000..399ae5dbd6 --- /dev/null +++ b/core/gethwrappers/ccip/generated/ocr3_config_encoder/ocr3_config_encoder.go @@ -0,0 +1,196 @@ +// 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 + BootstrapP2PIds [][32]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\":\"bootstrapP2PIds\",\"type\":\"bytes32[]\"},{\"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/generation/generated-wrapper-dependency-versions-do-not-edit.txt b/core/gethwrappers/ccip/generation/generated-wrapper-dependency-versions-do-not-edit.txt index 30dda5afe5..02a4b18652 100644 --- a/core/gethwrappers/ccip/generation/generated-wrapper-dependency-versions-do-not-edit.txt +++ b/core/gethwrappers/ccip/generation/generated-wrapper-dependency-versions-do-not-edit.txt @@ -1,27 +1,29 @@ GETH_VERSION: 1.13.8 -arm_contract: ../../../contracts/solc/v0.8.24/RMN/RMN.abi ../../../contracts/solc/v0.8.24/RMN/RMN.bin 16a210d759aa4b6a4a765837277495aa7ba62e3f9497439fbd64c5376cdfd9aa +arm_contract: ../../../contracts/solc/v0.8.24/RMN/RMN.abi ../../../contracts/solc/v0.8.24/RMN/RMN.bin 1a0abacf84def916519013f713b667f106434a091af8b9f441e12cc90aa2cdf8 arm_proxy_contract: ../../../contracts/solc/v0.8.24/ARMProxy/ARMProxy.abi ../../../contracts/solc/v0.8.24/ARMProxy/ARMProxy.bin b048d8e752e3c41113ebb305c1efa06737ad36b4907b93e627fb0a3113023454 burn_from_mint_token_pool: ../../../contracts/solc/v0.8.24/BurnFromMintTokenPool/BurnFromMintTokenPool.abi ../../../contracts/solc/v0.8.24/BurnFromMintTokenPool/BurnFromMintTokenPool.bin c98d5a536e2735f1e8950a5fab6aaaf7fcbd06bb16361e99bf527f2f0027559b burn_mint_token_pool: ../../../contracts/solc/v0.8.24/BurnMintTokenPool/BurnMintTokenPool.abi ../../../contracts/solc/v0.8.24/BurnMintTokenPool/BurnMintTokenPool.bin fee3f82935ce7a26c65e12f19a472a4fccdae62755abdb42d8b0a01f0f06981a burn_mint_token_pool_and_proxy: ../../../contracts/solc/v0.8.24/BurnMintTokenPoolAndProxy/BurnMintTokenPoolAndProxy.abi ../../../contracts/solc/v0.8.24/BurnMintTokenPoolAndProxy/BurnMintTokenPoolAndProxy.bin c7efa00d2be62a97a814730c8e13aa70794ebfdd38a9f3b3c11554a5dfd70478 burn_with_from_mint_token_pool: ../../../contracts/solc/v0.8.24/BurnWithFromMintTokenPool/BurnWithFromMintTokenPool.abi ../../../contracts/solc/v0.8.24/BurnWithFromMintTokenPool/BurnWithFromMintTokenPool.bin a0728e186af74968101135a58a483320ced9ab79b22b1b24ac6994254ee79097 -ccip_capability_configuration: ../../../contracts/solc/v0.8.24/CCIPCapabilityConfiguration/CCIPCapabilityConfiguration.abi ../../../contracts/solc/v0.8.24/CCIPCapabilityConfiguration/CCIPCapabilityConfiguration.bin 0617b071beabe06895b05002f1cc3da51f32a67158b816cbbca85682a46d796f +ccip_config: ../../../contracts/solc/v0.8.24/CCIPConfig/CCIPConfig.abi ../../../contracts/solc/v0.8.24/CCIPConfig/CCIPConfig.bin c44460757ca0e1b228734b32b9ab03221b93d77bb9f8e2970830779a8be2cb78 commit_store: ../../../contracts/solc/v0.8.24/CommitStore/CommitStore.abi ../../../contracts/solc/v0.8.24/CommitStore/CommitStore.bin ddc26c10c2a52b59624faae9005827b09b98db4566887a736005e8cc37cf8a51 commit_store_helper: ../../../contracts/solc/v0.8.24/CommitStoreHelper/CommitStoreHelper.abi ../../../contracts/solc/v0.8.24/CommitStoreHelper/CommitStoreHelper.bin ebd8aac686fa28a71d4212bcd25a28f8f640d50dce5e50498b2f6b8534890b69 ether_sender_receiver: ../../../contracts/solc/v0.8.24/EtherSenderReceiver/EtherSenderReceiver.abi ../../../contracts/solc/v0.8.24/EtherSenderReceiver/EtherSenderReceiver.bin 09510a3f773f108a3c231e8d202835c845ded862d071ec54c4f89c12d868b8de -evm_2_evm_multi_offramp: ../../../contracts/solc/v0.8.24/EVM2EVMMultiOffRamp/EVM2EVMMultiOffRamp.abi ../../../contracts/solc/v0.8.24/EVM2EVMMultiOffRamp/EVM2EVMMultiOffRamp.bin 4bd848e0d37d36bec5cad3b50dce994e53c1c753668af6fc4a60658e7c3149a2 -evm_2_evm_multi_onramp: ../../../contracts/solc/v0.8.24/EVM2EVMMultiOnRamp/EVM2EVMMultiOnRamp.abi ../../../contracts/solc/v0.8.24/EVM2EVMMultiOnRamp/EVM2EVMMultiOnRamp.bin f62d32fffd8f9f1e6e48a6e146c29415d67b081d31b9667f701b088c558f3bcf +evm_2_evm_multi_offramp: ../../../contracts/solc/v0.8.24/EVM2EVMMultiOffRamp/EVM2EVMMultiOffRamp.abi ../../../contracts/solc/v0.8.24/EVM2EVMMultiOffRamp/EVM2EVMMultiOffRamp.bin 09ac589a267ac59ae3fef7534bebe6da38c427c48b60b5304b9e55408e028337 +evm_2_evm_multi_onramp: ../../../contracts/solc/v0.8.24/EVM2EVMMultiOnRamp/EVM2EVMMultiOnRamp.abi ../../../contracts/solc/v0.8.24/EVM2EVMMultiOnRamp/EVM2EVMMultiOnRamp.bin 8edc6f93d7d5f045776cd843c0fae8b94a73835d2c939b2f94fa906ca5f26b97 evm_2_evm_offramp: ../../../contracts/solc/v0.8.24/EVM2EVMOffRamp/EVM2EVMOffRamp.abi ../../../contracts/solc/v0.8.24/EVM2EVMOffRamp/EVM2EVMOffRamp.bin b6132cb22370d62b1b20174bbe832ec87df61f6ab65f7fe2515733bdd10a30f5 evm_2_evm_onramp: ../../../contracts/solc/v0.8.24/EVM2EVMOnRamp/EVM2EVMOnRamp.abi ../../../contracts/solc/v0.8.24/EVM2EVMOnRamp/EVM2EVMOnRamp.bin 383e9930fbc1b7fbb6554cc8857229d207fd6742e87c7fb1a37002347e8de8e2 lock_release_token_pool: ../../../contracts/solc/v0.8.24/LockReleaseTokenPool/LockReleaseTokenPool.abi ../../../contracts/solc/v0.8.24/LockReleaseTokenPool/LockReleaseTokenPool.bin c65c226e1e4d38414bd4a1b76fc8aca3cb3dd98df61268424c44564f455d3752 lock_release_token_pool_and_proxy: ../../../contracts/solc/v0.8.24/LockReleaseTokenPoolAndProxy/LockReleaseTokenPoolAndProxy.abi ../../../contracts/solc/v0.8.24/LockReleaseTokenPoolAndProxy/LockReleaseTokenPoolAndProxy.bin 8b929fab79d1caeea4c57e08cc523eb8ab45ec5c08f46da866b82c15ba94d9ad maybe_revert_message_receiver: ../../../contracts/solc/v0.8.24/MaybeRevertMessageReceiver/MaybeRevertMessageReceiver.abi ../../../contracts/solc/v0.8.24/MaybeRevertMessageReceiver/MaybeRevertMessageReceiver.bin d73956c26232ebcc4a5444429fa99cbefed960e323be9b5a24925885c2e477d5 -mock_arm_contract: ../../../contracts/solc/v0.8.24/MockRMN/MockRMN.abi ../../../contracts/solc/v0.8.24/MockRMN/MockRMN.bin e7a3a6c3eda5fb882e16bcc2b4340f78523acb67907bcdcaf3c8ffc51488688e +message_hasher: ../../../contracts/solc/v0.8.24/MessageHasher/MessageHasher.abi ../../../contracts/solc/v0.8.24/MessageHasher/MessageHasher.bin b16f2182c6f262f4864315c90d35efc0342f5ee3580896e9bca50a5b98d51282 +mock_arm_contract: ../../../contracts/solc/v0.8.24/MockRMN1_0/MockRMN.abi ../../../contracts/solc/v0.8.24/MockRMN1_0/MockRMN.bin e7a3a6c3eda5fb882e16bcc2b4340f78523acb67907bcdcaf3c8ffc51488688e mock_usdc_token_messenger: ../../../contracts/solc/v0.8.24/MockE2EUSDCTokenMessenger/MockE2EUSDCTokenMessenger.abi ../../../contracts/solc/v0.8.24/MockE2EUSDCTokenMessenger/MockE2EUSDCTokenMessenger.bin e0cf17a38b438239fc6294ddca88f86b6c39e4542aefd9815b2d92987191b8bd mock_usdc_token_transmitter: ../../../contracts/solc/v0.8.24/MockE2EUSDCTransmitter/MockE2EUSDCTransmitter.abi ../../../contracts/solc/v0.8.24/MockE2EUSDCTransmitter/MockE2EUSDCTransmitter.bin 33bdad70822e889de7c720ed20085cf9cd3f8eba8b68f26bd6535197749595fe mock_v3_aggregator_contract: ../../../contracts/solc/v0.8.24/MockV3Aggregator/MockV3Aggregator.abi ../../../contracts/solc/v0.8.24/MockV3Aggregator/MockV3Aggregator.bin 518e19efa2ff52b0fefd8e597b05765317ee7638189bfe34ca43de2f6599faf4 multi_aggregate_rate_limiter: ../../../contracts/solc/v0.8.24/MultiAggregateRateLimiter/MultiAggregateRateLimiter.abi ../../../contracts/solc/v0.8.24/MultiAggregateRateLimiter/MultiAggregateRateLimiter.bin abb0ecb1ed8621f26e43b39f5fa25f3d0b6d6c184fa37c404c4389605ecb74e7 nonce_manager: ../../../contracts/solc/v0.8.24/NonceManager/NonceManager.abi ../../../contracts/solc/v0.8.24/NonceManager/NonceManager.bin cdc11c1ab4c1c3fd77f30215e9c579404a6e60eb9adc213d73ca0773c3bb5784 +ocr3_config_encoder: ../../../contracts/solc/v0.8.24/IOCR3ConfigEncoder/IOCR3ConfigEncoder.abi ../../../contracts/solc/v0.8.24/IOCR3ConfigEncoder/IOCR3ConfigEncoder.bin e21180898e1ad54a045ee20add85a2793c681425ea06f66d1a9e5cab128b6487 ping_pong_demo: ../../../contracts/solc/v0.8.24/PingPongDemo/PingPongDemo.abi ../../../contracts/solc/v0.8.24/PingPongDemo/PingPongDemo.bin 1588313bb5e781d181a825247d30828f59007700f36b4b9b00391592b06ff4b4 price_registry: ../../../contracts/solc/v0.8.24/PriceRegistry/PriceRegistry.abi ../../../contracts/solc/v0.8.24/PriceRegistry/PriceRegistry.bin 0b3e253684d7085aa11f9179b71453b9db9d11cabea41605d5b4ac4128f85bfb registry_module_owner_custom: ../../../contracts/solc/v0.8.24/RegistryModuleOwnerCustom/RegistryModuleOwnerCustom.abi ../../../contracts/solc/v0.8.24/RegistryModuleOwnerCustom/RegistryModuleOwnerCustom.bin cbe7698bfd811b485ac3856daf073a7bdebeefdf2583403ca4a19d5b7e2d4ae8 diff --git a/core/gethwrappers/ccip/go_generate.go b/core/gethwrappers/ccip/go_generate.go index 57a05ae411..a5eaa37523 100644 --- a/core/gethwrappers/ccip/go_generate.go +++ b/core/gethwrappers/ccip/go_generate.go @@ -13,7 +13,7 @@ package ccip //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/TokenPool/TokenPool.abi ../../../contracts/solc/v0.8.24/TokenPool/TokenPool.bin TokenPool token_pool //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/RMN/RMN.abi ../../../contracts/solc/v0.8.24/RMN/RMN.bin ARMContract arm_contract //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/ARMProxy/ARMProxy.abi ../../../contracts/solc/v0.8.24/ARMProxy/ARMProxy.bin ARMProxyContract arm_proxy_contract -//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/MockRMN/MockRMN.abi ../../../contracts/solc/v0.8.24/MockRMN/MockRMN.bin MockARMContract mock_arm_contract +//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/MockRMN1_0/MockRMN.abi ../../../contracts/solc/v0.8.24/MockRMN1_0/MockRMN.bin MockARMContract mock_arm_contract //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/TokenAdminRegistry/TokenAdminRegistry.abi ../../../contracts/solc/v0.8.24/TokenAdminRegistry/TokenAdminRegistry.bin TokenAdminRegistry token_admin_registry //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/RegistryModuleOwnerCustom/RegistryModuleOwnerCustom.abi ../../../contracts/solc/v0.8.24/RegistryModuleOwnerCustom/RegistryModuleOwnerCustom.bin RegistryModuleOwnerCustom registry_module_owner_custom //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/MockE2EUSDCTokenMessenger/MockE2EUSDCTokenMessenger.abi ../../../contracts/solc/v0.8.24/MockE2EUSDCTokenMessenger/MockE2EUSDCTokenMessenger.bin MockE2EUSDCTokenMessenger mock_usdc_token_messenger @@ -28,11 +28,13 @@ package ccip //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/MultiAggregateRateLimiter/MultiAggregateRateLimiter.abi ../../../contracts/solc/v0.8.24/MultiAggregateRateLimiter/MultiAggregateRateLimiter.bin MultiAggregateRateLimiter multi_aggregate_rate_limiter //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/Router/Router.abi ../../../contracts/solc/v0.8.24/Router/Router.bin Router router //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/PriceRegistry/PriceRegistry.abi ../../../contracts/solc/v0.8.24/PriceRegistry/PriceRegistry.bin PriceRegistry price_registry -//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/CCIPCapabilityConfiguration/CCIPCapabilityConfiguration.abi ../../../contracts/solc/v0.8.24/CCIPCapabilityConfiguration/CCIPCapabilityConfiguration.bin CCIPCapabilityConfiguration ccip_capability_configuration +//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/CCIPConfig/CCIPConfig.abi ../../../contracts/solc/v0.8.24/CCIPConfig/CCIPConfig.bin CCIPConfig ccip_config +//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/IOCR3ConfigEncoder/IOCR3ConfigEncoder.abi ../../../contracts/solc/v0.8.24/IOCR3ConfigEncoder/IOCR3ConfigEncoder.bin IOCR3ConfigEncoder ocr3_config_encoder //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/MaybeRevertMessageReceiver/MaybeRevertMessageReceiver.abi ../../../contracts/solc/v0.8.24/MaybeRevertMessageReceiver/MaybeRevertMessageReceiver.bin MaybeRevertMessageReceiver maybe_revert_message_receiver //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/PingPongDemo/PingPongDemo.abi ../../../contracts/solc/v0.8.24/PingPongDemo/PingPongDemo.bin PingPongDemo ping_pong_demo //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/SelfFundedPingPong/SelfFundedPingPong.abi ../../../contracts/solc/v0.8.24/SelfFundedPingPong/SelfFundedPingPong.bin SelfFundedPingPong self_funded_ping_pong +//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/MessageHasher/MessageHasher.abi ../../../contracts/solc/v0.8.24/MessageHasher/MessageHasher.bin MessageHasher message_hasher //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/EtherSenderReceiver/EtherSenderReceiver.abi ../../../contracts/solc/v0.8.24/EtherSenderReceiver/EtherSenderReceiver.bin EtherSenderReceiver ether_sender_receiver //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/WETH9/WETH9.abi ../../../contracts/solc/v0.8.24/WETH9/WETH9.bin WETH9 weth9 diff --git a/core/scripts/go.mod b/core/scripts/go.mod index 5fb1d706b4..727954da03 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -26,12 +26,12 @@ require ( github.com/shopspring/decimal v1.3.1 github.com/smartcontractkit/chain-selectors v1.0.17 github.com/smartcontractkit/chainlink-automation v1.0.4 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625074419-c278d083facf + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625144005-556a7ba7b11c github.com/smartcontractkit/chainlink-vrf v0.0.0-20240222010609-cd67d123c772 github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000 github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c github.com/spf13/cobra v1.8.0 - github.com/spf13/viper v1.16.0 + github.com/spf13/viper v1.18.2 github.com/stretchr/testify v1.9.0 github.com/umbracle/ethgo v0.1.3 github.com/umbracle/fastrlp v0.0.0-20220527094140-59d5dd30e722 @@ -48,14 +48,14 @@ require ( contrib.go.opencensus.io/exporter/stackdriver v0.13.5 // indirect cosmossdk.io/api v0.3.1 // indirect cosmossdk.io/core v0.5.1 // indirect - cosmossdk.io/depinject v1.0.0-alpha.3 // indirect - cosmossdk.io/errors v1.0.0 // indirect - cosmossdk.io/math v1.0.1 // indirect + cosmossdk.io/depinject v1.0.0-alpha.4 // indirect + cosmossdk.io/errors v1.0.1 // indirect + cosmossdk.io/math v1.3.0 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect - github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect + github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect github.com/CosmWasm/wasmd v0.40.1 // indirect github.com/CosmWasm/wasmvm v1.2.4 // indirect github.com/DataDog/zstd v1.5.2 // indirect @@ -84,32 +84,32 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect github.com/chenzhuoyu/iasm v0.9.0 // indirect - github.com/cockroachdb/errors v1.9.1 // indirect + github.com/cockroachdb/errors v1.10.0 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 // indirect - github.com/cockroachdb/redact v1.1.3 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect - github.com/cometbft/cometbft v0.37.2 // indirect + github.com/cometbft/cometbft v0.37.5 // indirect github.com/cometbft/cometbft-db v0.8.0 // indirect github.com/confio/ics23/go v0.9.0 // indirect github.com/consensys/bavard v0.1.13 // indirect github.com/consensys/gnark-crypto v0.12.1 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-proto v1.0.0-beta.2 // indirect - github.com/cosmos/cosmos-sdk v0.47.4 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect + github.com/cosmos/cosmos-sdk v0.47.11 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogoproto v1.4.11 // indirect - github.com/cosmos/iavl v0.20.0 // indirect - github.com/cosmos/ibc-go/v7 v7.2.0 // indirect + github.com/cosmos/iavl v0.20.1 // indirect + github.com/cosmos/ibc-go/v7 v7.5.1 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.12.1 // indirect + github.com/cosmos/ledger-cosmos-go v0.12.4 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 // indirect github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect github.com/danieljoos/wincred v1.1.2 // indirect github.com/danielkov/gin-helmet v0.0.0-20171108135313-1387e224435e // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/deckarep/golang-set/v2 v2.3.0 // indirect + github.com/deckarep/golang-set/v2 v2.6.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/dfuse-io/logging v0.0.0-20210109005628-b97a57253f70 // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect @@ -124,7 +124,7 @@ require ( github.com/esote/minmaxheap v1.0.0 // indirect github.com/ethereum/c-kzg-4844 v0.4.0 // indirect github.com/fatih/color v1.16.0 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fxamacker/cbor/v2 v2.6.0 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect github.com/gagliardetto/binary v0.7.7 // indirect @@ -133,7 +133,7 @@ require ( github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect github.com/gedex/inflector v0.0.0-20170307190818-16278e9db813 // indirect - github.com/getsentry/sentry-go v0.19.0 // indirect + github.com/getsentry/sentry-go v0.23.0 // indirect github.com/gin-contrib/cors v1.5.0 // indirect github.com/gin-contrib/expvar v0.0.1 // indirect github.com/gin-contrib/sessions v0.0.5 // indirect @@ -164,7 +164,7 @@ require ( github.com/gofrs/flock v0.8.1 // indirect github.com/gogo/protobuf v1.3.3 // indirect github.com/golang-jwt/jwt/v5 v5.2.0 // indirect - github.com/golang/glog v1.1.2 // indirect + github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect @@ -269,6 +269,8 @@ require ( github.com/robfig/cron/v3 v3.0.1 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/scylladb/go-reflectx v1.0.1 // indirect @@ -276,22 +278,22 @@ require ( github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/shirou/gopsutil/v3 v3.24.3 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d // indirect + github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240621143432-85370a54b141 // indirect github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 // indirect - github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 // indirect - github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240625075314-affd4529a8f5 // indirect - github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240625074951-06ab5e670dba // indirect + github.com/smartcontractkit/chainlink-feeds v0.0.0-20240523182126-1784bd4f3294 // indirect + github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240621151551-885054fb0f0e // indirect + github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240621143321-7e5949418911 // indirect github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 // indirect github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 // indirect github.com/smartcontractkit/wsrpc v0.8.1 // indirect - github.com/spf13/afero v1.9.5 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cast v1.6.0 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect 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.4.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 @@ -314,8 +316,8 @@ require ( github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - github.com/zondax/hid v0.9.1 // indirect - github.com/zondax/ledger-go v0.14.1 // indirect + github.com/zondax/hid v0.9.2 // indirect + github.com/zondax/ledger-go v0.14.3 // indirect go.dedis.ch/fixbuf v1.0.3 // indirect go.etcd.io/bbolt v1.3.7 // indirect go.mongodb.org/mongo-driver v1.15.0 // indirect @@ -345,10 +347,10 @@ require ( golang.org/x/tools v0.18.0 // indirect gonum.org/v1/gonum v0.14.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect - google.golang.org/grpc v1.59.0 // indirect + google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect gopkg.in/guregu/null.v4 v4.0.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect @@ -358,7 +360,7 @@ require ( k8s.io/klog/v2 v2.120.1 // indirect k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect - pgregory.net/rapid v0.5.5 // indirect + pgregory.net/rapid v1.1.0 // indirect rsc.io/tmplfunc v0.0.3 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect @@ -374,5 +376,4 @@ replace ( // until merged upstream: https://github.com/mwitkow/grpc-proxy/pull/69 github.com/mwitkow/grpc-proxy => github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f - ) diff --git a/core/scripts/go.sum b/core/scripts/go.sum index 176cb6aa9a..01552ea368 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -4,7 +4,6 @@ cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSR cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -15,11 +14,8 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.110.9 h1:e7ITSqGFFk4rbz/JFIqZh3G4VEHguhAL4BQcFlWtU68= -cloud.google.com/go v0.110.9/go.mod h1:rpxevX/0Lqvlbc88b7Sc1SPNdyK1riNBTUU6JXhYNpM= +cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM= +cloud.google.com/go v0.112.0/go.mod h1:3jEEVwZ/MHU4djK5t5RHuKOA/GbLddgTdVubX1qnPD4= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -33,8 +29,8 @@ cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2Aawl cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/iam v1.1.4 h1:K6n/GZHFTtEoKT5aUG3l9diPi0VduZNQ1PfdnpkkIFk= -cloud.google.com/go/iam v1.1.4/go.mod h1:l/rg8l1AaA+VFMho/HYx2Vv6xinPSLMF8qfhRPIZ0L8= +cloud.google.com/go/iam v1.1.5 h1:1jTsCu4bcsNsE4iiqNT5SHwrDRCfRmIaaaVFhRveTJI= +cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -44,9 +40,8 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= -cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= +cloud.google.com/go/storage v1.36.0 h1:P0mOkAcaJxhCTvAkMhxMfrTKiNcub4YmmPBtlhAyTr8= +cloud.google.com/go/storage v1.36.0/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= contrib.go.opencensus.io/exporter/stackdriver v0.12.6/go.mod h1:8x999/OcIPy5ivx/wDiV7Gx4D+VUPODf0mWRGRc5kSk= contrib.go.opencensus.io/exporter/stackdriver v0.13.4/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc= contrib.go.opencensus.io/exporter/stackdriver v0.13.5 h1:TNaexHK16gPUoc7uzELKOU7JULqccn1NDuqUxmxSqfo= @@ -55,14 +50,14 @@ cosmossdk.io/api v0.3.1 h1:NNiOclKRR0AOlO4KIqeaG6PS6kswOMhHD0ir0SscNXE= cosmossdk.io/api v0.3.1/go.mod h1:DfHfMkiNA2Uhy8fj0JJlOCYOBp4eWUUJ1te5zBGNyIw= cosmossdk.io/core v0.5.1 h1:vQVtFrIYOQJDV3f7rw4pjjVqc1id4+mE0L9hHP66pyI= cosmossdk.io/core v0.5.1/go.mod h1:KZtwHCLjcFuo0nmDc24Xy6CRNEL9Vl/MeimQ2aC7NLE= -cosmossdk.io/depinject v1.0.0-alpha.3 h1:6evFIgj//Y3w09bqOUOzEpFj5tsxBqdc5CfkO7z+zfw= -cosmossdk.io/depinject v1.0.0-alpha.3/go.mod h1:eRbcdQ7MRpIPEM5YUJh8k97nxHpYbc3sMUnEtt8HPWU= -cosmossdk.io/errors v1.0.0 h1:nxF07lmlBbB8NKQhtJ+sJm6ef5uV1XkvPXG2bUntb04= -cosmossdk.io/errors v1.0.0/go.mod h1:+hJZLuhdDE0pYN8HkOrVNwrIOYvUGnn6+4fjnJs/oV0= -cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca h1:msenprh2BLLRwNT7zN56TbBHOGk/7ARQckXHxXyvjoQ= -cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca/go.mod h1:PkIAKXZvaxrTRc++z53XMRvFk8AcGGWYHcMIPzVYX9c= -cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= -cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= +cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= +cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= +cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= +cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= +cosmossdk.io/log v1.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI= +cosmossdk.io/log v1.3.1/go.mod h1:2/dIomt8mKdk6vl3OWJcPk2be3pGOS8OQaLUM/3/tCM= +cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= +cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -75,7 +70,6 @@ github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo8 github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= github.com/AlekSi/pointer v1.1.0 h1:SSDMPcXD9jSl8FPy9cRzoRaMJtm9g9ggGTxecRUbQoI= github.com/AlekSi/pointer v1.1.0/go.mod h1:y7BvfRI3wXPWKXEBhU71nbnIEEZX0QTSB2Bj48UJIZE= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 h1:mFRzDkZVAjdal+s7s0MwaRv9igoPqLRdzOLzw/8Xvq8= @@ -83,14 +77,12 @@ github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358/go.mod h1:chxPXzS github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= -github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= +github.com/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRrLeDnvGIM= +github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4= github.com/ClickHouse/ch-go v0.58.2 h1:jSm2szHbT9MCAB1rJ3WuCJqmGLi5UTjlNu+f530UTS0= github.com/ClickHouse/ch-go v0.58.2/go.mod h1:Ap/0bEmiLa14gYjCiRkYGbXvbe8vwdrfTYWhsuQ99aw= github.com/ClickHouse/clickhouse-go/v2 v2.15.0 h1:G0hTKyO8fXXR1bGnZ0DY3vTG01xYfOGW76zgjg5tmC4= github.com/ClickHouse/clickhouse-go/v2 v2.15.0/go.mod h1:kXt1SRq0PIRa6aKZD7TnFnY9PQKmc2b13sHtOYcK6cQ= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= github.com/CosmWasm/wasmd v0.40.1 h1:LxbO78t/6S8TkeQlUrJ0m5O87HtAwLx4RGHq3rdrOEU= github.com/CosmWasm/wasmd v0.40.1/go.mod h1:6EOwnv7MpuFaEqxcUOdFV9i4yvrdOciaY6VQ1o7A3yg= github.com/CosmWasm/wasmvm v1.2.4 h1:6OfeZuEcEH/9iqwrg2pkeVtDCkMoj9U6PpKtcrCyVrQ= @@ -102,7 +94,6 @@ github.com/Depado/ginprom v1.8.0 h1:zaaibRLNI1dMiiuj1MKzatm8qrcHzikMlCc1anqOdyo= github.com/Depado/ginprom v1.8.0/go.mod h1:XBaKzeNBqPF4vxJpNLincSQZeMDnZp1tIbU0FU0UKgg= github.com/GeertJohan/go.incremental v1.0.0/go.mod h1:6fAjUhbVuX1KcMD3c8TEgVUqmo4seqhv0i0kdATSkM0= github.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtixis4Tib9if0= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= @@ -117,7 +108,6 @@ github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8 github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8= github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= @@ -125,10 +115,7 @@ github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/ github.com/XSAM/otelsql v0.27.0 h1:i9xtxtdcqXV768a5C6SoT/RkG+ue3JTOgkYInzlTOqs= github.com/XSAM/otelsql v0.27.0/go.mod h1:0mFB3TvLa7NCuhm/2nU7/b2wEtsczkj8Rey8ygO7V+A= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= -github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= -github.com/alecthomas/participle/v2 v2.0.0-alpha7/go.mod h1:NumScqsC42o9x+dGj8/YqsIfhrIQjFEOFovxotbBirA= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -156,7 +143,6 @@ github.com/aws/aws-sdk-go v1.22.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.45.25 h1:c4fLlh5sLdK2DCRTY1z0hyuJZU4ygxX8m1FswL6/nF4= github.com/aws/aws-sdk-go v1.45.25/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -236,35 +222,29 @@ github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6D github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= -github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= -github.com/cockroachdb/apd/v3 v3.1.0/go.mod h1:6qgPBMXjATAdD/VefbRP9NoSLKjbB4LCoA7gN4LpHs4= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/errors v1.10.0 h1:lfxS8zZz1+OjtV4MtNWgboi/W5tyLEB6VQZBXN+0VUU= +github.com/cockroachdb/errors v1.10.0/go.mod h1:lknhIsEVQ9Ss/qKDBQS/UqFSvPQjOwNq2qyKAxtHRqE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 h1:aPEJyR4rPBvDmeyi+l/FS/VtA00IWvjeFvjen1m1l1A= github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593/go.mod h1:6hk1eMY/u5t+Cf18q5lFMUA1Rc+Sm5I6Ra1QuPyxXCo= -github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONNbHU7MuEHboiFuA= github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c= -github.com/cometbft/cometbft v0.37.2 h1:XB0yyHGT0lwmJlFmM4+rsRnczPlHoAKFX6K8Zgc2/Jc= -github.com/cometbft/cometbft v0.37.2/go.mod h1:Y2MMMN//O5K4YKd8ze4r9jmk4Y7h0ajqILXbH5JQFVs= +github.com/cometbft/cometbft v0.37.5 h1:/U/TlgMh4NdnXNo+YU9T2NMCWyhXNDF34Mx582jlvq0= +github.com/cometbft/cometbft v0.37.5/go.mod h1:QC+mU0lBhKn8r9qvmnq53Dmf3DWBt4VtkcKw2C81wxY= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= @@ -286,10 +266,10 @@ github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7 github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-proto v1.0.0-beta.2 h1:X3OKvWgK9Gsejo0F1qs5l8Qn6xJV/AzgIWR2wZ8Nua8= -github.com/cosmos/cosmos-proto v1.0.0-beta.2/go.mod h1:+XRCLJ14pr5HFEHIUcn51IKXD1Fy3rkEQqt4WqmN4V0= -github.com/cosmos/cosmos-sdk v0.47.4 h1:FVUpEprm58nMmBX4xkRdMDaIG5Nr4yy92HZAfGAw9bg= -github.com/cosmos/cosmos-sdk v0.47.4/go.mod h1:R5n+uM7vguVPFap4pgkdvQCT1nVo/OtPwrlAU40rvok= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= +github.com/cosmos/cosmos-sdk v0.47.11 h1:0Qx7eORw0RJqPv+mvDuU8NQ1LV3nJJKJnPoYblWHolc= +github.com/cosmos/cosmos-sdk v0.47.11/go.mod h1:ADjORYzUQqQv/FxDi0H0K5gW/rAk1CiDR3ZKsExfJV0= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= @@ -297,14 +277,14 @@ github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiK github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= -github.com/cosmos/iavl v0.20.0 h1:fTVznVlepH0KK8NyKq8w+U7c2L6jofa27aFX6YGlm38= -github.com/cosmos/iavl v0.20.0/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= -github.com/cosmos/ibc-go/v7 v7.2.0 h1:dx0DLUl7rxdyZ8NiT6UsrbzKOJx/w7s+BOaewFRH6cg= -github.com/cosmos/ibc-go/v7 v7.2.0/go.mod h1:OOcjKIRku/j1Xs1RgKK0yvKRrJ5iFuZYMetR1n3yMlc= +github.com/cosmos/iavl v0.20.1 h1:rM1kqeG3/HBT85vsZdoSNsehciqUQPWrR4BYmqE2+zg= +github.com/cosmos/iavl v0.20.1/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= +github.com/cosmos/ibc-go/v7 v7.5.1 h1:KqS/g7W7EMX1OtOvufS8lWMJibOKpdgtNNZIU6fAgVU= +github.com/cosmos/ibc-go/v7 v7.5.1/go.mod h1:ktFg5GvKOyrGCqTWtW7Grj5uweU4ZapxrNeVS1CLLbo= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= -github.com/cosmos/ledger-cosmos-go v0.12.1 h1:sMBxza5p/rNK/06nBSNmsI/WDqI0pVJFVNihy1Y984w= -github.com/cosmos/ledger-cosmos-go v0.12.1/go.mod h1:dhO6kj+Y+AHIOgAe4L9HL/6NDdyyth4q238I9yFpD2g= +github.com/cosmos/ledger-cosmos-go v0.12.4 h1:drvWt+GJP7Aiw550yeb3ON/zsrgW0jgh5saFCr7pDnw= +github.com/cosmos/ledger-cosmos-go v0.12.4/go.mod h1:fjfVWRf++Xkygt9wzCsjEBdjcf7wiiY35fv3ctT+k4M= github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzUGSKFTcM= github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFgWl/ENIznEoYQI4= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= @@ -320,10 +300,6 @@ github.com/creachadair/taskgroup v0.4.2 h1:jsBLdAJE42asreGss2xZGZ8fJra7WtwnHWeJF github.com/creachadair/taskgroup v0.4.2/go.mod h1:qiXUOSrbwAY3u0JPGTzObbE3yf9hcXHDKBZ2ZjpCbgM= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= -github.com/cucumber/common/gherkin/go/v22 v22.0.0/go.mod h1:3mJT10B2GGn3MvVPd3FwR7m2u4tLhSRhWUqJU4KN4Fg= -github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= -github.com/cucumber/common/messages/go/v17 v17.1.1/go.mod h1:bpGxb57tDE385Rb2EohgUadLkAbhoC4IyCFi89u/JQI= github.com/daaku/go.zipexe v1.0.0/go.mod h1:z8IiR6TsVLEYKwXAoE/I+8ys/sDkgTzSL0CLnGVd57E= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= @@ -334,8 +310,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deckarep/golang-set/v2 v2.3.0 h1:qs18EKUfHm2X9fA50Mr/M5hccg2tNnVqsiBImnyDs0g= -github.com/deckarep/golang-set/v2 v2.3.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= +github.com/deckarep/golang-set/v2 v2.6.0 h1:XfcQbWM1LlMB8BsJ8N9vW5ehnnPVIw0je80NsVHagjM= +github.com/deckarep/golang-set/v2 v2.6.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= @@ -348,7 +324,6 @@ github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFM github.com/dfuse-io/logging v0.0.0-20201110202154-26697de88c79/go.mod h1:V+ED4kT/t/lKtH99JQmKIb0v9WL3VaYkJ36CfHlVECI= github.com/dfuse-io/logging v0.0.0-20210109005628-b97a57253f70 h1:CuJS05R9jmNlUK8GOxrEELPbfXm0EuGh/30LjkjN5vo= github.com/dfuse-io/logging v0.0.0-20210109005628-b97a57253f70/go.mod h1:EoK/8RFbMEteaCaz89uessDTnCWjbbcr+DXcBh4el5o= -github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= @@ -376,7 +351,6 @@ github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkp github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dvsekhvalnov/jose2go v1.7.0 h1:bnQc8+GMnidJZA8zc6lLEAb4xNrIqHwO+9TzqvtQZPo= github.com/dvsekhvalnov/jose2go v1.7.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= github.com/elastic/go-sysinfo v1.11.1 h1:g9mwl05njS4r69TisC+vwHWTSKywZFYYUu3so3T/Lao= github.com/elastic/go-sysinfo v1.11.1/go.mod h1:6KQb31j0QeWBDF88jIdWSxE8cwoOB9tO4Y4osN7Q70E= github.com/elastic/go-windows v1.0.1 h1:AlYZOldA+UJ0/2nBuqWdo90GFCgG9xuyw9SYzGUtJm0= @@ -386,28 +360,24 @@ github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRr github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= -github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= +github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/esote/minmaxheap v1.0.0 h1:rgA7StnXXpZG6qlM0S7pUmEv1KpWe32rYT4x8J8ntaA= github.com/esote/minmaxheap v1.0.0/go.mod h1:Ln8+i7fS1k3PLgZI2JAo0iA1as95QnIYiGCrqSJ5FZk= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= github.com/ethereum/go-ethereum v1.13.8 h1:1od+thJel3tM52ZUNQwvpYOeRHlbkVFZ5S8fhi0Lgsg= github.com/ethereum/go-ethereum v1.13.8/go.mod h1:sc48XYQxCzH3fG9BcrXCOOgQk2JfZzNAmIKnceogzsA= -github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= -github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= @@ -417,8 +387,8 @@ github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7z github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fxamacker/cbor/v2 v2.6.0 h1:sU6J2usfADwWlYDAFhZBQ6TnLFBHxgesMrQfQgk1tWA= github.com/fxamacker/cbor/v2 v2.6.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= @@ -431,16 +401,14 @@ github.com/gagliardetto/solana-go v1.8.4 h1:vmD/JmTlonyXGy39bAo0inMhmbdAwV7rXZtL github.com/gagliardetto/solana-go v1.8.4/go.mod h1:i+7aAyNDTHG0jK8GZIBSI4OVvDqkt2Qx+LklYclRNG8= github.com/gagliardetto/treeout v0.1.4 h1:ozeYerrLCmCubo1TcIjFiOWTTGteOOHND1twdFpgwaw= github.com/gagliardetto/treeout v0.1.4/go.mod h1:loUefvXTrlRG5rYmJmExNryyBRh8f89VZhmMOyCyqok= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 h1:f6D9Hr8xV8uYKlyuj8XIruxlh9WjVjdh1gIicAS7ays= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2GihuqhwdILrV+7GJel5lyPV3u1+PgzrWLc0TkE= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc= github.com/gedex/inflector v0.0.0-20170307190818-16278e9db813 h1:Uc+IZ7gYqAf/rSGFplbWBSHaGolEQlNLgMgSE3ccnIQ= github.com/gedex/inflector v0.0.0-20170307190818-16278e9db813/go.mod h1:P+oSoE9yhSRvsmYyZsshflcR6ePWYLql6UU1amW13IM= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.19.0 h1:BcCH3CN5tXt5aML+gwmbFwVptLLQA+eT866fCO9wVOM= -github.com/getsentry/sentry-go v0.19.0/go.mod h1:y3+lGEFEFexZtpbG1GUE2WD/f9zGyKYwpEqryTOC/nE= +github.com/getsentry/sentry-go v0.23.0 h1:dn+QRCeJv4pPt9OjVXiMcGIBIefaTJPw/h0bZWO05nE= +github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/cors v1.5.0 h1:DgGKV7DDoOn36DFkNtbHrjoRiT5ExCe+PC9/xp7aKvk= github.com/gin-contrib/cors v1.5.0/go.mod h1:TvU7MAZ3EwrPLI2ztzTt3tqgvBCq+wn8WpZmfADjupI= @@ -465,8 +433,6 @@ github.com/gkampitakis/go-snaps v0.5.4 h1:GX+dkKmVsRenz7SoTbdIEL4KQARZctkMiZ8ZKp github.com/gkampitakis/go-snaps v0.5.4/go.mod h1:ZABkO14uCuVxBHAXAfKG+bqNz+aa1bGPAg8jkI0Nk8Y= github.com/go-asn1-ber/asn1-ber v1.5.5 h1:MNHlNMBDgEKD4TcKr36vQN68BA00aDfjIt3/bD50WnA= github.com/go-asn1-ber/asn1-ber v1.5.5/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-faster/city v1.0.1 h1:4WAxSZ3V2Ws4QRDrscLEDcibJY8uf41H6AhXDrNDcGw= @@ -497,7 +463,6 @@ github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= @@ -531,9 +496,6 @@ github.com/go-webauthn/webauthn v0.9.4 h1:YxvHSqgUyc5AK2pZbqkWWR55qKeDPhP8zLDr6l github.com/go-webauthn/webauthn v0.9.4/go.mod h1:LqupCtzSef38FcxzaklmOn7AykGKhAhr9xlRbdbgnTw= github.com/go-webauthn/x v0.1.5 h1:V2TCzDU2TGLd0kSZOXdrqDVV5JB9ILnKxA9S53CSBw0= github.com/go-webauthn/x v0.1.5/go.mod h1:qbzWwcFcv4rTwtCLOZd+icnr6B7oSsAGZJqlt8cukqY= -github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= @@ -544,19 +506,15 @@ github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14j github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.3.1+incompatible h1:0/KbAdpx3UXAx1kEOWHJeOkpbgRFGHVgv+CFIY7dBJI= github.com/gofrs/uuid v4.3.1+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= -github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v5 v5.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw= github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= -github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -597,7 +555,6 @@ github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -613,13 +570,11 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-tpm v0.9.0 h1:sQF6YqWMi+SCXpsmS3fd21oPy/vSddwZry4JnmltHVk= github.com/google/go-tpm v0.9.0/go.mod h1:FkNVkc6C+IsvDI9Jw1OveJmxGZUUaKxtrpOS47QWKfU= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= @@ -628,7 +583,6 @@ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -638,9 +592,6 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b h1:RMpPgZTSApbPf7xaVel+QkoGPRLFLrwFO89uDUHEGf0= github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= @@ -654,13 +605,12 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.3.1 h1:SBWmZhjUDRorQxrN0nwzf+AHBxnbFjViHQS4P0yVpmQ= -github.com/googleapis/enterprise-certificate-proxy v0.3.1/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= +github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= +github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= @@ -673,7 +623,6 @@ github.com/gorilla/securecookie v1.1.2 h1:YCIWL56dvtr73r6715mJs5ZvhtnY73hBvEF8kX github.com/gorilla/securecookie v1.1.2/go.mod h1:NfCASbcHqRSY+3a8tlWJwsQap2VX5pwzwo4h3eOamfo= github.com/gorilla/sessions v1.2.2 h1:lqzMYz6bOfvn2WriPUjNByzeXIlVzURcPmgMczkmTjY= github.com/gorilla/sessions v1.2.2/go.mod h1:ePLdVu+jbEgHH+KWw8I1z2wqd0BAdAQh/8LRvBeoNcQ= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= @@ -740,7 +689,6 @@ github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= @@ -772,12 +720,10 @@ github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= -github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= @@ -785,11 +731,6 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2 github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/invopop/jsonschema v0.12.0 h1:6ovsNSuvn9wEQVOyc72aycBMVQFKz7cPdMJn10CvzRI= github.com/invopop/jsonschema v0.12.0/go.mod h1:ffZ5Km5SWWRAIN6wbDXItl95euhFz2uON45H2qjYt+0= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= @@ -875,32 +816,22 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1 github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= -github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.17.3 h1:qkRjuerhUU1EmXLYGkSH6EZL+vPSxIrYjLNAK4slzwA= github.com/klauspost/compress v1.17.3/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -914,8 +845,6 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/leanovate/gopter v0.2.10-0.20210127095200-9abe2343507a h1:dHCfT5W7gghzPtfsW488uPmEOm85wewI+ypUwibyTdU= github.com/leanovate/gopter v0.2.10-0.20210127095200-9abe2343507a/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= @@ -948,12 +877,9 @@ github.com/maruel/natural v1.1.1 h1:Hja7XhhmvEFhcByqDoHz9QZbkWey+COd9xWfCfn1ioo= github.com/maruel/natural v1.1.1/go.mod h1:v+Rfd79xlw1AgVBjbO0BEQmptqb5HvL/k9GRHB7ZKEg= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= @@ -961,7 +887,6 @@ github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= @@ -974,12 +899,9 @@ github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJKjyR5WD3HYQSd+U= github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94= @@ -1020,7 +942,6 @@ github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mostynb/zstdpool-freelist v0.0.0-20201229113212-927304c0c3b1 h1:mPMvm6X6tf4w8y7j9YIt6V9jfWhL6QlbEc7CCmeQlWk= github.com/mostynb/zstdpool-freelist v0.0.0-20201229113212-927304c0c3b1/go.mod h1:ye2e/VUEtE2BHE+G/QcKkcLQVAEJoYRFj5VUOQatCRE= -github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= @@ -1028,10 +949,6 @@ github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ib github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229/go.mod h1:0aYXnNPJ8l7uZxf45rWW1a/uME32OF0rhiYGNQ2oF2E= github.com/nsf/jsondiff v0.0.0-20210926074059-1e845ec5d249 h1:NHrXEjTNQY7P0Zfx1aMrNhpgxHmow66XQtm0aQLY0AE= @@ -1046,7 +963,6 @@ github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= @@ -1101,7 +1017,6 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -1141,8 +1056,6 @@ github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= -github.com/regen-network/gocuke v0.6.2/go.mod h1:zYaqIHZobHyd0xOrHGPQjbhGJsuZ1oElx150u2o1xuk= github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4= github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= @@ -1157,7 +1070,6 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= @@ -1166,26 +1078,27 @@ github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= -github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c= -github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w= +github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= +github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6NgVqpn3+iol9aGu4= github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY= github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= github.com/scylladb/go-reflectx v1.0.1 h1:b917wZM7189pZdlND9PbIJ6NQxfDPfBvUaQ7cjj1iZQ= github.com/scylladb/go-reflectx v1.0.1/go.mod h1:rWnOfDIRWBGN0miMLIcoPt/Dhi2doCMZqwMCJ3KupFc= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sethvargo/go-retry v0.2.4 h1:T+jHEQy/zKJf5s95UkguisicE0zuF9y7+/vgz08Ocec= github.com/sethvargo/go-retry v0.2.4/go.mod h1:1afjQuvh7s4gflMObvjLPaWgluLLyhA1wmVZ6KLpICw= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= @@ -1208,18 +1121,18 @@ github.com/smartcontractkit/chain-selectors v1.0.17 h1:otOlYUnutS8oQBEAi9RLQICqZ github.com/smartcontractkit/chain-selectors v1.0.17/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-common v0.1.7-0.20240625074419-c278d083facf h1:d9AS/K8RSVG64USb20N/U7RaPOsYPcmuLGJq7iE+caM= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625074419-c278d083facf/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= -github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d h1:5tgMC5Gi2UAOKZ+m28W8ubjLeR0pQCAcrz6eQ0rW510= -github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625144005-556a7ba7b11c h1:dR2y3uzuZ8cJOaMSij8LQIdySuImwxkiZFjZ62ML5S0= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625144005-556a7ba7b11c/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= +github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240621143432-85370a54b141 h1:TMOoYaeSDkkI3jkCH7lKHOZaLkeDuxFTNC+XblD6M0M= +github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240621143432-85370a54b141/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540/go.mod h1:sjAmX8K2kbQhvDarZE1ZZgDgmHJ50s0BBc/66vKY2ek= -github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 h1:MD80ZRCTvxxJ8PBmhtrKoTnky8cVNYrCrIBLVRbrOM0= -github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917/go.mod h1:jwVxhctE6BgLOSSsVq9wbREpZ8Ev34H+UBxeUhESZRs= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240625075314-affd4529a8f5 h1:h0gjVZ7oQwPPQOFJuZToDhB1NTEbIBrRtsJysATTG/g= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240625075314-affd4529a8f5/go.mod h1:NbXXQaNFskVMYRut0MvBlcHu/vDgipGMwYjamvjVB9Y= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240625074951-06ab5e670dba h1:YNSlhK5mobyAaw02LPGgIEuS3lXyCTXcc6oaV2L6uUI= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240625074951-06ab5e670dba/go.mod h1:UVFRacRkP7O7TQAzFmR52v5mUlxf+G1ovMlCQAB/cHU= +github.com/smartcontractkit/chainlink-feeds v0.0.0-20240523182126-1784bd4f3294 h1:4L1878goh1mqJx6JPv/TEeMAgYvbx7+D14QFSSu/DPs= +github.com/smartcontractkit/chainlink-feeds v0.0.0-20240523182126-1784bd4f3294/go.mod h1:jwVxhctE6BgLOSSsVq9wbREpZ8Ev34H+UBxeUhESZRs= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240621151551-885054fb0f0e h1:4dwcbcVrMne6wtOX/4yWdYJwk8iSm0INVNva/EhF35E= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240621151551-885054fb0f0e/go.mod h1:rJ4+TwNMciU2pvx6dsnUNnh4sPI5bUqgmYfhSrYhQ8Y= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240621143321-7e5949418911 h1:TSgCT8Uy+R4o3GwoWUqRCGNKeciub7r7+Aa3ylmg66c= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240621143321-7e5949418911/go.mod h1:OiWUTrrpSLLTMh7FINWjEh6mmDJCVPaC4yEsDCVaWdU= github.com/smartcontractkit/chainlink-vrf v0.0.0-20240222010609-cd67d123c772 h1:LQmRsrzzaYYN3wEU1l5tWiccznhvbyGnu2N+wHSXZAo= github.com/smartcontractkit/chainlink-vrf v0.0.0-20240222010609-cd67d123c772/go.mod h1:Kn1Hape05UzFZ7bOUnm3GVsHzP0TNrVmpfXYNHdqGGs= github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16 h1:TFe+FvzxClblt6qRfqEhUfa4kFQx5UobuoFGO2W4mMo= @@ -1237,12 +1150,14 @@ github.com/smartcontractkit/wsrpc v0.8.1/go.mod h1:yfg8v8fPLXkb6Mcnx6Pm/snP6jJ0r github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= @@ -1251,16 +1166,14 @@ github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJ github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= +github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/streamingfast/logging v0.0.0-20220405224725-2755dab2ce75 h1:ZqpS7rAhhKD7S7DnrpEdrnW1/gZcv82ytpMviovkli4= @@ -1287,8 +1200,8 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= @@ -1328,10 +1241,8 @@ github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2 github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= @@ -1349,14 +1260,10 @@ github.com/urfave/cli v1.22.14 h1:ebbhrRiGK2i4naQJr+1Xj92HXZCrK7MsyTS/ob3HnAk= github.com/urfave/cli v1.22.14/go.mod h1:X0eDS6pD6Exaclxm99NJ3FiCDRED7vIHpx2mDOHLvkA= github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= github.com/valyala/fastjson v1.4.1 h1:hrltpHpIpkaxll8QltMU8c3QZ5+qIiCL8yKqPFJI/yE= github.com/valyala/fastjson v1.4.1/go.mod h1:nV6MsjxL2IMJQUoHDIrjEI7oLyeqK6aBD7EFWPsvP8o= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= github.com/vertica/vertica-sql-go v1.3.3 h1:fL+FKEAEy5ONmsvya2WH5T8bhkvY27y/Ik3ReR2T+Qw= github.com/vertica/vertica-sql-go v1.3.3/go.mod h1:jnn2GFuv+O2Jcjktb7zyc4Utlbu9YVqpHH/lx63+1M4= github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc= @@ -1366,7 +1273,6 @@ github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcY github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= @@ -1377,15 +1283,11 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= github.com/ydb-platform/ydb-go-genproto v0.0.0-20231012155159-f85a672542fd h1:dzWP1Lu+A40W883dK/Mr3xyDSM/2MggS8GtHT0qgAnE= github.com/ydb-platform/ydb-go-genproto v0.0.0-20231012155159-f85a672542fd/go.mod h1:Er+FePu1dNUieD+XTMDduGpQuCPssK5Q4BjF+IIXJ3I= github.com/ydb-platform/ydb-go-sdk/v3 v3.54.2 h1:E0yUuuX7UmPxXm92+yQCjMveLFO3zfvYFIJVuAqsVRA= github.com/ydb-platform/ydb-go-sdk/v3 v3.54.2/go.mod h1:fjBLQ2TdQNl4bMjuWl9adoTGBypwUTPoGC+EqYqiIcU= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1395,10 +1297,10 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= -github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= -github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= -github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= +github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= +github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= +github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= go.dedis.ch/fixbuf v1.0.3 h1:hGcV9Cd/znUxlusJ64eAlExS+5cJDIyTyEG+otu5wQs= go.dedis.ch/fixbuf v1.0.3/go.mod h1:yzJMt34Wa5xD37V5RTdmp38cz3QhMagdGoem9anUalw= go.dedis.ch/kyber/v3 v3.0.4/go.mod h1:OzvaEnPvKlyrWyp3kGXlFdp7ap1VC6RkZDTaPikqhsQ= @@ -1428,6 +1330,8 @@ go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0. go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.49.0/go.mod h1:1P/02zM3OwkX9uki+Wmxw3a5GVb6KUXRsa7m7bOC9Fg= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 h1:SpGay3w+nEwMpfVnbqOLH5gY52/foP8RE8UzTZ1pdSE= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1/go.mod h1:4UoMYEZOC0yN/sPGH76KPkkU7zgiEWYWL9vwmbnTJPE= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 h1:aFJWCqJMNjENlcleuuOkGAPH82y0yULBScfXcIEdS24= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1/go.mod h1:sEGXWArGqc3tVa+ekntsN65DmVbVeW+7lTKTjZF3/Fo= go.opentelemetry.io/contrib/propagators/b3 v1.24.0 h1:n4xwCdTx3pZqZs2CjS/CUZAs03y3dZcGhC/FepKtEUY= go.opentelemetry.io/contrib/propagators/b3 v1.24.0/go.mod h1:k5wRxKRU2uXx2F8uNJ4TaonuEO/V7/5xoz7kdsDACT8= go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= @@ -1486,23 +1390,18 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= @@ -1531,7 +1430,6 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -1540,8 +1438,6 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= @@ -1558,7 +1454,6 @@ golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -1568,7 +1463,6 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1587,17 +1481,13 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210331212208-0fccb6fa2b5c/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= @@ -1611,10 +1501,6 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210413134643-5e61552d6c78/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= @@ -1627,7 +1513,6 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1680,38 +1565,29 @@ golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210331175145-43e1dd70ce54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1748,17 +1624,14 @@ golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -1803,16 +1676,9 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= @@ -1825,8 +1691,6 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0= gonum.org/v1/gonum v0.14.0/go.mod h1:AoWeoz0becf9QMWtE8iWXNXc27fK4fNeHNf/oMejGfU= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= @@ -1846,11 +1710,8 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.149.0 h1:b2CqT6kG+zqJIVKRQ3ELJVLN1PwHZ6DJ3dW8yl82rgY= -google.golang.org/api v0.149.0/go.mod h1:Mwn1B7JTXrzXtnvmzQE2BD6bYZQ8DShKZDZbeN9I7qI= +google.golang.org/api v0.155.0 h1:vBmGhCYs0djJttDNynWo44zosHlPvHmA0XiN2zP2DtA= +google.golang.org/api v0.155.0/go.mod h1:GI5qK5f40kCpHfPn6+YzGAByIKWv8ujFnmoWm7Igduk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1858,10 +1719,8 @@ google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww google.golang.org/appengine v1.6.2/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1897,22 +1756,13 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210401141331-865547bb08e2/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405/go.mod h1:3WDQMjmJk36UQhjQ89emUzb1mdaHcPeeAh4SCBKznB4= -google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b h1:CIC2YMXmIhYw6evmhPxBKJ4fmLbOFtXQN/GV3XOZR8k= -google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1927,16 +1777,12 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/grpc/examples v0.0.0-20210424002626-9572fd6faeae/go.mod h1:Ly7ZA/ARzg8fnPU9TyZIxoz33sEUuWX7txiqs8lPTgE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1972,10 +1818,8 @@ gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:a gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= @@ -1991,14 +1835,13 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 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.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= -gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +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= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -2044,8 +1887,8 @@ modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g= nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= -pgregory.net/rapid v0.5.5 h1:jkgx1TjbQPD/feRoK+S/mXw9e1uj6WilpHrXJowi6oA= -pgregory.net/rapid v0.5.5/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= diff --git a/core/services/ccipcapability/launcher/README.md b/core/services/ccipcapability/launcher/README.md new file mode 100644 index 0000000000..e3cdc14205 --- /dev/null +++ b/core/services/ccipcapability/launcher/README.md @@ -0,0 +1,69 @@ +# CCIP Capability Launcher + +The CCIP capability launcher is responsible for listening to +[Capabilities Registry](../../../../contracts/src/v0.8/keystone/CapabilitiesRegistry.sol) (CR) updates +for the particular CCIP capability (labelled name, version) pair and reacting to them. In +particular, there are three kinds of events that would affect a particular capability: + +1. DON Creation: when `addDON` is called on the CR, the capabilities of this new DON are specified. +If CCIP is one of those capabilities, the launcher will launch a commit and an execution plugin +with the OCR configuration specified in the DON creation process. See +[Types.sol](../../../../contracts/src/v0.8/ccip/capability/libraries/Types.sol) for more details +on what the OCR configuration contains. +2. DON update: when `updateDON` is called on the CR, capabilities of the DON can be updated. In the +CCIP use case specifically, `updateDON` is used to update OCR configuration of that DON. Updates +follow the blue/green deployment pattern (explained in detail below with a state diagram). In this +scenario the launcher must either launch brand new instances of the commit and execution plugins +(in the event a green deployment is made) or promote the currently running green instance to be +the blue instance. +3. DON deletion: when `deleteDON` is called on the CR, the launcher must shut down all running plugins +related to that DON. When a DON is deleted it effectively means that it should no longer function. +DON deletion is permanent. + +## Architecture Diagram + +![CCIP Capability Launcher](./ccip_capability_launcher.png) + +The above diagram shows how the CCIP capability launcher interacts with the rest of the components +in the CCIP system. + +The CCIP capability job, which is created on the Chainlink node, will spin up the CCIP capability +launcher alongside the home chain reader, which reads the [CCIPConfig.sol](../../../../contracts/src/v0.8/ccip/capability/CCIPConfig.sol) +contract deployed on the home chain (typically Ethereum Mainnet, though could be "any chain" in theory). + +Injected into the launcher is the [OracleCreator](../types/types.go) object which knows how to spin up CCIP +oracles (both bootstrap and plugin oracles). This is used by the launcher at the appropriate time in order +to create oracle instances but not start them right away. + +After all the required oracles have been created, the launcher will start and shut them down as required +in order to match the configuration that was posted on-chain in the CR and the CCIPConfig.sol contract. + + +## Config State Diagram + +![CCIP Config State Machine](./ccip_config_state_machine.png) + +CCIP's blue/green deployment paradigm is intentionally kept as simple as possible. + +Every CCIP DON starts in the `Init` state. Upon DON creation, which must provide a valid OCR +configuration, the CCIP DON will move into the `Running` state. In this state, the DON is +presumed to be fully functional from a configuration standpoint. + +When we want to update configuration, we propose a new configuration to the CR that consists of +an array of two OCR configurations: + +1. The first element of the array is the current OCR configuration that is running (termed "blue"). +2. The second element of the array is the future OCR configuration that we want to run (termed "green"). + +Various checks are done on-chain in order to validate this particular state transition, in particular, +related to config counts. Doing this will move the state of the configuration to the `Staging` state. + +In the `Staging` state, there are effectively four plugins running - one (commit, execution) pair for the +blue configuration, and one (commit, execution) pair for the green configuration. However, only the blue +configuration will actually be writing on-chain, where as the green configuration will be "dry running", +i.e doing everything except transmitting. + +This allows us to test out new configurations without committing to them immediately. + +Finally, from the `Staging` state, there is only one transition, which is to promote the green configuration +to be the new blue configuration, and go back into the `Running` state. diff --git a/core/services/ccipcapability/launcher/bluegreen.go b/core/services/ccipcapability/launcher/bluegreen.go new file mode 100644 index 0000000000..442925c04e --- /dev/null +++ b/core/services/ccipcapability/launcher/bluegreen.go @@ -0,0 +1,177 @@ +package launcher + +import ( + "fmt" + + "go.uber.org/multierr" + + ccipreaderpkg "github.com/smartcontractkit/chainlink-ccip/pkg/reader" + cctypes "github.com/smartcontractkit/chainlink/v2/core/services/ccipcapability/types" +) + +// blueGreenDeployment represents a blue-green deployment of OCR instances. +type blueGreenDeployment struct { + // blue is the blue OCR instance. + // blue must always be present. + blue cctypes.CCIPOracle + + // bootstrapBlue is the bootstrap node of the blue OCR instance. + // Only a subset of the DON will be running bootstrap instances, + // so this may be nil. + bootstrapBlue cctypes.CCIPOracle + + // green is the green OCR instance. + // green may or may not be present. + // green must never be present if blue is not present. + // TODO: should we enforce this invariant somehow? + green cctypes.CCIPOracle + + // bootstrapGreen is the bootstrap node of the green OCR instance. + // Only a subset of the DON will be running bootstrap instances, + // so this may be nil, even when green is not nil. + bootstrapGreen cctypes.CCIPOracle +} + +// ccipDeployment represents blue-green deployments of both commit and exec +// OCR instances. +type ccipDeployment struct { + commit blueGreenDeployment + exec blueGreenDeployment +} + +// Close shuts down all OCR instances in the deployment. +func (c *ccipDeployment) Close() error { + var err error + + // shutdown blue commit instances. + err = multierr.Append(err, c.commit.blue.Close()) + if c.commit.bootstrapBlue != nil { + err = multierr.Append(err, c.commit.bootstrapBlue.Close()) + } + + // shutdown green commit instances. + if c.commit.green != nil { + err = multierr.Append(err, c.commit.green.Close()) + } + if c.commit.bootstrapGreen != nil { + err = multierr.Append(err, c.commit.bootstrapGreen.Close()) + } + + // shutdown blue exec instances. + err = multierr.Append(err, c.exec.blue.Close()) + if c.exec.bootstrapBlue != nil { + err = multierr.Append(err, c.exec.bootstrapBlue.Close()) + } + + // shutdown green exec instances. + if c.exec.green != nil { + err = multierr.Append(err, c.exec.green.Close()) + } + if c.exec.bootstrapGreen != nil { + err = multierr.Append(err, c.exec.bootstrapGreen.Close()) + } + + return err +} + +// StartBlue starts the blue OCR instances. +func (c *ccipDeployment) StartBlue() error { + var err error + + err = multierr.Append(err, c.commit.blue.Start()) + if c.commit.bootstrapBlue != nil { + err = multierr.Append(err, c.commit.bootstrapBlue.Start()) + } + err = multierr.Append(err, c.exec.blue.Start()) + if c.exec.bootstrapBlue != nil { + err = multierr.Append(err, c.exec.bootstrapBlue.Start()) + } + + return err +} + +// CloseBlue shuts down the blue OCR instances. +func (c *ccipDeployment) CloseBlue() error { + var err error + + err = multierr.Append(err, c.commit.blue.Close()) + if c.commit.bootstrapBlue != nil { + err = multierr.Append(err, c.commit.bootstrapBlue.Close()) + } + err = multierr.Append(err, c.exec.blue.Close()) + if c.exec.bootstrapBlue != nil { + err = multierr.Append(err, c.exec.bootstrapBlue.Close()) + } + + return err +} + +// HandleBlueGreen handles the blue-green deployment transition. +// prevDeployment is the previous deployment state. +// there are two possible cases: +// +// 1. both blue and green are present in prevDeployment, but only blue is present in c. +// this is a promotion of green to blue, so we need to shut down the blue deployment +// and make green the new blue. In this case green is already running, so there's no +// need to start it. However, we need to shut down the blue deployment. +// +// 2. only blue is present in prevDeployment, both blue and green are present in c. +// In this case, blue is already running, so there's no need to start it. We need to +// start green. +func (c *ccipDeployment) HandleBlueGreen(prevDeployment *ccipDeployment) error { + if prevDeployment == nil { + return fmt.Errorf("previous deployment is nil") + } + + var err error + if prevDeployment.commit.green != nil && c.commit.green == nil { + err = multierr.Append(err, prevDeployment.commit.blue.Close()) + if prevDeployment.commit.bootstrapBlue != nil { + err = multierr.Append(err, prevDeployment.commit.bootstrapBlue.Close()) + } + } else if prevDeployment.commit.green == nil && c.commit.green != nil { + err = multierr.Append(err, c.commit.green.Start()) + if c.commit.bootstrapGreen != nil { + err = multierr.Append(err, c.commit.bootstrapGreen.Start()) + } + } else { + return fmt.Errorf("invalid blue-green deployment transition") + } + + if prevDeployment.exec.green != nil && c.exec.green == nil { + err = multierr.Append(err, prevDeployment.exec.blue.Close()) + if prevDeployment.exec.bootstrapBlue != nil { + err = multierr.Append(err, prevDeployment.exec.bootstrapBlue.Close()) + } + } else if prevDeployment.exec.green == nil && c.exec.green != nil { + err = multierr.Append(err, c.exec.green.Start()) + if c.exec.bootstrapGreen != nil { + err = multierr.Append(err, c.exec.bootstrapGreen.Start()) + } + } else { + return fmt.Errorf("invalid blue-green deployment transition") + } + + return err +} + +// HasGreenInstance returns true if the deployment has a green instance for the +// given plugin type. +func (c *ccipDeployment) HasGreenInstance(pluginType cctypes.PluginType) bool { + switch pluginType { + case cctypes.PluginTypeCCIPCommit: + return c.commit.green != nil + case cctypes.PluginTypeCCIPExec: + return c.exec.green != nil + default: + return false + } +} + +func isNewGreenInstance(pluginType cctypes.PluginType, ocrConfigs []ccipreaderpkg.OCR3ConfigWithMeta, prevDeployment ccipDeployment) bool { + return len(ocrConfigs) == 2 && !prevDeployment.HasGreenInstance(pluginType) +} + +func isPromotion(pluginType cctypes.PluginType, ocrConfigs []ccipreaderpkg.OCR3ConfigWithMeta, prevDeployment ccipDeployment) bool { + return len(ocrConfigs) == 1 && prevDeployment.HasGreenInstance(pluginType) +} diff --git a/core/services/ccipcapability/launcher/bluegreen_test.go b/core/services/ccipcapability/launcher/bluegreen_test.go new file mode 100644 index 0000000000..a18e02eda3 --- /dev/null +++ b/core/services/ccipcapability/launcher/bluegreen_test.go @@ -0,0 +1,1042 @@ +package launcher + +import ( + "errors" + "testing" + + "github.com/stretchr/testify/require" + + ccipreaderpkg "github.com/smartcontractkit/chainlink-ccip/pkg/reader" + cctypes "github.com/smartcontractkit/chainlink/v2/core/services/ccipcapability/types" + mocktypes "github.com/smartcontractkit/chainlink/v2/core/services/ccipcapability/types/mocks" +) + +func Test_ccipDeployment_Close(t *testing.T) { + type args struct { + commitBlue *mocktypes.CCIPOracle + commitBlueBootstrap *mocktypes.CCIPOracle + commitGreen *mocktypes.CCIPOracle + commitGreenBootstrap *mocktypes.CCIPOracle + execBlue *mocktypes.CCIPOracle + execBlueBootstrap *mocktypes.CCIPOracle + execGreen *mocktypes.CCIPOracle + execGreenBootstrap *mocktypes.CCIPOracle + } + tests := []struct { + name string + args args + expect func(t *testing.T, args args) + asserts func(t *testing.T, args args) + wantErr bool + }{ + { + name: "no errors, blue only", + args: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + commitGreen: nil, + commitGreenBootstrap: nil, + execBlue: mocktypes.NewCCIPOracle(t), + execGreen: nil, + execGreenBootstrap: nil, + }, + expect: func(t *testing.T, args args) { + args.commitBlue.On("Close").Return(nil).Once() + args.execBlue.On("Close").Return(nil).Once() + }, + asserts: func(t *testing.T, args args) { + args.commitBlue.AssertExpectations(t) + args.execBlue.AssertExpectations(t) + }, + wantErr: false, + }, + { + name: "no errors, blue and green", + args: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + commitGreen: mocktypes.NewCCIPOracle(t), + execBlue: mocktypes.NewCCIPOracle(t), + execGreen: mocktypes.NewCCIPOracle(t), + }, + expect: func(t *testing.T, args args) { + args.commitBlue.On("Close").Return(nil).Once() + args.commitGreen.On("Close").Return(nil).Once() + args.execBlue.On("Close").Return(nil).Once() + args.execGreen.On("Close").Return(nil).Once() + }, + asserts: func(t *testing.T, args args) { + args.commitBlue.AssertExpectations(t) + args.commitGreen.AssertExpectations(t) + args.execBlue.AssertExpectations(t) + args.execGreen.AssertExpectations(t) + }, + wantErr: false, + }, + { + name: "error on commit blue", + args: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + commitGreen: nil, + execBlue: mocktypes.NewCCIPOracle(t), + execGreen: nil, + }, + expect: func(t *testing.T, args args) { + args.commitBlue.On("Close").Return(errors.New("failed")).Once() + args.execBlue.On("Close").Return(nil).Once() + }, + asserts: func(t *testing.T, args args) { + args.commitBlue.AssertExpectations(t) + args.execBlue.AssertExpectations(t) + }, + wantErr: true, + }, + { + name: "bootstrap blue also closed", + args: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + commitBlueBootstrap: mocktypes.NewCCIPOracle(t), + execBlue: mocktypes.NewCCIPOracle(t), + execBlueBootstrap: mocktypes.NewCCIPOracle(t), + }, + expect: func(t *testing.T, args args) { + args.commitBlue.On("Close").Return(nil).Once() + args.commitBlueBootstrap.On("Close").Return(nil).Once() + args.execBlue.On("Close").Return(nil).Once() + args.execBlueBootstrap.On("Close").Return(nil).Once() + }, + asserts: func(t *testing.T, args args) { + args.commitBlue.AssertExpectations(t) + args.commitBlueBootstrap.AssertExpectations(t) + args.execBlue.AssertExpectations(t) + args.execBlueBootstrap.AssertExpectations(t) + }, + wantErr: false, + }, + { + name: "bootstrap green also closed", + args: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + commitBlueBootstrap: mocktypes.NewCCIPOracle(t), + commitGreen: mocktypes.NewCCIPOracle(t), + commitGreenBootstrap: mocktypes.NewCCIPOracle(t), + execBlue: mocktypes.NewCCIPOracle(t), + execBlueBootstrap: mocktypes.NewCCIPOracle(t), + execGreen: mocktypes.NewCCIPOracle(t), + execGreenBootstrap: mocktypes.NewCCIPOracle(t), + }, + expect: func(t *testing.T, args args) { + args.commitBlue.On("Close").Return(nil).Once() + args.commitBlueBootstrap.On("Close").Return(nil).Once() + args.commitGreen.On("Close").Return(nil).Once() + args.commitGreenBootstrap.On("Close").Return(nil).Once() + args.execBlue.On("Close").Return(nil).Once() + args.execBlueBootstrap.On("Close").Return(nil).Once() + args.execGreen.On("Close").Return(nil).Once() + args.execGreenBootstrap.On("Close").Return(nil).Once() + }, + asserts: func(t *testing.T, args args) { + args.commitBlue.AssertExpectations(t) + args.commitBlueBootstrap.AssertExpectations(t) + args.commitGreen.AssertExpectations(t) + args.commitGreenBootstrap.AssertExpectations(t) + args.execBlue.AssertExpectations(t) + args.execBlueBootstrap.AssertExpectations(t) + args.execGreen.AssertExpectations(t) + args.execGreenBootstrap.AssertExpectations(t) + }, + wantErr: false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + c := &ccipDeployment{ + commit: blueGreenDeployment{ + blue: tt.args.commitBlue, + }, + exec: blueGreenDeployment{ + blue: tt.args.execBlue, + }, + } + if tt.args.commitGreen != nil { + c.commit.green = tt.args.commitGreen + } + if tt.args.commitBlueBootstrap != nil { + c.commit.bootstrapBlue = tt.args.commitBlueBootstrap + } + if tt.args.commitGreenBootstrap != nil { + c.commit.bootstrapGreen = tt.args.commitGreenBootstrap + } + + if tt.args.execGreen != nil { + c.exec.green = tt.args.execGreen + } + if tt.args.execBlueBootstrap != nil { + c.exec.bootstrapBlue = tt.args.execBlueBootstrap + } + if tt.args.execGreenBootstrap != nil { + c.exec.bootstrapGreen = tt.args.execGreenBootstrap + } + + tt.expect(t, tt.args) + defer tt.asserts(t, tt.args) + err := c.Close() + if tt.wantErr { + require.Error(t, err) + } else { + require.NoError(t, err) + } + }) + } +} + +func Test_ccipDeployment_StartBlue(t *testing.T) { + type args struct { + commitBlue *mocktypes.CCIPOracle + commitBlueBootstrap *mocktypes.CCIPOracle + execBlue *mocktypes.CCIPOracle + execBlueBootstrap *mocktypes.CCIPOracle + } + tests := []struct { + name string + args args + expect func(t *testing.T, args args) + asserts func(t *testing.T, args args) + wantErr bool + }{ + { + name: "no errors, no bootstrap", + args: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + execBlue: mocktypes.NewCCIPOracle(t), + commitBlueBootstrap: nil, + execBlueBootstrap: nil, + }, + expect: func(t *testing.T, args args) { + args.commitBlue.On("Start").Return(nil).Once() + args.execBlue.On("Start").Return(nil).Once() + }, + asserts: func(t *testing.T, args args) { + args.commitBlue.AssertExpectations(t) + args.execBlue.AssertExpectations(t) + }, + wantErr: false, + }, + { + name: "no errors, with bootstrap", + args: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + execBlue: mocktypes.NewCCIPOracle(t), + commitBlueBootstrap: mocktypes.NewCCIPOracle(t), + execBlueBootstrap: mocktypes.NewCCIPOracle(t), + }, + expect: func(t *testing.T, args args) { + args.commitBlue.On("Start").Return(nil).Once() + args.commitBlueBootstrap.On("Start").Return(nil).Once() + args.execBlue.On("Start").Return(nil).Once() + args.execBlueBootstrap.On("Start").Return(nil).Once() + }, + asserts: func(t *testing.T, args args) { + args.commitBlue.AssertExpectations(t) + args.commitBlueBootstrap.AssertExpectations(t) + args.execBlue.AssertExpectations(t) + args.execBlueBootstrap.AssertExpectations(t) + }, + wantErr: false, + }, + { + name: "error on commit blue", + args: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + execBlue: mocktypes.NewCCIPOracle(t), + commitBlueBootstrap: nil, + execBlueBootstrap: nil, + }, + expect: func(t *testing.T, args args) { + args.commitBlue.On("Start").Return(errors.New("failed")).Once() + args.execBlue.On("Start").Return(nil).Once() + }, + asserts: func(t *testing.T, args args) { + args.commitBlue.AssertExpectations(t) + args.execBlue.AssertExpectations(t) + }, + wantErr: true, + }, + { + name: "error on exec blue", + args: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + execBlue: mocktypes.NewCCIPOracle(t), + commitBlueBootstrap: nil, + execBlueBootstrap: nil, + }, + expect: func(t *testing.T, args args) { + args.commitBlue.On("Start").Return(nil).Once() + args.execBlue.On("Start").Return(errors.New("failed")).Once() + }, + asserts: func(t *testing.T, args args) { + args.commitBlue.AssertExpectations(t) + args.execBlue.AssertExpectations(t) + }, + wantErr: true, + }, + { + name: "error on commit blue bootstrap", + args: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + execBlue: mocktypes.NewCCIPOracle(t), + commitBlueBootstrap: mocktypes.NewCCIPOracle(t), + execBlueBootstrap: nil, + }, + expect: func(t *testing.T, args args) { + args.commitBlue.On("Start").Return(nil).Once() + args.commitBlueBootstrap.On("Start").Return(errors.New("failed")).Once() + args.execBlue.On("Start").Return(nil).Once() + }, + asserts: func(t *testing.T, args args) { + args.commitBlue.AssertExpectations(t) + args.commitBlueBootstrap.AssertExpectations(t) + args.execBlue.AssertExpectations(t) + }, + wantErr: true, + }, + { + name: "error on exec blue bootstrap", + args: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + execBlue: mocktypes.NewCCIPOracle(t), + commitBlueBootstrap: nil, + execBlueBootstrap: mocktypes.NewCCIPOracle(t), + }, + expect: func(t *testing.T, args args) { + args.commitBlue.On("Start").Return(nil).Once() + args.execBlue.On("Start").Return(nil).Once() + args.execBlueBootstrap.On("Start").Return(errors.New("failed")).Once() + }, + asserts: func(t *testing.T, args args) { + args.commitBlue.AssertExpectations(t) + args.execBlue.AssertExpectations(t) + args.execBlueBootstrap.AssertExpectations(t) + }, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + c := &ccipDeployment{ + commit: blueGreenDeployment{ + blue: tt.args.commitBlue, + }, + exec: blueGreenDeployment{ + blue: tt.args.execBlue, + }, + } + if tt.args.commitBlueBootstrap != nil { + c.commit.bootstrapBlue = tt.args.commitBlueBootstrap + } + if tt.args.execBlueBootstrap != nil { + c.exec.bootstrapBlue = tt.args.execBlueBootstrap + } + + tt.expect(t, tt.args) + defer tt.asserts(t, tt.args) + err := c.StartBlue() + if tt.wantErr { + require.Error(t, err) + } else { + require.NoError(t, err) + } + }) + } +} + +func Test_ccipDeployment_CloseBlue(t *testing.T) { + type args struct { + commitBlue *mocktypes.CCIPOracle + commitBlueBootstrap *mocktypes.CCIPOracle + execBlue *mocktypes.CCIPOracle + execBlueBootstrap *mocktypes.CCIPOracle + } + tests := []struct { + name string + args args + expect func(t *testing.T, args args) + asserts func(t *testing.T, args args) + wantErr bool + }{ + { + name: "no errors, no bootstrap", + args: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + execBlue: mocktypes.NewCCIPOracle(t), + commitBlueBootstrap: nil, + execBlueBootstrap: nil, + }, + expect: func(t *testing.T, args args) { + args.commitBlue.On("Close").Return(nil).Once() + args.execBlue.On("Close").Return(nil).Once() + }, + asserts: func(t *testing.T, args args) { + args.commitBlue.AssertExpectations(t) + args.execBlue.AssertExpectations(t) + }, + wantErr: false, + }, + { + name: "no errors, with bootstrap", + args: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + execBlue: mocktypes.NewCCIPOracle(t), + commitBlueBootstrap: mocktypes.NewCCIPOracle(t), + execBlueBootstrap: mocktypes.NewCCIPOracle(t), + }, + expect: func(t *testing.T, args args) { + args.commitBlue.On("Close").Return(nil).Once() + args.commitBlueBootstrap.On("Close").Return(nil).Once() + args.execBlue.On("Close").Return(nil).Once() + args.execBlueBootstrap.On("Close").Return(nil).Once() + }, + asserts: func(t *testing.T, args args) { + args.commitBlue.AssertExpectations(t) + args.commitBlueBootstrap.AssertExpectations(t) + args.execBlue.AssertExpectations(t) + args.execBlueBootstrap.AssertExpectations(t) + }, + wantErr: false, + }, + { + name: "error on commit blue", + args: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + execBlue: mocktypes.NewCCIPOracle(t), + commitBlueBootstrap: nil, + execBlueBootstrap: nil, + }, + expect: func(t *testing.T, args args) { + args.commitBlue.On("Close").Return(errors.New("failed")).Once() + args.execBlue.On("Close").Return(nil).Once() + }, + asserts: func(t *testing.T, args args) { + args.commitBlue.AssertExpectations(t) + args.execBlue.AssertExpectations(t) + }, + wantErr: true, + }, + { + name: "error on exec blue", + args: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + execBlue: mocktypes.NewCCIPOracle(t), + commitBlueBootstrap: nil, + execBlueBootstrap: nil, + }, + expect: func(t *testing.T, args args) { + args.commitBlue.On("Close").Return(nil).Once() + args.execBlue.On("Close").Return(errors.New("failed")).Once() + }, + asserts: func(t *testing.T, args args) { + args.commitBlue.AssertExpectations(t) + args.execBlue.AssertExpectations(t) + }, + wantErr: true, + }, + { + name: "error on commit blue bootstrap", + args: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + execBlue: mocktypes.NewCCIPOracle(t), + commitBlueBootstrap: mocktypes.NewCCIPOracle(t), + execBlueBootstrap: nil, + }, + expect: func(t *testing.T, args args) { + args.commitBlue.On("Close").Return(nil).Once() + args.commitBlueBootstrap.On("Close").Return(errors.New("failed")).Once() + args.execBlue.On("Close").Return(nil).Once() + }, + asserts: func(t *testing.T, args args) { + args.commitBlue.AssertExpectations(t) + args.commitBlueBootstrap.AssertExpectations(t) + args.execBlue.AssertExpectations(t) + }, + wantErr: true, + }, + { + name: "error on exec blue bootstrap", + args: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + execBlue: mocktypes.NewCCIPOracle(t), + commitBlueBootstrap: nil, + execBlueBootstrap: mocktypes.NewCCIPOracle(t), + }, + expect: func(t *testing.T, args args) { + args.commitBlue.On("Close").Return(nil).Once() + args.execBlue.On("Close").Return(nil).Once() + args.execBlueBootstrap.On("Close").Return(errors.New("failed")).Once() + }, + asserts: func(t *testing.T, args args) { + args.commitBlue.AssertExpectations(t) + args.execBlue.AssertExpectations(t) + args.execBlueBootstrap.AssertExpectations(t) + }, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + c := &ccipDeployment{ + commit: blueGreenDeployment{ + blue: tt.args.commitBlue, + }, + exec: blueGreenDeployment{ + blue: tt.args.execBlue, + }, + } + if tt.args.commitBlueBootstrap != nil { + c.commit.bootstrapBlue = tt.args.commitBlueBootstrap + } + if tt.args.execBlueBootstrap != nil { + c.exec.bootstrapBlue = tt.args.execBlueBootstrap + } + + tt.expect(t, tt.args) + defer tt.asserts(t, tt.args) + err := c.CloseBlue() + if tt.wantErr { + require.Error(t, err) + } else { + require.NoError(t, err) + } + }) + } +} + +func Test_ccipDeployment_HandleBlueGreen_PrevDeploymentNil(t *testing.T) { + require.Error(t, (&ccipDeployment{}).HandleBlueGreen(nil)) +} + +func Test_ccipDeployment_HandleBlueGreen(t *testing.T) { + type args struct { + commitBlue *mocktypes.CCIPOracle + commitBlueBootstrap *mocktypes.CCIPOracle + commitGreen *mocktypes.CCIPOracle + commitGreenBootstrap *mocktypes.CCIPOracle + execBlue *mocktypes.CCIPOracle + execBlueBootstrap *mocktypes.CCIPOracle + execGreen *mocktypes.CCIPOracle + execGreenBootstrap *mocktypes.CCIPOracle + } + tests := []struct { + name string + argsPrevDeployment args + argsFutureDeployment args + expect func(t *testing.T, args args, argsPrevDeployment args) + asserts func(t *testing.T, args args, argsPrevDeployment args) + wantErr bool + }{ + { + name: "promotion blue to green, no bootstrap", + argsPrevDeployment: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + commitGreen: mocktypes.NewCCIPOracle(t), + execBlue: mocktypes.NewCCIPOracle(t), + execGreen: mocktypes.NewCCIPOracle(t), + }, + argsFutureDeployment: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + commitGreen: nil, + execBlue: mocktypes.NewCCIPOracle(t), + execGreen: nil, + }, + expect: func(t *testing.T, args args, argsPrevDeployment args) { + argsPrevDeployment.commitBlue.On("Close").Return(nil).Once() + argsPrevDeployment.execBlue.On("Close").Return(nil).Once() + }, + asserts: func(t *testing.T, args args, argsPrevDeployment args) { + argsPrevDeployment.commitBlue.AssertExpectations(t) + argsPrevDeployment.execBlue.AssertExpectations(t) + }, + wantErr: false, + }, + { + name: "promotion blue to green, with bootstrap", + argsPrevDeployment: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + commitBlueBootstrap: mocktypes.NewCCIPOracle(t), + commitGreen: mocktypes.NewCCIPOracle(t), + commitGreenBootstrap: mocktypes.NewCCIPOracle(t), + execBlue: mocktypes.NewCCIPOracle(t), + execBlueBootstrap: mocktypes.NewCCIPOracle(t), + execGreen: mocktypes.NewCCIPOracle(t), + execGreenBootstrap: mocktypes.NewCCIPOracle(t), + }, + argsFutureDeployment: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + commitBlueBootstrap: mocktypes.NewCCIPOracle(t), + commitGreen: nil, + commitGreenBootstrap: nil, + execBlue: mocktypes.NewCCIPOracle(t), + execBlueBootstrap: mocktypes.NewCCIPOracle(t), + execGreen: nil, + execGreenBootstrap: nil, + }, + expect: func(t *testing.T, args args, argsPrevDeployment args) { + argsPrevDeployment.commitBlue.On("Close").Return(nil).Once() + argsPrevDeployment.commitBlueBootstrap.On("Close").Return(nil).Once() + argsPrevDeployment.execBlue.On("Close").Return(nil).Once() + argsPrevDeployment.execBlueBootstrap.On("Close").Return(nil).Once() + }, + asserts: func(t *testing.T, args args, argsPrevDeployment args) { + argsPrevDeployment.commitBlue.AssertExpectations(t) + argsPrevDeployment.commitBlueBootstrap.AssertExpectations(t) + argsPrevDeployment.execBlue.AssertExpectations(t) + argsPrevDeployment.execBlueBootstrap.AssertExpectations(t) + }, + wantErr: false, + }, + { + name: "new green deployment, no bootstrap", + argsPrevDeployment: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + commitGreen: nil, + execBlue: mocktypes.NewCCIPOracle(t), + execGreen: nil, + }, + argsFutureDeployment: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + commitGreen: mocktypes.NewCCIPOracle(t), + execBlue: mocktypes.NewCCIPOracle(t), + execGreen: mocktypes.NewCCIPOracle(t), + }, + expect: func(t *testing.T, args args, argsPrevDeployment args) { + args.commitGreen.On("Start").Return(nil).Once() + args.execGreen.On("Start").Return(nil).Once() + }, + asserts: func(t *testing.T, args args, argsPrevDeployment args) { + args.commitGreen.AssertExpectations(t) + args.execGreen.AssertExpectations(t) + }, + wantErr: false, + }, + { + name: "new green deployment, with bootstrap", + argsPrevDeployment: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + commitBlueBootstrap: mocktypes.NewCCIPOracle(t), + commitGreen: nil, + commitGreenBootstrap: nil, + execBlue: mocktypes.NewCCIPOracle(t), + execBlueBootstrap: mocktypes.NewCCIPOracle(t), + execGreen: nil, + execGreenBootstrap: nil, + }, + argsFutureDeployment: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + commitBlueBootstrap: mocktypes.NewCCIPOracle(t), + commitGreen: mocktypes.NewCCIPOracle(t), + commitGreenBootstrap: mocktypes.NewCCIPOracle(t), + execBlue: mocktypes.NewCCIPOracle(t), + execBlueBootstrap: mocktypes.NewCCIPOracle(t), + execGreen: mocktypes.NewCCIPOracle(t), + execGreenBootstrap: mocktypes.NewCCIPOracle(t), + }, + expect: func(t *testing.T, args args, argsPrevDeployment args) { + args.commitGreen.On("Start").Return(nil).Once() + args.commitGreenBootstrap.On("Start").Return(nil).Once() + args.execGreen.On("Start").Return(nil).Once() + args.execGreenBootstrap.On("Start").Return(nil).Once() + }, + asserts: func(t *testing.T, args args, argsPrevDeployment args) { + args.commitGreen.AssertExpectations(t) + args.commitGreenBootstrap.AssertExpectations(t) + args.execGreen.AssertExpectations(t) + args.execGreenBootstrap.AssertExpectations(t) + }, + wantErr: false, + }, + { + name: "error on commit green start", + argsPrevDeployment: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + commitGreen: nil, + execBlue: mocktypes.NewCCIPOracle(t), + execGreen: nil, + }, + argsFutureDeployment: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + commitGreen: mocktypes.NewCCIPOracle(t), + execBlue: mocktypes.NewCCIPOracle(t), + execGreen: mocktypes.NewCCIPOracle(t), + }, + expect: func(t *testing.T, args args, argsPrevDeployment args) { + args.commitGreen.On("Start").Return(errors.New("failed")).Once() + args.execGreen.On("Start").Return(nil).Once() + }, + asserts: func(t *testing.T, args args, argsPrevDeployment args) { + args.commitGreen.AssertExpectations(t) + args.execGreen.AssertExpectations(t) + }, + wantErr: true, + }, + { + name: "error on exec green start", + argsPrevDeployment: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + commitGreen: nil, + execBlue: mocktypes.NewCCIPOracle(t), + execGreen: nil, + }, + argsFutureDeployment: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + commitGreen: mocktypes.NewCCIPOracle(t), + execBlue: mocktypes.NewCCIPOracle(t), + execGreen: mocktypes.NewCCIPOracle(t), + }, + expect: func(t *testing.T, args args, argsPrevDeployment args) { + args.commitGreen.On("Start").Return(nil).Once() + args.execGreen.On("Start").Return(errors.New("failed")).Once() + }, + asserts: func(t *testing.T, args args, argsPrevDeployment args) { + args.commitGreen.AssertExpectations(t) + args.execGreen.AssertExpectations(t) + }, + wantErr: true, + }, + { + name: "error on commit green bootstrap start", + argsPrevDeployment: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + commitBlueBootstrap: mocktypes.NewCCIPOracle(t), + commitGreen: nil, + commitGreenBootstrap: nil, + execBlue: mocktypes.NewCCIPOracle(t), + execBlueBootstrap: mocktypes.NewCCIPOracle(t), + execGreen: nil, + execGreenBootstrap: nil, + }, + argsFutureDeployment: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + commitBlueBootstrap: mocktypes.NewCCIPOracle(t), + commitGreen: mocktypes.NewCCIPOracle(t), + commitGreenBootstrap: mocktypes.NewCCIPOracle(t), + execBlue: mocktypes.NewCCIPOracle(t), + execBlueBootstrap: mocktypes.NewCCIPOracle(t), + execGreen: mocktypes.NewCCIPOracle(t), + execGreenBootstrap: mocktypes.NewCCIPOracle(t), + }, + expect: func(t *testing.T, args args, argsPrevDeployment args) { + args.commitGreen.On("Start").Return(nil).Once() + args.commitGreenBootstrap.On("Start").Return(errors.New("failed")).Once() + args.execGreen.On("Start").Return(nil).Once() + args.execGreenBootstrap.On("Start").Return(nil).Once() + }, + asserts: func(t *testing.T, args args, argsPrevDeployment args) { + args.commitGreen.AssertExpectations(t) + args.commitGreenBootstrap.AssertExpectations(t) + args.execGreen.AssertExpectations(t) + args.execGreenBootstrap.AssertExpectations(t) + }, + wantErr: true, + }, + { + name: "invalid blue-green deployment transition commit: both prev and future deployment have green", + argsPrevDeployment: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + commitGreen: mocktypes.NewCCIPOracle(t), + execBlue: mocktypes.NewCCIPOracle(t), + execGreen: mocktypes.NewCCIPOracle(t), + }, + argsFutureDeployment: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + commitGreen: mocktypes.NewCCIPOracle(t), + execBlue: mocktypes.NewCCIPOracle(t), + execGreen: mocktypes.NewCCIPOracle(t), + }, + expect: func(t *testing.T, args args, argsPrevDeployment args) {}, + asserts: func(t *testing.T, args args, argsPrevDeployment args) {}, + wantErr: true, + }, + { + name: "invalid blue-green deployment transition exec: both prev and future deployment have green", + argsPrevDeployment: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + commitGreen: nil, + execBlue: mocktypes.NewCCIPOracle(t), + execGreen: mocktypes.NewCCIPOracle(t), + }, + argsFutureDeployment: args{ + commitBlue: mocktypes.NewCCIPOracle(t), + commitGreen: mocktypes.NewCCIPOracle(t), + execBlue: mocktypes.NewCCIPOracle(t), + execGreen: mocktypes.NewCCIPOracle(t), + }, + expect: func(t *testing.T, args args, argsPrevDeployment args) { + args.commitGreen.On("Start").Return(nil).Once() + }, + asserts: func(t *testing.T, args args, argsPrevDeployment args) { + args.commitGreen.AssertExpectations(t) + }, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + futDeployment := &ccipDeployment{ + commit: blueGreenDeployment{ + blue: tt.argsFutureDeployment.commitBlue, + }, + exec: blueGreenDeployment{ + blue: tt.argsFutureDeployment.execBlue, + }, + } + if tt.argsFutureDeployment.commitGreen != nil { + futDeployment.commit.green = tt.argsFutureDeployment.commitGreen + } + if tt.argsFutureDeployment.commitBlueBootstrap != nil { + futDeployment.commit.bootstrapBlue = tt.argsFutureDeployment.commitBlueBootstrap + } + if tt.argsFutureDeployment.commitGreenBootstrap != nil { + futDeployment.commit.bootstrapGreen = tt.argsFutureDeployment.commitGreenBootstrap + } + if tt.argsFutureDeployment.execGreen != nil { + futDeployment.exec.green = tt.argsFutureDeployment.execGreen + } + if tt.argsFutureDeployment.execBlueBootstrap != nil { + futDeployment.exec.bootstrapBlue = tt.argsFutureDeployment.execBlueBootstrap + } + if tt.argsFutureDeployment.execGreenBootstrap != nil { + futDeployment.exec.bootstrapGreen = tt.argsFutureDeployment.execGreenBootstrap + } + + prevDeployment := &ccipDeployment{ + commit: blueGreenDeployment{ + blue: tt.argsPrevDeployment.commitBlue, + }, + exec: blueGreenDeployment{ + blue: tt.argsPrevDeployment.execBlue, + }, + } + if tt.argsPrevDeployment.commitGreen != nil { + prevDeployment.commit.green = tt.argsPrevDeployment.commitGreen + } + if tt.argsPrevDeployment.commitBlueBootstrap != nil { + prevDeployment.commit.bootstrapBlue = tt.argsPrevDeployment.commitBlueBootstrap + } + if tt.argsPrevDeployment.commitGreenBootstrap != nil { + prevDeployment.commit.bootstrapGreen = tt.argsPrevDeployment.commitGreenBootstrap + } + if tt.argsPrevDeployment.execGreen != nil { + prevDeployment.exec.green = tt.argsPrevDeployment.execGreen + } + if tt.argsPrevDeployment.execBlueBootstrap != nil { + prevDeployment.exec.bootstrapBlue = tt.argsPrevDeployment.execBlueBootstrap + } + if tt.argsPrevDeployment.execGreenBootstrap != nil { + prevDeployment.exec.bootstrapGreen = tt.argsPrevDeployment.execGreenBootstrap + } + + tt.expect(t, tt.argsFutureDeployment, tt.argsPrevDeployment) + defer tt.asserts(t, tt.argsFutureDeployment, tt.argsPrevDeployment) + err := futDeployment.HandleBlueGreen(prevDeployment) + if tt.wantErr { + require.Error(t, err) + } else { + require.NoError(t, err) + } + }) + } +} + +func Test_isNewGreenInstance(t *testing.T) { + type args struct { + pluginType cctypes.PluginType + ocrConfigs []ccipreaderpkg.OCR3ConfigWithMeta + prevDeployment ccipDeployment + } + tests := []struct { + name string + args args + want bool + }{ + { + "prev deployment only blue", + args{ + pluginType: cctypes.PluginTypeCCIPCommit, + ocrConfigs: []ccipreaderpkg.OCR3ConfigWithMeta{ + {}, {}, + }, + prevDeployment: ccipDeployment{ + commit: blueGreenDeployment{ + blue: mocktypes.NewCCIPOracle(t), + }, + }, + }, + true, + }, + { + "green -> blue promotion", + args{ + pluginType: cctypes.PluginTypeCCIPCommit, + ocrConfigs: []ccipreaderpkg.OCR3ConfigWithMeta{ + {}, + }, + prevDeployment: ccipDeployment{ + commit: blueGreenDeployment{ + blue: mocktypes.NewCCIPOracle(t), + green: mocktypes.NewCCIPOracle(t), + }, + }, + }, + false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got := isNewGreenInstance(tt.args.pluginType, tt.args.ocrConfigs, tt.args.prevDeployment) + require.Equal(t, tt.want, got) + }) + } +} + +func Test_isPromotion(t *testing.T) { + type args struct { + pluginType cctypes.PluginType + ocrConfigs []ccipreaderpkg.OCR3ConfigWithMeta + prevDeployment ccipDeployment + } + tests := []struct { + name string + args args + want bool + }{ + { + "prev deployment only blue", + args{ + pluginType: cctypes.PluginTypeCCIPCommit, + ocrConfigs: []ccipreaderpkg.OCR3ConfigWithMeta{ + {}, {}, + }, + prevDeployment: ccipDeployment{ + commit: blueGreenDeployment{ + blue: mocktypes.NewCCIPOracle(t), + }, + }, + }, + false, + }, + { + "green -> blue promotion", + args{ + pluginType: cctypes.PluginTypeCCIPCommit, + ocrConfigs: []ccipreaderpkg.OCR3ConfigWithMeta{ + {}, + }, + prevDeployment: ccipDeployment{ + commit: blueGreenDeployment{ + blue: mocktypes.NewCCIPOracle(t), + green: mocktypes.NewCCIPOracle(t), + }, + }, + }, + true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := isPromotion(tt.args.pluginType, tt.args.ocrConfigs, tt.args.prevDeployment); got != tt.want { + t.Errorf("isPromotion() = %v, want %v", got, tt.want) + } + }) + } +} + +func Test_ccipDeployment_HasGreenInstance(t *testing.T) { + type fields struct { + commit blueGreenDeployment + exec blueGreenDeployment + } + type args struct { + pluginType cctypes.PluginType + } + tests := []struct { + name string + fields fields + args args + want bool + }{ + { + "commit green present", + fields{ + commit: blueGreenDeployment{ + blue: mocktypes.NewCCIPOracle(t), + green: mocktypes.NewCCIPOracle(t), + }, + }, + args{ + pluginType: cctypes.PluginTypeCCIPCommit, + }, + true, + }, + { + "commit green not present", + fields{ + commit: blueGreenDeployment{ + blue: mocktypes.NewCCIPOracle(t), + }, + }, + args{ + pluginType: cctypes.PluginTypeCCIPCommit, + }, + false, + }, + { + "exec green present", + fields{ + exec: blueGreenDeployment{ + blue: mocktypes.NewCCIPOracle(t), + green: mocktypes.NewCCIPOracle(t), + }, + }, + args{ + pluginType: cctypes.PluginTypeCCIPExec, + }, + true, + }, + { + "exec green not present", + fields{ + exec: blueGreenDeployment{ + blue: mocktypes.NewCCIPOracle(t), + }, + }, + args{ + pluginType: cctypes.PluginTypeCCIPExec, + }, + false, + }, + { + "invalid plugin type", + fields{}, + args{ + pluginType: cctypes.PluginType(100), + }, + false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + c := &ccipDeployment{} + if tt.fields.commit.blue != nil { + c.commit.blue = tt.fields.commit.blue + } + if tt.fields.commit.green != nil { + c.commit.green = tt.fields.commit.green + } + if tt.fields.exec.blue != nil { + c.exec.blue = tt.fields.exec.blue + } + if tt.fields.exec.green != nil { + c.exec.green = tt.fields.exec.green + } + got := c.HasGreenInstance(tt.args.pluginType) + require.Equal(t, tt.want, got) + }) + } +} diff --git a/core/services/ccipcapability/launcher/ccip_capability_launcher.png b/core/services/ccipcapability/launcher/ccip_capability_launcher.png new file mode 100644 index 0000000000..5e90d5ff7d Binary files /dev/null and b/core/services/ccipcapability/launcher/ccip_capability_launcher.png differ diff --git a/core/services/ccipcapability/launcher/ccip_config_state_machine.png b/core/services/ccipcapability/launcher/ccip_config_state_machine.png new file mode 100644 index 0000000000..ece40e6c19 Binary files /dev/null and b/core/services/ccipcapability/launcher/ccip_config_state_machine.png differ diff --git a/core/services/ccipcapability/launcher/diff.go b/core/services/ccipcapability/launcher/diff.go new file mode 100644 index 0000000000..d56bf9dd12 --- /dev/null +++ b/core/services/ccipcapability/launcher/diff.go @@ -0,0 +1,180 @@ +package launcher + +import ( + "fmt" + + "github.com/ethereum/go-ethereum/crypto" + + ragep2ptypes "github.com/smartcontractkit/libocr/ragep2p/types" + + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" + kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/capabilities_registry" + "github.com/smartcontractkit/chainlink/v2/core/services/registrysyncer" +) + +// diffResult contains the added, removed and updated CCIP DONs. +// It is determined by using the `diff` function below. +type diffResult struct { + added map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo + removed map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo + updated map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo +} + +// diff compares the old and new state and returns the added, removed and updated CCIP DONs. +func diff( + capabilityVersion, + capabilityLabelledName string, + oldState, + newState registrysyncer.State, +) (diffResult, error) { + ccipCapability, err := checkCapabilityPresence(capabilityVersion, capabilityLabelledName, newState) + if err != nil { + return diffResult{}, fmt.Errorf("failed to check capability presence: %w", err) + } + + newCCIPDONs, err := filterCCIPDONs(ccipCapability, newState) + if err != nil { + return diffResult{}, fmt.Errorf("failed to filter CCIP DONs from new state: %w", err) + } + + currCCIPDONs, err := filterCCIPDONs(ccipCapability, oldState) + if err != nil { + return diffResult{}, fmt.Errorf("failed to filter CCIP DONs from old state: %w", err) + } + + // compare curr with new and launch or update OCR instances as needed + diffRes, err := compareDONs(currCCIPDONs, newCCIPDONs) + if err != nil { + return diffResult{}, fmt.Errorf("failed to compare CCIP DONs: %w", err) + } + + return diffRes, nil +} + +// compareDONs compares the current and new CCIP DONs and returns the added, removed and updated DONs. +func compareDONs( + currCCIPDONs, + newCCIPDONs map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo, +) ( + dr diffResult, + err error, +) { + added := make(map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo) + removed := make(map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo) + updated := make(map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo) + + for id, don := range newCCIPDONs { + if currDONState, ok := currCCIPDONs[id]; !ok { + // Not in current state, so mark as added. + added[id] = don + } else { + // If its in the current state and the config count for the DON has changed, mark as updated. + // Since the registry returns the full state we need to compare the config count. + if don.ConfigCount > currDONState.ConfigCount { + updated[id] = don + } + } + } + + for id, don := range currCCIPDONs { + if _, ok := newCCIPDONs[id]; !ok { + // In current state but not in latest registry state, so should remove. + removed[id] = don + } + } + + return diffResult{ + added: added, + removed: removed, + updated: updated, + }, nil +} + +// filterCCIPDONs filters the CCIP DONs from the given state. +func filterCCIPDONs( + ccipCapability kcr.CapabilitiesRegistryCapabilityInfo, + state registrysyncer.State, +) (map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo, error) { + ccipDONs := make(map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo) + for _, don := range state.IDsToDONs { + for _, donCapabilities := range don.CapabilityConfigurations { + hid, err := hashedCapabilityId(ccipCapability.LabelledName, ccipCapability.Version) + if err != nil { + return nil, fmt.Errorf("failed to hash capability id: %w", err) + } + if donCapabilities.CapabilityId == hid { + ccipDONs[registrysyncer.DonID(don.Id)] = don + } + } + } + + return ccipDONs, nil +} + +// checkCapabilityPresence checks if the capability with the given version and +// labelled name is present in the given capability registry state. +func checkCapabilityPresence( + capabilityVersion, + capabilityLabelledName string, + state registrysyncer.State, +) (kcr.CapabilitiesRegistryCapabilityInfo, error) { + // Sanity check to make sure the capability registry has the capability we are looking for. + hid, err := hashedCapabilityId(capabilityLabelledName, capabilityVersion) + if err != nil { + return kcr.CapabilitiesRegistryCapabilityInfo{}, fmt.Errorf("failed to hash capability id: %w", err) + } + ccipCapability, ok := state.IDsToCapabilities[hid] + if !ok { + return kcr.CapabilitiesRegistryCapabilityInfo{}, + fmt.Errorf("failed to find capability with name %s and version %s in capability registry state", + capabilityLabelledName, capabilityVersion) + } + + return ccipCapability, nil +} + +// hashedCapabilityId returns the hashed capability id in a manner equivalent to the capability registry. +func hashedCapabilityId(capabilityLabelledName, capabilityVersion string) (r [32]byte, err error) { + tabi := `[{"type": "string"}, {"type": "string"}]` + abiEncoded, err := utils.ABIEncode(tabi, capabilityLabelledName, capabilityVersion) + if err != nil { + return r, fmt.Errorf("failed to ABI encode capability version and labelled name: %w", err) + } + + h := crypto.Keccak256(abiEncoded) + copy(r[:], h) + return r, nil +} + +// mustHashedCapabilityId is a helper function that panics if the hashedCapabilityId function returns an error. +// should only use in tests. +func mustHashedCapabilityId(capabilityLabelledName, capabilityVersion string) [32]byte { + r, err := hashedCapabilityId(capabilityLabelledName, capabilityVersion) + if err != nil { + panic(err) + } + return r +} + +// isMemberOfDON returns true if and only if the given p2pID is a member of the given DON. +func isMemberOfDON(don kcr.CapabilitiesRegistryDONInfo, p2pID ragep2ptypes.PeerID) bool { + for _, node := range don.NodeP2PIds { + if node == p2pID { + return true + } + } + return false +} + +// isMemberOfBootstrapSubcommittee returns true if and only if the given p2pID is a member of the given bootstrap subcommittee. +func isMemberOfBootstrapSubcommittee( + bootstrapP2PIDs [][32]byte, + p2pID ragep2ptypes.PeerID, +) bool { + for _, bootstrapID := range bootstrapP2PIDs { + if bootstrapID == p2pID { + return true + } + } + return false +} diff --git a/core/services/ccipcapability/launcher/diff_test.go b/core/services/ccipcapability/launcher/diff_test.go new file mode 100644 index 0000000000..c7a54cad2f --- /dev/null +++ b/core/services/ccipcapability/launcher/diff_test.go @@ -0,0 +1,508 @@ +package launcher + +import ( + "math/big" + "reflect" + "testing" + + "github.com/ethereum/go-ethereum/accounts/abi/bind/backends" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core" + ragep2ptypes "github.com/smartcontractkit/libocr/ragep2p/types" + "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" + kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/capabilities_registry" + "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" + "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" + "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types" + "github.com/smartcontractkit/chainlink/v2/core/services/registrysyncer" +) + +func Test_diff(t *testing.T) { + type args struct { + capabilityVersion string + capabilityLabelledName string + oldState registrysyncer.State + newState registrysyncer.State + } + tests := []struct { + name string + args args + want diffResult + wantErr bool + }{ + { + "no diff", + args{ + capabilityVersion: "v1.0.0", + capabilityLabelledName: "ccip", + oldState: registrysyncer.State{ + IDsToCapabilities: map[registrysyncer.HashedCapabilityID]kcr.CapabilitiesRegistryCapabilityInfo{ + mustHashedCapabilityId("ccip", "v1.0.0"): { + LabelledName: "ccip", + Version: "v1.0.0", + }, + }, + IDsToDONs: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{ + 1: { + Id: 1, + CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ + { + CapabilityId: mustHashedCapabilityId("ccip", "v1.0.0"), + }, + }, + }, + }, + IDsToNodes: map[types.PeerID]kcr.CapabilitiesRegistryNodeInfo{}, + }, + newState: registrysyncer.State{ + IDsToCapabilities: map[registrysyncer.HashedCapabilityID]kcr.CapabilitiesRegistryCapabilityInfo{ + mustHashedCapabilityId("ccip", "v1.0.0"): { + LabelledName: "ccip", + Version: "v1.0.0", + }, + }, + IDsToDONs: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{ + 1: { + Id: 1, + CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ + { + CapabilityId: mustHashedCapabilityId("ccip", "v1.0.0"), + }, + }, + }, + }, + IDsToNodes: map[types.PeerID]kcr.CapabilitiesRegistryNodeInfo{}, + }, + }, + diffResult{ + added: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{}, + removed: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{}, + updated: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{}, + }, + false, + }, + { + "capability not present", + args{ + capabilityVersion: "v1.0.0", + capabilityLabelledName: "ccip", + oldState: registrysyncer.State{ + IDsToCapabilities: map[registrysyncer.HashedCapabilityID]kcr.CapabilitiesRegistryCapabilityInfo{ + mustHashedCapabilityId("ccip", "v1.1.0"): { + LabelledName: "ccip", + Version: "v1.1.0", + }, + }, + }, + newState: registrysyncer.State{ + IDsToCapabilities: map[registrysyncer.HashedCapabilityID]kcr.CapabilitiesRegistryCapabilityInfo{ + mustHashedCapabilityId("ccip", "v1.1.0"): { + LabelledName: "ccip", + Version: "v1.1.0", + }, + }, + }, + }, + diffResult{}, + true, + }, + { + "diff present, new don", + args{ + capabilityVersion: "v1.0.0", + capabilityLabelledName: "ccip", + oldState: registrysyncer.State{ + IDsToCapabilities: map[registrysyncer.HashedCapabilityID]kcr.CapabilitiesRegistryCapabilityInfo{ + mustHashedCapabilityId("ccip", "v1.0.0"): { + LabelledName: "ccip", + Version: "v1.0.0", + }, + }, + IDsToDONs: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{}, + }, + newState: registrysyncer.State{ + IDsToCapabilities: map[registrysyncer.HashedCapabilityID]kcr.CapabilitiesRegistryCapabilityInfo{ + mustHashedCapabilityId("ccip", "v1.0.0"): { + LabelledName: "ccip", + Version: "v1.0.0", + }, + }, + IDsToDONs: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{ + 1: { + Id: 1, + CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ + { + CapabilityId: mustHashedCapabilityId("ccip", "v1.0.0"), + }, + }, + }, + }, + }, + }, + diffResult{ + added: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{ + 1: { + Id: 1, + CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ + { + CapabilityId: mustHashedCapabilityId("ccip", "v1.0.0"), + }, + }, + }, + }, + removed: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{}, + updated: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{}, + }, + false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := diff(tt.args.capabilityVersion, tt.args.capabilityLabelledName, tt.args.oldState, tt.args.newState) + if tt.wantErr { + require.Error(t, err) + } else { + require.NoError(t, err) + require.Equal(t, tt.want, got) + } + }) + } +} + +func Test_compareDONs(t *testing.T) { + type args struct { + currCCIPDONs map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo + newCCIPDONs map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo + } + tests := []struct { + name string + args args + wantAdded map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo + wantRemoved map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo + wantUpdated map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo + wantErr bool + }{ + { + "added dons", + args{ + currCCIPDONs: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{}, + newCCIPDONs: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{ + 1: { + Id: 1, + }, + }, + }, + map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{ + 1: { + Id: 1, + }, + }, + map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{}, + map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{}, + false, + }, + { + "removed dons", + args{ + currCCIPDONs: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{ + 1: { + Id: 1, + }, + }, + newCCIPDONs: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{}, + }, + map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{}, + map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{ + 1: { + Id: 1, + }, + }, + map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{}, + false, + }, + { + "updated dons", + args{ + currCCIPDONs: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{ + 1: { + Id: 1, + ConfigCount: 1, + }, + }, + newCCIPDONs: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{ + 1: { + Id: 1, + ConfigCount: 2, + }, + }, + }, + map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{}, + map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{}, + map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{ + 1: { + Id: 1, + ConfigCount: 2, + }, + }, + false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + dr, err := compareDONs(tt.args.currCCIPDONs, tt.args.newCCIPDONs) + if tt.wantErr { + require.Error(t, err) + } else { + require.NoError(t, err) + require.Equal(t, tt.wantAdded, dr.added) + require.Equal(t, tt.wantRemoved, dr.removed) + require.Equal(t, tt.wantUpdated, dr.updated) + } + }) + } +} + +func Test_filterCCIPDONs(t *testing.T) { + type args struct { + ccipCapability kcr.CapabilitiesRegistryCapabilityInfo + state registrysyncer.State + } + tests := []struct { + name string + args args + want map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo + wantErr bool + }{ + { + "one ccip don", + args{ + ccipCapability: kcr.CapabilitiesRegistryCapabilityInfo{ + LabelledName: "ccip", + Version: "v1.0.0", + }, + state: registrysyncer.State{ + IDsToDONs: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{ + 1: { + Id: 1, + CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ + { + CapabilityId: mustHashedCapabilityId("ccip", "v1.0.0"), + }, + }, + }, + }, + }, + }, + map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{ + 1: { + Id: 1, + CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ + { + CapabilityId: mustHashedCapabilityId("ccip", "v1.0.0"), + }, + }, + }, + }, + false, + }, + { + "no ccip dons", + args{ + ccipCapability: kcr.CapabilitiesRegistryCapabilityInfo{ + LabelledName: "ccip", + Version: "v1.0.0", + }, + state: registrysyncer.State{ + IDsToDONs: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{ + 1: { + Id: 1, + CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ + { + CapabilityId: mustHashedCapabilityId("ccip", "v1.1.0"), + }, + }, + }, + }, + }, + }, + map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{}, + false, + }, + { + "don with multiple capabilities, one of them ccip", + args{ + ccipCapability: kcr.CapabilitiesRegistryCapabilityInfo{ + LabelledName: "ccip", + Version: "v1.0.0", + }, + state: registrysyncer.State{ + IDsToDONs: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{ + 1: { + Id: 1, + CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ + { + CapabilityId: mustHashedCapabilityId("ccip", "v1.0.0"), + }, + { + CapabilityId: mustHashedCapabilityId("ccip", "v1.1.0"), + }, + }, + }, + }, + }, + }, + map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{ + 1: { + Id: 1, + CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ + { + CapabilityId: mustHashedCapabilityId("ccip", "v1.0.0"), + }, + { + CapabilityId: mustHashedCapabilityId("ccip", "v1.1.0"), + }, + }, + }, + }, + false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := filterCCIPDONs(tt.args.ccipCapability, tt.args.state) + if tt.wantErr { + require.Error(t, err) + } else { + require.NoError(t, err) + require.Equal(t, tt.want, got) + } + }) + } +} + +func Test_checkCapabilityPresence(t *testing.T) { + type args struct { + capabilityVersion string + capabilityLabelledName string + state registrysyncer.State + } + tests := []struct { + name string + args args + want kcr.CapabilitiesRegistryCapabilityInfo + wantErr bool + }{ + { + "in registry state", + args{ + capabilityVersion: "v1.0.0", + capabilityLabelledName: "ccip", + state: registrysyncer.State{ + IDsToCapabilities: map[registrysyncer.HashedCapabilityID]kcr.CapabilitiesRegistryCapabilityInfo{ + mustHashedCapabilityId("ccip", "v1.0.0"): { + LabelledName: "ccip", + Version: "v1.0.0", + }, + mustHashedCapabilityId("ccip", "v1.1.0"): { + LabelledName: "ccip", + Version: "v1.1.0", + }, + }, + }, + }, + kcr.CapabilitiesRegistryCapabilityInfo{ + LabelledName: "ccip", + Version: "v1.0.0", + }, + false, + }, + { + "not in registry state", + args{ + capabilityVersion: "v1.0.0", + capabilityLabelledName: "ccip", + state: registrysyncer.State{ + IDsToCapabilities: map[registrysyncer.HashedCapabilityID]kcr.CapabilitiesRegistryCapabilityInfo{ + mustHashedCapabilityId("ccip", "v1.1.0"): { + LabelledName: "ccip", + Version: "v1.1.0", + }, + }, + }, + }, + kcr.CapabilitiesRegistryCapabilityInfo{}, + true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := checkCapabilityPresence(tt.args.capabilityVersion, tt.args.capabilityLabelledName, tt.args.state) + if (err != nil) != tt.wantErr { + t.Errorf("checkCapabilityPresence() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("checkCapabilityPresence() = %v, want %v", got, tt.want) + } + }) + } +} + +func Test_hashedCapabilityId(t *testing.T) { + transactor := testutils.MustNewSimTransactor(t) + sb := backends.NewSimulatedBackend(core.GenesisAlloc{ + transactor.From: {Balance: assets.Ether(1000).ToInt()}, + }, 30e6) + + crAddress, _, _, err := kcr.DeployCapabilitiesRegistry(transactor, sb) + require.NoError(t, err) + sb.Commit() + + cr, err := kcr.NewCapabilitiesRegistry(crAddress, sb) + require.NoError(t, err) + + // add a capability, ignore cap config for simplicity. + _, err = cr.AddCapabilities(transactor, []kcr.CapabilitiesRegistryCapability{ + { + LabelledName: "ccip", + Version: "v1.0.0", + CapabilityType: 0, + ResponseType: 0, + ConfigurationContract: common.Address{}, + }, + }) + require.NoError(t, err) + sb.Commit() + + hidExpected, err := cr.GetHashedCapabilityId(nil, "ccip", "v1.0.0") + require.NoError(t, err) + + hid, err := hashedCapabilityId("ccip", "v1.0.0") + require.NoError(t, err) + + require.Equal(t, hidExpected, hid) +} + +func Test_isMemberOfDON(t *testing.T) { + var p2pIDs [][32]byte + for i := range [4]struct{}{} { + p2pIDs = append(p2pIDs, p2pkey.MustNewV2XXXTestingOnly(big.NewInt(int64(i+1))).PeerID()) + } + don := kcr.CapabilitiesRegistryDONInfo{ + Id: 1, + NodeP2PIds: p2pIDs, + } + require.True(t, isMemberOfDON(don, ragep2ptypes.PeerID(p2pkey.MustNewV2XXXTestingOnly(big.NewInt(1)).PeerID()))) + require.False(t, isMemberOfDON(don, ragep2ptypes.PeerID(p2pkey.MustNewV2XXXTestingOnly(big.NewInt(5)).PeerID()))) +} + +func Test_isMemberOfBootstrapSubcommittee(t *testing.T) { + var bootstrapKeys [][32]byte + for i := range [4]struct{}{} { + bootstrapKeys = append(bootstrapKeys, p2pkey.MustNewV2XXXTestingOnly(big.NewInt(int64(i+1))).PeerID()) + } + require.True(t, isMemberOfBootstrapSubcommittee(bootstrapKeys, ragep2ptypes.PeerID(p2pkey.MustNewV2XXXTestingOnly(big.NewInt(1)).PeerID()))) + require.False(t, isMemberOfBootstrapSubcommittee(bootstrapKeys, ragep2ptypes.PeerID(p2pkey.MustNewV2XXXTestingOnly(big.NewInt(5)).PeerID()))) +} diff --git a/core/services/ccipcapability/launcher/integration_test.go b/core/services/ccipcapability/launcher/integration_test.go new file mode 100644 index 0000000000..da04ef4cbc --- /dev/null +++ b/core/services/ccipcapability/launcher/integration_test.go @@ -0,0 +1,112 @@ +package launcher + +import ( + "testing" + "time" + + "github.com/onsi/gomega" + "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/ccip_config" + "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" + "github.com/smartcontractkit/chainlink/v2/core/logger" + cctypes "github.com/smartcontractkit/chainlink/v2/core/services/ccipcapability/types" + it "github.com/smartcontractkit/chainlink/v2/core/services/ocr3/plugins/ccip_integration_tests" + "github.com/smartcontractkit/chainlink/v2/core/services/registrysyncer" +) + +func TestIntegration_Launcher(t *testing.T) { + ctx := testutils.Context(t) + lggr := logger.TestLogger(t) + uni := it.NewTestUniverse(ctx, t, lggr) + // We need 3*f + 1 p2pIDs to have enough nodes to bootstrap + var arr []int64 + n := int(it.FChainA*3 + 1) + for i := 0; i <= n; i++ { + arr = append(arr, int64(i)) + } + p2pIDs := it.P2pIDsFromInts(arr) + uni.AddCapability(p2pIDs) + + regSyncer, err := registrysyncer.New(lggr, uni, uni.CapReg.Address().String()) + require.NoError(t, err) + + hcr := uni.HomeChainReader + launcher := New( + it.CcipCapabilityVersion, + it.CcipCapabilityLabelledName, + p2pIDs[0], + logger.TestLogger(t), + hcr, + &oracleCreatorPrints{ + t: t, + }, + 1*time.Second, + ) + regSyncer.AddLauncher(launcher) + + require.NoError(t, launcher.Start(ctx)) + require.NoError(t, regSyncer.Start(ctx)) + t.Cleanup(func() { require.NoError(t, regSyncer.Close()) }) + t.Cleanup(func() { require.NoError(t, launcher.Close()) }) + + chainAConf := it.SetupConfigInfo(it.ChainA, p2pIDs, it.FChainA, []byte("ChainA")) + chainBConf := it.SetupConfigInfo(it.ChainB, p2pIDs[1:], it.FChainB, []byte("ChainB")) + chainCConf := it.SetupConfigInfo(it.ChainC, p2pIDs[2:], it.FChainC, []byte("ChainC")) + inputConfig := []ccip_config.CCIPConfigTypesChainConfigInfo{ + chainAConf, + chainBConf, + chainCConf, + } + _, err = uni.CcipCfg.ApplyChainConfigUpdates(uni.Transactor, nil, inputConfig) + require.NoError(t, err) + uni.Backend.Commit() + + ccipCapabilityID, err := uni.CapReg.GetHashedCapabilityId(nil, it.CcipCapabilityLabelledName, it.CcipCapabilityVersion) + require.NoError(t, err) + + uni.AddDONToRegistry( + ccipCapabilityID, + it.ChainA, + it.FChainA, + p2pIDs[1], + p2pIDs) + + gomega.NewWithT(t).Eventually(func() bool { + return len(launcher.runningDONIDs()) == 1 + }, testutils.WaitTimeout(t), testutils.TestInterval).Should(gomega.BeTrue()) +} + +type oraclePrints struct { + t *testing.T + pluginType cctypes.PluginType + config cctypes.OCR3ConfigWithMeta + isBootstrap bool +} + +func (o *oraclePrints) Start() error { + o.t.Logf("Starting oracle (pluginType: %s, isBootstrap: %t) with config %+v\n", o.pluginType, o.isBootstrap, o.config) + return nil +} + +func (o *oraclePrints) Close() error { + o.t.Logf("Closing oracle (pluginType: %s, isBootstrap: %t) with config %+v\n", o.pluginType, o.isBootstrap, o.config) + return nil +} + +type oracleCreatorPrints struct { + t *testing.T +} + +func (o *oracleCreatorPrints) CreatePluginOracle(pluginType cctypes.PluginType, config cctypes.OCR3ConfigWithMeta) (cctypes.CCIPOracle, error) { + o.t.Logf("Creating plugin oracle (pluginType: %s) with config %+v\n", pluginType, config) + return &oraclePrints{pluginType: pluginType, config: config, t: o.t}, nil +} + +func (o *oracleCreatorPrints) CreateBootstrapOracle(config cctypes.OCR3ConfigWithMeta) (cctypes.CCIPOracle, error) { + o.t.Logf("Creating bootstrap oracle with config %+v\n", config) + return &oraclePrints{pluginType: cctypes.PluginTypeCCIPCommit, config: config, isBootstrap: true, t: o.t}, nil +} + +var _ cctypes.OracleCreator = &oracleCreatorPrints{} +var _ cctypes.CCIPOracle = &oraclePrints{} diff --git a/core/services/ccipcapability/launcher/launcher.go b/core/services/ccipcapability/launcher/launcher.go new file mode 100644 index 0000000000..66aaef8cc0 --- /dev/null +++ b/core/services/ccipcapability/launcher/launcher.go @@ -0,0 +1,434 @@ +package launcher + +import ( + "context" + "fmt" + "sync" + "time" + + "go.uber.org/multierr" + + ragep2ptypes "github.com/smartcontractkit/libocr/ragep2p/types" + + ccipreaderpkg "github.com/smartcontractkit/chainlink-ccip/pkg/reader" + "github.com/smartcontractkit/chainlink-common/pkg/services" + + ccipreader "github.com/smartcontractkit/chainlink-ccip/pkg/reader" + kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/capabilities_registry" + "github.com/smartcontractkit/chainlink/v2/core/logger" + cctypes "github.com/smartcontractkit/chainlink/v2/core/services/ccipcapability/types" + "github.com/smartcontractkit/chainlink/v2/core/services/job" + p2ptypes "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types" + "github.com/smartcontractkit/chainlink/v2/core/services/registrysyncer" +) + +var ( + _ job.ServiceCtx = (*launcher)(nil) + _ registrysyncer.Launcher = (*launcher)(nil) +) + +func New( + capabilityVersion, + capabilityLabelledName string, + p2pID ragep2ptypes.PeerID, + lggr logger.Logger, + homeChainReader ccipreader.HomeChain, + oracleCreator cctypes.OracleCreator, + tickInterval time.Duration, +) *launcher { + return &launcher{ + capabilityVersion: capabilityVersion, + capabilityLabelledName: capabilityLabelledName, + p2pID: p2pID, + lggr: lggr, + homeChainReader: homeChainReader, + regState: registrysyncer.State{ + IDsToDONs: make(map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo), + IDsToNodes: make(map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo), + IDsToCapabilities: make(map[registrysyncer.HashedCapabilityID]kcr.CapabilitiesRegistryCapabilityInfo), + }, + oracleCreator: oracleCreator, + dons: make(map[registrysyncer.DonID]*ccipDeployment), + tickInterval: tickInterval, + } +} + +// launcher manages the lifecycles of the CCIP capability on all chains. +type launcher struct { + services.StateMachine + + capabilityVersion string + capabilityLabelledName string + p2pID ragep2ptypes.PeerID + lggr logger.Logger + homeChainReader ccipreader.HomeChain + stopChan chan struct{} + // latestState is the latest capability registry state received from the syncer. + latestState registrysyncer.State + // regState is the latest capability registry state that we have successfully processed. + regState registrysyncer.State + oracleCreator cctypes.OracleCreator + lock sync.RWMutex + wg sync.WaitGroup + tickInterval time.Duration + + // dons is a map of CCIP DON IDs to the OCR instances that are running on them. + // we can have up to two OCR instances per CCIP plugin, since we are running two plugins, + // thats four OCR instances per CCIP DON maximum. + dons map[registrysyncer.DonID]*ccipDeployment +} + +// Launch implements registrysyncer.Launcher. +func (l *launcher) Launch(ctx context.Context, state registrysyncer.State) error { + l.lock.Lock() + defer l.lock.Unlock() + l.lggr.Debugw("Received new state from syncer", "dons", state.IDsToDONs) + l.latestState = state + return nil +} + +func (l *launcher) getLatestState() registrysyncer.State { + l.lock.RLock() + defer l.lock.RUnlock() + return l.latestState +} + +func (l *launcher) runningDONIDs() []registrysyncer.DonID { + l.lock.RLock() + defer l.lock.RUnlock() + var runningDONs []registrysyncer.DonID + for id := range l.dons { + runningDONs = append(runningDONs, id) + } + return runningDONs +} + +// Close implements job.ServiceCtx. +func (l *launcher) Close() error { + return l.StateMachine.StopOnce("launcher", func() error { + // shut down the monitor goroutine. + close(l.stopChan) + l.wg.Wait() + + // shut down all running oracles. + var err error + for _, ceDep := range l.dons { + err = multierr.Append(err, ceDep.Close()) + } + + return err + }) +} + +// Start implements job.ServiceCtx. +func (l *launcher) Start(context.Context) error { + return l.StartOnce("launcher", func() error { + l.stopChan = make(chan struct{}) + l.wg.Add(1) + go l.monitor() + return nil + }) +} + +func (l *launcher) monitor() { + defer l.wg.Done() + ticker := time.NewTicker(l.tickInterval) + for { + select { + case <-l.stopChan: + return + case <-ticker.C: + if err := l.tick(); err != nil { + l.lggr.Errorw("Failed to tick", "err", err) + } + } + } +} + +func (l *launcher) tick() error { + // Ensure that the home chain reader is healthy. + // For new jobs it may be possible that the home chain reader is not yet ready + // so we won't be able to fetch configs and start any OCR instances. + if ready := l.homeChainReader.Ready(); ready != nil { + return fmt.Errorf("home chain reader is not ready: %w", ready) + } + + // Fetch the latest state from the capability registry and determine if we need to + // launch or update any OCR instances. + latestState := l.getLatestState() + + diffRes, err := diff(l.capabilityVersion, l.capabilityLabelledName, l.regState, latestState) + if err != nil { + return fmt.Errorf("failed to diff capability registry states: %w", err) + } + + err = l.processDiff(diffRes) + if err != nil { + return fmt.Errorf("failed to process diff: %w", err) + } + + return nil +} + +// processDiff processes the diff between the current and latest capability registry states. +// for any added OCR instances, it will launch them. +// for any removed OCR instances, it will shut them down. +// for any updated OCR instances, it will restart them with the new configuration. +func (l *launcher) processDiff(diff diffResult) error { + err := l.processRemoved(diff.removed) + err = multierr.Append(err, l.processAdded(diff.added)) + err = multierr.Append(err, l.processUpdate(diff.updated)) + + return err +} + +func (l *launcher) processUpdate(updated map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo) error { + l.lock.Lock() + defer l.lock.Unlock() + + for donID, don := range updated { + prevDeployment, ok := l.dons[registrysyncer.DonID(don.Id)] + if !ok { + return fmt.Errorf("invariant violation: expected to find CCIP DON %d in the map of running deployments", don.Id) + } + + futDeployment, err := updateDON( + l.lggr, + l.p2pID, + l.homeChainReader, + l.oracleCreator, + *prevDeployment, + don, + ) + if err != nil { + return err + } + if err := futDeployment.HandleBlueGreen(prevDeployment); err != nil { + // TODO: how to handle a failed blue-green deployment? + return fmt.Errorf("failed to handle blue-green deployment for CCIP DON %d: %w", donID, err) + } + + // update state. + l.dons[donID] = futDeployment + // update the state with the latest config. + // this way if one of the starts errors, we don't retry all of them. + l.regState.IDsToDONs[donID] = updated[donID] + } + + return nil +} + +func (l *launcher) processAdded(added map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo) error { + l.lock.Lock() + defer l.lock.Unlock() + + for donID, don := range added { + dep, err := createDON( + l.lggr, + l.p2pID, + l.homeChainReader, + l.oracleCreator, + don, + ) + if err != nil { + return err + } + if dep == nil { + // not a member of this DON. + continue + } + + if err := dep.StartBlue(); err != nil { + if shutdownErr := dep.CloseBlue(); shutdownErr != nil { + l.lggr.Errorw("Failed to shutdown blue instance after failed start", "donId", donID, "err", shutdownErr) + } + return fmt.Errorf("failed to start oracles for CCIP DON %d: %w", donID, err) + } + + // update state. + l.dons[donID] = dep + // update the state with the latest config. + // this way if one of the starts errors, we don't retry all of them. + l.regState.IDsToDONs[donID] = added[donID] + } + + return nil +} + +func (l *launcher) processRemoved(removed map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo) error { + l.lock.Lock() + defer l.lock.Unlock() + + for id := range removed { + ceDep, ok := l.dons[id] + if !ok { + // not running this particular DON. + continue + } + + if err := ceDep.Close(); err != nil { + return fmt.Errorf("failed to shutdown oracles for CCIP DON %d: %w", id, err) + } + + // after a successful shutdown we can safely remove the DON deployment from the map. + delete(l.dons, id) + delete(l.regState.IDsToDONs, id) + } + + return nil +} + +// updateDON is a pure function that handles the case where a DON in the capability registry +// has received a new configuration. +// It returns a new ccipDeployment that can then be used to perform the blue-green deployment, +// based on the previous deployment. +func updateDON( + lggr logger.Logger, + p2pID ragep2ptypes.PeerID, + homeChainReader ccipreader.HomeChain, + oracleCreator cctypes.OracleCreator, + prevDeployment ccipDeployment, + don kcr.CapabilitiesRegistryDONInfo, +) (futDeployment *ccipDeployment, err error) { + if !isMemberOfDON(don, p2pID) { + lggr.Infow("Not a member of this DON, skipping", "donId", don.Id, "p2pId", p2pID.String()) + return nil, nil + } + + // this should be a retryable error. + commitOCRConfigs, err := homeChainReader.GetOCRConfigs(context.Background(), don.Id, uint8(cctypes.PluginTypeCCIPCommit)) + if err != nil { + return nil, fmt.Errorf("failed to fetch OCR configs for CCIP commit plugin (don id: %d) from home chain config contract: %w", + don.Id, err) + } + + execOCRConfigs, err := homeChainReader.GetOCRConfigs(context.Background(), don.Id, uint8(cctypes.PluginTypeCCIPExec)) + if err != nil { + return nil, fmt.Errorf("failed to fetch OCR configs for CCIP exec plugin (don id: %d) from home chain config contract: %w", + don.Id, err) + } + + commitBgd, err := createFutureBlueGreenDeployment(prevDeployment, commitOCRConfigs, oracleCreator, cctypes.PluginTypeCCIPCommit) + if err != nil { + return nil, fmt.Errorf("failed to create future blue-green deployment for CCIP commit plugin: %w, don id: %d", err, don.Id) + } + + execBgd, err := createFutureBlueGreenDeployment(prevDeployment, execOCRConfigs, oracleCreator, cctypes.PluginTypeCCIPExec) + if err != nil { + return nil, fmt.Errorf("failed to create future blue-green deployment for CCIP exec plugin: %w, don id: %d", err, don.Id) + } + + return &ccipDeployment{ + commit: commitBgd, + exec: execBgd, + }, nil +} + +// valid cases: +// a) len(ocrConfigs) == 2 && !prevDeployment.HasGreenInstance(pluginType): this is a new green instance. +// b) len(ocrConfigs) == 1 && prevDeployment.HasGreenInstance(): this is a promotion of green->blue. +// All other cases are invalid. This is enforced in the ccip config contract. +func createFutureBlueGreenDeployment( + prevDeployment ccipDeployment, + ocrConfigs []ccipreaderpkg.OCR3ConfigWithMeta, + oracleCreator cctypes.OracleCreator, + pluginType cctypes.PluginType, +) (blueGreenDeployment, error) { + var deployment blueGreenDeployment + if isNewGreenInstance(pluginType, ocrConfigs, prevDeployment) { + // this is a new green instance. + greenOracle, err := oracleCreator.CreatePluginOracle(pluginType, cctypes.OCR3ConfigWithMeta(ocrConfigs[1])) + if err != nil { + return blueGreenDeployment{}, fmt.Errorf("failed to create CCIP commit oracle: %w", err) + } + + deployment.blue = prevDeployment.commit.blue + deployment.green = greenOracle + } else if isPromotion(pluginType, ocrConfigs, prevDeployment) { + // this is a promotion of green->blue. + deployment.blue = prevDeployment.commit.green + } else { + return blueGreenDeployment{}, fmt.Errorf("invariant violation: expected 1 or 2 OCR configs for CCIP plugin (type: %d), got %d", pluginType, len(ocrConfigs)) + } + + return deployment, nil +} + +// createDON is a pure function that handles the case where a new DON is added to the capability registry. +// It returns a new ccipDeployment that can then be used to start the blue instance. +func createDON( + lggr logger.Logger, + p2pID ragep2ptypes.PeerID, + homeChainReader ccipreader.HomeChain, + oracleCreator cctypes.OracleCreator, + don kcr.CapabilitiesRegistryDONInfo, +) (*ccipDeployment, error) { + if !isMemberOfDON(don, p2pID) { + lggr.Infow("Not a member of this DON, skipping", "donId", don.Id, "p2pId", p2pID.String()) + return nil, nil + } + + // this should be a retryable error. + commitOCRConfigs, err := homeChainReader.GetOCRConfigs(context.Background(), don.Id, uint8(cctypes.PluginTypeCCIPCommit)) + if err != nil { + return nil, fmt.Errorf("failed to fetch OCR configs for CCIP commit plugin (don id: %d) from home chain config contract: %w", + don.Id, err) + } + + execOCRConfigs, err := homeChainReader.GetOCRConfigs(context.Background(), don.Id, uint8(cctypes.PluginTypeCCIPExec)) + if err != nil { + return nil, fmt.Errorf("failed to fetch OCR configs for CCIP exec plugin (don id: %d) from home chain config contract: %w", + don.Id, err) + } + + // upon creation we should only have one OCR config per plugin type. + if len(commitOCRConfigs) != 1 { + return nil, fmt.Errorf("expected exactly one OCR config for CCIP commit plugin (don id: %d), got %d", don.Id, len(commitOCRConfigs)) + } + + if len(execOCRConfigs) != 1 { + return nil, fmt.Errorf("expected exactly one OCR config for CCIP exec plugin (don id: %d), got %d", don.Id, len(execOCRConfigs)) + } + + commitOracle, commitBootstrap, err := createOracle(p2pID, oracleCreator, cctypes.PluginTypeCCIPCommit, commitOCRConfigs) + if err != nil { + return nil, fmt.Errorf("failed to create CCIP commit oracle: %w", err) + } + + execOracle, execBootstrap, err := createOracle(p2pID, oracleCreator, cctypes.PluginTypeCCIPExec, execOCRConfigs) + if err != nil { + return nil, fmt.Errorf("failed to create CCIP exec oracle: %w", err) + } + + return &ccipDeployment{ + commit: blueGreenDeployment{ + blue: commitOracle, + bootstrapBlue: commitBootstrap, + }, + exec: blueGreenDeployment{ + blue: execOracle, + bootstrapBlue: execBootstrap, + }, + }, nil +} + +func createOracle( + p2pID ragep2ptypes.PeerID, + oracleCreator cctypes.OracleCreator, + pluginType cctypes.PluginType, + ocrConfigs []ccipreaderpkg.OCR3ConfigWithMeta, +) (pluginOracle, bootstrapOracle cctypes.CCIPOracle, err error) { + pluginOracle, err = oracleCreator.CreatePluginOracle(pluginType, cctypes.OCR3ConfigWithMeta(ocrConfigs[0])) + if err != nil { + return nil, nil, fmt.Errorf("failed to create CCIP plugin oracle (plugintype: %d): %w", pluginType, err) + } + + if isMemberOfBootstrapSubcommittee(ocrConfigs[0].Config.BootstrapP2PIds, p2pID) { + bootstrapOracle, err = oracleCreator.CreateBootstrapOracle(cctypes.OCR3ConfigWithMeta(ocrConfigs[0])) + if err != nil { + return nil, nil, fmt.Errorf("failed to create CCIP bootstrap oracle (plugintype: %d): %w", pluginType, err) + } + } + + return pluginOracle, bootstrapOracle, nil +} diff --git a/core/services/ccipcapability/launcher/launcher_test.go b/core/services/ccipcapability/launcher/launcher_test.go new file mode 100644 index 0000000000..6f8fa7b664 --- /dev/null +++ b/core/services/ccipcapability/launcher/launcher_test.go @@ -0,0 +1,495 @@ +package launcher + +import ( + "errors" + "math/big" + "reflect" + "testing" + + ragep2ptypes "github.com/smartcontractkit/libocr/ragep2p/types" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + + ccipreaderpkg "github.com/smartcontractkit/chainlink-ccip/pkg/reader" + + kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/capabilities_registry" + "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" + "github.com/smartcontractkit/chainlink/v2/core/logger" + cctypes "github.com/smartcontractkit/chainlink/v2/core/services/ccipcapability/types" + mockcctypes "github.com/smartcontractkit/chainlink/v2/core/services/ccipcapability/types/mocks" + "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" + "github.com/smartcontractkit/chainlink/v2/core/services/registrysyncer" +) + +func Test_createOracle(t *testing.T) { + var p2pKeys []ragep2ptypes.PeerID + for i := 0; i < 3; i++ { + p2pKeys = append(p2pKeys, ragep2ptypes.PeerID(p2pkey.MustNewV2XXXTestingOnly(big.NewInt(int64(i+1))).PeerID())) + } + myP2PKey := p2pKeys[0] + type args struct { + p2pID ragep2ptypes.PeerID + oracleCreator *mockcctypes.OracleCreator + pluginType cctypes.PluginType + ocrConfigs []ccipreaderpkg.OCR3ConfigWithMeta + } + tests := []struct { + name string + args args + expect func(t *testing.T, args args, oracleCreator *mockcctypes.OracleCreator) + wantErr bool + }{ + { + "success, no bootstrap", + args{ + myP2PKey, + mockcctypes.NewOracleCreator(t), + cctypes.PluginTypeCCIPCommit, + []ccipreaderpkg.OCR3ConfigWithMeta{ + { + Config: ccipreaderpkg.OCR3Config{}, + ConfigCount: 1, + ConfigDigest: testutils.Random32Byte(), + }, + }, + }, + func(t *testing.T, args args, oracleCreator *mockcctypes.OracleCreator) { + oracleCreator. + On("CreatePluginOracle", cctypes.PluginTypeCCIPCommit, cctypes.OCR3ConfigWithMeta(args.ocrConfigs[0])). + Return(mockcctypes.NewCCIPOracle(t), nil) + }, + false, + }, + { + "success, with bootstrap", + args{ + myP2PKey, + mockcctypes.NewOracleCreator(t), + cctypes.PluginTypeCCIPCommit, + []ccipreaderpkg.OCR3ConfigWithMeta{ + { + Config: ccipreaderpkg.OCR3Config{ + BootstrapP2PIds: [][32]byte{myP2PKey}, + }, + ConfigCount: 1, + ConfigDigest: testutils.Random32Byte(), + }, + }, + }, + func(t *testing.T, args args, oracleCreator *mockcctypes.OracleCreator) { + oracleCreator. + On("CreatePluginOracle", cctypes.PluginTypeCCIPCommit, cctypes.OCR3ConfigWithMeta(args.ocrConfigs[0])). + Return(mockcctypes.NewCCIPOracle(t), nil) + oracleCreator. + On("CreateBootstrapOracle", cctypes.OCR3ConfigWithMeta(args.ocrConfigs[0])). + Return(mockcctypes.NewCCIPOracle(t), nil) + }, + false, + }, + { + "error creating plugin oracle", + args{ + myP2PKey, + mockcctypes.NewOracleCreator(t), + cctypes.PluginTypeCCIPCommit, + []ccipreaderpkg.OCR3ConfigWithMeta{ + { + Config: ccipreaderpkg.OCR3Config{}, + ConfigCount: 1, + ConfigDigest: testutils.Random32Byte(), + }, + }, + }, + func(t *testing.T, args args, oracleCreator *mockcctypes.OracleCreator) { + oracleCreator. + On("CreatePluginOracle", cctypes.PluginTypeCCIPCommit, cctypes.OCR3ConfigWithMeta(args.ocrConfigs[0])). + Return(nil, errors.New("error creating oracle")) + }, + true, + }, + { + "error creating bootstrap oracle", + args{ + myP2PKey, + mockcctypes.NewOracleCreator(t), + cctypes.PluginTypeCCIPCommit, + []ccipreaderpkg.OCR3ConfigWithMeta{ + { + Config: ccipreaderpkg.OCR3Config{ + BootstrapP2PIds: [][32]byte{myP2PKey}, + }, + ConfigCount: 1, + ConfigDigest: testutils.Random32Byte(), + }, + }, + }, + func(t *testing.T, args args, oracleCreator *mockcctypes.OracleCreator) { + oracleCreator. + On("CreatePluginOracle", cctypes.PluginTypeCCIPCommit, cctypes.OCR3ConfigWithMeta(args.ocrConfigs[0])). + Return(mockcctypes.NewCCIPOracle(t), nil) + oracleCreator. + On("CreateBootstrapOracle", cctypes.OCR3ConfigWithMeta(args.ocrConfigs[0])). + Return(nil, errors.New("error creating oracle")) + }, + true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + tt.expect(t, tt.args, tt.args.oracleCreator) + _, _, err := createOracle(tt.args.p2pID, tt.args.oracleCreator, tt.args.pluginType, tt.args.ocrConfigs) + if tt.wantErr { + require.Error(t, err) + } else { + require.NoError(t, err) + } + }) + } +} + +func Test_createDON(t *testing.T) { + type args struct { + lggr logger.Logger + p2pID ragep2ptypes.PeerID + homeChainReader *mockcctypes.HomeChainReader + oracleCreator *mockcctypes.OracleCreator + don kcr.CapabilitiesRegistryDONInfo + } + tests := []struct { + name string + args args + expect func(t *testing.T, args args, oracleCreator *mockcctypes.OracleCreator, homeChainReader *mockcctypes.HomeChainReader) + wantErr bool + }{ + { + "not a member of the DON", + args{ + logger.TestLogger(t), + ragep2ptypes.PeerID(p2pkey.MustNewV2XXXTestingOnly(big.NewInt(1)).PeerID()), + mockcctypes.NewHomeChainReader(t), + mockcctypes.NewOracleCreator(t), + kcr.CapabilitiesRegistryDONInfo{ + NodeP2PIds: [][32]byte{ + p2pkey.MustNewV2XXXTestingOnly(big.NewInt(2)).PeerID(), + }, + Id: 2, + }, + }, + func(t *testing.T, args args, oracleCreator *mockcctypes.OracleCreator, homeChainReader *mockcctypes.HomeChainReader) { + }, + false, + }, + { + "success, no bootstrap", + args{ + logger.TestLogger(t), + ragep2ptypes.PeerID(p2pkey.MustNewV2XXXTestingOnly(big.NewInt(1)).PeerID()), + mockcctypes.NewHomeChainReader(t), + mockcctypes.NewOracleCreator(t), + kcr.CapabilitiesRegistryDONInfo{ + NodeP2PIds: [][32]byte{ + p2pkey.MustNewV2XXXTestingOnly(big.NewInt(1)).PeerID(), + }, + Id: 1, + }, + }, + func(t *testing.T, args args, oracleCreator *mockcctypes.OracleCreator, homeChainReader *mockcctypes.HomeChainReader) { + homeChainReader. + On("GetOCRConfigs", mock.Anything, uint32(1), uint8(cctypes.PluginTypeCCIPCommit)). + Return([]ccipreaderpkg.OCR3ConfigWithMeta{{}}, nil) + homeChainReader. + On("GetOCRConfigs", mock.Anything, uint32(1), uint8(cctypes.PluginTypeCCIPExec)). + Return([]ccipreaderpkg.OCR3ConfigWithMeta{{}}, nil) + oracleCreator. + On("CreatePluginOracle", cctypes.PluginTypeCCIPCommit, mock.Anything). + Return(mockcctypes.NewCCIPOracle(t), nil) + oracleCreator. + On("CreatePluginOracle", cctypes.PluginTypeCCIPExec, mock.Anything). + Return(mockcctypes.NewCCIPOracle(t), nil) + }, + false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if tt.expect != nil { + tt.expect(t, tt.args, tt.args.oracleCreator, tt.args.homeChainReader) + } + _, err := createDON(tt.args.lggr, tt.args.p2pID, tt.args.homeChainReader, tt.args.oracleCreator, tt.args.don) + if tt.wantErr { + require.Error(t, err) + } else { + require.NoError(t, err) + } + }) + } +} + +func Test_createFutureBlueGreenDeployment(t *testing.T) { + type args struct { + prevDeployment ccipDeployment + ocrConfigs []ccipreaderpkg.OCR3ConfigWithMeta + oracleCreator *mockcctypes.OracleCreator + pluginType cctypes.PluginType + } + tests := []struct { + name string + args args + want blueGreenDeployment + wantErr bool + }{ + // TODO: Add test cases. + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := createFutureBlueGreenDeployment(tt.args.prevDeployment, tt.args.ocrConfigs, tt.args.oracleCreator, tt.args.pluginType) + if (err != nil) != tt.wantErr { + t.Errorf("createFutureBlueGreenDeployment() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("createFutureBlueGreenDeployment() = %v, want %v", got, tt.want) + } + }) + } +} + +func Test_updateDON(t *testing.T) { + type args struct { + lggr logger.Logger + p2pID ragep2ptypes.PeerID + homeChainReader *mockcctypes.HomeChainReader + oracleCreator *mockcctypes.OracleCreator + prevDeployment ccipDeployment + don kcr.CapabilitiesRegistryDONInfo + } + tests := []struct { + name string + args args + wantFutDeployment *ccipDeployment + wantErr bool + }{ + // TODO: Add test cases. + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + gotFutDeployment, err := updateDON(tt.args.lggr, tt.args.p2pID, tt.args.homeChainReader, tt.args.oracleCreator, tt.args.prevDeployment, tt.args.don) + if (err != nil) != tt.wantErr { + t.Errorf("updateDON() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !reflect.DeepEqual(gotFutDeployment, tt.wantFutDeployment) { + t.Errorf("updateDON() = %v, want %v", gotFutDeployment, tt.wantFutDeployment) + } + }) + } +} + +func Test_launcher_processDiff(t *testing.T) { + type fields struct { + lggr logger.Logger + p2pID ragep2ptypes.PeerID + homeChainReader *mockcctypes.HomeChainReader + oracleCreator *mockcctypes.OracleCreator + dons map[registrysyncer.DonID]*ccipDeployment + regState registrysyncer.State + } + type args struct { + diff diffResult + } + tests := []struct { + name string + fields fields + args args + assert func(t *testing.T, l *launcher) + wantErr bool + }{ + { + "don removed success", + fields{ + dons: map[registrysyncer.DonID]*ccipDeployment{ + 1: { + commit: blueGreenDeployment{ + blue: newMock(t, + func(t *testing.T) *mockcctypes.CCIPOracle { return mockcctypes.NewCCIPOracle(t) }, + func(m *mockcctypes.CCIPOracle) { + m.On("Close").Return(nil) + }), + }, + exec: blueGreenDeployment{ + blue: newMock(t, + func(t *testing.T) *mockcctypes.CCIPOracle { return mockcctypes.NewCCIPOracle(t) }, + func(m *mockcctypes.CCIPOracle) { + m.On("Close").Return(nil) + }), + }, + }, + }, + regState: registrysyncer.State{ + IDsToDONs: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{ + 1: { + Id: 1, + }, + }, + }, + }, + args{ + diff: diffResult{ + removed: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{ + 1: { + Id: 1, + }, + }, + }, + }, + func(t *testing.T, l *launcher) { + require.Len(t, l.dons, 0) + require.Len(t, l.regState.IDsToDONs, 0) + }, + false, + }, + { + "don added success", + fields{ + lggr: logger.TestLogger(t), + p2pID: ragep2ptypes.PeerID(p2pkey.MustNewV2XXXTestingOnly(big.NewInt(1)).PeerID()), + homeChainReader: newMock(t, func(t *testing.T) *mockcctypes.HomeChainReader { + return mockcctypes.NewHomeChainReader(t) + }, func(m *mockcctypes.HomeChainReader) { + m.On("GetOCRConfigs", mock.Anything, uint32(1), uint8(cctypes.PluginTypeCCIPCommit)). + Return([]ccipreaderpkg.OCR3ConfigWithMeta{{}}, nil) + m.On("GetOCRConfigs", mock.Anything, uint32(1), uint8(cctypes.PluginTypeCCIPExec)). + Return([]ccipreaderpkg.OCR3ConfigWithMeta{{}}, nil) + }), + oracleCreator: newMock(t, func(t *testing.T) *mockcctypes.OracleCreator { + return mockcctypes.NewOracleCreator(t) + }, func(m *mockcctypes.OracleCreator) { + commitOracle := mockcctypes.NewCCIPOracle(t) + commitOracle.On("Start").Return(nil) + execOracle := mockcctypes.NewCCIPOracle(t) + execOracle.On("Start").Return(nil) + m.On("CreatePluginOracle", cctypes.PluginTypeCCIPCommit, mock.Anything). + Return(commitOracle, nil) + m.On("CreatePluginOracle", cctypes.PluginTypeCCIPExec, mock.Anything). + Return(execOracle, nil) + }), + dons: map[registrysyncer.DonID]*ccipDeployment{}, + regState: registrysyncer.State{ + IDsToDONs: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{}, + }, + }, + args{ + diff: diffResult{ + added: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{ + 1: { + Id: 1, + NodeP2PIds: [][32]byte{ + p2pkey.MustNewV2XXXTestingOnly(big.NewInt(1)).PeerID(), + }, + }, + }, + }, + }, + func(t *testing.T, l *launcher) { + require.Len(t, l.dons, 1) + require.Len(t, l.regState.IDsToDONs, 1) + }, + false, + }, + { + "don updated new green instance success", + fields{ + lggr: logger.TestLogger(t), + p2pID: ragep2ptypes.PeerID(p2pkey.MustNewV2XXXTestingOnly(big.NewInt(1)).PeerID()), + homeChainReader: newMock(t, func(t *testing.T) *mockcctypes.HomeChainReader { + return mockcctypes.NewHomeChainReader(t) + }, func(m *mockcctypes.HomeChainReader) { + m.On("GetOCRConfigs", mock.Anything, uint32(1), uint8(cctypes.PluginTypeCCIPCommit)). + Return([]ccipreaderpkg.OCR3ConfigWithMeta{{}, {}}, nil) + m.On("GetOCRConfigs", mock.Anything, uint32(1), uint8(cctypes.PluginTypeCCIPExec)). + Return([]ccipreaderpkg.OCR3ConfigWithMeta{{}, {}}, nil) + }), + oracleCreator: newMock(t, func(t *testing.T) *mockcctypes.OracleCreator { + return mockcctypes.NewOracleCreator(t) + }, func(m *mockcctypes.OracleCreator) { + commitOracle := mockcctypes.NewCCIPOracle(t) + commitOracle.On("Start").Return(nil) + execOracle := mockcctypes.NewCCIPOracle(t) + execOracle.On("Start").Return(nil) + m.On("CreatePluginOracle", cctypes.PluginTypeCCIPCommit, mock.Anything). + Return(commitOracle, nil) + m.On("CreatePluginOracle", cctypes.PluginTypeCCIPExec, mock.Anything). + Return(execOracle, nil) + }), + dons: map[registrysyncer.DonID]*ccipDeployment{ + 1: { + commit: blueGreenDeployment{ + blue: newMock(t, func(t *testing.T) *mockcctypes.CCIPOracle { + return mockcctypes.NewCCIPOracle(t) + }, func(m *mockcctypes.CCIPOracle) {}), + }, + exec: blueGreenDeployment{ + blue: newMock(t, func(t *testing.T) *mockcctypes.CCIPOracle { + return mockcctypes.NewCCIPOracle(t) + }, func(m *mockcctypes.CCIPOracle) {}), + }, + }, + }, + regState: registrysyncer.State{ + IDsToDONs: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{ + 1: { + Id: 1, + NodeP2PIds: [][32]byte{ + p2pkey.MustNewV2XXXTestingOnly(big.NewInt(1)).PeerID(), + }, + }, + }, + }, + }, + args{ + diff: diffResult{ + updated: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{ + 1: { + Id: 1, + NodeP2PIds: [][32]byte{ + p2pkey.MustNewV2XXXTestingOnly(big.NewInt(1)).PeerID(), + p2pkey.MustNewV2XXXTestingOnly(big.NewInt(2)).PeerID(), // new node in don + }, + }, + }, + }, + }, + func(t *testing.T, l *launcher) { + require.Len(t, l.dons, 1) + require.Len(t, l.regState.IDsToDONs, 1) + require.Len(t, l.regState.IDsToDONs[1].NodeP2PIds, 2) + }, + false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + l := &launcher{ + dons: tt.fields.dons, + regState: tt.fields.regState, + p2pID: tt.fields.p2pID, + lggr: tt.fields.lggr, + homeChainReader: tt.fields.homeChainReader, + oracleCreator: tt.fields.oracleCreator, + } + err := l.processDiff(tt.args.diff) + if tt.wantErr { + require.Error(t, err) + } else { + require.NoError(t, err) + } + tt.assert(t, l) + }) + } +} + +func newMock[T any](t *testing.T, newer func(t *testing.T) T, expect func(m T)) T { + o := newer(t) + expect(o) + return o +} diff --git a/core/services/ccipcapability/types/mocks/ccip_oracle.go b/core/services/ccipcapability/types/mocks/ccip_oracle.go new file mode 100644 index 0000000000..ebb3ad6801 --- /dev/null +++ b/core/services/ccipcapability/types/mocks/ccip_oracle.go @@ -0,0 +1,60 @@ +// Code generated by mockery v2.42.2. DO NOT EDIT. + +package mocks + +import mock "github.com/stretchr/testify/mock" + +// CCIPOracle is an autogenerated mock type for the CCIPOracle type +type CCIPOracle struct { + mock.Mock +} + +// Close provides a mock function with given fields: +func (_m *CCIPOracle) 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 +} + +// Start provides a mock function with given fields: +func (_m *CCIPOracle) Start() error { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Start") + } + + var r0 error + if rf, ok := ret.Get(0).(func() error); ok { + r0 = rf() + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// NewCCIPOracle creates a new instance of CCIPOracle. 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 NewCCIPOracle(t interface { + mock.TestingT + Cleanup(func()) +}) *CCIPOracle { + mock := &CCIPOracle{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/core/services/ccipcapability/types/mocks/home_chain_reader.go b/core/services/ccipcapability/types/mocks/home_chain_reader.go new file mode 100644 index 0000000000..a5a581a1d2 --- /dev/null +++ b/core/services/ccipcapability/types/mocks/home_chain_reader.go @@ -0,0 +1,129 @@ +package mocks + +import ( + "context" + + mapset "github.com/deckarep/golang-set/v2" + "github.com/stretchr/testify/mock" + + ccipreaderpkg "github.com/smartcontractkit/chainlink-ccip/pkg/reader" + + cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" + + "github.com/smartcontractkit/libocr/ragep2p/types" +) + +var _ ccipreaderpkg.HomeChain = (*HomeChainReader)(nil) + +type HomeChainReader struct { + mock.Mock +} + +func (_m *HomeChainReader) GetChainConfig(chainSelector cciptypes.ChainSelector) (ccipreaderpkg.ChainConfig, error) { + //TODO implement me + panic("implement me") +} + +func (_m *HomeChainReader) GetAllChainConfigs() (map[cciptypes.ChainSelector]ccipreaderpkg.ChainConfig, error) { + //TODO implement me + panic("implement me") +} + +func (_m *HomeChainReader) GetSupportedChainsForPeer(id types.PeerID) (mapset.Set[cciptypes.ChainSelector], error) { + //TODO implement me + panic("implement me") +} + +func (_m *HomeChainReader) GetKnownCCIPChains() (mapset.Set[cciptypes.ChainSelector], error) { + //TODO implement me + panic("implement me") +} + +func (_m *HomeChainReader) GetFChain() (map[cciptypes.ChainSelector]int, error) { + //TODO implement me + panic("implement me") +} + +func (_m *HomeChainReader) Start(ctx context.Context) error { + //TODO implement me + panic("implement me") +} + +func (_m *HomeChainReader) Close() error { + //TODO implement me + panic("implement me") +} + +func (_m *HomeChainReader) HealthReport() map[string]error { + //TODO implement me + panic("implement me") +} + +func (_m *HomeChainReader) Name() string { + //TODO implement me + panic("implement me") +} + +// GetOCRConfigs provides a mock function with given fields: ctx, donID, pluginType +func (_m *HomeChainReader) GetOCRConfigs(ctx context.Context, donID uint32, pluginType uint8) ([]ccipreaderpkg.OCR3ConfigWithMeta, error) { + ret := _m.Called(ctx, donID, pluginType) + + if len(ret) == 0 { + panic("no return value specified for GetOCRConfigs") + } + + var r0 []ccipreaderpkg.OCR3ConfigWithMeta + var r1 error + if rf, ok := ret.Get(0).(func(ctx context.Context, donID uint32, pluginType uint8) ([]ccipreaderpkg.OCR3ConfigWithMeta, error)); ok { + return rf(ctx, donID, pluginType) + } + if rf, ok := ret.Get(0).(func(ctx context.Context, donID uint32, pluginType uint8) []ccipreaderpkg.OCR3ConfigWithMeta); ok { + r0 = rf(ctx, donID, pluginType) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]ccipreaderpkg.OCR3ConfigWithMeta) + } + } + + if rf, ok := ret.Get(1).(func(ctx context.Context, donID uint32, pluginType uint8) error); ok { + r1 = rf(ctx, donID, pluginType) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +func (_m *HomeChainReader) 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 { + return rf() + } + if rf, ok := ret.Get(0).(func() error); ok { + r0 = rf() + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// NewHomeChainReader creates a new instance of HomeChainReader. 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 NewHomeChainReader(t interface { + mock.TestingT + Cleanup(func()) +}) *HomeChainReader { + mock := &HomeChainReader{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/core/services/ccipcapability/types/mocks/oracle_creator.go b/core/services/ccipcapability/types/mocks/oracle_creator.go new file mode 100644 index 0000000000..ce729d1afe --- /dev/null +++ b/core/services/ccipcapability/types/mocks/oracle_creator.go @@ -0,0 +1,87 @@ +// Code generated by mockery v2.42.2. DO NOT EDIT. + +package mocks + +import ( + types "github.com/smartcontractkit/chainlink/v2/core/services/ccipcapability/types" + mock "github.com/stretchr/testify/mock" +) + +// OracleCreator is an autogenerated mock type for the OracleCreator type +type OracleCreator struct { + mock.Mock +} + +// CreateBootstrapOracle provides a mock function with given fields: config +func (_m *OracleCreator) CreateBootstrapOracle(config types.OCR3ConfigWithMeta) (types.CCIPOracle, error) { + ret := _m.Called(config) + + if len(ret) == 0 { + panic("no return value specified for CreateBootstrapOracle") + } + + var r0 types.CCIPOracle + var r1 error + if rf, ok := ret.Get(0).(func(types.OCR3ConfigWithMeta) (types.CCIPOracle, error)); ok { + return rf(config) + } + if rf, ok := ret.Get(0).(func(types.OCR3ConfigWithMeta) types.CCIPOracle); ok { + r0 = rf(config) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(types.CCIPOracle) + } + } + + if rf, ok := ret.Get(1).(func(types.OCR3ConfigWithMeta) error); ok { + r1 = rf(config) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// CreatePluginOracle provides a mock function with given fields: pluginType, config +func (_m *OracleCreator) CreatePluginOracle(pluginType types.PluginType, config types.OCR3ConfigWithMeta) (types.CCIPOracle, error) { + ret := _m.Called(pluginType, config) + + if len(ret) == 0 { + panic("no return value specified for CreatePluginOracle") + } + + var r0 types.CCIPOracle + var r1 error + if rf, ok := ret.Get(0).(func(types.PluginType, types.OCR3ConfigWithMeta) (types.CCIPOracle, error)); ok { + return rf(pluginType, config) + } + if rf, ok := ret.Get(0).(func(types.PluginType, types.OCR3ConfigWithMeta) types.CCIPOracle); ok { + r0 = rf(pluginType, config) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(types.CCIPOracle) + } + } + + if rf, ok := ret.Get(1).(func(types.PluginType, types.OCR3ConfigWithMeta) error); ok { + r1 = rf(pluginType, config) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// NewOracleCreator creates a new instance of OracleCreator. 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 NewOracleCreator(t interface { + mock.TestingT + Cleanup(func()) +}) *OracleCreator { + mock := &OracleCreator{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/core/services/ccipcapability/types/types.go b/core/services/ccipcapability/types/types.go new file mode 100644 index 0000000000..50e4fb19f4 --- /dev/null +++ b/core/services/ccipcapability/types/types.go @@ -0,0 +1,50 @@ +package types + +import ( + ccipreaderpkg "github.com/smartcontractkit/chainlink-ccip/pkg/reader" +) + +// OCR3ConfigWithMeta is a type alias in order to generate correct mocks for the OracleCreator interface. +type OCR3ConfigWithMeta ccipreaderpkg.OCR3ConfigWithMeta + +// PluginType represents the type of CCIP plugin. +// It mirrors the OCRPluginType in Internal.sol. +type PluginType uint8 + +const ( + PluginTypeCCIPCommit PluginType = 0 + PluginTypeCCIPExec PluginType = 1 +) + +func (pt PluginType) String() string { + switch pt { + case PluginTypeCCIPCommit: + return "CCIPCommit" + case PluginTypeCCIPExec: + return "CCIPExec" + default: + return "Unknown" + } +} + +// CCIPOracle represents either a CCIP commit or exec oracle or a bootstrap node. +// +//go:generate mockery --name CCIPOracle --output ./mocks/ --case underscore +type CCIPOracle interface { + Close() error + Start() error +} + +// OracleCreator is an interface for creating CCIP oracles. +// Whether the oracle uses a LOOPP or not is an implementation detail. +// +//go:generate mockery --name OracleCreator --output ./mocks/ --case underscore +type OracleCreator interface { + // CreatePlugin creates a new oracle that will run either the commit or exec ccip plugin. + // The oracle must be returned unstarted. + CreatePluginOracle(pluginType PluginType, config OCR3ConfigWithMeta) (CCIPOracle, error) + + // CreateBootstrapOracle creates a new bootstrap node with the given OCR config. + // The oracle must be returned unstarted. + CreateBootstrapOracle(config OCR3ConfigWithMeta) (CCIPOracle, error) +} diff --git a/core/services/chainlink/relayer_factory.go b/core/services/chainlink/relayer_factory.go index 9c17a5b221..99b0cecb0a 100644 --- a/core/services/chainlink/relayer_factory.go +++ b/core/services/chainlink/relayer_factory.go @@ -155,7 +155,7 @@ func (r *RelayerFactory) NewSolana(ks keystore.Solana, chainCfgs solcfg.TOMLConf if err != nil { return nil, err } - solanaRelayers[relayID] = relay.NewServerAdapter(solana.NewRelayer(lggr, chain, r.CapabilitiesRegistry), chain) + solanaRelayers[relayID] = relay.NewServerAdapter(solana.NewRelayer(lggr, chain), chain) } } return solanaRelayers, nil @@ -230,7 +230,7 @@ func (r *RelayerFactory) NewStarkNet(ks keystore.StarkNet, chainCfgs config.TOML return nil, err } - starknetRelayers[relayID] = relay.NewServerAdapter(pkgstarknet.NewRelayer(lggr, chain, r.CapabilitiesRegistry), chain) + starknetRelayers[relayID] = relay.NewServerAdapter(pkgstarknet.NewRelayer(lggr, chain), chain) } } return starknetRelayers, nil diff --git a/core/services/job/spawner_test.go b/core/services/job/spawner_test.go index 839c107c08..c4b79601b4 100644 --- a/core/services/job/spawner_test.go +++ b/core/services/job/spawner_test.go @@ -73,6 +73,13 @@ func (g *relayGetter) Get(id types.RelayID) (loop.Relayer, error) { return evmrelayer.NewLoopRelayServerAdapter(g.r, g.e), nil } +func (g *relayGetter) List(...types.RelayID) (map[types.RelayID]loop.Relayer, error) { + relayMap := make(map[types.RelayID]loop.Relayer, 1) + r := evmrelayer.NewLoopRelayServerAdapter(g.r, g.e) + relayMap[types.RelayID{Network: "dummy", ChainID: "dummy"}] = r + return relayMap, nil +} + func (g *relayGetter) GetIDToRelayerMap() (map[types.RelayID]loop.Relayer, error) { return map[types.RelayID]loop.Relayer{}, nil } diff --git a/core/services/ocr2/delegate.go b/core/services/ocr2/delegate.go index 19c885ce14..429a086fe0 100644 --- a/core/services/ocr2/delegate.go +++ b/core/services/ocr2/delegate.go @@ -6,18 +6,24 @@ import ( "encoding/json" "fmt" "log" + "strconv" "time" + chainselectors "github.com/smartcontractkit/chain-selectors" + + cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/types/core" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/config" + "github.com/ethereum/go-ethereum/common" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" - "google.golang.org/grpc" - "gopkg.in/guregu/null.v4" - "github.com/smartcontractkit/libocr/commontypes" libocr2 "github.com/smartcontractkit/libocr/offchainreporting2plus" "github.com/smartcontractkit/libocr/offchainreporting2plus/ocr3types" ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + "google.golang.org/grpc" + "gopkg.in/guregu/null.v4" ocr2keepers20 "github.com/smartcontractkit/chainlink-automation/pkg/v2" ocr2keepers20config "github.com/smartcontractkit/chainlink-automation/pkg/v2/config" @@ -33,7 +39,6 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/loop/reportingplugins/ocr3" "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-common/pkg/types" - "github.com/smartcontractkit/chainlink-common/pkg/types/core" llotypes "github.com/smartcontractkit/chainlink-common/pkg/types/llo" "github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox" @@ -87,6 +92,8 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/synchronization" "github.com/smartcontractkit/chainlink/v2/core/services/telemetry" "github.com/smartcontractkit/chainlink/v2/plugins" + + ccipconfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/config" ) type ErrJobSpecNoRelayer struct { @@ -1801,110 +1808,353 @@ func (d *Delegate) newServicesOCR2Functions( func (d *Delegate) newServicesCCIPCommit(ctx context.Context, lggr logger.SugaredLogger, jb job.Job, bootstrapPeers []commontypes.BootstrapperLocator, kb ocr2key.KeyBundle, ocrDB *db, lc ocrtypes.LocalConfig, transmitterID string) ([]job.ServiceCtx, error) { spec := jb.OCR2OracleSpec if spec.Relay != relay.NetworkEVM { - return nil, errors.New("Non evm chains are not supported for CCIP commit") + return nil, fmt.Errorf("non evm chains are not supported for CCIP commit") } - rid, err := spec.RelayID() + dstRid, err := spec.RelayID() if err != nil { return nil, ErrJobSpecNoRelayer{Err: err, PluginName: string(spec.PluginType)} } - chain, err := d.legacyChains.Get(rid.ChainID) + + dstChain, err := d.legacyChains.Get(dstRid.ChainID) if err != nil { - return nil, fmt.Errorf("ccip services; failed to get chain %s: %w", rid.ChainID, err) + return nil, fmt.Errorf("ccip services; failed to get chain %s: %w", dstRid.ChainID, err) } - ccipProvider, err2 := evmrelay.NewCCIPCommitProvider( - ctx, - lggr.Named("CCIPCommit"), - chain, - types.RelayArgs{ - ExternalJobID: jb.ExternalJobID, - JobID: spec.ID, - ContractID: spec.ContractID, - RelayConfig: spec.RelayConfig.Bytes(), - New: d.isNewlyCreatedJob, - }, - transmitterID, - d.ethKs, - ) - if err2 != nil { - return nil, err2 + logError := func(msg string) { + lggr.ErrorIf(d.jobORM.RecordError(context.Background(), jb.ID, msg), "unable to record error") } + + // Write PluginConfig bytes to send source/dest relayer provider + info outside of top level rargs/pargs over the wire + var pluginJobSpecConfig ccipconfig.CommitPluginJobSpecConfig + err = json.Unmarshal(spec.PluginConfig.Bytes(), &pluginJobSpecConfig) + if err != nil { + return nil, err + } + + dstChainID, err := strconv.ParseInt(dstRid.ChainID, 10, 64) + if err != nil { + return nil, err + } + + dstProvider, err := d.ccipCommitGetDstProvider(ctx, jb, pluginJobSpecConfig, transmitterID) + if err != nil { + return nil, err + } + + srcProvider, srcChainID, err := d.ccipCommitGetSrcProvider(ctx, jb, pluginJobSpecConfig, transmitterID, dstProvider) + if err != nil { + return nil, err + } + + srcChainIDstr := strconv.FormatUint(srcChainID, 10) + srcChain, err := d.legacyChains.Get(srcChainIDstr) + if err != nil { + return nil, fmt.Errorf("open source chain: %w", err) + } + oracleArgsNoPlugin := libocr2.OCR2OracleArgs{ BinaryNetworkEndpointFactory: d.peerWrapper.Peer2, V2Bootstrappers: bootstrapPeers, - ContractTransmitter: ccipProvider.ContractTransmitter(), - ContractConfigTracker: ccipProvider.ContractConfigTracker(), + ContractTransmitter: dstProvider.ContractTransmitter(), + ContractConfigTracker: dstProvider.ContractConfigTracker(), Database: ocrDB, LocalConfig: lc, MonitoringEndpoint: d.monitoringEndpointGen.GenMonitoringEndpoint( - rid.Network, - rid.ChainID, + dstRid.Network, + dstRid.ChainID, spec.ContractID, synchronization.OCR2CCIPCommit, ), - OffchainConfigDigester: ccipProvider.OffchainConfigDigester(), + OffchainConfigDigester: dstProvider.OffchainConfigDigester(), OffchainKeyring: kb, OnchainKeyring: kb, MetricsRegisterer: prometheus.WrapRegistererWith(map[string]string{"job_name": jb.Name.ValueOrZero()}, prometheus.DefaultRegisterer), } - logError := func(msg string) { - lggr.ErrorIf(d.jobORM.RecordError(context.Background(), jb.ID, msg), "unable to record error") + + return ccipcommit.NewCommitServices(ctx, d.ds, srcProvider, dstProvider, srcChain, dstChain, d.legacyChains, jb, lggr, d.pipelineRunner, oracleArgsNoPlugin, d.isNewlyCreatedJob, int64(srcChainID), dstChainID, logError) +} + +func newCCIPCommitPluginBytes(isSourceProvider bool, sourceStartBlock uint64, destStartBlock uint64) config.CommitPluginConfig { + return config.CommitPluginConfig{ + IsSourceProvider: isSourceProvider, + SourceStartBlock: sourceStartBlock, + DestStartBlock: destStartBlock, } - return ccipcommit.NewCommitServices(ctx, d.ds, lggr, jb, d.legacyChains, d.isNewlyCreatedJob, d.pipelineRunner, oracleArgsNoPlugin, logError) } -func (d *Delegate) newServicesCCIPExecution(ctx context.Context, lggr logger.SugaredLogger, jb job.Job, bootstrapPeers []commontypes.BootstrapperLocator, kb ocr2key.KeyBundle, ocrDB *db, lc ocrtypes.LocalConfig, transmitterID string) ([]job.ServiceCtx, error) { +func (d *Delegate) ccipCommitGetDstProvider(ctx context.Context, jb job.Job, pluginJobSpecConfig ccipconfig.CommitPluginJobSpecConfig, transmitterID string) (types.CCIPCommitProvider, error) { spec := jb.OCR2OracleSpec if spec.Relay != relay.NetworkEVM { - return nil, errors.New("Non evm chains are not supported for CCIP execution") + return nil, fmt.Errorf("non evm chains are not supported for CCIP commit") } - rid, err := spec.RelayID() + + dstRid, err := spec.RelayID() if err != nil { return nil, ErrJobSpecNoRelayer{Err: err, PluginName: string(spec.PluginType)} } - chain, err := d.legacyChains.Get(rid.ChainID) + + // Write PluginConfig bytes to send source/dest relayer provider + info outside of top level rargs/pargs over the wire + dstConfigBytes, err := newCCIPCommitPluginBytes(false, pluginJobSpecConfig.SourceStartBlock, pluginJobSpecConfig.DestStartBlock).Encode() if err != nil { - return nil, fmt.Errorf("ccip services; failed to get chain %s: %w", rid.ChainID, err) + return nil, err } - ccipProvider, err2 := evmrelay.NewCCIPExecutionProvider( - ctx, - lggr.Named("CCIPExec"), - chain, + + // Get provider from dest chain + dstRelayer, err := d.RelayGetter.Get(dstRid) + if err != nil { + return nil, err + } + + provider, err := dstRelayer.NewPluginProvider(ctx, types.RelayArgs{ - ExternalJobID: jb.ExternalJobID, - JobID: spec.ID, - ContractID: spec.ContractID, - RelayConfig: spec.RelayConfig.Bytes(), - New: d.isNewlyCreatedJob, + ContractID: spec.ContractID, + RelayConfig: spec.RelayConfig.Bytes(), + ProviderType: string(types.CCIPCommit), }, - transmitterID, - d.ethKs, - ) - if err2 != nil { - return nil, err2 + types.PluginArgs{ + TransmitterID: transmitterID, + PluginConfig: dstConfigBytes, + }) + if err != nil { + return nil, fmt.Errorf("unable to create ccip commit provider: %w", err) } - oracleArgsNoPlugin := libocr2.OCR2OracleArgs{ + dstProvider, ok := provider.(types.CCIPCommitProvider) + if !ok { + return nil, fmt.Errorf("could not coerce PluginProvider to CCIPCommitProvider") + } + + return dstProvider, nil +} + +func (d *Delegate) ccipCommitGetSrcProvider(ctx context.Context, jb job.Job, pluginJobSpecConfig ccipconfig.CommitPluginJobSpecConfig, transmitterID string, dstProvider types.CCIPCommitProvider) (srcProvider types.CCIPCommitProvider, srcChainID uint64, err error) { + spec := jb.OCR2OracleSpec + srcConfigBytes, err := newCCIPCommitPluginBytes(true, pluginJobSpecConfig.SourceStartBlock, pluginJobSpecConfig.DestStartBlock).Encode() + if err != nil { + return nil, 0, err + } + // Use OffRampReader to get src chain ID and fetch the src relayer + + var pluginConfig ccipconfig.CommitPluginJobSpecConfig + err = json.Unmarshal(spec.PluginConfig.Bytes(), &pluginConfig) + if err != nil { + return nil, 0, err + } + offRampAddress := pluginConfig.OffRamp + offRampReader, err := dstProvider.NewOffRampReader(ctx, offRampAddress) + if err != nil { + return nil, 0, fmt.Errorf("create offRampReader: %w", err) + } + + offRampConfig, err := offRampReader.GetStaticConfig(ctx) + if err != nil { + return nil, 0, fmt.Errorf("get offRamp static config: %w", err) + } + + srcChainID, err = chainselectors.ChainIdFromSelector(offRampConfig.SourceChainSelector) + if err != nil { + return nil, 0, err + } + srcChainIDstr := strconv.FormatUint(srcChainID, 10) + + // Get provider from source chain + srcRelayer, err := d.RelayGetter.Get(types.RelayID{Network: spec.Relay, ChainID: srcChainIDstr}) + if err != nil { + return nil, 0, err + } + provider, err := srcRelayer.NewPluginProvider(ctx, + types.RelayArgs{ + ContractID: "", // Contract address only valid for dst chain + RelayConfig: spec.RelayConfig.Bytes(), + ProviderType: string(types.CCIPCommit), + }, + types.PluginArgs{ + TransmitterID: transmitterID, + PluginConfig: srcConfigBytes, + }) + if err != nil { + return nil, 0, fmt.Errorf("srcRelayer.NewPluginProvider: %w", err) + } + srcProvider, ok := provider.(types.CCIPCommitProvider) + if !ok { + return nil, 0, fmt.Errorf("could not coerce PluginProvider to CCIPCommitProvider") + } + + return +} + +func (d *Delegate) newServicesCCIPExecution(ctx context.Context, lggr logger.SugaredLogger, jb job.Job, bootstrapPeers []commontypes.BootstrapperLocator, kb ocr2key.KeyBundle, ocrDB *db, lc ocrtypes.LocalConfig, transmitterID string) ([]job.ServiceCtx, error) { + spec := jb.OCR2OracleSpec + if spec.Relay != relay.NetworkEVM { + return nil, fmt.Errorf("Non evm chains are not supported for CCIP execution") + } + dstRid, err := spec.RelayID() + + if err != nil { + return nil, ErrJobSpecNoRelayer{Err: err, PluginName: string(spec.PluginType)} + } + dstChain, err := d.legacyChains.Get(dstRid.ChainID) + if err != nil { + return nil, fmt.Errorf("ccip services; failed to get chain %s: %w", dstRid.ChainID, err) + } + + logError := func(msg string) { + lggr.ErrorIf(d.jobORM.RecordError(context.Background(), jb.ID, msg), "unable to record error") + } + + // PROVIDER BASED ARG CONSTRUCTION + // Write PluginConfig bytes to send source/dest relayer provider + info outside of top level rargs/pargs over the wire + var pluginJobSpecConfig ccipconfig.ExecPluginJobSpecConfig + err = json.Unmarshal(spec.PluginConfig.Bytes(), &pluginJobSpecConfig) + if err != nil { + return nil, err + } + + dstChainID, err := strconv.ParseInt(dstRid.ChainID, 10, 64) + if err != nil { + return nil, err + } + + dstProvider, err := d.ccipExecGetDstProvider(ctx, jb, pluginJobSpecConfig, transmitterID) + if err != nil { + return nil, err + } + + srcProvider, srcChainID, err := d.ccipExecGetSrcProvider(ctx, jb, pluginJobSpecConfig, transmitterID, dstProvider) + if err != nil { + return nil, err + } + + srcChainIDstr := strconv.FormatUint(srcChainID, 10) + srcChain, err := d.legacyChains.Get(srcChainIDstr) + if err != nil { + return nil, fmt.Errorf("open source chain: %w", err) + } + + oracleArgsNoPlugin2 := libocr2.OCR2OracleArgs{ BinaryNetworkEndpointFactory: d.peerWrapper.Peer2, V2Bootstrappers: bootstrapPeers, - ContractTransmitter: ccipProvider.ContractTransmitter(), - ContractConfigTracker: ccipProvider.ContractConfigTracker(), + ContractTransmitter: dstProvider.ContractTransmitter(), + ContractConfigTracker: dstProvider.ContractConfigTracker(), Database: ocrDB, LocalConfig: lc, MonitoringEndpoint: d.monitoringEndpointGen.GenMonitoringEndpoint( - rid.Network, - rid.ChainID, + dstRid.Network, + dstRid.ChainID, spec.ContractID, synchronization.OCR2CCIPExec, ), - OffchainConfigDigester: ccipProvider.OffchainConfigDigester(), + OffchainConfigDigester: dstProvider.OffchainConfigDigester(), OffchainKeyring: kb, OnchainKeyring: kb, MetricsRegisterer: prometheus.WrapRegistererWith(map[string]string{"job_name": jb.Name.ValueOrZero()}, prometheus.DefaultRegisterer), } - logError := func(msg string) { - lggr.ErrorIf(d.jobORM.RecordError(context.Background(), jb.ID, msg), "unable to record error") + + return ccipexec.NewExecServices(ctx, lggr, jb, srcProvider, dstProvider, srcChain, dstChain, int64(srcChainID), dstChainID, d.legacyChains, d.isNewlyCreatedJob, oracleArgsNoPlugin2, logError) +} + +func (d *Delegate) ccipExecGetDstProvider(ctx context.Context, jb job.Job, pluginJobSpecConfig ccipconfig.ExecPluginJobSpecConfig, transmitterID string) (types.CCIPExecProvider, error) { + spec := jb.OCR2OracleSpec + if spec.Relay != relay.NetworkEVM { + return nil, fmt.Errorf("non evm chains are not supported for CCIP execution") + } + dstRid, err := spec.RelayID() + + if err != nil { + return nil, ErrJobSpecNoRelayer{Err: err, PluginName: string(spec.PluginType)} + } + + // PROVIDER BASED ARG CONSTRUCTION + // Write PluginConfig bytes to send source/dest relayer provider + info outside of top level rargs/pargs over the wire + dstConfigBytes, err := newExecPluginConfig(false, pluginJobSpecConfig.SourceStartBlock, pluginJobSpecConfig.DestStartBlock, pluginJobSpecConfig.USDCConfig, string(jb.ID)).Encode() + if err != nil { + return nil, err + } + + // Get provider from dest chain + dstRelayer, err := d.RelayGetter.Get(dstRid) + if err != nil { + return nil, err + } + provider, err := dstRelayer.NewPluginProvider(ctx, + types.RelayArgs{ + ContractID: spec.ContractID, + RelayConfig: spec.RelayConfig.Bytes(), + ProviderType: string(types.CCIPExecution), + }, + types.PluginArgs{ + TransmitterID: transmitterID, + PluginConfig: dstConfigBytes, + }) + if err != nil { + return nil, fmt.Errorf("NewPluginProvider failed on dstRelayer: %w", err) + } + dstProvider, ok := provider.(types.CCIPExecProvider) + if !ok { + return nil, fmt.Errorf("could not coerce PluginProvider to CCIPExecProvider") + } + + return dstProvider, nil +} + +func (d *Delegate) ccipExecGetSrcProvider(ctx context.Context, jb job.Job, pluginJobSpecConfig ccipconfig.ExecPluginJobSpecConfig, transmitterID string, dstProvider types.CCIPExecProvider) (srcProvider types.CCIPExecProvider, srcChainID uint64, err error) { + spec := jb.OCR2OracleSpec + srcConfigBytes, err := newExecPluginConfig(true, pluginJobSpecConfig.SourceStartBlock, pluginJobSpecConfig.DestStartBlock, pluginJobSpecConfig.USDCConfig, string(jb.ID)).Encode() + if err != nil { + return nil, 0, err + } + + // Use OffRampReader to get src chain ID and fetch the src relayer + offRampAddress := cciptypes.Address(common.HexToAddress(spec.ContractID).String()) + offRampReader, err := dstProvider.NewOffRampReader(ctx, offRampAddress) + if err != nil { + return nil, 0, fmt.Errorf("create offRampReader: %w", err) + } + + offRampConfig, err := offRampReader.GetStaticConfig(ctx) + if err != nil { + return nil, 0, fmt.Errorf("get offRamp static config: %w", err) + } + + srcChainID, err = chainselectors.ChainIdFromSelector(offRampConfig.SourceChainSelector) + if err != nil { + return nil, 0, err + } + srcChainIDstr := strconv.FormatUint(srcChainID, 10) + + // Get provider from source chain + srcRelayer, err := d.RelayGetter.Get(types.RelayID{Network: spec.Relay, ChainID: srcChainIDstr}) + if err != nil { + return nil, 0, fmt.Errorf("failed to get relayer: %w", err) + } + provider, err := srcRelayer.NewPluginProvider(ctx, + types.RelayArgs{ + ContractID: "", + RelayConfig: spec.RelayConfig.Bytes(), + ProviderType: string(types.CCIPExecution), + }, + types.PluginArgs{ + TransmitterID: transmitterID, + PluginConfig: srcConfigBytes, + }) + if err != nil { + return nil, 0, err + } + srcProvider, ok := provider.(types.CCIPExecProvider) + if !ok { + return nil, 0, fmt.Errorf("could not coerce PluginProvider to CCIPExecProvider: %w", err) + } + + return +} + +func newExecPluginConfig(isSourceProvider bool, srcStartBlock uint64, dstStartBlock uint64, usdcConfig ccipconfig.USDCConfig, jobID string) config.ExecPluginConfig { + return config.ExecPluginConfig{ + IsSourceProvider: isSourceProvider, + SourceStartBlock: srcStartBlock, + DestStartBlock: dstStartBlock, + USDCConfig: usdcConfig, + JobID: jobID, } - return ccipexec.NewExecutionServices(ctx, lggr, jb, d.legacyChains, d.isNewlyCreatedJob, oracleArgsNoPlugin, logError) } func (d *Delegate) newServicesLiquidityManager(ctx context.Context, lggr logger.SugaredLogger, jb job.Job, bootstrapPeers []commontypes.BootstrapperLocator, kb ocr2key.KeyBundle, ocrDB *db, lc ocrtypes.LocalConfig) ([]job.ServiceCtx, error) { diff --git a/core/services/ocr2/plugins/ccip/ccipcommit/factory.go b/core/services/ocr2/plugins/ccip/ccipcommit/factory.go index 95d6398f56..d4f5e03221 100644 --- a/core/services/ocr2/plugins/ccip/ccipcommit/factory.go +++ b/core/services/ocr2/plugins/ccip/ccipcommit/factory.go @@ -27,6 +27,7 @@ type CommitReportingPluginFactory struct { } // NewCommitReportingPluginFactory return a new CommitReportingPluginFactory. +// TODO: wire through a GasEstimatorProvider here to solve two relayer one provider problem for CommitStoreReader func NewCommitReportingPluginFactory(config CommitPluginStaticConfig) *CommitReportingPluginFactory { return &CommitReportingPluginFactory{ config: config, diff --git a/core/services/ocr2/plugins/ccip/ccipcommit/initializers.go b/core/services/ocr2/plugins/ccip/ccipcommit/initializers.go index 97730ce85b..0ba086bac6 100644 --- a/core/services/ocr2/plugins/ccip/ccipcommit/initializers.go +++ b/core/services/ocr2/plugins/ccip/ccipcommit/initializers.go @@ -7,182 +7,94 @@ import ( "math/big" "strings" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/pricegetter" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib" + "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/pkg/errors" - chainselectors "github.com/smartcontractkit/chain-selectors" libocr2 "github.com/smartcontractkit/libocr/offchainreporting2plus" "go.uber.org/multierr" "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" commonlogger "github.com/smartcontractkit/chainlink-common/pkg/logger" + commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/commit_store" cciporm "github.com/smartcontractkit/chainlink/v2/core/services/ccip" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/cache" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipcalc" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipcommon" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata/ccipdataprovider" db "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdb" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr" "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/commit_store" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/job" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip" ccipconfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/config" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata/factory" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/observability" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/oraclelib" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/pricegetter" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/promwrapper" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" ) -func NewCommitServices(ctx context.Context, ds sqlutil.DataSource, lggr logger.Logger, jb job.Job, chainSet legacyevm.LegacyChainContainer, new bool, pr pipeline.Runner, argsNoPlugin libocr2.OCR2OracleArgs, logError func(string)) ([]job.ServiceCtx, error) { - orm, err := cciporm.NewORM(ds) - if err != nil { - return nil, err - } +func NewCommitServices(ctx context.Context, ds sqlutil.DataSource, srcProvider commontypes.CCIPCommitProvider, dstProvider commontypes.CCIPCommitProvider, srcChain legacyevm.Chain, dstChain legacyevm.Chain, chainSet legacyevm.LegacyChainContainer, jb job.Job, lggr logger.Logger, pr pipeline.Runner, argsNoPlugin libocr2.OCR2OracleArgs, new bool, sourceChainID int64, destChainID int64, logError func(string)) ([]job.ServiceCtx, error) { + spec := jb.OCR2OracleSpec - pluginConfig, backfillArgs, chainHealthcheck, priceService, err := jobSpecToCommitPluginConfig(ctx, orm, lggr, jb, pr, chainSet) - if err != nil { - return nil, err - } - wrappedPluginFactory := NewCommitReportingPluginFactory(*pluginConfig) - destChainID, err := chainselectors.ChainIdFromSelector(pluginConfig.destChainSelector) - if err != nil { - return nil, err - } - argsNoPlugin.ReportingPluginFactory = promwrapper.NewPromFactory(wrappedPluginFactory, "CCIPCommit", jb.OCR2OracleSpec.Relay, big.NewInt(0).SetUint64(destChainID)) - argsNoPlugin.Logger = commonlogger.NewOCRWrapper(pluginConfig.lggr, true, logError) - oracle, err := libocr2.NewOracle(argsNoPlugin) + var pluginConfig ccipconfig.CommitPluginJobSpecConfig + err := json.Unmarshal(spec.PluginConfig.Bytes(), &pluginConfig) if err != nil { return nil, err } - // If this is a brand-new job, then we make use of the start blocks. If not then we're rebooting and log poller will pick up where we left off. - if new { - return []job.ServiceCtx{ - oraclelib.NewBackfilledOracle( - pluginConfig.lggr, - backfillArgs.SourceLP, - backfillArgs.DestLP, - backfillArgs.SourceStartBlock, - backfillArgs.DestStartBlock, - job.NewServiceAdapter(oracle), - ), - chainHealthcheck, - priceService, - }, nil - } - return []job.ServiceCtx{ - job.NewServiceAdapter(oracle), - chainHealthcheck, - priceService, - }, nil -} - -func CommitReportToEthTxMeta(typ ccipconfig.ContractType, ver semver.Version) (func(report []byte) (*txmgr.TxMeta, error), error) { - return factory.CommitReportToEthTxMeta(typ, ver) -} - -// UnregisterCommitPluginLpFilters unregisters all the registered filters for both source and dest chains. -// NOTE: The transaction MUST be used here for CLO's monster tx to function as expected -// https://github.com/smartcontractkit/ccip/blob/68e2197472fb017dd4e5630d21e7878d58bc2a44/core/services/feeds/service.go#L716 -// TODO once that transaction is broken up, we should be able to simply rely on oracle.Close() to cleanup the filters. -// Until then we have to deterministically reload the readers from the spec (and thus their filters) and close them. -func UnregisterCommitPluginLpFilters(ctx context.Context, lggr logger.Logger, jb job.Job, chainSet legacyevm.LegacyChainContainer) error { - params, err := extractJobSpecParams(jb, chainSet) - if err != nil { - return err - } - versionFinder := factory.NewEvmVersionFinder() - unregisterFuncs := []func() error{ - func() error { - return factory.CloseCommitStoreReader(lggr, versionFinder, params.commitStoreAddress, params.destChain.Client(), params.destChain.LogPoller()) - }, - func() error { - return factory.CloseOnRampReader(lggr, versionFinder, params.commitStoreStaticCfg.SourceChainSelector, params.commitStoreStaticCfg.ChainSelector, cciptypes.Address(params.commitStoreStaticCfg.OnRamp.String()), params.sourceChain.LogPoller(), params.sourceChain.Client()) - }, - func() error { - return factory.CloseOffRampReader(lggr, versionFinder, params.pluginConfig.OffRamp, params.destChain.Client(), params.destChain.LogPoller(), params.destChain.GasEstimator(), params.destChain.Config().EVM().GasEstimator().PriceMax().ToInt()) - }, - } - - var multiErr error - for _, fn := range unregisterFuncs { - if err := fn(); err != nil { - multiErr = multierr.Append(multiErr, err) - } - } - return multiErr -} - -func jobSpecToCommitPluginConfig(ctx context.Context, orm cciporm.ORM, lggr logger.Logger, jb job.Job, pr pipeline.Runner, chainSet legacyevm.LegacyChainContainer) (*CommitPluginStaticConfig, *ccipcommon.BackfillArgs, *cache.ObservedChainHealthcheck, db.PriceService, error) { - params, err := extractJobSpecParams(jb, chainSet) - if err != nil { - return nil, nil, nil, nil, err - } - - lggr.Infow("Initializing commit plugin", - "CommitStore", params.commitStoreAddress, - "OffRamp", params.pluginConfig.OffRamp, - "OnRamp", params.commitStoreStaticCfg.OnRamp, - "ArmProxy", params.commitStoreStaticCfg.RmnProxy, - "SourceChainSelector", params.commitStoreStaticCfg.SourceChainSelector, - "DestChainSelector", params.commitStoreStaticCfg.ChainSelector) + // TODO CCIP-2493 EVM family specific behavior leaked for CommitStore, which requires access to two relayers versionFinder := factory.NewEvmVersionFinder() - commitStoreReader, err := factory.NewCommitStoreReader(lggr, versionFinder, params.commitStoreAddress, params.destChain.Client(), params.destChain.LogPoller()) + commitStoreAddress := common.HexToAddress(spec.ContractID) + sourceMaxGasPrice := srcChain.Config().EVM().GasEstimator().PriceMax().ToInt() + commitStoreReader, err := ccip.NewCommitStoreReader(lggr, versionFinder, ccipcalc.EvmAddrToGeneric(commitStoreAddress), dstChain.Client(), dstChain.LogPoller()) if err != nil { - return nil, nil, nil, nil, errors.Wrap(err, "could not create commitStore reader") + return nil, err } - err = commitStoreReader.SetGasEstimator(ctx, params.sourceChain.GasEstimator()) + err = commitStoreReader.SetGasEstimator(ctx, srcChain.GasEstimator()) if err != nil { - return nil, nil, nil, nil, fmt.Errorf("could not set gas estimator: %w", err) + return nil, err } - err = commitStoreReader.SetSourceMaxGasPrice(ctx, params.sourceChain.Config().EVM().GasEstimator().PriceMax().ToInt()) + err = commitStoreReader.SetSourceMaxGasPrice(ctx, sourceMaxGasPrice) if err != nil { - return nil, nil, nil, nil, fmt.Errorf("could not set source max gas price: %w", err) + return nil, err } - sourceChainName, destChainName, err := ccipconfig.ResolveChainNames(params.sourceChain.ID().Int64(), params.destChain.ID().Int64()) - if err != nil { - return nil, nil, nil, nil, err - } - commitLggr := lggr.Named("CCIPCommit").With("sourceChain", sourceChainName, "destChain", destChainName) + commitLggr := lggr.Named("CCIPCommit").With("sourceChain", sourceChainID, "destChain", destChainID) var priceGetter pricegetter.PriceGetter - withPipeline := strings.Trim(params.pluginConfig.TokenPricesUSDPipeline, "\n\t ") != "" + withPipeline := strings.Trim(pluginConfig.TokenPricesUSDPipeline, "\n\t ") != "" if withPipeline { - priceGetter, err = pricegetter.NewPipelineGetter(params.pluginConfig.TokenPricesUSDPipeline, pr, jb.ID, jb.ExternalJobID, jb.Name.ValueOrZero(), lggr) + priceGetter, err = pricegetter.NewPipelineGetter(pluginConfig.TokenPricesUSDPipeline, pr, jb.ID, jb.ExternalJobID, jb.Name.ValueOrZero(), lggr) if err != nil { - return nil, nil, nil, nil, fmt.Errorf("creating pipeline price getter: %w", err) + return nil, fmt.Errorf("creating pipeline price getter: %w", err) } } else { // Use dynamic price getter. - if params.pluginConfig.PriceGetterConfig == nil { - return nil, nil, nil, nil, fmt.Errorf("priceGetterConfig is nil") + if pluginConfig.PriceGetterConfig == nil { + return nil, fmt.Errorf("priceGetterConfig is nil") } // Build price getter clients for all chains specified in the aggregator configurations. // Some lanes (e.g. Wemix/Kroma) requires other clients than source and destination, since they use feeds from other chains. priceGetterClients := map[uint64]pricegetter.DynamicPriceGetterClient{} - for _, aggCfg := range params.pluginConfig.PriceGetterConfig.AggregatorPrices { + for _, aggCfg := range pluginConfig.PriceGetterConfig.AggregatorPrices { chainID := aggCfg.ChainID // Retrieve the chain. chain, _, err2 := ccipconfig.GetChainByChainID(chainSet, chainID) if err2 != nil { - return nil, nil, nil, nil, fmt.Errorf("retrieving chain for chainID %d: %w", chainID, err2) + return nil, fmt.Errorf("retrieving chain for chainID %d: %w", chainID, err2) } caller := rpclib.NewDynamicLimitedBatchCaller( lggr, @@ -194,103 +106,150 @@ func jobSpecToCommitPluginConfig(ctx context.Context, orm cciporm.ORM, lggr logg priceGetterClients[chainID] = pricegetter.NewDynamicPriceGetterClient(caller) } - priceGetter, err = pricegetter.NewDynamicPriceGetter(*params.pluginConfig.PriceGetterConfig, priceGetterClients) + priceGetter, err = pricegetter.NewDynamicPriceGetter(*pluginConfig.PriceGetterConfig, priceGetterClients) if err != nil { - return nil, nil, nil, nil, fmt.Errorf("creating dynamic price getter: %w", err) + return nil, fmt.Errorf("creating dynamic price getter: %w", err) } } - // Load all the readers relevant for this plugin. - onrampAddress := cciptypes.Address(params.commitStoreStaticCfg.OnRamp.String()) - onRampReader, err := factory.NewOnRampReader(commitLggr, versionFinder, params.commitStoreStaticCfg.SourceChainSelector, params.commitStoreStaticCfg.ChainSelector, onrampAddress, params.sourceChain.LogPoller(), params.sourceChain.Client()) - if err != nil { - return nil, nil, nil, nil, errors.Wrap(err, "failed onramp reader") - } - offRampReader, err := factory.NewOffRampReader(commitLggr, versionFinder, params.pluginConfig.OffRamp, params.destChain.Client(), params.destChain.LogPoller(), params.destChain.GasEstimator(), params.destChain.Config().EVM().GasEstimator().PriceMax().ToInt(), true) + offRampReader, err := dstProvider.NewOffRampReader(ctx, pluginConfig.OffRamp) if err != nil { - return nil, nil, nil, nil, errors.Wrap(err, "failed offramp reader") + return nil, err } - onRampRouterAddr, err := onRampReader.RouterAddress(ctx) + staticConfig, err := commitStoreReader.GetCommitStoreStaticConfig(ctx) if err != nil { - return nil, nil, nil, nil, err + return nil, err } - routerAddr, err := ccipcalc.GenericAddrToEvm(onRampRouterAddr) + onRampAddress := staticConfig.OnRamp + + onRampReader, err := srcProvider.NewOnRampReader(ctx, onRampAddress, staticConfig.SourceChainSelector, staticConfig.ChainSelector) if err != nil { - return nil, nil, nil, nil, err + return nil, err } - sourceRouter, err := router.NewRouter(routerAddr, params.sourceChain.Client()) + + onRampRouterAddr, err := onRampReader.RouterAddress(ctx) if err != nil { - return nil, nil, nil, nil, err + return nil, err } - sourceNative, err := sourceRouter.GetWrappedNative(&bind.CallOpts{Context: ctx}) + sourceNative, err := srcProvider.SourceNativeToken(ctx, onRampRouterAddr) if err != nil { - return nil, nil, nil, nil, err + return nil, err } - // Prom wrappers - onRampReader = observability.NewObservedOnRampReader(onRampReader, params.sourceChain.ID().Int64(), ccip.CommitPluginLabel) - offRampReader = observability.NewObservedOffRampReader(offRampReader, params.destChain.ID().Int64(), ccip.CommitPluginLabel) - commitStoreReader = observability.NewObservedCommitStoreReader(commitStoreReader, params.destChain.ID().Int64(), ccip.CommitPluginLabel) - metricsCollector := ccip.NewPluginMetricsCollector(ccip.CommitPluginLabel, params.sourceChain.ID().Int64(), params.destChain.ID().Int64()) + onRampReader = observability.NewObservedOnRampReader(onRampReader, sourceChainID, ccip.CommitPluginLabel) + commitStoreReader = observability.NewObservedCommitStoreReader(commitStoreReader, destChainID, ccip.CommitPluginLabel) + offRampReader = observability.NewObservedOffRampReader(offRampReader, destChainID, ccip.CommitPluginLabel) + metricsCollector := ccip.NewPluginMetricsCollector(ccip.CommitPluginLabel, sourceChainID, destChainID) - chainHealthcheck := cache.NewObservedChainHealthCheck( + chainHealthCheck := cache.NewObservedChainHealthCheck( cache.NewChainHealthcheck( // Adding more details to Logger to make healthcheck logs more informative // It's safe because healthcheck logs only in case of unhealthy state lggr.With( - "onramp", onrampAddress, - "commitStore", params.commitStoreAddress, - "offramp", params.pluginConfig.OffRamp, + "onramp", onRampAddress, + "commitStore", commitStoreAddress, + "offramp", pluginConfig.OffRamp, ), onRampReader, commitStoreReader, ), ccip.CommitPluginLabel, - params.sourceChain.ID().Int64(), - params.destChain.ID().Int64(), - onrampAddress, + sourceChainID, // assuming this is the chain id? + destChainID, + onRampAddress, ) + orm, err := cciporm.NewORM(ds) + if err != nil { + return nil, err + } + priceService := db.NewPriceService( lggr, orm, jb.ID, - params.commitStoreStaticCfg.ChainSelector, - params.commitStoreStaticCfg.SourceChainSelector, - ccipcalc.EvmAddrToGeneric(sourceNative), + staticConfig.ChainSelector, + staticConfig.SourceChainSelector, + sourceNative, priceGetter, offRampReader, ) - commitLggr.Infow("NewCommitServices", - "pluginConfig", params.pluginConfig, - "staticConfig", params.commitStoreStaticCfg, - // TODO bring back - //"dynamicOnRampConfig", dynamicOnRampConfig, - "sourceNative", sourceNative, - "sourceRouter", sourceRouter.Address()) - return &CommitPluginStaticConfig{ - lggr: commitLggr, - onRampReader: onRampReader, - offRamp: offRampReader, - sourceNative: ccipcalc.EvmAddrToGeneric(sourceNative), - sourceChainSelector: params.commitStoreStaticCfg.SourceChainSelector, - destChainSelector: params.commitStoreStaticCfg.ChainSelector, - commitStore: commitStoreReader, - priceRegistryProvider: ccipdataprovider.NewEvmPriceRegistry(params.destChain.LogPoller(), params.destChain.Client(), commitLggr, ccip.CommitPluginLabel), - metricsCollector: metricsCollector, - chainHealthcheck: chainHealthcheck, - priceService: priceService, - }, &ccipcommon.BackfillArgs{ - SourceLP: params.sourceChain.LogPoller(), - DestLP: params.destChain.LogPoller(), - SourceStartBlock: params.pluginConfig.SourceStartBlock, - DestStartBlock: params.pluginConfig.DestStartBlock, - }, - chainHealthcheck, + wrappedPluginFactory := NewCommitReportingPluginFactory(CommitPluginStaticConfig{ + lggr: lggr, + onRampReader: onRampReader, + sourceChainSelector: staticConfig.SourceChainSelector, + sourceNative: sourceNative, + offRamp: offRampReader, + commitStore: commitStoreReader, + destChainSelector: staticConfig.ChainSelector, + priceRegistryProvider: ccip.NewChainAgnosticPriceRegistry(dstProvider), + metricsCollector: metricsCollector, + chainHealthcheck: chainHealthCheck, + priceService: priceService, + }) + argsNoPlugin.ReportingPluginFactory = promwrapper.NewPromFactory(wrappedPluginFactory, "CCIPCommit", jb.OCR2OracleSpec.Relay, big.NewInt(0).SetInt64(destChainID)) + argsNoPlugin.Logger = commonlogger.NewOCRWrapper(commitLggr, true, logError) + oracle, err := libocr2.NewOracle(argsNoPlugin) + if err != nil { + return nil, err + } + // If this is a brand-new job, then we make use of the start blocks. If not then we're rebooting and log poller will pick up where we left off. + if new { + return []job.ServiceCtx{ + oraclelib.NewChainAgnosticBackFilledOracle( + lggr, + srcProvider, + dstProvider, + job.NewServiceAdapter(oracle), + ), + chainHealthCheck, + priceService, + }, nil + } + return []job.ServiceCtx{ + job.NewServiceAdapter(oracle), + chainHealthCheck, priceService, - nil + }, nil +} + +func CommitReportToEthTxMeta(typ ccipconfig.ContractType, ver semver.Version) (func(report []byte) (*txmgr.TxMeta, error), error) { + return factory.CommitReportToEthTxMeta(typ, ver) +} + +// UnregisterCommitPluginLpFilters unregisters all the registered filters for both source and dest chains. +// NOTE: The transaction MUST be used here for CLO's monster tx to function as expected +// https://github.com/smartcontractkit/ccip/blob/68e2197472fb017dd4e5630d21e7878d58bc2a44/core/services/feeds/service.go#L716 +// TODO once that transaction is broken up, we should be able to simply rely on oracle.Close() to cleanup the filters. +// Until then we have to deterministically reload the readers from the spec (and thus their filters) and close them. +func UnregisterCommitPluginLpFilters(ctx context.Context, lggr logger.Logger, jb job.Job, chainSet legacyevm.LegacyChainContainer) error { + params, err := extractJobSpecParams(jb, chainSet) + if err != nil { + return err + } + versionFinder := factory.NewEvmVersionFinder() + // TODO CCIP-2498 Use provider to close + unregisterFuncs := []func() error{ + func() error { + return factory.CloseCommitStoreReader(lggr, versionFinder, params.commitStoreAddress, params.destChain.Client(), params.destChain.LogPoller()) + }, + func() error { + return factory.CloseOnRampReader(lggr, versionFinder, params.commitStoreStaticCfg.SourceChainSelector, params.commitStoreStaticCfg.ChainSelector, cciptypes.Address(params.commitStoreStaticCfg.OnRamp.String()), params.sourceChain.LogPoller(), params.sourceChain.Client()) + }, + func() error { + return factory.CloseOffRampReader(lggr, versionFinder, params.pluginConfig.OffRamp, params.destChain.Client(), params.destChain.LogPoller(), params.destChain.GasEstimator(), params.destChain.Config().EVM().GasEstimator().PriceMax().ToInt()) + }, + } + + var multiErr error + for _, fn := range unregisterFuncs { + if err := fn(); err != nil { + multiErr = multierr.Append(multiErr, err) + } + } + return multiErr } type jobSpecParams struct { diff --git a/core/services/ocr2/plugins/ccip/ccipcommit/ocr2.go b/core/services/ocr2/plugins/ccip/ccipcommit/ocr2.go index f1e732ebbc..3c96940b8d 100644 --- a/core/services/ocr2/plugins/ccip/ccipcommit/ocr2.go +++ b/core/services/ocr2/plugins/ccip/ccipcommit/ocr2.go @@ -112,7 +112,8 @@ func (r *CommitReportingPlugin) Observation(ctx context.Context, epochAndRound t return nil, err } - sourceGasPriceUSD, tokenPricesUSD, err := r.observePriceUpdates(ctx) + // Fetches multi-lane gasPricesUSD and tokenPricesUSD for the same dest chain + gasPricesUSD, sourceGasPriceUSD, tokenPricesUSD, err := r.observePriceUpdates(ctx) if err != nil { return nil, err } @@ -120,7 +121,7 @@ func (r *CommitReportingPlugin) Observation(ctx context.Context, epochAndRound t lggr.Infow("Observation", "minSeqNr", minSeqNr, "maxSeqNr", maxSeqNr, - "sourceGasPriceUSD", sourceGasPriceUSD, + "gasPricesUSD", gasPricesUSD, "tokenPricesUSD", tokenPricesUSD, "epochAndRound", epochAndRound, "messageIDs", messageIDs, @@ -134,11 +135,43 @@ func (r *CommitReportingPlugin) Observation(ctx context.Context, epochAndRound t Min: minSeqNr, Max: maxSeqNr, }, - TokenPricesUSD: tokenPricesUSD, - SourceGasPriceUSD: sourceGasPriceUSD, + TokenPricesUSD: tokenPricesUSD, + SourceGasPriceUSD: sourceGasPriceUSD, + SourceGasPriceUSDPerChain: gasPricesUSD, }.Marshal() } +// observePriceUpdates fetches latest gas and token prices from DB as long as price reporting is not disabled. +// The prices are aggregated for all lanes for the same destination chain. +func (r *CommitReportingPlugin) observePriceUpdates( + ctx context.Context, +) (gasPricesUSD map[uint64]*big.Int, sourceGasPriceUSD *big.Int, tokenPricesUSD map[cciptypes.Address]*big.Int, err error) { + // Do not observe prices if price reporting is disabled. Price reporting will be disabled for lanes that are not leader lanes. + if r.offchainConfig.PriceReportingDisabled { + r.lggr.Infow("Price reporting disabled, skipping gas and token price reads") + return map[uint64]*big.Int{}, nil, map[cciptypes.Address]*big.Int{}, nil + } + + // Fetches multi-lane gas prices and token prices, for the given dest chain + gasPricesUSD, tokenPricesUSD, err = r.priceService.GetGasAndTokenPrices(ctx, r.destChainSelector) + if err != nil { + return nil, nil, nil, fmt.Errorf("failed to get prices from PriceService: %w", err) + } + + // Set prices to empty maps if nil to be friendlier to JSON encoding + if gasPricesUSD == nil { + gasPricesUSD = map[uint64]*big.Int{} + } + if tokenPricesUSD == nil { + tokenPricesUSD = map[cciptypes.Address]*big.Int{} + } + + // For backwards compatibility with the older release during phased rollout, set the default gas price on this lane + sourceGasPriceUSD = gasPricesUSD[r.sourceChainSelector] + + return gasPricesUSD, sourceGasPriceUSD, tokenPricesUSD, nil +} + func (r *CommitReportingPlugin) calculateMinMaxSequenceNumbers(ctx context.Context, lggr logger.Logger) (uint64, uint64, []cciptypes.Hash, error) { nextSeqNum, err := r.commitStoreReader.GetExpectedNextSequenceNumber(ctx) if err != nil { @@ -174,23 +207,6 @@ func (r *CommitReportingPlugin) calculateMinMaxSequenceNumbers(ctx context.Conte return minSeqNr, maxSeqNr, messageIDs, nil } -func (r *CommitReportingPlugin) observePriceUpdates( - ctx context.Context, -) (sourceGasPriceUSD *big.Int, tokenPricesUSD map[cciptypes.Address]*big.Int, err error) { - gasPricesUSD, tokenPricesUSD, err := r.priceService.GetGasAndTokenPrices(ctx, r.destChainSelector) - if err != nil { - return nil, nil, err - } - - // Reduce to single gas price for compatibility. In a followup PR, Commit plugin will make use of all source chain gas prices. - sourceGasPriceUSD = gasPricesUSD[r.sourceChainSelector] - if sourceGasPriceUSD == nil { - return nil, nil, fmt.Errorf("missing gas price for sourceChainSelector %d", r.sourceChainSelector) - } - - return sourceGasPriceUSD, tokenPricesUSD, nil -} - // Gets the latest token price updates based on logs within the heartbeat // The updates returned by this function are guaranteed to not contain nil values. func (r *CommitReportingPlugin) getLatestTokenPriceUpdates(ctx context.Context, now time.Time) (map[cciptypes.Address]update, error) { @@ -219,33 +235,34 @@ func (r *CommitReportingPlugin) getLatestTokenPriceUpdates(ctx context.Context, return latestUpdates, nil } -// getLatestGasPriceUpdate returns the latest gas price update based on logs within the heartbeat. -// If an update is found, it is not expected to contain a nil value. If no updates found, empty update with nil value is returned. -func (r *CommitReportingPlugin) getLatestGasPriceUpdate(ctx context.Context, now time.Time) (gasUpdate update, error error) { - // If there are no price updates inflight, check latest prices onchain - gasPriceUpdates, err := r.destPriceRegistryReader.GetGasPriceUpdatesCreatedAfter( +// getLatestGasPriceUpdate returns the latest gas price updates based on logs within the heartbeat. +// If an update is found, it is not expected to contain a nil value. +func (r *CommitReportingPlugin) getLatestGasPriceUpdate(ctx context.Context, now time.Time) (map[uint64]update, error) { + gasPriceUpdates, err := r.destPriceRegistryReader.GetAllGasPriceUpdatesCreatedAfter( ctx, - r.sourceChainSelector, now.Add(-r.offchainConfig.GasPriceHeartBeat), 0, ) + if err != nil { - return update{}, err + return nil, err } - for _, priceUpdate := range gasPriceUpdates { + latestUpdates := make(map[uint64]update) + for _, gasUpdate := range gasPriceUpdates { + priceUpdate := gasUpdate.GasPriceUpdate // Ordered by ascending timestamps - timestamp := time.Unix(priceUpdate.GasPriceUpdate.TimestampUnixSec.Int64(), 0) - if !timestamp.Before(gasUpdate.timestamp) { - gasUpdate = update{ + timestamp := time.Unix(priceUpdate.TimestampUnixSec.Int64(), 0) + if priceUpdate.Value != nil && !timestamp.Before(latestUpdates[priceUpdate.DestChainSelector].timestamp) { + latestUpdates[priceUpdate.DestChainSelector] = update{ timestamp: timestamp, value: priceUpdate.Value, } } } - r.lggr.Infow("Latest gas price from log poller", "gasPriceUpdateVal", gasUpdate.value, "gasPriceUpdateTs", gasUpdate.timestamp) - return gasUpdate, nil + r.lggr.Infow("Latest gas price from log poller", "latestUpdates", latestUpdates) + return latestUpdates, nil } func (r *CommitReportingPlugin) Report(ctx context.Context, epochAndRound types.ReportTimestamp, _ types.Query, observations []types.AttributedObservation) (bool, types.Report, error) { @@ -259,7 +276,7 @@ func (r *CommitReportingPlugin) Report(ctx context.Context, epochAndRound types. parsableObservations := ccip.GetParsableObservations[ccip.CommitObservation](lggr, observations) - intervals, gasPriceObs, tokenPriceObs, err := extractObservationData(lggr, r.F, parsableObservations) + intervals, gasPriceObs, tokenPriceObs, err := extractObservationData(lggr, r.F, r.sourceChainSelector, parsableObservations) if err != nil { return false, nil, err } @@ -363,18 +380,26 @@ func calculateIntervalConsensus(intervals []cciptypes.CommitStoreInterval, f int // extractObservationData extracts observation fields into their own slices // and filters out observation data that are invalid -func extractObservationData(lggr logger.Logger, f int, observations []ccip.CommitObservation) (intervals []cciptypes.CommitStoreInterval, gasPrices []*big.Int, tokenPrices map[cciptypes.Address][]*big.Int, err error) { - // We require at least f+1 observations to each consensus. Checking to ensure there are at least f+1 parsed observations. +func extractObservationData(lggr logger.Logger, f int, sourceChainSelector uint64, observations []ccip.CommitObservation) (intervals []cciptypes.CommitStoreInterval, gasPrices map[uint64][]*big.Int, tokenPrices map[cciptypes.Address][]*big.Int, err error) { + // We require at least f+1 observations to reach consensus. Checking to ensure there are at least f+1 parsed observations. if len(observations) <= f { return nil, nil, nil, fmt.Errorf("not enough observations to form consensus: #obs=%d, f=%d", len(observations), f) } + gasPriceObservations := make(map[uint64][]*big.Int) tokenPriceObservations := make(map[cciptypes.Address][]*big.Int) for _, obs := range observations { intervals = append(intervals, obs.Interval) - if obs.SourceGasPriceUSD != nil { - gasPrices = append(gasPrices, obs.SourceGasPriceUSD) + for selector, price := range obs.SourceGasPriceUSDPerChain { + if price != nil { + gasPriceObservations[selector] = append(gasPriceObservations[selector], price) + } + } + // During phased rollout, NOPs running old release only report SourceGasPriceUSD. + // An empty `SourceGasPriceUSDPerChain` with a non-nil `SourceGasPriceUSD` can only happen with old release. + if len(obs.SourceGasPriceUSDPerChain) == 0 && obs.SourceGasPriceUSD != nil { + gasPriceObservations[sourceChainSelector] = append(gasPriceObservations[sourceChainSelector], obs.SourceGasPriceUSD) } for token, price := range obs.TokenPricesUSD { @@ -384,21 +409,26 @@ func extractObservationData(lggr logger.Logger, f int, observations []ccip.Commi } } - // Observations are invalid if observed gas price is nil, we require at least f+1 valid observations. - if len(gasPrices) <= f { - return nil, nil, nil, fmt.Errorf("not enough valid observations with non-nil gas prices: #obs=%d, f=%d", len(gasPrices), f) + // Price is dropped if there are not enough valid observations. With a threshold of 2*(f-1) + 1, we achieve a balance between safety and liveness. + // During phased-rollout where some honest nodes may not have started observing the token yet, it requires 5 malicious node with 1 being the leader to successfully alter price. + // During regular operation, it requires 3 malicious nodes with 1 being the leader to temporarily delay price update for the token. + priceReportingThreshold := 2*(f-1) + 1 + + gasPrices = make(map[uint64][]*big.Int) + for selector, perChainPriceObservations := range gasPriceObservations { + if len(perChainPriceObservations) < priceReportingThreshold { + lggr.Warnf("Skipping chain with selector %d due to not enough valid observations: #obs=%d, f=%d, threshold=%d", selector, len(perChainPriceObservations), f, priceReportingThreshold) + continue + } + gasPrices[selector] = perChainPriceObservations } tokenPrices = make(map[cciptypes.Address][]*big.Int) for token, perTokenPriceObservations := range tokenPriceObservations { - // Token price is dropped if there are not enough valid observations. With a threshold of 2*(f-1) + 1, we achieve a balance between safety and liveness. - // During phased-rollout where some honest nodes may not have started observing the token yet, it requires 5 malicious node with 1 being the leader to successfully alter price. - // During regular operation, it requires 3 malicious nodes with 1 being the leader to temporarily delay price update for the token. - if len(perTokenPriceObservations) < (2*(f-1) + 1) { - lggr.Warnf("Skipping token %s due to not enough valid observations: #obs=%d, f=%d", string(token), len(perTokenPriceObservations), f) + if len(perTokenPriceObservations) < priceReportingThreshold { + lggr.Warnf("Skipping token %s due to not enough valid observations: #obs=%d, f=%d, threshold=%d", string(token), len(perTokenPriceObservations), f, priceReportingThreshold) continue } - tokenPrices[token] = perTokenPriceObservations } @@ -406,7 +436,12 @@ func extractObservationData(lggr logger.Logger, f int, observations []ccip.Commi } // selectPriceUpdates filters out gas and token price updates that are already inflight -func (r *CommitReportingPlugin) selectPriceUpdates(ctx context.Context, now time.Time, gasPriceObs []*big.Int, tokenPriceObs map[cciptypes.Address][]*big.Int) ([]cciptypes.GasPrice, []cciptypes.TokenPrice, error) { +func (r *CommitReportingPlugin) selectPriceUpdates(ctx context.Context, now time.Time, gasPriceObs map[uint64][]*big.Int, tokenPriceObs map[cciptypes.Address][]*big.Int) ([]cciptypes.GasPrice, []cciptypes.TokenPrice, error) { + // If price reporting is disabled, there is no need to select price updates. + if r.offchainConfig.PriceReportingDisabled { + return nil, nil, nil + } + latestGasPrice, err := r.getLatestGasPriceUpdate(ctx, now) if err != nil { return nil, nil, err @@ -421,8 +456,9 @@ func (r *CommitReportingPlugin) selectPriceUpdates(ctx context.Context, now time } // Note priceUpdates must be deterministic. -// The provided latestTokenPrices should not contain nil values. -func (r *CommitReportingPlugin) calculatePriceUpdates(gasPriceObs []*big.Int, tokenPriceObs map[cciptypes.Address][]*big.Int, latestGasPrice update, latestTokenPrices map[cciptypes.Address]update) ([]cciptypes.GasPrice, []cciptypes.TokenPrice, error) { +// The provided gasPriceObs and tokenPriceObs should not contain nil values. +// The returned latestGasPrice and latestTokenPrices should not contain nil values. +func (r *CommitReportingPlugin) calculatePriceUpdates(gasPriceObs map[uint64][]*big.Int, tokenPriceObs map[cciptypes.Address][]*big.Int, latestGasPrice map[uint64]update, latestTokenPrices map[cciptypes.Address]update) ([]cciptypes.GasPrice, []cciptypes.TokenPrice, error) { var tokenPriceUpdates []cciptypes.TokenPrice for token, tokenPriceObservations := range tokenPriceObs { medianPrice := ccipcalc.BigIntSortedMiddle(tokenPriceObservations) @@ -432,7 +468,7 @@ func (r *CommitReportingPlugin) calculatePriceUpdates(gasPriceObs []*big.Int, to tokenPriceUpdatedRecently := time.Since(latestTokenPrice.timestamp) < r.offchainConfig.TokenPriceHeartBeat tokenPriceNotChanged := !ccipcalc.Deviates(medianPrice, latestTokenPrice.value, int64(r.offchainConfig.TokenPriceDeviationPPB)) if tokenPriceUpdatedRecently && tokenPriceNotChanged { - r.lggr.Debugw("price was updated recently, skipping the update", + r.lggr.Debugw("token price was updated recently, skipping the update", "token", token, "newPrice", medianPrice, "existingPrice", latestTokenPrice.value) continue // skip the update if we recently had a price update close to the new value } @@ -449,30 +485,38 @@ func (r *CommitReportingPlugin) calculatePriceUpdates(gasPriceObs []*big.Int, to return tokenPriceUpdates[i].Token < tokenPriceUpdates[j].Token }) - newGasPrice, err := r.gasPriceEstimator.Median(gasPriceObs) // Compute the median price - if err != nil { - return nil, nil, err - } - destChainSelector := r.sourceChainSelector // Assuming plugin lane is A->B, we write to B the gas price of A - var gasPriceUpdate []cciptypes.GasPrice - // Default to updating so that we update if there are no prior updates. - shouldUpdate := true - if latestGasPrice.value != nil { - gasPriceUpdatedRecently := time.Since(latestGasPrice.timestamp) < r.offchainConfig.GasPriceHeartBeat - gasPriceDeviated, err := r.gasPriceEstimator.Deviates(newGasPrice, latestGasPrice.value) + for chainSelector, gasPriceObservations := range gasPriceObs { + newGasPrice, err := r.gasPriceEstimator.Median(gasPriceObservations) // Compute the median price if err != nil { - return nil, nil, err + return nil, nil, fmt.Errorf("failed to calculate median gas price for chain selector %d: %w", chainSelector, err) } - if gasPriceUpdatedRecently && !gasPriceDeviated { - shouldUpdate = false + + // Default to updating so that we update if there are no prior updates. + latestGasPrice, exists := latestGasPrice[chainSelector] + if exists && latestGasPrice.value != nil { + gasPriceUpdatedRecently := time.Since(latestGasPrice.timestamp) < r.offchainConfig.GasPriceHeartBeat + gasPriceDeviated, err := r.gasPriceEstimator.Deviates(newGasPrice, latestGasPrice.value) + if err != nil { + return nil, nil, err + } + if gasPriceUpdatedRecently && !gasPriceDeviated { + r.lggr.Debugw("gas price was updated recently and not deviated sufficiently, skipping the update", + "chainSelector", chainSelector, "newPrice", newGasPrice, "existingPrice", latestGasPrice.value) + continue + } } - } - if shouldUpdate { - // Although onchain interface accepts multi gas updates, we only do 1 gas price per report for now. - gasPriceUpdate = append(gasPriceUpdate, cciptypes.GasPrice{DestChainSelector: destChainSelector, Value: newGasPrice}) + + gasPriceUpdate = append(gasPriceUpdate, cciptypes.GasPrice{ + DestChainSelector: chainSelector, + Value: newGasPrice, + }) } + sort.Slice(gasPriceUpdate, func(i, j int) bool { + return gasPriceUpdate[i].DestChainSelector < gasPriceUpdate[j].DestChainSelector + }) + return gasPriceUpdate, tokenPriceUpdates, nil } @@ -608,14 +652,9 @@ func (r *CommitReportingPlugin) isStaleReport(ctx context.Context, lggr logger.L if !hasGasPriceUpdate && !hasTokenPriceUpdates { return true } - // Commit plugin currently only supports 1 gas price per report. If report contains more than 1, reject the report. - if len(report.GasPrices) > 1 { - lggr.Errorw("Report is stale because it contains more than 1 gas price update", "GasPriceUpdates", report.GasPrices) - return true - } // We consider a price update as stale when, there isn't an update or there is an update that is stale. - gasPriceStale := !hasGasPriceUpdate || r.isStaleGasPrice(ctx, lggr, report.GasPrices[0]) + gasPriceStale := !hasGasPriceUpdate || r.isStaleGasPrice(ctx, lggr, report.GasPrices) tokenPricesStale := !hasTokenPriceUpdates || r.isStaleTokenPrices(ctx, lggr, report.TokenPrices) if gasPriceStale && tokenPricesStale { @@ -654,30 +693,35 @@ func (r *CommitReportingPlugin) isStaleMerkleRoot(ctx context.Context, lggr logg return false } -func (r *CommitReportingPlugin) isStaleGasPrice(ctx context.Context, lggr logger.Logger, gasPrice cciptypes.GasPrice) bool { +func (r *CommitReportingPlugin) isStaleGasPrice(ctx context.Context, lggr logger.Logger, gasPriceUpdates []cciptypes.GasPrice) bool { latestGasPrice, err := r.getLatestGasPriceUpdate(ctx, time.Now()) if err != nil { - lggr.Errorw("Report is stale because getLatestGasPriceUpdate failed", "err", err) + lggr.Errorw("Gas price is stale because getLatestGasPriceUpdate failed", "err", err) return true } - if latestGasPrice.value != nil { - gasPriceDeviated, err := r.gasPriceEstimator.Deviates(gasPrice.Value, latestGasPrice.value) + for _, gasPriceUpdate := range gasPriceUpdates { + latestUpdate, exists := latestGasPrice[gasPriceUpdate.DestChainSelector] + if !exists || latestUpdate.value == nil { + lggr.Infow("Found non-stale gas price", "chainSelector", gasPriceUpdate.DestChainSelector, "gasPriceUSd", gasPriceUpdate.Value) + return false + } + + gasPriceDeviated, err := r.gasPriceEstimator.Deviates(gasPriceUpdate.Value, latestUpdate.value) if err != nil { - lggr.Errorw("Report is stale because deviation check failed", "err", err) + lggr.Errorw("Gas price is stale because deviation check failed", "err", err) return true } - if !gasPriceDeviated { - lggr.Infow("Report is stale because of gas price", - "latestGasPriceUpdate", latestGasPrice.value, - "currentUsdPerUnitGas", gasPrice.Value, - "destChainSelector", gasPrice.DestChainSelector) - return true + if gasPriceDeviated { + lggr.Infow("Found non-stale gas price", "chainSelector", gasPriceUpdate.DestChainSelector, "gasPriceUSd", gasPriceUpdate.Value, "latestUpdate", latestUpdate.value) + return false } + lggr.Infow("Gas price is stale", "chainSelector", gasPriceUpdate.DestChainSelector, "gasPriceUSd", gasPriceUpdate.Value, "latestGasPrice", latestUpdate.value) } - return false + lggr.Infow("All gas prices are stale") + return true } func (r *CommitReportingPlugin) isStaleTokenPrices(ctx context.Context, lggr logger.Logger, priceUpdates []cciptypes.TokenPrice) bool { diff --git a/core/services/ocr2/plugins/ccip/ccipcommit/ocr2_test.go b/core/services/ocr2/plugins/ccip/ccipcommit/ocr2_test.go index 880f2208a4..6cf7e4bec7 100644 --- a/core/services/ocr2/plugins/ccip/ccipcommit/ocr2_test.go +++ b/core/services/ocr2/plugins/ccip/ccipcommit/ocr2_test.go @@ -20,13 +20,14 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" + + "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink-common/pkg/hashutil" "github.com/smartcontractkit/chainlink-common/pkg/merklemulti" cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" - - "github.com/smartcontractkit/libocr/offchainreporting2plus/types" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/gas/mocks" mocks2 "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller/mocks" @@ -59,33 +60,22 @@ func TestCommitReportingPlugin_Observation(t *testing.T) { ccipcalc.HexToAddress("3000"), } - // Token price in 1e18 USD precision - bridgedTokenPrices := map[cciptypes.Address]*big.Int{ - bridgedTokens[0]: big.NewInt(1), - bridgedTokens[1]: big.NewInt(2e18), - } - - bridgedTokenDecimals := map[cciptypes.Address]uint8{ - bridgedTokens[0]: 8, - bridgedTokens[1]: 18, - } - // Token price of 1e18 token amount in 1e18 USD precision - expectedEncodedTokenPrice := map[cciptypes.Address]*big.Int{ + expectedTokenPrice := map[cciptypes.Address]*big.Int{ bridgedTokens[0]: big.NewInt(1e10), bridgedTokens[1]: big.NewInt(2e18), } testCases := []struct { - name string - epochAndRound types.ReportTimestamp - commitStorePaused bool - sourceChainCursed bool - commitStoreSeqNum uint64 - tokenPrices map[cciptypes.Address]*big.Int - sendReqs []cciptypes.EVM2EVMMessageWithTxMeta - tokenDecimals map[cciptypes.Address]uint8 - fee *big.Int + name string + epochAndRound types.ReportTimestamp + commitStorePaused bool + sourceChainCursed bool + commitStoreSeqNum uint64 + gasPrices map[uint64]*big.Int + tokenPrices map[cciptypes.Address]*big.Int + sendReqs []cciptypes.EVM2EVMMessageWithTxMeta + priceReportingDisabled bool expErr bool expObs ccip.CommitObservation @@ -93,20 +83,67 @@ func TestCommitReportingPlugin_Observation(t *testing.T) { { name: "base report", commitStoreSeqNum: 54, - tokenPrices: map[cciptypes.Address]*big.Int{ - bridgedTokens[0]: bridgedTokenPrices[bridgedTokens[0]], - bridgedTokens[1]: bridgedTokenPrices[bridgedTokens[1]], - sourceNativeTokenAddr: big.NewInt(2e18), + gasPrices: map[uint64]*big.Int{ + sourceChainSelector: big.NewInt(2e18), }, + tokenPrices: expectedTokenPrice, sendReqs: []cciptypes.EVM2EVMMessageWithTxMeta{ {EVM2EVMMessage: cciptypes.EVM2EVMMessage{SequenceNumber: 54}}, {EVM2EVMMessage: cciptypes.EVM2EVMMessage{SequenceNumber: 55}}, }, - fee: big.NewInt(2e18), - tokenDecimals: bridgedTokenDecimals, expObs: ccip.CommitObservation{ - TokenPricesUSD: expectedEncodedTokenPrice, - SourceGasPriceUSD: big.NewInt(4e18), + TokenPricesUSD: expectedTokenPrice, + SourceGasPriceUSD: big.NewInt(2e18), + SourceGasPriceUSDPerChain: map[uint64]*big.Int{ + sourceChainSelector: big.NewInt(2e18), + }, + Interval: cciptypes.CommitStoreInterval{ + Min: 54, + Max: 55, + }, + }, + }, + { + name: "base report with multi-chain gas prices", + commitStoreSeqNum: 54, + gasPrices: map[uint64]*big.Int{ + sourceChainSelector + 1: big.NewInt(2e18), + sourceChainSelector + 2: big.NewInt(3e18), + }, + tokenPrices: expectedTokenPrice, + sendReqs: []cciptypes.EVM2EVMMessageWithTxMeta{ + {EVM2EVMMessage: cciptypes.EVM2EVMMessage{SequenceNumber: 54}}, + {EVM2EVMMessage: cciptypes.EVM2EVMMessage{SequenceNumber: 55}}, + }, + expObs: ccip.CommitObservation{ + TokenPricesUSD: expectedTokenPrice, + SourceGasPriceUSD: nil, + SourceGasPriceUSDPerChain: map[uint64]*big.Int{ + sourceChainSelector + 1: big.NewInt(2e18), + sourceChainSelector + 2: big.NewInt(3e18), + }, + Interval: cciptypes.CommitStoreInterval{ + Min: 54, + Max: 55, + }, + }, + }, + { + name: "base report with price reporting disabled", + commitStoreSeqNum: 54, + gasPrices: map[uint64]*big.Int{ + sourceChainSelector: big.NewInt(2e18), + }, + tokenPrices: expectedTokenPrice, + sendReqs: []cciptypes.EVM2EVMMessageWithTxMeta{ + {EVM2EVMMessage: cciptypes.EVM2EVMMessage{SequenceNumber: 54}}, + {EVM2EVMMessage: cciptypes.EVM2EVMMessage{SequenceNumber: 55}}, + }, + priceReportingDisabled: true, + expObs: ccip.CommitObservation{ + TokenPricesUSD: map[cciptypes.Address]*big.Int{}, + SourceGasPriceUSD: nil, + SourceGasPriceUSDPerChain: map[uint64]*big.Int{}, Interval: cciptypes.CommitStoreInterval{ Min: 54, Max: 55, @@ -146,20 +183,9 @@ func TestCommitReportingPlugin_Observation(t *testing.T) { } mockPriceService := ccipdbmocks.NewPriceService(t) - var priceServiceGasResult map[uint64]*big.Int - var priceServiceTokenResult map[cciptypes.Address]*big.Int - if tc.fee != nil { - pUSD := ccipcalc.CalculateUsdPerUnitGas(tc.fee, tc.tokenPrices[sourceNativeTokenAddr]) - priceServiceGasResult = map[uint64]*big.Int{ - sourceChainSelector: pUSD, - } - } - if len(tc.tokenPrices) > 0 { - priceServiceTokenResult = expectedEncodedTokenPrice - } mockPriceService.On("GetGasAndTokenPrices", ctx, destChainSelector).Return( - priceServiceGasResult, - priceServiceTokenResult, + tc.gasPrices, + tc.tokenPrices, nil, ).Maybe() @@ -173,6 +199,9 @@ func TestCommitReportingPlugin_Observation(t *testing.T) { p.priceService = mockPriceService p.destChainSelector = destChainSelector p.sourceChainSelector = sourceChainSelector + p.offchainConfig = cciptypes.CommitOffchainConfig{ + PriceReportingDisabled: tc.priceReportingDisabled, + } obs, err := p.Observation(ctx, tc.epochAndRound, types.Query{}) @@ -203,6 +232,7 @@ func TestCommitReportingPlugin_Report(t *testing.T) { ctx := testutils.Context(t) sourceChainSelector := uint64(rand.Int()) var gasPrice = big.NewInt(1) + var gasPrice2 = big.NewInt(2) gasPriceHeartBeat := *config.MustNewDuration(time.Hour) t.Run("not enough observations", func(t *testing.T) { @@ -241,8 +271,8 @@ func TestCommitReportingPlugin_Report(t *testing.T) { { name: "base", observations: []ccip.CommitObservation{ - {Interval: cciptypes.CommitStoreInterval{Min: 1, Max: 1}, SourceGasPriceUSD: gasPrice}, - {Interval: cciptypes.CommitStoreInterval{Min: 1, Max: 1}, SourceGasPriceUSD: gasPrice}, + {Interval: cciptypes.CommitStoreInterval{Min: 1, Max: 1}, SourceGasPriceUSDPerChain: map[uint64]*big.Int{sourceChainSelector: gasPrice}}, + {Interval: cciptypes.CommitStoreInterval{Min: 1, Max: 1}, SourceGasPriceUSDPerChain: map[uint64]*big.Int{sourceChainSelector: gasPrice}}, }, f: 1, sendRequests: []cciptypes.EVM2EVMMessageWithTxMeta{ @@ -272,6 +302,68 @@ func TestCommitReportingPlugin_Report(t *testing.T) { }, expErr: false, }, + { + name: "observations with mix gas price formats", + observations: []ccip.CommitObservation{ + { + Interval: cciptypes.CommitStoreInterval{Min: 1, Max: 1}, + SourceGasPriceUSDPerChain: map[uint64]*big.Int{ + sourceChainSelector: gasPrice, + sourceChainSelector + 1: gasPrice2, + sourceChainSelector + 2: gasPrice2, + }, + }, + { + Interval: cciptypes.CommitStoreInterval{Min: 1, Max: 1}, + SourceGasPriceUSDPerChain: map[uint64]*big.Int{ + sourceChainSelector: gasPrice, + sourceChainSelector + 1: gasPrice2, + sourceChainSelector + 2: gasPrice2, + }, + }, + { + Interval: cciptypes.CommitStoreInterval{Min: 1, Max: 1}, + SourceGasPriceUSDPerChain: map[uint64]*big.Int{ + sourceChainSelector: gasPrice, + sourceChainSelector + 1: gasPrice2, + }, + }, + { + Interval: cciptypes.CommitStoreInterval{Min: 1, Max: 1}, + SourceGasPriceUSD: gasPrice, + }, + }, + f: 2, + sendRequests: []cciptypes.EVM2EVMMessageWithTxMeta{ + { + EVM2EVMMessage: cciptypes.EVM2EVMMessage{ + SequenceNumber: 1, + }, + }, + }, + gasPriceUpdates: []cciptypes.GasPriceUpdateWithTxMeta{ + { + GasPriceUpdate: cciptypes.GasPriceUpdate{ + GasPrice: cciptypes.GasPrice{ + DestChainSelector: sourceChainSelector, + Value: big.NewInt(1), + }, + TimestampUnixSec: big.NewInt(time.Now().Add(-2 * gasPriceHeartBeat.Duration()).Unix()), + }, + }, + }, + expSeqNumRange: cciptypes.CommitStoreInterval{Min: 1, Max: 1}, + expCommitReport: &cciptypes.CommitStoreReport{ + MerkleRoot: [32]byte{}, + Interval: cciptypes.CommitStoreInterval{Min: 1, Max: 1}, + TokenPrices: nil, + GasPrices: []cciptypes.GasPrice{ + {DestChainSelector: sourceChainSelector, Value: gasPrice}, + {DestChainSelector: sourceChainSelector + 1, Value: gasPrice2}, + }, + }, + expErr: false, + }, { name: "empty", observations: []ccip.CommitObservation{ @@ -283,7 +375,7 @@ func TestCommitReportingPlugin_Report(t *testing.T) { GasPriceUpdate: cciptypes.GasPriceUpdate{ GasPrice: cciptypes.GasPrice{ DestChainSelector: sourceChainSelector, - Value: big.NewInt(1), + Value: big.NewInt(0), }, TimestampUnixSec: big.NewInt(time.Now().Add(-gasPriceHeartBeat.Duration() / 2).Unix()), }, @@ -308,7 +400,7 @@ func TestCommitReportingPlugin_Report(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { destPriceRegistryReader := ccipdatamocks.NewPriceRegistryReader(t) - destPriceRegistryReader.On("GetGasPriceUpdatesCreatedAfter", ctx, sourceChainSelector, mock.Anything, 0).Return(tc.gasPriceUpdates, nil) + destPriceRegistryReader.On("GetAllGasPriceUpdatesCreatedAfter", ctx, mock.Anything, 0).Return(tc.gasPriceUpdates, nil) destPriceRegistryReader.On("GetTokenPriceUpdatesCreatedAfter", ctx, mock.Anything, 0).Return(tc.tokenPriceUpdates, nil) onRampReader := ccipdatamocks.NewOnRampReader(t) @@ -316,13 +408,11 @@ func TestCommitReportingPlugin_Report(t *testing.T) { onRampReader.On("GetSendRequestsBetweenSeqNums", ctx, tc.expSeqNumRange.Min, tc.expSeqNumRange.Max, true).Return(tc.sendRequests, nil) } - gasPriceEstimator := prices.NewMockGasPriceEstimatorCommit(t) - gasPriceEstimator.On("Median", mock.Anything).Return(gasPrice, nil) - if tc.gasPriceUpdates != nil { - gasPriceEstimator.On("Deviates", mock.Anything, mock.Anything, mock.Anything).Return(false, nil) - } + evmEstimator := mocks.NewEvmFeeEstimator(t) + evmEstimator.On("L1Oracle").Return(nil) + gasPriceEstimator := prices.NewDAGasPriceEstimator(evmEstimator, nil, 2e9, 2e9) // 200% deviation - destTokens := []cciptypes.Address{} + var destTokens []cciptypes.Address for tk := range tc.tokenDecimals { destTokens = append(destTokens, tk) } @@ -575,68 +665,52 @@ func TestCommitReportingPlugin_observePriceUpdates(t *testing.T) { token1 := ccipcalc.HexToAddress("0x123") token2 := ccipcalc.HexToAddress("0x234") - gasPrice := big.NewInt(1e18) + gasPrices := map[uint64]*big.Int{ + sourceChainSelector: big.NewInt(1e18), + } tokenPrices := map[cciptypes.Address]*big.Int{ token1: big.NewInt(2e18), token2: big.NewInt(3e18), } testCases := []struct { - name string - psGasPricesResult map[uint64]*big.Int - psTokenPricesResult map[cciptypes.Address]*big.Int + name string + psGasPricesResult map[uint64]*big.Int + psTokenPricesResult map[cciptypes.Address]*big.Int + PriceReportingDisabled bool - expectedGasPrice *big.Int + expectedGasPrice map[uint64]*big.Int expectedTokenPrices map[cciptypes.Address]*big.Int psError bool expectedErr bool }{ { - name: "ORM called successfully", - psGasPricesResult: map[uint64]*big.Int{ - sourceChainSelector: gasPrice, - }, + name: "ORM called successfully", + psGasPricesResult: gasPrices, psTokenPricesResult: tokenPrices, - expectedGasPrice: gasPrice, + expectedGasPrice: gasPrices, expectedTokenPrices: tokenPrices, - psError: false, - expectedErr: false, - }, - { - name: "multiple gas prices", - psGasPricesResult: map[uint64]*big.Int{ - sourceChainSelector: gasPrice, - sourceChainSelector + 1: big.NewInt(200), - sourceChainSelector + 2: big.NewInt(300), - }, - psTokenPricesResult: map[cciptypes.Address]*big.Int{}, - expectedGasPrice: gasPrice, - expectedTokenPrices: map[cciptypes.Address]*big.Int{}, - psError: false, - expectedErr: false, }, { - name: "mismatched gas prices errors", - psGasPricesResult: map[uint64]*big.Int{ - sourceChainSelector + 2: big.NewInt(300), - }, - psTokenPricesResult: map[cciptypes.Address]*big.Int{}, - psError: false, - expectedErr: true, + name: "price reporting disabled", + psGasPricesResult: gasPrices, + psTokenPricesResult: tokenPrices, + PriceReportingDisabled: true, + expectedGasPrice: map[uint64]*big.Int{}, + expectedTokenPrices: map[cciptypes.Address]*big.Int{}, + psError: false, + expectedErr: false, }, { - name: "empty gas prices errors", + name: "price service error", psGasPricesResult: map[uint64]*big.Int{}, psTokenPricesResult: map[cciptypes.Address]*big.Int{}, - psError: false, + expectedGasPrice: nil, + expectedTokenPrices: nil, + psError: true, expectedErr: true, }, - { - name: "price service failed", - psError: true, - expectedErr: true, - }, } for _, tc := range testCases { @@ -655,29 +729,45 @@ func TestCommitReportingPlugin_observePriceUpdates(t *testing.T) { ).Maybe() p := &CommitReportingPlugin{ + lggr: logger.TestLogger(t), destChainSelector: destChainSelector, sourceChainSelector: sourceChainSelector, priceService: mockPriceService, + offchainConfig: cciptypes.CommitOffchainConfig{ + PriceReportingDisabled: tc.PriceReportingDisabled, + }, } - sourceGasPriceUSD, tokenPricesUSD, err := p.observePriceUpdates(ctx) + gasPricesUSD, sourceGasPriceUSD, tokenPricesUSD, err := p.observePriceUpdates(ctx) if tc.expectedErr { assert.Error(t, err) } else { assert.NoError(t, err) - assert.Equal(t, tc.expectedGasPrice, sourceGasPriceUSD) + assert.Equal(t, tc.expectedGasPrice, gasPricesUSD) assert.Equal(t, tc.expectedTokenPrices, tokenPricesUSD) + if tc.expectedGasPrice != nil { + assert.Equal(t, tc.expectedGasPrice[sourceChainSelector], sourceGasPriceUSD) + } } }) } } +type CommitObservationLegacy struct { + Interval cciptypes.CommitStoreInterval `json:"interval"` + TokenPricesUSD map[cciptypes.Address]*big.Int `json:"tokensPerFeeCoin"` + SourceGasPriceUSD *big.Int `json:"sourceGasPrice"` +} + func TestCommitReportingPlugin_extractObservationData(t *testing.T) { token1 := ccipcalc.HexToAddress("0xa") token2 := ccipcalc.HexToAddress("0xb") token1Price := big.NewInt(1) token2Price := big.NewInt(2) unsupportedToken := ccipcalc.HexToAddress("0xc") - gasPrice := big.NewInt(100) + gasPrice1 := big.NewInt(100) + gasPrice2 := big.NewInt(100) + var sourceChainSelector1 uint64 = 10 + var sourceChainSelector2 uint64 = 20 tokenDecimals := make(map[cciptypes.Address]uint8) tokenDecimals[token1] = 18 @@ -686,24 +776,41 @@ func TestCommitReportingPlugin_extractObservationData(t *testing.T) { validInterval := cciptypes.CommitStoreInterval{Min: 1, Max: 2} zeroInterval := cciptypes.CommitStoreInterval{Min: 0, Max: 0} - ob1 := ccip.CommitObservation{ + // mix legacy commit observations with new commit observations to ensure they can work together + legacyObsRaw := CommitObservationLegacy{ + Interval: validInterval, + TokenPricesUSD: map[cciptypes.Address]*big.Int{ + token1: token1Price, + token2: token2Price, + }, + SourceGasPriceUSD: gasPrice1, + } + legacyObsBytes, err := json.Marshal(&legacyObsRaw) + assert.NoError(t, err) + + newObsRaw := ccip.CommitObservation{ Interval: validInterval, TokenPricesUSD: map[cciptypes.Address]*big.Int{ token1: token1Price, token2: token2Price, }, - SourceGasPriceUSD: gasPrice, + SourceGasPriceUSD: gasPrice1, + SourceGasPriceUSDPerChain: map[uint64]*big.Int{ + sourceChainSelector1: gasPrice1, + sourceChainSelector2: gasPrice2, + }, } - ob1Bytes, err := ob1.Marshal() + newObsBytes, err := newObsRaw.Marshal() assert.NoError(t, err) + lggr := logger.TestLogger(t) observations := ccip.GetParsableObservations[ccip.CommitObservation](lggr, []types.AttributedObservation{ - {Observation: ob1Bytes}, - {Observation: ob1Bytes}, + {Observation: legacyObsBytes}, + {Observation: newObsBytes}, }) assert.Len(t, observations, 2) - ob2 := observations[0] - ob3 := observations[1] + legacyObs := observations[0] + newObs := observations[1] obWithNilGasPrice := ccip.CommitObservation{ Interval: zeroInterval, @@ -711,7 +818,8 @@ func TestCommitReportingPlugin_extractObservationData(t *testing.T) { token1: token1Price, token2: token2Price, }, - SourceGasPriceUSD: nil, + SourceGasPriceUSD: nil, + SourceGasPriceUSDPerChain: map[uint64]*big.Int{}, } obWithNilTokenPrice := ccip.CommitObservation{ Interval: zeroInterval, @@ -719,12 +827,20 @@ func TestCommitReportingPlugin_extractObservationData(t *testing.T) { token1: token1Price, token2: nil, }, - SourceGasPriceUSD: gasPrice, + SourceGasPriceUSD: gasPrice1, + SourceGasPriceUSDPerChain: map[uint64]*big.Int{ + sourceChainSelector1: gasPrice1, + sourceChainSelector2: gasPrice2, + }, } obMissingTokenPrices := ccip.CommitObservation{ Interval: zeroInterval, TokenPricesUSD: map[cciptypes.Address]*big.Int{}, - SourceGasPriceUSD: gasPrice, + SourceGasPriceUSD: gasPrice1, + SourceGasPriceUSDPerChain: map[uint64]*big.Int{ + sourceChainSelector1: gasPrice1, + sourceChainSelector2: gasPrice2, + }, } obWithUnsupportedToken := ccip.CommitObservation{ Interval: zeroInterval, @@ -733,12 +849,17 @@ func TestCommitReportingPlugin_extractObservationData(t *testing.T) { token2: token2Price, unsupportedToken: token2Price, }, - SourceGasPriceUSD: gasPrice, + SourceGasPriceUSD: gasPrice1, + SourceGasPriceUSDPerChain: map[uint64]*big.Int{ + sourceChainSelector1: gasPrice1, + sourceChainSelector2: gasPrice2, + }, } obEmpty := ccip.CommitObservation{ - Interval: zeroInterval, - TokenPricesUSD: nil, - SourceGasPriceUSD: nil, + Interval: zeroInterval, + TokenPricesUSD: nil, + SourceGasPriceUSD: nil, + SourceGasPriceUSDPerChain: nil, } testCases := []struct { @@ -746,41 +867,62 @@ func TestCommitReportingPlugin_extractObservationData(t *testing.T) { commitObservations []ccip.CommitObservation f int expIntervals []cciptypes.CommitStoreInterval - expGasPriceObs []*big.Int + expGasPriceObs map[uint64][]*big.Int expTokenPriceObs map[cciptypes.Address][]*big.Int - expValidObs []ccip.CommitObservation expError bool }{ { name: "base", - commitObservations: []ccip.CommitObservation{ob1, ob2}, - f: 1, - expIntervals: []cciptypes.CommitStoreInterval{validInterval, validInterval}, - expGasPriceObs: []*big.Int{ob1.SourceGasPriceUSD, ob2.SourceGasPriceUSD}, + commitObservations: []ccip.CommitObservation{newObs, newObs, newObs}, + f: 2, + expIntervals: []cciptypes.CommitStoreInterval{validInterval, validInterval, validInterval}, + expGasPriceObs: map[uint64][]*big.Int{ + sourceChainSelector1: {gasPrice1, gasPrice1, gasPrice1}, + sourceChainSelector2: {gasPrice2, gasPrice2, gasPrice2}, + }, expTokenPriceObs: map[cciptypes.Address][]*big.Int{ - token1: {token1Price, token1Price}, - token2: {token2Price, token2Price}, + token1: {token1Price, token1Price, token1Price}, + token2: {token2Price, token2Price, token2Price}, }, expError: false, }, { - name: "pass with f=2", - commitObservations: []ccip.CommitObservation{ob1, ob2, ob3}, + name: "pass with f=2 and mixed observations", + commitObservations: []ccip.CommitObservation{legacyObs, newObs, legacyObs, newObs, newObs, obWithNilGasPrice}, f: 2, - expIntervals: []cciptypes.CommitStoreInterval{validInterval, validInterval, validInterval}, - expGasPriceObs: []*big.Int{ob1.SourceGasPriceUSD, ob2.SourceGasPriceUSD, ob3.SourceGasPriceUSD}, + expIntervals: []cciptypes.CommitStoreInterval{validInterval, validInterval, validInterval, validInterval, validInterval, zeroInterval}, + expGasPriceObs: map[uint64][]*big.Int{ + sourceChainSelector1: {gasPrice1, gasPrice1, gasPrice1, gasPrice1, gasPrice1}, + sourceChainSelector2: {gasPrice2, gasPrice2, gasPrice2}, + }, expTokenPriceObs: map[cciptypes.Address][]*big.Int{ - token1: {token1Price, token1Price, token1Price}, - token2: {token2Price, token2Price, token2Price}, + token1: {token1Price, token1Price, token1Price, token1Price, token1Price, token1Price}, + token2: {token2Price, token2Price, token2Price, token2Price, token2Price, token2Price}, + }, + expError: false, + }, + { + name: "pass with f=2 and mixed observations with mostly legacy observations", + commitObservations: []ccip.CommitObservation{legacyObs, legacyObs, legacyObs, legacyObs, newObs}, + f: 2, + expIntervals: []cciptypes.CommitStoreInterval{validInterval, validInterval, validInterval, validInterval, validInterval}, + expGasPriceObs: map[uint64][]*big.Int{ + sourceChainSelector1: {gasPrice1, gasPrice1, gasPrice1, gasPrice1, gasPrice1}, + }, + expTokenPriceObs: map[cciptypes.Address][]*big.Int{ + token1: {token1Price, token1Price, token1Price, token1Price, token1Price}, + token2: {token2Price, token2Price, token2Price, token2Price, token2Price}, }, expError: false, }, { name: "tolerate 1 faulty obs with f=2", - commitObservations: []ccip.CommitObservation{ob1, ob2, ob3, obWithNilGasPrice}, + commitObservations: []ccip.CommitObservation{legacyObs, newObs, legacyObs, obWithNilGasPrice}, f: 2, expIntervals: []cciptypes.CommitStoreInterval{validInterval, validInterval, validInterval, zeroInterval}, - expGasPriceObs: []*big.Int{ob1.SourceGasPriceUSD, ob2.SourceGasPriceUSD, ob3.SourceGasPriceUSD}, + expGasPriceObs: map[uint64][]*big.Int{ + sourceChainSelector1: {gasPrice1, gasPrice1, gasPrice1}, + }, expTokenPriceObs: map[cciptypes.Address][]*big.Int{ token1: {token1Price, token1Price, token1Price, token1Price}, token2: {token2Price, token2Price, token2Price, token2Price}, @@ -789,10 +931,13 @@ func TestCommitReportingPlugin_extractObservationData(t *testing.T) { }, { name: "tolerate 1 nil token price with f=1", - commitObservations: []ccip.CommitObservation{ob1, ob2, obWithNilTokenPrice}, + commitObservations: []ccip.CommitObservation{legacyObs, newObs, obWithNilTokenPrice}, f: 1, expIntervals: []cciptypes.CommitStoreInterval{validInterval, validInterval, zeroInterval}, - expGasPriceObs: []*big.Int{ob1.SourceGasPriceUSD, ob2.SourceGasPriceUSD, obWithNilTokenPrice.SourceGasPriceUSD}, + expGasPriceObs: map[uint64][]*big.Int{ + sourceChainSelector1: {gasPrice1, gasPrice1, gasPrice1}, + sourceChainSelector2: {gasPrice2, gasPrice2}, + }, expTokenPriceObs: map[cciptypes.Address][]*big.Int{ token1: {token1Price, token1Price, token1Price}, token2: {token2Price, token2Price}, @@ -801,10 +946,13 @@ func TestCommitReportingPlugin_extractObservationData(t *testing.T) { }, { name: "tolerate 1 missing token prices with f=1", - commitObservations: []ccip.CommitObservation{ob1, ob2, obMissingTokenPrices}, + commitObservations: []ccip.CommitObservation{legacyObs, newObs, obMissingTokenPrices}, f: 1, expIntervals: []cciptypes.CommitStoreInterval{validInterval, validInterval, zeroInterval}, - expGasPriceObs: []*big.Int{ob1.SourceGasPriceUSD, ob2.SourceGasPriceUSD, obMissingTokenPrices.SourceGasPriceUSD}, + expGasPriceObs: map[uint64][]*big.Int{ + sourceChainSelector1: {gasPrice1, gasPrice1, gasPrice1}, + sourceChainSelector2: {gasPrice2, gasPrice2}, + }, expTokenPriceObs: map[cciptypes.Address][]*big.Int{ token1: {token1Price, token1Price}, token2: {token2Price, token2Price}, @@ -813,10 +961,12 @@ func TestCommitReportingPlugin_extractObservationData(t *testing.T) { }, { name: "tolerate 1 unsupported token with f=2", - commitObservations: []ccip.CommitObservation{ob1, ob2, obWithUnsupportedToken}, + commitObservations: []ccip.CommitObservation{legacyObs, newObs, obWithUnsupportedToken}, f: 2, expIntervals: []cciptypes.CommitStoreInterval{validInterval, validInterval, zeroInterval}, - expGasPriceObs: []*big.Int{ob1.SourceGasPriceUSD, ob2.SourceGasPriceUSD, obWithUnsupportedToken.SourceGasPriceUSD}, + expGasPriceObs: map[uint64][]*big.Int{ + sourceChainSelector1: {gasPrice1, gasPrice1, gasPrice1}, + }, expTokenPriceObs: map[cciptypes.Address][]*big.Int{ token1: {token1Price, token1Price, token1Price}, token2: {token2Price, token2Price, token2Price}, @@ -825,21 +975,13 @@ func TestCommitReportingPlugin_extractObservationData(t *testing.T) { }, { name: "tolerate mis-matched token observations with f=2", - commitObservations: []ccip.CommitObservation{ob1, ob2, obWithNilTokenPrice, obMissingTokenPrices}, + commitObservations: []ccip.CommitObservation{legacyObs, newObs, obWithNilTokenPrice, obMissingTokenPrices}, f: 2, expIntervals: []cciptypes.CommitStoreInterval{validInterval, validInterval, zeroInterval, zeroInterval}, - expGasPriceObs: []*big.Int{ob1.SourceGasPriceUSD, ob2.SourceGasPriceUSD, obWithNilTokenPrice.SourceGasPriceUSD, obMissingTokenPrices.SourceGasPriceUSD}, - expTokenPriceObs: map[cciptypes.Address][]*big.Int{ - token1: {token1Price, token1Price, token1Price}, + expGasPriceObs: map[uint64][]*big.Int{ + sourceChainSelector1: {gasPrice1, gasPrice1, gasPrice1, gasPrice1}, + sourceChainSelector2: {gasPrice2, gasPrice2, gasPrice2}, }, - expError: false, - }, - { - name: "tolerate mis-matched token observations with f=2", - commitObservations: []ccip.CommitObservation{ob1, obWithNilTokenPrice, obWithNilTokenPrice}, - f: 2, - expIntervals: []cciptypes.CommitStoreInterval{validInterval, zeroInterval, zeroInterval}, - expGasPriceObs: []*big.Int{ob1.SourceGasPriceUSD, obWithNilTokenPrice.SourceGasPriceUSD, obWithNilTokenPrice.SourceGasPriceUSD}, expTokenPriceObs: map[cciptypes.Address][]*big.Int{ token1: {token1Price, token1Price, token1Price}, }, @@ -847,32 +989,36 @@ func TestCommitReportingPlugin_extractObservationData(t *testing.T) { }, { name: "tolerate all tokens filtered out with f=2", - commitObservations: []ccip.CommitObservation{ob1, obMissingTokenPrices, obMissingTokenPrices}, + commitObservations: []ccip.CommitObservation{newObs, obMissingTokenPrices, obMissingTokenPrices}, f: 2, expIntervals: []cciptypes.CommitStoreInterval{validInterval, zeroInterval, zeroInterval}, - expGasPriceObs: []*big.Int{ob1.SourceGasPriceUSD, obMissingTokenPrices.SourceGasPriceUSD, obMissingTokenPrices.SourceGasPriceUSD}, - expTokenPriceObs: map[cciptypes.Address][]*big.Int{}, - expError: false, + expGasPriceObs: map[uint64][]*big.Int{ + sourceChainSelector1: {gasPrice1, gasPrice1, gasPrice1}, + sourceChainSelector2: {gasPrice2, gasPrice2, gasPrice2}, + }, + expTokenPriceObs: map[cciptypes.Address][]*big.Int{}, + expError: false, }, { name: "not enough observations", - commitObservations: []ccip.CommitObservation{ob1, ob2}, + commitObservations: []ccip.CommitObservation{legacyObs, newObs}, f: 2, - expValidObs: nil, expError: true, }, { - name: "too many faulty observations", + name: "too many empty observations", commitObservations: []ccip.CommitObservation{obWithNilGasPrice, obWithNilTokenPrice, obEmpty, obEmpty, obEmpty}, - f: 1, - expValidObs: nil, - expError: true, + f: 2, + expIntervals: []cciptypes.CommitStoreInterval{zeroInterval, zeroInterval, zeroInterval, zeroInterval, zeroInterval}, + expGasPriceObs: map[uint64][]*big.Int{}, + expTokenPriceObs: map[cciptypes.Address][]*big.Int{}, + expError: false, }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - intervals, gasPriceOps, tokenPriceOps, err := extractObservationData(logger.TestLogger(t), tc.f, tc.commitObservations) + intervals, gasPriceOps, tokenPriceOps, err := extractObservationData(logger.TestLogger(t), tc.f, sourceChainSelector1, tc.commitObservations) if tc.expError { assert.Error(t, err) @@ -897,7 +1043,7 @@ func TestCommitReportingPlugin_calculatePriceUpdates(t *testing.T) { name string commitObservations []ccip.CommitObservation f int - latestGasPrice update + latestGasPrice map[uint64]update latestTokenPrices map[cciptypes.Address]update gasPriceHeartBeat config.Duration daGasPriceDeviationPPB int64 @@ -910,14 +1056,16 @@ func TestCommitReportingPlugin_calculatePriceUpdates(t *testing.T) { { name: "median", commitObservations: []ccip.CommitObservation{ - {SourceGasPriceUSD: big.NewInt(1)}, - {SourceGasPriceUSD: big.NewInt(2)}, - {SourceGasPriceUSD: big.NewInt(3)}, - {SourceGasPriceUSD: big.NewInt(4)}, + {SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector: big.NewInt(1)}}, + {SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector: big.NewInt(2)}}, + {SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector: big.NewInt(3)}}, + {SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector: big.NewInt(4)}}, }, - latestGasPrice: update{ - timestamp: time.Now().Add(-30 * time.Minute), // recent - value: val1e18(9), // median deviates + latestGasPrice: map[uint64]update{ + defaultSourceChainSelector: { + timestamp: time.Now().Add(-30 * time.Minute), // recent + value: val1e18(9), // median deviates + }, }, f: 2, expGasUpdates: []cciptypes.GasPrice{{DestChainSelector: defaultSourceChainSelector, Value: big.NewInt(3)}}, @@ -925,17 +1073,19 @@ func TestCommitReportingPlugin_calculatePriceUpdates(t *testing.T) { { name: "gas price update skipped because the latest is similar and was updated recently", commitObservations: []ccip.CommitObservation{ - {SourceGasPriceUSD: val1e18(11)}, - {SourceGasPriceUSD: val1e18(12)}, + {SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector: val1e18(11)}}, + {SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector: val1e18(12)}}, }, gasPriceHeartBeat: *config.MustNewDuration(time.Hour), daGasPriceDeviationPPB: 20e7, execGasPriceDeviationPPB: 20e7, tokenPriceHeartBeat: *config.MustNewDuration(time.Hour), tokenPriceDeviationPPB: 20e7, - latestGasPrice: update{ - timestamp: time.Now().Add(-30 * time.Minute), // recent - value: val1e18(10), // latest value close to the update + latestGasPrice: map[uint64]update{ + defaultSourceChainSelector: { + timestamp: time.Now().Add(-30 * time.Minute), // recent + value: val1e18(10), // median deviates + }, }, f: 1, expGasUpdates: nil, @@ -943,17 +1093,19 @@ func TestCommitReportingPlugin_calculatePriceUpdates(t *testing.T) { { name: "gas price update included, the latest is similar but was not updated recently", commitObservations: []ccip.CommitObservation{ - {SourceGasPriceUSD: val1e18(10)}, - {SourceGasPriceUSD: val1e18(11)}, + {SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector: val1e18(10)}}, + {SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector: val1e18(11)}}, }, gasPriceHeartBeat: *config.MustNewDuration(time.Hour), daGasPriceDeviationPPB: 20e7, execGasPriceDeviationPPB: 20e7, tokenPriceHeartBeat: *config.MustNewDuration(time.Hour), tokenPriceDeviationPPB: 20e7, - latestGasPrice: update{ - timestamp: time.Now().Add(-90 * time.Minute), // recent - value: val1e18(9), // latest value close to the update + latestGasPrice: map[uint64]update{ + defaultSourceChainSelector: { + timestamp: time.Now().Add(-90 * time.Minute), // stale + value: val1e18(9), // median deviates + }, }, f: 1, expGasUpdates: []cciptypes.GasPrice{{DestChainSelector: defaultSourceChainSelector, Value: val1e18(11)}}, @@ -961,27 +1113,69 @@ func TestCommitReportingPlugin_calculatePriceUpdates(t *testing.T) { { name: "gas price update deviates from latest", commitObservations: []ccip.CommitObservation{ - {SourceGasPriceUSD: val1e18(10)}, - {SourceGasPriceUSD: val1e18(20)}, - {SourceGasPriceUSD: val1e18(20)}, + {SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector: val1e18(10)}}, + {SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector: val1e18(20)}}, + {SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector: val1e18(20)}}, }, gasPriceHeartBeat: *config.MustNewDuration(time.Hour), daGasPriceDeviationPPB: 20e7, execGasPriceDeviationPPB: 20e7, tokenPriceHeartBeat: *config.MustNewDuration(time.Hour), tokenPriceDeviationPPB: 20e7, - latestGasPrice: update{ - timestamp: time.Now().Add(-30 * time.Minute), // recent - value: val1e18(11), // latest value close to the update + latestGasPrice: map[uint64]update{ + defaultSourceChainSelector: { + timestamp: time.Now().Add(-30 * time.Minute), // recent + value: val1e18(11), // latest value close to the update + }, }, f: 2, expGasUpdates: []cciptypes.GasPrice{{DestChainSelector: defaultSourceChainSelector, Value: val1e18(20)}}, }, + { + name: "multichain gas prices", + commitObservations: []ccip.CommitObservation{ + {SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector: val1e18(1)}}, + {SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector + 1: val1e18(11)}}, + {SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector + 2: val1e18(111)}}, + {SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector: val1e18(2)}}, + {SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector + 1: val1e18(22)}}, + {SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector + 2: val1e18(222)}}, + {SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector: val1e18(3)}}, + {SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector + 1: val1e18(33)}}, + {SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector + 2: val1e18(333)}}, + }, + gasPriceHeartBeat: *config.MustNewDuration(time.Hour), + daGasPriceDeviationPPB: 20e7, + execGasPriceDeviationPPB: 20e7, + tokenPriceHeartBeat: *config.MustNewDuration(time.Hour), + tokenPriceDeviationPPB: 20e7, + latestGasPrice: map[uint64]update{ + defaultSourceChainSelector: { + timestamp: time.Now().Add(-90 * time.Minute), // stale + value: val1e18(9), // median deviates + }, + defaultSourceChainSelector + 1: { + timestamp: time.Now().Add(-30 * time.Minute), // recent + value: val1e18(20), // median does not deviate + }, + }, + f: 1, + expGasUpdates: []cciptypes.GasPrice{ + {DestChainSelector: defaultSourceChainSelector, Value: val1e18(2)}, + {DestChainSelector: defaultSourceChainSelector + 2, Value: val1e18(222)}, + }, + }, { name: "median one token", commitObservations: []ccip.CommitObservation{ - {TokenPricesUSD: map[cciptypes.Address]*big.Int{feeToken1: big.NewInt(10)}, SourceGasPriceUSD: val1e18(0)}, - {TokenPricesUSD: map[cciptypes.Address]*big.Int{feeToken1: big.NewInt(12)}, SourceGasPriceUSD: val1e18(0)}, + { + TokenPricesUSD: map[cciptypes.Address]*big.Int{feeToken1: big.NewInt(10)}, + SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector: val1e18(0)}, + }, + { + TokenPricesUSD: map[cciptypes.Address]*big.Int{feeToken1: big.NewInt(12)}, + SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector: val1e18(0)}, + }, }, f: 1, expTokenUpdates: []cciptypes.TokenPrice{ @@ -993,8 +1187,14 @@ func TestCommitReportingPlugin_calculatePriceUpdates(t *testing.T) { { name: "median two tokens", commitObservations: []ccip.CommitObservation{ - {TokenPricesUSD: map[cciptypes.Address]*big.Int{feeToken1: big.NewInt(10), feeToken2: big.NewInt(13)}, SourceGasPriceUSD: val1e18(0)}, - {TokenPricesUSD: map[cciptypes.Address]*big.Int{feeToken1: big.NewInt(12), feeToken2: big.NewInt(7)}, SourceGasPriceUSD: val1e18(0)}, + { + TokenPricesUSD: map[cciptypes.Address]*big.Int{feeToken1: big.NewInt(10), feeToken2: big.NewInt(13)}, + SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector: val1e18(0)}, + }, + { + TokenPricesUSD: map[cciptypes.Address]*big.Int{feeToken1: big.NewInt(12), feeToken2: big.NewInt(7)}, + SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector: val1e18(0)}, + }, }, f: 1, expTokenUpdates: []cciptypes.TokenPrice{ @@ -1007,8 +1207,14 @@ func TestCommitReportingPlugin_calculatePriceUpdates(t *testing.T) { { name: "token price update skipped because it is close to the latest", commitObservations: []ccip.CommitObservation{ - {TokenPricesUSD: map[cciptypes.Address]*big.Int{feeToken1: val1e18(11)}, SourceGasPriceUSD: val1e18(0)}, - {TokenPricesUSD: map[cciptypes.Address]*big.Int{feeToken1: val1e18(12)}, SourceGasPriceUSD: val1e18(0)}, + { + TokenPricesUSD: map[cciptypes.Address]*big.Int{feeToken1: val1e18(11)}, + SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector: val1e18(0)}, + }, + { + TokenPricesUSD: map[cciptypes.Address]*big.Int{feeToken1: val1e18(12)}, + SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector: val1e18(0)}, + }, }, f: 1, gasPriceHeartBeat: *config.MustNewDuration(time.Hour), @@ -1028,8 +1234,20 @@ func TestCommitReportingPlugin_calculatePriceUpdates(t *testing.T) { { name: "gas price and token price both included because they are not close to the latest", commitObservations: []ccip.CommitObservation{ - {TokenPricesUSD: map[cciptypes.Address]*big.Int{feeToken1: val1e18(20)}, SourceGasPriceUSD: val1e18(10)}, - {TokenPricesUSD: map[cciptypes.Address]*big.Int{feeToken1: val1e18(21)}, SourceGasPriceUSD: val1e18(11)}, + { + TokenPricesUSD: map[cciptypes.Address]*big.Int{feeToken1: val1e18(20)}, + SourceGasPriceUSDPerChain: map[uint64]*big.Int{ + defaultSourceChainSelector: val1e18(10), + defaultSourceChainSelector + 1: val1e18(20), + }, + }, + { + TokenPricesUSD: map[cciptypes.Address]*big.Int{feeToken1: val1e18(21)}, + SourceGasPriceUSDPerChain: map[uint64]*big.Int{ + defaultSourceChainSelector: val1e18(11), + defaultSourceChainSelector + 1: val1e18(21), + }, + }, }, f: 1, gasPriceHeartBeat: *config.MustNewDuration(time.Hour), @@ -1037,9 +1255,15 @@ func TestCommitReportingPlugin_calculatePriceUpdates(t *testing.T) { execGasPriceDeviationPPB: 10e7, tokenPriceHeartBeat: *config.MustNewDuration(time.Hour), tokenPriceDeviationPPB: 20e7, - latestGasPrice: update{ - timestamp: time.Now().Add(-30 * time.Minute), - value: val1e18(9), + latestGasPrice: map[uint64]update{ + defaultSourceChainSelector: { + timestamp: time.Now().Add(-30 * time.Minute), + value: val1e18(9), + }, + defaultSourceChainSelector + 1: { + timestamp: time.Now().Add(-30 * time.Minute), + value: val1e18(9), + }, }, latestTokenPrices: map[cciptypes.Address]update{ feeToken1: { @@ -1050,13 +1274,28 @@ func TestCommitReportingPlugin_calculatePriceUpdates(t *testing.T) { expTokenUpdates: []cciptypes.TokenPrice{ {Token: feeToken1, Value: val1e18(21)}, }, - expGasUpdates: []cciptypes.GasPrice{{DestChainSelector: defaultSourceChainSelector, Value: val1e18(11)}}, + expGasUpdates: []cciptypes.GasPrice{ + {DestChainSelector: defaultSourceChainSelector, Value: val1e18(11)}, + {DestChainSelector: defaultSourceChainSelector + 1, Value: val1e18(21)}, + }, }, { name: "gas price and token price both included because they not been updated recently", commitObservations: []ccip.CommitObservation{ - {TokenPricesUSD: map[cciptypes.Address]*big.Int{feeToken1: val1e18(20)}, SourceGasPriceUSD: val1e18(10)}, - {TokenPricesUSD: map[cciptypes.Address]*big.Int{feeToken1: val1e18(21)}, SourceGasPriceUSD: val1e18(11)}, + { + TokenPricesUSD: map[cciptypes.Address]*big.Int{feeToken1: val1e18(20)}, + SourceGasPriceUSDPerChain: map[uint64]*big.Int{ + defaultSourceChainSelector: val1e18(10), + defaultSourceChainSelector + 1: val1e18(20), + }, + }, + { + TokenPricesUSD: map[cciptypes.Address]*big.Int{feeToken1: val1e18(21)}, + SourceGasPriceUSDPerChain: map[uint64]*big.Int{ + defaultSourceChainSelector: val1e18(11), + defaultSourceChainSelector + 1: val1e18(21), + }, + }, }, f: 1, gasPriceHeartBeat: *config.MustNewDuration(time.Hour), @@ -1064,9 +1303,15 @@ func TestCommitReportingPlugin_calculatePriceUpdates(t *testing.T) { execGasPriceDeviationPPB: 10e7, tokenPriceHeartBeat: *config.MustNewDuration(2 * time.Hour), tokenPriceDeviationPPB: 20e7, - latestGasPrice: update{ - timestamp: time.Now().Add(-90 * time.Minute), - value: val1e18(11), + latestGasPrice: map[uint64]update{ + defaultSourceChainSelector: { + timestamp: time.Now().Add(-90 * time.Minute), + value: val1e18(11), + }, + defaultSourceChainSelector + 1: { + timestamp: time.Now().Add(-90 * time.Minute), + value: val1e18(21), + }, }, latestTokenPrices: map[cciptypes.Address]update{ feeToken1: { @@ -1077,13 +1322,22 @@ func TestCommitReportingPlugin_calculatePriceUpdates(t *testing.T) { expTokenUpdates: []cciptypes.TokenPrice{ {Token: feeToken1, Value: val1e18(21)}, }, - expGasUpdates: []cciptypes.GasPrice{{DestChainSelector: defaultSourceChainSelector, Value: val1e18(11)}}, + expGasUpdates: []cciptypes.GasPrice{ + {DestChainSelector: defaultSourceChainSelector, Value: val1e18(11)}, + {DestChainSelector: defaultSourceChainSelector + 1, Value: val1e18(21)}, + }, }, { name: "gas price included because it deviates from latest and token price skipped because it does not deviate", commitObservations: []ccip.CommitObservation{ - {TokenPricesUSD: map[cciptypes.Address]*big.Int{feeToken1: val1e18(20)}, SourceGasPriceUSD: val1e18(10)}, - {TokenPricesUSD: map[cciptypes.Address]*big.Int{feeToken1: val1e18(21)}, SourceGasPriceUSD: val1e18(11)}, + { + TokenPricesUSD: map[cciptypes.Address]*big.Int{feeToken1: val1e18(20)}, + SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector: val1e18(10)}, + }, + { + TokenPricesUSD: map[cciptypes.Address]*big.Int{feeToken1: val1e18(21)}, + SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector: val1e18(11)}, + }, }, f: 1, gasPriceHeartBeat: *config.MustNewDuration(time.Hour), @@ -1091,9 +1345,11 @@ func TestCommitReportingPlugin_calculatePriceUpdates(t *testing.T) { execGasPriceDeviationPPB: 10e7, tokenPriceHeartBeat: *config.MustNewDuration(2 * time.Hour), tokenPriceDeviationPPB: 200e7, - latestGasPrice: update{ - timestamp: time.Now().Add(-30 * time.Minute), - value: val1e18(9), + latestGasPrice: map[uint64]update{ + defaultSourceChainSelector: { + timestamp: time.Now().Add(-90 * time.Minute), + value: val1e18(9), + }, }, latestTokenPrices: map[cciptypes.Address]update{ feeToken1: { @@ -1106,8 +1362,14 @@ func TestCommitReportingPlugin_calculatePriceUpdates(t *testing.T) { { name: "gas price skipped because it does not deviate and token price included because it has not been updated recently", commitObservations: []ccip.CommitObservation{ - {TokenPricesUSD: map[cciptypes.Address]*big.Int{feeToken1: val1e18(20)}, SourceGasPriceUSD: val1e18(10)}, - {TokenPricesUSD: map[cciptypes.Address]*big.Int{feeToken1: val1e18(21)}, SourceGasPriceUSD: val1e18(11)}, + { + TokenPricesUSD: map[cciptypes.Address]*big.Int{feeToken1: val1e18(20)}, + SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector: val1e18(10)}, + }, + { + TokenPricesUSD: map[cciptypes.Address]*big.Int{feeToken1: val1e18(21)}, + SourceGasPriceUSDPerChain: map[uint64]*big.Int{defaultSourceChainSelector: val1e18(11)}, + }, }, f: 1, gasPriceHeartBeat: *config.MustNewDuration(time.Hour), @@ -1115,9 +1377,11 @@ func TestCommitReportingPlugin_calculatePriceUpdates(t *testing.T) { execGasPriceDeviationPPB: 10e7, tokenPriceHeartBeat: *config.MustNewDuration(2 * time.Hour), tokenPriceDeviationPPB: 20e7, - latestGasPrice: update{ - timestamp: time.Now().Add(-30 * time.Minute), - value: val1e18(11), + latestGasPrice: map[uint64]update{ + defaultSourceChainSelector: { + timestamp: time.Now().Add(-30 * time.Minute), + value: val1e18(11), + }, }, latestTokenPrices: map[cciptypes.Address]update{ feeToken1: { @@ -1158,10 +1422,12 @@ func TestCommitReportingPlugin_calculatePriceUpdates(t *testing.T) { F: tc.f, } - var gasPriceObs []*big.Int + gasPriceObs := make(map[uint64][]*big.Int) tokenPriceObs := make(map[cciptypes.Address][]*big.Int) for _, obs := range tc.commitObservations { - gasPriceObs = append(gasPriceObs, obs.SourceGasPriceUSD) + for selector, price := range obs.SourceGasPriceUSDPerChain { + gasPriceObs[selector] = append(gasPriceObs[selector], price) + } for token, price := range obs.TokenPricesUSD { tokenPriceObs[token] = append(tokenPriceObs[token], price) } @@ -1320,30 +1586,54 @@ func TestCommitReportingPlugin_calculateMinMaxSequenceNumbers(t *testing.T) { func TestCommitReportingPlugin_getLatestGasPriceUpdate(t *testing.T) { now := time.Now() - chainSelector := uint64(1234) + chainSelector1 := uint64(1234) + chainSelector2 := uint64(5678) + + chain1Value := big.NewInt(1000) + chain2Value := big.NewInt(2000) testCases := []struct { - name string - destGasPriceUpdates []update - expUpdate update - expErr bool + name string + priceRegistryUpdates []cciptypes.GasPriceUpdate + expUpdates map[uint64]update + expErr bool }{ { name: "happy path", - destGasPriceUpdates: []update{ - {timestamp: now, value: big.NewInt(1000)}, + priceRegistryUpdates: []cciptypes.GasPriceUpdate{ + { + GasPrice: cciptypes.GasPrice{DestChainSelector: chainSelector1, Value: chain1Value}, + TimestampUnixSec: big.NewInt(now.Unix()), + }, }, - expUpdate: update{timestamp: now, value: big.NewInt(1000)}, - expErr: false, + expUpdates: map[uint64]update{chainSelector1: {timestamp: now, value: chain1Value}}, + expErr: false, }, { - name: "happy path two updates", - destGasPriceUpdates: []update{ - {timestamp: now.Add(time.Minute), value: big.NewInt(2000)}, - {timestamp: now.Add(2 * time.Minute), value: big.NewInt(3000)}, + name: "happy path multiple updates", + priceRegistryUpdates: []cciptypes.GasPriceUpdate{ + { + GasPrice: cciptypes.GasPrice{DestChainSelector: chainSelector1, Value: big.NewInt(1)}, + TimestampUnixSec: big.NewInt(now.Unix()), + }, + { + GasPrice: cciptypes.GasPrice{DestChainSelector: chainSelector2, Value: big.NewInt(1)}, + TimestampUnixSec: big.NewInt(now.Add(1 * time.Minute).Unix()), + }, + { + GasPrice: cciptypes.GasPrice{DestChainSelector: chainSelector2, Value: chain2Value}, + TimestampUnixSec: big.NewInt(now.Add(2 * time.Minute).Unix()), + }, + { + GasPrice: cciptypes.GasPrice{DestChainSelector: chainSelector1, Value: chain1Value}, + TimestampUnixSec: big.NewInt(now.Add(3 * time.Minute).Unix()), + }, + }, + expUpdates: map[uint64]update{ + chainSelector1: {timestamp: now.Add(3 * time.Minute), value: chain1Value}, + chainSelector2: {timestamp: now.Add(2 * time.Minute), value: chain2Value}, }, - expUpdate: update{timestamp: now.Add(2 * time.Minute), value: big.NewInt(3000)}, - expErr: false, + expErr: false, }, } @@ -1352,35 +1642,30 @@ func TestCommitReportingPlugin_getLatestGasPriceUpdate(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { p := &CommitReportingPlugin{} - p.sourceChainSelector = chainSelector p.lggr = lggr - destPriceRegistry := ccipdatamocks.NewPriceRegistryReader(t) - p.destPriceRegistryReader = destPriceRegistry - - if len(tc.destGasPriceUpdates) > 0 { - var events []cciptypes.GasPriceUpdateWithTxMeta - for _, u := range tc.destGasPriceUpdates { - events = append(events, cciptypes.GasPriceUpdateWithTxMeta{ - GasPriceUpdate: cciptypes.GasPriceUpdate{ - GasPrice: cciptypes.GasPrice{Value: u.value}, - TimestampUnixSec: big.NewInt(u.timestamp.Unix()), - }, - }) - } - destReader := ccipdatamocks.NewPriceRegistryReader(t) - destReader.On("GetGasPriceUpdatesCreatedAfter", ctx, chainSelector, mock.Anything, 0).Return(events, nil) - p.destPriceRegistryReader = destReader + priceReg := ccipdatamocks.NewPriceRegistryReader(t) + p.destPriceRegistryReader = priceReg + + var events []cciptypes.GasPriceUpdateWithTxMeta + for _, update := range tc.priceRegistryUpdates { + events = append(events, cciptypes.GasPriceUpdateWithTxMeta{ + GasPriceUpdate: update, + }) } - priceUpdate, err := p.getLatestGasPriceUpdate(ctx, time.Now()) + priceReg.On("GetAllGasPriceUpdatesCreatedAfter", ctx, mock.Anything, 0).Return(events, nil) + + gotUpdates, err := p.getLatestGasPriceUpdate(ctx, now) if tc.expErr { assert.Error(t, err) return } - assert.NoError(t, err) - assert.Equal(t, tc.expUpdate.timestamp.Truncate(time.Second), priceUpdate.timestamp.Truncate(time.Second)) - assert.Equal(t, tc.expUpdate.value.Uint64(), priceUpdate.value.Uint64()) + assert.Equal(t, len(tc.expUpdates), len(gotUpdates)) + for selector, gotUpdate := range gotUpdates { + assert.Equal(t, tc.expUpdates[selector].timestamp.Truncate(time.Second), gotUpdate.timestamp.Truncate(time.Second)) + assert.Equal(t, tc.expUpdates[selector].value.Uint64(), gotUpdate.value.Uint64()) + } }) } } diff --git a/core/services/ocr2/plugins/ccip/ccipexec/initializers.go b/core/services/ocr2/plugins/ccip/ccipexec/initializers.go index 9631a59676..a9f474c17d 100644 --- a/core/services/ocr2/plugins/ccip/ccipexec/initializers.go +++ b/core/services/ocr2/plugins/ccip/ccipexec/initializers.go @@ -5,13 +5,12 @@ import ( "encoding/json" "fmt" "math/big" - "net/url" "strconv" "time" + "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/pkg/errors" "go.uber.org/multierr" chainselectors "github.com/smartcontractkit/chain-selectors" @@ -24,24 +23,17 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/cache" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipcalc" - "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr" "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip" ccipconfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/config" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipcommon" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata/batchreader" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata/ccipdataprovider" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata/factory" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/observability" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/oraclelib" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/tokendata" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/tokendata/usdc" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/promwrapper" ) @@ -58,18 +50,131 @@ var ( var defaultNewReportingPluginRetryConfig = ccipdata.RetryConfig{InitialDelay: time.Second, MaxDelay: 5 * time.Minute} -func NewExecutionServices(ctx context.Context, lggr logger.Logger, jb job.Job, chainSet legacyevm.LegacyChainContainer, new bool, argsNoPlugin libocr2.OCR2OracleArgs, logError func(string)) ([]job.ServiceCtx, error) { - execPluginConfig, backfillArgs, chainHealthcheck, tokenWorker, err := jobSpecToExecPluginConfig(ctx, lggr, jb, chainSet) +func NewExecServices(ctx context.Context, lggr logger.Logger, jb job.Job, srcProvider types.CCIPExecProvider, dstProvider types.CCIPExecProvider, srcChain legacyevm.Chain, dstChain legacyevm.Chain, srcChainID int64, dstChainID int64, chainSet legacyevm.LegacyChainContainer, new bool, argsNoPlugin libocr2.OCR2OracleArgs, logError func(string)) ([]job.ServiceCtx, error) { + if jb.OCR2OracleSpec == nil { + return nil, fmt.Errorf("spec is nil") + } + spec := jb.OCR2OracleSpec + var pluginConfig ccipconfig.ExecPluginJobSpecConfig + err := json.Unmarshal(spec.PluginConfig.Bytes(), &pluginConfig) if err != nil { return nil, err } - wrappedPluginFactory := NewExecutionReportingPluginFactory(*execPluginConfig) - destChainID, err := chainselectors.ChainIdFromSelector(execPluginConfig.destChainSelector) + + offRampAddress := ccipcalc.HexToAddress(spec.ContractID) + offRampReader, err := dstProvider.NewOffRampReader(ctx, offRampAddress) if err != nil { - return nil, err + return nil, fmt.Errorf("create offRampReader: %w", err) + } + + offRampConfig, err := offRampReader.GetStaticConfig(ctx) + if err != nil { + return nil, fmt.Errorf("get offRamp static config: %w", err) + } + + srcChainSelector := offRampConfig.SourceChainSelector + dstChainSelector := offRampConfig.ChainSelector + onRampReader, err := srcProvider.NewOnRampReader(ctx, offRampConfig.OnRamp, srcChainSelector, dstChainSelector) + if err != nil { + return nil, fmt.Errorf("create onRampReader: %w", err) + } + + dynamicOnRampConfig, err := onRampReader.GetDynamicConfig(ctx) + if err != nil { + return nil, fmt.Errorf("get onramp dynamic config: %w", err) + } + + sourceWrappedNative, err := srcProvider.SourceNativeToken(ctx, dynamicOnRampConfig.Router) + if err != nil { + return nil, fmt.Errorf("get source wrapped native token: %w", err) + } + + versionFinder := ccip.NewEvmVersionFinder() + commitStoreReader, err := factory.NewCommitStoreReader(lggr, versionFinder, offRampConfig.CommitStore, dstChain.Client(), dstChain.LogPoller()) + if err != nil { + return nil, fmt.Errorf("could not load commitStoreReader reader: %w", err) + } + + err = commitStoreReader.SetGasEstimator(ctx, srcChain.GasEstimator()) + if err != nil { + return nil, fmt.Errorf("could not set gas estimator: %w", err) + } + + err = commitStoreReader.SetSourceMaxGasPrice(ctx, srcChain.Config().EVM().GasEstimator().PriceMax().ToInt()) + if err != nil { + return nil, fmt.Errorf("could not set source max gas price: %w", err) + } + + tokenDataProviders := make(map[cciptypes.Address]tokendata.Reader) + // init usdc token data provider + if pluginConfig.USDCConfig.AttestationAPI != "" { + lggr.Infof("USDC token data provider enabled") + err2 := pluginConfig.USDCConfig.ValidateUSDCConfig() + if err2 != nil { + return nil, err2 + } + + usdcReader, err2 := srcProvider.NewTokenDataReader(ctx, ccip.EvmAddrToGeneric(pluginConfig.USDCConfig.SourceTokenAddress)) + if err2 != nil { + return nil, fmt.Errorf("new usdc reader: %w", err2) + } + tokenDataProviders[cciptypes.Address(pluginConfig.USDCConfig.SourceTokenAddress.String())] = usdcReader } - argsNoPlugin.ReportingPluginFactory = promwrapper.NewPromFactory(wrappedPluginFactory, "CCIPExecution", jb.OCR2OracleSpec.Relay, big.NewInt(0).SetUint64(destChainID)) - argsNoPlugin.Logger = commonlogger.NewOCRWrapper(execPluginConfig.lggr, true, logError) + + // Prom wrappers + onRampReader = observability.NewObservedOnRampReader(onRampReader, srcChainID, ccip.ExecPluginLabel) + commitStoreReader = observability.NewObservedCommitStoreReader(commitStoreReader, dstChainID, ccip.ExecPluginLabel) + offRampReader = observability.NewObservedOffRampReader(offRampReader, dstChainID, ccip.ExecPluginLabel) + metricsCollector := ccip.NewPluginMetricsCollector(ccip.ExecPluginLabel, srcChainID, dstChainID) + + tokenPoolBatchedReader, err := dstProvider.NewTokenPoolBatchedReader(ctx, offRampAddress, srcChainSelector) + if err != nil { + return nil, fmt.Errorf("new token pool batched reader: %w", err) + } + + chainHealthcheck := cache.NewObservedChainHealthCheck( + cache.NewChainHealthcheck( + // Adding more details to Logger to make healthcheck logs more informative + // It's safe because healthcheck logs only in case of unhealthy state + lggr.With( + "onramp", offRampConfig.OnRamp, + "commitStore", offRampConfig.CommitStore, + "offramp", offRampAddress, + ), + onRampReader, + commitStoreReader, + ), + ccip.ExecPluginLabel, + srcChainID, + dstChainID, + offRampConfig.OnRamp, + ) + + tokenBackgroundWorker := tokendata.NewBackgroundWorker( + tokenDataProviders, + tokenDataWorkerNumWorkers, + tokenDataWorkerTimeout, + 2*tokenDataWorkerTimeout, + ) + + wrappedPluginFactory := NewExecutionReportingPluginFactory(ExecutionPluginStaticConfig{ + lggr: lggr, + onRampReader: onRampReader, + commitStoreReader: commitStoreReader, + offRampReader: offRampReader, + sourcePriceRegistryProvider: ccip.NewChainAgnosticPriceRegistry(srcProvider), + sourceWrappedNativeToken: sourceWrappedNative, + destChainSelector: dstChainSelector, + priceRegistryProvider: ccip.NewChainAgnosticPriceRegistry(dstProvider), + tokenPoolBatchedReader: tokenPoolBatchedReader, + tokenDataWorker: tokenBackgroundWorker, + metricsCollector: metricsCollector, + chainHealthcheck: chainHealthcheck, + newReportingPluginRetryConfig: defaultNewReportingPluginRetryConfig, + }) + + argsNoPlugin.ReportingPluginFactory = promwrapper.NewPromFactory(wrappedPluginFactory, "CCIPExecution", jb.OCR2OracleSpec.Relay, big.NewInt(0).SetInt64(dstChainID)) + argsNoPlugin.Logger = commonlogger.NewOCRWrapper(lggr, true, logError) oracle, err := libocr2.NewOracle(argsNoPlugin) if err != nil { return nil, err @@ -77,28 +182,26 @@ func NewExecutionServices(ctx context.Context, lggr logger.Logger, jb job.Job, c // If this is a brand-new job, then we make use of the start blocks. If not then we're rebooting and log poller will pick up where we left off. if new { return []job.ServiceCtx{ - oraclelib.NewBackfilledOracle( - execPluginConfig.lggr, - backfillArgs.SourceLP, - backfillArgs.DestLP, - backfillArgs.SourceStartBlock, - backfillArgs.DestStartBlock, + oraclelib.NewChainAgnosticBackFilledOracle( + lggr, + srcProvider, + dstProvider, job.NewServiceAdapter(oracle), ), chainHealthcheck, - tokenWorker, + tokenBackgroundWorker, }, nil } return []job.ServiceCtx{ job.NewServiceAdapter(oracle), chainHealthcheck, - tokenWorker, + tokenBackgroundWorker, }, nil } // UnregisterExecPluginLpFilters unregisters all the registered filters for both source and dest chains. // See comment in UnregisterCommitPluginLpFilters -// It MUST mirror the filters registered in NewExecutionServices. +// It MUST mirror the filters registered in NewExecServices. func UnregisterExecPluginLpFilters(ctx context.Context, lggr logger.Logger, jb job.Job, chainSet legacyevm.LegacyChainContainer) error { params, err := extractJobSpecParams(lggr, jb, chainSet, false) if err != nil { @@ -144,196 +247,8 @@ func ExecReportToEthTxMeta(ctx context.Context, typ ccipconfig.ContractType, ver return factory.ExecReportToEthTxMeta(ctx, typ, ver) } -func initTokenDataProviders(lggr logger.Logger, jobID string, pluginConfig ccipconfig.ExecutionPluginJobSpecConfig, sourceLP logpoller.LogPoller) (map[cciptypes.Address]tokendata.Reader, error) { - tokenDataProviders := make(map[cciptypes.Address]tokendata.Reader) - - // init usdc token data provider - if pluginConfig.USDCConfig.AttestationAPI != "" { - lggr.Infof("USDC token data provider enabled") - err := pluginConfig.USDCConfig.ValidateUSDCConfig() - if err != nil { - return nil, err - } - - attestationURI, err := url.ParseRequestURI(pluginConfig.USDCConfig.AttestationAPI) - if err != nil { - return nil, errors.Wrap(err, "failed to parse USDC attestation API") - } - - usdcReader, err := ccipdata.NewUSDCReader(lggr, jobID, pluginConfig.USDCConfig.SourceMessageTransmitterAddress, sourceLP, true) - if err != nil { - return nil, errors.Wrap(err, "new usdc reader") - } - - tokenDataProviders[cciptypes.Address(pluginConfig.USDCConfig.SourceTokenAddress.String())] = - usdc.NewUSDCTokenDataReader( - lggr, - usdcReader, - attestationURI, - int(pluginConfig.USDCConfig.AttestationAPITimeoutSeconds), - pluginConfig.USDCConfig.SourceTokenAddress, - time.Duration(pluginConfig.USDCConfig.AttestationAPIIntervalMilliseconds)*time.Millisecond, - ) - } - - return tokenDataProviders, nil -} - -func jobSpecToExecPluginConfig(ctx context.Context, lggr logger.Logger, jb job.Job, chainSet legacyevm.LegacyChainContainer) (*ExecutionPluginStaticConfig, *ccipcommon.BackfillArgs, *cache.ObservedChainHealthcheck, *tokendata.BackgroundWorker, error) { - params, err := extractJobSpecParams(lggr, jb, chainSet, true) - if err != nil { - return nil, nil, nil, nil, err - } - - lggr.Infow("Initializing exec plugin", - "CommitStore", params.offRampConfig.CommitStore, - "OnRamp", params.offRampConfig.OnRamp, - "ArmProxy", params.offRampConfig.ArmProxy, - "SourceChainSelector", params.offRampConfig.SourceChainSelector, - "DestChainSelector", params.offRampConfig.ChainSelector) - - sourceChainID := params.sourceChain.ID().Int64() - destChainID := params.destChain.ID().Int64() - versionFinder := factory.NewEvmVersionFinder() - - sourceChainName, destChainName, err := ccipconfig.ResolveChainNames(sourceChainID, destChainID) - if err != nil { - return nil, nil, nil, nil, err - } - execLggr := lggr.Named("CCIPExecution").With("sourceChain", sourceChainName, "destChain", destChainName) - onRampReader, err := factory.NewOnRampReader(execLggr, versionFinder, params.offRampConfig.SourceChainSelector, params.offRampConfig.ChainSelector, params.offRampConfig.OnRamp, params.sourceChain.LogPoller(), params.sourceChain.Client()) - if err != nil { - return nil, nil, nil, nil, errors.Wrap(err, "create onramp reader") - } - dynamicOnRampConfig, err := onRampReader.GetDynamicConfig(ctx) - if err != nil { - return nil, nil, nil, nil, errors.Wrap(err, "get onramp dynamic config") - } - - routerAddr, err := ccipcalc.GenericAddrToEvm(dynamicOnRampConfig.Router) - if err != nil { - return nil, nil, nil, nil, err - } - sourceRouter, err := router.NewRouter(routerAddr, params.sourceChain.Client()) - if err != nil { - return nil, nil, nil, nil, errors.Wrap(err, "failed loading source router") - } - sourceWrappedNative, err := sourceRouter.GetWrappedNative(&bind.CallOpts{}) - if err != nil { - return nil, nil, nil, nil, errors.Wrap(err, "could not get source native token") - } - - commitStoreReader, err := factory.NewCommitStoreReader(lggr, versionFinder, params.offRampConfig.CommitStore, params.destChain.Client(), params.destChain.LogPoller()) - if err != nil { - return nil, nil, nil, nil, errors.Wrap(err, "could not load commitStoreReader reader") - } - - err = commitStoreReader.SetGasEstimator(ctx, params.sourceChain.GasEstimator()) - if err != nil { - return nil, nil, nil, nil, fmt.Errorf("could not set gas estimator: %w", err) - } - - err = commitStoreReader.SetSourceMaxGasPrice(ctx, params.sourceChain.Config().EVM().GasEstimator().PriceMax().ToInt()) - if err != nil { - return nil, nil, nil, nil, fmt.Errorf("could not set source max gas price: %w", err) - } - - tokenDataProviders, err := initTokenDataProviders(lggr, jobIDToString(jb.ID), params.pluginConfig, params.sourceChain.LogPoller()) - if err != nil { - return nil, nil, nil, nil, errors.Wrap(err, "could not get token data providers") - } - - // Prom wrappers - onRampReader = observability.NewObservedOnRampReader(onRampReader, sourceChainID, ccip.ExecPluginLabel) - commitStoreReader = observability.NewObservedCommitStoreReader(commitStoreReader, destChainID, ccip.ExecPluginLabel) - offRampReader := observability.NewObservedOffRampReader(params.offRampReader, destChainID, ccip.ExecPluginLabel) - metricsCollector := ccip.NewPluginMetricsCollector(ccip.ExecPluginLabel, sourceChainID, destChainID) - - destChainSelector, err := chainselectors.SelectorFromChainId(uint64(destChainID)) - if err != nil { - return nil, nil, nil, nil, fmt.Errorf("get chain %d selector: %w", destChainID, err) - } - sourceChainSelector, err := chainselectors.SelectorFromChainId(uint64(sourceChainID)) - if err != nil { - return nil, nil, nil, nil, fmt.Errorf("get chain %d selector: %w", sourceChainID, err) - } - - execLggr.Infow("Initialized exec plugin", - "pluginConfig", params.pluginConfig, - "onRampAddress", params.offRampConfig.OnRamp, - "dynamicOnRampConfig", dynamicOnRampConfig, - "sourceNative", sourceWrappedNative, - "sourceRouter", sourceRouter.Address()) - - batchCaller := rpclib.NewDynamicLimitedBatchCaller( - lggr, - params.destChain.Client(), - rpclib.DefaultRpcBatchSizeLimit, - rpclib.DefaultRpcBatchBackOffMultiplier, - rpclib.DefaultMaxParallelRpcCalls, - ) - - offrampAddress, err := offRampReader.Address(ctx) - if err != nil { - return nil, nil, nil, nil, fmt.Errorf("get offramp reader address: %w", err) - } - - tokenPoolBatchedReader, err := batchreader.NewEVMTokenPoolBatchedReader(execLggr, sourceChainSelector, offrampAddress, batchCaller) - if err != nil { - return nil, nil, nil, nil, fmt.Errorf("new token pool batched reader: %w", err) - } - - chainHealthcheck := cache.NewObservedChainHealthCheck( - cache.NewChainHealthcheck( - // Adding more details to Logger to make healthcheck logs more informative - // It's safe because healthcheck logs only in case of unhealthy state - lggr.With( - "onramp", params.offRampConfig.OnRamp, - "commitStore", params.offRampConfig.CommitStore, - "offramp", offrampAddress, - ), - onRampReader, - commitStoreReader, - ), - ccip.ExecPluginLabel, - sourceChainID, - destChainID, - params.offRampConfig.OnRamp, - ) - - tokenBackgroundWorker := tokendata.NewBackgroundWorker( - tokenDataProviders, - tokenDataWorkerNumWorkers, - tokenDataWorkerTimeout, - 2*tokenDataWorkerTimeout, - ) - return &ExecutionPluginStaticConfig{ - lggr: execLggr, - onRampReader: onRampReader, - commitStoreReader: commitStoreReader, - offRampReader: offRampReader, - sourcePriceRegistryProvider: ccipdataprovider.NewEvmPriceRegistry(params.sourceChain.LogPoller(), params.sourceChain.Client(), execLggr, ccip.ExecPluginLabel), - sourceWrappedNativeToken: cciptypes.Address(sourceWrappedNative.String()), - destChainSelector: destChainSelector, - priceRegistryProvider: ccipdataprovider.NewEvmPriceRegistry(params.destChain.LogPoller(), params.destChain.Client(), execLggr, ccip.ExecPluginLabel), - tokenPoolBatchedReader: tokenPoolBatchedReader, - tokenDataWorker: tokenBackgroundWorker, - metricsCollector: metricsCollector, - chainHealthcheck: chainHealthcheck, - newReportingPluginRetryConfig: defaultNewReportingPluginRetryConfig, - }, &ccipcommon.BackfillArgs{ - SourceLP: params.sourceChain.LogPoller(), - DestLP: params.destChain.LogPoller(), - SourceStartBlock: params.pluginConfig.SourceStartBlock, - DestStartBlock: params.pluginConfig.DestStartBlock, - }, - chainHealthcheck, - tokenBackgroundWorker, - nil -} - type jobSpecParams struct { - pluginConfig ccipconfig.ExecutionPluginJobSpecConfig + pluginConfig ccipconfig.ExecPluginJobSpecConfig offRampConfig cciptypes.OffRampStaticConfig offRampReader ccipdata.OffRampReader sourceChain legacyevm.Chain @@ -342,10 +257,10 @@ type jobSpecParams struct { func extractJobSpecParams(lggr logger.Logger, jb job.Job, chainSet legacyevm.LegacyChainContainer, registerFilters bool) (*jobSpecParams, error) { if jb.OCR2OracleSpec == nil { - return nil, errors.New("spec is nil") + return nil, fmt.Errorf("spec is nil") } spec := jb.OCR2OracleSpec - var pluginConfig ccipconfig.ExecutionPluginJobSpecConfig + var pluginConfig ccipconfig.ExecPluginJobSpecConfig err := json.Unmarshal(spec.PluginConfig.Bytes(), &pluginConfig) if err != nil { return nil, err @@ -360,12 +275,12 @@ func extractJobSpecParams(lggr logger.Logger, jb job.Job, chainSet legacyevm.Leg offRampAddress := ccipcalc.HexToAddress(spec.ContractID) offRampReader, err := factory.NewOffRampReader(lggr, versionFinder, offRampAddress, destChain.Client(), destChain.LogPoller(), destChain.GasEstimator(), destChain.Config().EVM().GasEstimator().PriceMax().ToInt(), registerFilters) if err != nil { - return nil, errors.Wrap(err, "create offRampReader") + return nil, fmt.Errorf("create offRampReader: %w", err) } offRampConfig, err := offRampReader.GetStaticConfig(context.Background()) if err != nil { - return nil, errors.Wrap(err, "get offRamp static config") + return nil, fmt.Errorf("get offRamp static config: %w", err) } chainID, err := chainselectors.ChainIdFromSelector(offRampConfig.SourceChainSelector) @@ -375,7 +290,7 @@ func extractJobSpecParams(lggr logger.Logger, jb job.Job, chainSet legacyevm.Leg sourceChain, err := chainSet.Get(strconv.FormatUint(chainID, 10)) if err != nil { - return nil, errors.Wrap(err, "open source chain") + return nil, fmt.Errorf("open source chain: %w", err) } return &jobSpecParams{ diff --git a/core/services/ocr2/plugins/ccip/config/config.go b/core/services/ocr2/plugins/ccip/config/config.go index cfc637a6c3..a24a6edfd1 100644 --- a/core/services/ocr2/plugins/ccip/config/config.go +++ b/core/services/ocr2/plugins/ccip/config/config.go @@ -27,6 +27,19 @@ type CommitPluginJobSpecConfig struct { PriceGetterConfig *DynamicPriceGetterConfig `json:"priceGetterConfig,omitempty"` } +type CommitPluginConfig struct { + IsSourceProvider bool + SourceStartBlock, DestStartBlock uint64 +} + +func (c CommitPluginConfig) Encode() ([]byte, error) { + bytes, err := json.Marshal(c) + if err != nil { + return nil, err + } + return bytes, nil +} + // DynamicPriceGetterConfig specifies which configuration to use for getting the price of tokens (map keys). type DynamicPriceGetterConfig struct { AggregatorPrices map[common.Address]AggregatorPriceConfig `json:"aggregatorPrices"` @@ -91,8 +104,8 @@ func (c *DynamicPriceGetterConfig) Validate() error { return nil } -// ExecutionPluginJobSpecConfig contains the plugin specific variables for the ccip.CCIPExecution plugin. -type ExecutionPluginJobSpecConfig struct { +// ExecPluginJobSpecConfig contains the plugin specific variables for the ccip.CCIPExecution plugin. +type ExecPluginJobSpecConfig struct { SourceStartBlock, DestStartBlock uint64 // Only for first time job add. USDCConfig USDCConfig } @@ -106,6 +119,21 @@ type USDCConfig struct { AttestationAPIIntervalMilliseconds int } +type ExecPluginConfig struct { + SourceStartBlock, DestStartBlock uint64 // Only for first time job add. + IsSourceProvider bool + USDCConfig USDCConfig + JobID string +} + +func (e ExecPluginConfig) Encode() ([]byte, error) { + bytes, err := json.Marshal(e) + if err != nil { + return nil, err + } + return bytes, nil +} + func (uc *USDCConfig) ValidateUSDCConfig() error { if uc.AttestationAPI == "" { return errors.New("AttestationAPI is required") diff --git a/core/services/ocr2/plugins/ccip/config/config_test.go b/core/services/ocr2/plugins/ccip/config/config_test.go index 659586b0ab..e6207aa223 100644 --- a/core/services/ocr2/plugins/ccip/config/config_test.go +++ b/core/services/ocr2/plugins/ccip/config/config_test.go @@ -130,7 +130,7 @@ func TestCommitConfig(t *testing.T) { } func TestExecutionConfig(t *testing.T) { - exampleConfig := ExecutionPluginJobSpecConfig{ + exampleConfig := ExecPluginJobSpecConfig{ SourceStartBlock: 222, DestStartBlock: 333, } @@ -138,7 +138,7 @@ func TestExecutionConfig(t *testing.T) { bts, err := json.Marshal(exampleConfig) require.NoError(t, err) - parsedConfig := ExecutionPluginJobSpecConfig{} + parsedConfig := ExecPluginJobSpecConfig{} require.NoError(t, json.Unmarshal(bts, &parsedConfig)) require.Equal(t, exampleConfig, parsedConfig) diff --git a/core/services/ocr2/plugins/ccip/config/type_and_version.go b/core/services/ocr2/plugins/ccip/config/type_and_version.go index 701d727b6a..fdfd892b08 100644 --- a/core/services/ocr2/plugins/ccip/config/type_and_version.go +++ b/core/services/ocr2/plugins/ccip/config/type_and_version.go @@ -45,7 +45,7 @@ func TypeAndVersion(addr common.Address, client bind.ContractBackend) (ContractT } tvStr, err := tv.TypeAndVersion(nil) if err != nil { - return "", semver.Version{}, fmt.Errorf("error calling typeAndVersion on addr: %s %w", addr.Hex(), err) + return "", semver.Version{}, fmt.Errorf("error calling typeAndVersion on addr: %s %w", addr.String(), err) } contractType, versionStr, err := ParseTypeAndVersion(tvStr) diff --git a/core/services/ocr2/plugins/ccip/exportinternal.go b/core/services/ocr2/plugins/ccip/exportinternal.go new file mode 100644 index 0000000000..26922abe47 --- /dev/null +++ b/core/services/ocr2/plugins/ccip/exportinternal.go @@ -0,0 +1,103 @@ +package ccip + +import ( + "context" + "math/big" + + "github.com/ethereum/go-ethereum/common" + + "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/gas" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" + "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/config" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipcalc" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata/batchreader" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata/ccipdataprovider" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata/factory" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/pricegetter" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib" +) + +func GenericAddrToEvm(addr ccip.Address) (common.Address, error) { + return ccipcalc.GenericAddrToEvm(addr) +} + +func EvmAddrToGeneric(addr common.Address) ccip.Address { + return ccipcalc.EvmAddrToGeneric(addr) +} + +func NewEvmPriceRegistry(lp logpoller.LogPoller, ec client.Client, lggr logger.Logger, pluginLabel string) *ccipdataprovider.EvmPriceRegistry { + return ccipdataprovider.NewEvmPriceRegistry(lp, ec, lggr, pluginLabel) +} + +type VersionFinder = factory.VersionFinder + +func NewCommitStoreReader(lggr logger.Logger, versionFinder VersionFinder, address ccip.Address, ec client.Client, lp logpoller.LogPoller) (ccipdata.CommitStoreReader, error) { + return factory.NewCommitStoreReader(lggr, versionFinder, address, ec, lp) +} + +func NewOffRampReader(lggr logger.Logger, versionFinder VersionFinder, addr ccip.Address, destClient client.Client, lp logpoller.LogPoller, estimator gas.EvmFeeEstimator, destMaxGasPrice *big.Int, registerFilters bool) (ccipdata.OffRampReader, error) { + return factory.NewOffRampReader(lggr, versionFinder, addr, destClient, lp, estimator, destMaxGasPrice, registerFilters) +} + +func NewEvmVersionFinder() factory.EvmVersionFinder { + return factory.NewEvmVersionFinder() +} + +func NewOnRampReader(lggr logger.Logger, versionFinder VersionFinder, sourceSelector, destSelector uint64, onRampAddress ccip.Address, sourceLP logpoller.LogPoller, source client.Client) (ccipdata.OnRampReader, error) { + return factory.NewOnRampReader(lggr, versionFinder, sourceSelector, destSelector, onRampAddress, sourceLP, source) +} + +type OffRampReader = ccipdata.OffRampReader + +type DynamicPriceGetterClient = pricegetter.DynamicPriceGetterClient + +type DynamicPriceGetter = pricegetter.DynamicPriceGetter + +func NewDynamicPriceGetterClient(batchCaller rpclib.EvmBatchCaller) DynamicPriceGetterClient { + return pricegetter.NewDynamicPriceGetterClient(batchCaller) +} + +func NewDynamicPriceGetter(cfg config.DynamicPriceGetterConfig, evmClients map[uint64]DynamicPriceGetterClient) (*DynamicPriceGetter, error) { + return pricegetter.NewDynamicPriceGetter(cfg, evmClients) +} + +func NewDynamicLimitedBatchCaller( + lggr logger.Logger, batchSender rpclib.BatchSender, batchSizeLimit, backOffMultiplier, parallelRpcCallsLimit uint, +) *rpclib.DynamicLimitedBatchCaller { + return rpclib.NewDynamicLimitedBatchCaller(lggr, batchSender, batchSizeLimit, backOffMultiplier, parallelRpcCallsLimit) +} + +func NewUSDCReader(lggr logger.Logger, jobID string, transmitter common.Address, lp logpoller.LogPoller, registerFilters bool) (*ccipdata.USDCReaderImpl, error) { + return ccipdata.NewUSDCReader(lggr, jobID, transmitter, lp, registerFilters) +} + +type USDCReaderImpl = ccipdata.USDCReaderImpl + +var DefaultRpcBatchSizeLimit = rpclib.DefaultRpcBatchSizeLimit +var DefaultRpcBatchBackOffMultiplier = rpclib.DefaultRpcBatchBackOffMultiplier +var DefaultMaxParallelRpcCalls = rpclib.DefaultMaxParallelRpcCalls + +func NewEVMTokenPoolBatchedReader(lggr logger.Logger, remoteChainSelector uint64, offRampAddress ccip.Address, evmBatchCaller rpclib.EvmBatchCaller) (*batchreader.EVMTokenPoolBatchedReader, error) { + return batchreader.NewEVMTokenPoolBatchedReader(lggr, remoteChainSelector, offRampAddress, evmBatchCaller) +} + +type ChainAgnosticPriceRegistry struct { + p ChainAgnosticPriceRegistryFactory +} + +// [ChainAgnosticPriceRegistryFactory] is satisfied by [commontypes.CCIPCommitProvider] and [commontypes.CCIPExecProvider] +type ChainAgnosticPriceRegistryFactory interface { + NewPriceRegistryReader(ctx context.Context, addr ccip.Address) (ccip.PriceRegistryReader, error) +} + +func (c *ChainAgnosticPriceRegistry) NewPriceRegistryReader(ctx context.Context, addr ccip.Address) (ccip.PriceRegistryReader, error) { + return c.p.NewPriceRegistryReader(ctx, addr) +} + +func NewChainAgnosticPriceRegistry(provider ChainAgnosticPriceRegistryFactory) *ChainAgnosticPriceRegistry { + return &ChainAgnosticPriceRegistry{provider} +} diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/batchreader/token_pool_batch_reader.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/batchreader/token_pool_batch_reader.go index 599dc052f4..30e4a41512 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/batchreader/token_pool_batch_reader.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/batchreader/token_pool_batch_reader.go @@ -6,6 +6,8 @@ import ( "fmt" "sync" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib" + "github.com/ethereum/go-ethereum/common" cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" @@ -19,7 +21,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_4_0" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib" ) var ( diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/batchreader/token_pool_batch_reader_test.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/batchreader/token_pool_batch_reader_test.go index c63d479f3d..c67c3c1527 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/batchreader/token_pool_batch_reader_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/batchreader/token_pool_batch_reader_test.go @@ -6,6 +6,9 @@ import ( "math/big" "testing" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib/rpclibmocks" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" @@ -15,8 +18,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipcalc" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib/rpclibmocks" ) func TestTokenPoolFactory(t *testing.T) { diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_0_0/offramp.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_0_0/offramp.go index 6495fe2174..f8ec447cf5 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_0_0/offramp.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_0_0/offramp.go @@ -7,6 +7,8 @@ import ( "sync" "time" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib" + mapset "github.com/deckarep/golang-set/v2" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" @@ -32,7 +34,6 @@ import ( ccipconfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/config" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/cache" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/prices" ) diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_0_0/offramp_reader_unit_test.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_0_0/offramp_reader_unit_test.go index 47eb52ca7d..a0f6e5e6cd 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_0_0/offramp_reader_unit_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_0_0/offramp_reader_unit_test.go @@ -6,6 +6,9 @@ import ( "slices" "testing" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib/rpclibmocks" + "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" @@ -24,8 +27,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/cache" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipcalc" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib/rpclibmocks" ) func TestOffRampGetDestinationTokensFromSourceTokens(t *testing.T) { diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_0_0/offramp_test.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_0_0/offramp_test.go index f1fb4ddcd7..657617c34a 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_0_0/offramp_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_0_0/offramp_test.go @@ -5,6 +5,9 @@ import ( "testing" "time" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib/rpclibmocks" + "github.com/pkg/errors" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" @@ -16,8 +19,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" ccipconfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/config" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib/rpclibmocks" ) func TestExecOffchainConfig100_Encoding(t *testing.T) { diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_0_0/price_registry.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_0_0/price_registry.go index 02feba705f..d2104f985b 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_0_0/price_registry.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_0_0/price_registry.go @@ -7,6 +7,8 @@ import ( "sync" "time" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" @@ -24,7 +26,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipcalc" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/logpollerutil" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib" ) var ( diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/commit_store.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/commit_store.go index 34ce05c2d2..f94c8e1a7b 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/commit_store.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/commit_store.go @@ -228,6 +228,7 @@ func (c JSONCommitOffchainConfig) Validate() error { return nil } +// TODO: Pass a Gas Estimator through to the plugin directly func (c *CommitStore) ChangeConfig(_ context.Context, onchainConfig []byte, offchainConfig []byte) (cciptypes.Address, error) { onchainConfigParsed, err := abihelpers.DecodeAbiStruct[ccipdata.CommitOnchainConfig](onchainConfig) if err != nil { @@ -249,6 +250,7 @@ func (c *CommitStore) ChangeConfig(_ context.Context, onchainConfig []byte, offc return "", fmt.Errorf("this CommitStore sourceMaxGasPrice is nil. SetSourceMaxGasPrice should be called before ChangeConfig") } + // TODO: do this in the factory c.gasPriceEstimator = prices.NewDAGasPriceEstimator( *c.estimator, c.sourceMaxGasPrice, diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/token_pool.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/token_pool.go index 8115cd8ae0..a0850ebb2e 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/token_pool.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/token_pool.go @@ -3,10 +3,11 @@ package v1_2_0 import ( "github.com/ethereum/go-ethereum/common" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/burn_mint_token_pool_1_2_0" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/abihelpers" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib" ) var ( diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_4_0/token_pool.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_4_0/token_pool.go index 0324a3f766..caf652b9e4 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_4_0/token_pool.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_4_0/token_pool.go @@ -3,10 +3,11 @@ package v1_4_0 import ( "github.com/ethereum/go-ethereum/common" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/burn_mint_token_pool_1_4_0" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/abihelpers" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib" ) var ( diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdb/price_service_test.go b/core/services/ocr2/plugins/ccip/internal/ccipdb/price_service_test.go index 5ff9198dde..0bea8af9a1 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdb/price_service_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdb/price_service_test.go @@ -233,7 +233,7 @@ func TestPriceService_generatePriceUpdates(t *testing.T) { name: "base", tokenDecimals: map[cciptypes.Address]uint8{ tokens[0]: 18, - tokens[1]: 18, + tokens[1]: 12, }, sourceNativeToken: tokens[0], priceGetterRespData: map[cciptypes.Address]*big.Int{ @@ -248,7 +248,7 @@ func TestPriceService_generatePriceUpdates(t *testing.T) { expSourceGasPriceUSD: big.NewInt(1000), expTokenPricesUSD: map[cciptypes.Address]*big.Int{ tokens[0]: val1e18(100), - tokens[1]: val1e18(200), + tokens[1]: val1e18(200 * 1e6), }, expErr: false, }, @@ -290,29 +290,6 @@ func TestPriceService_generatePriceUpdates(t *testing.T) { priceGetterRespErr: nil, expErr: true, }, - { - name: "base", - tokenDecimals: map[cciptypes.Address]uint8{ - tokens[0]: 18, - tokens[1]: 18, - }, - sourceNativeToken: tokens[0], - priceGetterRespData: map[cciptypes.Address]*big.Int{ - tokens[0]: val1e18(100), - tokens[1]: val1e18(200), - tokens[2]: val1e18(300), // price getter returned a price for this token even though we didn't request it - }, - priceGetterRespErr: nil, - feeEstimatorRespFee: big.NewInt(10), - feeEstimatorRespErr: nil, - maxGasPrice: 1e18, - expSourceGasPriceUSD: big.NewInt(1000), - expTokenPricesUSD: map[cciptypes.Address]*big.Int{ - tokens[0]: val1e18(100), - tokens[1]: val1e18(200), - }, - expErr: false, - }, { name: "dynamic fee cap overrides legacy", tokenDecimals: map[cciptypes.Address]uint8{ diff --git a/core/services/ocr2/plugins/ccip/internal/oraclelib/backfilled_oracle.go b/core/services/ocr2/plugins/ccip/internal/oraclelib/backfilled_oracle.go index 4191de9f8e..599a6206a1 100644 --- a/core/services/ocr2/plugins/ccip/internal/oraclelib/backfilled_oracle.go +++ b/core/services/ocr2/plugins/ccip/internal/oraclelib/backfilled_oracle.go @@ -6,6 +6,8 @@ import ( "sync/atomic" "time" + "github.com/smartcontractkit/chainlink/v2/core/services" + "go.uber.org/multierr" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" @@ -119,3 +121,95 @@ func (r *BackfilledOracle) Close() error { } return nil } + +func NewChainAgnosticBackFilledOracle(lggr logger.Logger, srcProvider services.ServiceCtx, dstProvider services.ServiceCtx, oracle job.ServiceCtx) *ChainAgnosticBackFilledOracle { + return &ChainAgnosticBackFilledOracle{ + srcProvider: srcProvider, + dstProvider: dstProvider, + oracle: oracle, + lggr: lggr, + } +} + +type ChainAgnosticBackFilledOracle struct { + srcProvider services.ServiceCtx + dstProvider services.ServiceCtx + oracle job.ServiceCtx + lggr logger.Logger + oracleStarted atomic.Bool + cancelFn context.CancelFunc +} + +func (r *ChainAgnosticBackFilledOracle) Start(ctx context.Context) error { + ctx, cancelFn := context.WithCancel(context.Background()) + r.cancelFn = cancelFn + var err error + var errMu sync.Mutex + var wg sync.WaitGroup + // Replay in parallel if both requested. + wg.Add(1) + go func() { + defer wg.Done() + s := time.Now() + srcReplayErr := r.srcProvider.Start(ctx) + errMu.Lock() + err = multierr.Combine(err, srcReplayErr) + errMu.Unlock() + r.lggr.Infow("finished replaying src chain", "time", time.Since(s)) + }() + + wg.Add(1) + go func() { + defer wg.Done() + s := time.Now() + dstReplayErr := r.dstProvider.Start(ctx) + errMu.Lock() + err = multierr.Combine(err, dstReplayErr) + errMu.Unlock() + r.lggr.Infow("finished replaying dst chain", "time", time.Since(s)) + }() + + wg.Wait() + if err != nil { + r.lggr.Criticalw("unexpected error replaying, continuing plugin boot without all the logs backfilled", "err", err) + } + if err := ctx.Err(); err != nil { + r.lggr.Errorw("context already cancelled", "err", err) + return nil + } + // Start oracle with all logs present from dstStartBlock on dst and + // all logs from srcStartBlock on src. + if err := r.oracle.Start(ctx); err != nil { + // Should never happen. + r.lggr.Errorw("unexpected error starting oracle", "err", err) + } else { + r.oracleStarted.Store(true) + } + return nil +} + +func (r *ChainAgnosticBackFilledOracle) Close() error { + if r.oracleStarted.Load() { + // If the oracle is running, it must be Closed/stopped + // TODO: Close should be safe to call in either case? + if err := r.oracle.Close(); err != nil { + r.lggr.Errorw("unexpected error stopping oracle", "err", err) + return err + } + // Flag the oracle as closed with our internal variable that keeps track + // of its state. This will allow to re-start the process + r.oracleStarted.Store(false) + } + if r.cancelFn != nil { + // This is useful to step the previous tasks that are spawned in + // parallel before starting the Oracle. This will use the context to + // signal them to exit immediately. + // + // It can be possible this is the only way to stop the Start() async + // flow, specially when the previusly task are running (the replays) and + // `oracleStarted` would be false in that example. Calling `cancelFn()` + // will stop the replays and will prevent the oracle to start + r.cancelFn() + } + return nil +} diff --git a/core/services/ocr2/plugins/ccip/internal/pricegetter/evm.go b/core/services/ocr2/plugins/ccip/internal/pricegetter/evm.go index dd32be53b6..830d56cd3a 100644 --- a/core/services/ocr2/plugins/ccip/internal/pricegetter/evm.go +++ b/core/services/ocr2/plugins/ccip/internal/pricegetter/evm.go @@ -7,6 +7,8 @@ import ( "math/big" "strings" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib" + "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" @@ -15,7 +17,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/gethwrappers2/generated/offchainaggregator" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/config" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipcalc" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib" ) const decimalsMethodName = "decimals" @@ -143,6 +144,9 @@ func (d *DynamicPriceGetter) performBatchCall(ctx context.Context, chainID uint6 calls = append(calls, batchCalls.latestRoundDataCalls...) results, err := evmCaller.BatchCall(ctx, 0, calls) + if err != nil { + return fmt.Errorf("batch call on chain %d failed: %w", chainID, err) + } // Extract results. decimals := make([]uint8, 0, nbDecimalCalls) 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 8d1bf67ab1..673b9776c7 100644 --- a/core/services/ocr2/plugins/ccip/internal/pricegetter/evm_test.go +++ b/core/services/ocr2/plugins/ccip/internal/pricegetter/evm_test.go @@ -25,6 +25,7 @@ type testParameters struct { evmClients map[uint64]DynamicPriceGetterClient tokens []common.Address expectedTokenPrices map[common.Address]big.Int + evmCallErr bool invalidConfigErrorExpected bool priceResolutionErrorExpected bool } @@ -58,6 +59,10 @@ func TestDynamicPriceGetter(t *testing.T) { name: "no_aggregator_for_token", param: testParamNoAggregatorForToken(t), }, + { + name: "batchCall_returns_err", + param: testParamBatchCallReturnsErr(t), + }, } for _, test := range tests { @@ -82,6 +87,12 @@ func TestDynamicPriceGetter(t *testing.T) { tokens = append(tokens, tokenAddr) } prices, err := pg.TokenPricesUSD(ctx, tokens) + + if test.param.evmCallErr { + require.Error(t, err) + return + } + if test.param.priceResolutionErrorExpected { require.Error(t, err) return @@ -454,6 +465,50 @@ func testParamNoAggregatorForToken(t *testing.T) testParameters { } } +func testParamBatchCallReturnsErr(t *testing.T) testParameters { + tk1 := utils.RandomAddress() + tk2 := utils.RandomAddress() + tk3 := utils.RandomAddress() + cfg := config.DynamicPriceGetterConfig{ + AggregatorPrices: map[common.Address]config.AggregatorPriceConfig{ + tk1: { + ChainID: 101, + AggregatorContractAddress: utils.RandomAddress(), + }, + tk2: { + ChainID: 102, + AggregatorContractAddress: utils.RandomAddress(), + }, + }, + StaticPrices: map[common.Address]config.StaticPriceConfig{ + tk3: { + ChainID: 103, + Price: big.NewInt(1_234_000), + }, + }, + } + // Real LINK/USD example from OP. + round1 := aggregator_v3_interface.LatestRoundData{ + RoundId: big.NewInt(1000), + Answer: big.NewInt(1396818990), + StartedAt: big.NewInt(1704896575), + UpdatedAt: big.NewInt(1704896575), + AnsweredInRound: big.NewInt(1000), + } + evmClients := map[uint64]DynamicPriceGetterClient{ + uint64(101): mockClient(t, []uint8{8}, []aggregator_v3_interface.LatestRoundData{round1}), + uint64(102): { + BatchCaller: mockErrCaller(t), + }, + } + return testParameters{ + cfg: cfg, + evmClients: evmClients, + tokens: []common.Address{tk1, tk2, tk3}, + evmCallErr: true, + } +} + func mockClient(t *testing.T, decimals []uint8, rounds []aggregator_v3_interface.LatestRoundData) DynamicPriceGetterClient { return DynamicPriceGetterClient{ BatchCaller: mockCaller(t, decimals, rounds), @@ -479,6 +534,12 @@ func mockCaller(t *testing.T, decimals []uint8, rounds []aggregator_v3_interface return caller } +func mockErrCaller(t *testing.T) *rpclibmocks.EvmBatchCaller { + caller := rpclibmocks.NewEvmBatchCaller(t) + caller.On("BatchCall", mock.Anything, uint64(0), mock.Anything).Return(nil, assert.AnError).Maybe() + return caller +} + // multExp returns the result of multiplying x by 10^e. func multExp(x *big.Int, e int64) *big.Int { return big.NewInt(0).Mul(x, big.NewInt(0).Exp(big.NewInt(10), big.NewInt(e), nil)) diff --git a/core/services/ocr2/plugins/ccip/internal/rpclib/evm_test.go b/core/services/ocr2/plugins/ccip/internal/rpclib/evm_test.go index f42bbbf33e..1a3d7baf0f 100644 --- a/core/services/ocr2/plugins/ccip/internal/rpclib/evm_test.go +++ b/core/services/ocr2/plugins/ccip/internal/rpclib/evm_test.go @@ -5,6 +5,8 @@ import ( "strconv" "testing" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib" + "github.com/cometbft/cometbft/libs/rand" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" @@ -18,7 +20,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/abihelpers" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/rpclib" ) func TestDefaultEvmBatchCaller_BatchCallDynamicLimit(t *testing.T) { diff --git a/core/services/ocr2/plugins/ccip/observations.go b/core/services/ocr2/plugins/ccip/observations.go index 2c09a09e13..f79d667a55 100644 --- a/core/services/ocr2/plugins/ccip/observations.go +++ b/core/services/ocr2/plugins/ccip/observations.go @@ -20,9 +20,10 @@ import ( // will not be able to unmarshal each other's observations. Do not modify unless you // know what you are doing. type CommitObservation struct { - Interval cciptypes.CommitStoreInterval `json:"interval"` - TokenPricesUSD map[cciptypes.Address]*big.Int `json:"tokensPerFeeCoin"` - SourceGasPriceUSD *big.Int `json:"sourceGasPrice"` + Interval cciptypes.CommitStoreInterval `json:"interval"` + TokenPricesUSD map[cciptypes.Address]*big.Int `json:"tokensPerFeeCoin"` + SourceGasPriceUSD *big.Int `json:"sourceGasPrice"` // Deprecated + SourceGasPriceUSDPerChain map[uint64]*big.Int `json:"sourceGasPriceUSDPerChain"` } // Marshal MUST be used instead of raw json.Marshal(o) since it contains backwards compatibility related changes. diff --git a/core/services/ocr2/plugins/ccip/observations_test.go b/core/services/ocr2/plugins/ccip/observations_test.go index 59638c5016..a3143f157d 100644 --- a/core/services/ocr2/plugins/ccip/observations_test.go +++ b/core/services/ocr2/plugins/ccip/observations_test.go @@ -6,7 +6,6 @@ import ( "strings" "testing" - "github.com/ethereum/go-ethereum/common" "github.com/leanovate/gopter" "github.com/leanovate/gopter/gen" "github.com/leanovate/gopter/prop" @@ -15,7 +14,7 @@ import ( "github.com/stretchr/testify/require" cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/commit_store_1_0_0" + "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/config" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipcalc" @@ -32,25 +31,24 @@ func TestObservationFilter(t *testing.T) { assert.Equal(t, nonEmpty[0].Interval, obs1.Interval) } -// After 1.2, the observation struct is version agnostic -// so only need to verify the 1.0->1.2 transition. -type CommitObservationV1_0_0 struct { - Interval commit_store_1_0_0.CommitStoreInterval `json:"interval"` - TokenPricesUSD map[common.Address]*big.Int `json:"tokensPerFeeCoin"` - SourceGasPriceUSD *big.Int `json:"sourceGasPrice"` +// This is the observation format up to 1.4.16 release +type CommitObservationLegacy struct { + Interval cciptypes.CommitStoreInterval `json:"interval"` + TokenPricesUSD map[cciptypes.Address]*big.Int `json:"tokensPerFeeCoin"` + SourceGasPriceUSD *big.Int `json:"sourceGasPrice"` } -func TestObservationCompat100_120(t *testing.T) { - v10 := CommitObservationV1_0_0{ - Interval: commit_store_1_0_0.CommitStoreInterval{ +func TestObservationCompat_MultiChainGas(t *testing.T) { + obsLegacy := CommitObservationLegacy{ + Interval: cciptypes.CommitStoreInterval{ Min: 1, Max: 12, }, - TokenPricesUSD: map[common.Address]*big.Int{common.HexToAddress("0x1"): big.NewInt(1)}, + TokenPricesUSD: map[cciptypes.Address]*big.Int{ccipcalc.HexToAddress("0x1"): big.NewInt(1)}, SourceGasPriceUSD: big.NewInt(3)} - b10, err := json.Marshal(v10) + bL, err := json.Marshal(obsLegacy) require.NoError(t, err) - v12 := CommitObservation{ + obsNew := CommitObservation{ Interval: cciptypes.CommitStoreInterval{ Min: 1, Max: 12, @@ -58,10 +56,13 @@ func TestObservationCompat100_120(t *testing.T) { TokenPricesUSD: map[cciptypes.Address]*big.Int{ccipcalc.HexToAddress("0x1"): big.NewInt(1)}, SourceGasPriceUSD: big.NewInt(3), } - b12, err := json.Marshal(v12) + bN, err := json.Marshal(obsNew) require.NoError(t, err) - // Assert identical json. - assert.Equal(t, b10, b12) + + observations := GetParsableObservations[CommitObservation](logger.TestLogger(t), []types.AttributedObservation{{Observation: bL}, {Observation: bN}}) + + assert.Equal(t, 2, len(observations)) + assert.Equal(t, observations[0], observations[1]) } func TestCommitObservationJsonDeserialization(t *testing.T) { @@ -97,13 +98,14 @@ func TestCommitObservationMarshal(t *testing.T) { Min: 1, Max: 12, }, - TokenPricesUSD: map[cciptypes.Address]*big.Int{"0xAaAaAa": big.NewInt(1)}, - SourceGasPriceUSD: big.NewInt(3), + TokenPricesUSD: map[cciptypes.Address]*big.Int{"0xAaAaAa": big.NewInt(1)}, + SourceGasPriceUSD: big.NewInt(3), + SourceGasPriceUSDPerChain: map[uint64]*big.Int{123: big.NewInt(3)}, } b, err := obs.Marshal() require.NoError(t, err) - assert.Equal(t, `{"interval":{"Min":1,"Max":12},"tokensPerFeeCoin":{"0xaaaaaa":1},"sourceGasPrice":3}`, string(b)) + assert.Equal(t, `{"interval":{"Min":1,"Max":12},"tokensPerFeeCoin":{"0xaaaaaa":1},"sourceGasPrice":3,"sourceGasPriceUSDPerChain":{"123":3}}`, string(b)) // Make sure that the call to Marshal did not alter the original observation object. assert.Len(t, obs.TokenPricesUSD, 1) @@ -111,6 +113,10 @@ func TestCommitObservationMarshal(t *testing.T) { assert.True(t, exists) _, exists = obs.TokenPricesUSD["0xaaaaaa"] assert.False(t, exists) + + assert.Len(t, obs.SourceGasPriceUSDPerChain, 1) + _, exists = obs.SourceGasPriceUSDPerChain[123] + assert.True(t, exists) } func TestExecutionObservationJsonDeserialization(t *testing.T) { @@ -226,7 +232,10 @@ func TestCommitObservationJsonSerializationDeserialization(t *testing.T) { "0x507877C2E26f1387432D067D2DaAfa7d0420d90a": 2, "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa": 3 }, - "sourceGasPrice": 3 + "sourceGasPrice": 3, + "sourceGasPriceUSDPerChain": { + "123":3 + } }` expectedObservation := CommitObservation{ @@ -240,6 +249,9 @@ func TestCommitObservationJsonSerializationDeserialization(t *testing.T) { cciptypes.Address("0xaAaAaAaaAaAaAaaAaAAAAAAAAaaaAaAaAaaAaaAa"): big.NewInt(3), // json lower->eip55 parsed }, SourceGasPriceUSD: big.NewInt(3), + SourceGasPriceUSDPerChain: map[uint64]*big.Int{ + 123: big.NewInt(3), + }, } observations := GetParsableObservations[CommitObservation](logger.TestLogger(t), []types.AttributedObservation{ diff --git a/core/services/ocr2/plugins/liquiditymanager/bridge/arb/l1_to_l2.go b/core/services/ocr2/plugins/liquiditymanager/bridge/arb/l1_to_l2.go index cebfb9de34..fc424d8f67 100644 --- a/core/services/ocr2/plugins/liquiditymanager/bridge/arb/l1_to_l2.go +++ b/core/services/ocr2/plugins/liquiditymanager/bridge/arb/l1_to_l2.go @@ -56,6 +56,7 @@ type l1ToL2Bridge struct { } func NewL1ToL2Bridge( + ctx context.Context, lggr logger.Logger, localSelector, remoteSelector models.NetworkSelector, @@ -95,8 +96,6 @@ func NewL1ToL2Bridge( remoteChain.Name, "", ) - // FIXME Makram please pass the valid context - ctx := context.Background() err = l1LogPoller.RegisterFilter(ctx, logpoller.Filter{ Addresses: []common.Address{l1LiquidityManagerAddress}, Name: l1FilterName, @@ -242,16 +241,6 @@ func (l *l1ToL2Bridge) GetTransfers( return nil, err } - slices.SortFunc(sendLogs, func(a, b logpoller.Log) int { - return a.BlockTimestamp.Compare(b.BlockTimestamp) - }) - slices.SortFunc(depositFinalizedLogs, func(a, b logpoller.Log) int { - return a.BlockTimestamp.Compare(b.BlockTimestamp) - }) - slices.SortFunc(receiveLogs, func(a, b logpoller.Log) int { - return a.BlockTimestamp.Compare(b.BlockTimestamp) - }) - lggr.Infow("got logs", "sendLogs", len(sendLogs), "depositFinalizedLogs", len(depositFinalizedLogs), @@ -285,11 +274,7 @@ func (l *l1ToL2Bridge) GetTransfers( // event, such as the l1 to l2 tx id. This is only available as part of the calldata for when the L2 calls // submitRetryable on the ArbRetryableTx precompile. // e.g https://sepolia.arbiscan.io/tx/0xce0d0d7e74f184fa8cb264b6d9aab5ced159faf3d0d9ae54b67fd40ba9d965a7 - // therefore we're kind of relegated here to doing a simple count check - filter out all of the - // LiquidityTransferred logs destined for the liquidityManager on L2 and all the DepositFinalized logs that - // pay out to the liquidityManager on L2. - // We can _probably_ assume that the earlier LiquidityTransferred logs on L1 - // are more likely to be finalizedNotExecuted than later ones. + // therefore we're kind of relegated here to simply checking on the `amount` transferred. notReady, ready, readyData, err := partitionTransfers( localToken, l.l1BridgeAdapter.Address(), @@ -379,8 +364,9 @@ func (l *l1ToL2Bridge) toPendingTransfers( TxHash: transfer.Raw.TxHash, LogIndex: int64(transfer.Raw.Index), }].BlockTimestamp, - BridgeData: []byte{}, // no finalization data, not ready - Stage: bridgecommon.StageRebalanceConfirmed, + BridgeData: []byte{}, // no finalization data, not ready + Stage: bridgecommon.StageRebalanceConfirmed, + NativeBridgeFee: ubig.NewI(0), }, Status: models.TransferStatusNotReady, ID: fmt.Sprintf("%s-%d", transfer.Raw.TxHash.Hex(), transfer.Raw.Index), @@ -400,8 +386,9 @@ func (l *l1ToL2Bridge) toPendingTransfers( TxHash: transfer.Raw.TxHash, LogIndex: int64(transfer.Raw.Index), }].BlockTimestamp, - BridgeData: readyData[i], // finalization data since its ready - Stage: bridgecommon.StageFinalizeReady, + BridgeData: readyData[i], // finalization data since its ready + Stage: bridgecommon.StageFinalizeReady, + NativeBridgeFee: ubig.NewI(0), }, Status: models.TransferStatusReady, // ready == finalized for L1 -> L2 transfers due to auto-finalization by the native bridge ID: fmt.Sprintf("%s-%d", transfer.Raw.TxHash.Hex(), transfer.Raw.Index), @@ -412,7 +399,6 @@ func (l *l1ToL2Bridge) toPendingTransfers( return transfers, nil } -// precondition: the input logs are already sorted in time-ascending order func partitionTransfers( localToken models.Address, l1BridgeAdapterAddress common.Address, @@ -427,25 +413,23 @@ func partitionTransfers( err error, ) { effectiveDepositFinalized := getEffectiveEvents(localToken, l1BridgeAdapterAddress, l2LiquidityManagerAddress, depositFinalizedLogs) - // determine ready and not ready first - if len(sentLogs) > len(effectiveDepositFinalized) { - // more sent than have been finalized - for i := len(sentLogs) - len(effectiveDepositFinalized) + 1; i < len(sentLogs); i++ { - notReady = append(notReady, sentLogs[i]) + + // Loop through sentLogs and find an effectiveDepositFinalized log with a matching 'amount' and 'to' address. + // If found, it is ready to be received by L2 LM. If not found, it still needs to be finalized. + for _, sentLog := range sentLogs { + var found bool + for _, depFinalized := range effectiveDepositFinalized { + if sentLog.Amount.Cmp(depFinalized.Amount) == 0 && sentLog.To == depFinalized.To { + ready = append(ready, sentLog) + found = true + break + } } - for i := 0; i < (len(sentLogs) - len(effectiveDepositFinalized)); i++ { - ready = append(ready, sentLogs[i]) + if !found { + notReady = append(notReady, sentLog) } - } else if len(sentLogs) < len(effectiveDepositFinalized) { - // more finalized than have been sent - should be impossible - // TODO: what if a rebalance is triggered at T=0, the sent log is emitted at t=1 - // and the DepositFinalized log is emitted at T=2, and our query goes back to T=2. There will be - // 1 DepositFinalized log and 0 sent logs. Maybe drop this condition and just do the matching - return nil, nil, nil, fmt.Errorf("got more finalized logs than sent - should be impossible: len(sent) = %d, len(finalized) = %d", - len(sentLogs), len(effectiveDepositFinalized)) - } else { - ready = sentLogs } + // figure out if any of the ready have been executed ready, err = filterExecuted(ready, receivedLogs) if err != nil { @@ -497,6 +481,10 @@ func matchingExecutionExists( err, hexutil.Encode(recvLog.BridgeSpecificData)) } if sendL1ToL2TxId.Cmp(recvL1ToL2TxId) == 0 { + if readyCandidate.Amount.Cmp(recvLog.Amount) != 0 { + return false, fmt.Errorf("bridge data matched but amount mismatched: send amount %s, receive amount %s", + readyCandidate.Amount, recvLog.Amount) + } return true, nil } } diff --git a/core/services/ocr2/plugins/liquiditymanager/bridge/arb/l1_to_l2_test.go b/core/services/ocr2/plugins/liquiditymanager/bridge/arb/l1_to_l2_test.go index 64f85ba06e..72e1ff1671 100644 --- a/core/services/ocr2/plugins/liquiditymanager/bridge/arb/l1_to_l2_test.go +++ b/core/services/ocr2/plugins/liquiditymanager/bridge/arb/l1_to_l2_test.go @@ -14,6 +14,8 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + bridgetestutils "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/bridge/testutils" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" evmclientmocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client/mocks" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" @@ -753,6 +755,11 @@ func Test_filterExecuted(t *testing.T) { } func Test_partitionTransfers(t *testing.T) { + var ( + localToken = testutils.NewAddress() + l1BridgeAdapterAddress = testutils.NewAddress() + l2LiquidityManagerAddress = testutils.NewAddress() + ) type args struct { localToken models.Address l1BridgeAdapterAddress common.Address @@ -768,7 +775,288 @@ func Test_partitionTransfers(t *testing.T) { wantReady []*liquiditymanager.LiquidityManagerLiquidityTransferred wantReadyData [][]byte wantErr bool - }{} + }{ + { + name: "happy path - one ready, one not ready, one already received", + args: args{ + localToken: models.Address(localToken), + l1BridgeAdapterAddress: l1BridgeAdapterAddress, + l2LiquidityManagerAddress: l2LiquidityManagerAddress, + sentLogs: []*liquiditymanager.LiquidityManagerLiquidityTransferred{ + // Amount = 100, ready + { + To: l2LiquidityManagerAddress, + Amount: big.NewInt(100), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), + }, + // Amount = 200, not ready + { + To: l2LiquidityManagerAddress, + Amount: big.NewInt(200), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), + }, + // Amount = 300, already received + { + To: l2LiquidityManagerAddress, + Amount: big.NewInt(300), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000003"), + }, + }, + depositFinalizedLogs: []*l2_arbitrum_gateway.L2ArbitrumGatewayDepositFinalized{ + // Amount = 100, ready + { + L1Token: localToken, + From: l1BridgeAdapterAddress, + To: l2LiquidityManagerAddress, + Amount: big.NewInt(100), + }, + // Amount = 300, already received + { + L1Token: localToken, + From: l1BridgeAdapterAddress, + To: l2LiquidityManagerAddress, + Amount: big.NewInt(300), + }, + }, + receivedLogs: []*liquiditymanager.LiquidityManagerLiquidityTransferred{ + // Amount = 300, already received + { + To: l2LiquidityManagerAddress, + Amount: big.NewInt(300), + BridgeSpecificData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000003"), + }, + }, + }, + wantNotReady: []*liquiditymanager.LiquidityManagerLiquidityTransferred{ + // Amount = 200, not ready + { + To: l2LiquidityManagerAddress, + Amount: big.NewInt(200), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), + }, + }, + wantReady: []*liquiditymanager.LiquidityManagerLiquidityTransferred{ + // Amount = 100, ready + { + To: l2LiquidityManagerAddress, + Amount: big.NewInt(100), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), + }}, + wantReadyData: [][]byte{bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001")}, + wantErr: false, + }, + { + name: "mismatched token address", + args: args{ + localToken: models.Address(localToken), + l1BridgeAdapterAddress: l1BridgeAdapterAddress, + l2LiquidityManagerAddress: l2LiquidityManagerAddress, + sentLogs: []*liquiditymanager.LiquidityManagerLiquidityTransferred{ + { + To: l2LiquidityManagerAddress, + Amount: big.NewInt(100), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), + }, + }, + depositFinalizedLogs: []*l2_arbitrum_gateway.L2ArbitrumGatewayDepositFinalized{ + { + L1Token: testutils.NewAddress(), // Mismatched address + From: l1BridgeAdapterAddress, + To: l2LiquidityManagerAddress, + Amount: big.NewInt(100), + }, + }, + receivedLogs: []*liquiditymanager.LiquidityManagerLiquidityTransferred{}, + }, + wantNotReady: []*liquiditymanager.LiquidityManagerLiquidityTransferred{ + { + To: l2LiquidityManagerAddress, + Amount: big.NewInt(100), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), + }, + }, + wantReady: []*liquiditymanager.LiquidityManagerLiquidityTransferred{}, + wantReadyData: nil, + wantErr: false, + }, + { + name: "mismatched deposit finalized From address", + args: args{ + localToken: models.Address(localToken), + l1BridgeAdapterAddress: l1BridgeAdapterAddress, + l2LiquidityManagerAddress: l2LiquidityManagerAddress, + sentLogs: []*liquiditymanager.LiquidityManagerLiquidityTransferred{ + { + To: l2LiquidityManagerAddress, + Amount: big.NewInt(100), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), + }, + }, + depositFinalizedLogs: []*l2_arbitrum_gateway.L2ArbitrumGatewayDepositFinalized{ + { + L1Token: localToken, + From: testutils.NewAddress(), // Mismatched address + To: l2LiquidityManagerAddress, + Amount: big.NewInt(100), + }, + }, + receivedLogs: []*liquiditymanager.LiquidityManagerLiquidityTransferred{}, + }, + wantNotReady: []*liquiditymanager.LiquidityManagerLiquidityTransferred{ + { + To: l2LiquidityManagerAddress, + Amount: big.NewInt(100), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), + }, + }, + wantReady: []*liquiditymanager.LiquidityManagerLiquidityTransferred{}, + wantReadyData: nil, + wantErr: false, + }, + { + name: "mismatched deposit finalized To address", + args: args{ + localToken: models.Address(localToken), + l1BridgeAdapterAddress: l1BridgeAdapterAddress, + l2LiquidityManagerAddress: l2LiquidityManagerAddress, + sentLogs: []*liquiditymanager.LiquidityManagerLiquidityTransferred{ + { + To: l2LiquidityManagerAddress, + Amount: big.NewInt(100), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), + }, + }, + depositFinalizedLogs: []*l2_arbitrum_gateway.L2ArbitrumGatewayDepositFinalized{ + { + L1Token: localToken, + From: l1BridgeAdapterAddress, + To: testutils.NewAddress(), // Mismatched address + Amount: big.NewInt(100), + }, + }, + receivedLogs: []*liquiditymanager.LiquidityManagerLiquidityTransferred{}, + }, + wantNotReady: []*liquiditymanager.LiquidityManagerLiquidityTransferred{ + { + To: l2LiquidityManagerAddress, + Amount: big.NewInt(100), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), + }, + }, + wantReady: []*liquiditymanager.LiquidityManagerLiquidityTransferred{}, + wantReadyData: nil, + wantErr: false, + }, + { + name: "mismatched deposit finalized amount", + args: args{ + localToken: models.Address(localToken), + l1BridgeAdapterAddress: l1BridgeAdapterAddress, + l2LiquidityManagerAddress: l2LiquidityManagerAddress, + sentLogs: []*liquiditymanager.LiquidityManagerLiquidityTransferred{ + { + To: l2LiquidityManagerAddress, + Amount: big.NewInt(100), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), + }, + }, + depositFinalizedLogs: []*l2_arbitrum_gateway.L2ArbitrumGatewayDepositFinalized{ + { + L1Token: localToken, + From: l1BridgeAdapterAddress, + To: l2LiquidityManagerAddress, + Amount: big.NewInt(200), // Mismatched amount + }, + }, + receivedLogs: []*liquiditymanager.LiquidityManagerLiquidityTransferred{}, + }, + wantNotReady: []*liquiditymanager.LiquidityManagerLiquidityTransferred{ + { + To: l2LiquidityManagerAddress, + Amount: big.NewInt(100), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), + }, + }, + wantReady: []*liquiditymanager.LiquidityManagerLiquidityTransferred{}, + wantReadyData: nil, + wantErr: false, + }, + { + name: "amount matching for dep finalized event but mismatched for received log, should never happen", + args: args{ + localToken: models.Address(localToken), + l1BridgeAdapterAddress: l1BridgeAdapterAddress, + l2LiquidityManagerAddress: l2LiquidityManagerAddress, + sentLogs: []*liquiditymanager.LiquidityManagerLiquidityTransferred{ + { + To: l2LiquidityManagerAddress, + Amount: big.NewInt(100), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), + }, + }, + depositFinalizedLogs: []*l2_arbitrum_gateway.L2ArbitrumGatewayDepositFinalized{ + { + L1Token: localToken, + From: l1BridgeAdapterAddress, + To: l2LiquidityManagerAddress, + Amount: big.NewInt(100), + }, + }, + receivedLogs: []*liquiditymanager.LiquidityManagerLiquidityTransferred{ + { + To: l2LiquidityManagerAddress, + Amount: big.NewInt(200), // Mismatched amount + BridgeSpecificData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), + }, + }, + }, + wantNotReady: nil, + wantReady: nil, + wantReadyData: nil, + wantErr: true, + }, + { + name: "mismatched bridge specific data for received event", + args: args{ + localToken: models.Address(localToken), + l1BridgeAdapterAddress: l1BridgeAdapterAddress, + l2LiquidityManagerAddress: l2LiquidityManagerAddress, + sentLogs: []*liquiditymanager.LiquidityManagerLiquidityTransferred{ + { + To: l2LiquidityManagerAddress, + Amount: big.NewInt(100), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), + }, + }, + depositFinalizedLogs: []*l2_arbitrum_gateway.L2ArbitrumGatewayDepositFinalized{ + { + L1Token: localToken, + From: l1BridgeAdapterAddress, + To: l2LiquidityManagerAddress, + Amount: big.NewInt(100), + }, + }, + receivedLogs: []*liquiditymanager.LiquidityManagerLiquidityTransferred{ + { + To: l2LiquidityManagerAddress, + Amount: big.NewInt(100), + // Mismatched bridge specific data + BridgeSpecificData: bridgetestutils.MustPackBridgeData(t, "0x1111000000000000000000000000000000000000000000000000000000000001"), + }, + }, + }, + wantNotReady: []*liquiditymanager.LiquidityManagerLiquidityTransferred{}, + wantReady: []*liquiditymanager.LiquidityManagerLiquidityTransferred{ + { + To: l2LiquidityManagerAddress, + Amount: big.NewInt(100), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), + }, + }, + wantReadyData: [][]byte{bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001")}, + wantErr: false, + }, + } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { gotNotReady, gotReady, gotReadyData, err := partitionTransfers(tt.args.localToken, tt.args.l1BridgeAdapterAddress, tt.args.l2LiquidityManagerAddress, tt.args.sentLogs, tt.args.depositFinalizedLogs, tt.args.receivedLogs) @@ -776,8 +1064,8 @@ func Test_partitionTransfers(t *testing.T) { require.Error(t, err) } else { require.NoError(t, err) - require.Equal(t, tt.wantNotReady, gotNotReady) - require.Equal(t, tt.wantReady, gotReady) + bridgetestutils.AssertLiquidityTransferredEventSlicesEqual(t, tt.wantNotReady, gotNotReady, bridgetestutils.SortByBridgeReturnData) + bridgetestutils.AssertLiquidityTransferredEventSlicesEqual(t, tt.wantReady, gotReady, bridgetestutils.SortByBridgeReturnData) require.Equal(t, tt.wantReadyData, gotReadyData) } }) @@ -1089,6 +1377,7 @@ func Test_l1ToL2Bridge_toPendingTransfers(t *testing.T) { Date: time.Time{}, BridgeData: []byte{}, Stage: 1, + NativeBridgeFee: ubig.NewI(0), }, Status: models.TransferStatusNotReady, ID: fmt.Sprintf("%s-%d", common.HexToHash("0x1"), 1), @@ -1105,6 +1394,7 @@ func Test_l1ToL2Bridge_toPendingTransfers(t *testing.T) { Date: time.Time{}, BridgeData: []byte{1, 2, 3}, Stage: 2, + NativeBridgeFee: ubig.NewI(0), }, Status: models.TransferStatusReady, ID: fmt.Sprintf("%s-%d", common.HexToHash("0x2"), 2), diff --git a/core/services/ocr2/plugins/liquiditymanager/bridge/arb/l2_to_l1.go b/core/services/ocr2/plugins/liquiditymanager/bridge/arb/l2_to_l1.go index 6263603436..f71a3bd40a 100644 --- a/core/services/ocr2/plugins/liquiditymanager/bridge/arb/l2_to_l1.go +++ b/core/services/ocr2/plugins/liquiditymanager/bridge/arb/l2_to_l1.go @@ -54,6 +54,7 @@ type l2ToL1Bridge struct { } func NewL2ToL1Bridge( + ctx context.Context, lggr logger.Logger, localSelector, remoteSelector models.NetworkSelector, @@ -81,8 +82,6 @@ func NewL2ToL1Bridge( remoteChain.Name, "", ) - // FIXME Makram fix the context plax - ctx := context.Background() err := l2LogPoller.RegisterFilter( ctx, logpoller.Filter{ @@ -339,8 +338,9 @@ func (l *l2ToL1Bridge) toPendingTransfers( TxHash: transfer.Raw.TxHash, LogIndex: int64(transfer.Raw.Index), }].BlockTimestamp, - BridgeData: readyData[i], // finalization data for withdrawals that are ready - Stage: bridgecommon.StageFinalizeReady, + BridgeData: readyData[i], // finalization data for withdrawals that are ready + Stage: bridgecommon.StageFinalizeReady, + NativeBridgeFee: ubig.NewI(0), }, Status: models.TransferStatusReady, ID: fmt.Sprintf("%s-%d", transfer.Raw.TxHash.Hex(), transfer.Raw.Index), @@ -360,8 +360,9 @@ func (l *l2ToL1Bridge) toPendingTransfers( TxHash: transfer.Raw.TxHash, LogIndex: int64(transfer.Raw.Index), }].BlockTimestamp, - BridgeData: []byte{}, // No data since its not ready - Stage: bridgecommon.StageRebalanceConfirmed, + BridgeData: []byte{}, // No data since its not ready + Stage: bridgecommon.StageRebalanceConfirmed, + NativeBridgeFee: ubig.NewI(0), }, Status: models.TransferStatusNotReady, ID: fmt.Sprintf("%s-%d", transfer.Raw.TxHash.Hex(), transfer.Raw.Index), diff --git a/core/services/ocr2/plugins/liquiditymanager/bridge/bridge.go b/core/services/ocr2/plugins/liquiditymanager/bridge/bridge.go index c6fb25d3d1..24af25c48e 100644 --- a/core/services/ocr2/plugins/liquiditymanager/bridge/bridge.go +++ b/core/services/ocr2/plugins/liquiditymanager/bridge/bridge.go @@ -60,7 +60,8 @@ type Bridge interface { //go:generate mockery --name Factory --output ./mocks --filename bridge_factory_mock.go --case=underscore type Factory interface { - NewBridge(source, dest models.NetworkSelector) (Bridge, error) + NewBridge(ctx context.Context, source, dest models.NetworkSelector) (Bridge, error) + GetBridge(source, dest models.NetworkSelector) (Bridge, error) } type Opt func(c *factory) @@ -106,7 +107,7 @@ func WithEvmDep( } } -func (f *factory) NewBridge(source, dest models.NetworkSelector) (Bridge, error) { +func (f *factory) NewBridge(ctx context.Context, source, dest models.NetworkSelector) (Bridge, error) { if source == dest { return nil, fmt.Errorf("no bridge between the same network and itself: %d", source) } @@ -114,12 +115,12 @@ func (f *factory) NewBridge(source, dest models.NetworkSelector) (Bridge, error) bridge, err := f.GetBridge(source, dest) if errors.Is(err, ErrBridgeNotFound) { f.lggr.Infow("Bridge not found, initializing new bridge", "source", source, "dest", dest) - return f.initBridge(source, dest) + return f.initBridge(ctx, source, dest) } return bridge, err } -func (f *factory) initBridge(source, dest models.NetworkSelector) (Bridge, error) { +func (f *factory) initBridge(ctx context.Context, source, dest models.NetworkSelector) (Bridge, error) { f.lggr.Debugw("Initializing bridge", "source", source, "dest", dest) var bridge Bridge @@ -155,6 +156,7 @@ func (f *factory) initBridge(source, dest models.NetworkSelector) (Bridge, error "l2BridgeAdapter", l2BridgeAdapter, ) bridge, err = arb.NewL2ToL1Bridge( + ctx, f.lggr, source, dest, @@ -198,6 +200,7 @@ func (f *factory) initBridge(source, dest models.NetworkSelector) (Bridge, error "l2BridgeAdapter", l2BridgeAdapter, ) bridge, err = opstack.NewL2ToL1Bridge( + ctx, f.lggr, source, dest, @@ -245,6 +248,7 @@ func (f *factory) initBridge(source, dest models.NetworkSelector) (Bridge, error "l1BridgeAdapter", l1BridgeAdapter, ) bridge, err = arb.NewL1ToL2Bridge( + ctx, f.lggr, source, dest, @@ -267,6 +271,7 @@ func (f *factory) initBridge(source, dest models.NetworkSelector) (Bridge, error "l1BridgeAdapter", l1BridgeAdapter, ) bridge, err = opstack.NewL1ToL2Bridge( + ctx, f.lggr, source, dest, @@ -310,6 +315,7 @@ func (f *factory) initBridge(source, dest models.NetworkSelector) (Bridge, error return nil, fmt.Errorf("bridge adapter not found for dest selector %d in deps for selector %d", dest, source) } bridge, err = testonlybridge.New( + ctx, source, dest, sourceDeps.liquidityManagerAddress, diff --git a/core/services/ocr2/plugins/liquiditymanager/bridge/mocks/bridge_factory_mock.go b/core/services/ocr2/plugins/liquiditymanager/bridge/mocks/bridge_factory_mock.go index ca0781b149..53f1bf86cd 100644 --- a/core/services/ocr2/plugins/liquiditymanager/bridge/mocks/bridge_factory_mock.go +++ b/core/services/ocr2/plugins/liquiditymanager/bridge/mocks/bridge_factory_mock.go @@ -3,7 +3,10 @@ package mocks import ( + context "context" + bridge "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/bridge" + mock "github.com/stretchr/testify/mock" models "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/models" @@ -14,12 +17,12 @@ type Factory struct { mock.Mock } -// NewBridge provides a mock function with given fields: source, dest -func (_m *Factory) NewBridge(source models.NetworkSelector, dest models.NetworkSelector) (bridge.Bridge, error) { +// GetBridge provides a mock function with given fields: source, dest +func (_m *Factory) GetBridge(source models.NetworkSelector, dest models.NetworkSelector) (bridge.Bridge, error) { ret := _m.Called(source, dest) if len(ret) == 0 { - panic("no return value specified for NewBridge") + panic("no return value specified for GetBridge") } var r0 bridge.Bridge @@ -44,6 +47,36 @@ func (_m *Factory) NewBridge(source models.NetworkSelector, dest models.NetworkS return r0, r1 } +// NewBridge provides a mock function with given fields: ctx, source, dest +func (_m *Factory) NewBridge(ctx context.Context, source models.NetworkSelector, dest models.NetworkSelector) (bridge.Bridge, error) { + ret := _m.Called(ctx, source, dest) + + if len(ret) == 0 { + panic("no return value specified for NewBridge") + } + + var r0 bridge.Bridge + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, models.NetworkSelector, models.NetworkSelector) (bridge.Bridge, error)); ok { + return rf(ctx, source, dest) + } + if rf, ok := ret.Get(0).(func(context.Context, models.NetworkSelector, models.NetworkSelector) bridge.Bridge); ok { + r0 = rf(ctx, source, dest) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(bridge.Bridge) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, models.NetworkSelector, models.NetworkSelector) error); ok { + r1 = rf(ctx, source, dest) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // NewFactory creates a new instance of Factory. 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 NewFactory(t interface { diff --git a/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/common_test.go b/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/common_test.go index 38cd734ccb..65f7670bdd 100644 --- a/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/common_test.go +++ b/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/common_test.go @@ -9,6 +9,8 @@ import ( chainsel "github.com/smartcontractkit/chain-selectors" "github.com/stretchr/testify/require" + bridgetestutils "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/bridge/testutils" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/liquiditymanager/generated/liquiditymanager" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/liquiditymanager/generated/optimism_standard_bridge" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/abihelpers" @@ -113,7 +115,7 @@ func Test_filterExecuted(t *testing.T) { ToChainSelector: l2ChainSelector, To: l2LiquidityManagerAddress, Amount: big.NewInt(1), - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), BridgeSpecificData: []byte{}, }, }, @@ -125,7 +127,7 @@ func Test_filterExecuted(t *testing.T) { ToChainSelector: l2ChainSelector, To: l2LiquidityManagerAddress, Amount: big.NewInt(1), - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), BridgeSpecificData: []byte{}, }, }, @@ -141,7 +143,7 @@ func Test_filterExecuted(t *testing.T) { To: l2LiquidityManagerAddress, Amount: big.NewInt(1), // nonce = 1 - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), BridgeSpecificData: []byte{}, }, }, @@ -153,7 +155,7 @@ func Test_filterExecuted(t *testing.T) { Amount: big.NewInt(1), BridgeReturnData: []byte{}, // nonce = 2 - BridgeSpecificData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), + BridgeSpecificData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), }}, }, wantReady: []*liquiditymanager.LiquidityManagerLiquidityTransferred{ @@ -163,7 +165,7 @@ func Test_filterExecuted(t *testing.T) { To: l2LiquidityManagerAddress, Amount: big.NewInt(1), // nonce = 1 - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), BridgeSpecificData: []byte{}, }, }, @@ -179,7 +181,7 @@ func Test_filterExecuted(t *testing.T) { To: l2LiquidityManagerAddress, Amount: big.NewInt(1), // nonce = 1 - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), BridgeSpecificData: []byte{}, }, }, @@ -191,7 +193,7 @@ func Test_filterExecuted(t *testing.T) { Amount: big.NewInt(1), BridgeReturnData: []byte{}, // nonce = 1 - BridgeSpecificData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), + BridgeSpecificData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), }}, }, wantReady: []*liquiditymanager.LiquidityManagerLiquidityTransferred{}, @@ -207,7 +209,7 @@ func Test_filterExecuted(t *testing.T) { To: l2LiquidityManagerAddress, Amount: big.NewInt(1), // nonce = 1, is executed - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), BridgeSpecificData: []byte{}, }, { @@ -216,7 +218,7 @@ func Test_filterExecuted(t *testing.T) { To: l2LiquidityManagerAddress, Amount: big.NewInt(1), // nonce = 2, not executed - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), BridgeSpecificData: []byte{}, }, { @@ -225,7 +227,7 @@ func Test_filterExecuted(t *testing.T) { To: l2LiquidityManagerAddress, Amount: big.NewInt(1), // nonce = 3, is executed - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000003"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000003"), BridgeSpecificData: []byte{}, }, }, @@ -237,7 +239,7 @@ func Test_filterExecuted(t *testing.T) { Amount: big.NewInt(1), BridgeReturnData: []byte{}, // nonce = 1 - BridgeSpecificData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), + BridgeSpecificData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), }, { FromChainSelector: l1ChainSelector, @@ -246,7 +248,7 @@ func Test_filterExecuted(t *testing.T) { Amount: big.NewInt(1), BridgeReturnData: []byte{}, // nonce = 3 - BridgeSpecificData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000003"), + BridgeSpecificData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000003"), }, }, }, @@ -258,7 +260,7 @@ func Test_filterExecuted(t *testing.T) { To: l2LiquidityManagerAddress, Amount: big.NewInt(1), // nonce = 2 - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), BridgeSpecificData: []byte{}, }, }, @@ -272,7 +274,7 @@ func Test_filterExecuted(t *testing.T) { require.Error(t, err) } else { require.NoError(t, err) - assertLiquidityTransferredEventSlicesEqual(t, tt.wantReady, gotReady, sortByBridgeReturnData) + bridgetestutils.AssertLiquidityTransferredEventSlicesEqual(t, tt.wantReady, gotReady, bridgetestutils.SortByBridgeReturnData) } }) } diff --git a/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/l1_to_l2.go b/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/l1_to_l2.go index cb8c2b8a4e..e9cf63c98a 100644 --- a/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/l1_to_l2.go +++ b/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/l1_to_l2.go @@ -5,7 +5,6 @@ import ( "database/sql" "errors" "fmt" - "log" "math/big" "time" @@ -48,6 +47,7 @@ type l1ToL2Bridge struct { } func NewL1ToL2Bridge( + ctx context.Context, lggr logger.Logger, localSelector, remoteSelector models.NetworkSelector, @@ -78,8 +78,6 @@ func NewL1ToL2Bridge( "", ) - // TODO: FIXME pass valid context - ctx := context.Background() err := l1LogPoller.RegisterFilter(ctx, logpoller.Filter{ Addresses: []common.Address{l1LiquidityManagerAddress}, // emits LiquidityTransferred Name: l1FilterName, @@ -255,18 +253,18 @@ func (l *l1ToL2Bridge) GetBridgePayloadAndFee( // If we're sending WETH, the bridge adapter unwraps it and calls depositETHTo on the native bridge DepositETHToFunction, transfer.Receiver, // 'to' - 0, // 'l2Gas': hardcoded to 0 in the OptimismL1BridgeAdapter contract + uint32(0), // 'l2Gas': hardcoded to 0 in the OptimismL1BridgeAdapter contract transfer.BridgeData, // 'data' ) if err != nil { - log.Fatalf("Failed to pack depositETHTo function call: %v", err) + return nil, nil, fmt.Errorf("failed to pack depositETHTo function call: %w", err) } // Estimate gas needed for the depositETHTo call issued from the L1 Bridge Adapter l1StandardBridgeAddress := l.l1StandardBridge.Address() gasPrice, err := l.l1Client.SuggestGasPrice(ctx) if err != nil { - log.Fatalf("Failed to get suggested gas price: %v", err) + return nil, nil, fmt.Errorf("failed to get suggested gas price: %w", err) } gasLimit, err := l.l1Client.EstimateGas(ctx, ethereum.CallMsg{ From: l.l1BridgeAdapter.Address(), @@ -275,7 +273,7 @@ func (l *l1ToL2Bridge) GetBridgePayloadAndFee( GasPrice: gasPrice, }) if err != nil { - log.Fatalf("Failed to estimate gas: %v", err) + return nil, nil, fmt.Errorf("failed to estimate gas: %w", err) } // Scale gas limit by recommended 20% buffer to account for gas burned for L2 txn: @@ -497,8 +495,9 @@ func (l *l1ToL2Bridge) toPendingTransfers( TxHash: transfer.Raw.TxHash, LogIndex: int64(transfer.Raw.Index), }].BlockTimestamp, - BridgeData: transfer.BridgeReturnData, // unique nonce from the OP Bridge Adapter - Stage: bridgecommon.StageRebalanceConfirmed, + BridgeData: transfer.BridgeReturnData, // unique nonce from the OP Bridge Adapter + Stage: bridgecommon.StageRebalanceConfirmed, + NativeBridgeFee: ubig.NewI(0), }, Status: models.TransferStatusNotReady, ID: fmt.Sprintf("%s-%d", transfer.Raw.TxHash.Hex(), transfer.Raw.Index), @@ -518,8 +517,9 @@ func (l *l1ToL2Bridge) toPendingTransfers( TxHash: transfer.Raw.TxHash, LogIndex: int64(transfer.Raw.Index), }].BlockTimestamp, - BridgeData: transfer.BridgeReturnData, // unique nonce from the OP Bridge Adapter - Stage: bridgecommon.StageFinalizeReady, + BridgeData: transfer.BridgeReturnData, // unique nonce from the OP Bridge Adapter + Stage: bridgecommon.StageFinalizeReady, + NativeBridgeFee: ubig.NewI(0), }, Status: models.TransferStatusReady, // ready == finalized for L1 -> L2 transfers due to auto-finalization by the native bridge ID: fmt.Sprintf("%s-%d", transfer.Raw.TxHash.Hex(), transfer.Raw.Index), diff --git a/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/l1_to_l2_test.go b/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/l1_to_l2_test.go index be4c6419cc..c689af5b76 100644 --- a/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/l1_to_l2_test.go +++ b/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/l1_to_l2_test.go @@ -16,6 +16,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/liquiditymanager/generated/optimism_standard_bridge" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/abiutils" + bridgetestutils "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/bridge/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/models" ) @@ -43,9 +44,9 @@ func Test_l1ToL2Bridge_QuorumizedBridgePayload(t *testing.T) { "non-matching nonces/payloads", args{ [][]byte{ - mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), - mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), - mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000003"), + bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), + bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), + bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000003"), }, 1, }, @@ -56,25 +57,25 @@ func Test_l1ToL2Bridge_QuorumizedBridgePayload(t *testing.T) { "happy path", args{ [][]byte{ - mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), - mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), - mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), + bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), + bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), + bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), }, 1, }, - mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), + bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), false, }, { "happy path, fewer payloads", args{ [][]byte{ - mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), - mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), + bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), + bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), }, 1, }, - mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), + bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), false, }, } @@ -148,7 +149,7 @@ func Test_partitionTransfers(t *testing.T) { ToChainSelector: l2ChainSelector, To: l2LiquidityManagerAddress, Amount: big.NewInt(1), - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), BridgeSpecificData: []byte{}, }, // This one is ready (present in sentLogs and finalized logs) @@ -157,7 +158,7 @@ func Test_partitionTransfers(t *testing.T) { ToChainSelector: l2ChainSelector, To: l2LiquidityManagerAddress, Amount: big.NewInt(1), - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), BridgeSpecificData: []byte{}, }, // This one is done/already received (present in sentLogs, finalized logs, and receivedLogs), should not be included in any output slices @@ -166,7 +167,7 @@ func Test_partitionTransfers(t *testing.T) { ToChainSelector: l2ChainSelector, To: l2LiquidityManagerAddress, Amount: big.NewInt(1), - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000003"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000003"), BridgeSpecificData: []byte{}, }, }, @@ -178,7 +179,7 @@ func Test_partitionTransfers(t *testing.T) { From: l1BridgeAdapterAddress, To: l2LiquidityManagerAddress, Amount: big.NewInt(1), - ExtraData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), + ExtraData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), }, // This one is already done (present in sentLogs, finalized logs, and receivedLogs) { @@ -187,7 +188,7 @@ func Test_partitionTransfers(t *testing.T) { From: l1BridgeAdapterAddress, To: l2LiquidityManagerAddress, Amount: big.NewInt(1), - ExtraData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000003"), + ExtraData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000003"), }, // This one is missing (not present in sentLogs) { @@ -196,7 +197,7 @@ func Test_partitionTransfers(t *testing.T) { From: l1BridgeAdapterAddress, To: l2LiquidityManagerAddress, Amount: big.NewInt(1), - ExtraData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000065"), + ExtraData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000065"), }, }, receivedLogs: []*liquiditymanager.LiquidityManagerLiquidityTransferred{ @@ -206,7 +207,7 @@ func Test_partitionTransfers(t *testing.T) { To: l2LiquidityManagerAddress, Amount: big.NewInt(1), BridgeReturnData: []byte{}, - BridgeSpecificData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000003"), + BridgeSpecificData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000003"), }, }, }, @@ -217,7 +218,7 @@ func Test_partitionTransfers(t *testing.T) { ToChainSelector: l2ChainSelector, To: l2LiquidityManagerAddress, Amount: big.NewInt(1), - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), BridgeSpecificData: []byte{}, }, }, @@ -228,7 +229,7 @@ func Test_partitionTransfers(t *testing.T) { ToChainSelector: l2ChainSelector, To: l2LiquidityManagerAddress, Amount: big.NewInt(1), - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), BridgeSpecificData: []byte{}, }, }, @@ -240,7 +241,7 @@ func Test_partitionTransfers(t *testing.T) { From: l1BridgeAdapterAddress, To: l2LiquidityManagerAddress, Amount: big.NewInt(1), - ExtraData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000065"), + ExtraData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000065"), }, }, wantErr: false, @@ -258,7 +259,7 @@ func Test_partitionTransfers(t *testing.T) { ToChainSelector: l2ChainSelector, To: l2LiquidityManagerAddress, Amount: big.NewInt(1), - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), BridgeSpecificData: []byte{}, }, // Mismatched finalized event 'to' field @@ -267,7 +268,7 @@ func Test_partitionTransfers(t *testing.T) { ToChainSelector: l2ChainSelector, To: l2LiquidityManagerAddress, Amount: big.NewInt(1), - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), BridgeSpecificData: []byte{}, }, // Mismatched finalized event 'remote_token' field @@ -276,7 +277,7 @@ func Test_partitionTransfers(t *testing.T) { ToChainSelector: l2ChainSelector, To: l2LiquidityManagerAddress, Amount: big.NewInt(1), - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000003"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000003"), BridgeSpecificData: []byte{}, }, }, @@ -288,7 +289,7 @@ func Test_partitionTransfers(t *testing.T) { From: common.HexToAddress("0x123"), To: l2LiquidityManagerAddress, Amount: big.NewInt(1), - ExtraData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), + ExtraData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), }, // Mismatched finalized event 'to' field { @@ -297,7 +298,7 @@ func Test_partitionTransfers(t *testing.T) { From: l1BridgeAdapterAddress, To: common.HexToAddress("0x456"), Amount: big.NewInt(1), - ExtraData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), + ExtraData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), }, // Mismatched finalized event 'remote_token' field { @@ -306,7 +307,7 @@ func Test_partitionTransfers(t *testing.T) { From: l1BridgeAdapterAddress, To: l2LiquidityManagerAddress, Amount: big.NewInt(1), - ExtraData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000003"), + ExtraData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000003"), }, }, receivedLogs: []*liquiditymanager.LiquidityManagerLiquidityTransferred{}, @@ -318,7 +319,7 @@ func Test_partitionTransfers(t *testing.T) { ToChainSelector: l2ChainSelector, To: l2LiquidityManagerAddress, Amount: big.NewInt(1), - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000001"), BridgeSpecificData: []byte{}, }, // Mismatched finalized event 'to' field @@ -327,7 +328,7 @@ func Test_partitionTransfers(t *testing.T) { ToChainSelector: l2ChainSelector, To: l2LiquidityManagerAddress, Amount: big.NewInt(1), - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000002"), BridgeSpecificData: []byte{}, }, // Mismatched finalized event 'remote_token' field @@ -336,7 +337,7 @@ func Test_partitionTransfers(t *testing.T) { ToChainSelector: l2ChainSelector, To: l2LiquidityManagerAddress, Amount: big.NewInt(1), - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000003"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000003"), BridgeSpecificData: []byte{}, }}, wantReady: nil, @@ -351,8 +352,8 @@ func Test_partitionTransfers(t *testing.T) { require.Error(t, err) } else { require.NoError(t, err) - assertLiquidityTransferredEventSlicesEqual(t, tt.wantNotReady, gotNotReady, sortByBridgeReturnData) - assertLiquidityTransferredEventSlicesEqual(t, tt.wantReady, gotReady, sortByBridgeReturnData) + bridgetestutils.AssertLiquidityTransferredEventSlicesEqual(t, tt.wantNotReady, gotNotReady, bridgetestutils.SortByBridgeReturnData) + bridgetestutils.AssertLiquidityTransferredEventSlicesEqual(t, tt.wantReady, gotReady, bridgetestutils.SortByBridgeReturnData) assert.Equal(t, tt.wantMissingSent, gotMissingSent) } }) diff --git a/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/l2_to_l1.go b/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/l2_to_l1.go index 5a70619e66..ea04652e31 100644 --- a/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/l2_to_l1.go +++ b/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/l2_to_l1.go @@ -41,6 +41,7 @@ type l2ToL1Bridge struct { } func NewL2ToL1Bridge( + ctx context.Context, lggr logger.Logger, localSelector, remoteSelector models.NetworkSelector, @@ -68,8 +69,6 @@ func NewL2ToL1Bridge( remoteChain.Name, "", ) - // TODO (ogtownsend): pass context from above - ctx := context.Background() err := l2LogPoller.RegisterFilter( ctx, logpoller.Filter{ @@ -215,6 +214,10 @@ func (l *l2ToL1Bridge) GetTransfers( if len(missingSent) > 0 { l.lggr.Errorw("missing sent logs", "missingSent", missingSent) } + l.lggr.Infow("partitioned withdrawal transfers", + "needsToBeProven", needsToBeProven, + "needsToBeFinalized", needsToBeFinalized, + ) return l.toPendingTransfers(ctx, lggr, localToken, remoteToken, needsToBeProven, needsToBeFinalized, parsedToLp) } @@ -382,8 +385,9 @@ func (l *l2ToL1Bridge) toPendingTransfers( TxHash: transfer.Raw.TxHash, LogIndex: int64(transfer.Raw.Index), }].BlockTimestamp, - BridgeData: provePayload, - Stage: bridgecommon.StageRebalanceConfirmed, + BridgeData: provePayload, + Stage: bridgecommon.StageRebalanceConfirmed, + NativeBridgeFee: ubig.NewI(0), }, // Both "prove" and "finalize" are handled by the "finalizeWithdrawalERC20" call in the // OptimismL1BridgeAdapter, therefore we set the status to "Ready" @@ -409,8 +413,9 @@ func (l *l2ToL1Bridge) toPendingTransfers( TxHash: transfer.Raw.TxHash, LogIndex: int64(transfer.Raw.Index), }].BlockTimestamp, - BridgeData: finalizePayload, - Stage: bridgecommon.StageFinalizeReady, + BridgeData: finalizePayload, + Stage: bridgecommon.StageFinalizeReady, + NativeBridgeFee: ubig.NewI(0), }, Status: models.TransferStatusReady, // Ready to be finalized ID: fmt.Sprintf("%s-%d", transfer.Raw.TxHash.Hex(), transfer.Raw.Index), diff --git a/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/l2_to_l1_test.go b/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/l2_to_l1_test.go index d001eb2029..e6b0968d63 100644 --- a/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/l2_to_l1_test.go +++ b/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/l2_to_l1_test.go @@ -14,6 +14,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/liquiditymanager/generated/liquiditymanager" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" + bridgetestutils "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/bridge/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/models" "github.com/stretchr/testify/mock" @@ -64,7 +65,7 @@ func Test_L2ToL1Bridge_partitionTransfers(t *testing.T) { ToChainSelector: l1ChainSelector, To: l1LiquidityManagerAddress, Amount: big.NewInt(4), - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000004"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000004"), BridgeSpecificData: []byte{}, }, // This one needs to be finalized @@ -73,7 +74,7 @@ func Test_L2ToL1Bridge_partitionTransfers(t *testing.T) { ToChainSelector: l1ChainSelector, To: l1LiquidityManagerAddress, Amount: big.NewInt(7), - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000005"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000005"), BridgeSpecificData: []byte{}, }, // This one is done/already received (present in sent logs, proven logs, and received logs), should not be included in any output @@ -82,7 +83,7 @@ func Test_L2ToL1Bridge_partitionTransfers(t *testing.T) { ToChainSelector: l1ChainSelector, To: l1LiquidityManagerAddress, Amount: big.NewInt(10), - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000006"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000006"), BridgeSpecificData: []byte{}, }, }, @@ -92,20 +93,20 @@ func Test_L2ToL1Bridge_partitionTransfers(t *testing.T) { OcrSeqNum: uint64(1), RemoteChainSelector: l2ChainSelector, // prove logs from the 0x0...5 nonce (amount=7) - BridgeSpecificData: mustConvertHexBridgeSpecificDataToBytes(t, "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000bc0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000001b8c0000000000000000000000000000000000000000000000000000000000000000debdfbead9da4e4e96744bb44a697fb9b5db11acd7bd6a2c78d58face684206970c451d3ddd756858ee282bcec7c3923065ba3b2988e91949025e6b4e77487de332e3e384bb4ce3a6fc7978d0dfc5945341c1473744ad3a41635fbd1fb4b9c6100000000000000000000000000000000000000000000000000000000000003e00001000000000000000000000000000000000000000000000000000000000dd7000000000000000000000000420000000000000000000000000000000000000700000000000000000000000058cc85b8d04ea49cc6dbd3cbffd00b4b8d6cb3ef0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004698800000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000204d764ad0b0001000000000000000000000000000000000000000000000000000000000d590000000000000000000000004200000000000000000000000000000000000010000000000000000000000000fbb0621e0b23b5478b630bd55a5f21f67730b0f10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001040166a07a0000000000000000000000005589bb8228c07c4e15558875faf2b859f678d129000000000000000000000000d08a2917653d4e460893203471f0000826fb4034000000000000000000000000fb023f4edb2aa1ebbcc07970f9c0541071713445000000000000000000000000e87704d3f0dd040fd2a49c3606043dd6fc05bf33000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000002e0000000000000000000000000000000000000000000000000000000000000052000000000000000000000000000000000000000000000000000000000000006a000000000000000000000000000000000000000000000000000000000000007400000000000000000000000000000000000000000000000000000000000000214f90211a0c37d9a90a47f430d6d54dabcbd2f364fdec4bbefa75aa69eab8f3cf50026de73a0a399109fd13eb2ebb25f5382c7bbe1a3d4c6433968ca9f19b78a0871e0cbf712a025225c15784b8550f2fb4d8257db8a352453c05b81013dc4a8f5fdfde94b2043a0b1fdf531766da35c16cae24330ec921abe5f7f950396fec11deea83db82346a4a0117a1e2d227b113cddb855f2af8fbed60661d0cb71e2ac0474f405ad359232f8a08a05951056d4a4e2e4ca1109d9c345aeaaf28f9be4a2a810b5652e69518ca609a02900527859b85e1008d498194a583a3effad975638925b6a1c6a8ff38ae2e804a0d466461fe5b2004b72cc68f4013ea3d2e6fc49b0b5598ff091724ed3a86fc2bfa0863849da3e275da0a24c159f0ec0c2bb2c1024fd254492f6a7f3abefff96a77ea0ed4a2b060237d351dd851375674b6dfb3d7a864281b1105b6a602c8f989962fda07e250d776e741b434bffd936ba18f8ea9c9f359672e80d93d3128bf060605ec1a08ff7943dae97c26473ac8062323fe14a28b33a892c710ef769a7ddbd1d13b2d8a0bb62fef18ac02456958d40d12353c27db1aca9b90edfe8a4de910e0e8cf27d9ba088e3c60cbf0b6f0ad69730ad3bf23825d8f9f8037544069669dfc3ae3a39f826a02cfaadf653fc6cc9bc182e8ae4a6f7736ab1b01363444aa65e8c1182d4fd8e7ea08a6919cd1b827d7e346cd9f5aa269c01e5179e3a79e9e050fcb1c34028d236e8800000000000000000000000000000000000000000000000000000000000000000000000000000000000000214f90211a0d83a5b715cffa9ff815a9cbede60d80e380c0d8b3f8433c1cfd9f9332ca96fcfa08f3d6be3e11f4a8d26b7b95f526c5997db678b7ade30fc4476f3b62513f636a0a00bd2482ce34a4dea248ad239a79f04082a73549cf115a2f9ef8b59f3a0ab32bea00bb41ca6732f1a882e39fd10cd1e46dcc524ad968bc19d35c20efcbc4d53844aa0d6bb21815ed32081c3987cb8d7f4b82971e856f10cf016f0f200c7481bc8e72da05eb07b5cd5ac9db7b8b112f21b68c911bbc8267bfaf715687a3c38fa520e6dd5a0651a7362fdc70b0dc0482f18f06aeb22c8b0a6025415680989f6c1fe8abad4f7a0cd2f2124bdc93e740643df5e0fd6c44c8d2fbb160cb31ae1379124af6185b3f0a0188c44d5164eff07559f80590db1b7b71dd6bd2caa8535ebaa917beb51777016a0838fb57029d1dcd8e8bdffe2c415631f6117d512cd1218754c1176ee1cf9e234a077a2600394a2b1ff56a36442b788589a4ebf2f72754b70f21a137c3a8a9a4593a01314e5e6eebd982c60dcc670e1e33f99304aee763578785b10ec7633c2d17c84a0d9b11242125a529dc046bec59277320e1ef2f73b83d4189afe0ab2a5e1db95efa0b40124e9a39f63fcbd93f2f2143ff5b2b9f336d5653dc55debded322cb555c44a0fd4817897049284c3fb2395c57c53e6254820a7c466e37ec409f93b5391db355a05dcf85c54422dd72a6d74b4f730a156290b290720164bd81f516f2f1118392d4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000154f90151a01f1a153520d71c7a9dee923b4f1a30c09f49f57e930d62072b80aa99460d9440a070d2af65cf4b7972e7bf9443f0fe82ff29225a48071ac6ebe1fbc0ae49356642a0943b13b0b2608c1e772c599809292c4079c16d90f9f1e7d69f8925102d8c1feba0593648a0c1d2c819da4fc25f8c38beac96bc8b25533c7581e2117c911254d8f48080a0a45d531264251deba88eb85c03e1826daddbb0b0bce37165e71d9236af892fc08080a04e425050083943d27aa01fdb706b5715693c18ed9ff8ef050fcd0c2ea292687aa09b9a3d00ec6310bd2f5714e5c60c7c597128add8087e18986dc18d716c6d011780a0fcf815ea12a633987173946bf59a53d93c461c71e47b3eee7cb07885027288f4a093b3dc885d64ad3421e67bf396530d92268a6ea17fe536e75f3d45ff2d6f034b80a0d3f01d4772d6326d75fad188647163487f5c5df4b809e33fffe344262fcaa398800000000000000000000000000000000000000000000000000000000000000000000000000000000000000073f8718080808080808080a0bb626d1fc2d928384c17de477f7b7170c65267b016976bc21305ebf39fc1543ca0f3ea5fd76e00ddbf83625e203d99441c86c44557e86896aad4ec87a4683bdf618080a0afebeaa9674e4a195459974044cf4da821d72aff3654d6d70b14ce90075c13f980808080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022e19f20aeeb5205bebd523c696a4b099033965d1bcb4af41ce5f3070145a8debd6601000000000000000000000000000000000000000000000000000000000000"), + BridgeSpecificData: bridgetestutils.MustConvertHexBridgeDataToBytes(t, "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000bc0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000001b8c0000000000000000000000000000000000000000000000000000000000000000debdfbead9da4e4e96744bb44a697fb9b5db11acd7bd6a2c78d58face684206970c451d3ddd756858ee282bcec7c3923065ba3b2988e91949025e6b4e77487de332e3e384bb4ce3a6fc7978d0dfc5945341c1473744ad3a41635fbd1fb4b9c6100000000000000000000000000000000000000000000000000000000000003e00001000000000000000000000000000000000000000000000000000000000dd7000000000000000000000000420000000000000000000000000000000000000700000000000000000000000058cc85b8d04ea49cc6dbd3cbffd00b4b8d6cb3ef0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004698800000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000204d764ad0b0001000000000000000000000000000000000000000000000000000000000d590000000000000000000000004200000000000000000000000000000000000010000000000000000000000000fbb0621e0b23b5478b630bd55a5f21f67730b0f10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001040166a07a0000000000000000000000005589bb8228c07c4e15558875faf2b859f678d129000000000000000000000000d08a2917653d4e460893203471f0000826fb4034000000000000000000000000fb023f4edb2aa1ebbcc07970f9c0541071713445000000000000000000000000e87704d3f0dd040fd2a49c3606043dd6fc05bf33000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000002e0000000000000000000000000000000000000000000000000000000000000052000000000000000000000000000000000000000000000000000000000000006a000000000000000000000000000000000000000000000000000000000000007400000000000000000000000000000000000000000000000000000000000000214f90211a0c37d9a90a47f430d6d54dabcbd2f364fdec4bbefa75aa69eab8f3cf50026de73a0a399109fd13eb2ebb25f5382c7bbe1a3d4c6433968ca9f19b78a0871e0cbf712a025225c15784b8550f2fb4d8257db8a352453c05b81013dc4a8f5fdfde94b2043a0b1fdf531766da35c16cae24330ec921abe5f7f950396fec11deea83db82346a4a0117a1e2d227b113cddb855f2af8fbed60661d0cb71e2ac0474f405ad359232f8a08a05951056d4a4e2e4ca1109d9c345aeaaf28f9be4a2a810b5652e69518ca609a02900527859b85e1008d498194a583a3effad975638925b6a1c6a8ff38ae2e804a0d466461fe5b2004b72cc68f4013ea3d2e6fc49b0b5598ff091724ed3a86fc2bfa0863849da3e275da0a24c159f0ec0c2bb2c1024fd254492f6a7f3abefff96a77ea0ed4a2b060237d351dd851375674b6dfb3d7a864281b1105b6a602c8f989962fda07e250d776e741b434bffd936ba18f8ea9c9f359672e80d93d3128bf060605ec1a08ff7943dae97c26473ac8062323fe14a28b33a892c710ef769a7ddbd1d13b2d8a0bb62fef18ac02456958d40d12353c27db1aca9b90edfe8a4de910e0e8cf27d9ba088e3c60cbf0b6f0ad69730ad3bf23825d8f9f8037544069669dfc3ae3a39f826a02cfaadf653fc6cc9bc182e8ae4a6f7736ab1b01363444aa65e8c1182d4fd8e7ea08a6919cd1b827d7e346cd9f5aa269c01e5179e3a79e9e050fcb1c34028d236e8800000000000000000000000000000000000000000000000000000000000000000000000000000000000000214f90211a0d83a5b715cffa9ff815a9cbede60d80e380c0d8b3f8433c1cfd9f9332ca96fcfa08f3d6be3e11f4a8d26b7b95f526c5997db678b7ade30fc4476f3b62513f636a0a00bd2482ce34a4dea248ad239a79f04082a73549cf115a2f9ef8b59f3a0ab32bea00bb41ca6732f1a882e39fd10cd1e46dcc524ad968bc19d35c20efcbc4d53844aa0d6bb21815ed32081c3987cb8d7f4b82971e856f10cf016f0f200c7481bc8e72da05eb07b5cd5ac9db7b8b112f21b68c911bbc8267bfaf715687a3c38fa520e6dd5a0651a7362fdc70b0dc0482f18f06aeb22c8b0a6025415680989f6c1fe8abad4f7a0cd2f2124bdc93e740643df5e0fd6c44c8d2fbb160cb31ae1379124af6185b3f0a0188c44d5164eff07559f80590db1b7b71dd6bd2caa8535ebaa917beb51777016a0838fb57029d1dcd8e8bdffe2c415631f6117d512cd1218754c1176ee1cf9e234a077a2600394a2b1ff56a36442b788589a4ebf2f72754b70f21a137c3a8a9a4593a01314e5e6eebd982c60dcc670e1e33f99304aee763578785b10ec7633c2d17c84a0d9b11242125a529dc046bec59277320e1ef2f73b83d4189afe0ab2a5e1db95efa0b40124e9a39f63fcbd93f2f2143ff5b2b9f336d5653dc55debded322cb555c44a0fd4817897049284c3fb2395c57c53e6254820a7c466e37ec409f93b5391db355a05dcf85c54422dd72a6d74b4f730a156290b290720164bd81f516f2f1118392d4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000154f90151a01f1a153520d71c7a9dee923b4f1a30c09f49f57e930d62072b80aa99460d9440a070d2af65cf4b7972e7bf9443f0fe82ff29225a48071ac6ebe1fbc0ae49356642a0943b13b0b2608c1e772c599809292c4079c16d90f9f1e7d69f8925102d8c1feba0593648a0c1d2c819da4fc25f8c38beac96bc8b25533c7581e2117c911254d8f48080a0a45d531264251deba88eb85c03e1826daddbb0b0bce37165e71d9236af892fc08080a04e425050083943d27aa01fdb706b5715693c18ed9ff8ef050fcd0c2ea292687aa09b9a3d00ec6310bd2f5714e5c60c7c597128add8087e18986dc18d716c6d011780a0fcf815ea12a633987173946bf59a53d93c461c71e47b3eee7cb07885027288f4a093b3dc885d64ad3421e67bf396530d92268a6ea17fe536e75f3d45ff2d6f034b80a0d3f01d4772d6326d75fad188647163487f5c5df4b809e33fffe344262fcaa398800000000000000000000000000000000000000000000000000000000000000000000000000000000000000073f8718080808080808080a0bb626d1fc2d928384c17de477f7b7170c65267b016976bc21305ebf39fc1543ca0f3ea5fd76e00ddbf83625e203d99441c86c44557e86896aad4ec87a4683bdf618080a0afebeaa9674e4a195459974044cf4da821d72aff3654d6d70b14ce90075c13f980808080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022e19f20aeeb5205bebd523c696a4b099033965d1bcb4af41ce5f3070145a8debd6601000000000000000000000000000000000000000000000000000000000000"), }, // This one is done/already received { OcrSeqNum: uint64(2), RemoteChainSelector: l2ChainSelector, // prove logs from the 0x0...6 nonce (amount=10) - BridgeSpecificData: mustConvertHexBridgeSpecificDataToBytes(t, "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000b40000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000001b8c0000000000000000000000000000000000000000000000000000000000000000debdfbead9da4e4e96744bb44a697fb9b5db11acd7bd6a2c78d58face684206970c451d3ddd756858ee282bcec7c3923065ba3b2988e91949025e6b4e77487de332e3e384bb4ce3a6fc7978d0dfc5945341c1473744ad3a41635fbd1fb4b9c6100000000000000000000000000000000000000000000000000000000000003e00001000000000000000000000000000000000000000000000000000000000dd8000000000000000000000000420000000000000000000000000000000000000700000000000000000000000058cc85b8d04ea49cc6dbd3cbffd00b4b8d6cb3ef0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004698800000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000204d764ad0b0001000000000000000000000000000000000000000000000000000000000d5a0000000000000000000000004200000000000000000000000000000000000010000000000000000000000000fbb0621e0b23b5478b630bd55a5f21f67730b0f10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001040166a07a0000000000000000000000005589bb8228c07c4e15558875faf2b859f678d129000000000000000000000000d08a2917653d4e460893203471f0000826fb4034000000000000000000000000fb023f4edb2aa1ebbcc07970f9c0541071713445000000000000000000000000e87704d3f0dd040fd2a49c3606043dd6fc05bf33000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000002c0000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000006c00000000000000000000000000000000000000000000000000000000000000214f90211a0c37d9a90a47f430d6d54dabcbd2f364fdec4bbefa75aa69eab8f3cf50026de73a0a399109fd13eb2ebb25f5382c7bbe1a3d4c6433968ca9f19b78a0871e0cbf712a025225c15784b8550f2fb4d8257db8a352453c05b81013dc4a8f5fdfde94b2043a0b1fdf531766da35c16cae24330ec921abe5f7f950396fec11deea83db82346a4a0117a1e2d227b113cddb855f2af8fbed60661d0cb71e2ac0474f405ad359232f8a08a05951056d4a4e2e4ca1109d9c345aeaaf28f9be4a2a810b5652e69518ca609a02900527859b85e1008d498194a583a3effad975638925b6a1c6a8ff38ae2e804a0d466461fe5b2004b72cc68f4013ea3d2e6fc49b0b5598ff091724ed3a86fc2bfa0863849da3e275da0a24c159f0ec0c2bb2c1024fd254492f6a7f3abefff96a77ea0ed4a2b060237d351dd851375674b6dfb3d7a864281b1105b6a602c8f989962fda07e250d776e741b434bffd936ba18f8ea9c9f359672e80d93d3128bf060605ec1a08ff7943dae97c26473ac8062323fe14a28b33a892c710ef769a7ddbd1d13b2d8a0bb62fef18ac02456958d40d12353c27db1aca9b90edfe8a4de910e0e8cf27d9ba088e3c60cbf0b6f0ad69730ad3bf23825d8f9f8037544069669dfc3ae3a39f826a02cfaadf653fc6cc9bc182e8ae4a6f7736ab1b01363444aa65e8c1182d4fd8e7ea08a6919cd1b827d7e346cd9f5aa269c01e5179e3a79e9e050fcb1c34028d236e8800000000000000000000000000000000000000000000000000000000000000000000000000000000000000214f90211a050a1a407e76cf8932498e5c8a03f7d3ce9f7db1cb88489482b2eea389d3df548a0ab20926cf02651c8b90cb2b9b4b22804c7e8fe2d6c7be438b81ec442c21f0d31a0768e2e35089267f2334ecbb13f49e07e59a062c29696c674cdd4e32d5dcd7a17a00c662583b98d019310f01ca016aa2d352c803b2207ce01a48f4179e5ab72d6dba0c1373828efc2d5325b71fc2a194c038098cdeb9e59d6ebad7c20664a9e627061a0aa98badb806f96bb55ee46d01edb661b304913fb876a9708efdf7664a631cde8a00f05546016560ce9b05ee583b4d97b15fc5b7ab5ec56de37e299be381767c3aba005941b0ad5b606fdca4cae738efbf2daf029e63d3d4a5bfb81c550a99b073968a052db10435032fa673fd56943db628ce658dfd053ab4022b5d8f48d5e54994bf4a0ed2df687867bfb62f41273c9e0e317f0da20c6595eb16d0b9dea48c70e0b3e06a03bc54d1680436348eb3506d51dfb4cd0e9c9d39f1366530e111e96d369b2322aa06ec4829d91f0cc40a45ee77a963c3730dd3b42ce4d99beec108b97760bf1ead8a092f6bc5d2c4072d22f33a13b45a721cab92eb56909dcbd19f389fbcf189b6edba013731d52dfc35f4618b37b283cb56a09d35bcf2d89f84ef81460a406780e6308a0faeca47f31cb0ddcd7da6df3e12bfce63cb3187c40fd33a090d4866d6fb13e2ba0f0ac4d51c4c48907eb0d891b1c4f99e69107b76c5a051a089c08d2000b16d34f800000000000000000000000000000000000000000000000000000000000000000000000000000000000000194f90191a06b2d6a0a36e2097af8ac6d861fae2fb81da5b1dc4553ba982d6a71f9210e8974a00e791535b1da1445dfa7de9981297de0e2639b5ca7dc13aabbb161a436e516d3a06b7af11ff178474bf69cd8e146038a51e75cada9fe34385b9ecfd33932e872bca0621657da81c2062813821315378490c32be9ef39515d0f4d55b6cdffb2cbb4bba0316b2a623c5088749c2bd529059478298a1679d9a8a41e01f7d9b0c24f5bdfd480a005fe24b494030bfedbdd124afe76081090e6e0775ea7266020ff3bae70969f8aa04f947b0b21110b7f4e53d62590787965fe43ef305af4d84d7965d3f669df8c3480a030e5de29740af91c19a24371f3a69fe37f9c7052a76698d64ff01f71561db388a0dced5f59e458fc0e2e0ff23ab31c430c69a0ba173cccd3618b4a520481c15818a06545ca38717113fa3435e643143d8a7043bdbfeb23a47c87218496f2bb03faeba054aa7606fea02cd36637ab236b286c7615c7658aa8d66fa119f3454bd8200fb680a00e7816c71cdddaf4ee29e022b778522a47e28944e1e8e3751a1663e613b00d6480800000000000000000000000000000000000000000000000000000000000000000000000000000000000000022e19f3005eb0f046d71740f0d3530fc1e102351275c0840f962572e24c54ad9cd9c01000000000000000000000000000000000000000000000000000000000000"), + BridgeSpecificData: bridgetestutils.MustConvertHexBridgeDataToBytes(t, "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000b40000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000001b8c0000000000000000000000000000000000000000000000000000000000000000debdfbead9da4e4e96744bb44a697fb9b5db11acd7bd6a2c78d58face684206970c451d3ddd756858ee282bcec7c3923065ba3b2988e91949025e6b4e77487de332e3e384bb4ce3a6fc7978d0dfc5945341c1473744ad3a41635fbd1fb4b9c6100000000000000000000000000000000000000000000000000000000000003e00001000000000000000000000000000000000000000000000000000000000dd8000000000000000000000000420000000000000000000000000000000000000700000000000000000000000058cc85b8d04ea49cc6dbd3cbffd00b4b8d6cb3ef0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004698800000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000204d764ad0b0001000000000000000000000000000000000000000000000000000000000d5a0000000000000000000000004200000000000000000000000000000000000010000000000000000000000000fbb0621e0b23b5478b630bd55a5f21f67730b0f10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001040166a07a0000000000000000000000005589bb8228c07c4e15558875faf2b859f678d129000000000000000000000000d08a2917653d4e460893203471f0000826fb4034000000000000000000000000fb023f4edb2aa1ebbcc07970f9c0541071713445000000000000000000000000e87704d3f0dd040fd2a49c3606043dd6fc05bf33000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000002c0000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000006c00000000000000000000000000000000000000000000000000000000000000214f90211a0c37d9a90a47f430d6d54dabcbd2f364fdec4bbefa75aa69eab8f3cf50026de73a0a399109fd13eb2ebb25f5382c7bbe1a3d4c6433968ca9f19b78a0871e0cbf712a025225c15784b8550f2fb4d8257db8a352453c05b81013dc4a8f5fdfde94b2043a0b1fdf531766da35c16cae24330ec921abe5f7f950396fec11deea83db82346a4a0117a1e2d227b113cddb855f2af8fbed60661d0cb71e2ac0474f405ad359232f8a08a05951056d4a4e2e4ca1109d9c345aeaaf28f9be4a2a810b5652e69518ca609a02900527859b85e1008d498194a583a3effad975638925b6a1c6a8ff38ae2e804a0d466461fe5b2004b72cc68f4013ea3d2e6fc49b0b5598ff091724ed3a86fc2bfa0863849da3e275da0a24c159f0ec0c2bb2c1024fd254492f6a7f3abefff96a77ea0ed4a2b060237d351dd851375674b6dfb3d7a864281b1105b6a602c8f989962fda07e250d776e741b434bffd936ba18f8ea9c9f359672e80d93d3128bf060605ec1a08ff7943dae97c26473ac8062323fe14a28b33a892c710ef769a7ddbd1d13b2d8a0bb62fef18ac02456958d40d12353c27db1aca9b90edfe8a4de910e0e8cf27d9ba088e3c60cbf0b6f0ad69730ad3bf23825d8f9f8037544069669dfc3ae3a39f826a02cfaadf653fc6cc9bc182e8ae4a6f7736ab1b01363444aa65e8c1182d4fd8e7ea08a6919cd1b827d7e346cd9f5aa269c01e5179e3a79e9e050fcb1c34028d236e8800000000000000000000000000000000000000000000000000000000000000000000000000000000000000214f90211a050a1a407e76cf8932498e5c8a03f7d3ce9f7db1cb88489482b2eea389d3df548a0ab20926cf02651c8b90cb2b9b4b22804c7e8fe2d6c7be438b81ec442c21f0d31a0768e2e35089267f2334ecbb13f49e07e59a062c29696c674cdd4e32d5dcd7a17a00c662583b98d019310f01ca016aa2d352c803b2207ce01a48f4179e5ab72d6dba0c1373828efc2d5325b71fc2a194c038098cdeb9e59d6ebad7c20664a9e627061a0aa98badb806f96bb55ee46d01edb661b304913fb876a9708efdf7664a631cde8a00f05546016560ce9b05ee583b4d97b15fc5b7ab5ec56de37e299be381767c3aba005941b0ad5b606fdca4cae738efbf2daf029e63d3d4a5bfb81c550a99b073968a052db10435032fa673fd56943db628ce658dfd053ab4022b5d8f48d5e54994bf4a0ed2df687867bfb62f41273c9e0e317f0da20c6595eb16d0b9dea48c70e0b3e06a03bc54d1680436348eb3506d51dfb4cd0e9c9d39f1366530e111e96d369b2322aa06ec4829d91f0cc40a45ee77a963c3730dd3b42ce4d99beec108b97760bf1ead8a092f6bc5d2c4072d22f33a13b45a721cab92eb56909dcbd19f389fbcf189b6edba013731d52dfc35f4618b37b283cb56a09d35bcf2d89f84ef81460a406780e6308a0faeca47f31cb0ddcd7da6df3e12bfce63cb3187c40fd33a090d4866d6fb13e2ba0f0ac4d51c4c48907eb0d891b1c4f99e69107b76c5a051a089c08d2000b16d34f800000000000000000000000000000000000000000000000000000000000000000000000000000000000000194f90191a06b2d6a0a36e2097af8ac6d861fae2fb81da5b1dc4553ba982d6a71f9210e8974a00e791535b1da1445dfa7de9981297de0e2639b5ca7dc13aabbb161a436e516d3a06b7af11ff178474bf69cd8e146038a51e75cada9fe34385b9ecfd33932e872bca0621657da81c2062813821315378490c32be9ef39515d0f4d55b6cdffb2cbb4bba0316b2a623c5088749c2bd529059478298a1679d9a8a41e01f7d9b0c24f5bdfd480a005fe24b494030bfedbdd124afe76081090e6e0775ea7266020ff3bae70969f8aa04f947b0b21110b7f4e53d62590787965fe43ef305af4d84d7965d3f669df8c3480a030e5de29740af91c19a24371f3a69fe37f9c7052a76698d64ff01f71561db388a0dced5f59e458fc0e2e0ff23ab31c430c69a0ba173cccd3618b4a520481c15818a06545ca38717113fa3435e643143d8a7043bdbfeb23a47c87218496f2bb03faeba054aa7606fea02cd36637ab236b286c7615c7658aa8d66fa119f3454bd8200fb680a00e7816c71cdddaf4ee29e022b778522a47e28944e1e8e3751a1663e613b00d6480800000000000000000000000000000000000000000000000000000000000000000000000000000000000000022e19f3005eb0f046d71740f0d3530fc1e102351275c0840f962572e24c54ad9cd9c01000000000000000000000000000000000000000000000000000000000000"), }, // This one is missing (not present in sent logs) { OcrSeqNum: uint64(3), RemoteChainSelector: l2ChainSelector, - BridgeSpecificData: mustConvertHexBridgeSpecificDataToBytes(t, "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000bc0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000001b8c0000000000000000000000000000000000000000000000000000000000000000debdfbead9da4e4e96744bb44a697fb9b5db11acd7bd6a2c78d58face684206970c451d3ddd756858ee282bcec7c3923065ba3b2988e91949025e6b4e77487de332e3e384bb4ce3a6fc7978d0dfc5945341c1473744ad3a41635fbd1fb4b9c6100000000000000000000000000000000000000000000000000000000000003e00001000000000000000000000000000000000000000000000000000000000dd7000000000000000000000000420000000000000000000000000000000000000700000000000000000000000058cc85b8d04ea49cc6dbd3cbffd00b4b8d6cb3ef0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004698800000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000204d764ad0b0001000000000000000000000000000000000000000000000000000000000d590000000000000000000000004200000000000000000000000000000000000010000000000000000000000000fbb0621e0b23b5478b630bd55a5f21f67730b0f10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001040166a07a0000000000000000000000005589bb8228c07c4e15558875faf2b859f678d129000000000000000000000000d08a2917653d4e460893203471f0000826fb4034000000000000000000000000fb023f4edb2aa1ebbcc07970f9c0541071713445000000000000000000000000e87704d3f0dd040fd2a49c3606043dd6fc05bf33000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000002e0000000000000000000000000000000000000000000000000000000000000052000000000000000000000000000000000000000000000000000000000000006a000000000000000000000000000000000000000000000000000000000000007400000000000000000000000000000000000000000000000000000000000000214f90211a0c37d9a90a47f430d6d54dabcbd2f364fdec4bbefa75aa69eab8f3cf50026de73a0a399109fd13eb2ebb25f5382c7bbe1a3d4c6433968ca9f19b78a0871e0cbf712a025225c15784b8550f2fb4d8257db8a352453c05b81013dc4a8f5fdfde94b2043a0b1fdf531766da35c16cae24330ec921abe5f7f950396fec11deea83db82346a4a0117a1e2d227b113cddb855f2af8fbed60661d0cb71e2ac0474f405ad359232f8a08a05951056d4a4e2e4ca1109d9c345aeaaf28f9be4a2a810b5652e69518ca609a02900527859b85e1008d498194a583a3effad975638925b6a1c6a8ff38ae2e804a0d466461fe5b2004b72cc68f4013ea3d2e6fc49b0b5598ff091724ed3a86fc2bfa0863849da3e275da0a24c159f0ec0c2bb2c1024fd254492f6a7f3abefff96a77ea0ed4a2b060237d351dd851375674b6dfb3d7a864281b1105b6a602c8f989962fda07e250d776e741b434bffd936ba18f8ea9c9f359672e80d93d3128bf060605ec1a08ff7943dae97c26473ac8062323fe14a28b33a892c710ef769a7ddbd1d13b2d8a0bb62fef18ac02456958d40d12353c27db1aca9b90edfe8a4de910e0e8cf27d9ba088e3c60cbf0b6f0ad69730ad3bf23825d8f9f8037544069669dfc3ae3a39f826a02cfaadf653fc6cc9bc182e8ae4a6f7736ab1b01363444aa65e8c1182d4fd8e7ea08a6919cd1b827d7e346cd9f5aa269c01e5179e3a79e9e050fcb1c34028d236e8800000000000000000000000000000000000000000000000000000000000000000000000000000000000000214f90211a0d83a5b715cffa9ff815a9cbede60d80e380c0d8b3f8433c1cfd9f9332ca96fcfa08f3d6be3e11f4a8d26b7b95f526c5997db678b7ade30fc4476f3b62513f636a0a00bd2482ce34a4dea248ad239a79f04082a73549cf115a2f9ef8b59f3a0ab32bea00bb41ca6732f1a882e39fd10cd1e46dcc524ad968bc19d35c20efcbc4d53844aa0d6bb21815ed32081c3987cb8d7f4b82971e856f10cf016f0f200c7481bc8e72da05eb07b5cd5ac9db7b8b112f21b68c911bbc8267bfaf715687a3c38fa520e6dd5a0651a7362fdc70b0dc0482f18f06aeb22c8b0a6025415680989f6c1fe8abad4f7a0cd2f2124bdc93e740643df5e0fd6c44c8d2fbb160cb31ae1379124af6185b3f0a0188c44d5164eff07559f80590db1b7b71dd6bd2caa8535ebaa917beb51777016a0838fb57029d1dcd8e8bdffe2c415631f6117d512cd1218754c1176ee1cf9e234a077a2600394a2b1ff56a36442b788589a4ebf2f72754b70f21a137c3a8a9a4593a01314e5e6eebd982c60dcc670e1e33f99304aee763578785b10ec7633c2d17c84a0d9b11242125a529dc046bec59277320e1ef2f73b83d4189afe0ab2a5e1db95efa0b40124e9a39f63fcbd93f2f2143ff5b2b9f336d5653dc55debded322cb555c44a0fd4817897049284c3fb2395c57c53e6254820a7c466e37ec409f93b5391db355a05dcf85c54422dd72a6d74b4f730a156290b290720164bd81f516f2f1118392d4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000154f90151a01f1a153520d71c7a9dee923b4f1a30c09f49f57e930d62072b80aa99460d9440a070d2af65cf4b7972e7bf9443f0fe82ff29225a48071ac6ebe1fbc0ae49356642a0943b13b0b2608c1e772c599809292c4079c16d90f9f1e7d69f8925102d8c1feba0593648a0c1d2c819da4fc25f8c38beac96bc8b25533c7581e2117c911254d8f48080a0a45d531264251deba88eb85c03e1826daddbb0b0bce37165e71d9236af892fc08080a04e425050083943d27aa01fdb706b5715693c18ed9ff8ef050fcd0c2ea292687aa09b9a3d00ec6310bd2f5714e5c60c7c597128add8087e18986dc18d716c6d011780a0fcf815ea12a633987173946bf59a53d93c461c71e47b3eee7cb07885027288f4a093b3dc885d64ad3421e67bf396530d92268a6ea17fe536e75f3d45ff2d6f034b80a0d3f01d4772d6326d75fad188647163487f5c5df4b809e33fffe344262fcaa398800000000000000000000000000000000000000000000000000000000000000000000000000000000000000073f8718080808080808080a0bb626d1fc2d928384c17de477f7b7170c65267b016976bc21305ebf39fc1543ca0f3ea5fd76e00ddbf83625e203d99441c86c44557e86896aad4ec87a4683bdf618080a0afebeaa9674e4a195459974044cf4da821d72aff3654d6d70b14ce90075c13f980808080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022e19f20aeeb5205bebd523c696a4b099033965d1bcb4af41ce5f3070145a8debd6601000000000000000000000000000000000000000000000000000000000000"), + BridgeSpecificData: bridgetestutils.MustConvertHexBridgeDataToBytes(t, "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000bc0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000001b8c0000000000000000000000000000000000000000000000000000000000000000debdfbead9da4e4e96744bb44a697fb9b5db11acd7bd6a2c78d58face684206970c451d3ddd756858ee282bcec7c3923065ba3b2988e91949025e6b4e77487de332e3e384bb4ce3a6fc7978d0dfc5945341c1473744ad3a41635fbd1fb4b9c6100000000000000000000000000000000000000000000000000000000000003e00001000000000000000000000000000000000000000000000000000000000dd7000000000000000000000000420000000000000000000000000000000000000700000000000000000000000058cc85b8d04ea49cc6dbd3cbffd00b4b8d6cb3ef0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004698800000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000204d764ad0b0001000000000000000000000000000000000000000000000000000000000d590000000000000000000000004200000000000000000000000000000000000010000000000000000000000000fbb0621e0b23b5478b630bd55a5f21f67730b0f10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001040166a07a0000000000000000000000005589bb8228c07c4e15558875faf2b859f678d129000000000000000000000000d08a2917653d4e460893203471f0000826fb4034000000000000000000000000fb023f4edb2aa1ebbcc07970f9c0541071713445000000000000000000000000e87704d3f0dd040fd2a49c3606043dd6fc05bf33000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000002e0000000000000000000000000000000000000000000000000000000000000052000000000000000000000000000000000000000000000000000000000000006a000000000000000000000000000000000000000000000000000000000000007400000000000000000000000000000000000000000000000000000000000000214f90211a0c37d9a90a47f430d6d54dabcbd2f364fdec4bbefa75aa69eab8f3cf50026de73a0a399109fd13eb2ebb25f5382c7bbe1a3d4c6433968ca9f19b78a0871e0cbf712a025225c15784b8550f2fb4d8257db8a352453c05b81013dc4a8f5fdfde94b2043a0b1fdf531766da35c16cae24330ec921abe5f7f950396fec11deea83db82346a4a0117a1e2d227b113cddb855f2af8fbed60661d0cb71e2ac0474f405ad359232f8a08a05951056d4a4e2e4ca1109d9c345aeaaf28f9be4a2a810b5652e69518ca609a02900527859b85e1008d498194a583a3effad975638925b6a1c6a8ff38ae2e804a0d466461fe5b2004b72cc68f4013ea3d2e6fc49b0b5598ff091724ed3a86fc2bfa0863849da3e275da0a24c159f0ec0c2bb2c1024fd254492f6a7f3abefff96a77ea0ed4a2b060237d351dd851375674b6dfb3d7a864281b1105b6a602c8f989962fda07e250d776e741b434bffd936ba18f8ea9c9f359672e80d93d3128bf060605ec1a08ff7943dae97c26473ac8062323fe14a28b33a892c710ef769a7ddbd1d13b2d8a0bb62fef18ac02456958d40d12353c27db1aca9b90edfe8a4de910e0e8cf27d9ba088e3c60cbf0b6f0ad69730ad3bf23825d8f9f8037544069669dfc3ae3a39f826a02cfaadf653fc6cc9bc182e8ae4a6f7736ab1b01363444aa65e8c1182d4fd8e7ea08a6919cd1b827d7e346cd9f5aa269c01e5179e3a79e9e050fcb1c34028d236e8800000000000000000000000000000000000000000000000000000000000000000000000000000000000000214f90211a0d83a5b715cffa9ff815a9cbede60d80e380c0d8b3f8433c1cfd9f9332ca96fcfa08f3d6be3e11f4a8d26b7b95f526c5997db678b7ade30fc4476f3b62513f636a0a00bd2482ce34a4dea248ad239a79f04082a73549cf115a2f9ef8b59f3a0ab32bea00bb41ca6732f1a882e39fd10cd1e46dcc524ad968bc19d35c20efcbc4d53844aa0d6bb21815ed32081c3987cb8d7f4b82971e856f10cf016f0f200c7481bc8e72da05eb07b5cd5ac9db7b8b112f21b68c911bbc8267bfaf715687a3c38fa520e6dd5a0651a7362fdc70b0dc0482f18f06aeb22c8b0a6025415680989f6c1fe8abad4f7a0cd2f2124bdc93e740643df5e0fd6c44c8d2fbb160cb31ae1379124af6185b3f0a0188c44d5164eff07559f80590db1b7b71dd6bd2caa8535ebaa917beb51777016a0838fb57029d1dcd8e8bdffe2c415631f6117d512cd1218754c1176ee1cf9e234a077a2600394a2b1ff56a36442b788589a4ebf2f72754b70f21a137c3a8a9a4593a01314e5e6eebd982c60dcc670e1e33f99304aee763578785b10ec7633c2d17c84a0d9b11242125a529dc046bec59277320e1ef2f73b83d4189afe0ab2a5e1db95efa0b40124e9a39f63fcbd93f2f2143ff5b2b9f336d5653dc55debded322cb555c44a0fd4817897049284c3fb2395c57c53e6254820a7c466e37ec409f93b5391db355a05dcf85c54422dd72a6d74b4f730a156290b290720164bd81f516f2f1118392d4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000154f90151a01f1a153520d71c7a9dee923b4f1a30c09f49f57e930d62072b80aa99460d9440a070d2af65cf4b7972e7bf9443f0fe82ff29225a48071ac6ebe1fbc0ae49356642a0943b13b0b2608c1e772c599809292c4079c16d90f9f1e7d69f8925102d8c1feba0593648a0c1d2c819da4fc25f8c38beac96bc8b25533c7581e2117c911254d8f48080a0a45d531264251deba88eb85c03e1826daddbb0b0bce37165e71d9236af892fc08080a04e425050083943d27aa01fdb706b5715693c18ed9ff8ef050fcd0c2ea292687aa09b9a3d00ec6310bd2f5714e5c60c7c597128add8087e18986dc18d716c6d011780a0fcf815ea12a633987173946bf59a53d93c461c71e47b3eee7cb07885027288f4a093b3dc885d64ad3421e67bf396530d92268a6ea17fe536e75f3d45ff2d6f034b80a0d3f01d4772d6326d75fad188647163487f5c5df4b809e33fffe344262fcaa398800000000000000000000000000000000000000000000000000000000000000000000000000000000000000073f8718080808080808080a0bb626d1fc2d928384c17de477f7b7170c65267b016976bc21305ebf39fc1543ca0f3ea5fd76e00ddbf83625e203d99441c86c44557e86896aad4ec87a4683bdf618080a0afebeaa9674e4a195459974044cf4da821d72aff3654d6d70b14ce90075c13f980808080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022e19f20aeeb5205bebd523c696a4b099033965d1bcb4af41ce5f3070145a8debd6601000000000000000000000000000000000000000000000000000000000000"), }, }, receivedLogs: []*liquiditymanager.LiquidityManagerLiquidityTransferred{ @@ -116,7 +117,7 @@ func Test_L2ToL1Bridge_partitionTransfers(t *testing.T) { Amount: big.NewInt(10), BridgeReturnData: []byte{}, // NOTE: remember, the nonce is in bridgeSpecificData in the received logs instead of bridgeReturnData - BridgeSpecificData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000006"), + BridgeSpecificData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000006"), }, }, }, @@ -126,7 +127,7 @@ func Test_L2ToL1Bridge_partitionTransfers(t *testing.T) { ToChainSelector: l1ChainSelector, To: l1LiquidityManagerAddress, Amount: big.NewInt(4), - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000004"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000004"), BridgeSpecificData: []byte{}, }, }, @@ -136,7 +137,7 @@ func Test_L2ToL1Bridge_partitionTransfers(t *testing.T) { ToChainSelector: l1ChainSelector, To: l1LiquidityManagerAddress, Amount: big.NewInt(7), - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000005"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000005"), BridgeSpecificData: []byte{}, }, }, @@ -144,7 +145,7 @@ func Test_L2ToL1Bridge_partitionTransfers(t *testing.T) { { OcrSeqNum: uint64(3), RemoteChainSelector: l2ChainSelector, - BridgeSpecificData: mustConvertHexBridgeSpecificDataToBytes(t, "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000bc0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000001b8c0000000000000000000000000000000000000000000000000000000000000000debdfbead9da4e4e96744bb44a697fb9b5db11acd7bd6a2c78d58face684206970c451d3ddd756858ee282bcec7c3923065ba3b2988e91949025e6b4e77487de332e3e384bb4ce3a6fc7978d0dfc5945341c1473744ad3a41635fbd1fb4b9c6100000000000000000000000000000000000000000000000000000000000003e00001000000000000000000000000000000000000000000000000000000000dd7000000000000000000000000420000000000000000000000000000000000000700000000000000000000000058cc85b8d04ea49cc6dbd3cbffd00b4b8d6cb3ef0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004698800000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000204d764ad0b0001000000000000000000000000000000000000000000000000000000000d590000000000000000000000004200000000000000000000000000000000000010000000000000000000000000fbb0621e0b23b5478b630bd55a5f21f67730b0f10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001040166a07a0000000000000000000000005589bb8228c07c4e15558875faf2b859f678d129000000000000000000000000d08a2917653d4e460893203471f0000826fb4034000000000000000000000000fb023f4edb2aa1ebbcc07970f9c0541071713445000000000000000000000000e87704d3f0dd040fd2a49c3606043dd6fc05bf33000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000002e0000000000000000000000000000000000000000000000000000000000000052000000000000000000000000000000000000000000000000000000000000006a000000000000000000000000000000000000000000000000000000000000007400000000000000000000000000000000000000000000000000000000000000214f90211a0c37d9a90a47f430d6d54dabcbd2f364fdec4bbefa75aa69eab8f3cf50026de73a0a399109fd13eb2ebb25f5382c7bbe1a3d4c6433968ca9f19b78a0871e0cbf712a025225c15784b8550f2fb4d8257db8a352453c05b81013dc4a8f5fdfde94b2043a0b1fdf531766da35c16cae24330ec921abe5f7f950396fec11deea83db82346a4a0117a1e2d227b113cddb855f2af8fbed60661d0cb71e2ac0474f405ad359232f8a08a05951056d4a4e2e4ca1109d9c345aeaaf28f9be4a2a810b5652e69518ca609a02900527859b85e1008d498194a583a3effad975638925b6a1c6a8ff38ae2e804a0d466461fe5b2004b72cc68f4013ea3d2e6fc49b0b5598ff091724ed3a86fc2bfa0863849da3e275da0a24c159f0ec0c2bb2c1024fd254492f6a7f3abefff96a77ea0ed4a2b060237d351dd851375674b6dfb3d7a864281b1105b6a602c8f989962fda07e250d776e741b434bffd936ba18f8ea9c9f359672e80d93d3128bf060605ec1a08ff7943dae97c26473ac8062323fe14a28b33a892c710ef769a7ddbd1d13b2d8a0bb62fef18ac02456958d40d12353c27db1aca9b90edfe8a4de910e0e8cf27d9ba088e3c60cbf0b6f0ad69730ad3bf23825d8f9f8037544069669dfc3ae3a39f826a02cfaadf653fc6cc9bc182e8ae4a6f7736ab1b01363444aa65e8c1182d4fd8e7ea08a6919cd1b827d7e346cd9f5aa269c01e5179e3a79e9e050fcb1c34028d236e8800000000000000000000000000000000000000000000000000000000000000000000000000000000000000214f90211a0d83a5b715cffa9ff815a9cbede60d80e380c0d8b3f8433c1cfd9f9332ca96fcfa08f3d6be3e11f4a8d26b7b95f526c5997db678b7ade30fc4476f3b62513f636a0a00bd2482ce34a4dea248ad239a79f04082a73549cf115a2f9ef8b59f3a0ab32bea00bb41ca6732f1a882e39fd10cd1e46dcc524ad968bc19d35c20efcbc4d53844aa0d6bb21815ed32081c3987cb8d7f4b82971e856f10cf016f0f200c7481bc8e72da05eb07b5cd5ac9db7b8b112f21b68c911bbc8267bfaf715687a3c38fa520e6dd5a0651a7362fdc70b0dc0482f18f06aeb22c8b0a6025415680989f6c1fe8abad4f7a0cd2f2124bdc93e740643df5e0fd6c44c8d2fbb160cb31ae1379124af6185b3f0a0188c44d5164eff07559f80590db1b7b71dd6bd2caa8535ebaa917beb51777016a0838fb57029d1dcd8e8bdffe2c415631f6117d512cd1218754c1176ee1cf9e234a077a2600394a2b1ff56a36442b788589a4ebf2f72754b70f21a137c3a8a9a4593a01314e5e6eebd982c60dcc670e1e33f99304aee763578785b10ec7633c2d17c84a0d9b11242125a529dc046bec59277320e1ef2f73b83d4189afe0ab2a5e1db95efa0b40124e9a39f63fcbd93f2f2143ff5b2b9f336d5653dc55debded322cb555c44a0fd4817897049284c3fb2395c57c53e6254820a7c466e37ec409f93b5391db355a05dcf85c54422dd72a6d74b4f730a156290b290720164bd81f516f2f1118392d4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000154f90151a01f1a153520d71c7a9dee923b4f1a30c09f49f57e930d62072b80aa99460d9440a070d2af65cf4b7972e7bf9443f0fe82ff29225a48071ac6ebe1fbc0ae49356642a0943b13b0b2608c1e772c599809292c4079c16d90f9f1e7d69f8925102d8c1feba0593648a0c1d2c819da4fc25f8c38beac96bc8b25533c7581e2117c911254d8f48080a0a45d531264251deba88eb85c03e1826daddbb0b0bce37165e71d9236af892fc08080a04e425050083943d27aa01fdb706b5715693c18ed9ff8ef050fcd0c2ea292687aa09b9a3d00ec6310bd2f5714e5c60c7c597128add8087e18986dc18d716c6d011780a0fcf815ea12a633987173946bf59a53d93c461c71e47b3eee7cb07885027288f4a093b3dc885d64ad3421e67bf396530d92268a6ea17fe536e75f3d45ff2d6f034b80a0d3f01d4772d6326d75fad188647163487f5c5df4b809e33fffe344262fcaa398800000000000000000000000000000000000000000000000000000000000000000000000000000000000000073f8718080808080808080a0bb626d1fc2d928384c17de477f7b7170c65267b016976bc21305ebf39fc1543ca0f3ea5fd76e00ddbf83625e203d99441c86c44557e86896aad4ec87a4683bdf618080a0afebeaa9674e4a195459974044cf4da821d72aff3654d6d70b14ce90075c13f980808080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022e19f20aeeb5205bebd523c696a4b099033965d1bcb4af41ce5f3070145a8debd6601000000000000000000000000000000000000000000000000000000000000"), + BridgeSpecificData: bridgetestutils.MustConvertHexBridgeDataToBytes(t, "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000bc0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000001b8c0000000000000000000000000000000000000000000000000000000000000000debdfbead9da4e4e96744bb44a697fb9b5db11acd7bd6a2c78d58face684206970c451d3ddd756858ee282bcec7c3923065ba3b2988e91949025e6b4e77487de332e3e384bb4ce3a6fc7978d0dfc5945341c1473744ad3a41635fbd1fb4b9c6100000000000000000000000000000000000000000000000000000000000003e00001000000000000000000000000000000000000000000000000000000000dd7000000000000000000000000420000000000000000000000000000000000000700000000000000000000000058cc85b8d04ea49cc6dbd3cbffd00b4b8d6cb3ef0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004698800000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000204d764ad0b0001000000000000000000000000000000000000000000000000000000000d590000000000000000000000004200000000000000000000000000000000000010000000000000000000000000fbb0621e0b23b5478b630bd55a5f21f67730b0f10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001040166a07a0000000000000000000000005589bb8228c07c4e15558875faf2b859f678d129000000000000000000000000d08a2917653d4e460893203471f0000826fb4034000000000000000000000000fb023f4edb2aa1ebbcc07970f9c0541071713445000000000000000000000000e87704d3f0dd040fd2a49c3606043dd6fc05bf33000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000002e0000000000000000000000000000000000000000000000000000000000000052000000000000000000000000000000000000000000000000000000000000006a000000000000000000000000000000000000000000000000000000000000007400000000000000000000000000000000000000000000000000000000000000214f90211a0c37d9a90a47f430d6d54dabcbd2f364fdec4bbefa75aa69eab8f3cf50026de73a0a399109fd13eb2ebb25f5382c7bbe1a3d4c6433968ca9f19b78a0871e0cbf712a025225c15784b8550f2fb4d8257db8a352453c05b81013dc4a8f5fdfde94b2043a0b1fdf531766da35c16cae24330ec921abe5f7f950396fec11deea83db82346a4a0117a1e2d227b113cddb855f2af8fbed60661d0cb71e2ac0474f405ad359232f8a08a05951056d4a4e2e4ca1109d9c345aeaaf28f9be4a2a810b5652e69518ca609a02900527859b85e1008d498194a583a3effad975638925b6a1c6a8ff38ae2e804a0d466461fe5b2004b72cc68f4013ea3d2e6fc49b0b5598ff091724ed3a86fc2bfa0863849da3e275da0a24c159f0ec0c2bb2c1024fd254492f6a7f3abefff96a77ea0ed4a2b060237d351dd851375674b6dfb3d7a864281b1105b6a602c8f989962fda07e250d776e741b434bffd936ba18f8ea9c9f359672e80d93d3128bf060605ec1a08ff7943dae97c26473ac8062323fe14a28b33a892c710ef769a7ddbd1d13b2d8a0bb62fef18ac02456958d40d12353c27db1aca9b90edfe8a4de910e0e8cf27d9ba088e3c60cbf0b6f0ad69730ad3bf23825d8f9f8037544069669dfc3ae3a39f826a02cfaadf653fc6cc9bc182e8ae4a6f7736ab1b01363444aa65e8c1182d4fd8e7ea08a6919cd1b827d7e346cd9f5aa269c01e5179e3a79e9e050fcb1c34028d236e8800000000000000000000000000000000000000000000000000000000000000000000000000000000000000214f90211a0d83a5b715cffa9ff815a9cbede60d80e380c0d8b3f8433c1cfd9f9332ca96fcfa08f3d6be3e11f4a8d26b7b95f526c5997db678b7ade30fc4476f3b62513f636a0a00bd2482ce34a4dea248ad239a79f04082a73549cf115a2f9ef8b59f3a0ab32bea00bb41ca6732f1a882e39fd10cd1e46dcc524ad968bc19d35c20efcbc4d53844aa0d6bb21815ed32081c3987cb8d7f4b82971e856f10cf016f0f200c7481bc8e72da05eb07b5cd5ac9db7b8b112f21b68c911bbc8267bfaf715687a3c38fa520e6dd5a0651a7362fdc70b0dc0482f18f06aeb22c8b0a6025415680989f6c1fe8abad4f7a0cd2f2124bdc93e740643df5e0fd6c44c8d2fbb160cb31ae1379124af6185b3f0a0188c44d5164eff07559f80590db1b7b71dd6bd2caa8535ebaa917beb51777016a0838fb57029d1dcd8e8bdffe2c415631f6117d512cd1218754c1176ee1cf9e234a077a2600394a2b1ff56a36442b788589a4ebf2f72754b70f21a137c3a8a9a4593a01314e5e6eebd982c60dcc670e1e33f99304aee763578785b10ec7633c2d17c84a0d9b11242125a529dc046bec59277320e1ef2f73b83d4189afe0ab2a5e1db95efa0b40124e9a39f63fcbd93f2f2143ff5b2b9f336d5653dc55debded322cb555c44a0fd4817897049284c3fb2395c57c53e6254820a7c466e37ec409f93b5391db355a05dcf85c54422dd72a6d74b4f730a156290b290720164bd81f516f2f1118392d4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000154f90151a01f1a153520d71c7a9dee923b4f1a30c09f49f57e930d62072b80aa99460d9440a070d2af65cf4b7972e7bf9443f0fe82ff29225a48071ac6ebe1fbc0ae49356642a0943b13b0b2608c1e772c599809292c4079c16d90f9f1e7d69f8925102d8c1feba0593648a0c1d2c819da4fc25f8c38beac96bc8b25533c7581e2117c911254d8f48080a0a45d531264251deba88eb85c03e1826daddbb0b0bce37165e71d9236af892fc08080a04e425050083943d27aa01fdb706b5715693c18ed9ff8ef050fcd0c2ea292687aa09b9a3d00ec6310bd2f5714e5c60c7c597128add8087e18986dc18d716c6d011780a0fcf815ea12a633987173946bf59a53d93c461c71e47b3eee7cb07885027288f4a093b3dc885d64ad3421e67bf396530d92268a6ea17fe536e75f3d45ff2d6f034b80a0d3f01d4772d6326d75fad188647163487f5c5df4b809e33fffe344262fcaa398800000000000000000000000000000000000000000000000000000000000000000000000000000000000000073f8718080808080808080a0bb626d1fc2d928384c17de477f7b7170c65267b016976bc21305ebf39fc1543ca0f3ea5fd76e00ddbf83625e203d99441c86c44557e86896aad4ec87a4683bdf618080a0afebeaa9674e4a195459974044cf4da821d72aff3654d6d70b14ce90075c13f980808080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022e19f20aeeb5205bebd523c696a4b099033965d1bcb4af41ce5f3070145a8debd6601000000000000000000000000000000000000000000000000000000000000"), }, }, wantErr: false, @@ -161,7 +162,7 @@ func Test_L2ToL1Bridge_partitionTransfers(t *testing.T) { ToChainSelector: l1ChainSelector, To: l1LiquidityManagerAddress, Amount: big.NewInt(4), - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000004"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000004"), BridgeSpecificData: []byte{}, }, // This one has an invalid FromChainSelector @@ -170,7 +171,7 @@ func Test_L2ToL1Bridge_partitionTransfers(t *testing.T) { ToChainSelector: l1ChainSelector, To: l1LiquidityManagerAddress, Amount: big.NewInt(7), - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000005"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000005"), BridgeSpecificData: []byte{}, }, // This one has an invalid To field @@ -179,7 +180,7 @@ func Test_L2ToL1Bridge_partitionTransfers(t *testing.T) { ToChainSelector: l1ChainSelector, To: common.HexToAddress("0xdeaddeaddeaddeaddeaddeaddeaddeaddeaddead"), Amount: big.NewInt(10), - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000006"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000006"), BridgeSpecificData: []byte{}, }, }, @@ -192,7 +193,7 @@ func Test_L2ToL1Bridge_partitionTransfers(t *testing.T) { ToChainSelector: l1ChainSelector, To: l1LiquidityManagerAddress, Amount: big.NewInt(4), - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000004"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000004"), BridgeSpecificData: []byte{}, }, }, @@ -211,7 +212,7 @@ func Test_L2ToL1Bridge_partitionTransfers(t *testing.T) { ToChainSelector: l1ChainSelector, To: l1LiquidityManagerAddress, Amount: big.NewInt(7), - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000005"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000005"), BridgeSpecificData: []byte{}, }, }, @@ -221,7 +222,7 @@ func Test_L2ToL1Bridge_partitionTransfers(t *testing.T) { OcrSeqNum: uint64(1), RemoteChainSelector: uint64(909090), // Non-existent chain selector // prove logs from the 0x0...5 nonce (amount=7) - BridgeSpecificData: mustConvertHexBridgeSpecificDataToBytes(t, "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000bc0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000001b8c0000000000000000000000000000000000000000000000000000000000000000debdfbead9da4e4e96744bb44a697fb9b5db11acd7bd6a2c78d58face684206970c451d3ddd756858ee282bcec7c3923065ba3b2988e91949025e6b4e77487de332e3e384bb4ce3a6fc7978d0dfc5945341c1473744ad3a41635fbd1fb4b9c6100000000000000000000000000000000000000000000000000000000000003e00001000000000000000000000000000000000000000000000000000000000dd7000000000000000000000000420000000000000000000000000000000000000700000000000000000000000058cc85b8d04ea49cc6dbd3cbffd00b4b8d6cb3ef0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004698800000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000204d764ad0b0001000000000000000000000000000000000000000000000000000000000d590000000000000000000000004200000000000000000000000000000000000010000000000000000000000000fbb0621e0b23b5478b630bd55a5f21f67730b0f10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001040166a07a0000000000000000000000005589bb8228c07c4e15558875faf2b859f678d129000000000000000000000000d08a2917653d4e460893203471f0000826fb4034000000000000000000000000fb023f4edb2aa1ebbcc07970f9c0541071713445000000000000000000000000e87704d3f0dd040fd2a49c3606043dd6fc05bf33000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000002e0000000000000000000000000000000000000000000000000000000000000052000000000000000000000000000000000000000000000000000000000000006a000000000000000000000000000000000000000000000000000000000000007400000000000000000000000000000000000000000000000000000000000000214f90211a0c37d9a90a47f430d6d54dabcbd2f364fdec4bbefa75aa69eab8f3cf50026de73a0a399109fd13eb2ebb25f5382c7bbe1a3d4c6433968ca9f19b78a0871e0cbf712a025225c15784b8550f2fb4d8257db8a352453c05b81013dc4a8f5fdfde94b2043a0b1fdf531766da35c16cae24330ec921abe5f7f950396fec11deea83db82346a4a0117a1e2d227b113cddb855f2af8fbed60661d0cb71e2ac0474f405ad359232f8a08a05951056d4a4e2e4ca1109d9c345aeaaf28f9be4a2a810b5652e69518ca609a02900527859b85e1008d498194a583a3effad975638925b6a1c6a8ff38ae2e804a0d466461fe5b2004b72cc68f4013ea3d2e6fc49b0b5598ff091724ed3a86fc2bfa0863849da3e275da0a24c159f0ec0c2bb2c1024fd254492f6a7f3abefff96a77ea0ed4a2b060237d351dd851375674b6dfb3d7a864281b1105b6a602c8f989962fda07e250d776e741b434bffd936ba18f8ea9c9f359672e80d93d3128bf060605ec1a08ff7943dae97c26473ac8062323fe14a28b33a892c710ef769a7ddbd1d13b2d8a0bb62fef18ac02456958d40d12353c27db1aca9b90edfe8a4de910e0e8cf27d9ba088e3c60cbf0b6f0ad69730ad3bf23825d8f9f8037544069669dfc3ae3a39f826a02cfaadf653fc6cc9bc182e8ae4a6f7736ab1b01363444aa65e8c1182d4fd8e7ea08a6919cd1b827d7e346cd9f5aa269c01e5179e3a79e9e050fcb1c34028d236e8800000000000000000000000000000000000000000000000000000000000000000000000000000000000000214f90211a0d83a5b715cffa9ff815a9cbede60d80e380c0d8b3f8433c1cfd9f9332ca96fcfa08f3d6be3e11f4a8d26b7b95f526c5997db678b7ade30fc4476f3b62513f636a0a00bd2482ce34a4dea248ad239a79f04082a73549cf115a2f9ef8b59f3a0ab32bea00bb41ca6732f1a882e39fd10cd1e46dcc524ad968bc19d35c20efcbc4d53844aa0d6bb21815ed32081c3987cb8d7f4b82971e856f10cf016f0f200c7481bc8e72da05eb07b5cd5ac9db7b8b112f21b68c911bbc8267bfaf715687a3c38fa520e6dd5a0651a7362fdc70b0dc0482f18f06aeb22c8b0a6025415680989f6c1fe8abad4f7a0cd2f2124bdc93e740643df5e0fd6c44c8d2fbb160cb31ae1379124af6185b3f0a0188c44d5164eff07559f80590db1b7b71dd6bd2caa8535ebaa917beb51777016a0838fb57029d1dcd8e8bdffe2c415631f6117d512cd1218754c1176ee1cf9e234a077a2600394a2b1ff56a36442b788589a4ebf2f72754b70f21a137c3a8a9a4593a01314e5e6eebd982c60dcc670e1e33f99304aee763578785b10ec7633c2d17c84a0d9b11242125a529dc046bec59277320e1ef2f73b83d4189afe0ab2a5e1db95efa0b40124e9a39f63fcbd93f2f2143ff5b2b9f336d5653dc55debded322cb555c44a0fd4817897049284c3fb2395c57c53e6254820a7c466e37ec409f93b5391db355a05dcf85c54422dd72a6d74b4f730a156290b290720164bd81f516f2f1118392d4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000154f90151a01f1a153520d71c7a9dee923b4f1a30c09f49f57e930d62072b80aa99460d9440a070d2af65cf4b7972e7bf9443f0fe82ff29225a48071ac6ebe1fbc0ae49356642a0943b13b0b2608c1e772c599809292c4079c16d90f9f1e7d69f8925102d8c1feba0593648a0c1d2c819da4fc25f8c38beac96bc8b25533c7581e2117c911254d8f48080a0a45d531264251deba88eb85c03e1826daddbb0b0bce37165e71d9236af892fc08080a04e425050083943d27aa01fdb706b5715693c18ed9ff8ef050fcd0c2ea292687aa09b9a3d00ec6310bd2f5714e5c60c7c597128add8087e18986dc18d716c6d011780a0fcf815ea12a633987173946bf59a53d93c461c71e47b3eee7cb07885027288f4a093b3dc885d64ad3421e67bf396530d92268a6ea17fe536e75f3d45ff2d6f034b80a0d3f01d4772d6326d75fad188647163487f5c5df4b809e33fffe344262fcaa398800000000000000000000000000000000000000000000000000000000000000000000000000000000000000073f8718080808080808080a0bb626d1fc2d928384c17de477f7b7170c65267b016976bc21305ebf39fc1543ca0f3ea5fd76e00ddbf83625e203d99441c86c44557e86896aad4ec87a4683bdf618080a0afebeaa9674e4a195459974044cf4da821d72aff3654d6d70b14ce90075c13f980808080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022e19f20aeeb5205bebd523c696a4b099033965d1bcb4af41ce5f3070145a8debd6601000000000000000000000000000000000000000000000000000000000000"), + BridgeSpecificData: bridgetestutils.MustConvertHexBridgeDataToBytes(t, "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000bc0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000001b8c0000000000000000000000000000000000000000000000000000000000000000debdfbead9da4e4e96744bb44a697fb9b5db11acd7bd6a2c78d58face684206970c451d3ddd756858ee282bcec7c3923065ba3b2988e91949025e6b4e77487de332e3e384bb4ce3a6fc7978d0dfc5945341c1473744ad3a41635fbd1fb4b9c6100000000000000000000000000000000000000000000000000000000000003e00001000000000000000000000000000000000000000000000000000000000dd7000000000000000000000000420000000000000000000000000000000000000700000000000000000000000058cc85b8d04ea49cc6dbd3cbffd00b4b8d6cb3ef0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004698800000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000204d764ad0b0001000000000000000000000000000000000000000000000000000000000d590000000000000000000000004200000000000000000000000000000000000010000000000000000000000000fbb0621e0b23b5478b630bd55a5f21f67730b0f10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001040166a07a0000000000000000000000005589bb8228c07c4e15558875faf2b859f678d129000000000000000000000000d08a2917653d4e460893203471f0000826fb4034000000000000000000000000fb023f4edb2aa1ebbcc07970f9c0541071713445000000000000000000000000e87704d3f0dd040fd2a49c3606043dd6fc05bf33000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000002e0000000000000000000000000000000000000000000000000000000000000052000000000000000000000000000000000000000000000000000000000000006a000000000000000000000000000000000000000000000000000000000000007400000000000000000000000000000000000000000000000000000000000000214f90211a0c37d9a90a47f430d6d54dabcbd2f364fdec4bbefa75aa69eab8f3cf50026de73a0a399109fd13eb2ebb25f5382c7bbe1a3d4c6433968ca9f19b78a0871e0cbf712a025225c15784b8550f2fb4d8257db8a352453c05b81013dc4a8f5fdfde94b2043a0b1fdf531766da35c16cae24330ec921abe5f7f950396fec11deea83db82346a4a0117a1e2d227b113cddb855f2af8fbed60661d0cb71e2ac0474f405ad359232f8a08a05951056d4a4e2e4ca1109d9c345aeaaf28f9be4a2a810b5652e69518ca609a02900527859b85e1008d498194a583a3effad975638925b6a1c6a8ff38ae2e804a0d466461fe5b2004b72cc68f4013ea3d2e6fc49b0b5598ff091724ed3a86fc2bfa0863849da3e275da0a24c159f0ec0c2bb2c1024fd254492f6a7f3abefff96a77ea0ed4a2b060237d351dd851375674b6dfb3d7a864281b1105b6a602c8f989962fda07e250d776e741b434bffd936ba18f8ea9c9f359672e80d93d3128bf060605ec1a08ff7943dae97c26473ac8062323fe14a28b33a892c710ef769a7ddbd1d13b2d8a0bb62fef18ac02456958d40d12353c27db1aca9b90edfe8a4de910e0e8cf27d9ba088e3c60cbf0b6f0ad69730ad3bf23825d8f9f8037544069669dfc3ae3a39f826a02cfaadf653fc6cc9bc182e8ae4a6f7736ab1b01363444aa65e8c1182d4fd8e7ea08a6919cd1b827d7e346cd9f5aa269c01e5179e3a79e9e050fcb1c34028d236e8800000000000000000000000000000000000000000000000000000000000000000000000000000000000000214f90211a0d83a5b715cffa9ff815a9cbede60d80e380c0d8b3f8433c1cfd9f9332ca96fcfa08f3d6be3e11f4a8d26b7b95f526c5997db678b7ade30fc4476f3b62513f636a0a00bd2482ce34a4dea248ad239a79f04082a73549cf115a2f9ef8b59f3a0ab32bea00bb41ca6732f1a882e39fd10cd1e46dcc524ad968bc19d35c20efcbc4d53844aa0d6bb21815ed32081c3987cb8d7f4b82971e856f10cf016f0f200c7481bc8e72da05eb07b5cd5ac9db7b8b112f21b68c911bbc8267bfaf715687a3c38fa520e6dd5a0651a7362fdc70b0dc0482f18f06aeb22c8b0a6025415680989f6c1fe8abad4f7a0cd2f2124bdc93e740643df5e0fd6c44c8d2fbb160cb31ae1379124af6185b3f0a0188c44d5164eff07559f80590db1b7b71dd6bd2caa8535ebaa917beb51777016a0838fb57029d1dcd8e8bdffe2c415631f6117d512cd1218754c1176ee1cf9e234a077a2600394a2b1ff56a36442b788589a4ebf2f72754b70f21a137c3a8a9a4593a01314e5e6eebd982c60dcc670e1e33f99304aee763578785b10ec7633c2d17c84a0d9b11242125a529dc046bec59277320e1ef2f73b83d4189afe0ab2a5e1db95efa0b40124e9a39f63fcbd93f2f2143ff5b2b9f336d5653dc55debded322cb555c44a0fd4817897049284c3fb2395c57c53e6254820a7c466e37ec409f93b5391db355a05dcf85c54422dd72a6d74b4f730a156290b290720164bd81f516f2f1118392d4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000154f90151a01f1a153520d71c7a9dee923b4f1a30c09f49f57e930d62072b80aa99460d9440a070d2af65cf4b7972e7bf9443f0fe82ff29225a48071ac6ebe1fbc0ae49356642a0943b13b0b2608c1e772c599809292c4079c16d90f9f1e7d69f8925102d8c1feba0593648a0c1d2c819da4fc25f8c38beac96bc8b25533c7581e2117c911254d8f48080a0a45d531264251deba88eb85c03e1826daddbb0b0bce37165e71d9236af892fc08080a04e425050083943d27aa01fdb706b5715693c18ed9ff8ef050fcd0c2ea292687aa09b9a3d00ec6310bd2f5714e5c60c7c597128add8087e18986dc18d716c6d011780a0fcf815ea12a633987173946bf59a53d93c461c71e47b3eee7cb07885027288f4a093b3dc885d64ad3421e67bf396530d92268a6ea17fe536e75f3d45ff2d6f034b80a0d3f01d4772d6326d75fad188647163487f5c5df4b809e33fffe344262fcaa398800000000000000000000000000000000000000000000000000000000000000000000000000000000000000073f8718080808080808080a0bb626d1fc2d928384c17de477f7b7170c65267b016976bc21305ebf39fc1543ca0f3ea5fd76e00ddbf83625e203d99441c86c44557e86896aad4ec87a4683bdf618080a0afebeaa9674e4a195459974044cf4da821d72aff3654d6d70b14ce90075c13f980808080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022e19f20aeeb5205bebd523c696a4b099033965d1bcb4af41ce5f3070145a8debd6601000000000000000000000000000000000000000000000000000000000000"), }, }, receivedLogs: nil, @@ -232,7 +233,7 @@ func Test_L2ToL1Bridge_partitionTransfers(t *testing.T) { ToChainSelector: l1ChainSelector, To: l1LiquidityManagerAddress, Amount: big.NewInt(7), - BridgeReturnData: mustPackBridgeTransferNonce(t, "0x0000000000000000000000000000000000000000000000000000000000000005"), + BridgeReturnData: bridgetestutils.MustPackBridgeData(t, "0x0000000000000000000000000000000000000000000000000000000000000005"), BridgeSpecificData: []byte{}, }, }, @@ -255,8 +256,8 @@ func Test_L2ToL1Bridge_partitionTransfers(t *testing.T) { require.Error(t, err) } else { require.NoError(t, err) - assertLiquidityTransferredEventSlicesEqual(t, tt.wantNeedsToBeProven, gotNeedsToBeProven, sortByBridgeReturnData) - assertLiquidityTransferredEventSlicesEqual(t, tt.wantNeedsToBeFinalized, gotNeedsToBeFinalized, sortByBridgeReturnData) + bridgetestutils.AssertLiquidityTransferredEventSlicesEqual(t, tt.wantNeedsToBeProven, gotNeedsToBeProven, bridgetestutils.SortByBridgeReturnData) + bridgetestutils.AssertLiquidityTransferredEventSlicesEqual(t, tt.wantNeedsToBeFinalized, gotNeedsToBeFinalized, bridgetestutils.SortByBridgeReturnData) assert.Equal(t, tt.wantMissingSent, gotMissingSent) } }) diff --git a/core/services/ocr2/plugins/liquiditymanager/bridge/testonlybridge/l1_to_l1.go b/core/services/ocr2/plugins/liquiditymanager/bridge/testonlybridge/l1_to_l1.go index 7bed294bbb..1ee8096df2 100644 --- a/core/services/ocr2/plugins/liquiditymanager/bridge/testonlybridge/l1_to_l1.go +++ b/core/services/ocr2/plugins/liquiditymanager/bridge/testonlybridge/l1_to_l1.go @@ -51,13 +51,13 @@ type testBridge struct { } func New( + ctx context.Context, sourceSelector, destSelector models.NetworkSelector, sourceLiquidityManagerAddress, destLiquidityManagerAddress, sourceAdapter, destAdapter models.Address, sourceLogPoller, destLogPoller logpoller.LogPoller, sourceClient, destClient client.Client, lggr logger.Logger, ) (*testBridge, error) { - ctx := context.Background() err := sourceLogPoller.RegisterFilter( ctx, logpoller.Filter{ diff --git a/core/services/ocr2/plugins/liquiditymanager/bridge/testonlybridge/l1_to_l1_test.go b/core/services/ocr2/plugins/liquiditymanager/bridge/testonlybridge/l1_to_l1_test.go index af0c5b002d..24cc849e8e 100644 --- a/core/services/ocr2/plugins/liquiditymanager/bridge/testonlybridge/l1_to_l1_test.go +++ b/core/services/ocr2/plugins/liquiditymanager/bridge/testonlybridge/l1_to_l1_test.go @@ -728,7 +728,7 @@ func TestNew(t *testing.T) { t.Run(tt.name, func(t *testing.T) { tt.expect(t, tt.args) defer tt.assert(t, tt.args) - got, err := New(tt.args.sourceSelector, tt.args.destSelector, tt.args.sourceLiquidityManagerAddress, tt.args.destLiquidityManagerAddress, tt.args.sourceAdapter, tt.args.destAdapter, tt.args.sourceLogPoller, tt.args.destLogPoller, tt.args.sourceClient, tt.args.destClient, tt.args.lggr) + got, err := New(testutils.Context(t), tt.args.sourceSelector, tt.args.destSelector, tt.args.sourceLiquidityManagerAddress, tt.args.destLiquidityManagerAddress, tt.args.sourceAdapter, tt.args.destAdapter, tt.args.sourceLogPoller, tt.args.destLogPoller, tt.args.sourceClient, tt.args.destClient, tt.args.lggr) if tt.wantErr { require.Error(t, err) } else { diff --git a/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/test_helper.go b/core/services/ocr2/plugins/liquiditymanager/bridge/testutils/test_utils.go similarity index 83% rename from core/services/ocr2/plugins/liquiditymanager/bridge/opstack/test_helper.go rename to core/services/ocr2/plugins/liquiditymanager/bridge/testutils/test_utils.go index 965fb94fea..1324dfb9d5 100644 --- a/core/services/ocr2/plugins/liquiditymanager/bridge/opstack/test_helper.go +++ b/core/services/ocr2/plugins/liquiditymanager/bridge/testutils/test_utils.go @@ -1,4 +1,4 @@ -package opstack +package testutils import ( "encoding/hex" @@ -11,7 +11,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/liquiditymanager/generated/liquiditymanager" ) -func assertLiquidityTransferredEventSlicesEqual( +func AssertLiquidityTransferredEventSlicesEqual( t *testing.T, expected, actual []*liquiditymanager.LiquidityManagerLiquidityTransferred, @@ -35,17 +35,17 @@ func assertLiquidityTransferredEventSlicesEqual( } } -func sortByBridgeReturnData(a, b *liquiditymanager.LiquidityManagerLiquidityTransferred) bool { +func SortByBridgeReturnData(a, b *liquiditymanager.LiquidityManagerLiquidityTransferred) bool { return hex.EncodeToString(a.BridgeReturnData) < hex.EncodeToString(b.BridgeReturnData) } -func mustPackBridgeTransferNonce(t *testing.T, bridgeDataHex string) []byte { +func MustPackBridgeData(t *testing.T, bridgeDataHex string) []byte { packed, err := hex.DecodeString(bridgeDataHex[2:]) require.NoError(t, err) return packed } -func mustConvertHexBridgeSpecificDataToBytes(t *testing.T, hexData string) []byte { +func MustConvertHexBridgeDataToBytes(t *testing.T, hexData string) []byte { packed, err := hex.DecodeString(hexData[2:]) require.NoError(t, err) return packed diff --git a/core/services/ocr2/plugins/liquiditymanager/factory.go b/core/services/ocr2/plugins/liquiditymanager/factory.go index f44052b431..754fcca9a8 100644 --- a/core/services/ocr2/plugins/liquiditymanager/factory.go +++ b/core/services/ocr2/plugins/liquiditymanager/factory.go @@ -11,8 +11,8 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/bridge" liquiditymanager "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/chain/evm" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/discoverer" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/liquidityrebalancer" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/models" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/rebalalgo" ) const ( @@ -60,14 +60,14 @@ func NewPluginFactory( }, nil } -func (p PluginFactory) buildRebalancer() (liquidityrebalancer.Rebalancer, error) { +func (p PluginFactory) buildRebalancer() (rebalalgo.RebalancingAlgo, error) { switch p.config.RebalancerConfig.Type { case models.RebalancerTypePingPong: - return liquidityrebalancer.NewPingPong(), nil + return rebalalgo.NewPingPong(), nil case models.RebalancerTypeMinLiquidity: - return liquidityrebalancer.NewMinLiquidityRebalancer(p.lggr), nil + return rebalalgo.NewMinLiquidityRebalancer(p.lggr), nil case models.RebalancerTypeTargetAndMin: - return liquidityrebalancer.NewTargetMinBalancer(p.lggr), nil + return rebalalgo.NewTargetMinBalancer(p.lggr, p.config), nil default: return nil, fmt.Errorf("invalid rebalancer type %s", p.config.RebalancerConfig.Type) } diff --git a/core/services/ocr2/plugins/liquiditymanager/graph/graph.go b/core/services/ocr2/plugins/liquiditymanager/graph/graph.go index 287272a9d1..fcea5e5957 100644 --- a/core/services/ocr2/plugins/liquiditymanager/graph/graph.go +++ b/core/services/ocr2/plugins/liquiditymanager/graph/graph.go @@ -10,11 +10,12 @@ import ( // GraphWriter provides write access to the liquidity graph. type GraphWriter interface { + // Add adds new data and connection to the graph. Add(from, to Data) error - // AddEdges adds a list of edges to the graph. - AddEdges(edges []models.Edge) error // SetLiquidity sets the liquidity of the provided network. SetLiquidity(n models.NetworkSelector, liquidity *big.Int) bool + // SetTargetLiquidity sets the target liquidity of the provided network. + SetTargetLiquidity(n models.NetworkSelector, liquidity *big.Int) bool } // NodeReader provides read access to the data saved in the graph nodes. diff --git a/core/services/ocr2/plugins/liquiditymanager/graph/reader_test.go b/core/services/ocr2/plugins/liquiditymanager/graph/reader_test.go new file mode 100644 index 0000000000..58721e9081 --- /dev/null +++ b/core/services/ocr2/plugins/liquiditymanager/graph/reader_test.go @@ -0,0 +1,182 @@ +package graph + +import ( + "math/big" + "testing" + + "github.com/ethereum/go-ethereum/common" + "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/models" +) + +func TestGrpah_NodeReaderGetters(t *testing.T) { + g := NewGraph() + + data1 := Data{ + Liquidity: big.NewInt(1), + TokenAddress: models.Address(common.HexToAddress("0x11")), + LiquidityManagerAddress: models.Address(common.HexToAddress("0x12")), + XChainLiquidityManagers: map[models.NetworkSelector]XChainLiquidityManagerData{}, + ConfigDigest: models.ConfigDigest{ + ConfigDigest: [32]byte{1}, + }, + NetworkSelector: models.NetworkSelector(1), + } + require.True(t, g.(GraphTest).AddNetwork(models.NetworkSelector(1), data1)) + + tests := []struct { + name string + net models.NetworkSelector + data *Data + }{ + { + name: "happy path", + net: models.NetworkSelector(1), + data: &data1, + }, + { + name: "not exist", + net: models.NetworkSelector(333), + data: nil, + }, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + liq, err := g.GetLiquidity(tc.net) + if tc.data == nil { + require.Error(t, err) + } else { + require.NoError(t, err) + require.Equal(t, tc.data.Liquidity, liq) + } + + tokenAddr, err := g.GetTokenAddress(tc.net) + if tc.data == nil { + require.Error(t, err) + } else { + require.NoError(t, err) + require.Equal(t, tc.data.TokenAddress, tokenAddr) + } + + liqManagerAddr, err := g.GetLiquidityManagerAddress(tc.net) + if tc.data == nil { + require.Error(t, err) + } else { + require.NoError(t, err) + require.Equal(t, tc.data.LiquidityManagerAddress, liqManagerAddr) + } + + xChainData, err := g.GetXChainLiquidityManagerData(tc.net) + if tc.data == nil { + require.Error(t, err) + } else { + require.NoError(t, err) + require.Equal(t, tc.data.XChainLiquidityManagers, xChainData) + } + + data, err := g.GetData(tc.net) + if tc.data == nil { + require.Error(t, err) + } else { + require.NoError(t, err) + require.True(t, tc.data.Equals(data)) + } + }) + } +} + +func TestGraph_FindPath(t *testing.T) { + g := NewGraph() + + data1 := Data{ + Liquidity: big.NewInt(1), + TokenAddress: models.Address(common.HexToAddress("0x11")), + LiquidityManagerAddress: models.Address(common.HexToAddress("0x12")), + XChainLiquidityManagers: map[models.NetworkSelector]XChainLiquidityManagerData{}, + ConfigDigest: models.ConfigDigest{ + ConfigDigest: [32]byte{1}, + }, + NetworkSelector: models.NetworkSelector(1), + } + require.True(t, g.(GraphTest).AddNetwork(models.NetworkSelector(1), data1)) + + data2 := Data{ + Liquidity: big.NewInt(2), + TokenAddress: models.Address(common.HexToAddress("0x21")), + LiquidityManagerAddress: models.Address(common.HexToAddress("0x22")), + XChainLiquidityManagers: map[models.NetworkSelector]XChainLiquidityManagerData{}, + ConfigDigest: models.ConfigDigest{ + ConfigDigest: [32]byte{2}, + }, + NetworkSelector: models.NetworkSelector(2), + } + require.True(t, g.(GraphTest).AddNetwork(models.NetworkSelector(2), data2)) + + data3 := Data{ + Liquidity: big.NewInt(3), + TokenAddress: models.Address(common.HexToAddress("0x31")), + LiquidityManagerAddress: models.Address(common.HexToAddress("0x32")), + XChainLiquidityManagers: map[models.NetworkSelector]XChainLiquidityManagerData{}, + ConfigDigest: models.ConfigDigest{ + ConfigDigest: [32]byte{3}, + }, + NetworkSelector: models.NetworkSelector(3), + } + require.True(t, g.(GraphTest).AddNetwork(models.NetworkSelector(3), data3)) + + require.NoError(t, g.(GraphTest).AddConnection(models.NetworkSelector(1), models.NetworkSelector(2))) + require.NoError(t, g.(GraphTest).AddConnection(models.NetworkSelector(2), models.NetworkSelector(3))) + + tests := []struct { + name string + from models.NetworkSelector + to models.NetworkSelector + maxEdges int + want []models.NetworkSelector + }{ + { + name: "happy path 2 edges", + from: models.NetworkSelector(1), + to: models.NetworkSelector(3), + maxEdges: 2, + want: []models.NetworkSelector{models.NetworkSelector(2), models.NetworkSelector(3)}, + }, + { + name: "happy path 1 edge", + from: models.NetworkSelector(1), + to: models.NetworkSelector(2), + maxEdges: 1, + want: []models.NetworkSelector{models.NetworkSelector(2)}, + }, + { + name: "not enough edges", + from: models.NetworkSelector(1), + to: models.NetworkSelector(3), + maxEdges: 1, + want: []models.NetworkSelector{}, + }, + { + name: "no path", + from: models.NetworkSelector(2), + to: models.NetworkSelector(10), + want: []models.NetworkSelector{}, + }, + { + name: "same node", + from: models.NetworkSelector(1), + to: models.NetworkSelector(1), + want: []models.NetworkSelector{}, + }, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + path := g.FindPath(tc.from, tc.to, tc.maxEdges, func(nodes ...Data) bool { + return true + }) + require.Equal(t, tc.want, path) + }) + } +} diff --git a/core/services/ocr2/plugins/liquiditymanager/graph/writer.go b/core/services/ocr2/plugins/liquiditymanager/graph/writer.go index 2da8207d0d..8671087b12 100644 --- a/core/services/ocr2/plugins/liquiditymanager/graph/writer.go +++ b/core/services/ocr2/plugins/liquiditymanager/graph/writer.go @@ -20,19 +20,28 @@ func (g *liquidityGraph) Add(from, to Data) error { return nil } -func (g *liquidityGraph) AddEdges(edges []models.Edge) error { +func (g *liquidityGraph) SetLiquidity(n models.NetworkSelector, liquidity *big.Int) bool { g.lock.Lock() defer g.lock.Unlock() - for _, edge := range edges { - if err := g.addConnection(edge.Source, edge.Dest); err != nil { - return fmt.Errorf("add connection %d -> %d: %w", edge.Source, edge.Dest, err) - } + if !g.hasNetwork(n) { + return false } - return nil + + prev := g.data[n] + g.data[n] = Data{ + Liquidity: liquidity, + TokenAddress: prev.TokenAddress, + LiquidityManagerAddress: prev.LiquidityManagerAddress, + ConfigDigest: prev.ConfigDigest, + NetworkSelector: prev.NetworkSelector, + MinimumLiquidity: prev.MinimumLiquidity, + TargetLiquidity: prev.TargetLiquidity, + } + return true } -func (g *liquidityGraph) SetLiquidity(n models.NetworkSelector, liquidity *big.Int) bool { +func (g *liquidityGraph) SetTargetLiquidity(n models.NetworkSelector, target *big.Int) bool { g.lock.Lock() defer g.lock.Unlock() @@ -42,13 +51,13 @@ func (g *liquidityGraph) SetLiquidity(n models.NetworkSelector, liquidity *big.I prev := g.data[n] g.data[n] = Data{ - Liquidity: liquidity, + Liquidity: prev.Liquidity, TokenAddress: prev.TokenAddress, LiquidityManagerAddress: prev.LiquidityManagerAddress, ConfigDigest: prev.ConfigDigest, NetworkSelector: prev.NetworkSelector, MinimumLiquidity: prev.MinimumLiquidity, - TargetLiquidity: prev.TargetLiquidity, + TargetLiquidity: target, } return true } diff --git a/core/services/ocr2/plugins/liquiditymanager/mocks/rebalancer_mock.go b/core/services/ocr2/plugins/liquiditymanager/mocks/rebalancer_mock.go index 82a7fc95a1..31a011710a 100644 --- a/core/services/ocr2/plugins/liquiditymanager/mocks/rebalancer_mock.go +++ b/core/services/ocr2/plugins/liquiditymanager/mocks/rebalancer_mock.go @@ -4,19 +4,20 @@ package mocks import ( graph "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/graph" - liquidityrebalancer "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/liquidityrebalancer" mock "github.com/stretchr/testify/mock" models "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/models" + + rebalalgo "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/rebalalgo" ) -// Rebalancer is an autogenerated mock type for the Rebalancer type -type Rebalancer struct { +// RebalancingAlgo is an autogenerated mock type for the RebalancingAlgo type +type RebalancingAlgo struct { mock.Mock } // ComputeTransfersToBalance provides a mock function with given fields: g, unexecuted -func (_m *Rebalancer) ComputeTransfersToBalance(g graph.Graph, unexecuted []liquidityrebalancer.UnexecutedTransfer) ([]models.ProposedTransfer, error) { +func (_m *RebalancingAlgo) ComputeTransfersToBalance(g graph.Graph, unexecuted []rebalalgo.UnexecutedTransfer) ([]models.ProposedTransfer, error) { ret := _m.Called(g, unexecuted) if len(ret) == 0 { @@ -25,10 +26,10 @@ func (_m *Rebalancer) ComputeTransfersToBalance(g graph.Graph, unexecuted []liqu var r0 []models.ProposedTransfer var r1 error - if rf, ok := ret.Get(0).(func(graph.Graph, []liquidityrebalancer.UnexecutedTransfer) ([]models.ProposedTransfer, error)); ok { + if rf, ok := ret.Get(0).(func(graph.Graph, []rebalalgo.UnexecutedTransfer) ([]models.ProposedTransfer, error)); ok { return rf(g, unexecuted) } - if rf, ok := ret.Get(0).(func(graph.Graph, []liquidityrebalancer.UnexecutedTransfer) []models.ProposedTransfer); ok { + if rf, ok := ret.Get(0).(func(graph.Graph, []rebalalgo.UnexecutedTransfer) []models.ProposedTransfer); ok { r0 = rf(g, unexecuted) } else { if ret.Get(0) != nil { @@ -36,7 +37,7 @@ func (_m *Rebalancer) ComputeTransfersToBalance(g graph.Graph, unexecuted []liqu } } - if rf, ok := ret.Get(1).(func(graph.Graph, []liquidityrebalancer.UnexecutedTransfer) error); ok { + if rf, ok := ret.Get(1).(func(graph.Graph, []rebalalgo.UnexecutedTransfer) error); ok { r1 = rf(g, unexecuted) } else { r1 = ret.Error(1) @@ -45,13 +46,13 @@ func (_m *Rebalancer) ComputeTransfersToBalance(g graph.Graph, unexecuted []liqu return r0, r1 } -// NewRebalancer creates a new instance of Rebalancer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// NewRebalancingAlgo creates a new instance of RebalancingAlgo. 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 NewRebalancer(t interface { +func NewRebalancingAlgo(t interface { mock.TestingT Cleanup(func()) -}) *Rebalancer { - mock := &Rebalancer{} +}) *RebalancingAlgo { + mock := &RebalancingAlgo{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) diff --git a/core/services/ocr2/plugins/liquiditymanager/models/config.go b/core/services/ocr2/plugins/liquiditymanager/models/config.go index d7ab10662f..aaa4258651 100644 --- a/core/services/ocr2/plugins/liquiditymanager/models/config.go +++ b/core/services/ocr2/plugins/liquiditymanager/models/config.go @@ -3,6 +3,7 @@ package models import ( "errors" "fmt" + "math/big" "slices" ) @@ -16,7 +17,10 @@ type PluginConfig struct { } type RebalancerConfig struct { - Type string `json:"type"` + Type string `json:"type"` + DefaultTarget *big.Int `json:"defaultTarget"` + // NetworkTargetOverrides is a map of NetworkSelector to big Int amounts + NetworkTargetOverrides map[NetworkSelector]*big.Int `json:"networkTargetOverrides"` } func ValidateRebalancerConfig(config RebalancerConfig) error { @@ -41,6 +45,7 @@ var ( AllRebalancerTypes = []string{ RebalancerTypePingPong, RebalancerTypeMinLiquidity, + RebalancerTypeTargetAndMin, } ) diff --git a/core/services/ocr2/plugins/liquiditymanager/plugin.go b/core/services/ocr2/plugins/liquiditymanager/plugin.go index 2ebb0afeb3..9917196061 100644 --- a/core/services/ocr2/plugins/liquiditymanager/plugin.go +++ b/core/services/ocr2/plugins/liquiditymanager/plugin.go @@ -20,8 +20,8 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/discoverer" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/graph" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/inflight" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/liquidityrebalancer" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/models" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/rebalalgo" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/rebalcalc" ) @@ -33,7 +33,7 @@ type Plugin struct { bridgeFactory bridge.Factory mu sync.RWMutex liquidityGraph graph.Graph - liquidityRebalancer liquidityrebalancer.Rebalancer + liquidityRebalancer rebalalgo.RebalancingAlgo inflight inflight.Container lggr logger.Logger reportCodec evmliquiditymanager.OnchainReportCodec @@ -47,7 +47,7 @@ func NewPlugin( liquidityManagerFactory evmliquiditymanager.Factory, discoverer discoverer.Discoverer, bridgeFactory bridge.Factory, - liquidityRebalancer liquidityrebalancer.Rebalancer, + liquidityRebalancer rebalalgo.RebalancingAlgo, reportCodec evmliquiditymanager.OnchainReportCodec, lggr logger.Logger, ) *Plugin { @@ -217,8 +217,8 @@ func combinedUnexecutedTransfers( pendingTransfers []models.PendingTransfer, resolvedTransfersQuorum []models.Transfer, inflightTransfers []models.Transfer, -) []liquidityrebalancer.UnexecutedTransfer { - unexecuted := make([]liquidityrebalancer.UnexecutedTransfer, 0, len(resolvedTransfersQuorum)+len(inflightTransfers)+len(pendingTransfers)) +) []rebalalgo.UnexecutedTransfer { + unexecuted := make([]rebalalgo.UnexecutedTransfer, 0, len(resolvedTransfersQuorum)+len(inflightTransfers)+len(pendingTransfers)) for _, resolvedTransfer := range resolvedTransfersQuorum { unexecuted = append(unexecuted, resolvedTransfer) } @@ -507,7 +507,7 @@ func (p *Plugin) loadPendingTransfers(ctx context.Context, lggr logger.Logger) ( } for _, edge := range edges { logger := lggr.With("sourceNetwork", edge.Source, "sourceChainID", edge.Source.ChainID(), "destNetwork", edge.Dest, "destChainID", edge.Dest.ChainID()) - bridge, err := p.bridgeFactory.NewBridge(edge.Source, edge.Dest) + bridge, err := p.bridgeFactory.NewBridge(ctx, edge.Source, edge.Dest) if err != nil { return nil, fmt.Errorf("init bridge: %w", err) } @@ -607,7 +607,7 @@ func (p *Plugin) computeResolvedTransfersQuorum(observations []models.Observatio } medianizedNativeFee := rebalcalc.BigIntSortedMiddle(bridgeFees) medianizedDateUnix := rebalcalc.BigIntSortedMiddle(datesUnix) - bridge, err := p.bridgeFactory.NewBridge(k.From, k.To) + bridge, err := p.bridgeFactory.GetBridge(k.From, k.To) if err != nil { return nil, fmt.Errorf("init bridge: %w", err) } @@ -650,7 +650,7 @@ func (p *Plugin) resolveProposedTransfers(ctx context.Context, lggr logger.Logge resolvedTransfers := make([]models.Transfer, 0, len(outcome.ProposedTransfers)) for _, proposedTransfer := range outcome.ProposedTransfers { - bridge, err := p.bridgeFactory.NewBridge(proposedTransfer.From, proposedTransfer.To) + bridge, err := p.bridgeFactory.NewBridge(ctx, proposedTransfer.From, proposedTransfer.To) if err != nil { return nil, fmt.Errorf("init bridge: %w", err) } diff --git a/core/services/ocr2/plugins/liquiditymanager/plugin_test.go b/core/services/ocr2/plugins/liquiditymanager/plugin_test.go index cb377fdfa6..aeb0501083 100644 --- a/core/services/ocr2/plugins/liquiditymanager/plugin_test.go +++ b/core/services/ocr2/plugins/liquiditymanager/plugin_test.go @@ -30,9 +30,9 @@ import ( liquiditymanagermocks "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/chain/evm/mocks" discoverermocks "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/discoverer/mocks" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/graph" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/liquidityrebalancer" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/mocks" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/models" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/rebalalgo" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/liquiditymanager/testhelpers" ) @@ -289,7 +289,7 @@ func TestPlugin_Observation(t *testing.T) { for sourceDest, bridgeFn := range tc.bridges { br, err2 := bridgeFn(t) p.bridgeFactory. - On("NewBridge", sourceDest[0], sourceDest[1]). + On("NewBridge", ctx, sourceDest[0], sourceDest[1]). Return(br, err2) } @@ -660,7 +660,7 @@ func TestPlugin_Outcome(t *testing.T) { for sourceDest, bridgeFn := range tc.bridges { br, err := bridgeFn(t) p.bridgeFactory. - On("NewBridge", sourceDest[0], sourceDest[1]). + On("GetBridge", sourceDest[0], sourceDest[1]). Return(br, err) } @@ -1135,7 +1135,8 @@ func TestPlugin_E2EWithMocks(t *testing.T) { for _, edge := range edges { br, ok := n.bridges[[2]models.NetworkSelector{edge.Source, edge.Dest}] require.True(t, ok, "the test case is wrong, bridge is not defined %d->%d", edge.Source, edge.Dest) - n.bridgeFactory.On("NewBridge", edge.Source, edge.Dest).Return(br, nil).Maybe() + n.bridgeFactory.On("NewBridge", mock.Anything /* cancelContext */, edge.Source, edge.Dest).Return(br, nil).Maybe() + n.bridgeFactory.On("GetBridge", edge.Source, edge.Dest).Return(br, nil).Maybe() pendingTransfers := make([]models.PendingTransfer, 0) for _, tr := range round.pendingTransfersPerNode[i] { @@ -1563,7 +1564,7 @@ func newNode(t *testing.T, lggr logger.Logger, f int) node { // discovererMock.On("Discover", mock.Anything).Return(g, nil).Maybe() discovererFactory.On("NewDiscoverer", mock.Anything, mock.Anything).Return(discovererMock, nil).Maybe() bridgeFactory := bridgemocks.NewFactory(t) - rebalancerAlg := liquidityrebalancer.NewPingPong() + rebalancerAlg := rebalalgo.NewPingPong() node1 := NewPlugin( f, @@ -1603,7 +1604,7 @@ type pluginWithMocks struct { lmFactory *mocks.Factory discovererFactory *discoverermocks.Factory bridgeFactory *bridgemocks.Factory - rebalancerAlg *liquidityrebalancer.PingPong + rebalancerAlg *rebalalgo.PingPong } func newPluginWithMocksAndDefaults(t *testing.T) *pluginWithMocks { @@ -1625,7 +1626,7 @@ func newPluginWithMocks( discovererMock := discoverermocks.NewDiscoverer(t) discovererFactory.On("NewDiscoverer", mock.Anything, mock.Anything).Return(discovererMock, nil).Maybe() bridgeFactory := bridgemocks.NewFactory(t) - rebalancerAlg := liquidityrebalancer.NewPingPong() + rebalancerAlg := rebalalgo.NewPingPong() return &pluginWithMocks{ plugin: NewPlugin( f, diff --git a/core/services/ocr2/plugins/liquiditymanager/liquidityrebalancer/common.go b/core/services/ocr2/plugins/liquiditymanager/rebalalgo/common.go similarity index 99% rename from core/services/ocr2/plugins/liquiditymanager/liquidityrebalancer/common.go rename to core/services/ocr2/plugins/liquiditymanager/rebalalgo/common.go index 3165d59384..34add8a14f 100644 --- a/core/services/ocr2/plugins/liquiditymanager/liquidityrebalancer/common.go +++ b/core/services/ocr2/plugins/liquiditymanager/rebalalgo/common.go @@ -1,4 +1,4 @@ -package liquidityrebalancer +package rebalalgo import ( "fmt" diff --git a/core/services/ocr2/plugins/liquiditymanager/liquidityrebalancer/minimum_balance.go b/core/services/ocr2/plugins/liquiditymanager/rebalalgo/minimum_balance.go similarity index 99% rename from core/services/ocr2/plugins/liquiditymanager/liquidityrebalancer/minimum_balance.go rename to core/services/ocr2/plugins/liquiditymanager/rebalalgo/minimum_balance.go index 143b073e4f..60de4141a3 100644 --- a/core/services/ocr2/plugins/liquiditymanager/liquidityrebalancer/minimum_balance.go +++ b/core/services/ocr2/plugins/liquiditymanager/rebalalgo/minimum_balance.go @@ -1,4 +1,4 @@ -package liquidityrebalancer +package rebalalgo import ( "fmt" diff --git a/core/services/ocr2/plugins/liquiditymanager/liquidityrebalancer/minimum_balance_test.go b/core/services/ocr2/plugins/liquiditymanager/rebalalgo/minimum_balance_test.go similarity index 99% rename from core/services/ocr2/plugins/liquiditymanager/liquidityrebalancer/minimum_balance_test.go rename to core/services/ocr2/plugins/liquiditymanager/rebalalgo/minimum_balance_test.go index 491b6e7370..05c9716f88 100644 --- a/core/services/ocr2/plugins/liquiditymanager/liquidityrebalancer/minimum_balance_test.go +++ b/core/services/ocr2/plugins/liquiditymanager/rebalalgo/minimum_balance_test.go @@ -1,4 +1,4 @@ -package liquidityrebalancer +package rebalalgo import ( "math/big" diff --git a/core/services/ocr2/plugins/liquiditymanager/liquidityrebalancer/pingpong.go b/core/services/ocr2/plugins/liquiditymanager/rebalalgo/pingpong.go similarity index 99% rename from core/services/ocr2/plugins/liquiditymanager/liquidityrebalancer/pingpong.go rename to core/services/ocr2/plugins/liquiditymanager/rebalalgo/pingpong.go index 0dec82241a..97084b1ec9 100644 --- a/core/services/ocr2/plugins/liquiditymanager/liquidityrebalancer/pingpong.go +++ b/core/services/ocr2/plugins/liquiditymanager/rebalalgo/pingpong.go @@ -1,4 +1,4 @@ -package liquidityrebalancer +package rebalalgo import ( "fmt" diff --git a/core/services/ocr2/plugins/liquiditymanager/liquidityrebalancer/pingpong_test.go b/core/services/ocr2/plugins/liquiditymanager/rebalalgo/pingpong_test.go similarity index 99% rename from core/services/ocr2/plugins/liquiditymanager/liquidityrebalancer/pingpong_test.go rename to core/services/ocr2/plugins/liquiditymanager/rebalalgo/pingpong_test.go index edbaf7b038..7a9c36094e 100644 --- a/core/services/ocr2/plugins/liquiditymanager/liquidityrebalancer/pingpong_test.go +++ b/core/services/ocr2/plugins/liquiditymanager/rebalalgo/pingpong_test.go @@ -1,4 +1,4 @@ -package liquidityrebalancer +package rebalalgo import ( "math/big" diff --git a/core/services/ocr2/plugins/liquiditymanager/liquidityrebalancer/rebalancer.go b/core/services/ocr2/plugins/liquiditymanager/rebalalgo/rebalancer.go similarity index 85% rename from core/services/ocr2/plugins/liquiditymanager/liquidityrebalancer/rebalancer.go rename to core/services/ocr2/plugins/liquiditymanager/rebalalgo/rebalancer.go index 64f4112fe5..4b479a423f 100644 --- a/core/services/ocr2/plugins/liquiditymanager/liquidityrebalancer/rebalancer.go +++ b/core/services/ocr2/plugins/liquiditymanager/rebalalgo/rebalancer.go @@ -1,4 +1,4 @@ -package liquidityrebalancer +package rebalalgo import ( "math/big" @@ -17,8 +17,8 @@ type UnexecutedTransfer interface { TransferStatus() models.TransferStatus } -//go:generate mockery --quiet --name Rebalancer --output ../mocks --filename rebalancer_mock.go --case=underscore -type Rebalancer interface { +//go:generate mockery --quiet --name RebalancingAlgo --output ../mocks --filename rebalancer_mock.go --case=underscore +type RebalancingAlgo interface { // ComputeTransfersToBalance computes the transfers needed to balance the // liquidity across the provided graph. The rebalancer will also take into account // currently unexecuted transfers to avoid proposing transfers that would be diff --git a/core/services/ocr2/plugins/liquiditymanager/liquidityrebalancer/target_balance_with_minimum.go b/core/services/ocr2/plugins/liquiditymanager/rebalalgo/target_balance_with_minimum.go similarity index 67% rename from core/services/ocr2/plugins/liquiditymanager/liquidityrebalancer/target_balance_with_minimum.go rename to core/services/ocr2/plugins/liquiditymanager/rebalalgo/target_balance_with_minimum.go index 326de9fcc2..b7e492f541 100644 --- a/core/services/ocr2/plugins/liquiditymanager/liquidityrebalancer/target_balance_with_minimum.go +++ b/core/services/ocr2/plugins/liquiditymanager/rebalalgo/target_balance_with_minimum.go @@ -1,4 +1,4 @@ -package liquidityrebalancer +package rebalalgo import ( "fmt" @@ -13,16 +13,18 @@ import ( // TargetMinBalancer tries to reach balance using a target and minimum liquidity that is configured on each network. type TargetMinBalancer struct { - lggr logger.Logger + lggr logger.Logger + config models.PluginConfig } -func NewTargetMinBalancer(lggr logger.Logger) *TargetMinBalancer { +func NewTargetMinBalancer(lggr logger.Logger, config models.PluginConfig) *TargetMinBalancer { return &TargetMinBalancer{ - lggr: lggr.With("service", "TargetMinBalancer"), + lggr: lggr.With("service", "TargetMinBalancer"), + config: config, } } -type determineTransfersFunc func(graphLater graph.Graph, targetNetwork models.NetworkSelector, networkFunds map[models.NetworkSelector]*Funds) ([]models.ProposedTransfer, error) +type determineTransfersFunc func(graphFuture graph.Graph, targetNetwork models.NetworkSelector, networkFunds map[models.NetworkSelector]*Funds) ([]models.ProposedTransfer, error) func (r *TargetMinBalancer) ComputeTransfersToBalance(graphNow graph.Graph, nonExecutedTransfers []UnexecutedTransfer) ([]models.ProposedTransfer, error) { nonExecutedTransfers = filterUnexecutedTransfers(nonExecutedTransfers) @@ -59,13 +61,13 @@ func (r *TargetMinBalancer) ComputeTransfersToBalance(graphNow graph.Graph, nonE func (r *TargetMinBalancer) rebalancingRound(graphNow graph.Graph, nonExecutedTransfers []UnexecutedTransfer, transfersFunc determineTransfersFunc) ([]models.ProposedTransfer, error) { var err error - graphLater, err := getExpectedGraph(graphNow, nonExecutedTransfers) + graphFuture, err := r.getExpectedGraph(graphNow, nonExecutedTransfers) if err != nil { return nil, fmt.Errorf("get expected graph: %w", err) } r.lggr.Debugf("finding networks that require funding") - networksRequiringFunding, networkFunds, err := r.findNetworksRequiringFunding(graphNow, graphLater) + networksRequiringFunding, networkFunds, err := r.findNetworksRequiringFunding(graphNow, graphFuture) if err != nil { return nil, fmt.Errorf("find networks that require funding: %w", err) } @@ -75,17 +77,17 @@ func (r *TargetMinBalancer) rebalancingRound(graphNow graph.Graph, nonExecutedTr proposedTransfers := make([]models.ProposedTransfer, 0) for _, net := range networksRequiringFunding { r.lggr.Debugf("finding transfers for network %v", net) - potentialTransfers, err1 := transfersFunc(graphLater, net, networkFunds) + potentialTransfers, err1 := transfersFunc(graphFuture, net, networkFunds) if err1 != nil { return nil, fmt.Errorf("finding transfers for network %v: %w", net, err1) } - dataLater, err2 := graphLater.GetData(net) + dataFuture, err2 := graphFuture.GetData(net) if err2 != nil { - return nil, fmt.Errorf("get data later of net %v: %w", net, err2) + return nil, fmt.Errorf("get future data of net %v: %w", net, err2) } - liqDiffLater := new(big.Int).Sub(dataLater.TargetLiquidity, dataLater.Liquidity) - netProposedTransfers, err3 := r.applyProposedTransfers(graphLater, potentialTransfers, liqDiffLater) + liqDiffFuture := new(big.Int).Sub(dataFuture.TargetLiquidity, dataFuture.Liquidity) + netProposedTransfers, err3 := r.applyProposedTransfers(graphFuture, potentialTransfers, liqDiffFuture) if err3 != nil { return nil, fmt.Errorf("applying transfers: %w", err3) } @@ -95,62 +97,101 @@ func (r *TargetMinBalancer) rebalancingRound(graphNow graph.Graph, nonExecutedTr return proposedTransfers, nil } -func (r *TargetMinBalancer) findNetworksRequiringFunding(graphNow, graphLater graph.Graph) ([]models.NetworkSelector, map[models.NetworkSelector]*Funds, error) { - mapNetworkFunds := make(map[models.NetworkSelector]*Funds) - liqDiffsLater := make(map[models.NetworkSelector]*big.Int) +// getExpectedGraph returns a copy of the graph instance with all the non-executed transfers applied and targets set for each network. +func (r *TargetMinBalancer) getExpectedGraph(g graph.Graph, nonExecutedTransfers []UnexecutedTransfer) (graph.Graph, error) { + expG := g.Clone() + + for _, tr := range nonExecutedTransfers { + liqTo, err := expG.GetLiquidity(tr.ToNetwork()) + if err != nil { + return nil, err + } + expG.SetLiquidity(tr.ToNetwork(), big.NewInt(0).Add(liqTo, tr.TransferAmount())) + + // we only subtract from the sender if the transfer is still in progress, otherwise the source value would have already been updated + switch tr.TransferStatus() { + case models.TransferStatusProposed, models.TransferStatusInflight: + liqFrom, err := expG.GetLiquidity(tr.FromNetwork()) + if err != nil { + return nil, err + } + expG.SetLiquidity(tr.FromNetwork(), big.NewInt(0).Sub(liqFrom, tr.TransferAmount())) + } + } - //TODO: LM-23 Create minTokenTransfer config to filter-out small rebalance txs - // check that the transfer is not tiny, we should only transfer if it is significant. What is too tiny? - // we could prevent this by only making a network requiring funding if its below X% of the target + for _, selector := range expG.GetNetworks() { + target := r.config.RebalancerConfig.DefaultTarget + override, ok := r.config.RebalancerConfig.NetworkTargetOverrides[selector] + if ok { + target = override + } + expG.SetTargetLiquidity(selector, target) + } + + return expG, nil +} + +func (r *TargetMinBalancer) findNetworksRequiringFunding(graphNow, graphFuture graph.Graph) ([]models.NetworkSelector, map[models.NetworkSelector]*Funds, error) { + mapNetworkFunds := make(map[models.NetworkSelector]*Funds) + liqDiffsFuture := make(map[models.NetworkSelector]*big.Int) res := make([]models.NetworkSelector, 0) for _, net := range graphNow.GetNetworks() { //use min here for transferable. because we don't know when the transfers will complete and want to avoid issues - transferableAmount, ataErr := availableTransferableAmount(graphNow, graphLater, net) + transferableAmount, ataErr := availableTransferableAmount(graphNow, graphFuture, net) if ataErr != nil { return nil, nil, fmt.Errorf("getting available transferrable amount for net %d: %v", net, ataErr) } - dataLater, err := graphLater.GetData(net) + dataFuture, err := graphFuture.GetData(net) if err != nil { - return nil, nil, fmt.Errorf("get data later of net %v: %w", net, err) + return nil, nil, fmt.Errorf("get future data of net %v: %w", net, err) } - liqDiffLater := new(big.Int).Sub(dataLater.TargetLiquidity, dataLater.Liquidity) + liqDiffFuture := new(big.Int).Sub(dataFuture.TargetLiquidity, dataFuture.Liquidity) mapNetworkFunds[net] = &Funds{ AvailableAmount: transferableAmount, } - if liqDiffLater.Cmp(big.NewInt(0)) <= 0 { + if liqDiffFuture.Cmp(big.NewInt(0)) <= 0 { + continue + } + + // only if we are below 5% else it's too little to worry about now + fivePercent := big.NewInt(5) + hundred := big.NewInt(100) + value := new(big.Int).Mul(dataFuture.TargetLiquidity, fivePercent) + value.Div(value, hundred) + if liqDiffFuture.Cmp(value) < 0 { continue } - liqDiffsLater[net] = liqDiffLater + liqDiffsFuture[net] = liqDiffFuture res = append(res, net) } - sort.Slice(res, func(i, j int) bool { return liqDiffsLater[res[i]].Cmp(liqDiffsLater[res[j]]) > 0 }) + sort.Slice(res, func(i, j int) bool { return liqDiffsFuture[res[i]].Cmp(liqDiffsFuture[res[j]]) > 0 }) return res, mapNetworkFunds, nil } -func (r *TargetMinBalancer) oneHopTransfers(graphLater graph.Graph, targetNetwork models.NetworkSelector, networkFunds map[models.NetworkSelector]*Funds) ([]models.ProposedTransfer, error) { +func (r *TargetMinBalancer) oneHopTransfers(graphFuture graph.Graph, targetNetwork models.NetworkSelector, networkFunds map[models.NetworkSelector]*Funds) ([]models.ProposedTransfer, error) { zero := big.NewInt(0) potentialTransfers := make([]models.ProposedTransfer, 0) - neighbors, exist := graphLater.GetNeighbors(targetNetwork, false) + neighbors, exist := graphFuture.GetNeighbors(targetNetwork, false) if !exist { r.lggr.Debugf("no neighbors found for %v", targetNetwork) return nil, nil } - targetLater, err := graphLater.GetData(targetNetwork) + targetFuture, err := graphFuture.GetData(targetNetwork) if err != nil { - return nil, fmt.Errorf("get data later of net %v: %w", targetNetwork, err) + return nil, fmt.Errorf("get data Future of net %v: %w", targetNetwork, err) } for _, source := range neighbors { - transferAmount := new(big.Int).Sub(targetLater.TargetLiquidity, targetLater.Liquidity) + transferAmount := new(big.Int).Sub(targetFuture.TargetLiquidity, targetFuture.Liquidity) r.lggr.Debugf("checking transfer from %v to %v for amount %v", source, targetNetwork, transferAmount) //source network available transferable amount - srcData, dErr := graphLater.GetData(source) + srcData, dErr := graphFuture.GetData(source) if dErr != nil { - return nil, fmt.Errorf("error during GetData for %v in graphLater: %v", source, dErr) + return nil, fmt.Errorf("error during GetData for %v in graphFuture: %v", source, dErr) } srcAvailableAmount := new(big.Int).Sub(srcData.Liquidity, srcData.MinimumLiquidity) srcAmountToTarget := new(big.Int).Sub(srcData.Liquidity, srcData.TargetLiquidity) @@ -180,40 +221,40 @@ func (r *TargetMinBalancer) oneHopTransfers(graphLater graph.Graph, targetNetwor } // twoHopTransfers finds networks that can increase liquidity of the target network with an intermediate network. -func (r *TargetMinBalancer) twoHopTransfers(graphLater graph.Graph, targetNetwork models.NetworkSelector, networkFunds map[models.NetworkSelector]*Funds) ([]models.ProposedTransfer, error) { +func (r *TargetMinBalancer) twoHopTransfers(graphFuture graph.Graph, targetNetwork models.NetworkSelector, networkFunds map[models.NetworkSelector]*Funds) ([]models.ProposedTransfer, error) { zero := big.NewInt(0) iterator := func(nodes ...graph.Data) bool { return true } potentialTransfers := make([]models.ProposedTransfer, 0) - for _, source := range graphLater.GetNetworks() { + for _, source := range graphFuture.GetNetworks() { if source == targetNetwork { continue } - path := graphLater.FindPath(source, targetNetwork, 2, iterator) + path := graphFuture.FindPath(source, targetNetwork, 2, iterator) if len(path) != 2 { continue } middle := path[0] - targetData, err := graphLater.GetData(targetNetwork) + targetData, err := graphFuture.GetData(targetNetwork) if err != nil { - return nil, fmt.Errorf("error during GetData for %v in graphLater: %v", targetNetwork, err) + return nil, fmt.Errorf("error during GetData for %v in graphFuture: %v", targetNetwork, err) } transferAmount := new(big.Int).Sub(targetData.TargetLiquidity, targetData.Liquidity) r.lggr.Debugf("checking transfer from %v -> %v -> %v for amount %v", source, middle, targetNetwork, transferAmount) //source network available transferable amount - srcData, dErr := graphLater.GetData(source) + srcData, dErr := graphFuture.GetData(source) if dErr != nil { - return nil, fmt.Errorf("error during GetData for %v in graphLater: %v", source, dErr) + return nil, fmt.Errorf("error during GetData for %v in graphFuture: %v", source, dErr) } srcAvailableAmount := new(big.Int).Sub(srcData.Liquidity, srcData.MinimumLiquidity) srcAmountToTarget := new(big.Int).Sub(srcData.Liquidity, srcData.TargetLiquidity) //middle network available transferable amount - middleData, dErr := graphLater.GetData(middle) + middleData, dErr := graphFuture.GetData(middle) if dErr != nil { - return nil, fmt.Errorf("error during GetData for %v in graphLater: %v", middle, dErr) + return nil, fmt.Errorf("error during GetData for %v in graphFuture: %v", middle, dErr) } middleAvailableAmount := new(big.Int).Sub(middleData.Liquidity, middleData.MinimumLiquidity) middleAmountToTarget := new(big.Int).Sub(middleData.Liquidity, middleData.TargetLiquidity) @@ -251,7 +292,7 @@ func (r *TargetMinBalancer) twoHopTransfers(graphLater graph.Graph, targetNetwor // applyProposedTransfers applies the proposed transfers to the graph. // increments the raised funds and gives a refund to the sender if more funds have been raised than the required amount. // It updates the liquidity of the sender and receiver networks in the graph. It stops further transfers if all funds have been raised. -func (r *TargetMinBalancer) applyProposedTransfers(graphLater graph.Graph, potentialTransfers []models.ProposedTransfer, requiredAmount *big.Int) ([]models.ProposedTransfer, error) { +func (r *TargetMinBalancer) applyProposedTransfers(graphFuture graph.Graph, potentialTransfers []models.ProposedTransfer, requiredAmount *big.Int) ([]models.ProposedTransfer, error) { // sort by amount,sender,receiver sort.Slice(potentialTransfers, func(i, j int) bool { if potentialTransfers[i].Amount.Cmp(potentialTransfers[j].Amount) == 0 { @@ -272,7 +313,7 @@ func (r *TargetMinBalancer) applyProposedTransfers(graphLater graph.Graph, poten continue } - senderData, err := graphLater.GetData(d.From) + senderData, err := graphFuture.GetData(d.From) if err != nil { return nil, fmt.Errorf("get liquidity of sender %v: %w", d.From, err) } @@ -298,17 +339,17 @@ func (r *TargetMinBalancer) applyProposedTransfers(graphLater graph.Graph, poten r.lggr.Debugf("applying transfer: %v", d) proposedTransfers = append(proposedTransfers, models.ProposedTransfer{From: d.From, To: d.To, Amount: d.Amount}) - liqBefore, err := graphLater.GetLiquidity(d.To) + liqBefore, err := graphFuture.GetLiquidity(d.To) if err != nil { return nil, fmt.Errorf("get liquidity of transfer receiver %v: %w", d.To, err) } - graphLater.SetLiquidity(d.To, big.NewInt(0).Add(liqBefore, d.Amount.ToInt())) + graphFuture.SetLiquidity(d.To, big.NewInt(0).Add(liqBefore, d.Amount.ToInt())) - liqBefore, err = graphLater.GetLiquidity(d.From) + liqBefore, err = graphFuture.GetLiquidity(d.From) if err != nil { return nil, fmt.Errorf("get liquidity of sender %v: %w", d.From, err) } - graphLater.SetLiquidity(d.From, big.NewInt(0).Sub(liqBefore, d.Amount.ToInt())) + graphFuture.SetLiquidity(d.From, big.NewInt(0).Sub(liqBefore, d.Amount.ToInt())) if fundsRaised.Cmp(requiredAmount) >= 0 { r.lggr.Debugf("all funds raised skipping further transfers") diff --git a/core/services/ocr2/plugins/liquiditymanager/liquidityrebalancer/target_balance_with_minimum_test.go b/core/services/ocr2/plugins/liquiditymanager/rebalalgo/target_balance_with_minimum_test.go similarity index 87% rename from core/services/ocr2/plugins/liquiditymanager/liquidityrebalancer/target_balance_with_minimum_test.go rename to core/services/ocr2/plugins/liquiditymanager/rebalalgo/target_balance_with_minimum_test.go index 35e90b94ac..77e0f90d30 100644 --- a/core/services/ocr2/plugins/liquiditymanager/liquidityrebalancer/target_balance_with_minimum_test.go +++ b/core/services/ocr2/plugins/liquiditymanager/rebalalgo/target_balance_with_minimum_test.go @@ -1,4 +1,4 @@ -package liquidityrebalancer +package rebalalgo import ( "math/big" @@ -226,21 +226,30 @@ func TestTargetMinBalancer_ComputeTransfersToBalance_arb_eth_opt_0(t *testing.T) for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { + overrides := make(map[models.NetworkSelector]*big.Int) g := graph.NewGraph() for net, b := range tc.balances { g.(graph.GraphTest).AddNetwork(net, graph.Data{ Liquidity: big.NewInt(b), NetworkSelector: net, MinimumLiquidity: big.NewInt(tc.minimums[net]), - TargetLiquidity: big.NewInt(tc.targets[net]), }) + overrides[net] = big.NewInt(tc.targets[net]) } assert.NoError(t, g.(graph.GraphTest).AddConnection(eth, arb)) assert.NoError(t, g.(graph.GraphTest).AddConnection(arb, eth)) assert.NoError(t, g.(graph.GraphTest).AddConnection(eth, opt)) assert.NoError(t, g.(graph.GraphTest).AddConnection(opt, eth)) - r := NewTargetMinBalancer(lggr) + pluginConfigOverrides := models.PluginConfig{ + RebalancerConfig: models.RebalancerConfig{ + Type: "target-and-min", + DefaultTarget: big.NewInt(5), + NetworkTargetOverrides: overrides, + }, + } + + r := NewTargetMinBalancer(lggr, pluginConfigOverrides) unexecuted := make([]UnexecutedTransfer, 0, len(tc.pendingTransfers)) for _, tr := range tc.pendingTransfers { @@ -336,21 +345,30 @@ func TestTargetMinBalancer_ComputeTransfersToBalance_arb_eth_opt_pending_status_ for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { + overrides := make(map[models.NetworkSelector]*big.Int) + g := graph.NewGraph() for net, b := range tc.balances { g.(graph.GraphTest).AddNetwork(net, graph.Data{ Liquidity: big.NewInt(b), NetworkSelector: net, MinimumLiquidity: big.NewInt(tc.minimums[net]), - TargetLiquidity: big.NewInt(tc.targets[net]), }) + overrides[net] = big.NewInt(tc.targets[net]) } assert.NoError(t, g.(graph.GraphTest).AddConnection(eth, arb)) assert.NoError(t, g.(graph.GraphTest).AddConnection(arb, eth)) assert.NoError(t, g.(graph.GraphTest).AddConnection(eth, opt)) assert.NoError(t, g.(graph.GraphTest).AddConnection(opt, eth)) - r := NewTargetMinBalancer(lggr) + pluginConfigOverrides := models.PluginConfig{ + RebalancerConfig: models.RebalancerConfig{ + Type: "target-and-min", + DefaultTarget: big.NewInt(5), + NetworkTargetOverrides: overrides, + }, + } + r := NewTargetMinBalancer(lggr, pluginConfigOverrides) unexecuted := make([]UnexecutedTransfer, 0, len(tc.pendingTransfers)) for _, tr := range tc.pendingTransfers { @@ -476,14 +494,15 @@ func TestTargetMinBalancer_ComputeTransfersToBalance_arb_eth_opt_base(t *testing for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { + overrides := make(map[models.NetworkSelector]*big.Int) g := graph.NewGraph() for net, b := range tc.balances { g.(graph.GraphTest).AddNetwork(net, graph.Data{ Liquidity: big.NewInt(b), NetworkSelector: net, MinimumLiquidity: big.NewInt(tc.minimums[net]), - TargetLiquidity: big.NewInt(tc.targets[net]), }) + overrides[net] = big.NewInt(tc.targets[net]) } assert.NoError(t, g.(graph.GraphTest).AddConnection(eth, arb)) assert.NoError(t, g.(graph.GraphTest).AddConnection(arb, eth)) @@ -492,7 +511,14 @@ func TestTargetMinBalancer_ComputeTransfersToBalance_arb_eth_opt_base(t *testing assert.NoError(t, g.(graph.GraphTest).AddConnection(eth, base)) assert.NoError(t, g.(graph.GraphTest).AddConnection(base, eth)) - r := NewTargetMinBalancer(lggr) + pluginConfigOverrides := models.PluginConfig{ + RebalancerConfig: models.RebalancerConfig{ + Type: "target-and-min", + DefaultTarget: big.NewInt(5), + NetworkTargetOverrides: overrides, + }, + } + r := NewTargetMinBalancer(lggr, pluginConfigOverrides) unexecuted := make([]UnexecutedTransfer, 0, len(tc.pendingTransfers)) for _, tr := range tc.pendingTransfers { @@ -586,14 +612,16 @@ func TestTargetMinBalancer_ComputeTransfersToBalance_islands_in_graph(t *testing for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { + overrides := make(map[models.NetworkSelector]*big.Int) + g := graph.NewGraph() for net, b := range tc.balances { g.(graph.GraphTest).AddNetwork(net, graph.Data{ Liquidity: big.NewInt(b), NetworkSelector: net, MinimumLiquidity: big.NewInt(tc.minimums[net]), - TargetLiquidity: big.NewInt(tc.targets[net]), }) + overrides[net] = big.NewInt(tc.targets[net]) } assert.NoError(t, g.(graph.GraphTest).AddConnection(eth, arb)) assert.NoError(t, g.(graph.GraphTest).AddConnection(arb, eth)) @@ -602,7 +630,92 @@ func TestTargetMinBalancer_ComputeTransfersToBalance_islands_in_graph(t *testing assert.NoError(t, g.(graph.GraphTest).AddConnection(eth, base)) assert.NoError(t, g.(graph.GraphTest).AddConnection(base, eth)) - r := NewTargetMinBalancer(lggr) + pluginConfigOverrides := models.PluginConfig{ + RebalancerConfig: models.RebalancerConfig{ + Type: "target-and-min", + DefaultTarget: big.NewInt(5), + NetworkTargetOverrides: overrides, + }, + } + r := NewTargetMinBalancer(lggr, pluginConfigOverrides) + + unexecuted := make([]UnexecutedTransfer, 0, len(tc.pendingTransfers)) + for _, tr := range tc.pendingTransfers { + unexecuted = append(unexecuted, models.PendingTransfer{ + Transfer: models.Transfer{ + From: tr.From, + To: tr.To, + Amount: tr.Amount, + }, + Status: tr.Status, + }) + } + transfersToBalance, err := r.ComputeTransfersToBalance(g, unexecuted) + assert.NoError(t, err) + + for _, tr := range transfersToBalance { + t.Logf("actual transfer: %s -> %s = %s", tr.From, tr.To, tr.Amount) + } + sort.Sort(models.ProposedTransfers(tc.expTransfers)) + require.Len(t, transfersToBalance, len(tc.expTransfers)) + for i, tr := range tc.expTransfers { + t.Logf("expected transfer: %s -> %s = %s", tr.From, tr.To, tr.Amount) + assert.Equal(t, tr.From, transfersToBalance[i].From) + assert.Equal(t, tr.To, transfersToBalance[i].To) + assert.Equal(t, tr.Amount.Int64(), transfersToBalance[i].Amount.Int64()) + } + }) + } +} + +func TestTargetMinBalancer_ComputeTransfersToBalance_no_tiny_transfers(t *testing.T) { + testCases := []struct { + name string + balances map[models.NetworkSelector]int64 + minimums map[models.NetworkSelector]int64 + targets map[models.NetworkSelector]int64 + pendingTransfers []models.ProposedTransfer + expTransfers []models.ProposedTransfer + }{ + { + name: "arb and opt below but not more than 5%, so even tho eth has funds we wait", + balances: map[models.NetworkSelector]int64{eth: 2100, arb: 1950, opt: 1950}, + minimums: map[models.NetworkSelector]int64{eth: 500, arb: 500, opt: 500}, + targets: map[models.NetworkSelector]int64{eth: 2000, arb: 2000, opt: 2000}, + pendingTransfers: []models.ProposedTransfer{}, + expTransfers: []models.ProposedTransfer{}, + }, + } + + lggr := logger.TestLogger(t) + lggr.SetLogLevel(zapcore.DebugLevel) + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + overrides := make(map[models.NetworkSelector]*big.Int) + + g := graph.NewGraph() + for net, b := range tc.balances { + g.(graph.GraphTest).AddNetwork(net, graph.Data{ + Liquidity: big.NewInt(b), + NetworkSelector: net, + MinimumLiquidity: big.NewInt(tc.minimums[net]), + }) + overrides[net] = big.NewInt(tc.targets[net]) + } + assert.NoError(t, g.(graph.GraphTest).AddConnection(eth, arb)) + assert.NoError(t, g.(graph.GraphTest).AddConnection(arb, eth)) + assert.NoError(t, g.(graph.GraphTest).AddConnection(eth, opt)) + assert.NoError(t, g.(graph.GraphTest).AddConnection(opt, eth)) + + pluginConfigOverrides := models.PluginConfig{ + RebalancerConfig: models.RebalancerConfig{ + Type: "target-and-min", + DefaultTarget: big.NewInt(5), + NetworkTargetOverrides: overrides, + }, + } + r := NewTargetMinBalancer(lggr, pluginConfigOverrides) unexecuted := make([]UnexecutedTransfer, 0, len(tc.pendingTransfers)) for _, tr := range tc.pendingTransfers { diff --git a/core/services/ocr2/plugins/median/services.go b/core/services/ocr2/plugins/median/services.go index 897531b82f..739eb9759f 100644 --- a/core/services/ocr2/plugins/median/services.go +++ b/core/services/ocr2/plugins/median/services.go @@ -167,9 +167,9 @@ func NewMedianServices(ctx context.Context, abort() return } - median := loop.NewMedianService(lggr, telem, cmdFn, medianProvider, dataSource, juelsPerFeeCoinSource, gasPriceSubunitsDataSource, errorLog) - argsNoPlugin.ReportingPluginFactory = median - srvs = append(srvs, median) + medianService := loop.NewMedianService(lggr, telem, cmdFn, medianProvider, dataSource, juelsPerFeeCoinSource, dataSource, errorLog) + argsNoPlugin.ReportingPluginFactory = medianService + srvs = append(srvs, medianService) } else { argsNoPlugin.ReportingPluginFactory, err = median.NewPlugin(lggr).NewMedianFactory(ctx, medianProvider, dataSource, juelsPerFeeCoinSource, gasPriceSubunitsDataSource, errorLog) if err != nil { diff --git a/core/services/ocr2/validate/validate.go b/core/services/ocr2/validate/validate.go index 8fa9b1f82a..f2fbc7ce4f 100644 --- a/core/services/ocr2/validate/validate.go +++ b/core/services/ocr2/validate/validate.go @@ -422,7 +422,7 @@ func validateOCR2CCIPExecutionSpec(jsonConfig job.JSONConfig) error { if jsonConfig == nil { return errors.New("pluginConfig is empty") } - var cfg config.ExecutionPluginJobSpecConfig + var cfg config.ExecPluginJobSpecConfig err := json.Unmarshal(jsonConfig.Bytes(), &cfg) if err != nil { return pkgerrors.Wrap(err, "error while unmarshalling plugin config") diff --git a/core/services/ocr2/validate/validate_test.go b/core/services/ocr2/validate/validate_test.go index aff04db187..54150b5ef0 100644 --- a/core/services/ocr2/validate/validate_test.go +++ b/core/services/ocr2/validate/validate_test.go @@ -752,7 +752,7 @@ USDCConfig.AttestationAPIIntervalMilliseconds = 100 `, assertion: func(t *testing.T, os job.Job, err error) { require.NoError(t, err) - expected := config.ExecutionPluginJobSpecConfig{ + expected := config.ExecPluginJobSpecConfig{ SourceStartBlock: 1, DestStartBlock: 2, USDCConfig: config.USDCConfig{ @@ -763,7 +763,7 @@ USDCConfig.AttestationAPIIntervalMilliseconds = 100 AttestationAPIIntervalMilliseconds: 100, }, } - var cfg config.ExecutionPluginJobSpecConfig + var cfg config.ExecPluginJobSpecConfig err = json.Unmarshal(os.OCR2OracleSpec.PluginConfig.Bytes(), &cfg) require.NoError(t, err) require.Equal(t, expected, cfg) diff --git a/core/services/ocr3/plugins/ccip/.golangci.yml b/core/services/ocr3/plugins/ccip/.golangci.yml deleted file mode 100644 index 6765266f3d..0000000000 --- a/core/services/ocr3/plugins/ccip/.golangci.yml +++ /dev/null @@ -1,93 +0,0 @@ -run: - timeout: 60s -linters: - enable: - - exhaustive - - exportloopref - - revive - - goimports - - gosec - - misspell - - rowserrcheck - - errorlint - - unconvert - - sqlclosecheck - - noctx - - depguard - - lll -linters-settings: - exhaustive: - default-signifies-exhaustive: true - goimports: - local-prefixes: "github.com/smartcontractkit/ccipocr3" - gosec: - excludes: - errorlint: - errorf: true # Disallow formatting of errors without %w - revive: - confidence: 0.8 - rules: - - name: blank-imports - - name: context-as-argument - - name: context-keys-type - - name: dot-imports - - name: error-return - - name: error-strings - - name: error-naming - - name: if-return - - name: increment-decrement - - name: var-naming - - name: var-declaration - - name: package-comments - - name: range - - name: receiver-naming - - name: time-naming - - name: unexported-return - - name: indent-error-flow - - name: errorf - - name: empty-block - - name: superfluous-else - # - name: unused-parameter - - name: unreachable-code - - name: redefines-builtin-id - - name: waitgroup-by-value - - name: unconditional-recursion - - name: struct-tag - - name: string-format - - name: string-of-int - - name: range-val-address - - name: range-val-in-closure - - name: modifies-value-receiver - - name: modifies-parameter - - name: identical-branches - - name: get-return - #- name: flag-parameter - - name: early-return - - name: defer - - name: constant-logical-expr - - name: confusing-naming - - name: confusing-results - - name: bool-literal-in-expr - - name: atomic - depguard: - rules: - main: - list-mode: lax - deny: - - pkg: github.com/test-go/testify/assert - desc: Use github.com/stretchr/testify/assert instead - - pkg: github.com/test-go/testify/mock - desc: Use github.com/stretchr/testify/mock instead - - pkg: github.com/test-go/testify/require - desc: Use github.com/stretchr/testify/require instead - lll: - # Max line length, lines longer will be reported. - # '\t' is counted as 1 character by default, and can be changed with the tab-width option. - # Default: 120. - line-length: 120 -issues: - exclude-rules: - - path: test - text: "^G404:" - linters: - - gosec diff --git a/core/services/ocr3/plugins/ccip/Makefile b/core/services/ocr3/plugins/ccip/Makefile deleted file mode 100644 index 358b75feb5..0000000000 --- a/core/services/ocr3/plugins/ccip/Makefile +++ /dev/null @@ -1,12 +0,0 @@ - -ensure_go_1_21: - @go version | grep -q 'go1.21' || (echo "Please use go1.21" && exit 1) - -ensure_golangcilint_1_59: - @golangci-lint --version | grep -q '1.59' || (echo "Please use golangci-lint 1.59" && exit 1) - -test: ensure_go_1_21 - go test -race -fullpath -shuffle on -count 10 ./... - -lint: ensure_go_1_21 - golangci-lint run -c .golangci.yml diff --git a/core/services/ocr3/plugins/ccip/commit/factory.go b/core/services/ocr3/plugins/ccip/commit/factory.go deleted file mode 100644 index 2b10231c01..0000000000 --- a/core/services/ocr3/plugins/ccip/commit/factory.go +++ /dev/null @@ -1,98 +0,0 @@ -package commit - -import ( - "context" - "math/big" - - "github.com/smartcontractkit/ccipocr3/internal/reader" - - "google.golang.org/grpc" - - cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" - "github.com/smartcontractkit/chainlink-common/pkg/types/core" - - "github.com/smartcontractkit/libocr/commontypes" - "github.com/smartcontractkit/libocr/offchainreporting2plus/ocr3types" - ocr2types "github.com/smartcontractkit/libocr/offchainreporting2plus/types" - libocrtypes "github.com/smartcontractkit/libocr/ragep2p/types" -) - -// PluginFactoryConstructor implements common OCR3ReportingPluginClient and is used for initializing a plugin factory -// and a validation service. -type PluginFactoryConstructor struct{} - -func NewPluginFactoryConstructor() *PluginFactoryConstructor { - return &PluginFactoryConstructor{} -} -func (p PluginFactoryConstructor) NewReportingPluginFactory( - ctx context.Context, - config core.ReportingPluginServiceConfig, - grpcProvider grpc.ClientConnInterface, - pipelineRunner core.PipelineRunnerService, - telemetry core.TelemetryService, - errorLog core.ErrorLog, - capRegistry core.CapabilitiesRegistry, - keyValueStore core.KeyValueStore, - relayerSet core.RelayerSet, -) (core.OCR3ReportingPluginFactory, error) { - return NewPluginFactory(), nil -} - -func (p PluginFactoryConstructor) NewValidationService(ctx context.Context) (core.ValidationService, error) { - panic("implement me") -} - -// PluginFactory implements common ReportingPluginFactory and is used for (re-)initializing commit plugin instances. -type PluginFactory struct{} - -func NewPluginFactory() *PluginFactory { - return &PluginFactory{} -} - -func (p PluginFactory) NewReportingPlugin(config ocr3types.ReportingPluginConfig, -) (ocr3types.ReportingPlugin[[]byte], ocr3types.ReportingPluginInfo, error) { - // TODO: Get this from ocr config, it's the mapping of the oracleId index in the DON - var oracleIDToP2pID map[commontypes.OracleID]libocrtypes.PeerID - onChainTokenPricesReader := reader.NewOnchainTokenPricesReader( - reader.TokenPriceConfig{ // TODO: Inject config - StaticPrices: map[ocr2types.Account]big.Int{}, - }, - nil, // TODO: Inject this - ) - return NewPlugin( - context.Background(), - config.OracleID, - oracleIDToP2pID, - cciptypes.CommitPluginConfig{}, - nil, //ccipReader - onChainTokenPricesReader, - nil, //reportCodec - nil, //msgHasher - nil, // lggr - nil, //homeChain - ), ocr3types.ReportingPluginInfo{}, nil -} - -func (p PluginFactory) Name() string { - panic("implement me") -} - -func (p PluginFactory) Start(ctx context.Context) error { - panic("implement me") -} - -func (p PluginFactory) Close() error { - panic("implement me") -} - -func (p PluginFactory) Ready() error { - panic("implement me") -} - -func (p PluginFactory) HealthReport() map[string]error { - panic("implement me") -} - -// Interface compatibility checks. -var _ core.OCR3ReportingPluginClient = &PluginFactoryConstructor{} -var _ core.OCR3ReportingPluginFactory = &PluginFactory{} diff --git a/core/services/ocr3/plugins/ccip/commit/plugin.go b/core/services/ocr3/plugins/ccip/commit/plugin.go deleted file mode 100644 index d6e28eab05..0000000000 --- a/core/services/ocr3/plugins/ccip/commit/plugin.go +++ /dev/null @@ -1,382 +0,0 @@ -package commit - -import ( - "context" - "fmt" - "sort" - "time" - - mapset "github.com/deckarep/golang-set/v2" - - "github.com/smartcontractkit/ccipocr3/internal/reader" - - "github.com/smartcontractkit/libocr/commontypes" - "github.com/smartcontractkit/libocr/offchainreporting2plus/ocr3types" - "github.com/smartcontractkit/libocr/offchainreporting2plus/types" - libocrtypes "github.com/smartcontractkit/libocr/ragep2p/types" - - "github.com/smartcontractkit/ccipocr3/internal/libs/slicelib" - - "github.com/smartcontractkit/chainlink-common/pkg/logger" - cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" -) - -// Plugin implements the main ocr3 ccip commit plugin logic. -// To learn more about the plugin lifecycle, see the ocr3types.ReportingPlugin interface. -// -// NOTE: If you are changing core plugin logic, you should also update the commit plugin python spec. -type Plugin struct { - nodeID commontypes.OracleID - oracleIDToP2pID map[commontypes.OracleID]libocrtypes.PeerID - cfg cciptypes.CommitPluginConfig - ccipReader cciptypes.CCIPReader - tokenPricesReader cciptypes.TokenPricesReader - reportCodec cciptypes.CommitPluginCodec - msgHasher cciptypes.MessageHasher - lggr logger.Logger - - homeChain reader.HomeChain -} - -func NewPlugin( - _ context.Context, - nodeID commontypes.OracleID, - oracleIDToP2pID map[commontypes.OracleID]libocrtypes.PeerID, - cfg cciptypes.CommitPluginConfig, - ccipReader cciptypes.CCIPReader, - tokenPricesReader cciptypes.TokenPricesReader, - reportCodec cciptypes.CommitPluginCodec, - msgHasher cciptypes.MessageHasher, - lggr logger.Logger, - homeChain reader.HomeChain, -) *Plugin { - return &Plugin{ - nodeID: nodeID, - oracleIDToP2pID: oracleIDToP2pID, - cfg: cfg, - ccipReader: ccipReader, - tokenPricesReader: tokenPricesReader, - reportCodec: reportCodec, - msgHasher: msgHasher, - lggr: lggr, - homeChain: homeChain, - } -} - -// Query phase is not used. -func (p *Plugin) Query(_ context.Context, _ ocr3types.OutcomeContext) (types.Query, error) { - return types.Query{}, nil -} - -// Observation phase is used to discover max chain sequence numbers, new messages, gas and token prices. -// -// Max Chain Sequence Numbers: -// -// It is the sequence number of the last known committed message for each known source chain. -// If there was a previous outcome we start with the max sequence numbers of the previous outcome. -// We then read the sequence numbers from the destination chain and override when the on-chain sequence number -// is greater than previous outcome or when previous outcome did not contain a sequence number for a known source chain. -// -// New Messages: -// -// We discover new ccip messages only for the chains that the current node is allowed to read from based on the -// previously discovered max chain sequence numbers. For each chain we scan for new messages -// in the [max_sequence_number+1, max_sequence_number+1+p.cfg.NewMsgScanBatchSize] range. -// -// Gas Prices: -// -// We discover the gas prices for each readable source chain. -// -// Token Prices: -// -// We discover the token prices only for the tokens that are used to pay for ccip fees. -// The fee tokens are configured in the plugin config. -func (p *Plugin) Observation( - ctx context.Context, outctx ocr3types.OutcomeContext, _ types.Query, -) (types.Observation, error) { - supportedChains, err := p.supportedChains() - if err != nil { - return types.Observation{}, fmt.Errorf("error finding supported chains by node: %w", err) - } - - msgBaseDetails := make([]cciptypes.CCIPMsgBaseDetails, 0) - latestCommittedSeqNumsObservation, err := observeLatestCommittedSeqNums( - ctx, p.lggr, p.ccipReader, supportedChains, p.cfg.DestChain, p.knownSourceChainsSlice(), - ) - if err != nil { - return types.Observation{}, fmt.Errorf("observe latest committed sequence numbers: %w", err) - } - - var tokenPrices []cciptypes.TokenPrice - if p.cfg.TokenPricesObserver { - tokenPrices, err = observeTokenPrices( - ctx, - p.tokenPricesReader, - p.cfg.PricedTokens, - ) - if err != nil { - return types.Observation{}, fmt.Errorf("observe token prices: %w", err) - } - } - - // Find the gas prices for each source chain. - var gasPrices []cciptypes.GasPriceChain - gasPrices, err = observeGasPrices(ctx, p.ccipReader, p.knownSourceChainsSlice()) - if err != nil { - return types.Observation{}, fmt.Errorf("observe gas prices: %w", err) - } - - fChain, err := p.homeChain.GetFChain() - if err != nil { - return types.Observation{}, fmt.Errorf("get f chain: %w", err) - } - - // If there's no previous outcome (first round ever), we only observe the latest committed sequence numbers. - // and on the next round we use those to look for messages. - if outctx.PreviousOutcome == nil { - p.lggr.Debugw("first round ever, can't observe new messages yet") - return cciptypes.NewCommitPluginObservation( - msgBaseDetails, gasPrices, tokenPrices, latestCommittedSeqNumsObservation, fChain, - ).Encode() - } - - prevOutcome, err := cciptypes.DecodeCommitPluginOutcome(outctx.PreviousOutcome) - if err != nil { - return types.Observation{}, fmt.Errorf("decode commit plugin previous outcome: %w", err) - } - p.lggr.Debugw("previous outcome decoded", "outcome", prevOutcome.String()) - - // Always observe based on previous outcome. We'll filter out stale messages in the outcome phase. - newMsgs, err := observeNewMsgs( - ctx, - p.lggr, - p.ccipReader, - p.msgHasher, - supportedChains, - prevOutcome.MaxSeqNums, // TODO: Chainlink common PR to rename. - p.cfg.NewMsgScanBatchSize, - ) - if err != nil { - return types.Observation{}, fmt.Errorf("observe new messages: %w", err) - } - - p.lggr.Infow("submitting observation", - "observedNewMsgs", len(newMsgs), - "gasPrices", len(gasPrices), - "tokenPrices", len(tokenPrices), - "latestCommittedSeqNums", latestCommittedSeqNumsObservation, - "fChain", fChain) - - for _, msg := range newMsgs { - msgBaseDetails = append(msgBaseDetails, msg.CCIPMsgBaseDetails) - } - - return cciptypes.NewCommitPluginObservation( - msgBaseDetails, gasPrices, tokenPrices, latestCommittedSeqNumsObservation, fChain, - ).Encode() - -} - -func (p *Plugin) ValidateObservation(_ ocr3types.OutcomeContext, _ types.Query, ao types.AttributedObservation) error { - obs, err := cciptypes.DecodeCommitPluginObservation(ao.Observation) - if err != nil { - return fmt.Errorf("decode commit plugin observation: %w", err) - } - - if err := validateObservedSequenceNumbers(obs.NewMsgs, obs.MaxSeqNums); err != nil { - return fmt.Errorf("validate sequence numbers: %w", err) - } - - destSupportedChains, err := p.supportedChains() - if err != nil { - return fmt.Errorf("error finding supported chains by node: %w", err) - } - - err = validateObserverReadingEligibility(obs.NewMsgs, obs.MaxSeqNums, destSupportedChains, p.cfg.DestChain) - if err != nil { - return fmt.Errorf("validate observer %d reading eligibility: %w", ao.Observer, err) - } - - if err := validateObservedTokenPrices(obs.TokenPrices); err != nil { - return fmt.Errorf("validate token prices: %w", err) - } - - if err := validateObservedGasPrices(obs.GasPrices); err != nil { - return fmt.Errorf("validate gas prices: %w", err) - } - - return nil -} - -func (p *Plugin) ObservationQuorum(_ ocr3types.OutcomeContext, _ types.Query) (ocr3types.Quorum, error) { - // Across all chains we require at least 2F+1 observations. - return ocr3types.QuorumTwoFPlusOne, nil -} - -// Outcome phase is used to construct the final outcome based on the observations of multiple followers. -// -// The outcome contains: -// - Max Sequence Numbers: The max sequence number for each source chain. -// - Merkle Roots: One merkle tree root per source chain. The leaves of the tree are the IDs of the observed messages. -// The merkle root data type contains information about the chain and the sequence numbers range. -func (p *Plugin) Outcome( - _ ocr3types.OutcomeContext, _ types.Query, aos []types.AttributedObservation, -) (ocr3types.Outcome, error) { - decodedObservations := make([]cciptypes.CommitPluginObservation, 0) - for _, ao := range aos { - obs, err := cciptypes.DecodeCommitPluginObservation(ao.Observation) - if err != nil { - return ocr3types.Outcome{}, fmt.Errorf("decode commit plugin observation: %w", err) - } - decodedObservations = append(decodedObservations, obs) - } - - fChains := fChainConsensus(decodedObservations) - - fChainDest, ok := fChains[p.cfg.DestChain] - if !ok { - return ocr3types.Outcome{}, fmt.Errorf("missing destination chain %d in fChain config", p.cfg.DestChain) - } - - maxSeqNums := maxSeqNumsConsensus(p.lggr, fChainDest, decodedObservations) - p.lggr.Debugw("max sequence numbers consensus", "maxSeqNumsConsensus", maxSeqNums) - - merkleRoots, err := newMsgsConsensus(p.lggr, maxSeqNums, decodedObservations, fChains) - if err != nil { - return ocr3types.Outcome{}, fmt.Errorf("new messages consensus: %w", err) - } - p.lggr.Debugw("new messages consensus", "merkleRoots", merkleRoots) - - tokenPrices, err := tokenPricesConsensus(decodedObservations, fChainDest) - if err != nil { - return ocr3types.Outcome{}, fmt.Errorf("token prices consensus: %w", err) - } - - gasPrices := gasPricesConsensus(p.lggr, decodedObservations, fChainDest) - p.lggr.Debugw("gas prices consensus", "gasPrices", gasPrices) - - outcome := cciptypes.NewCommitPluginOutcome(maxSeqNums, merkleRoots, tokenPrices, gasPrices) - if outcome.IsEmpty() { - p.lggr.Debugw("empty outcome") - return ocr3types.Outcome{}, nil - } - p.lggr.Debugw("sending outcome", "outcome", outcome) - - return outcome.Encode() -} - -func (p *Plugin) Reports(seqNr uint64, outcome ocr3types.Outcome) ([]ocr3types.ReportWithInfo[[]byte], error) { - outc, err := cciptypes.DecodeCommitPluginOutcome(outcome) - if err != nil { - p.lggr.Errorw("decode commit plugin outcome", "outcome", outcome, "err", err) - return nil, fmt.Errorf("decode commit plugin outcome: %w", err) - } - - /* - todo: Once token/gas prices are implemented, we would want to probably check if outc.MerkleRoots is empty or not - and only create a report if outc.MerkleRoots is non-empty OR gas/token price timer has expired - */ - - rep := cciptypes.NewCommitPluginReport(outc.MerkleRoots, outc.TokenPrices, outc.GasPrices) - - encodedReport, err := p.reportCodec.Encode(context.Background(), rep) - if err != nil { - return nil, fmt.Errorf("encode commit plugin report: %w", err) - } - - return []ocr3types.ReportWithInfo[[]byte]{{Report: encodedReport, Info: nil}}, nil -} - -func (p *Plugin) ShouldAcceptAttestedReport( - ctx context.Context, u uint64, r ocr3types.ReportWithInfo[[]byte], -) (bool, error) { - decodedReport, err := p.reportCodec.Decode(ctx, r.Report) - if err != nil { - return false, fmt.Errorf("decode commit plugin report: %w", err) - } - - isEmpty := decodedReport.IsEmpty() - if isEmpty { - p.lggr.Infow("skipping empty report") - return false, nil - } - - return true, nil -} - -func (p *Plugin) ShouldTransmitAcceptedReport( - ctx context.Context, u uint64, r ocr3types.ReportWithInfo[[]byte], -) (bool, error) { - isWriter, err := p.supportsDestChain() - if err != nil { - return false, fmt.Errorf("can't know if it's a writer: %w", err) - } - if !isWriter { - p.lggr.Debugw("not a writer, skipping report transmission") - return false, nil - } - - decodedReport, err := p.reportCodec.Decode(ctx, r.Report) - if err != nil { - return false, fmt.Errorf("decode commit plugin report: %w", err) - } - - p.lggr.Debugw("transmitting report", - "roots", len(decodedReport.MerkleRoots), - "tokenPriceUpdates", len(decodedReport.PriceUpdates.TokenPriceUpdates), - "gasPriceUpdates", len(decodedReport.PriceUpdates.GasPriceUpdates), - ) - - // todo: if report is stale -> do not transmit (check the spec for the exact condition) - return true, nil -} - -func (p *Plugin) Close() error { - timeout := 10 * time.Second - ctx, cf := context.WithTimeout(context.Background(), timeout) - defer cf() - - if err := p.ccipReader.Close(ctx); err != nil { - return fmt.Errorf("close ccip reader: %w", err) - } - return nil -} - -func (p *Plugin) knownSourceChainsSlice() []cciptypes.ChainSelector { - knownSourceChains, err := p.homeChain.GetKnownCCIPChains() - if err != nil { - p.lggr.Errorw("error getting known chains", "err", err) - return nil - } - knownSourceChainsSlice := knownSourceChains.ToSlice() - sort.Slice( - knownSourceChainsSlice, - func(i, j int) bool { return knownSourceChainsSlice[i] < knownSourceChainsSlice[j] }, - ) - return slicelib.Filter(knownSourceChainsSlice, func(ch cciptypes.ChainSelector) bool { return ch != p.cfg.DestChain }) -} - -func (p *Plugin) supportedChains() (mapset.Set[cciptypes.ChainSelector], error) { - p2pID, exists := p.oracleIDToP2pID[p.nodeID] - if !exists { - return nil, fmt.Errorf("oracle ID %d not found in oracleIDToP2pID", p.nodeID) - } - supportedChains, err := p.homeChain.GetSupportedChainsForPeer(p2pID) - if err != nil { - p.lggr.Warnw("error getting supported chains", err) - return mapset.NewSet[cciptypes.ChainSelector](), fmt.Errorf("error getting supported chains: %w", err) - } - - return supportedChains, nil -} - -func (p *Plugin) supportsDestChain() (bool, error) { - destChainConfig, err := p.homeChain.GetChainConfig(p.cfg.DestChain) - if err != nil { - return false, fmt.Errorf("get chain config: %w", err) - } - return destChainConfig.SupportedNodes.Contains(p.oracleIDToP2pID[p.nodeID]), nil -} - -// Interface compatibility checks. -var _ ocr3types.ReportingPlugin[[]byte] = &Plugin{} diff --git a/core/services/ocr3/plugins/ccip/commit/plugin_e2e_test.go b/core/services/ocr3/plugins/ccip/commit/plugin_e2e_test.go deleted file mode 100644 index a1786ad973..0000000000 --- a/core/services/ocr3/plugins/ccip/commit/plugin_e2e_test.go +++ /dev/null @@ -1,519 +0,0 @@ -package commit - -import ( - "context" - "reflect" - "strconv" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" - - "github.com/smartcontractkit/libocr/commontypes" - - "github.com/smartcontractkit/ccipocr3/internal/libs/testhelpers" - "github.com/smartcontractkit/ccipocr3/internal/mocks" - "github.com/smartcontractkit/ccipocr3/internal/reader" - - "github.com/smartcontractkit/libocr/offchainreporting2plus/ocr3types" - "github.com/smartcontractkit/libocr/offchainreporting2plus/types" - libocrtypes "github.com/smartcontractkit/libocr/ragep2p/types" - - "github.com/smartcontractkit/chainlink-common/pkg/logger" - cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" -) - -func TestPlugin(t *testing.T) { - ctx := context.Background() - lggr := logger.Test(t) - - testCases := []struct { - name string - description string - nodes []nodeSetup - expErr func(*testing.T, error) - expOutcome cciptypes.CommitPluginOutcome - expTransmittedReports []cciptypes.CommitPluginReport - initialOutcome cciptypes.CommitPluginOutcome - }{ - { - name: "EmptyOutcome", - description: "Empty observations are returned by all nodes which leads to an empty outcome.", - nodes: setupEmptyOutcome(ctx, t, lggr), - expErr: func(t *testing.T, err error) { assert.Equal(t, testhelpers.ErrEmptyOutcome, err) }, - }, - { - name: "AllNodesReadAllChains", - description: "Nodes observe the latest sequence numbers and new messages after those sequence numbers. " + - "They also observe gas prices. In this setup all nodes can read all chains.", - nodes: setupAllNodesReadAllChains(ctx, t, lggr), - expOutcome: cciptypes.CommitPluginOutcome{ - MaxSeqNums: []cciptypes.SeqNumChain{ - {ChainSel: chainA, SeqNum: 10}, - {ChainSel: chainB, SeqNum: 20}, - }, - MerkleRoots: []cciptypes.MerkleRootChain{ - {ChainSel: chainB, MerkleRoot: cciptypes.Bytes32{}, SeqNumsRange: cciptypes.NewSeqNumRange(21, 22)}, - }, - TokenPrices: []cciptypes.TokenPrice{}, - GasPrices: []cciptypes.GasPriceChain{ - {ChainSel: chainA, GasPrice: cciptypes.NewBigIntFromInt64(1000)}, - {ChainSel: chainB, GasPrice: cciptypes.NewBigIntFromInt64(20_000)}, - }, - }, - expTransmittedReports: []cciptypes.CommitPluginReport{ - { - MerkleRoots: []cciptypes.MerkleRootChain{ - {ChainSel: chainB, SeqNumsRange: cciptypes.NewSeqNumRange(21, 22)}, - }, - PriceUpdates: cciptypes.PriceUpdates{ - TokenPriceUpdates: []cciptypes.TokenPrice{}, - GasPriceUpdates: []cciptypes.GasPriceChain{ - {ChainSel: chainA, GasPrice: cciptypes.NewBigIntFromInt64(1000)}, - {ChainSel: chainB, GasPrice: cciptypes.NewBigIntFromInt64(20_000)}, - }, - }, - }, - }, - initialOutcome: cciptypes.CommitPluginOutcome{ - MaxSeqNums: []cciptypes.SeqNumChain{ - {ChainSel: chainA, SeqNum: 10}, - {ChainSel: chainB, SeqNum: 20}, - }, - MerkleRoots: []cciptypes.MerkleRootChain{}, - TokenPrices: []cciptypes.TokenPrice{}, - GasPrices: []cciptypes.GasPriceChain{}, - }, - }, - { - name: "NodesDoNotAgreeOnMsgs", - description: "Nodes do not agree on messages which leads to an outcome with empty merkle roots.", - nodes: setupNodesDoNotAgreeOnMsgs(ctx, t, lggr), - expOutcome: cciptypes.CommitPluginOutcome{ - MaxSeqNums: []cciptypes.SeqNumChain{ - {ChainSel: chainA, SeqNum: 10}, - {ChainSel: chainB, SeqNum: 20}, - }, - MerkleRoots: []cciptypes.MerkleRootChain{}, - TokenPrices: []cciptypes.TokenPrice{}, - GasPrices: []cciptypes.GasPriceChain{ - {ChainSel: chainA, GasPrice: cciptypes.NewBigIntFromInt64(1000)}, - {ChainSel: chainB, GasPrice: cciptypes.NewBigIntFromInt64(20_000)}, - }, - }, - expTransmittedReports: []cciptypes.CommitPluginReport{ - { - MerkleRoots: []cciptypes.MerkleRootChain{}, - PriceUpdates: cciptypes.PriceUpdates{ - TokenPriceUpdates: []cciptypes.TokenPrice{}, - GasPriceUpdates: []cciptypes.GasPriceChain{ - {ChainSel: chainA, GasPrice: cciptypes.NewBigIntFromInt64(1000)}, - {ChainSel: chainB, GasPrice: cciptypes.NewBigIntFromInt64(20_000)}, - }, - }, - }, - }, - initialOutcome: cciptypes.CommitPluginOutcome{ - MaxSeqNums: []cciptypes.SeqNumChain{ - {ChainSel: chainA, SeqNum: 10}, - {ChainSel: chainB, SeqNum: 20}, - }, - MerkleRoots: []cciptypes.MerkleRootChain{}, - TokenPrices: []cciptypes.TokenPrice{}, - GasPrices: []cciptypes.GasPriceChain{}, - }, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - t.Log("-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-") - t.Logf(">>> [%s]\n", tc.name) - t.Logf(">>> %s\n", tc.description) - defer t.Log("-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-") - - nodesSetup := tc.nodes - nodes := make([]ocr3types.ReportingPlugin[[]byte], 0, len(nodesSetup)) - for _, n := range nodesSetup { - nodes = append(nodes, n.node) - } - - nodeIDs := make([]commontypes.OracleID, 0, len(nodesSetup)) - for _, n := range nodesSetup { - nodeIDs = append(nodeIDs, n.node.nodeID) - } - o, err := tc.initialOutcome.Encode() - require.NoError(t, err) - runner := testhelpers.NewOCR3Runner(nodes, nodeIDs, o) - - res, err := runner.RunRound(ctx) - if tc.expErr != nil { - tc.expErr(t, err) - } else { - assert.NoError(t, err) - } - - if !reflect.DeepEqual(tc.expOutcome, cciptypes.CommitPluginOutcome{}) { - outcome, err := cciptypes.DecodeCommitPluginOutcome(res.Outcome) - assert.NoError(t, err) - assert.Equal(t, tc.expOutcome.TokenPrices, outcome.TokenPrices) - assert.Equal(t, tc.expOutcome.MaxSeqNums, outcome.MaxSeqNums) - assert.Equal(t, tc.expOutcome.GasPrices, outcome.GasPrices) - - assert.Equal(t, len(tc.expOutcome.MerkleRoots), len(outcome.MerkleRoots)) - for i, exp := range tc.expOutcome.MerkleRoots { - assert.Equal(t, exp.ChainSel, outcome.MerkleRoots[i].ChainSel) - assert.Equal(t, exp.SeqNumsRange, outcome.MerkleRoots[i].SeqNumsRange) - } - } - - assert.Equal(t, len(tc.expTransmittedReports), len(res.Transmitted)) - for i, exp := range tc.expTransmittedReports { - actual, err := nodesSetup[0].reportCodec.Decode(ctx, res.Transmitted[i].Report) - assert.NoError(t, err) - assert.Equal(t, exp.PriceUpdates, actual.PriceUpdates) - assert.Equal(t, len(exp.MerkleRoots), len(actual.MerkleRoots)) - for j, expRoot := range exp.MerkleRoots { - assert.Equal(t, expRoot.ChainSel, actual.MerkleRoots[j].ChainSel) - assert.Equal(t, expRoot.SeqNumsRange, actual.MerkleRoots[j].SeqNumsRange) - } - } - }) - } -} - -func setupEmptyOutcome(ctx context.Context, t *testing.T, lggr logger.Logger) []nodeSetup { - cfg := cciptypes.CommitPluginConfig{ - DestChain: chainC, - PricedTokens: []types.Account{tokenX}, - TokenPricesObserver: false, - NewMsgScanBatchSize: 256, - } - - chainConfigInfos := []reader.ChainConfigInfo{ - { - ChainSelector: chainC, - ChainConfig: reader.HomeChainConfigMapper{ - FChain: 1, - Readers: []libocrtypes.PeerID{ - {1}, {2}, {3}, - }, - Config: []byte{0}, - }, - }, - } - - homeChain := setupHomeChainPoller(lggr, chainConfigInfos) - err := homeChain.Start(ctx) - if err != nil { - return nil - } - - oracleIDToP2pID := GetP2pIDs(1, 2, 3) - nodes := []nodeSetup{ - newNode(ctx, t, lggr, 1, cfg, homeChain, oracleIDToP2pID), - newNode(ctx, t, lggr, 2, cfg, homeChain, oracleIDToP2pID), - newNode(ctx, t, lggr, 3, cfg, homeChain, oracleIDToP2pID), - } - - for _, n := range nodes { - // All nodes have issue reading the latest sequence number, should lead to empty outcomes - n.ccipReader.On( - "NextSeqNum", - ctx, - mock.Anything, - ).Return([]cciptypes.SeqNum{}, nil) - } - - err = homeChain.Close() - if err != nil { - return nil - } - return nodes -} - -func setupAllNodesReadAllChains(ctx context.Context, t *testing.T, lggr logger.Logger) []nodeSetup { - cfg := cciptypes.CommitPluginConfig{ - DestChain: chainC, - PricedTokens: []types.Account{tokenX}, - TokenPricesObserver: false, - NewMsgScanBatchSize: 256, - } - - chainConfigInfos := []reader.ChainConfigInfo{ - { - ChainSelector: chainA, - ChainConfig: reader.HomeChainConfigMapper{ - FChain: 1, - Readers: []libocrtypes.PeerID{ - {1}, {2}, {3}, - }, - Config: []byte{0}, - }, - }, - { - ChainSelector: chainB, - ChainConfig: reader.HomeChainConfigMapper{ - FChain: 1, - Readers: []libocrtypes.PeerID{ - {1}, {2}, {3}, - }, - Config: []byte{0}, - }, - }, - { - ChainSelector: chainC, - ChainConfig: reader.HomeChainConfigMapper{ - FChain: 1, - Readers: []libocrtypes.PeerID{ - {1}, {2}, {3}, - }, - Config: []byte{0}, - }, - }, - } - - homeChain := setupHomeChainPoller(lggr, chainConfigInfos) - err := homeChain.Start(ctx) - if err != nil { - return nil - } - oracleIDToP2pID := GetP2pIDs(1, 2, 3) - n1 := newNode(ctx, t, lggr, 1, cfg, homeChain, oracleIDToP2pID) - n2 := newNode(ctx, t, lggr, 2, cfg, homeChain, oracleIDToP2pID) - n3 := newNode(ctx, t, lggr, 3, cfg, homeChain, oracleIDToP2pID) - nodes := []nodeSetup{n1, n2, n3} - - for _, n := range nodes { - // then they fetch new msgs, there is nothing new on chainA - n.ccipReader.On( - "MsgsBetweenSeqNums", - ctx, - chainA, - cciptypes.NewSeqNumRange(11, cciptypes.SeqNum(11+cfg.NewMsgScanBatchSize)), - ).Return([]cciptypes.CCIPMsg{}, nil) - - // and there are two new message on chainB - n.ccipReader.On( - "MsgsBetweenSeqNums", - ctx, - chainB, - cciptypes.NewSeqNumRange(21, cciptypes.SeqNum(21+cfg.NewMsgScanBatchSize)), - ).Return([]cciptypes.CCIPMsg{ - { - CCIPMsgBaseDetails: cciptypes.CCIPMsgBaseDetails{ - MsgHash: cciptypes.Bytes32{1}, ID: "1", SourceChain: chainB, SeqNum: 21, - }, - }, - { - CCIPMsgBaseDetails: cciptypes.CCIPMsgBaseDetails{ - MsgHash: cciptypes.Bytes32{2}, ID: "2", SourceChain: chainB, SeqNum: 22, - }, - }, - }, nil) - - n.ccipReader.On("GasPrices", ctx, []cciptypes.ChainSelector{chainA, chainB}). - Return([]cciptypes.BigInt{ - cciptypes.NewBigIntFromInt64(1000), - cciptypes.NewBigIntFromInt64(20_000), - }, nil) - - // all nodes observe the same sequence numbers 10 for chainA and 20 for chainB - n.ccipReader.On("NextSeqNum", ctx, []cciptypes.ChainSelector{chainA, chainB}). - Return([]cciptypes.SeqNum{10, 20}, nil) - - } - - // No need to keep it running in the background anymore for this test - err = homeChain.Close() - if err != nil { - return nil - } - - return nodes -} - -func setupNodesDoNotAgreeOnMsgs(ctx context.Context, t *testing.T, lggr logger.Logger) []nodeSetup { - cfg := cciptypes.CommitPluginConfig{ - DestChain: chainC, - PricedTokens: []types.Account{tokenX}, - TokenPricesObserver: false, - NewMsgScanBatchSize: 256, - } - - chainConfigInfos := []reader.ChainConfigInfo{ - { - ChainSelector: chainA, - ChainConfig: reader.HomeChainConfigMapper{ - FChain: 1, - Readers: []libocrtypes.PeerID{ - {1}, {2}, {3}, - }, - Config: []byte{0}, - }, - }, - { - ChainSelector: chainB, - ChainConfig: reader.HomeChainConfigMapper{ - FChain: 1, - Readers: []libocrtypes.PeerID{ - {1}, {2}, {3}, - }, - Config: []byte{0}, - }, - }, - { - ChainSelector: chainC, - ChainConfig: reader.HomeChainConfigMapper{ - FChain: 1, - Readers: []libocrtypes.PeerID{ - {1}, {2}, {3}, - }, - Config: []byte{0}, - }, - }, - } - - homeChain := setupHomeChainPoller(lggr, chainConfigInfos) - err := homeChain.Start(ctx) - if err != nil { - return nil - } - oracleIDToP2pID := GetP2pIDs(1, 2, 3) - n1 := newNode(ctx, t, lggr, 1, cfg, homeChain, oracleIDToP2pID) - n2 := newNode(ctx, t, lggr, 2, cfg, homeChain, oracleIDToP2pID) - n3 := newNode(ctx, t, lggr, 3, cfg, homeChain, oracleIDToP2pID) - nodes := []nodeSetup{n1, n2, n3} - - for i, n := range nodes { - // all nodes observe the same sequence numbers 10 for chainA and 20 for chainB - n.ccipReader.On("NextSeqNum", ctx, []cciptypes.ChainSelector{chainA, chainB}). - Return([]cciptypes.SeqNum{10, 20}, nil) - - // then they fetch new msgs, there is nothing new on chainA - n.ccipReader.On( - "MsgsBetweenSeqNums", - ctx, - chainA, - cciptypes.NewSeqNumRange(11, cciptypes.SeqNum(11+cfg.NewMsgScanBatchSize)), - ).Return([]cciptypes.CCIPMsg{}, nil) - - // and there are two new message on chainB - n.ccipReader.On( - "MsgsBetweenSeqNums", - ctx, - chainB, - cciptypes.NewSeqNumRange( - 21, - cciptypes.SeqNum(21+cfg.NewMsgScanBatchSize), - ), - ).Return([]cciptypes.CCIPMsg{ - {CCIPMsgBaseDetails: cciptypes.CCIPMsgBaseDetails{ - MsgHash: cciptypes.Bytes32{1}, - ID: "1" + strconv.Itoa(i), - SourceChain: chainB, - SeqNum: 21 + cciptypes.SeqNum(i*10)}}, - {CCIPMsgBaseDetails: cciptypes.CCIPMsgBaseDetails{ - MsgHash: cciptypes.Bytes32{2}, - ID: "2" + strconv.Itoa(i), - SourceChain: chainB, - SeqNum: 22 + cciptypes.SeqNum(i*20)}}, - }, nil) - - n.ccipReader.On("GasPrices", ctx, []cciptypes.ChainSelector{chainA, chainB}). - Return([]cciptypes.BigInt{ - cciptypes.NewBigIntFromInt64(1000), - cciptypes.NewBigIntFromInt64(20_000), - }, nil) - } - - // No need to keep it running in the background anymore for this test - err = homeChain.Close() - if err != nil { - return nil - } - - return nodes -} - -type nodeSetup struct { - node *Plugin - ccipReader *mocks.CCIPReader - priceReader *mocks.TokenPricesReader - reportCodec *mocks.CommitPluginJSONReportCodec - msgHasher *mocks.MessageHasher -} - -func newNode( - ctx context.Context, - t *testing.T, - lggr logger.Logger, - id int, - cfg cciptypes.CommitPluginConfig, - homeChain reader.HomeChain, - oracleIDToP2pID map[commontypes.OracleID]libocrtypes.PeerID, -) nodeSetup { - ccipReader := mocks.NewCCIPReader() - priceReader := mocks.NewTokenPricesReader() - reportCodec := mocks.NewCommitPluginJSONReportCodec() - msgHasher := mocks.NewMessageHasher() - - node1 := NewPlugin( - context.Background(), - commontypes.OracleID(id), - oracleIDToP2pID, - cfg, - ccipReader, - priceReader, - reportCodec, - msgHasher, - lggr, - homeChain, - ) - - return nodeSetup{ - node: node1, - ccipReader: ccipReader, - priceReader: priceReader, - reportCodec: reportCodec, - msgHasher: msgHasher, - } -} - -func setupHomeChainPoller(lggr logger.Logger, chainConfigInfos []reader.ChainConfigInfo) reader.HomeChain { - homeChainReader := mocks.NewContractReaderMock() - homeChainReader.On( - "GetLatestValue", mock.Anything, "CCIPCapabilityConfiguration", "getAllChainConfigs", mock.Anything, mock.Anything, - ).Run( - func(args mock.Arguments) { - arg := args.Get(4).(*[]reader.ChainConfigInfo) - *arg = chainConfigInfos - }).Return(nil) - - homeChain := reader.NewHomeChainConfigPoller( - homeChainReader, - lggr, - // to prevent linting error because of logging after finishing tests, we close the poller after each test, having - // lower polling interval make it catch up faster - 10*time.Millisecond, - ) - - return homeChain -} -func GetP2pIDs(ids ...int) map[commontypes.OracleID]libocrtypes.PeerID { - res := make(map[commontypes.OracleID]libocrtypes.PeerID) - for _, id := range ids { - res[commontypes.OracleID(id)] = libocrtypes.PeerID{byte(id)} - } - return res -} - -var ( - chainA = cciptypes.ChainSelector(1) - chainB = cciptypes.ChainSelector(2) - chainC = cciptypes.ChainSelector(3) - - tokenX = types.Account("tk_xxx") -) diff --git a/core/services/ocr3/plugins/ccip/commit/plugin_functions.go b/core/services/ocr3/plugins/ccip/commit/plugin_functions.go deleted file mode 100644 index 9f4c73faef..0000000000 --- a/core/services/ocr3/plugins/ccip/commit/plugin_functions.go +++ /dev/null @@ -1,598 +0,0 @@ -package commit - -import ( - "context" - "fmt" - "sort" - - mapset "github.com/deckarep/golang-set/v2" - "github.com/smartcontractkit/libocr/offchainreporting2plus/types" - "golang.org/x/sync/errgroup" - - "github.com/smartcontractkit/ccipocr3/internal/libs/slicelib" - - "github.com/smartcontractkit/chainlink-common/pkg/logger" - cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" - - "github.com/smartcontractkit/chainlink-common/pkg/hashutil" - "github.com/smartcontractkit/chainlink-common/pkg/merklemulti" -) - -// observeLatestCommittedSeqNums finds the maximum committed sequence numbers for each source chain. -// If we cannot observe the dest we return an empty slice and no error. -func observeLatestCommittedSeqNums( - ctx context.Context, - lggr logger.Logger, - ccipReader cciptypes.CCIPReader, - readableChains mapset.Set[cciptypes.ChainSelector], - destChain cciptypes.ChainSelector, - knownSourceChains []cciptypes.ChainSelector, -) ([]cciptypes.SeqNumChain, error) { - sort.Slice(knownSourceChains, func(i, j int) bool { return knownSourceChains[i] < knownSourceChains[j] }) - latestCommittedSeqNumsObservation := make([]cciptypes.SeqNumChain, 0) - if readableChains.Contains(destChain) { - lggr.Debugw("reading latest committed sequence from destination") - onChainLatestCommittedSeqNums, err := ccipReader.NextSeqNum(ctx, knownSourceChains) - if err != nil { - return latestCommittedSeqNumsObservation, fmt.Errorf("get next seq nums: %w", err) - } - lggr.Debugw("observed latest committed sequence numbers on destination", - "latestCommittedSeqNumsObservation", onChainLatestCommittedSeqNums) - for i, ch := range knownSourceChains { - latestCommittedSeqNumsObservation = append( - latestCommittedSeqNumsObservation, - cciptypes.NewSeqNumChain(ch, onChainLatestCommittedSeqNums[i]), - ) - } - } - return latestCommittedSeqNumsObservation, nil -} - -// observeNewMsgs finds the new messages for each supported chain based on the provided max sequence numbers. -// If latestCommitSeqNums is empty (first ever OCR round), it will return an empty slice. -func observeNewMsgs( - ctx context.Context, - lggr logger.Logger, - ccipReader cciptypes.CCIPReader, - msgHasher cciptypes.MessageHasher, - readableChains mapset.Set[cciptypes.ChainSelector], - latestCommittedSeqNums []cciptypes.SeqNumChain, - msgScanBatchSize int, -) ([]cciptypes.CCIPMsg, error) { - // Find the new msgs for each supported chain based on the discovered max sequence numbers. - newMsgsPerChain := make([][]cciptypes.CCIPMsg, len(latestCommittedSeqNums)) - eg := new(errgroup.Group) - - for chainIdx, seqNumChain := range latestCommittedSeqNums { - if !readableChains.Contains(seqNumChain.ChainSel) { - lggr.Debugw("reading chain is not supported", "chain", seqNumChain.ChainSel) - continue - } - - seqNumChain := seqNumChain - chainIdx := chainIdx - eg.Go(func() error { - minSeqNum := seqNumChain.SeqNum + 1 - maxSeqNum := minSeqNum + cciptypes.SeqNum(msgScanBatchSize) - lggr.Debugw("scanning for new messages", - "chain", seqNumChain.ChainSel, "minSeqNum", minSeqNum, "maxSeqNum", maxSeqNum) - - newMsgs, err := ccipReader.MsgsBetweenSeqNums( - ctx, seqNumChain.ChainSel, cciptypes.NewSeqNumRange(minSeqNum, maxSeqNum)) - if err != nil { - return fmt.Errorf("get messages between seq nums: %w", err) - } - - if len(newMsgs) > 0 { - lggr.Debugw("discovered new messages", "chain", seqNumChain.ChainSel, "newMsgs", len(newMsgs)) - } else { - lggr.Debugw("no new messages discovered", "chain", seqNumChain.ChainSel) - } - - for i := range newMsgs { - h, err := msgHasher.Hash(ctx, newMsgs[i]) - if err != nil { - return fmt.Errorf("hash message: %w", err) - } - newMsgs[i].MsgHash = h // populate msgHash field - } - - newMsgsPerChain[chainIdx] = newMsgs - return nil - }) - } - - if err := eg.Wait(); err != nil { - return nil, fmt.Errorf("wait for new msg observations: %w", err) - } - - observedNewMsgs := make([]cciptypes.CCIPMsg, 0) - for chainIdx := range latestCommittedSeqNums { - observedNewMsgs = append(observedNewMsgs, newMsgsPerChain[chainIdx]...) - } - return observedNewMsgs, nil -} - -func observeTokenPrices( - ctx context.Context, - tokenPricesReader cciptypes.TokenPricesReader, - tokens []types.Account, -) ([]cciptypes.TokenPrice, error) { - tokenPrices, err := tokenPricesReader.GetTokenPricesUSD(ctx, tokens) - if err != nil { - return nil, fmt.Errorf("get token prices: %w", err) - } - - if len(tokenPrices) != len(tokens) { - return nil, fmt.Errorf("internal critical error token prices length mismatch: got %d, want %d", - len(tokenPrices), len(tokens)) - } - - tokenPricesUSD := make([]cciptypes.TokenPrice, 0, len(tokens)) - for i, token := range tokens { - tokenPricesUSD = append(tokenPricesUSD, cciptypes.NewTokenPrice(token, tokenPrices[i])) - } - - return tokenPricesUSD, nil -} - -func observeGasPrices( - ctx context.Context, - ccipReader cciptypes.CCIPReader, - chains []cciptypes.ChainSelector, -) ([]cciptypes.GasPriceChain, error) { - if len(chains) == 0 { - return nil, nil - } - - gasPrices, err := ccipReader.GasPrices(ctx, chains) - if err != nil { - return nil, fmt.Errorf("get gas prices: %w", err) - } - - if len(gasPrices) != len(chains) { - return nil, fmt.Errorf("internal critical error gas prices length mismatch: got %d, want %d", - len(gasPrices), len(chains)) - } - - gasPricesGwei := make([]cciptypes.GasPriceChain, 0, len(chains)) - for i, chain := range chains { - gasPricesGwei = append(gasPricesGwei, cciptypes.NewGasPriceChain(gasPrices[i].Int, chain)) - } - - return gasPricesGwei, nil -} - -// newMsgsConsensus comes in consensus on the observed messages for each source chain. Generates one merkle root -// for each source chain based on the consensus on the messages. -func newMsgsConsensus( - lggr logger.Logger, - maxSeqNums []cciptypes.SeqNumChain, - observations []cciptypes.CommitPluginObservation, - fChainCfg map[cciptypes.ChainSelector]int, -) ([]cciptypes.MerkleRootChain, error) { - maxSeqNumsPerChain := make(map[cciptypes.ChainSelector]cciptypes.SeqNum) - for _, seqNumChain := range maxSeqNums { - maxSeqNumsPerChain[seqNumChain.ChainSel] = seqNumChain.SeqNum - } - - // Gather all messages from all observations. - msgsFromObservations := make([]cciptypes.CCIPMsgBaseDetails, 0) - for _, obs := range observations { - msgsFromObservations = append(msgsFromObservations, obs.NewMsgs...) - } - lggr.Debugw("total observed messages across all followers", "msgs", len(msgsFromObservations)) - - // Filter out messages less than or equal to the max sequence numbers. - msgsFromObservations = slicelib.Filter(msgsFromObservations, func(msg cciptypes.CCIPMsgBaseDetails) bool { - maxSeqNum, ok := maxSeqNumsPerChain[msg.SourceChain] - if !ok { - return false - } - return msg.SeqNum > maxSeqNum - }) - lggr.Debugw("observed messages after filtering", "msgs", len(msgsFromObservations)) - - // Group messages by source chain. - sourceChains, groupedMsgs := slicelib.GroupBy( - msgsFromObservations, - func(msg cciptypes.CCIPMsgBaseDetails) cciptypes.ChainSelector { return msg.SourceChain }, - ) - - // Come to consensus on the observed messages by source chain. - consensusBySourceChain := make(map[cciptypes.ChainSelector]observedMsgsConsensus) - for _, sourceChain := range sourceChains { // note: we iterate using sourceChains slice for deterministic order. - observedMsgs, ok := groupedMsgs[sourceChain] - if !ok { - lggr.Panicw("source chain not found in grouped messages", "sourceChain", sourceChain) - } - - msgsConsensus, err := newMsgsConsensusForChain(lggr, sourceChain, observedMsgs, fChainCfg) - if err != nil { - return nil, fmt.Errorf("calculate observed msgs consensus: %w", err) - } - - if msgsConsensus.isEmpty() { - lggr.Debugw("no consensus on observed messages", "sourceChain", sourceChain) - continue - } - consensusBySourceChain[sourceChain] = msgsConsensus - lggr.Debugw("observed messages consensus", "sourceChain", sourceChain, "consensus", msgsConsensus) - } - - merkleRoots := make([]cciptypes.MerkleRootChain, 0) - for sourceChain, consensus := range consensusBySourceChain { - merkleRoots = append( - merkleRoots, - cciptypes.NewMerkleRootChain(sourceChain, consensus.seqNumRange, consensus.merkleRoot), - ) - } - - sort.Slice(merkleRoots, func(i, j int) bool { return merkleRoots[i].ChainSel < merkleRoots[j].ChainSel }) - return merkleRoots, nil -} - -// Given a list of observed msgs -// - Keep the messages that were observed by at least 2f_chain+1 followers. -// - Starting from the first message (min seq num), keep adding the messages to the merkle tree until a gap is found. -func newMsgsConsensusForChain( - lggr logger.Logger, - chainSel cciptypes.ChainSelector, - observedMsgs []cciptypes.CCIPMsgBaseDetails, - fChainCfg map[cciptypes.ChainSelector]int, -) (observedMsgsConsensus, error) { - fChain, ok := fChainCfg[chainSel] - if !ok { - return observedMsgsConsensus{}, fmt.Errorf("fchain not found for chain %d", chainSel) - } - lggr.Debugw("observed messages consensus", - "chain", chainSel, "fChain", fChain, "observedMsgs", len(observedMsgs)) - - // First come to consensus about the (sequence number, msg hash) pairs. - // For each sequence number consider the Hash with the most votes. - msgSeqNumToHashCounts := make(map[cciptypes.SeqNum]map[string]int) // seqNum -> msgHash -> count - for _, msg := range observedMsgs { - if _, exists := msgSeqNumToHashCounts[msg.SeqNum]; !exists { - msgSeqNumToHashCounts[msg.SeqNum] = make(map[string]int) - } - msgSeqNumToHashCounts[msg.SeqNum][msg.MsgHash.String()]++ - } - lggr.Debugw("observed message counts", "chain", chainSel, "msgSeqNumToHashCounts", msgSeqNumToHashCounts) - - msgObservationsCount := make(map[cciptypes.SeqNum]int) - msgSeqNumToHash := make(map[cciptypes.SeqNum]cciptypes.Bytes32) - for seqNum, hashCounts := range msgSeqNumToHashCounts { - if len(hashCounts) == 0 { - lggr.Fatalw("hash counts should never be empty", "seqNum", seqNum) - continue - } - - // Find the MsgHash with the most votes for each sequence number. - hashesSlice := make([]string, 0, len(hashCounts)) - for h := range hashCounts { - hashesSlice = append(hashesSlice, h) - } - // determinism in case we have the same count for different hashes - sort.Slice(hashesSlice, func(i, j int) bool { return hashesSlice[i] < hashesSlice[j] }) - - maxCnt := hashCounts[hashesSlice[0]] - mostVotedHash := hashesSlice[0] - for _, h := range hashesSlice[1:] { - cnt := hashCounts[h] - if cnt > maxCnt { - maxCnt = cnt - mostVotedHash = h - } - } - - msgObservationsCount[seqNum] = maxCnt - hashBytes, err := cciptypes.NewBytes32FromString(mostVotedHash) - if err != nil { - return observedMsgsConsensus{}, fmt.Errorf("critical issue converting hash '%s' to bytes32: %w", - mostVotedHash, err) - } - msgSeqNumToHash[seqNum] = hashBytes - } - lggr.Debugw("observed message consensus", "chain", chainSel, "msgSeqNumToHash", msgSeqNumToHash) - - // Filter out msgs not observed by at least 2f_chain+1 followers. - msgSeqNumsQuorum := mapset.NewSet[cciptypes.SeqNum]() - for seqNum, count := range msgObservationsCount { - if count >= 2*fChain+1 { - msgSeqNumsQuorum.Add(seqNum) - } - } - if msgSeqNumsQuorum.Cardinality() == 0 { - return observedMsgsConsensus{}, nil - } - - // Come to consensus on the observed messages sequence numbers range. - msgSeqNumsQuorumSlice := msgSeqNumsQuorum.ToSlice() - sort.Slice(msgSeqNumsQuorumSlice, func(i, j int) bool { return msgSeqNumsQuorumSlice[i] < msgSeqNumsQuorumSlice[j] }) - seqNumConsensusRange := cciptypes.NewSeqNumRange(msgSeqNumsQuorumSlice[0], msgSeqNumsQuorumSlice[0]) - for _, seqNum := range msgSeqNumsQuorumSlice[1:] { - if seqNum != seqNumConsensusRange.End()+1 { - break // Found a gap in the sequence numbers. - } - seqNumConsensusRange.SetEnd(seqNum) - } - - treeLeaves := make([][32]byte, 0) - for seqNum := seqNumConsensusRange.Start(); seqNum <= seqNumConsensusRange.End(); seqNum++ { - msgHash, ok := msgSeqNumToHash[seqNum] - if !ok { - return observedMsgsConsensus{}, fmt.Errorf("msg hash not found for seq num %d", seqNum) - } - treeLeaves = append(treeLeaves, msgHash) - } - - lggr.Debugw("constructing merkle tree", "chain", chainSel, "treeLeaves", len(treeLeaves)) - tree, err := merklemulti.NewTree(hashutil.NewKeccak(), treeLeaves) - if err != nil { - return observedMsgsConsensus{}, fmt.Errorf("construct merkle tree from %d leaves: %w", len(treeLeaves), err) - } - - return observedMsgsConsensus{ - seqNumRange: seqNumConsensusRange, - merkleRoot: tree.Root(), - }, nil -} - -// maxSeqNumsConsensus groups the observed max seq nums across all followers per chain. -// Orders the sequence numbers and selects the one at the index of destination chain fChain. -// -// For example: -// -// seqNums: [1, 1, 1, 10, 10, 10, 10, 10, 10] -// fChain: 4 -// result: 10 -// -// Selecting seqNums[fChain] ensures: -// - At least one honest node has seen this value, so adversary cannot bias the value lower which would cause reverts -// - If an honest oracle reports sorted_min[f] which happens to be stale i.e. that oracle has a delayed view -// of the chain, then the report will revert onchain but still succeed upon retry -// - We minimize the risk of naturally hitting the error condition minSeqNum > maxSeqNum due to oracles -// delayed views of the chain (would be an issue with taking sorted_mins[-f]) -func maxSeqNumsConsensus( - lggr logger.Logger, fChain int, observations []cciptypes.CommitPluginObservation, -) []cciptypes.SeqNumChain { - observedSeqNumsPerChain := make(map[cciptypes.ChainSelector][]cciptypes.SeqNum) - for _, obs := range observations { - for _, maxSeqNum := range obs.MaxSeqNums { - if _, exists := observedSeqNumsPerChain[maxSeqNum.ChainSel]; !exists { - observedSeqNumsPerChain[maxSeqNum.ChainSel] = make([]cciptypes.SeqNum, 0) - } - observedSeqNumsPerChain[maxSeqNum.ChainSel] = - append(observedSeqNumsPerChain[maxSeqNum.ChainSel], maxSeqNum.SeqNum) - } - } - - seqNums := make([]cciptypes.SeqNumChain, 0, len(observedSeqNumsPerChain)) - for ch, observedSeqNums := range observedSeqNumsPerChain { - if len(observedSeqNums) < 2*fChain+1 { - lggr.Warnw("not enough observations for chain", "chain", ch, "observedSeqNums", observedSeqNums) - continue - } - - sort.Slice(observedSeqNums, func(i, j int) bool { return observedSeqNums[i] < observedSeqNums[j] }) - seqNums = append(seqNums, cciptypes.NewSeqNumChain(ch, observedSeqNums[fChain])) - } - - sort.Slice(seqNums, func(i, j int) bool { return seqNums[i].ChainSel < seqNums[j].ChainSel }) - return seqNums -} - -// tokenPricesConsensus returns the median price for tokens that have at least 2f_chain+1 observations. -func tokenPricesConsensus( - observations []cciptypes.CommitPluginObservation, - fChain int, -) ([]cciptypes.TokenPrice, error) { - pricesPerToken := make(map[types.Account][]cciptypes.BigInt) - for _, obs := range observations { - for _, price := range obs.TokenPrices { - if _, exists := pricesPerToken[price.TokenID]; !exists { - pricesPerToken[price.TokenID] = make([]cciptypes.BigInt, 0) - } - pricesPerToken[price.TokenID] = append(pricesPerToken[price.TokenID], price.Price) - } - } - - // Keep the median - consensusPrices := make([]cciptypes.TokenPrice, 0) - for token, prices := range pricesPerToken { - if len(prices) < 2*fChain+1 { - continue - } - consensusPrices = append(consensusPrices, cciptypes.NewTokenPrice(token, slicelib.BigIntSortedMiddle(prices).Int)) - } - - sort.Slice(consensusPrices, func(i, j int) bool { return consensusPrices[i].TokenID < consensusPrices[j].TokenID }) - return consensusPrices, nil -} - -func gasPricesConsensus( - lggr logger.Logger, observations []cciptypes.CommitPluginObservation, fChain int, -) []cciptypes.GasPriceChain { - // Group the observed gas prices by chain. - gasPricePerChain := make(map[cciptypes.ChainSelector][]cciptypes.BigInt) - for _, obs := range observations { - for _, gasPrice := range obs.GasPrices { - if _, exists := gasPricePerChain[gasPrice.ChainSel]; !exists { - gasPricePerChain[gasPrice.ChainSel] = make([]cciptypes.BigInt, 0) - } - gasPricePerChain[gasPrice.ChainSel] = append(gasPricePerChain[gasPrice.ChainSel], gasPrice.GasPrice) - } - } - - // Keep the median - consensusGasPrices := make([]cciptypes.GasPriceChain, 0) - for chain, gasPrices := range gasPricePerChain { - if len(gasPrices) < 2*fChain+1 { - lggr.Warnw("not enough gas price observations", "chain", chain, "gasPrices", gasPrices) - continue - } - - consensusGasPrices = append( - consensusGasPrices, - cciptypes.NewGasPriceChain(slicelib.BigIntSortedMiddle(gasPrices).Int, chain), - ) - } - - sort.Slice( - consensusGasPrices, - func(i, j int) bool { return consensusGasPrices[i].ChainSel < consensusGasPrices[j].ChainSel }, - ) - return consensusGasPrices -} - -// fChainConsensus comes to consensus on the plugin config based on the observations. -// We cannot trust the state of a single follower, so we need to come to consensus on the config. -func fChainConsensus( - observations []cciptypes.CommitPluginObservation, // observations from all followers -) map[cciptypes.ChainSelector]int { - // Come to consensus on fChain. - // Use the fChain observed by most followers for each chain. - fChainCounts := make(map[cciptypes.ChainSelector]map[int]int) // {chain: {fChain: count}} - for _, obs := range observations { - for chain, fChain := range obs.FChain { - if _, exists := fChainCounts[chain]; !exists { - fChainCounts[chain] = make(map[int]int) - } - fChainCounts[chain][fChain]++ - } - } - consensusFChain := make(map[cciptypes.ChainSelector]int) - for chain, counts := range fChainCounts { - maxCount := 0 - for fChain, count := range counts { - if count > maxCount { - maxCount = count - consensusFChain[chain] = fChain - } - } - } - - return consensusFChain -} - -// validateObservedSequenceNumbers checks if the sequence numbers of the provided messages are unique for each chain and -// that they match the observed max sequence numbers. -func validateObservedSequenceNumbers(msgs []cciptypes.CCIPMsgBaseDetails, maxSeqNums []cciptypes.SeqNumChain) error { - // If the observer did not include sequence numbers it means that it's not a destination chain reader. - // In that case we cannot do any msg sequence number validations. - if len(maxSeqNums) == 0 { - return nil - } - - // MaxSeqNums must be unique for each chain. - maxSeqNumsMap := make(map[cciptypes.ChainSelector]cciptypes.SeqNum) - for _, maxSeqNum := range maxSeqNums { - if _, exists := maxSeqNumsMap[maxSeqNum.ChainSel]; exists { - return fmt.Errorf("duplicate max sequence number for chain %d", maxSeqNum.ChainSel) - } - maxSeqNumsMap[maxSeqNum.ChainSel] = maxSeqNum.SeqNum - } - - seqNums := make(map[cciptypes.ChainSelector]mapset.Set[cciptypes.SeqNum], len(msgs)) - hashes := mapset.NewSet[string]() - for _, msg := range msgs { - if msg.MsgHash.IsEmpty() { - return fmt.Errorf("observed msg hash must not be empty") - } - - if _, exists := seqNums[msg.SourceChain]; !exists { - seqNums[msg.SourceChain] = mapset.NewSet[cciptypes.SeqNum]() - } - - // The same sequence number must not appear more than once for the same chain and must be valid. - if seqNums[msg.SourceChain].Contains(msg.SeqNum) { - return fmt.Errorf("duplicate sequence number %d for chain %d", msg.SeqNum, msg.SourceChain) - } - seqNums[msg.SourceChain].Add(msg.SeqNum) - - // The observed msg hash cannot appear twice for different msgs. - if hashes.Contains(msg.MsgHash.String()) { - return fmt.Errorf("duplicate msg hash %s", msg.MsgHash.String()) - } - hashes.Add(msg.MsgHash.String()) - - // The observed msg sequence number cannot be less than or equal to the max observed sequence number. - maxSeqNum, exists := maxSeqNumsMap[msg.SourceChain] - if !exists { - return fmt.Errorf("max sequence number observation not found for chain %d", msg.SourceChain) - } - if msg.SeqNum <= maxSeqNum { - return fmt.Errorf("max sequence number %d must be greater than observed sequence number %d for chain %d", - maxSeqNum, msg.SeqNum, msg.SourceChain) - } - } - - return nil -} - -// validateObserverReadingEligibility checks if the observer is eligible to observe the messages it observed. -func validateObserverReadingEligibility( - msgs []cciptypes.CCIPMsgBaseDetails, - seqNums []cciptypes.SeqNumChain, - nodeSupportedChains mapset.Set[cciptypes.ChainSelector], - destChain cciptypes.ChainSelector, -) error { - - if len(seqNums) > 0 && !nodeSupportedChains.Contains(destChain) { - return fmt.Errorf("observer must be a writer if it observes sequence numbers") - } - - if len(msgs) == 0 { - return nil - } - - for _, msg := range msgs { - // Observer must be able to read the chain that the message is coming from. - if !nodeSupportedChains.Contains(msg.SourceChain) { - return fmt.Errorf("observer not allowed to read chain %d", msg.SourceChain) - } - } - - return nil -} - -func validateObservedTokenPrices(tokenPrices []cciptypes.TokenPrice) error { - tokensWithPrice := mapset.NewSet[types.Account]() - for _, t := range tokenPrices { - if tokensWithPrice.Contains(t.TokenID) { - return fmt.Errorf("duplicate token price for token: %s", t.TokenID) - } - tokensWithPrice.Add(t.TokenID) - - if t.Price.IsEmpty() { - return fmt.Errorf("token price must not be empty") - } - } - - return nil -} - -func validateObservedGasPrices(gasPrices []cciptypes.GasPriceChain) error { - // Duplicate gas prices must not appear for the same chain and must not be empty. - gasPriceChains := mapset.NewSet[cciptypes.ChainSelector]() - for _, g := range gasPrices { - if gasPriceChains.Contains(g.ChainSel) { - return fmt.Errorf("duplicate gas price for chain %d", g.ChainSel) - } - gasPriceChains.Add(g.ChainSel) - if g.GasPrice.IsEmpty() { - return fmt.Errorf("gas price must not be empty") - } - } - - return nil -} - -type observedMsgsConsensus struct { - seqNumRange cciptypes.SeqNumRange - merkleRoot [32]byte -} - -func (o observedMsgsConsensus) isEmpty() bool { - return o.seqNumRange.Start() == 0 && o.seqNumRange.End() == 0 && o.merkleRoot == [32]byte{} -} diff --git a/core/services/ocr3/plugins/ccip/commit/plugin_functions_test.go b/core/services/ocr3/plugins/ccip/commit/plugin_functions_test.go deleted file mode 100644 index 31785fbbbf..0000000000 --- a/core/services/ocr3/plugins/ccip/commit/plugin_functions_test.go +++ /dev/null @@ -1,1190 +0,0 @@ -package commit - -import ( - "context" - "math/big" - "slices" - "strconv" - "testing" - "time" - - mapset "github.com/deckarep/golang-set/v2" - libocrtypes "github.com/smartcontractkit/libocr/ragep2p/types" - - "github.com/smartcontractkit/ccipocr3/internal/libs/slicelib" - "github.com/smartcontractkit/ccipocr3/internal/mocks" - - cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" - "github.com/smartcontractkit/libocr/offchainreporting2plus/types" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - - "github.com/smartcontractkit/chainlink-common/pkg/logger" -) - -func Test_observeMaxSeqNumsPerChain(t *testing.T) { - testCases := []struct { - name string - prevOutcome cciptypes.CommitPluginOutcome - onChainSeqNums map[cciptypes.ChainSelector]cciptypes.SeqNum - readChains []cciptypes.ChainSelector - destChain cciptypes.ChainSelector - expErr bool - expSeqNumsInSync bool - expMaxSeqNums []cciptypes.SeqNumChain - }{ - { - name: "report on chain seq num and can read dest", - onChainSeqNums: map[cciptypes.ChainSelector]cciptypes.SeqNum{ - 1: 10, - 2: 20, - }, - readChains: []cciptypes.ChainSelector{1, 2, 3}, - destChain: 3, - expErr: false, - expMaxSeqNums: []cciptypes.SeqNumChain{ - {ChainSel: 1, SeqNum: 10}, - {ChainSel: 2, SeqNum: 20}, - }, - }, - { - name: "cannot read dest", - prevOutcome: cciptypes.CommitPluginOutcome{ - MaxSeqNums: []cciptypes.SeqNumChain{ - {ChainSel: 1, SeqNum: 11}, // for chain 1 previous outcome is higher than on-chain state - {ChainSel: 2, SeqNum: 19}, // for chain 2 previous outcome is behind on-chain state - }, - }, - onChainSeqNums: map[cciptypes.ChainSelector]cciptypes.SeqNum{ - 1: 10, - 2: 20, - }, - readChains: []cciptypes.ChainSelector{1, 2}, - destChain: 3, - expErr: false, - expMaxSeqNums: []cciptypes.SeqNumChain{}, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - ctx := context.Background() - mockReader := mocks.NewCCIPReader() - knownSourceChains := slicelib.Filter( - tc.readChains, - func(ch cciptypes.ChainSelector) bool { return ch != tc.destChain }, - ) - lggr := logger.Test(t) - - onChainSeqNums := make([]cciptypes.SeqNum, 0) - for _, chain := range knownSourceChains { - if v, ok := tc.onChainSeqNums[chain]; !ok { - t.Fatalf("invalid test case missing on chain seq num expectation for %d", chain) - } else { - onChainSeqNums = append(onChainSeqNums, v) - } - } - mockReader.On("NextSeqNum", ctx, knownSourceChains).Return(onChainSeqNums, nil) - - seqNums, err := observeLatestCommittedSeqNums( - ctx, - lggr, - mockReader, - mapset.NewSet(tc.readChains...), - tc.destChain, - knownSourceChains, - ) - - if tc.expErr { - assert.Error(t, err) - return - } - assert.NoError(t, err) - assert.Equal(t, tc.expMaxSeqNums, seqNums) - }) - } -} - -func Test_observeNewMsgs(t *testing.T) { - testCases := []struct { - name string - maxSeqNumsPerChain []cciptypes.SeqNumChain - readChains []cciptypes.ChainSelector - destChain cciptypes.ChainSelector - msgScanBatchSize int - newMsgs map[cciptypes.ChainSelector][]cciptypes.CCIPMsg - expMsgs []cciptypes.CCIPMsg - expErr bool - }{ - { - name: "no new messages", - maxSeqNumsPerChain: []cciptypes.SeqNumChain{ - {ChainSel: 1, SeqNum: 10}, - {ChainSel: 2, SeqNum: 20}, - }, - readChains: []cciptypes.ChainSelector{1, 2}, - msgScanBatchSize: 256, - newMsgs: map[cciptypes.ChainSelector][]cciptypes.CCIPMsg{ - 1: {}, - 2: {}, - }, - expMsgs: []cciptypes.CCIPMsg{}, - expErr: false, - }, - { - name: "new messages", - maxSeqNumsPerChain: []cciptypes.SeqNumChain{ - {ChainSel: 1, SeqNum: 10}, - {ChainSel: 2, SeqNum: 20}, - }, - readChains: []cciptypes.ChainSelector{1, 2}, - msgScanBatchSize: 256, - newMsgs: map[cciptypes.ChainSelector][]cciptypes.CCIPMsg{ - 1: { - {CCIPMsgBaseDetails: cciptypes.CCIPMsgBaseDetails{ID: "1", SourceChain: 1, SeqNum: 11}}, - }, - 2: { - {CCIPMsgBaseDetails: cciptypes.CCIPMsgBaseDetails{ID: "2", SourceChain: 2, SeqNum: 21}}, - {CCIPMsgBaseDetails: cciptypes.CCIPMsgBaseDetails{ID: "3", SourceChain: 2, SeqNum: 22}}, - }, - }, - expMsgs: []cciptypes.CCIPMsg{ - {CCIPMsgBaseDetails: cciptypes.CCIPMsgBaseDetails{ID: "1", SourceChain: 1, SeqNum: 11}}, - {CCIPMsgBaseDetails: cciptypes.CCIPMsgBaseDetails{ID: "2", SourceChain: 2, SeqNum: 21}}, - {CCIPMsgBaseDetails: cciptypes.CCIPMsgBaseDetails{ID: "3", SourceChain: 2, SeqNum: 22}}, - }, - expErr: false, - }, - { - name: "new messages but one chain is not readable", - maxSeqNumsPerChain: []cciptypes.SeqNumChain{ - {ChainSel: 1, SeqNum: 10}, - {ChainSel: 2, SeqNum: 20}, - }, - readChains: []cciptypes.ChainSelector{2}, - msgScanBatchSize: 256, - newMsgs: map[cciptypes.ChainSelector][]cciptypes.CCIPMsg{ - 2: { - {CCIPMsgBaseDetails: cciptypes.CCIPMsgBaseDetails{ID: "2", SourceChain: 2, SeqNum: 21}}, - {CCIPMsgBaseDetails: cciptypes.CCIPMsgBaseDetails{ID: "3", SourceChain: 2, SeqNum: 22}}, - }, - }, - expMsgs: []cciptypes.CCIPMsg{ - {CCIPMsgBaseDetails: cciptypes.CCIPMsgBaseDetails{ID: "2", SourceChain: 2, SeqNum: 21}}, - {CCIPMsgBaseDetails: cciptypes.CCIPMsgBaseDetails{ID: "3", SourceChain: 2, SeqNum: 22}}, - }, - expErr: false, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - ctx := context.Background() - mockReader := mocks.NewCCIPReader() - msgHasher := mocks.NewMessageHasher() - for i := range tc.expMsgs { // make sure the hashes are populated - h, err := msgHasher.Hash(ctx, tc.expMsgs[i]) - assert.NoError(t, err) - tc.expMsgs[i].MsgHash = h - } - - lggr := logger.Test(t) - - for _, seqNumChain := range tc.maxSeqNumsPerChain { - if slices.Contains(tc.readChains, seqNumChain.ChainSel) { - mockReader.On( - "MsgsBetweenSeqNums", - ctx, - seqNumChain.ChainSel, - cciptypes.NewSeqNumRange(seqNumChain.SeqNum+1, seqNumChain.SeqNum+cciptypes.SeqNum(1+tc.msgScanBatchSize)), - ).Return(tc.newMsgs[seqNumChain.ChainSel], nil) - } - } - - msgs, err := observeNewMsgs( - ctx, - lggr, - mockReader, - msgHasher, - mapset.NewSet(tc.readChains...), - tc.maxSeqNumsPerChain, - tc.msgScanBatchSize, - ) - if tc.expErr { - assert.Error(t, err) - return - } - assert.NoError(t, err) - assert.Equal(t, tc.expMsgs, msgs) - mockReader.AssertExpectations(t) - }) - } -} - -func Benchmark_observeNewMsgs(b *testing.B) { - const ( - numChains = 5 - readerDelayMS = 100 - newMsgsPerChain = 256 - ) - - readChains := make([]cciptypes.ChainSelector, numChains) - maxSeqNumsPerChain := make([]cciptypes.SeqNumChain, numChains) - for i := 0; i < numChains; i++ { - readChains[i] = cciptypes.ChainSelector(i + 1) - maxSeqNumsPerChain[i] = cciptypes.SeqNumChain{ChainSel: cciptypes.ChainSelector(i + 1), SeqNum: cciptypes.SeqNum(1)} - } - - for i := 0; i < b.N; i++ { - ctx := context.Background() - lggr, _ := logger.New() - ccipReader := mocks.NewCCIPReader() - msgHasher := mocks.NewMessageHasher() - - expNewMsgs := make([]cciptypes.CCIPMsg, 0, newMsgsPerChain*numChains) - for _, seqNumChain := range maxSeqNumsPerChain { - newMsgs := make([]cciptypes.CCIPMsg, 0, newMsgsPerChain) - for msgSeqNum := 1; msgSeqNum <= newMsgsPerChain; msgSeqNum++ { - newMsgs = append(newMsgs, cciptypes.CCIPMsg{ - CCIPMsgBaseDetails: cciptypes.CCIPMsgBaseDetails{ - ID: strconv.Itoa(msgSeqNum), - SourceChain: seqNumChain.ChainSel, - SeqNum: cciptypes.SeqNum(msgSeqNum), - }, - }) - } - - ccipReader.On( - "MsgsBetweenSeqNums", - ctx, - []cciptypes.ChainSelector{seqNumChain.ChainSel}, - cciptypes.NewSeqNumRange( - seqNumChain.SeqNum+1, - seqNumChain.SeqNum+cciptypes.SeqNum(1+newMsgsPerChain), - ), - ).Run(func(args mock.Arguments) { - time.Sleep(time.Duration(readerDelayMS) * time.Millisecond) - }).Return(newMsgs, nil) - expNewMsgs = append(expNewMsgs, newMsgs...) - } - - msgs, err := observeNewMsgs( - ctx, - lggr, - ccipReader, - msgHasher, - mapset.NewSet(readChains...), - maxSeqNumsPerChain, - newMsgsPerChain, - ) - assert.NoError(b, err) - assert.Equal(b, expNewMsgs, msgs) - - // (old) sequential: 509.345 ms/op (numChains * readerDelayMS) - // (current) parallel: 102.543 ms/op (readerDelayMS) - } -} - -func Test_observeTokenPrices(t *testing.T) { - ctx := context.Background() - - t.Run("happy path", func(t *testing.T) { - priceReader := mocks.NewTokenPricesReader() - tokens := []types.Account{"0x1", "0x2", "0x3"} - mockPrices := []*big.Int{big.NewInt(10), big.NewInt(20), big.NewInt(30)} - priceReader.On("GetTokenPricesUSD", ctx, tokens).Return(mockPrices, nil) - prices, err := observeTokenPrices(ctx, priceReader, tokens) - assert.NoError(t, err) - assert.Equal(t, []cciptypes.TokenPrice{ - cciptypes.NewTokenPrice("0x1", big.NewInt(10)), - cciptypes.NewTokenPrice("0x2", big.NewInt(20)), - cciptypes.NewTokenPrice("0x3", big.NewInt(30)), - }, prices) - }) - - t.Run("price reader internal issue", func(t *testing.T) { - priceReader := mocks.NewTokenPricesReader() - tokens := []types.Account{"0x1", "0x2", "0x3"} - mockPrices := []*big.Int{big.NewInt(10), big.NewInt(20)} // returned two prices for three tokens - priceReader.On("GetTokenPricesUSD", ctx, tokens).Return(mockPrices, nil) - _, err := observeTokenPrices(ctx, priceReader, tokens) - assert.Error(t, err) - }) - -} - -func Test_observeGasPrices(t *testing.T) { - ctx := context.Background() - - t.Run("happy path", func(t *testing.T) { - mockReader := mocks.NewCCIPReader() - chains := []cciptypes.ChainSelector{1, 2, 3} - mockGasPrices := []cciptypes.BigInt{ - cciptypes.NewBigIntFromInt64(10), - cciptypes.NewBigIntFromInt64(20), - cciptypes.NewBigIntFromInt64(30), - } - mockReader.On("GasPrices", ctx, chains).Return(mockGasPrices, nil) - gasPrices, err := observeGasPrices(ctx, mockReader, chains) - assert.NoError(t, err) - assert.Equal(t, []cciptypes.GasPriceChain{ - cciptypes.NewGasPriceChain(mockGasPrices[0].Int, chains[0]), - cciptypes.NewGasPriceChain(mockGasPrices[1].Int, chains[1]), - cciptypes.NewGasPriceChain(mockGasPrices[2].Int, chains[2]), - }, gasPrices) - }) - - t.Run("gas reader internal issue", func(t *testing.T) { - mockReader := mocks.NewCCIPReader() - chains := []cciptypes.ChainSelector{1, 2, 3} - mockGasPrices := []cciptypes.BigInt{ - cciptypes.NewBigIntFromInt64(10), - cciptypes.NewBigIntFromInt64(20), - } // return 2 prices for 3 chains - mockReader.On("GasPrices", ctx, chains).Return(mockGasPrices, nil) - _, err := observeGasPrices(ctx, mockReader, chains) - assert.Error(t, err) - }) -} - -func Test_validateObservedSequenceNumbers(t *testing.T) { - testCases := []struct { - name string - msgs []cciptypes.CCIPMsgBaseDetails - maxSeqNums []cciptypes.SeqNumChain - expErr bool - }{ - { - name: "empty", - msgs: nil, - maxSeqNums: nil, - expErr: false, - }, - { - name: "dup seq num observation", - msgs: nil, - maxSeqNums: []cciptypes.SeqNumChain{ - {ChainSel: 1, SeqNum: 10}, - {ChainSel: 2, SeqNum: 20}, - {ChainSel: 1, SeqNum: 10}, - }, - expErr: true, - }, - { - name: "seq nums ok", - msgs: nil, - maxSeqNums: []cciptypes.SeqNumChain{ - {ChainSel: 1, SeqNum: 10}, - {ChainSel: 2, SeqNum: 20}, - }, - expErr: false, - }, - { - name: "dup msg seq num", - msgs: []cciptypes.CCIPMsgBaseDetails{ - {ID: "1", SourceChain: 1, SeqNum: 12}, - {ID: "1", SourceChain: 1, SeqNum: 13}, - {ID: "1", SourceChain: 1, SeqNum: 14}, - {ID: "1", SourceChain: 1, SeqNum: 13}, // dup - }, - maxSeqNums: []cciptypes.SeqNumChain{ - {ChainSel: 1, SeqNum: 10}, - {ChainSel: 2, SeqNum: 20}, - }, - expErr: true, - }, - { - name: "msg seq nums ok", - msgs: []cciptypes.CCIPMsgBaseDetails{ - {MsgHash: cciptypes.Bytes32{1}, ID: "1", SourceChain: 1, SeqNum: 12}, - {MsgHash: cciptypes.Bytes32{2}, ID: "1", SourceChain: 1, SeqNum: 13}, - {MsgHash: cciptypes.Bytes32{3}, ID: "1", SourceChain: 1, SeqNum: 14}, - {MsgHash: cciptypes.Bytes32{4}, ID: "1", SourceChain: 2, SeqNum: 21}, - }, - maxSeqNums: []cciptypes.SeqNumChain{ - {ChainSel: 1, SeqNum: 10}, - {ChainSel: 2, SeqNum: 20}, - }, - expErr: false, - }, - { - name: "msg seq nums does not match observed max seq num", - msgs: []cciptypes.CCIPMsgBaseDetails{ - {ID: "1", SourceChain: 1, SeqNum: 12}, - {ID: "1", SourceChain: 1, SeqNum: 13}, - {ID: "1", SourceChain: 1, SeqNum: 10}, // max seq num is already 10 - {ID: "1", SourceChain: 2, SeqNum: 21}, - }, - maxSeqNums: []cciptypes.SeqNumChain{ - {ChainSel: 1, SeqNum: 10}, - {ChainSel: 2, SeqNum: 20}, - }, - expErr: true, - }, - { - name: "max seq num not found", - msgs: []cciptypes.CCIPMsgBaseDetails{ - {ID: "1", SourceChain: 1, SeqNum: 12}, - {ID: "1", SourceChain: 1, SeqNum: 13}, - {ID: "1", SourceChain: 1, SeqNum: 14}, - {ID: "1", SourceChain: 2, SeqNum: 21}, // max seq num not reported - }, - maxSeqNums: []cciptypes.SeqNumChain{ - {ChainSel: 1, SeqNum: 10}, - }, - expErr: true, - }, - { - name: "msg hashes ok", - msgs: []cciptypes.CCIPMsgBaseDetails{ - {MsgHash: cciptypes.Bytes32{123}, ID: "1", SourceChain: 1, SeqNum: 12}, - {MsgHash: cciptypes.Bytes32{99}, ID: "1", SourceChain: 1, SeqNum: 13}, - {MsgHash: cciptypes.Bytes32{12}, ID: "1", SourceChain: 300, SeqNum: 23}, - }, - maxSeqNums: []cciptypes.SeqNumChain{ - {ChainSel: 1, SeqNum: 10}, - {ChainSel: 2, SeqNum: 20}, - {ChainSel: 300, SeqNum: 22}, - }, - expErr: false, - }, - { - name: "dup msg hashes", - msgs: []cciptypes.CCIPMsgBaseDetails{ - {MsgHash: cciptypes.Bytes32{123}, ID: "1", SourceChain: 1, SeqNum: 12}, - {MsgHash: cciptypes.Bytes32{99}, ID: "1", SourceChain: 1, SeqNum: 13}, - {MsgHash: cciptypes.Bytes32{123}, ID: "1", SourceChain: 300, SeqNum: 23}, // dup hash - }, - maxSeqNums: []cciptypes.SeqNumChain{ - {ChainSel: 1, SeqNum: 10}, - {ChainSel: 2, SeqNum: 20}, - {ChainSel: 300, SeqNum: 22}, - }, - expErr: true, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - err := validateObservedSequenceNumbers(tc.msgs, tc.maxSeqNums) - if tc.expErr { - assert.Error(t, err) - return - } - assert.NoError(t, err) - }) - } -} - -func Test_validateObserverReadingEligibility(t *testing.T) { - testCases := []struct { - name string - observer libocrtypes.PeerID - msgs []cciptypes.CCIPMsgBaseDetails - seqNums []cciptypes.SeqNumChain - nodeSupportedChains mapset.Set[cciptypes.ChainSelector] - destChain cciptypes.ChainSelector - expErr bool - }{ - { - name: "observer can read all chains", - observer: libocrtypes.PeerID{10}, - msgs: []cciptypes.CCIPMsgBaseDetails{ - {ID: "1", SourceChain: 1, SeqNum: 12}, - {ID: "3", SourceChain: 2, SeqNum: 12}, - {ID: "1", SourceChain: 3, SeqNum: 12}, - {ID: "2", SourceChain: 3, SeqNum: 12}, - }, - nodeSupportedChains: mapset.NewSet[cciptypes.ChainSelector](1, 2, 3), - destChain: 1, - expErr: false, - }, - { - name: "observer is a writer so can observe seq nums", - observer: libocrtypes.PeerID{10}, - msgs: []cciptypes.CCIPMsgBaseDetails{}, - seqNums: []cciptypes.SeqNumChain{ - {ChainSel: 1, SeqNum: 12}, - }, - nodeSupportedChains: mapset.NewSet[cciptypes.ChainSelector](1, 3), - destChain: 1, - expErr: false, - }, - { - name: "observer is not a writer so cannot observe seq nums", - observer: libocrtypes.PeerID{10}, - msgs: []cciptypes.CCIPMsgBaseDetails{}, - seqNums: []cciptypes.SeqNumChain{ - {ChainSel: 1, SeqNum: 12}, - }, - nodeSupportedChains: mapset.NewSet[cciptypes.ChainSelector](3), - destChain: 1, - expErr: true, - }, - { - name: "observer cfg not found", - observer: libocrtypes.PeerID{10}, - msgs: []cciptypes.CCIPMsgBaseDetails{ - {ID: "1", SourceChain: 1, SeqNum: 12}, - {ID: "3", SourceChain: 2, SeqNum: 12}, - {ID: "1", SourceChain: 3, SeqNum: 12}, - {ID: "2", SourceChain: 3, SeqNum: 12}, - }, - nodeSupportedChains: mapset.NewSet[cciptypes.ChainSelector](1, 3), // observer 10 not found - destChain: 1, - expErr: true, - }, - { - name: "no msgs", - observer: libocrtypes.PeerID{10}, - msgs: []cciptypes.CCIPMsgBaseDetails{}, - nodeSupportedChains: mapset.NewSet[cciptypes.ChainSelector](1, 3), - expErr: false, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - err := validateObserverReadingEligibility(tc.msgs, tc.seqNums, tc.nodeSupportedChains, tc.destChain) - if tc.expErr { - assert.Error(t, err) - return - } - assert.NoError(t, err) - }) - } -} - -func Test_validateObservedTokenPrices(t *testing.T) { - testCases := []struct { - name string - tokenPrices []cciptypes.TokenPrice - expErr bool - }{ - { - name: "empty is valid", - tokenPrices: []cciptypes.TokenPrice{}, - expErr: false, - }, - { - name: "all valid", - tokenPrices: []cciptypes.TokenPrice{ - cciptypes.NewTokenPrice("0x1", big.NewInt(1)), - cciptypes.NewTokenPrice("0x2", big.NewInt(1)), - cciptypes.NewTokenPrice("0x3", big.NewInt(1)), - cciptypes.NewTokenPrice("0xa", big.NewInt(1)), - }, - expErr: false, - }, - { - name: "dup price", - tokenPrices: []cciptypes.TokenPrice{ - cciptypes.NewTokenPrice("0x1", big.NewInt(1)), - cciptypes.NewTokenPrice("0x2", big.NewInt(1)), - cciptypes.NewTokenPrice("0x1", big.NewInt(1)), // dup - cciptypes.NewTokenPrice("0xa", big.NewInt(1)), - }, - expErr: true, - }, - { - name: "nil price", - tokenPrices: []cciptypes.TokenPrice{ - cciptypes.NewTokenPrice("0x1", big.NewInt(1)), - cciptypes.NewTokenPrice("0x2", big.NewInt(1)), - cciptypes.NewTokenPrice("0x3", nil), // nil price - cciptypes.NewTokenPrice("0xa", big.NewInt(1)), - }, - expErr: true, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - err := validateObservedTokenPrices(tc.tokenPrices) - if tc.expErr { - assert.Error(t, err) - return - } - assert.NoError(t, err) - }) - - } -} - -func Test_validateObservedGasPrices(t *testing.T) { - testCases := []struct { - name string - gasPrices []cciptypes.GasPriceChain - expErr bool - }{ - { - name: "empty is valid", - gasPrices: []cciptypes.GasPriceChain{}, - expErr: false, - }, - { - name: "all valid", - gasPrices: []cciptypes.GasPriceChain{ - cciptypes.NewGasPriceChain(big.NewInt(10), 1), - cciptypes.NewGasPriceChain(big.NewInt(20), 2), - cciptypes.NewGasPriceChain(big.NewInt(1312), 3), - }, - expErr: false, - }, - { - name: "duplicate gas price", - gasPrices: []cciptypes.GasPriceChain{ - cciptypes.NewGasPriceChain(big.NewInt(10), 1), - cciptypes.NewGasPriceChain(big.NewInt(20), 2), - cciptypes.NewGasPriceChain(big.NewInt(1312), 1), // notice we already have a gas price for chain 1 - }, - expErr: true, - }, - { - name: "empty gas price", - gasPrices: []cciptypes.GasPriceChain{ - cciptypes.NewGasPriceChain(big.NewInt(10), 1), - cciptypes.NewGasPriceChain(big.NewInt(20), 2), - cciptypes.NewGasPriceChain(nil, 3), // nil - }, - expErr: true, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - err := validateObservedGasPrices(tc.gasPrices) - if tc.expErr { - assert.Error(t, err) - return - } - assert.NoError(t, err) - }) - } -} - -func Test_newMsgsConsensusForChain(t *testing.T) { - testCases := []struct { - name string - maxSeqNums []cciptypes.SeqNumChain - observations []cciptypes.CommitPluginObservation - expMerkleRoots []cciptypes.MerkleRootChain - fChain map[cciptypes.ChainSelector]int - expErr bool - }{ - { - name: "empty", - maxSeqNums: []cciptypes.SeqNumChain{}, - observations: nil, - expMerkleRoots: []cciptypes.MerkleRootChain{}, - expErr: false, - }, - { - name: "one message but not reaching 2fChain+1 observations", - fChain: map[cciptypes.ChainSelector]int{ - 1: 2, - }, - maxSeqNums: []cciptypes.SeqNumChain{ - {ChainSel: 1, SeqNum: 10}, - }, - observations: []cciptypes.CommitPluginObservation{ - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 11}}}, - }, - expMerkleRoots: []cciptypes.MerkleRootChain{}, - expErr: false, - }, - { - name: "one message reaching 2fChain+1 observations", - fChain: map[cciptypes.ChainSelector]int{ - 1: 2, - }, - maxSeqNums: []cciptypes.SeqNumChain{ - {ChainSel: 1, SeqNum: 10}, - }, - observations: []cciptypes.CommitPluginObservation{ - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 11}}}, - }, - expMerkleRoots: []cciptypes.MerkleRootChain{ - { - ChainSel: 1, - SeqNumsRange: cciptypes.NewSeqNumRange(11, 11), - }, - }, - expErr: false, - }, - { - name: "multiple messages all of them reaching 2fChain+1 observations", - fChain: map[cciptypes.ChainSelector]int{ - 1: 2, - }, - maxSeqNums: []cciptypes.SeqNumChain{ - {ChainSel: 1, SeqNum: 10}, - }, - observations: []cciptypes.CommitPluginObservation{ - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "2", SourceChain: 1, SeqNum: 12}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "2", SourceChain: 1, SeqNum: 12}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "2", SourceChain: 1, SeqNum: 12}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "2", SourceChain: 1, SeqNum: 12}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "2", SourceChain: 1, SeqNum: 12}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "3", SourceChain: 1, SeqNum: 13}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "3", SourceChain: 1, SeqNum: 13}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "3", SourceChain: 1, SeqNum: 13}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "3", SourceChain: 1, SeqNum: 13}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "3", SourceChain: 1, SeqNum: 13}}}, - }, - expMerkleRoots: []cciptypes.MerkleRootChain{ - { - ChainSel: 1, - SeqNumsRange: cciptypes.NewSeqNumRange(11, 13), - }, - }, - expErr: false, - }, - { - name: "one message sequence number is lower than consensus max seq num", - fChain: map[cciptypes.ChainSelector]int{ - 1: 2, - }, - maxSeqNums: []cciptypes.SeqNumChain{ - {ChainSel: 1, SeqNum: 10}, - }, - observations: []cciptypes.CommitPluginObservation{ - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 10}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 10}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 10}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 10}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 10}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "2", SourceChain: 1, SeqNum: 12}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "2", SourceChain: 1, SeqNum: 12}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "2", SourceChain: 1, SeqNum: 12}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "2", SourceChain: 1, SeqNum: 12}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "2", SourceChain: 1, SeqNum: 12}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "3", SourceChain: 1, SeqNum: 13}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "3", SourceChain: 1, SeqNum: 13}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "3", SourceChain: 1, SeqNum: 13}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "3", SourceChain: 1, SeqNum: 13}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "3", SourceChain: 1, SeqNum: 13}}}, - }, - expMerkleRoots: []cciptypes.MerkleRootChain{ - { - ChainSel: 1, - SeqNumsRange: cciptypes.NewSeqNumRange(12, 13), - }, - }, - expErr: false, - }, - { - name: "multiple messages some of them not reaching 2fChain+1 observations", - fChain: map[cciptypes.ChainSelector]int{ - 1: 2, - }, - maxSeqNums: []cciptypes.SeqNumChain{ - {ChainSel: 1, SeqNum: 10}, - }, - observations: []cciptypes.CommitPluginObservation{ - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "2", SourceChain: 1, SeqNum: 12}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "2", SourceChain: 1, SeqNum: 12}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "3", SourceChain: 1, SeqNum: 13}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "3", SourceChain: 1, SeqNum: 13}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "3", SourceChain: 1, SeqNum: 13}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "3", SourceChain: 1, SeqNum: 13}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "3", SourceChain: 1, SeqNum: 13}}}, - }, - expMerkleRoots: []cciptypes.MerkleRootChain{ - { - ChainSel: 1, - SeqNumsRange: cciptypes.NewSeqNumRange(11, 11), // we stop at 11 because there is a gap for going to 13 - }, - }, - expErr: false, - }, - { - name: "multiple messages on different chains", - fChain: map[cciptypes.ChainSelector]int{ - 1: 2, - 2: 1, - }, - maxSeqNums: []cciptypes.SeqNumChain{ - {ChainSel: 1, SeqNum: 10}, - {ChainSel: 2, SeqNum: 20}, - }, - observations: []cciptypes.CommitPluginObservation{ - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "3", SourceChain: 2, SeqNum: 21}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "3", SourceChain: 2, SeqNum: 21}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "3", SourceChain: 2, SeqNum: 21}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "4", SourceChain: 2, SeqNum: 22}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "4", SourceChain: 2, SeqNum: 22}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "4", SourceChain: 2, SeqNum: 22}}}, - }, - expMerkleRoots: []cciptypes.MerkleRootChain{ - { - ChainSel: 1, - SeqNumsRange: cciptypes.NewSeqNumRange(11, 11), // we stop at 11 because there is a gap for going to 13 - }, - { - ChainSel: 2, - SeqNumsRange: cciptypes.NewSeqNumRange(21, 22), // we stop at 11 because there is a gap for going to 13 - }, - }, - expErr: false, - }, - { - name: "one message seq num with multiple reported ids", - fChain: map[cciptypes.ChainSelector]int{ - 1: 2, - }, - maxSeqNums: []cciptypes.SeqNumChain{ - {ChainSel: 1, SeqNum: 10}, - }, - observations: []cciptypes.CommitPluginObservation{ - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "1", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "10", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "10", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "111", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "111", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "3", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "2", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "2", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "2", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "2", SourceChain: 1, SeqNum: 11}}}, - {NewMsgs: []cciptypes.CCIPMsgBaseDetails{{ID: "2", SourceChain: 1, SeqNum: 11}}}, - }, - expMerkleRoots: []cciptypes.MerkleRootChain{ - { - ChainSel: 1, - SeqNumsRange: cciptypes.NewSeqNumRange(11, 11), - }, - }, - expErr: false, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - lggr := logger.Test(t) - merkleRoots, err := newMsgsConsensus(lggr, tc.maxSeqNums, tc.observations, tc.fChain) - if tc.expErr { - assert.Error(t, err) - return - } - assert.NoError(t, err) - assert.Equal(t, len(tc.expMerkleRoots), len(merkleRoots)) - for i, exp := range tc.expMerkleRoots { - assert.Equal(t, exp.ChainSel, merkleRoots[i].ChainSel) - assert.Equal(t, exp.SeqNumsRange, merkleRoots[i].SeqNumsRange) - } - }) - } -} - -func Test_maxSeqNumsConsensus(t *testing.T) { - testCases := []struct { - name string - observations []cciptypes.CommitPluginObservation - fChain int - expSeqNums []cciptypes.SeqNumChain - }{ - { - name: "empty observations", - observations: []cciptypes.CommitPluginObservation{}, - fChain: 2, - expSeqNums: []cciptypes.SeqNumChain{}, - }, - { - name: "one chain all followers agree", - observations: []cciptypes.CommitPluginObservation{ - { - MaxSeqNums: []cciptypes.SeqNumChain{ - {ChainSel: 2, SeqNum: 20}, - {ChainSel: 2, SeqNum: 20}, - {ChainSel: 2, SeqNum: 20}, - {ChainSel: 2, SeqNum: 20}, - {ChainSel: 2, SeqNum: 20}, - {ChainSel: 2, SeqNum: 20}, - {ChainSel: 2, SeqNum: 20}, - }, - }, - }, - fChain: 2, - expSeqNums: []cciptypes.SeqNumChain{ - {ChainSel: 2, SeqNum: 20}, - }, - }, - { - name: "one chain all followers agree but not enough observations", - observations: []cciptypes.CommitPluginObservation{ - { - MaxSeqNums: []cciptypes.SeqNumChain{ - {ChainSel: 2, SeqNum: 20}, - {ChainSel: 2, SeqNum: 20}, - {ChainSel: 2, SeqNum: 20}, - {ChainSel: 2, SeqNum: 20}, - {ChainSel: 2, SeqNum: 20}, - }, - }, - }, - fChain: 3, - expSeqNums: []cciptypes.SeqNumChain{}, - }, - { - name: "one chain 3 followers not in sync, 4 in sync", - observations: []cciptypes.CommitPluginObservation{ - { - MaxSeqNums: []cciptypes.SeqNumChain{ - {ChainSel: 2, SeqNum: 20}, - {ChainSel: 2, SeqNum: 19}, - {ChainSel: 2, SeqNum: 20}, - {ChainSel: 2, SeqNum: 19}, - {ChainSel: 2, SeqNum: 20}, - {ChainSel: 2, SeqNum: 19}, - {ChainSel: 2, SeqNum: 20}, - }, - }, - }, - fChain: 3, - expSeqNums: []cciptypes.SeqNumChain{ - {ChainSel: 2, SeqNum: 20}, - }, - }, - { - name: "two chains", - observations: []cciptypes.CommitPluginObservation{ - { - MaxSeqNums: []cciptypes.SeqNumChain{ - {ChainSel: 2, SeqNum: 20}, - {ChainSel: 2, SeqNum: 20}, - {ChainSel: 2, SeqNum: 20}, - {ChainSel: 2, SeqNum: 20}, - {ChainSel: 2, SeqNum: 20}, - {ChainSel: 2, SeqNum: 20}, - {ChainSel: 2, SeqNum: 20}, - - {ChainSel: 3, SeqNum: 30}, - {ChainSel: 3, SeqNum: 30}, - {ChainSel: 3, SeqNum: 30}, - {ChainSel: 3, SeqNum: 30}, - {ChainSel: 3, SeqNum: 30}, - }, - }, - }, - fChain: 2, - expSeqNums: []cciptypes.SeqNumChain{ - {ChainSel: 2, SeqNum: 20}, - {ChainSel: 3, SeqNum: 30}, - }, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - lggr := logger.Test(t) - seqNums := maxSeqNumsConsensus(lggr, tc.fChain, tc.observations) - assert.Equal(t, tc.expSeqNums, seqNums) - }) - } -} - -func Test_tokenPricesConsensus(t *testing.T) { - testCases := []struct { - name string - observations []cciptypes.CommitPluginObservation - fChain int - expPrices []cciptypes.TokenPrice - expErr bool - }{ - { - name: "empty", - observations: make([]cciptypes.CommitPluginObservation, 0), - fChain: 2, - expPrices: make([]cciptypes.TokenPrice, 0), - expErr: false, - }, - { - name: "happy flow", - observations: []cciptypes.CommitPluginObservation{ - { - TokenPrices: []cciptypes.TokenPrice{ - cciptypes.NewTokenPrice("0x1", big.NewInt(10)), - cciptypes.NewTokenPrice("0x2", big.NewInt(20)), - }, - }, - { - TokenPrices: []cciptypes.TokenPrice{ - cciptypes.NewTokenPrice("0x1", big.NewInt(11)), - cciptypes.NewTokenPrice("0x2", big.NewInt(21)), - }, - }, - { - TokenPrices: []cciptypes.TokenPrice{ - cciptypes.NewTokenPrice("0x1", big.NewInt(11)), - cciptypes.NewTokenPrice("0x2", big.NewInt(21)), - }, - }, - { - TokenPrices: []cciptypes.TokenPrice{ - cciptypes.NewTokenPrice("0x1", big.NewInt(10)), - cciptypes.NewTokenPrice("0x2", big.NewInt(21)), - }, - }, - { - TokenPrices: []cciptypes.TokenPrice{ - cciptypes.NewTokenPrice("0x1", big.NewInt(11)), - cciptypes.NewTokenPrice("0x2", big.NewInt(20)), - }, - }, - }, - fChain: 2, - expPrices: []cciptypes.TokenPrice{ - cciptypes.NewTokenPrice("0x1", big.NewInt(11)), - cciptypes.NewTokenPrice("0x2", big.NewInt(21)), - }, - expErr: false, - }, - { - name: "not enough observations for some token", - observations: []cciptypes.CommitPluginObservation{ - { - TokenPrices: []cciptypes.TokenPrice{ - cciptypes.NewTokenPrice("0x2", big.NewInt(20)), - }, - }, - { - TokenPrices: []cciptypes.TokenPrice{ - cciptypes.NewTokenPrice("0x1", big.NewInt(11)), - cciptypes.NewTokenPrice("0x2", big.NewInt(21)), - }, - }, - { - TokenPrices: []cciptypes.TokenPrice{ - cciptypes.NewTokenPrice("0x1", big.NewInt(11)), - cciptypes.NewTokenPrice("0x2", big.NewInt(21)), - }, - }, - { - TokenPrices: []cciptypes.TokenPrice{ - cciptypes.NewTokenPrice("0x1", big.NewInt(10)), - cciptypes.NewTokenPrice("0x2", big.NewInt(21)), - }, - }, - { - TokenPrices: []cciptypes.TokenPrice{ - cciptypes.NewTokenPrice("0x1", big.NewInt(10)), - cciptypes.NewTokenPrice("0x2", big.NewInt(20)), - }, - }, - }, - fChain: 2, - expPrices: []cciptypes.TokenPrice{ - cciptypes.NewTokenPrice("0x2", big.NewInt(21)), - }, - expErr: false, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - prices, err := tokenPricesConsensus(tc.observations, tc.fChain) - if tc.expErr { - assert.Error(t, err) - return - } - assert.NoError(t, err) - assert.Equal(t, tc.expPrices, prices) - }) - } -} - -func Test_gasPricesConsensus(t *testing.T) { - testCases := []struct { - name string - observations []cciptypes.CommitPluginObservation - fChain int - expPrices []cciptypes.GasPriceChain - }{ - { - name: "empty", - observations: make([]cciptypes.CommitPluginObservation, 0), - fChain: 2, - expPrices: make([]cciptypes.GasPriceChain, 0), - }, - { - name: "one chain happy path", - observations: []cciptypes.CommitPluginObservation{ - {GasPrices: []cciptypes.GasPriceChain{cciptypes.NewGasPriceChain(big.NewInt(20), 1)}}, - {GasPrices: []cciptypes.GasPriceChain{cciptypes.NewGasPriceChain(big.NewInt(10), 1)}}, - {GasPrices: []cciptypes.GasPriceChain{cciptypes.NewGasPriceChain(big.NewInt(10), 1)}}, - {GasPrices: []cciptypes.GasPriceChain{cciptypes.NewGasPriceChain(big.NewInt(11), 1)}}, - {GasPrices: []cciptypes.GasPriceChain{cciptypes.NewGasPriceChain(big.NewInt(10), 1)}}, - }, - fChain: 2, - expPrices: []cciptypes.GasPriceChain{ - cciptypes.NewGasPriceChain(big.NewInt(10), 1), - }, - }, - { - name: "one chain no consensus", - observations: []cciptypes.CommitPluginObservation{ - {GasPrices: []cciptypes.GasPriceChain{cciptypes.NewGasPriceChain(big.NewInt(20), 1)}}, - {GasPrices: []cciptypes.GasPriceChain{cciptypes.NewGasPriceChain(big.NewInt(10), 1)}}, - {GasPrices: []cciptypes.GasPriceChain{cciptypes.NewGasPriceChain(big.NewInt(10), 1)}}, - {GasPrices: []cciptypes.GasPriceChain{cciptypes.NewGasPriceChain(big.NewInt(11), 1)}}, - {GasPrices: []cciptypes.GasPriceChain{cciptypes.NewGasPriceChain(big.NewInt(10), 1)}}, - }, - fChain: 3, // notice fChain is 3, means we need at least 2*3+1=7 observations - expPrices: []cciptypes.GasPriceChain{}, - }, - { - name: "two chains determinism check", - observations: []cciptypes.CommitPluginObservation{ - {GasPrices: []cciptypes.GasPriceChain{cciptypes.NewGasPriceChain(big.NewInt(20), 1)}}, - {GasPrices: []cciptypes.GasPriceChain{cciptypes.NewGasPriceChain(big.NewInt(10), 1)}}, - {GasPrices: []cciptypes.GasPriceChain{cciptypes.NewGasPriceChain(big.NewInt(10), 1)}}, - {GasPrices: []cciptypes.GasPriceChain{cciptypes.NewGasPriceChain(big.NewInt(11), 1)}}, - {GasPrices: []cciptypes.GasPriceChain{cciptypes.NewGasPriceChain(big.NewInt(10), 1)}}, - {GasPrices: []cciptypes.GasPriceChain{cciptypes.NewGasPriceChain(big.NewInt(200), 10)}}, - {GasPrices: []cciptypes.GasPriceChain{cciptypes.NewGasPriceChain(big.NewInt(100), 10)}}, - {GasPrices: []cciptypes.GasPriceChain{cciptypes.NewGasPriceChain(big.NewInt(100), 10)}}, - {GasPrices: []cciptypes.GasPriceChain{cciptypes.NewGasPriceChain(big.NewInt(110), 10)}}, - {GasPrices: []cciptypes.GasPriceChain{cciptypes.NewGasPriceChain(big.NewInt(100), 10)}}, - }, - fChain: 2, - expPrices: []cciptypes.GasPriceChain{ - cciptypes.NewGasPriceChain(big.NewInt(10), 1), - cciptypes.NewGasPriceChain(big.NewInt(100), 10), - }, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - lggr := logger.Test(t) - prices := gasPricesConsensus(lggr, tc.observations, tc.fChain) - assert.Equal(t, tc.expPrices, prices) - }) - } -} diff --git a/core/services/ocr3/plugins/ccip/execute/factory.go b/core/services/ocr3/plugins/ccip/execute/factory.go deleted file mode 100644 index a75139d12e..0000000000 --- a/core/services/ocr3/plugins/ccip/execute/factory.go +++ /dev/null @@ -1,79 +0,0 @@ -package execute - -import ( - "context" - - "google.golang.org/grpc" - - "github.com/smartcontractkit/libocr/offchainreporting2plus/ocr3types" - - cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" - "github.com/smartcontractkit/chainlink-common/pkg/types/core" -) - -// PluginFactoryConstructor implements common OCR3ReportingPluginClient and is used for initializing a plugin factory -// and a validation service. -type PluginFactoryConstructor struct{} - -func NewPluginFactoryConstructor() *PluginFactoryConstructor { - return &PluginFactoryConstructor{} -} -func (p PluginFactoryConstructor) NewReportingPluginFactory( - ctx context.Context, - config core.ReportingPluginServiceConfig, - grpcProvider grpc.ClientConnInterface, - pipelineRunner core.PipelineRunnerService, - telemetry core.TelemetryService, - errorLog core.ErrorLog, - capRegistry core.CapabilitiesRegistry, - keyValueStore core.KeyValueStore, - relayerSet core.RelayerSet, -) (core.OCR3ReportingPluginFactory, error) { - return NewPluginFactory(), nil -} - -func (p PluginFactoryConstructor) NewValidationService(ctx context.Context) (core.ValidationService, error) { - panic("implement me") -} - -// PluginFactory implements common ReportingPluginFactory and is used for (re-)initializing commit plugin instances. -type PluginFactory struct{} - -func NewPluginFactory() *PluginFactory { - return &PluginFactory{} -} - -func (p PluginFactory) NewReportingPlugin( - config ocr3types.ReportingPluginConfig, -) (ocr3types.ReportingPlugin[[]byte], ocr3types.ReportingPluginInfo, error) { - return NewPlugin( - context.Background(), - config, - cciptypes.ExecutePluginConfig{}, - nil, - ), ocr3types.ReportingPluginInfo{}, nil -} - -func (p PluginFactory) Name() string { - panic("implement me") -} - -func (p PluginFactory) Start(ctx context.Context) error { - panic("implement me") -} - -func (p PluginFactory) Close() error { - panic("implement me") -} - -func (p PluginFactory) Ready() error { - panic("implement me") -} - -func (p PluginFactory) HealthReport() map[string]error { - panic("implement me") -} - -// Interface compatibility checks. -var _ core.OCR3ReportingPluginClient = &PluginFactoryConstructor{} -var _ core.OCR3ReportingPluginFactory = &PluginFactory{} diff --git a/core/services/ocr3/plugins/ccip/execute/internal/validation/reports.go b/core/services/ocr3/plugins/ccip/execute/internal/validation/reports.go deleted file mode 100644 index 61114a0232..0000000000 --- a/core/services/ocr3/plugins/ccip/execute/internal/validation/reports.go +++ /dev/null @@ -1,58 +0,0 @@ -package validation - -import ( - cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" -) - -type counter[T any] struct { - data T - count int -} - -// MinObservationFilter provides a way to ensure a minimum number of observations for -// some piece of data have occurred. It maintains an internal cache and provides a list -// of valid or invalid data points. -type MinObservationFilter[T any] interface { - Add(data T) error - GetValid() ([]T, error) -} - -// minObservationValidator is a helper object to validate reports for a single chain. -// It keeps track of all reports and determines if they observations are consistent -// with one another and whether they meet the required fChain threshold. -type minObservationValidator[T any] struct { - minObservation int - cache map[cciptypes.Bytes32]*counter[T] - idFunc func(T) [32]byte -} - -// NewMinObservationValidator constructs a concrete MinObservationFilter object. The -// supplied idFunc is used to generate a uniqueID for the type being observed. -func NewMinObservationValidator[T any](min int, idFunc func(T) [32]byte) MinObservationFilter[T] { - return &minObservationValidator[T]{ - minObservation: min, - cache: make(map[cciptypes.Bytes32]*counter[T]), - idFunc: idFunc, - } -} - -func (cv *minObservationValidator[T]) Add(data T) error { - id := cv.idFunc(data) - if _, ok := cv.cache[id]; ok { - cv.cache[id].count++ - } else { - cv.cache[id] = &counter[T]{data: data, count: 1} - } - return nil -} - -func (cv *minObservationValidator[T]) GetValid() ([]T, error) { - var validated []T - for _, rc := range cv.cache { - if rc.count >= cv.minObservation { - rc := rc - validated = append(validated, rc.data) - } - } - return validated, nil -} diff --git a/core/services/ocr3/plugins/ccip/execute/internal/validation/reports_test.go b/core/services/ocr3/plugins/ccip/execute/internal/validation/reports_test.go deleted file mode 100644 index 73db4bcef9..0000000000 --- a/core/services/ocr3/plugins/ccip/execute/internal/validation/reports_test.go +++ /dev/null @@ -1,151 +0,0 @@ -package validation - -import ( - "fmt" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "golang.org/x/crypto/sha3" - - cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" -) - -func Test_CommitReportValidator_ExecutePluginCommitData(t *testing.T) { - tests := []struct { - name string - min int - reports []cciptypes.ExecutePluginCommitData - valid []cciptypes.ExecutePluginCommitData - wantErr assert.ErrorAssertionFunc - }{ - { - name: "empty", - valid: nil, - wantErr: assert.NoError, - }, - { - name: "single report, enough observations", - min: 1, - reports: []cciptypes.ExecutePluginCommitData{ - {MerkleRoot: [32]byte{1}}, - }, - valid: []cciptypes.ExecutePluginCommitData{ - {MerkleRoot: [32]byte{1}}, - }, - wantErr: assert.NoError, - }, - { - name: "single report, not enough observations", - min: 2, - reports: []cciptypes.ExecutePluginCommitData{ - {MerkleRoot: [32]byte{1}}, - }, - valid: nil, - wantErr: assert.NoError, - }, - { - name: "multiple reports, partial observations", - min: 2, - reports: []cciptypes.ExecutePluginCommitData{ - {MerkleRoot: [32]byte{3}}, - {MerkleRoot: [32]byte{1}}, - {MerkleRoot: [32]byte{2}}, - {MerkleRoot: [32]byte{1}}, - {MerkleRoot: [32]byte{2}}, - }, - valid: []cciptypes.ExecutePluginCommitData{ - {MerkleRoot: [32]byte{1}}, - {MerkleRoot: [32]byte{2}}, - }, - wantErr: assert.NoError, - }, - { - name: "multiple reports for same root", - min: 2, - reports: []cciptypes.ExecutePluginCommitData{ - {MerkleRoot: [32]byte{1}, BlockNum: 1}, - {MerkleRoot: [32]byte{1}, BlockNum: 2}, - {MerkleRoot: [32]byte{1}, BlockNum: 3}, - {MerkleRoot: [32]byte{1}, BlockNum: 4}, - {MerkleRoot: [32]byte{1}, BlockNum: 1}, - }, - valid: []cciptypes.ExecutePluginCommitData{ - {MerkleRoot: [32]byte{1}, BlockNum: 1}, - }, - wantErr: assert.NoError, - }, - { - name: "different executed messages same root", - min: 2, - reports: []cciptypes.ExecutePluginCommitData{ - {MerkleRoot: [32]byte{1}, ExecutedMessages: []cciptypes.SeqNum{1, 2}}, - {MerkleRoot: [32]byte{1}, ExecutedMessages: []cciptypes.SeqNum{2, 3}}, - {MerkleRoot: [32]byte{1}, ExecutedMessages: []cciptypes.SeqNum{3, 4}}, - {MerkleRoot: [32]byte{1}, ExecutedMessages: []cciptypes.SeqNum{4, 5}}, - {MerkleRoot: [32]byte{1}, ExecutedMessages: []cciptypes.SeqNum{5, 6}}, - {MerkleRoot: [32]byte{1}, ExecutedMessages: []cciptypes.SeqNum{1, 2}}, - }, - valid: []cciptypes.ExecutePluginCommitData{ - {MerkleRoot: [32]byte{1}, ExecutedMessages: []cciptypes.SeqNum{1, 2}}, - }, - wantErr: assert.NoError, - }, - } - for _, tt := range tests { - tt := tt - t.Run(tt.name, func(t *testing.T) { - t.Parallel() - - // Initialize the minObservationValidator - idFunc := func(data cciptypes.ExecutePluginCommitData) [32]byte { - return sha3.Sum256([]byte(fmt.Sprintf("%v", data))) - } - validator := NewMinObservationValidator[cciptypes.ExecutePluginCommitData](tt.min, idFunc) - for _, report := range tt.reports { - err := validator.Add(report) - require.NoError(t, err) - } - - // Test the results - got, err := validator.GetValid() - if !tt.wantErr(t, err, "GetValid()") { - return - } - if !assert.ElementsMatch(t, got, tt.valid) { - t.Errorf("GetValid() = %v, valid %v", got, tt.valid) - } - }) - } -} - -func Test_CommitReportValidator_Generics(t *testing.T) { - type Generic struct { - number int - } - - // Initialize the minObservationValidator - idFunc := func(data Generic) [32]byte { - return sha3.Sum256([]byte(fmt.Sprintf("%v", data))) - } - validator := NewMinObservationValidator[Generic](2, idFunc) - - wantValue := Generic{number: 1} - otherValue := Generic{number: 2} - - err := validator.Add(wantValue) - require.NoError(t, err) - err = validator.Add(wantValue) - require.NoError(t, err) - err = validator.Add(otherValue) - require.NoError(t, err) - - // Test the results - - wantValid := []Generic{wantValue} - got, err := validator.GetValid() - require.NoError(t, err) - if !assert.ElementsMatch(t, got, wantValid) { - t.Errorf("GetValid() = %v, valid %v", got, wantValid) - } -} diff --git a/core/services/ocr3/plugins/ccip/execute/plugin.go b/core/services/ocr3/plugins/ccip/execute/plugin.go deleted file mode 100644 index cb252d0cf6..0000000000 --- a/core/services/ocr3/plugins/ccip/execute/plugin.go +++ /dev/null @@ -1,275 +0,0 @@ -package execute - -import ( - "context" - "fmt" - "slices" - "sort" - "sync/atomic" - "time" - - "github.com/smartcontractkit/libocr/offchainreporting2plus/ocr3types" - "github.com/smartcontractkit/libocr/offchainreporting2plus/types" - - cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" -) - -// Plugin implements the main ocr3 plugin logic. -type Plugin struct { - reportingCfg ocr3types.ReportingPluginConfig - cfg cciptypes.ExecutePluginConfig - ccipReader cciptypes.CCIPReader - - //commitRootsCache cache.CommitsRootsCache - lastReportTS *atomic.Int64 -} - -func NewPlugin( - _ context.Context, - reportingCfg ocr3types.ReportingPluginConfig, - cfg cciptypes.ExecutePluginConfig, - ccipReader cciptypes.CCIPReader, -) *Plugin { - lastReportTS := &atomic.Int64{} - lastReportTS.Store(time.Now().Add(-cfg.MessageVisibilityInterval).UnixMilli()) - - return &Plugin{ - reportingCfg: reportingCfg, - cfg: cfg, - ccipReader: ccipReader, - lastReportTS: lastReportTS, - } -} - -func (p *Plugin) Query(ctx context.Context, outctx ocr3types.OutcomeContext) (types.Query, error) { - return types.Query{}, nil -} - -func getPendingExecutedReports( - ctx context.Context, ccipReader cciptypes.CCIPReader, dest cciptypes.ChainSelector, ts time.Time, -) (cciptypes.ExecutePluginCommitObservations, time.Time, error) { - latestReportTS := time.Time{} - commitReports, err := ccipReader.CommitReportsGTETimestamp(ctx, dest, ts, 1000) - if err != nil { - return nil, time.Time{}, err - } - // TODO: this could be more efficient. reports is also traversed in 'filterOutExecutedMessages' function. - for _, report := range commitReports { - if report.Timestamp.After(latestReportTS) { - latestReportTS = report.Timestamp - } - } - - // TODO: this could be more efficient. commitReports is also traversed in 'groupByChainSelector'. - for _, report := range commitReports { - if report.Timestamp.After(latestReportTS) { - latestReportTS = report.Timestamp - } - } - - groupedCommits := groupByChainSelector(commitReports) - - // Remove fully executed reports. - for selector, reports := range groupedCommits { - if len(reports) == 0 { - continue - } - - ranges, err := computeRanges(reports) - if err != nil { - return nil, time.Time{}, err - } - - var executedMessages []cciptypes.SeqNumRange - for _, seqRange := range ranges { - executedMessagesForRange, err2 := ccipReader.ExecutedMessageRanges(ctx, selector, dest, seqRange) - if err2 != nil { - return nil, time.Time{}, err2 - } - executedMessages = append(executedMessages, executedMessagesForRange...) - } - - // Remove fully executed reports. - groupedCommits[selector], err = filterOutExecutedMessages(reports, executedMessages) - if err != nil { - return nil, time.Time{}, err - } - } - - return groupedCommits, latestReportTS, nil -} - -// Observation collects data across two phases which happen in separate rounds. -// These phases happen continuously so that except for the first round, every -// subsequent round can have a new execution report. -// -// Phase 1: Gather commit reports from the destination chain and determine -// which messages are required to build a valid execution report. -// -// Phase 2: Gather messages from the source chains and build the execution -// report. -func (p *Plugin) Observation( - ctx context.Context, outctx ocr3types.OutcomeContext, _ types.Query, -) (types.Observation, error) { - previousOutcome, err := cciptypes.DecodeExecutePluginOutcome(outctx.PreviousOutcome) - if err != nil { - return types.Observation{}, err - } - - // Phase 1: Gather commit reports from the destination chain and determine which messages are required to build a - // valid execution report. - ownConfig := p.cfg.ObserverInfo[p.reportingCfg.OracleID] - var groupedCommits cciptypes.ExecutePluginCommitObservations - if slices.Contains(ownConfig.Reads, p.cfg.DestChain) { - var latestReportTS time.Time - groupedCommits, latestReportTS, err = - getPendingExecutedReports(ctx, p.ccipReader, p.cfg.DestChain, time.UnixMilli(p.lastReportTS.Load())) - if err != nil { - return types.Observation{}, err - } - // Update timestamp to the last report. - p.lastReportTS.Store(latestReportTS.UnixMilli()) - - // TODO: truncate grouped commits to a maximum observation size. - // Cache everything which is not executed. - } - - // Phase 2: Gather messages from the source chains and build the execution report. - messages := make(cciptypes.ExecutePluginMessageObservations) - if len(previousOutcome.PendingCommitReports) == 0 { - fmt.Println("TODO: No reports to execute. This is expected after a cold start.") - // No reports to execute. - // This is expected after a cold start. - } else { - commitReportCache := make(map[cciptypes.ChainSelector][]cciptypes.ExecutePluginCommitDataWithMessages) - for _, report := range previousOutcome.PendingCommitReports { - commitReportCache[report.SourceChain] = append(commitReportCache[report.SourceChain], report) - } - - for selector, reports := range commitReportCache { - if len(reports) == 0 { - continue - } - - ranges, err := computeRanges(reports) - if err != nil { - return types.Observation{}, err - } - - // Read messages for each range. - for _, seqRange := range ranges { - msgs, err := p.ccipReader.MsgsBetweenSeqNums(ctx, selector, seqRange) - if err != nil { - return nil, err - } - for _, msg := range msgs { - messages[selector][msg.SeqNum] = msg - } - } - } - } - - // TODO: Fire off messages for an attestation check service. - - return cciptypes.NewExecutePluginObservation(groupedCommits, messages).Encode() -} - -func (p *Plugin) ValidateObservation( - outctx ocr3types.OutcomeContext, query types.Query, ao types.AttributedObservation, -) error { - decodedObservation, err := cciptypes.DecodeExecutePluginObservation(ao.Observation) - if err != nil { - return fmt.Errorf("decode observation: %w", err) - } - - err = validateObserverReadingEligibility(p.reportingCfg.OracleID, p.cfg.ObserverInfo, decodedObservation.Messages) - if err != nil { - return fmt.Errorf("validate observer reading eligibility: %w", err) - } - - if err := validateObservedSequenceNumbers(decodedObservation.CommitReports); err != nil { - return fmt.Errorf("validate observed sequence numbers: %w", err) - } - - return nil -} - -func (p *Plugin) ObservationQuorum(outctx ocr3types.OutcomeContext, query types.Query) (ocr3types.Quorum, error) { - // TODO: should we use f+1 (or less) instead of 2f+1 because it is not needed for security? - return ocr3types.QuorumFPlusOne, nil -} - -func (p *Plugin) Outcome( - outctx ocr3types.OutcomeContext, query types.Query, aos []types.AttributedObservation, -) (ocr3types.Outcome, error) { - decodedObservations, err := decodeAttributedObservations(aos) - if err != nil { - return ocr3types.Outcome{}, err - - } - if len(decodedObservations) < p.reportingCfg.F { - return ocr3types.Outcome{}, fmt.Errorf("below F threshold") - } - - mergedCommitObservations, err := mergeCommitObservations(decodedObservations, p.cfg.FChain) - if err != nil { - return ocr3types.Outcome{}, err - } - - mergedMessageObservations, err := mergeMessageObservations(decodedObservations, p.cfg.FChain) - if err != nil { - return ocr3types.Outcome{}, err - } - - observation := cciptypes.NewExecutePluginObservation( - mergedCommitObservations, - mergedMessageObservations) - - // flatten commit reports and sort by timestamp. - var reports []cciptypes.ExecutePluginCommitDataWithMessages - for _, report := range observation.CommitReports { - reports = append(reports, report...) - } - sort.Slice(reports, func(i, j int) bool { - return reports[i].Timestamp.Before(reports[j].Timestamp) - }) - - // add messages to their reports. - for _, report := range reports { - report.Messages = nil - for i := report.SequenceNumberRange.Start(); i <= report.SequenceNumberRange.End(); i++ { - if msg, ok := observation.Messages[report.SourceChain][i]; ok { - report.Messages = append(report.Messages, msg) - } - } - } - - // TODO: select reports and messages for the final exec report. - // TODO: may only need the proofs for the final exec report rather than the report and the messages. - - return cciptypes.NewExecutePluginOutcome(reports).Encode() -} - -func (p *Plugin) Reports(seqNr uint64, outcome ocr3types.Outcome) ([]ocr3types.ReportWithInfo[[]byte], error) { - - panic("implement me") -} - -func (p *Plugin) ShouldAcceptAttestedReport( - ctx context.Context, u uint64, r ocr3types.ReportWithInfo[[]byte], -) (bool, error) { - panic("implement me") -} - -func (p *Plugin) ShouldTransmitAcceptedReport( - ctx context.Context, u uint64, r ocr3types.ReportWithInfo[[]byte], -) (bool, error) { - panic("implement me") -} - -func (p *Plugin) Close() error { - panic("implement me") -} - -// Interface compatibility checks. -var _ ocr3types.ReportingPlugin[[]byte] = &Plugin{} diff --git a/core/services/ocr3/plugins/ccip/execute/plugin_functions.go b/core/services/ocr3/plugins/ccip/execute/plugin_functions.go deleted file mode 100644 index 529938939a..0000000000 --- a/core/services/ocr3/plugins/ccip/execute/plugin_functions.go +++ /dev/null @@ -1,317 +0,0 @@ -package execute - -import ( - "errors" - "fmt" - "sort" - - mapset "github.com/deckarep/golang-set/v2" - "golang.org/x/crypto/sha3" - - cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" - "github.com/smartcontractkit/libocr/commontypes" - "github.com/smartcontractkit/libocr/offchainreporting2plus/types" - - "github.com/smartcontractkit/ccipocr3/execute/internal/validation" -) - -// validateObserverReadingEligibility checks if the observer is eligible to observe the messages it observed. -func validateObserverReadingEligibility( - observer commontypes.OracleID, - observerCfg map[commontypes.OracleID]cciptypes.ObserverInfo, - observedMsgs cciptypes.ExecutePluginMessageObservations, -) error { - observerInfo, exists := observerCfg[observer] - if !exists { - return fmt.Errorf("observer not found in config") - } - - observerReadChains := mapset.NewSet(observerInfo.Reads...) - - for chainSel, msgs := range observedMsgs { - if len(msgs) == 0 { - continue - } - - if !observerReadChains.Contains(chainSel) { - return fmt.Errorf("observer not allowed to read from chain %d", chainSel) - } - } - - return nil -} - -// validateObservedSequenceNumbers checks if the sequence numbers of the provided messages are unique for each chain -// and that they match the observed max sequence numbers. -func validateObservedSequenceNumbers( - observedData map[cciptypes.ChainSelector][]cciptypes.ExecutePluginCommitDataWithMessages, -) error { - for _, commitData := range observedData { - // observed commitData must not contain duplicates - - observedMerkleRoots := mapset.NewSet[string]() - observedRanges := make([]cciptypes.SeqNumRange, 0) - - for _, data := range commitData { - rootStr := data.MerkleRoot.String() - if observedMerkleRoots.Contains(rootStr) { - return fmt.Errorf("duplicate merkle root %s observed", rootStr) - } - observedMerkleRoots.Add(rootStr) - - for _, rng := range observedRanges { - if rng.Overlaps(data.SequenceNumberRange) { - return fmt.Errorf("sequence number range %v overlaps with %v", data.SequenceNumberRange, rng) - } - } - observedRanges = append(observedRanges, data.SequenceNumberRange) - - // Executed sequence numbers should belong in the observed range. - for _, seqNum := range data.ExecutedMessages { - if !data.SequenceNumberRange.Contains(seqNum) { - return fmt.Errorf("executed message %d not in observed range %v", seqNum, data.SequenceNumberRange) - } - } - } - } - - return nil -} - -var errOverlappingRanges = errors.New("overlapping sequence numbers in reports") - -// computeRanges takes a slice of reports and computes the smallest number of contiguous ranges -// that cover all the sequence numbers in the reports. -// Note: reports need all messages to create a proof even if some are already executed. -func computeRanges(reports []cciptypes.ExecutePluginCommitDataWithMessages) ([]cciptypes.SeqNumRange, error) { - var ranges []cciptypes.SeqNumRange - - if len(reports) == 0 { - return nil, nil - } - - var seqRange cciptypes.SeqNumRange - for i, report := range reports { - if i == 0 { - // initialize - seqRange = cciptypes.NewSeqNumRange(report.SequenceNumberRange.Start(), report.SequenceNumberRange.End()) - } else if seqRange.End()+1 == report.SequenceNumberRange.Start() { - // extend the contiguous range - seqRange.SetEnd(report.SequenceNumberRange.End()) - } else if report.SequenceNumberRange.Start() < seqRange.End() { - return nil, errOverlappingRanges - } else { - ranges = append(ranges, seqRange) - - // Reset the range. - seqRange = cciptypes.NewSeqNumRange(report.SequenceNumberRange.Start(), report.SequenceNumberRange.End()) - } - } - // add final range - ranges = append(ranges, seqRange) - - return ranges, nil -} - -func groupByChainSelector(reports []cciptypes.CommitPluginReportWithMeta) cciptypes.ExecutePluginCommitObservations { - commitReportCache := make(map[cciptypes.ChainSelector][]cciptypes.ExecutePluginCommitDataWithMessages) - for _, report := range reports { - for _, singleReport := range report.Report.MerkleRoots { - commitReportCache[singleReport.ChainSel] = append(commitReportCache[singleReport.ChainSel], - cciptypes.ExecutePluginCommitDataWithMessages{ - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SourceChain: singleReport.ChainSel, - Timestamp: report.Timestamp, - BlockNum: report.BlockNum, - MerkleRoot: singleReport.MerkleRoot, - SequenceNumberRange: singleReport.SeqNumsRange, - ExecutedMessages: nil, - }}) - } - } - return commitReportCache -} - -// filterOutExecutedMessages returns a new reports slice with fully executed messages removed. -// Unordered inputs are supported. -func filterOutExecutedMessages( - reports []cciptypes.ExecutePluginCommitDataWithMessages, executedMessages []cciptypes.SeqNumRange, -) ([]cciptypes.ExecutePluginCommitDataWithMessages, error) { - sort.Slice(reports, func(i, j int) bool { - return reports[i].SequenceNumberRange.Start() < reports[j].SequenceNumberRange.Start() - }) - - // If none are executed, return the (sorted) input. - if len(executedMessages) == 0 { - return reports, nil - } - - sort.Slice(executedMessages, func(i, j int) bool { - return executedMessages[i].Start() < executedMessages[j].Start() - }) - - // Make sure they do not overlap - previousMax := cciptypes.SeqNum(0) - for _, seqRange := range executedMessages { - if seqRange.Start() < previousMax { - return nil, errOverlappingRanges - } - previousMax = seqRange.End() - } - - var filtered []cciptypes.ExecutePluginCommitDataWithMessages - - reportIdx := 0 - for _, executed := range executedMessages { - for i := reportIdx; i < len(reports); i++ { - reportRange := reports[i].SequenceNumberRange - if executed.End() < reportRange.Start() { - // need to go to the next set of executed messages. - break - } - - if executed.End() < reportRange.Start() { - // add report that has non-executed messages. - reportIdx++ - filtered = append(filtered, reports[i]) - continue - } - - if reportRange.Start() >= executed.Start() && reportRange.End() <= executed.End() { - // skip fully executed report. - reportIdx++ - continue - } - - s := executed.Start() - if reportRange.Start() > executed.Start() { - s = reportRange.Start() - } - for ; s <= executed.End(); s++ { - // This range runs into the next report. - if s > reports[i].SequenceNumberRange.End() { - reportIdx++ - filtered = append(filtered, reports[i]) - break - } - reports[i].ExecutedMessages = append(reports[i].ExecutedMessages, s) - } - } - } - - // Add any remaining reports that were not fully executed. - for i := reportIdx; i < len(reports); i++ { - filtered = append(filtered, reports[i]) - } - - return filtered, nil -} - -type decodedAttributedObservation struct { - Observation cciptypes.ExecutePluginObservation - Observer commontypes.OracleID -} - -func decodeAttributedObservations(aos []types.AttributedObservation) ([]decodedAttributedObservation, error) { - decoded := make([]decodedAttributedObservation, len(aos)) - for i, ao := range aos { - observation, err := cciptypes.DecodeExecutePluginObservation(ao.Observation) - if err != nil { - return nil, err - } - decoded[i] = decodedAttributedObservation{ - Observation: observation, - Observer: ao.Observer, - } - } - return decoded, nil -} - -func mergeMessageObservations( - aos []decodedAttributedObservation, fChain map[cciptypes.ChainSelector]int, -) (cciptypes.ExecutePluginMessageObservations, error) { - // Create a validator for each chain - validators := make(map[cciptypes.ChainSelector]validation.MinObservationFilter[cciptypes.CCIPMsg]) - idFunc := func(data cciptypes.CCIPMsg) [32]byte { - return sha3.Sum256([]byte(fmt.Sprintf("%v", data))) - } - for selector, f := range fChain { - validators[selector] = validation.NewMinObservationValidator[cciptypes.CCIPMsg](f+1, idFunc) - } - - // Add messages to the validator for each chain selector. - for _, ao := range aos { - for selector, messages := range ao.Observation.Messages { - validator, ok := validators[selector] - if !ok { - return cciptypes.ExecutePluginMessageObservations{}, fmt.Errorf("no validator for chain %d", selector) - } - // Add reports - for _, msg := range messages { - if err := validator.Add(msg); err != nil { - return cciptypes.ExecutePluginMessageObservations{}, err - } - } - } - } - - results := make(cciptypes.ExecutePluginMessageObservations) - for selector, validator := range validators { - msgs, err := validator.GetValid() - if err != nil { - return cciptypes.ExecutePluginMessageObservations{}, err - } - if _, ok := results[selector]; !ok { - results[selector] = make(map[cciptypes.SeqNum]cciptypes.CCIPMsg) - } - for _, msg := range msgs { - results[selector][msg.SeqNum] = msg - } - } - - return results, nil -} - -// mergeCommitObservations merges all observations which reach the fChain threshold into a single result. -// Any observations, or subsets of observations, which do not reach the threshold are ignored. -func mergeCommitObservations( - aos []decodedAttributedObservation, fChain map[cciptypes.ChainSelector]int, -) (cciptypes.ExecutePluginCommitObservations, error) { - // Create a validator for each chain - validators := - make(map[cciptypes.ChainSelector]validation.MinObservationFilter[cciptypes.ExecutePluginCommitDataWithMessages]) - idFunc := func(data cciptypes.ExecutePluginCommitDataWithMessages) [32]byte { - return sha3.Sum256([]byte(fmt.Sprintf("%v", data))) - } - for selector, f := range fChain { - validators[selector] = - validation.NewMinObservationValidator[cciptypes.ExecutePluginCommitDataWithMessages](f+1, idFunc) - } - - // Add reports to the validator for each chain selector. - for _, ao := range aos { - for selector, commitReports := range ao.Observation.CommitReports { - validator, ok := validators[selector] - if !ok { - return cciptypes.ExecutePluginCommitObservations{}, fmt.Errorf("no validator for chain %d", selector) - } - // Add reports - for _, commitReport := range commitReports { - if err := validator.Add(commitReport); err != nil { - return cciptypes.ExecutePluginCommitObservations{}, err - } - } - } - } - - results := make(cciptypes.ExecutePluginCommitObservations) - for selector, validator := range validators { - var err error - results[selector], err = validator.GetValid() - if err != nil { - return cciptypes.ExecutePluginCommitObservations{}, err - } - } - - return results, nil -} diff --git a/core/services/ocr3/plugins/ccip/execute/plugin_functions_test.go b/core/services/ocr3/plugins/ccip/execute/plugin_functions_test.go deleted file mode 100644 index 01400bda5f..0000000000 --- a/core/services/ocr3/plugins/ccip/execute/plugin_functions_test.go +++ /dev/null @@ -1,815 +0,0 @@ -package execute - -import ( - "fmt" - "testing" - - "github.com/stretchr/testify/assert" - - "github.com/smartcontractkit/libocr/commontypes" - - "github.com/smartcontractkit/libocr/offchainreporting2plus/types" - - cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" -) - -func Test_validateObserverReadingEligibility(t *testing.T) { - tests := []struct { - name string - observer commontypes.OracleID - observerCfg map[commontypes.OracleID]cciptypes.ObserverInfo - observedMsgs cciptypes.ExecutePluginMessageObservations - expErr string - }{ - { - name: "ValidObserverAndMessages", - observer: commontypes.OracleID(1), - observerCfg: map[commontypes.OracleID]cciptypes.ObserverInfo{ - 1: {Reads: []cciptypes.ChainSelector{1, 2}}, - }, - observedMsgs: cciptypes.ExecutePluginMessageObservations{ - 1: {1: {}, 2: {}}, - 2: {}, - }, - }, - { - name: "ObserverNotFound", - observer: commontypes.OracleID(1), - observerCfg: map[commontypes.OracleID]cciptypes.ObserverInfo{ - 2: {Reads: []cciptypes.ChainSelector{1, 2}}, - }, - observedMsgs: cciptypes.ExecutePluginMessageObservations{ - 1: {1: {}, 2: {}}, - }, - expErr: "observer not found in config", - }, - { - name: "ObserverNotAllowedToReadChain", - observer: commontypes.OracleID(1), - observerCfg: map[commontypes.OracleID]cciptypes.ObserverInfo{ - 1: {Reads: []cciptypes.ChainSelector{1}}, - }, - observedMsgs: cciptypes.ExecutePluginMessageObservations{ - 2: {1: {}}, - }, - expErr: "observer not allowed to read from chain 2", - }, - { - name: "NoMessagesObserved", - observer: commontypes.OracleID(1), - observerCfg: map[commontypes.OracleID]cciptypes.ObserverInfo{ - 1: {Reads: []cciptypes.ChainSelector{1, 2}}, - }, - observedMsgs: cciptypes.ExecutePluginMessageObservations{}, - }, - { - name: "EmptyMessagesInChain", - observer: commontypes.OracleID(1), - observerCfg: map[commontypes.OracleID]cciptypes.ObserverInfo{ - 1: {Reads: []cciptypes.ChainSelector{1, 2}}, - }, - observedMsgs: cciptypes.ExecutePluginMessageObservations{ - 1: {}, - 2: {1: {}, 2: {}}, - }, - }, - { - name: "AllMessagesEmpty", - observer: commontypes.OracleID(1), - observerCfg: map[commontypes.OracleID]cciptypes.ObserverInfo{ - 1: {Reads: []cciptypes.ChainSelector{1, 2}}, - }, - observedMsgs: cciptypes.ExecutePluginMessageObservations{ - 1: {}, - 2: {}, - }, - }, - } - - for _, tc := range tests { - t.Run(tc.name, func(t *testing.T) { - err := validateObserverReadingEligibility(tc.observer, tc.observerCfg, tc.observedMsgs) - if len(tc.expErr) != 0 { - assert.Error(t, err) - assert.ErrorContains(t, err, tc.expErr) - return - } - assert.NoError(t, err) - }) - } -} - -func Test_validateObservedSequenceNumbers(t *testing.T) { - testCases := []struct { - name string - observedData map[cciptypes.ChainSelector][]cciptypes.ExecutePluginCommitDataWithMessages - expErr bool - }{ - { - name: "ValidData", - observedData: map[cciptypes.ChainSelector][]cciptypes.ExecutePluginCommitDataWithMessages{ - 1: { - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - MerkleRoot: cciptypes.Bytes32{1}, - SequenceNumberRange: cciptypes.SeqNumRange{1, 10}, - ExecutedMessages: []cciptypes.SeqNum{1, 2, 3}, - }, - }, - }, - 2: { - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - MerkleRoot: cciptypes.Bytes32{2}, - SequenceNumberRange: cciptypes.SeqNumRange{11, 20}, - ExecutedMessages: []cciptypes.SeqNum{11, 12, 13}, - }, - }, - }, - }, - }, - { - name: "DuplicateMerkleRoot", - observedData: map[cciptypes.ChainSelector][]cciptypes.ExecutePluginCommitDataWithMessages{ - 1: { - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - MerkleRoot: cciptypes.Bytes32{1}, - SequenceNumberRange: cciptypes.SeqNumRange{1, 10}, - ExecutedMessages: []cciptypes.SeqNum{1, 2, 3}, - }, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - MerkleRoot: cciptypes.Bytes32{1}, - SequenceNumberRange: cciptypes.SeqNumRange{11, 20}, - ExecutedMessages: []cciptypes.SeqNum{11, 12, 13}, - }, - }, - }, - }, - expErr: true, - }, - { - name: "OverlappingSequenceNumberRange", - observedData: map[cciptypes.ChainSelector][]cciptypes.ExecutePluginCommitDataWithMessages{ - 1: { - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - MerkleRoot: cciptypes.Bytes32{1}, - SequenceNumberRange: cciptypes.SeqNumRange{1, 10}, - ExecutedMessages: []cciptypes.SeqNum{1, 2, 3}, - }, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - MerkleRoot: cciptypes.Bytes32{2}, - SequenceNumberRange: cciptypes.SeqNumRange{5, 15}, - ExecutedMessages: []cciptypes.SeqNum{6, 7, 8}, - }, - }, - }, - }, - expErr: true, - }, - { - name: "ExecutedMessageOutsideObservedRange", - observedData: map[cciptypes.ChainSelector][]cciptypes.ExecutePluginCommitDataWithMessages{ - 1: { - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - MerkleRoot: cciptypes.Bytes32{1}, - SequenceNumberRange: cciptypes.SeqNumRange{1, 10}, - ExecutedMessages: []cciptypes.SeqNum{1, 2, 11}, - }, - }, - }, - }, - expErr: true, - }, - { - name: "NoCommitData", - observedData: map[cciptypes.ChainSelector][]cciptypes.ExecutePluginCommitDataWithMessages{ - 1: {}, - }, - }, - { - name: "EmptyObservedData", - observedData: map[cciptypes.ChainSelector][]cciptypes.ExecutePluginCommitDataWithMessages{}, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - err := validateObservedSequenceNumbers(tc.observedData) - if tc.expErr { - assert.Error(t, err) - return - } - assert.NoError(t, err) - }) - } -} - -func Test_computeRanges(t *testing.T) { - type args struct { - reports []cciptypes.ExecutePluginCommitDataWithMessages - } - - tests := []struct { - name string - args args - want []cciptypes.SeqNumRange - err error - }{ - { - name: "empty", - args: args{reports: []cciptypes.ExecutePluginCommitDataWithMessages{}}, - want: nil, - }, - { - name: "overlapping ranges", - args: args{reports: []cciptypes.ExecutePluginCommitDataWithMessages{ - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(10, 20), - }, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(15, 25), - }, - }, - }, - }, - err: errOverlappingRanges, - }, - { - name: "simple ranges collapsed", - args: args{reports: []cciptypes.ExecutePluginCommitDataWithMessages{ - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(10, 20), - }, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(21, 40), - }, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(41, 60), - }, - }, - }, - }, - want: []cciptypes.SeqNumRange{{10, 60}}, - }, - { - name: "non-contiguous ranges", - args: args{reports: []cciptypes.ExecutePluginCommitDataWithMessages{ - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(10, 20), - }, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(30, 40), - }, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(50, 60)}, - }, - }, - }, - want: []cciptypes.SeqNumRange{{10, 20}, {30, 40}, {50, 60}}, - }, - { - name: "contiguous and non-contiguous ranges", - args: args{reports: []cciptypes.ExecutePluginCommitDataWithMessages{ - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(10, 20), - }, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(21, 40), - }, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(50, 60), - }, - }, - }, - }, - want: []cciptypes.SeqNumRange{{10, 40}, {50, 60}}, - }, - } - for _, tt := range tests { - tt := tt - t.Run(tt.name, func(t *testing.T) { - t.Parallel() - got, err := computeRanges(tt.args.reports) - if tt.err != nil { - assert.ErrorIs(t, err, tt.err) - } else { - assert.NoError(t, err) - assert.Equal(t, tt.want, got) - } - }) - } -} - -func Test_groupByChainSelector(t *testing.T) { - type args struct { - reports []cciptypes.CommitPluginReportWithMeta - } - tests := []struct { - name string - args args - want cciptypes.ExecutePluginCommitObservations - }{ - { - name: "empty", - args: args{reports: []cciptypes.CommitPluginReportWithMeta{}}, - want: cciptypes.ExecutePluginCommitObservations{}, - }, - { - name: "reports", - args: args{reports: []cciptypes.CommitPluginReportWithMeta{{ - Report: cciptypes.CommitPluginReport{ - MerkleRoots: []cciptypes.MerkleRootChain{ - {ChainSel: 1, SeqNumsRange: cciptypes.NewSeqNumRange(10, 20), MerkleRoot: cciptypes.Bytes32{1}}, - {ChainSel: 2, SeqNumsRange: cciptypes.NewSeqNumRange(30, 40), MerkleRoot: cciptypes.Bytes32{2}}, - }}}}}, - want: cciptypes.ExecutePluginCommitObservations{ - 1: { - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SourceChain: 1, - MerkleRoot: cciptypes.Bytes32{1}, - SequenceNumberRange: cciptypes.NewSeqNumRange(10, 20), - ExecutedMessages: nil, - }, - }, - }, - 2: { - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SourceChain: 2, - MerkleRoot: cciptypes.Bytes32{2}, - SequenceNumberRange: cciptypes.NewSeqNumRange(30, 40), - ExecutedMessages: nil, - }, - }, - }, - }, - }, - } - for _, tt := range tests { - tt := tt - t.Run(tt.name, func(t *testing.T) { - t.Parallel() - assert.Equalf(t, tt.want, groupByChainSelector(tt.args.reports), "groupByChainSelector(%v)", tt.args.reports) - }) - } -} - -func Test_filterOutFullyExecutedMessages(t *testing.T) { - type args struct { - reports []cciptypes.ExecutePluginCommitDataWithMessages - executedMessages []cciptypes.SeqNumRange - } - tests := []struct { - name string - args args - want []cciptypes.ExecutePluginCommitDataWithMessages - wantErr assert.ErrorAssertionFunc - }{ - { - name: "empty", - args: args{ - reports: nil, - executedMessages: nil, - }, - want: nil, - wantErr: assert.NoError, - }, - { - name: "empty2", - args: args{ - reports: []cciptypes.ExecutePluginCommitDataWithMessages{}, - executedMessages: nil, - }, - want: []cciptypes.ExecutePluginCommitDataWithMessages{}, - wantErr: assert.NoError, - }, - { - name: "no executed messages", - args: args{ - reports: []cciptypes.ExecutePluginCommitDataWithMessages{ - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(10, 20), - }, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(30, 40), - }, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(50, 60), - }, - }, - }, - executedMessages: nil, - }, - want: []cciptypes.ExecutePluginCommitDataWithMessages{ - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(10, 20)}}, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(30, 40)}}, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(50, 60)}}, - }, - wantErr: assert.NoError, - }, - { - name: "executed messages", - args: args{ - reports: []cciptypes.ExecutePluginCommitDataWithMessages{ - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(10, 20)}}, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(30, 40)}}, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(50, 60)}}, - }, - executedMessages: []cciptypes.SeqNumRange{ - cciptypes.NewSeqNumRange(0, 100), - }, - }, - want: nil, - wantErr: assert.NoError, - }, - { - name: "2 partially executed", - args: args{ - reports: []cciptypes.ExecutePluginCommitDataWithMessages{ - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(10, 20)}, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(30, 40)}, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(50, 60)}, - }, - }, - executedMessages: []cciptypes.SeqNumRange{ - cciptypes.NewSeqNumRange(15, 35), - }, - }, - want: []cciptypes.ExecutePluginCommitDataWithMessages{ - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(10, 20), - ExecutedMessages: []cciptypes.SeqNum{15, 16, 17, 18, 19, 20}, - }, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(30, 40), - ExecutedMessages: []cciptypes.SeqNum{30, 31, 32, 33, 34, 35}, - }, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(50, 60), - }, - }, - }, - wantErr: assert.NoError, - }, - { - name: "2 partially executed 1 fully executed", - args: args{ - reports: []cciptypes.ExecutePluginCommitDataWithMessages{ - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(10, 20), - }, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(30, 40), - }, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(50, 60), - }, - }, - }, - executedMessages: []cciptypes.SeqNumRange{ - cciptypes.NewSeqNumRange(15, 55), - }, - }, - want: []cciptypes.ExecutePluginCommitDataWithMessages{ - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(10, 20), - ExecutedMessages: []cciptypes.SeqNum{15, 16, 17, 18, 19, 20}, - }, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(50, 60), - ExecutedMessages: []cciptypes.SeqNum{50, 51, 52, 53, 54, 55}, - }, - }, - }, - wantErr: assert.NoError, - }, - { - name: "first report executed", - args: args{ - reports: []cciptypes.ExecutePluginCommitDataWithMessages{ - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(10, 20), - }, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(30, 40), - }, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(50, 60), - }, - }, - }, - executedMessages: []cciptypes.SeqNumRange{ - cciptypes.NewSeqNumRange(10, 20), - }, - }, - want: []cciptypes.ExecutePluginCommitDataWithMessages{ - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(30, 40), - }, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(50, 60), - }, - }, - }, - wantErr: assert.NoError, - }, - { - name: "last report executed", - args: args{ - reports: []cciptypes.ExecutePluginCommitDataWithMessages{ - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(10, 20), - }, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(30, 40), - }, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(50, 60), - }, - }, - }, - executedMessages: []cciptypes.SeqNumRange{ - cciptypes.NewSeqNumRange(50, 60), - }, - }, - want: []cciptypes.ExecutePluginCommitDataWithMessages{ - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(10, 20), - }, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(30, 40), - }, - }, - }, - wantErr: assert.NoError, - }, - { - name: "sort-report", - args: args{ - reports: []cciptypes.ExecutePluginCommitDataWithMessages{ - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(30, 40), - }, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(50, 60), - }, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(10, 20), - }, - }, - }, - executedMessages: nil, - }, - want: []cciptypes.ExecutePluginCommitDataWithMessages{ - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(10, 20), - }, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(30, 40), - }, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(50, 60), - }, - }, - }, - wantErr: assert.NoError, - }, - { - name: "sort-executed", - args: args{ - reports: []cciptypes.ExecutePluginCommitDataWithMessages{ - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(10, 20), - }, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(30, 40), - }, - }, - { - ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SequenceNumberRange: cciptypes.NewSeqNumRange(50, 60), - }, - }, - }, - executedMessages: []cciptypes.SeqNumRange{ - cciptypes.NewSeqNumRange(50, 60), - cciptypes.NewSeqNumRange(10, 20), - cciptypes.NewSeqNumRange(30, 40), - }, - }, - want: nil, - wantErr: assert.NoError, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got, err := filterOutExecutedMessages(tt.args.reports, tt.args.executedMessages) - if !tt.wantErr(t, err, fmt.Sprintf("filterOutExecutedMessages(%v, %v)", tt.args.reports, tt.args.executedMessages)) { - return - } - assert.Equalf(t, tt.want, got, "filterOutExecutedMessages(%v, %v)", tt.args.reports, tt.args.executedMessages) - }) - } -} - -func Test_decodeAttributedObservations(t *testing.T) { - mustEncode := func(obs cciptypes.ExecutePluginObservation) []byte { - enc, err := obs.Encode() - if err != nil { - t.Fatal("Unable to encode") - } - return enc - } - tests := []struct { - name string - args []types.AttributedObservation - want []decodedAttributedObservation - wantErr assert.ErrorAssertionFunc - }{ - // TODO: Add test cases. - { - name: "empty", - args: nil, - want: []decodedAttributedObservation{}, - wantErr: assert.NoError, - }, - { - name: "one observation", - args: []types.AttributedObservation{ - { - Observer: commontypes.OracleID(1), - Observation: mustEncode(cciptypes.ExecutePluginObservation{ - CommitReports: cciptypes.ExecutePluginCommitObservations{ - 1: {{ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{MerkleRoot: cciptypes.Bytes32{1}}}}, - }, - }), - }, - }, - want: []decodedAttributedObservation{ - { - Observer: commontypes.OracleID(1), - Observation: cciptypes.ExecutePluginObservation{ - CommitReports: cciptypes.ExecutePluginCommitObservations{ - 1: {{ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{MerkleRoot: cciptypes.Bytes32{1}}}}, - }, - }, - }, - }, - wantErr: assert.NoError, - }, - { - name: "multiple observations", - args: []types.AttributedObservation{ - { - Observer: commontypes.OracleID(1), - Observation: mustEncode(cciptypes.ExecutePluginObservation{ - CommitReports: cciptypes.ExecutePluginCommitObservations{ - 1: {{ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{MerkleRoot: cciptypes.Bytes32{1}}}}, - }, - }), - }, - { - Observer: commontypes.OracleID(2), - Observation: mustEncode(cciptypes.ExecutePluginObservation{ - CommitReports: cciptypes.ExecutePluginCommitObservations{ - 2: {{ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{MerkleRoot: cciptypes.Bytes32{2}}}}, - }, - }), - }, - }, - want: []decodedAttributedObservation{ - { - Observer: commontypes.OracleID(1), - Observation: cciptypes.ExecutePluginObservation{ - CommitReports: cciptypes.ExecutePluginCommitObservations{ - 1: {{ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{MerkleRoot: cciptypes.Bytes32{1}}}}, - }, - }, - }, - { - Observer: commontypes.OracleID(2), - Observation: cciptypes.ExecutePluginObservation{ - CommitReports: cciptypes.ExecutePluginCommitObservations{ - 2: {{ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{MerkleRoot: cciptypes.Bytes32{2}}}}, - }, - }, - }, - }, - wantErr: assert.NoError, - }, - { - name: "invalid observation", - args: []types.AttributedObservation{ - { - Observer: commontypes.OracleID(1), - Observation: []byte("invalid"), - }, - }, - want: nil, - wantErr: assert.Error, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got, err := decodeAttributedObservations(tt.args) - if !tt.wantErr(t, err, fmt.Sprintf("decodeAttributedObservations(%v)", tt.args)) { - return - } - assert.Equalf(t, tt.want, got, "decodeAttributedObservations(%v)", tt.args) - }) - } -} diff --git a/core/services/ocr3/plugins/ccip/execute/plugin_test.go b/core/services/ocr3/plugins/ccip/execute/plugin_test.go deleted file mode 100644 index 64fd4c69ec..0000000000 --- a/core/services/ocr3/plugins/ccip/execute/plugin_test.go +++ /dev/null @@ -1,168 +0,0 @@ -package execute - -import ( - "context" - "encoding/json" - "math" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - - "github.com/smartcontractkit/ccipocr3/internal/mocks" - - cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" -) - -func TestSomethingCool(t *testing.T) { - - foo := map[cciptypes.ChainSelector]int{ - cciptypes.ChainSelector(1): 1, - cciptypes.ChainSelector(math.MaxUint64): 1, - } - - js, _ := json.Marshal(foo) - t.Log(string(js)) - - b := []byte(`{"1":1,"18446744073709551615":1}`) - var bar map[cciptypes.ChainSelector]int - assert.NoError(t, json.Unmarshal(b, &bar)) - t.Log(bar) -} - -func Test_getPendingExecutedReports(t *testing.T) { - tests := []struct { - name string - reports []cciptypes.CommitPluginReportWithMeta - ranges map[cciptypes.ChainSelector][]cciptypes.SeqNumRange - want cciptypes.ExecutePluginCommitObservations - want1 time.Time - wantErr assert.ErrorAssertionFunc - }{ - // TODO: Add test cases. - { - name: "empty", - reports: nil, - ranges: nil, - want: cciptypes.ExecutePluginCommitObservations{}, - want1: time.Time{}, - wantErr: assert.NoError, - }, - { - name: "single non-executed report", - reports: []cciptypes.CommitPluginReportWithMeta{ - { - BlockNum: 999, - Timestamp: time.UnixMilli(10101010101), - Report: cciptypes.CommitPluginReport{ - MerkleRoots: []cciptypes.MerkleRootChain{ - { - ChainSel: 1, - SeqNumsRange: cciptypes.NewSeqNumRange(1, 10), - }, - }, - }, - }, - }, - ranges: map[cciptypes.ChainSelector][]cciptypes.SeqNumRange{ - 1: nil, - }, - want: cciptypes.ExecutePluginCommitObservations{ - 1: []cciptypes.ExecutePluginCommitDataWithMessages{ - {ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SourceChain: 1, - SequenceNumberRange: cciptypes.NewSeqNumRange(1, 10), - ExecutedMessages: nil, - Timestamp: time.UnixMilli(10101010101), - BlockNum: 999, - }}, - }, - }, - want1: time.UnixMilli(10101010101), - wantErr: assert.NoError, - }, - { - name: "single half-executed report", - reports: []cciptypes.CommitPluginReportWithMeta{ - { - BlockNum: 999, - Timestamp: time.UnixMilli(10101010101), - Report: cciptypes.CommitPluginReport{ - MerkleRoots: []cciptypes.MerkleRootChain{ - { - ChainSel: 1, - SeqNumsRange: cciptypes.NewSeqNumRange(1, 10), - }, - }, - }, - }, - }, - ranges: map[cciptypes.ChainSelector][]cciptypes.SeqNumRange{ - 1: { - cciptypes.NewSeqNumRange(1, 3), - cciptypes.NewSeqNumRange(7, 8), - }, - }, - want: cciptypes.ExecutePluginCommitObservations{ - 1: []cciptypes.ExecutePluginCommitDataWithMessages{ - {ExecutePluginCommitData: cciptypes.ExecutePluginCommitData{ - SourceChain: 1, - SequenceNumberRange: cciptypes.NewSeqNumRange(1, 10), - Timestamp: time.UnixMilli(10101010101), - BlockNum: 999, - ExecutedMessages: []cciptypes.SeqNum{1, 2, 3, 7, 8}, - }}, - }, - }, - want1: time.UnixMilli(10101010101), - wantErr: assert.NoError, - }, - { - name: "last timestamp", - reports: []cciptypes.CommitPluginReportWithMeta{ - { - BlockNum: 999, - Timestamp: time.UnixMilli(10101010101), - Report: cciptypes.CommitPluginReport{}, - }, - { - BlockNum: 999, - Timestamp: time.UnixMilli(9999999999999999), - Report: cciptypes.CommitPluginReport{}, - }, - }, - ranges: map[cciptypes.ChainSelector][]cciptypes.SeqNumRange{}, - want: cciptypes.ExecutePluginCommitObservations{}, - want1: time.UnixMilli(9999999999999999), - wantErr: assert.NoError, - }, - } - for _, tt := range tests { - tt := tt - t.Run(tt.name, func(t *testing.T) { - t.Parallel() - - mockReader := mocks.NewCCIPReader() - mockReader.On( - "CommitReportsGTETimestamp", mock.Anything, mock.Anything, mock.Anything, mock.Anything, - ).Return(tt.reports, nil) - for k, v := range tt.ranges { - mockReader.On("ExecutedMessageRanges", mock.Anything, k, mock.Anything, mock.Anything).Return(v, nil) - } - - // CCIP Reader mocks: - // once: - // CommitReportsGTETimestamp(ctx, dest, ts, 1000) -> ([]cciptypes.CommitPluginReportWithMeta, error) - // for each chain selector: - // ExecutedMessageRanges(ctx, selector, dest, seqRange) -> ([]cciptypes.SeqNumRange, error) - - got, got1, err := getPendingExecutedReports(context.Background(), mockReader, 123, time.Now()) - if !tt.wantErr(t, err, "getPendingExecutedReports(...)") { - return - } - assert.Equalf(t, tt.want, got, "getPendingExecutedReports(...)") - assert.Equalf(t, tt.want1, got1, "getPendingExecutedReports(...)") - }) - } -} diff --git a/core/services/ocr3/plugins/ccip/go.mod b/core/services/ocr3/plugins/ccip/go.mod deleted file mode 100644 index b497e58564..0000000000 --- a/core/services/ocr3/plugins/ccip/go.mod +++ /dev/null @@ -1,50 +0,0 @@ -module github.com/smartcontractkit/ccipocr3 - -go 1.21.7 - -require ( - github.com/deckarep/golang-set/v2 v2.6.0 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625074419-c278d083facf - github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c - github.com/stretchr/testify v1.9.0 - golang.org/x/crypto v0.24.0 - golang.org/x/sync v0.7.0 - google.golang.org/grpc v1.64.0 -) - -require ( - github.com/bahlo/generic-list-go v0.2.0 // indirect - github.com/beorn7/perks v1.0.1 // indirect - github.com/buger/jsonparser v1.1.1 // indirect - github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/google/uuid v1.6.0 // indirect - github.com/invopop/jsonschema v0.12.0 // indirect - github.com/mailru/easyjson v0.7.7 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/mr-tron/base58 v1.2.0 // indirect - github.com/pelletier/go-toml/v2 v2.2.2 // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.19.1 // indirect - github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.54.0 // indirect - github.com/prometheus/procfs v0.15.1 // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect - github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect - github.com/shopspring/decimal v1.4.0 // indirect - github.com/stretchr/objx v0.5.2 // indirect - github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect - go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.27.0 // indirect - golang.org/x/net v0.26.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect - gonum.org/v1/gonum v0.15.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 // indirect - google.golang.org/protobuf v1.34.1 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) - -// replicating the replace directive on cosmos SDK -replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 diff --git a/core/services/ocr3/plugins/ccip/go.sum b/core/services/ocr3/plugins/ccip/go.sum deleted file mode 100644 index c71295378b..0000000000 --- a/core/services/ocr3/plugins/ccip/go.sum +++ /dev/null @@ -1,98 +0,0 @@ -github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= -github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= -github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= -github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= -github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deckarep/golang-set/v2 v2.6.0 h1:XfcQbWM1LlMB8BsJ8N9vW5ehnnPVIw0je80NsVHagjM= -github.com/deckarep/golang-set/v2 v2.6.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/invopop/jsonschema v0.12.0 h1:6ovsNSuvn9wEQVOyc72aycBMVQFKz7cPdMJn10CvzRI= -github.com/invopop/jsonschema v0.12.0/go.mod h1:ffZ5Km5SWWRAIN6wbDXItl95euhFz2uON45H2qjYt+0= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= -github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= -github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= -github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= -github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= -github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= -github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.54.0 h1:ZlZy0BgJhTwVZUn7dLOkwCZHUkrAqd3WYtcFCWnM1D8= -github.com/prometheus/common v0.54.0/go.mod h1:/TQgMJP5CuVYveyT7n/0Ix8yLNNXy9yRSkhnLTHPDIQ= -github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= -github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= -github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6NgVqpn3+iol9aGu4= -github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY= -github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= -github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625074419-c278d083facf h1:d9AS/K8RSVG64USb20N/U7RaPOsYPcmuLGJq7iE+caM= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625074419-c278d083facf/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= -github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c h1:lIyMbTaF2H0Q71vkwZHX/Ew4KF2BxiKhqEXwF8rn+KI= -github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= -github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc= -github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw= -go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= -go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= -go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= -go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= -go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -gonum.org/v1/gonum v0.15.0 h1:2lYxjRbTYyxkJxlhC+LvJIx3SsANPdRybu1tGj9/OrQ= -gonum.org/v1/gonum v0.15.0/go.mod h1:xzZVBJBtS+Mz4q0Yl2LJTk+OxOg4jiXZ7qBoM0uISGo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 h1:1GBuWVLM/KMVUv1t1En5Gs+gFZCNd360GGb4sSxtrhU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= -google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= -google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/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= diff --git a/core/services/ocr3/plugins/ccip/internal/libs/slicelib/bigint.go b/core/services/ocr3/plugins/ccip/internal/libs/slicelib/bigint.go deleted file mode 100644 index fd24676b92..0000000000 --- a/core/services/ocr3/plugins/ccip/internal/libs/slicelib/bigint.go +++ /dev/null @@ -1,26 +0,0 @@ -package slicelib - -import ( - "sort" - - cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" -) - -// BigIntSortedMiddle returns the middle number after sorting the provided numbers. -// nil is returned if the provided slice is empty. -// If length of the provided slice is even, the right-hand-side value of the middle 2 numbers is returned. -// The objective of this function is to always pick within the range of values reported by honest nodes -// when we have 2f+1 values. -func BigIntSortedMiddle(vals []cciptypes.BigInt) cciptypes.BigInt { - if len(vals) == 0 { - return cciptypes.BigInt{} - } - - valsCopy := make([]cciptypes.BigInt, len(vals)) - copy(valsCopy[:], vals[:]) - - sort.Slice(valsCopy, func(i, j int) bool { - return (valsCopy[i].Int).Cmp(valsCopy[j].Int) < 0 - }) - return valsCopy[len(valsCopy)/2] -} diff --git a/core/services/ocr3/plugins/ccip/internal/libs/slicelib/bigint_test.go b/core/services/ocr3/plugins/ccip/internal/libs/slicelib/bigint_test.go deleted file mode 100644 index 29ce5f2068..0000000000 --- a/core/services/ocr3/plugins/ccip/internal/libs/slicelib/bigint_test.go +++ /dev/null @@ -1,55 +0,0 @@ -package slicelib - -import ( - "testing" - - "github.com/stretchr/testify/assert" - - cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" -) - -func TestBigIntSortedMiddle(t *testing.T) { - tests := []struct { - name string - vals []cciptypes.BigInt - want cciptypes.BigInt - }{ - { - name: "base case", - vals: []cciptypes.BigInt{ - cciptypes.NewBigIntFromInt64(1), - cciptypes.NewBigIntFromInt64(2), - cciptypes.NewBigIntFromInt64(4), - cciptypes.NewBigIntFromInt64(5), - }, - want: cciptypes.NewBigIntFromInt64(4), - }, - { - name: "not sorted", - vals: []cciptypes.BigInt{ - cciptypes.NewBigIntFromInt64(100), - cciptypes.NewBigIntFromInt64(50), - cciptypes.NewBigIntFromInt64(30), - cciptypes.NewBigIntFromInt64(110), - }, - want: cciptypes.NewBigIntFromInt64(100), - }, - { - name: "empty slice", - vals: []cciptypes.BigInt{}, - want: cciptypes.BigInt{}, - }, - { - name: "one item", - vals: []cciptypes.BigInt{ - cciptypes.NewBigIntFromInt64(123), - }, - want: cciptypes.NewBigIntFromInt64(123), - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - assert.Equalf(t, tt.want, BigIntSortedMiddle(tt.vals), "BigIntSortedMiddle(%v)", tt.vals) - }) - } -} diff --git a/core/services/ocr3/plugins/ccip/internal/libs/slicelib/generic.go b/core/services/ocr3/plugins/ccip/internal/libs/slicelib/generic.go deleted file mode 100644 index 3080bd89e5..0000000000 --- a/core/services/ocr3/plugins/ccip/internal/libs/slicelib/generic.go +++ /dev/null @@ -1,43 +0,0 @@ -package slicelib - -// GroupBy groups a slice based on a specific item property. The returned groups slice is deterministic. -func GroupBy[T any, K comparable](items []T, prop func(T) K) ([]K, map[K][]T) { - groups := make([]K, 0) - grouped := make(map[K][]T) - for _, item := range items { - k := prop(item) - if _, exists := grouped[k]; !exists { - groups = append(groups, k) - } - grouped[k] = append(grouped[k], item) - } - return groups, grouped -} - -// CountUnique counts the unique items of the provided slice. -func CountUnique[T comparable](items []T) int { - m := make(map[T]struct{}) - for _, item := range items { - m[item] = struct{}{} - } - return len(m) -} - -// Flatten flattens a slice of slices into a single slice. -func Flatten[T any](slices [][]T) []T { - res := make([]T, 0) - for _, s := range slices { - res = append(res, s...) - } - return res -} - -func Filter[T any](slice []T, valid func(T) bool) []T { - res := make([]T, 0, len(slice)) - for _, item := range slice { - if valid(item) { - res = append(res, item) - } - } - return res -} diff --git a/core/services/ocr3/plugins/ccip/internal/libs/slicelib/generic_test.go b/core/services/ocr3/plugins/ccip/internal/libs/slicelib/generic_test.go deleted file mode 100644 index 906af817cc..0000000000 --- a/core/services/ocr3/plugins/ccip/internal/libs/slicelib/generic_test.go +++ /dev/null @@ -1,179 +0,0 @@ -package slicelib - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestGroupBy(t *testing.T) { - type person struct { - id string - name string - age int - } - - testCases := []struct { - name string - items []person - expGroupNames []string - expGroups map[string][]person - }{ - { - name: "empty slice", - items: []person{}, - expGroupNames: []string{}, - expGroups: map[string][]person{}, - }, - { - name: "no duplicate", - items: []person{ - {id: "2", name: "Bob", age: 25}, - {id: "1", name: "Alice", age: 23}, - {id: "3", name: "Charlie", age: 22}, - {id: "4", name: "Dim", age: 13}, - }, - expGroupNames: []string{"2", "1", "3", "4"}, // should be deterministic - expGroups: map[string][]person{ - "1": {{id: "1", name: "Alice", age: 23}}, - "2": {{id: "2", name: "Bob", age: 25}}, - "3": {{id: "3", name: "Charlie", age: 22}}, - "4": {{id: "4", name: "Dim", age: 13}}, - }, - }, - { - name: "with duplicate", - items: []person{ - {id: "1", name: "Alice", age: 23}, - {id: "1", name: "Bob", age: 25}, - {id: "3", name: "Charlie", age: 22}, - }, - expGroupNames: []string{"1", "3"}, - expGroups: map[string][]person{ - "1": {{id: "1", name: "Alice", age: 23}, {id: "1", name: "Bob", age: 25}}, - "3": {{id: "3", name: "Charlie", age: 22}}, - }, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - keys, groups := GroupBy(tc.items, func(p person) string { return p.id }) - assert.Equal(t, tc.expGroupNames, keys) - assert.Equal(t, len(tc.expGroups), len(groups)) - for _, k := range keys { - assert.Equal(t, tc.expGroups[k], groups[k]) - } - }) - } -} - -func TestCountUnique(t *testing.T) { - testCases := []struct { - name string - items []string - expCount int - }{ - { - name: "empty slice", - items: []string{}, - expCount: 0, - }, - { - name: "no duplicate", - items: []string{"a", "b", "c"}, - expCount: 3, - }, - { - name: "with duplicate", - items: []string{"a", "a", "b", "c", "b"}, - expCount: 3, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - assert.Equal(t, tc.expCount, CountUnique(tc.items)) - }) - } -} - -func TestFlatten(t *testing.T) { - testCases := []struct { - name string - slices [][]int - expFlatten []int - }{ - { - name: "empty slice", - slices: [][]int{}, - expFlatten: []int{}, - }, - { - name: "no duplicate", - slices: [][]int{{1, 2}, {3, 4}, {5, 6}}, - expFlatten: []int{1, 2, 3, 4, 5, 6}, - }, - { - name: "with duplicate", - slices: [][]int{{1, 2}, {1, 2}, {3, 4}, {5, 6}}, - expFlatten: []int{1, 2, 1, 2, 3, 4, 5, 6}, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - assert.Equal(t, tc.expFlatten, Flatten(tc.slices)) - }) - } -} - -func TestFilter(t *testing.T) { - type person struct { - id string - name string - age int - } - - testCases := []struct { - name string - items []person - valid func(person) bool - expResults []person - }{ - { - name: "empty slice", - items: []person{}, - valid: func(p person) bool { return p.age > 20 }, - expResults: []person{}, - }, - { - name: "no valid item", - items: []person{ - {id: "1", name: "Alice", age: 18}, - {id: "2", name: "Bob", age: 20}, - {id: "3", name: "Charlie", age: 19}, - }, - valid: func(p person) bool { return p.age > 20 }, - expResults: []person{}, - }, - { - name: "with valid item", - items: []person{ - {id: "1", name: "Alice", age: 18}, - {id: "2", name: "Bob", age: 25}, - {id: "3", name: "Charlie", age: 19}, - }, - valid: func(p person) bool { return p.age > 20 }, - expResults: []person{ - {id: "2", name: "Bob", age: 25}, - }, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - assert.Equal(t, tc.expResults, Filter(tc.items, tc.valid)) - }) - } -} diff --git a/core/services/ocr3/plugins/ccip/internal/libs/testhelpers/ocr3runner.go b/core/services/ocr3/plugins/ccip/internal/libs/testhelpers/ocr3runner.go deleted file mode 100644 index 4a1aec2d48..0000000000 --- a/core/services/ocr3/plugins/ccip/internal/libs/testhelpers/ocr3runner.go +++ /dev/null @@ -1,201 +0,0 @@ -package testhelpers - -import ( - "context" - "crypto/sha256" - "encoding/hex" - "errors" - "fmt" - "math/rand" - - "github.com/smartcontractkit/libocr/commontypes" - "github.com/smartcontractkit/libocr/offchainreporting2plus/ocr3types" - "github.com/smartcontractkit/libocr/offchainreporting2plus/types" - - "github.com/smartcontractkit/ccipocr3/internal/libs/slicelib" -) - -var ( - ErrQuery = errors.New("error in query phase") - ErrObservation = errors.New("error in observation phase") - ErrValidateObservation = errors.New("error in validate observation phase") - ErrOutcome = errors.New("error in outcome phase") - ErrEmptyOutcome = errors.New("outcome is empty") - ErrReports = errors.New("error in reports phase") - ErrShouldAcceptAttestedReport = errors.New("error in should accept attested report phase") - ErrShouldTransmitAcceptedReport = errors.New("error in should transmit accepted report phase") -) - -// OCR3Runner is a simple runner for OCR3. -// -// TODO: move to a shared repository. -type OCR3Runner[RI any] struct { - nodes []ocr3types.ReportingPlugin[RI] - nodeIDs []commontypes.OracleID - round int - previousOutcome ocr3types.Outcome -} - -func NewOCR3Runner[RI any]( - nodes []ocr3types.ReportingPlugin[RI], nodeIDs []commontypes.OracleID, initialOutcome ocr3types.Outcome, -) *OCR3Runner[RI] { - return &OCR3Runner[RI]{ - nodes: nodes, - nodeIDs: nodeIDs, - round: 0, - previousOutcome: initialOutcome, - } -} - -// RunRound will run some basic steps of an OCR3 flow. -// This is not a full OCR3 round but only the bare minimum. -func (r *OCR3Runner[RI]) RunRound(ctx context.Context) (result RoundResult[RI], err error) { - r.round++ - seqNr := uint64(r.round) - - leaderNode := r.selectLeader() - - outcomeCtx := ocr3types.OutcomeContext{SeqNr: seqNr, PreviousOutcome: r.previousOutcome} - - q, err := leaderNode.Query(ctx, outcomeCtx) - if err != nil { - return RoundResult[RI]{}, fmt.Errorf("%w: %w", err, ErrQuery) - } - - attributedObservations := make([]types.AttributedObservation, len(r.nodes)) - for i, n := range r.nodes { - obs, err2 := n.Observation(ctx, outcomeCtx, q) - if err2 != nil { - return RoundResult[RI]{}, fmt.Errorf("%w: %w", err2, ErrObservation) - } - - attrObs := types.AttributedObservation{Observation: obs, Observer: r.nodeIDs[i]} - err = leaderNode.ValidateObservation(outcomeCtx, q, attrObs) - if err != nil { - return RoundResult[RI]{}, fmt.Errorf("%w: %w", err, ErrValidateObservation) - } - - attributedObservations[i] = attrObs - } - - outcomes := make([]ocr3types.Outcome, len(r.nodes)) - for i, n := range r.nodes { - outcome, err2 := n.Outcome(outcomeCtx, q, attributedObservations) - if err2 != nil { - return RoundResult[RI]{}, fmt.Errorf("%w: %w", err2, ErrOutcome) - } - if len(outcome) == 0 { - return RoundResult[RI]{}, ErrEmptyOutcome - } - - outcomes[i] = outcome - } - - // check that all the outcomes are the same. - if countUniqueOutcomes(outcomes) > 1 { - return RoundResult[RI]{}, fmt.Errorf("outcomes are not equal") - } - - r.previousOutcome = outcomes[0] - - allReports := make([][]ocr3types.ReportWithInfo[RI], len(r.nodes)) - for i, n := range r.nodes { - reportsWithInfo, err2 := n.Reports(seqNr, outcomes[0]) - if err2 != nil { - return RoundResult[RI]{}, fmt.Errorf("%w: %w", err2, ErrReports) - } - - allReports[i] = reportsWithInfo - } - - // check that all the reports are the same. - if countUniqueReports(slicelib.Flatten(allReports)) > 1 { - return RoundResult[RI]{}, fmt.Errorf("reports are not equal") - } - - transmitted := make([]ocr3types.ReportWithInfo[RI], 0) - notAccepted := make([]ocr3types.ReportWithInfo[RI], 0) - notTransmitted := make([]ocr3types.ReportWithInfo[RI], 0) - - for _, report := range allReports[0] { - allShouldAccept := make([]bool, len(r.nodes)) - for i, n := range r.nodes { - shouldAccept, err2 := n.ShouldAcceptAttestedReport(ctx, seqNr, report) - if err2 != nil { - return RoundResult[RI]{}, fmt.Errorf("%w: %w", err2, ErrShouldAcceptAttestedReport) - } - - allShouldAccept[i] = shouldAccept - } - if slicelib.CountUnique(allShouldAccept) > 1 { - return RoundResult[RI]{}, fmt.Errorf("should accept attested report from all oracles is not equal") - } - - if !allShouldAccept[0] { - notAccepted = append(notAccepted, report) - continue - } - - allShouldTransmit := make([]bool, len(r.nodes)) - for i, n := range r.nodes { - shouldTransmit, err2 := n.ShouldTransmitAcceptedReport(ctx, seqNr, report) - if err2 != nil { - return RoundResult[RI]{}, fmt.Errorf("%w: %w", err2, ErrShouldTransmitAcceptedReport) - } - - allShouldTransmit[i] = shouldTransmit - } - if slicelib.CountUnique(allShouldTransmit) > 1 { - return RoundResult[RI]{}, fmt.Errorf("should transmit accepted report from all oracles is not equal") - } - - if !allShouldTransmit[0] { - notTransmitted = append(notTransmitted, report) - continue - } - - transmitted = append(transmitted, report) - } - - return RoundResult[RI]{ - Transmitted: transmitted, - NotAccepted: notAccepted, - NotTransmitted: notTransmitted, - Outcome: outcomes[0], - }, nil -} - -func (r *OCR3Runner[RI]) selectLeader() ocr3types.ReportingPlugin[RI] { - numNodes := len(r.nodes) - if numNodes == 0 { - return nil - } - return r.nodes[rand.Intn(numNodes)] -} - -type RoundResult[RI any] struct { - Transmitted []ocr3types.ReportWithInfo[RI] - NotAccepted []ocr3types.ReportWithInfo[RI] - NotTransmitted []ocr3types.ReportWithInfo[RI] - Outcome []byte -} - -func countUniqueOutcomes(outcomes []ocr3types.Outcome) int { - flattenedHashes := make([]string, 0, len(outcomes)) - for _, o := range outcomes { - h := sha256.New() - h.Write(o) - flattenedHashes = append(flattenedHashes, hex.EncodeToString(h.Sum(nil))) - } - return slicelib.CountUnique(flattenedHashes) -} - -func countUniqueReports[RI any](reports []ocr3types.ReportWithInfo[RI]) int { - flattenedHashes := make([]string, 0, len(reports)) - for _, report := range reports { - h := sha256.New() - h.Write(report.Report) - flattenedHashes = append(flattenedHashes, hex.EncodeToString(h.Sum(nil))) - } - return slicelib.CountUnique(flattenedHashes) -} diff --git a/core/services/ocr3/plugins/ccip/internal/mocks/ccipreader.go b/core/services/ocr3/plugins/ccip/internal/mocks/ccipreader.go deleted file mode 100644 index 8da37ec710..0000000000 --- a/core/services/ocr3/plugins/ccip/internal/mocks/ccipreader.go +++ /dev/null @@ -1,60 +0,0 @@ -package mocks - -import ( - "context" - "time" - - "github.com/stretchr/testify/mock" - - cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" -) - -type CCIPReader struct { - *mock.Mock -} - -func NewCCIPReader() *CCIPReader { - return &CCIPReader{ - Mock: &mock.Mock{}, - } -} - -func (r CCIPReader) CommitReportsGTETimestamp( - ctx context.Context, dest cciptypes.ChainSelector, ts time.Time, limit int, -) ([]cciptypes.CommitPluginReportWithMeta, error) { - args := r.Called(ctx, dest, ts, limit) - return args.Get(0).([]cciptypes.CommitPluginReportWithMeta), args.Error(1) -} - -func (r CCIPReader) ExecutedMessageRanges( - ctx context.Context, source, dest cciptypes.ChainSelector, seqNumRange cciptypes.SeqNumRange, -) ([]cciptypes.SeqNumRange, error) { - args := r.Called(ctx, source, dest, seqNumRange) - return args.Get(0).([]cciptypes.SeqNumRange), args.Error(1) -} - -func (r CCIPReader) MsgsBetweenSeqNums( - ctx context.Context, chain cciptypes.ChainSelector, seqNumRange cciptypes.SeqNumRange, -) ([]cciptypes.CCIPMsg, error) { - args := r.Called(ctx, chain, seqNumRange) - return args.Get(0).([]cciptypes.CCIPMsg), args.Error(1) -} - -func (r CCIPReader) NextSeqNum(ctx context.Context, chains []cciptypes.ChainSelector) ( - seqNum []cciptypes.SeqNum, err error) { - args := r.Called(ctx, chains) - return args.Get(0).([]cciptypes.SeqNum), args.Error(1) -} - -func (r CCIPReader) GasPrices(ctx context.Context, chains []cciptypes.ChainSelector) ([]cciptypes.BigInt, error) { - args := r.Called(ctx, chains) - return args.Get(0).([]cciptypes.BigInt), args.Error(1) -} - -func (r CCIPReader) Close(ctx context.Context) error { - args := r.Called(ctx) - return args.Error(0) -} - -// Interface compatibility check. -var _ cciptypes.CCIPReader = (*CCIPReader)(nil) diff --git a/core/services/ocr3/plugins/ccip/internal/mocks/contract_reader.go b/core/services/ocr3/plugins/ccip/internal/mocks/contract_reader.go deleted file mode 100644 index 25185805b9..0000000000 --- a/core/services/ocr3/plugins/ccip/internal/mocks/contract_reader.go +++ /dev/null @@ -1,67 +0,0 @@ -package mocks - -import ( - "context" - - "github.com/smartcontractkit/chainlink-common/pkg/types" - "github.com/smartcontractkit/chainlink-common/pkg/types/query" - "github.com/stretchr/testify/mock" -) - -type ContractReaderMock struct { - *mock.Mock -} - -func NewContractReaderMock() *ContractReaderMock { - return &ContractReaderMock{ - Mock: &mock.Mock{}, - } -} - -// GetLatestValue Returns given configs at initialization -func (cr *ContractReaderMock) GetLatestValue( - ctx context.Context, contractName, method string, params, returnVal any, -) error { - args := cr.Called(ctx, contractName, method, params, returnVal) - return args.Error(0) -} - -func (cr *ContractReaderMock) Bind(ctx context.Context, bindings []types.BoundContract) error { - args := cr.Called(ctx, bindings) - return args.Error(0) -} - -func (cr *ContractReaderMock) QueryKey( - ctx context.Context, - contractName string, - filter query.KeyFilter, - limitAndSort query.LimitAndSort, - sequenceDataType any, -) ([]types.Sequence, error) { - args := cr.Called(ctx, contractName, filter, limitAndSort, sequenceDataType) - return args.Get(0).([]types.Sequence), args.Error(1) -} - -func (cr *ContractReaderMock) Start(ctx context.Context) error { - args := cr.Called(ctx) - return args.Error(0) -} - -func (cr *ContractReaderMock) Close() error { - args := cr.Called() - return args.Error(0) -} - -func (cr *ContractReaderMock) Ready() error { - args := cr.Called() - return args.Error(0) -} - -func (cr *ContractReaderMock) HealthReport() map[string]error { - args := cr.Called() - return args.Get(0).(map[string]error) -} - -func (cr *ContractReaderMock) Name() string { - return "ContractReaderMock" -} diff --git a/core/services/ocr3/plugins/ccip/internal/mocks/messagehasher.go b/core/services/ocr3/plugins/ccip/internal/mocks/messagehasher.go deleted file mode 100644 index 5a85e25f4c..0000000000 --- a/core/services/ocr3/plugins/ccip/internal/mocks/messagehasher.go +++ /dev/null @@ -1,20 +0,0 @@ -package mocks - -import ( - "context" - - cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" -) - -type MessageHasher struct{} - -func NewMessageHasher() *MessageHasher { - return &MessageHasher{} -} - -func (m *MessageHasher) Hash(ctx context.Context, msg cciptypes.CCIPMsg) (cciptypes.Bytes32, error) { - // simply return the msg id as bytes32 - var b32 [32]byte - copy(b32[:], msg.ID) - return b32, nil -} diff --git a/core/services/ocr3/plugins/ccip/internal/mocks/pricesreader.go b/core/services/ocr3/plugins/ccip/internal/mocks/pricesreader.go deleted file mode 100644 index 9d1f4c5f75..0000000000 --- a/core/services/ocr3/plugins/ccip/internal/mocks/pricesreader.go +++ /dev/null @@ -1,29 +0,0 @@ -package mocks - -import ( - "context" - "math/big" - - ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" - "github.com/stretchr/testify/mock" - - cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" -) - -type TokenPricesReader struct { - *mock.Mock -} - -func NewTokenPricesReader() *TokenPricesReader { - return &TokenPricesReader{ - Mock: &mock.Mock{}, - } -} - -func (t TokenPricesReader) GetTokenPricesUSD(ctx context.Context, tokens []ocrtypes.Account) ([]*big.Int, error) { - args := t.Called(ctx, tokens) - return args.Get(0).([]*big.Int), args.Error(1) -} - -// Interface compatibility check. -var _ cciptypes.TokenPricesReader = (*TokenPricesReader)(nil) diff --git a/core/services/ocr3/plugins/ccip/internal/mocks/reportcodec.go b/core/services/ocr3/plugins/ccip/internal/mocks/reportcodec.go deleted file mode 100644 index b29c93603c..0000000000 --- a/core/services/ocr3/plugins/ccip/internal/mocks/reportcodec.go +++ /dev/null @@ -1,24 +0,0 @@ -package mocks - -import ( - "context" - "encoding/json" - - cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" -) - -type CommitPluginJSONReportCodec struct{} - -func NewCommitPluginJSONReportCodec() *CommitPluginJSONReportCodec { - return &CommitPluginJSONReportCodec{} -} - -func (c CommitPluginJSONReportCodec) Encode(ctx context.Context, report cciptypes.CommitPluginReport) ([]byte, error) { - return json.Marshal(report) -} - -func (c CommitPluginJSONReportCodec) Decode(ctx context.Context, bytes []byte) (cciptypes.CommitPluginReport, error) { - report := cciptypes.CommitPluginReport{} - err := json.Unmarshal(bytes, &report) - return report, err -} diff --git a/core/services/ocr3/plugins/ccip/internal/reader/ccip.go b/core/services/ocr3/plugins/ccip/internal/reader/ccip.go deleted file mode 100644 index cdf8d046bc..0000000000 --- a/core/services/ocr3/plugins/ccip/internal/reader/ccip.go +++ /dev/null @@ -1,194 +0,0 @@ -package reader - -import ( - "context" - "errors" - "fmt" - "time" - - "github.com/smartcontractkit/chainlink-common/pkg/types" - cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" - "github.com/smartcontractkit/chainlink-common/pkg/types/query" - "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" - "golang.org/x/sync/errgroup" -) - -var ( - ErrContractReaderNotFound = errors.New("contract reader not found") - ErrContractWriterNotFound = errors.New("contract writer not found") -) - -// TODO: unit test the implementation when the actual contract reader and writer interfaces are finalized and mocks -// can be generated. -type CCIPChainReader struct { - contractReaders map[cciptypes.ChainSelector]types.ContractReader - contractWriters map[cciptypes.ChainSelector]types.ChainWriter - destChain cciptypes.ChainSelector -} - -func NewCCIPChainReader( - contractReaders map[cciptypes.ChainSelector]types.ContractReader, - contractWriters map[cciptypes.ChainSelector]types.ChainWriter, - destChain cciptypes.ChainSelector, -) *CCIPChainReader { - return &CCIPChainReader{ - contractReaders: contractReaders, - contractWriters: contractWriters, - destChain: destChain, - } -} - -func (r *CCIPChainReader) CommitReportsGTETimestamp( - ctx context.Context, dest cciptypes.ChainSelector, ts time.Time, limit int, -) ([]cciptypes.CommitPluginReportWithMeta, error) { - if err := r.validateReaderExistence(dest); err != nil { - return nil, err - } - panic("implement me") -} - -func (r *CCIPChainReader) ExecutedMessageRanges( - ctx context.Context, source, dest cciptypes.ChainSelector, seqNumRange cciptypes.SeqNumRange, -) ([]cciptypes.SeqNumRange, error) { - if err := r.validateReaderExistence(source, dest); err != nil { - return nil, err - } - panic("implement me") -} - -func (r *CCIPChainReader) MsgsBetweenSeqNums( - ctx context.Context, chain cciptypes.ChainSelector, seqNumRange cciptypes.SeqNumRange, -) ([]cciptypes.CCIPMsg, error) { - if err := r.validateReaderExistence(chain); err != nil { - return nil, err - } - - const ( - contractName = "OnRamp" - eventName = "CCIPSendRequested" - eventAttributeName = "SequenceNumber" - ) - - seq, err := r.contractReaders[chain].QueryKey( - ctx, - contractName, - query.KeyFilter{ - Key: eventName, - Expressions: []query.Expression{ - { - Primitive: &primitives.Comparator{ - Name: eventAttributeName, - ValueComparators: []primitives.ValueComparator{ - { - Value: seqNumRange.Start().String(), - Operator: primitives.Gte, - }, - { - Value: seqNumRange.End().String(), - Operator: primitives.Lte, - }, - }, - }, - BoolExpression: query.BoolExpression{}, - }, - }, - }, - query.LimitAndSort{ - SortBy: []query.SortBy{ - query.NewSortByTimestamp(query.Asc), - }, - Limit: query.Limit{ - Count: uint64(seqNumRange.End() - seqNumRange.Start() + 1), - }, - }, - &cciptypes.CCIPMsg{}, - ) - if err != nil { - return nil, fmt.Errorf("failed to query onRamp: %w", err) - } - - msgs := make([]cciptypes.CCIPMsg, 0) - for _, item := range seq { - msg, ok := item.Data.(cciptypes.CCIPMsg) - if !ok { - return nil, fmt.Errorf("failed to cast %v to CCIPMsg", item.Data) - } - msgs = append(msgs, msg) - } - - return msgs, nil -} - -func (r *CCIPChainReader) NextSeqNum( - ctx context.Context, chains []cciptypes.ChainSelector, -) ([]cciptypes.SeqNum, error) { - if err := r.validateReaderExistence(r.destChain); err != nil { - return nil, err - } - - const ( - contractName = "OffRamp" - funcName = "getExpectedNextSequenceNumbers" - ) - - seqNums := make([]cciptypes.SeqNum, 0) - err := r.contractReaders[r.destChain].GetLatestValue( - ctx, - contractName, - funcName, - map[string]any{ - "chains": chains, - }, - &seqNums, - ) - return seqNums, err -} - -func (r *CCIPChainReader) GasPrices(ctx context.Context, chains []cciptypes.ChainSelector) ([]cciptypes.BigInt, error) { - if err := r.validateWriterExistence(chains...); err != nil { - return nil, err - } - - eg := new(errgroup.Group) - gasPrices := make([]cciptypes.BigInt, len(chains)) - for i, chain := range chains { - i, chain := i, chain - eg.Go(func() error { - gasPrice, err := r.contractWriters[chain].GetFeeComponents(ctx) - if err != nil { - return fmt.Errorf("failed to get gas price: %w", err) - } - gasPrices[i] = cciptypes.NewBigInt(gasPrice.ExecutionFee) - return nil - }) - } - - if err := eg.Wait(); err != nil { - return nil, err - } - return gasPrices, nil -} - -func (r *CCIPChainReader) Close(ctx context.Context) error { - return nil -} - -func (r *CCIPChainReader) validateReaderExistence(chains ...cciptypes.ChainSelector) error { - for _, ch := range chains { - _, exists := r.contractReaders[ch] - if !exists { - return fmt.Errorf("chain %d: %w", ch, ErrContractReaderNotFound) - } - } - return nil -} - -func (r *CCIPChainReader) validateWriterExistence(chains ...cciptypes.ChainSelector) error { - for _, ch := range chains { - _, exists := r.contractWriters[ch] - if !exists { - return fmt.Errorf("chain %d: %w", ch, ErrContractWriterNotFound) - } - } - return nil -} diff --git a/core/services/ocr3/plugins/ccip/internal/reader/home_chain.go b/core/services/ocr3/plugins/ccip/internal/reader/home_chain.go deleted file mode 100644 index ff2409250a..0000000000 --- a/core/services/ocr3/plugins/ccip/internal/reader/home_chain.go +++ /dev/null @@ -1,326 +0,0 @@ -package reader - -import ( - "context" - "fmt" - "sync" - "time" - - mapset "github.com/deckarep/golang-set/v2" - "github.com/smartcontractkit/chainlink-common/pkg/logger" - "github.com/smartcontractkit/chainlink-common/pkg/services" - "github.com/smartcontractkit/chainlink-common/pkg/types" - cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" - libocrtypes "github.com/smartcontractkit/libocr/ragep2p/types" -) - -type HomeChain interface { - GetChainConfig(chainSelector cciptypes.ChainSelector) (ChainConfig, error) - GetAllChainConfigs() (map[cciptypes.ChainSelector]ChainConfig, error) - // GetSupportedChainsForPeer Gets all chain selectors that the peerID can read/write from/to - GetSupportedChainsForPeer(id libocrtypes.PeerID) (mapset.Set[cciptypes.ChainSelector], error) - // GetKnownCCIPChains Gets all chain selectors that are known to CCIP - GetKnownCCIPChains() (mapset.Set[cciptypes.ChainSelector], error) - // GetFChain Gets the FChain value for each chain - GetFChain() (map[cciptypes.ChainSelector]int, error) - // GetOCRConfigs Gets the OCR3Configs for a given donID and pluginType - GetOCRConfigs(ctx context.Context, donID uint32, pluginType uint8) ([]OCR3ConfigWithMeta, error) - services.Service -} - -type state struct { - // gets updated by the polling loop - chainConfigs map[cciptypes.ChainSelector]ChainConfig - // mapping between each node's peerID and the chains it supports. derived from chainConfigs - nodeSupportedChains map[libocrtypes.PeerID]mapset.Set[cciptypes.ChainSelector] - // set of chains that are known to CCIP, derived from chainConfigs - knownSourceChains mapset.Set[cciptypes.ChainSelector] - // map of chain to FChain value, derived from chainConfigs - fChain map[cciptypes.ChainSelector]int -} - -type homeChainPoller struct { - stopCh services.StopChan - sync services.StateMachine - homeChainReader types.ContractReader - lggr logger.Logger - mutex *sync.RWMutex - state state - failedPolls uint - // How frequently the poller fetches the chain configs - pollingDuration time.Duration -} - -const MaxFailedPolls = 10 - -func NewHomeChainConfigPoller( - homeChainReader types.ContractReader, - lggr logger.Logger, - pollingInterval time.Duration, -) HomeChain { - return &homeChainPoller{ - stopCh: make(chan struct{}), - homeChainReader: homeChainReader, - state: state{}, - mutex: &sync.RWMutex{}, - failedPolls: 0, - lggr: lggr, - pollingDuration: pollingInterval, - } -} - -func (r *homeChainPoller) Start(ctx context.Context) error { - err := r.fetchAndSetConfigs(ctx) - if err != nil { - // Just log, don't return error as we want to keep polling - r.lggr.Errorw("Initial fetch of on-chain configs failed", "err", err) - } - r.lggr.Infow("Start Polling ChainConfig") - return r.sync.StartOnce(r.Name(), func() error { - go r.poll() - return nil - }) -} - -func (r *homeChainPoller) poll() { - ctx, cancel := r.stopCh.NewCtx() - defer cancel() - ticker := time.NewTicker(r.pollingDuration) - defer ticker.Stop() - for { - select { - case <-ctx.Done(): - r.mutex.Lock() - r.failedPolls = 0 - r.mutex.Unlock() - return - case <-ticker.C: - if err := r.fetchAndSetConfigs(ctx); err != nil { - r.mutex.Lock() - r.failedPolls++ - r.mutex.Unlock() - r.lggr.Errorw("fetching and setting configs failed", "failedPolls", r.failedPolls, "err", err) - } - } - } -} - -func (r *homeChainPoller) fetchAndSetConfigs(ctx context.Context) error { - var chainConfigInfos []ChainConfigInfo - err := r.homeChainReader.GetLatestValue( - ctx, "CCIPCapabilityConfiguration", "getAllChainConfigs", nil, &chainConfigInfos, - ) - if err != nil { - r.lggr.Errorw("fetching on-chain configs failed", "err", err) - return err - } - if len(chainConfigInfos) == 0 { - // That's a legitimate case if there are no chain configs on chain yet - r.lggr.Warnw("no on chain configs found") - return nil - } - homeChainConfigs, err := convertOnChainConfigToHomeChainConfig(chainConfigInfos) - if err != nil { - r.lggr.Errorw("error converting OnChainConfigs to ChainConfig", "err", err) - return err - } - r.lggr.Infow("Setting ChainConfig") - r.setState(homeChainConfigs) - return nil -} - -func (r *homeChainPoller) setState(chainConfigs map[cciptypes.ChainSelector]ChainConfig) { - r.mutex.Lock() - defer r.mutex.Unlock() - s := &r.state - s.chainConfigs = chainConfigs - s.nodeSupportedChains = createNodesSupportedChains(chainConfigs) - s.knownSourceChains = createKnownChains(chainConfigs) - s.fChain = createFChain(chainConfigs) -} - -func (r *homeChainPoller) GetChainConfig(chainSelector cciptypes.ChainSelector) (ChainConfig, error) { - r.mutex.RLock() - defer r.mutex.RUnlock() - s := r.state - if chainConfig, ok := s.chainConfigs[chainSelector]; ok { - return chainConfig, nil - } - return ChainConfig{}, fmt.Errorf("chain config not found for chain %v", chainSelector) -} - -func (r *homeChainPoller) GetAllChainConfigs() (map[cciptypes.ChainSelector]ChainConfig, error) { - r.mutex.RLock() - defer r.mutex.RUnlock() - return r.state.chainConfigs, nil -} - -func (r *homeChainPoller) GetSupportedChainsForPeer( - id libocrtypes.PeerID, -) (mapset.Set[cciptypes.ChainSelector], error) { - r.mutex.RLock() - defer r.mutex.RUnlock() - s := r.state - if _, ok := s.nodeSupportedChains[id]; !ok { - // empty set to denote no chains supported - return mapset.NewSet[cciptypes.ChainSelector](), nil - } - return s.nodeSupportedChains[id], nil -} - -func (r *homeChainPoller) GetKnownCCIPChains() (mapset.Set[cciptypes.ChainSelector], error) { - r.mutex.RLock() - defer r.mutex.RUnlock() - knownSourceChains := mapset.NewSet[cciptypes.ChainSelector]() - for chain := range r.state.chainConfigs { - knownSourceChains.Add(chain) - } - - return knownSourceChains, nil -} - -func (r *homeChainPoller) GetFChain() (map[cciptypes.ChainSelector]int, error) { - r.mutex.RLock() - defer r.mutex.RUnlock() - return r.state.fChain, nil -} - -func (r *homeChainPoller) GetOCRConfigs( - ctx context.Context, donID uint32, pluginType uint8, -) ([]OCR3ConfigWithMeta, error) { - var ocrConfigs []OCR3ConfigWithMeta - err := r.homeChainReader.GetLatestValue(ctx, "CCIPCapabilityConfiguration", "getOCRConfig", map[string]any{ - "donId": donID, - "pluginType": pluginType, - }, &ocrConfigs) - if err != nil { - return nil, fmt.Errorf("error fetching OCR configs: %w", err) - } - - return ocrConfigs, nil -} - -func (r *homeChainPoller) Close() error { - return r.sync.StopOnce(r.Name(), func() error { - close(r.stopCh) - return nil - }) -} - -func (r *homeChainPoller) Ready() error { - r.mutex.RLock() - defer r.mutex.RUnlock() - return r.sync.Ready() -} - -func (r *homeChainPoller) HealthReport() map[string]error { - r.mutex.RLock() - defer r.mutex.RUnlock() - if r.failedPolls >= MaxFailedPolls { - r.sync.SvcErrBuffer.Append(fmt.Errorf("polling failed %d times in a row", MaxFailedPolls)) - } - return map[string]error{r.Name(): r.sync.Healthy()} -} - -func (r *homeChainPoller) Name() string { - return "homeChainPoller" -} - -func createFChain(chainConfigs map[cciptypes.ChainSelector]ChainConfig) map[cciptypes.ChainSelector]int { - fChain := map[cciptypes.ChainSelector]int{} - for chain, config := range chainConfigs { - fChain[chain] = config.FChain - } - return fChain -} - -func createKnownChains(chainConfigs map[cciptypes.ChainSelector]ChainConfig) mapset.Set[cciptypes.ChainSelector] { - knownChains := mapset.NewSet[cciptypes.ChainSelector]() - for chain := range chainConfigs { - knownChains.Add(chain) - } - return knownChains -} - -func createNodesSupportedChains( - chainConfigs map[cciptypes.ChainSelector]ChainConfig, -) map[libocrtypes.PeerID]mapset.Set[cciptypes.ChainSelector] { - nodeSupportedChains := map[libocrtypes.PeerID]mapset.Set[cciptypes.ChainSelector]{} - for chainSelector, config := range chainConfigs { - for _, p2pID := range config.SupportedNodes.ToSlice() { - if _, ok := nodeSupportedChains[p2pID]; !ok { - nodeSupportedChains[p2pID] = mapset.NewSet[cciptypes.ChainSelector]() - } - //add chain to SupportedChains - nodeSupportedChains[p2pID].Add(chainSelector) - } - } - return nodeSupportedChains -} - -func convertOnChainConfigToHomeChainConfig( - capabilityConfigs []ChainConfigInfo, -) (map[cciptypes.ChainSelector]ChainConfig, error) { - chainConfigs := make(map[cciptypes.ChainSelector]ChainConfig) - for _, capabilityConfig := range capabilityConfigs { - chainSelector := capabilityConfig.ChainSelector - config := capabilityConfig.ChainConfig - - chainConfigs[chainSelector] = ChainConfig{ - FChain: int(config.FChain), - SupportedNodes: mapset.NewSet(config.Readers...), - } - } - return chainConfigs, nil -} - -// HomeChainConfigMapper This is a 1-1 mapping between the config that we get from the contract to make -// se/deserializing easier -type HomeChainConfigMapper struct { - Readers []libocrtypes.PeerID `json:"readers"` - FChain uint8 `json:"fChain"` - Config []byte `json:"config"` -} - -// ChainConfigInfo This is a 1-1 mapping between the config that we get from the contract to make -// se/deserializing easier -type ChainConfigInfo struct { - // nolint:lll // don't split up the long url - // Calling function https://github.com/smartcontractkit/ccip/blob/330c5e98f624cfb10108c92fe1e00ced6d345a99/contracts/src/v0.8/ccip/capability/CCIPCapabilityConfiguration.sol#L140 - ChainSelector cciptypes.ChainSelector `json:"chainSelector"` - ChainConfig HomeChainConfigMapper `json:"chainConfig"` -} - -// ChainConfig will live on the home chain and will be used to update chain configuration like F value and supported -// nodes dynamically. -type ChainConfig struct { - // FChain defines the FChain value for the chain. FChain is used while forming consensus based on the observations. - FChain int `json:"fChain"` - // SupportedNodes is a map of PeerIDs to SupportedChains. - SupportedNodes mapset.Set[libocrtypes.PeerID] `json:"supportedNodes"` - // Config is the chain specific configuration. - Config []byte `json:"config"` -} - -// OCR3Config mirrors CCIPCapabilityConfiguration.sol's OCR3Config struct -type OCR3Config struct { - PluginType uint8 `json:"pluginType"` - ChainSelector cciptypes.ChainSelector `json:"chainSelector"` - F uint8 `json:"F"` - OffchainConfigVersion uint64 `json:"offchainConfigVersion"` - OfframpAddress []byte `json:"offrampAddress"` - BootstrapP2PIds [][32]byte `json:"bootstrapP2PIds"` - P2PIds [][32]byte `json:"p2pIds"` - Signers [][]byte `json:"signers"` - Transmitters [][]byte `json:"transmitters"` - OffchainConfig []byte `json:"offchainConfig"` -} - -// OCR3ConfigWithmeta mirrors CCIPCapabilityConfiguration.sol's OCR3ConfigWithMeta struct -type OCR3ConfigWithMeta struct { - Config OCR3Config `json:"config"` - ConfigCount uint64 `json:"configCount"` - ConfigDigest [32]byte `json:"configDigest"` -} - -var _ HomeChain = (*homeChainPoller)(nil) diff --git a/core/services/ocr3/plugins/ccip/internal/reader/home_chain_test.go b/core/services/ocr3/plugins/ccip/internal/reader/home_chain_test.go deleted file mode 100644 index f08f44bf7f..0000000000 --- a/core/services/ocr3/plugins/ccip/internal/reader/home_chain_test.go +++ /dev/null @@ -1,201 +0,0 @@ -package reader - -import ( - "context" - "fmt" - "testing" - "time" - - mapset "github.com/deckarep/golang-set/v2" - libocrtypes "github.com/smartcontractkit/libocr/ragep2p/types" - - "github.com/smartcontractkit/ccipocr3/internal/mocks" - - "github.com/smartcontractkit/chainlink-common/pkg/logger" - cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" - "github.com/smartcontractkit/libocr/commontypes" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" -) - -var ( - chainA = cciptypes.ChainSelector(1) - chainB = cciptypes.ChainSelector(2) - chainC = cciptypes.ChainSelector(3) - oracleAId = commontypes.OracleID(1) - p2pOracleAId = libocrtypes.PeerID{byte(oracleAId)} - oracleBId = commontypes.OracleID(2) - p2pOracleBId = libocrtypes.PeerID{byte(oracleBId)} - oracleCId = commontypes.OracleID(3) - p2pOracleCId = libocrtypes.PeerID{byte(oracleCId)} -) - -func TestHomeChainConfigPoller_HealthReport(t *testing.T) { - homeChainReader := mocks.NewContractReaderMock() - homeChainReader.On( - "GetLatestValue", - mock.Anything, - "CCIPCapabilityConfiguration", - "getAllChainConfigs", - mock.Anything, - mock.Anything).Return(fmt.Errorf("error")) - - var ( - tickTime = 10 * time.Millisecond - totalSleepTime = 11 * tickTime - ) - - configPoller := NewHomeChainConfigPoller( - homeChainReader, - logger.Test(t), - tickTime, - ) - _ = configPoller.Start(context.Background()) - - // Initially it's healthy - healthy := configPoller.HealthReport() - assert.Equal(t, map[string]error{configPoller.Name(): error(nil)}, healthy) - - // After one second it will try polling 10 times and fail - time.Sleep(totalSleepTime) - - errors := configPoller.HealthReport() - - err := configPoller.Close() - time.Sleep(tickTime) - assert.NoError(t, err) - assert.Equal(t, 1, len(errors)) - assert.Errorf(t, errors[configPoller.Name()], "polling failed %d times in a row", MaxFailedPolls) -} - -func Test_PollingWorking(t *testing.T) { - onChainConfigs := []ChainConfigInfo{ - { - ChainSelector: chainA, - ChainConfig: HomeChainConfigMapper{ - FChain: 1, - Readers: []libocrtypes.PeerID{ - p2pOracleAId, - p2pOracleBId, - p2pOracleCId, - }, - Config: []byte{0}, - }, - }, - { - ChainSelector: chainB, - ChainConfig: HomeChainConfigMapper{ - FChain: 2, - Readers: []libocrtypes.PeerID{ - p2pOracleAId, - p2pOracleBId, - }, - Config: []byte{0}, - }, - }, - { - ChainSelector: chainC, - ChainConfig: HomeChainConfigMapper{ - FChain: 3, - Readers: []libocrtypes.PeerID{ - p2pOracleCId, - }, - Config: []byte{0}, - }, - }, - } - homeChainConfig := map[cciptypes.ChainSelector]ChainConfig{ - chainA: { - FChain: 1, - SupportedNodes: mapset.NewSet(p2pOracleAId, p2pOracleBId, p2pOracleCId), - }, - chainB: { - FChain: 2, - SupportedNodes: mapset.NewSet(p2pOracleAId, p2pOracleBId), - }, - chainC: { - FChain: 3, - SupportedNodes: mapset.NewSet(p2pOracleCId), - }, - } - - homeChainReader := mocks.NewContractReaderMock() - homeChainReader.On( - "GetLatestValue", mock.Anything, "CCIPCapabilityConfiguration", "getAllChainConfigs", mock.Anything, mock.Anything, - ).Run( - func(args mock.Arguments) { - arg := args.Get(4).(*[]ChainConfigInfo) - *arg = onChainConfigs - }).Return(nil) - - var ( - tickTime = 20 * time.Millisecond - totalSleepTime = (tickTime * 2) + (10 * time.Millisecond) - expNumCalls = int(totalSleepTime/tickTime) + 1 // +1 for the initial call - ) - - configPoller := NewHomeChainConfigPoller( - homeChainReader, - logger.Test(t), - tickTime, - ) - - ctx := context.Background() - err := configPoller.Start(ctx) - assert.NoError(t, err) - time.Sleep(totalSleepTime) - err = configPoller.Close() - assert.NoError(t, err) - - // called 3 times, once when it's started, and 2 times when it's polling - homeChainReader.AssertNumberOfCalls(t, "GetLatestValue", expNumCalls) - - configs, err := configPoller.GetAllChainConfigs() - assert.NoError(t, err) - assert.Equal(t, homeChainConfig, configs) -} - -func Test_HomeChainPoller_GetOCRConfig(t *testing.T) { - donID := uint32(1) - pluginType := uint8(1) // execution - homeChainReader := mocks.NewContractReaderMock() - homeChainReader.On( - "GetLatestValue", - mock.Anything, - "CCIPCapabilityConfiguration", - "getOCRConfig", - map[string]any{ - "donId": donID, - "pluginType": pluginType, - }, - mock.AnythingOfType("*[]reader.OCR3ConfigWithMeta"), - ).Return(nil).Run(func(args mock.Arguments) { - arg := args.Get(4).(*[]OCR3ConfigWithMeta) - *arg = append(*arg, OCR3ConfigWithMeta{ - ConfigCount: 1, - Config: OCR3Config{ - PluginType: pluginType, - ChainSelector: 1, - F: 1, - OfframpAddress: []byte("offramp"), - }, - }) - }) - defer homeChainReader.AssertExpectations(t) - - configPoller := NewHomeChainConfigPoller( - homeChainReader, - logger.Test(t), - 10*time.Millisecond, - ) - - configs, err := configPoller.GetOCRConfigs(context.Background(), donID, pluginType) - require.NoError(t, err) - require.Len(t, configs, 1) - require.Equal(t, uint8(1), configs[0].Config.PluginType) - require.Equal(t, cciptypes.ChainSelector(1), configs[0].Config.ChainSelector) - require.Equal(t, uint8(1), configs[0].Config.F) - require.Equal(t, []byte("offramp"), configs[0].Config.OfframpAddress) -} diff --git a/core/services/ocr3/plugins/ccip/internal/reader/onchain_prices_reader.go b/core/services/ocr3/plugins/ccip/internal/reader/onchain_prices_reader.go deleted file mode 100644 index 6c747bf48b..0000000000 --- a/core/services/ocr3/plugins/ccip/internal/reader/onchain_prices_reader.go +++ /dev/null @@ -1,70 +0,0 @@ -package reader - -import ( - "context" - "fmt" - "math/big" - - commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" - ocr2types "github.com/smartcontractkit/libocr/offchainreporting2plus/types" - "golang.org/x/sync/errgroup" -) - -type TokenPriceConfig struct { - // This is mainly used for inputTokens on testnet to give them a price - StaticPrices map[ocr2types.Account]big.Int `json:"staticPrices"` -} - -type OnchainTokenPricesReader struct { - TokenPriceConfig TokenPriceConfig - // Reader for the chain that will have the token prices on-chain - ContractReader commontypes.ContractReader -} - -func NewOnchainTokenPricesReader( - tokenPriceConfig TokenPriceConfig, contractReader commontypes.ContractReader, -) *OnchainTokenPricesReader { - return &OnchainTokenPricesReader{ - TokenPriceConfig: tokenPriceConfig, - ContractReader: contractReader, - } -} - -func (pr *OnchainTokenPricesReader) GetTokenPricesUSD( - ctx context.Context, tokens []ocr2types.Account, -) ([]*big.Int, error) { - const ( - contractName = "PriceAggregator" - functionName = "getTokenPrice" - ) - prices := make([]*big.Int, len(tokens)) - eg := new(errgroup.Group) - for idx, token := range tokens { - idx := idx - token := token - eg.Go(func() error { - price := new(big.Int) - if staticPrice, exists := pr.TokenPriceConfig.StaticPrices[token]; exists { - price.Set(&staticPrice) - } else { - if err := pr.ContractReader.GetLatestValue(ctx, contractName, functionName, token, price); err != nil { - return fmt.Errorf("failed to get token price for %s: %w", token, err) - } - } - prices[idx] = price - return nil - }) - } - - if err := eg.Wait(); err != nil { - return nil, fmt.Errorf("failed to get all token prices successfully: %w", err) - } - - for _, price := range prices { - if price == nil { - return nil, fmt.Errorf("failed to get all token prices successfully, some prices are nil") - } - } - - return prices, nil -} diff --git a/core/services/ocr3/plugins/ccip/internal/reader/onchain_prices_reader_test.go b/core/services/ocr3/plugins/ccip/internal/reader/onchain_prices_reader_test.go deleted file mode 100644 index f57183134d..0000000000 --- a/core/services/ocr3/plugins/ccip/internal/reader/onchain_prices_reader_test.go +++ /dev/null @@ -1,113 +0,0 @@ -package reader - -import ( - "context" - "fmt" - "math/big" - "testing" - - "github.com/smartcontractkit/ccipocr3/internal/mocks" - - ocr2types "github.com/smartcontractkit/libocr/offchainreporting2plus/types" - - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" -) - -const ( - EthAcc = ocr2types.Account("ETH") - OpAcc = ocr2types.Account("OP") - ArbAcc = ocr2types.Account("ARB") -) - -var ( - EthPrice = big.NewInt(100) - OpPrice = big.NewInt(10) - ArbPrice = big.NewInt(1) -) - -func TestOnchainTokenPricesReader_GetTokenPricesUSD(t *testing.T) { - testCases := []struct { - name string - staticPrices map[ocr2types.Account]big.Int - inputTokens []ocr2types.Account - mockPrices map[ocr2types.Account]*big.Int - want []*big.Int - errorAccounts []ocr2types.Account - wantErr bool - }{ - { - name: "Static price only", - staticPrices: map[ocr2types.Account]big.Int{EthAcc: *EthPrice, OpAcc: *OpPrice}, - inputTokens: []ocr2types.Account{EthAcc, OpAcc}, - mockPrices: map[ocr2types.Account]*big.Int{}, - want: []*big.Int{EthPrice, OpPrice}, - }, - { - name: "On-chain price only", - staticPrices: map[ocr2types.Account]big.Int{}, - inputTokens: []ocr2types.Account{ArbAcc, OpAcc, EthAcc}, - mockPrices: map[ocr2types.Account]*big.Int{OpAcc: OpPrice, ArbAcc: ArbPrice, EthAcc: EthPrice}, - want: []*big.Int{ArbPrice, OpPrice, EthPrice}, - }, - { - name: "Mix of static price and onchain price", - staticPrices: map[ocr2types.Account]big.Int{EthAcc: *EthPrice}, - inputTokens: []ocr2types.Account{EthAcc, OpAcc, ArbAcc}, - mockPrices: map[ocr2types.Account]*big.Int{ArbAcc: ArbPrice, OpAcc: OpPrice}, - want: []*big.Int{EthPrice, OpPrice, ArbPrice}, - }, - { - name: "Missing price should error", - staticPrices: map[ocr2types.Account]big.Int{}, - inputTokens: []ocr2types.Account{ArbAcc, OpAcc, EthAcc}, - mockPrices: map[ocr2types.Account]*big.Int{OpAcc: OpPrice, ArbAcc: ArbPrice}, - errorAccounts: []ocr2types.Account{EthAcc}, - want: nil, - wantErr: true, - }, - } - - for _, tc := range testCases { - contractReader := createMockReader(tc.mockPrices, tc.errorAccounts) - tokenPricesReader := OnchainTokenPricesReader{ - TokenPriceConfig: TokenPriceConfig{StaticPrices: tc.staticPrices}, - ContractReader: contractReader, - } - t.Run(tc.name, func(t *testing.T) { - ctx := context.Background() - result, err := tokenPricesReader.GetTokenPricesUSD(ctx, tc.inputTokens) - - if tc.wantErr { - require.Error(t, err) - return - } - - require.NoError(t, err) - require.Equal(t, tc.want, result) - }) - } - -} - -func createMockReader( - mockPrices map[ocr2types.Account]*big.Int, errorAccounts []ocr2types.Account, -) *mocks.ContractReaderMock { - reader := mocks.NewContractReaderMock() - for _, acc := range errorAccounts { - acc := acc - reader.On( - "GetLatestValue", mock.Anything, "PriceAggregator", "getTokenPrice", acc, mock.Anything, - ).Return(fmt.Errorf("error")) - } - for acc, price := range mockPrices { - acc := acc - price := price - reader.On("GetLatestValue", mock.Anything, "PriceAggregator", "getTokenPrice", acc, mock.Anything).Run( - func(args mock.Arguments) { - arg := args.Get(4).(*big.Int) - arg.Set(price) - }).Return(nil) - } - return reader -} diff --git a/core/services/ocr3/plugins/ccip/pkg/reader/home_chain.go b/core/services/ocr3/plugins/ccip/pkg/reader/home_chain.go deleted file mode 100644 index 7d56122952..0000000000 --- a/core/services/ocr3/plugins/ccip/pkg/reader/home_chain.go +++ /dev/null @@ -1,24 +0,0 @@ -package reader - -import ( - "time" - - "github.com/smartcontractkit/chainlink-common/pkg/logger" - "github.com/smartcontractkit/chainlink-common/pkg/types" - - reader_internal "github.com/smartcontractkit/ccipocr3/internal/reader" -) - -type HomeChain = reader_internal.HomeChain - -type ChainConfig = reader_internal.ChainConfig - -type ChainConfigInfo = reader_internal.ChainConfigInfo - -func NewHomeChainReader( - homeChainReader types.ContractReader, - lggr logger.Logger, - pollingInterval time.Duration, -) HomeChain { - return reader_internal.NewHomeChainConfigPoller(homeChainReader, lggr, pollingInterval) -} diff --git a/core/services/ocr3/plugins/ccip/spec/commit_plugin.py b/core/services/ocr3/plugins/ccip/spec/commit_plugin.py deleted file mode 100644 index 5698650153..0000000000 --- a/core/services/ocr3/plugins/ccip/spec/commit_plugin.py +++ /dev/null @@ -1,243 +0,0 @@ -# -# High-level Python specification for the CCIP OCR3 Commit Plugin. -# -# This specification aims to provide a clear and comprehensive understanding -# of the plugin's functionality. It is highly recommended for engineers working on CCIP -# to familiarize themselves with this specification prior to reading the -# corresponding Go implementation. -# -# NOTE: Even though the specification is written in a high-level programming language, it's purpose -# is not to be executed. It is meant to be just a reference for the Go implementation. -# -from dataclasses import dataclass -from typing import List, Dict - -ChainSelector = int - -@dataclass -class Interval: - min: int - max: int - -@dataclass -class Message: - seq_nr: int - message_id: bytes # a unique message identifier computed on the source chain - message_hash: bytes # hash of message body computed on the destination chain and used on merkle tree - # TODO: - -@dataclass -class Commit: - interval: Interval - root: bytes - -@dataclass -class CommitOutcome: - latest_committed_seq_nums: Dict[ChainSelector, int] - commits: Dict[ChainSelector, Commit] - token_prices: Dict[str, int] - gas_prices: Dict[ChainSelector, int] - -@dataclass -class CommitObservation: - latest_committed_seq_nums: Dict[ChainSelector, int] - new_msgs: Dict[ChainSelector, List[Message]] - token_prices: Dict[str, int] - gas_prices: Dict[ChainSelector, int] - f_chain: Dict[ChainSelector, int] - -@dataclass -class CommitConfig: - oracle: int # our own observer - dest_chain: ChainSelector - f_chain: Dict[ChainSelector, int] - # oracleIndex -> supported chains - oracle_info: Dict[int, Dict[ChainSelector, bool]] - priced_tokens: List[str] - -class CommitPlugin: - def __init__(self): - self.cfg = CommitConfig( - oracle=1, - dest_chain=10, - f_chain={1: 2, 2: 3, 10: 3}, - oracle_info={ - 0: {1: True, 2: True, 10: True}, - # TODO: other oracles - }, - # TODO: will likely need aggregator address as well to - # actually get the price. - priced_tokens=["tokenA", "tokenB"], - ) - self.keep_cfg_in_sync() - - def get_token_prices(self): - # Read token prices which are required for the destination chain. - # We only read them if we have the capability to read from the price chain (e.g. arbitrum) - pass - - def get_gas_prices(self): - # Read all gas prices for the chains we support. - pass - - def query(self): - pass - - def observation(self, previous_outcome: CommitOutcome) -> CommitObservation: - # max_committed_seq_nr={sourceChainA: 10, sourceChainB: 20,...} - # Provided by the nodes that can read from the destination on the previous round. - # Observe msgs for our supported chains since the prev outcome. - new_msgs = {} - for (chain, seq_num) in previous_outcome.latest_committed_seq_nums: - if chain in self.cfg.oracle_info[self.cfg.oracle]: - msgs = self.onRamp(chain).get_msgs(chain, start=seq_num+1, limit=256) - for msg in msgs: - msg.message_hash = msg.compute_hash() - new_msgs[chain] = msgs - - # Observe token prices. {token: price} - token_prices = self.get_token_prices() - - # Observe gas prices. {chain: gasPrice} - # TODO: Should be a way to combine the loops over support chains for gas prices and new messages. - gas_prices = self.get_gas_prices() - - # Observe fChain for each chain. {chain: f_chain} - # We observe this because configuration changes may be detected at different times by different nodes. - # We always use the configuration which is seen by a majority of nodes. - f_chain = self.cfg.f_chain - - # If we support the destination chain, then we contribute an observation of the max committed seq nums. - # We use these in outcome to filter out messages that have already been committed. - latest_committed_seq_nums = {} - if self.cfg.dest_chain in self.cfg.oracle_info[self.cfg.oracle]: - latest_committed_seq_nums = self.offRamp.latest_committed_seq_nums() - - return CommitObservation(latest_committed_seq_nums, new_msgs, token_prices, gas_prices, f_chain) - - - def validate_observation(self, attributed_observation): - observation = attributed_observation.observation - oracle = attributed_observation.oracle - - # Only accept dest observations from nodes that support the dest chain - if observation.latest_committed_seq_nums is not None: - assert self.cfg.dest_chain in self.cfg.oracle_info[oracle] - - # Only accept source observations from nodes which support those sources. - msg_ids = set() - msg_hashes = set() - for (chain, msgs) in observation.new_msgs.items(): - assert(chain in self.cfg.oracle_info[oracle]) - # Don't allow duplicates of (chain, seqNr), (id) and (hash). Required to prevent double counting. - assert(len(msgs) == len(set([msg.seq_num for msg in msgs]))) - for msg in msgs: - assert msg.message_id not in msg_ids - assert msg.message_hash not in msg_hashes - msg_ids.add(msg.message_id) - msg_hashes.add(msg.message_hash) - - def observation_quorum(self): - return "2F+1" - - def outcome(self, observations: List[CommitObservation])->CommitOutcome: - f_chain = consensus_f_chain(observations) - latest_committed_seq_nums = consensus_latest_committed_seq_nums(observations, f_chain) - - # all_msgs contains all messages from all observations, grouped by source chain - all_msgs = [observation.new_msgs for observation in observations].group_by_source_chain() - - commits = {} # { chain: (root, min_seq_num, max_seq_num) } - for (chain, msgs) in all_msgs: - # Keep only msgs with seq nums greater than the consensus max commited seq nums. - # Note right after a report has been submitted, we'll expect those same messages - # to appear in the next observation, because the message observations are built - # on the previous max committed seq nums. - msgs = [msg for msg in msgs if msg.seq_num > latest_committed_seq_nums[chain]] - - msgs_by_seq_num = msgs.group_by_seq_num() # { 423: [0x1, 0x1, 0x2] } - # 2 nodes say that msg hash is 0x1 and 1 node says it's 0x2 - # if different hashes have the same number of votes, we select the - # hash with the lowest lexicographic order - - msg_hashes = { seq_num: elem_most_occurrences(hashes) for (seq_num, hashes) in msgs_by_seq_num.items() } - for (seq_num, hash) in msg_hashes.items(): # require at least 2f+1 observations of the voted hash - assert(msgs_by_seq_num[seq_num].count(hash) >= 2*f_chain[chain]+1) - - msgs_for_tree = [] # [ (seq_num, hash) ] - for (seq_num, hash) in msg_hashes.ordered_by_seq_num(): - if len(msgs_for_tree) > 0 and msgs_for_tree[-1].seq_num+1 != seq_num: - break # gap in sequence numbers, stop here - msgs_for_tree.append((seq_num, hash)) - - commits[chain] = Commit(root=build_merkle_tree(msgs_for_tree), interval=Interval(min=msgs_for_tree[0].seq_num, max=msgs_for_tree[-1].seq_num)) - - # TODO: we only want to put token/gas prices onchain - # on a regular cadence unless huge deviation. - token_prices = { tk: median(prices) for (tk, prices) in observations.group_token_prices_by_token() } - gas_prices = { chain: median(prices) for (chain, prices) in observations.group_gas_prices_by_chain() } - - return CommitOutcome(latest_committed_seq_nums=latest_committed_seq_nums, commits=commits, token_price=token_prices, gas_prices=gas_prices) - - def reports(self, outcome): - report = report_from_outcome(outcome) - encoded = report.chain_encode() # abi_encode for evm chains - return [encoded] - - def should_accept(self, report): - if len(report) == 0 or self.validate_report(report): - return False - - def should_transmit(self, report): - if not self.is_writer(): - return False - - if len(report) == 0 or not self.validate_report(report): - return False - - on_chain_seq_nums = self.offRamp.get_sequence_numbers() - for (chain, tree) in report.trees(): - if not (on_chain_seq_nums[chain]+1 == tree.min_seq_num): - return False - - return True - - def validate_report(self, report): - pass - - def keep_cfg_in_sync(self): - # Polling the configuration on the on-chain contract. - # When the config is updated on-chain, updates the plugin's local copy to the most recent version. - pass - -def consensus_f_chain(observations): - f_chain_votes = observations["f_chain"].group_by_chain() # { chainA: [1, 1, 16, 16, 16, 16] } - return { ch: elem_most_occurrences(fs) for (ch, fs) in f_chain_votes.items() } # { chainA: 16 } - -def consensus_latest_committed_seq_nums(observations, f_chains): - all_latest_committed_seq_nums = {} - for observation in observations: - for (chain, seq_num) in observation.latest_committed_seq_nums.items(): - if chain not in all_latest_committed_seq_nums: - all_latest_committed_seq_nums[chain] = [] - all_latest_committed_seq_nums[chain].append(seq_num) - - latest_committed_seq_nums_consensus = {} - # { chainA: [4, 5, 5, 5, 5, 6, 6] } - for (chain, latest_committed_seq_nums) in all_latest_committed_seq_nums.items(): - if len(latest_committed_seq_nums) >= 2*f_chains[chain]+1: - # 2f+1 = 2*5+1 = 11 - latest_committed_seq_nums_consensus[chain] = sorted(latest_committed_seq_nums)[f_chains[chain]]# with f=4 { chainA: 5 } - return latest_committed_seq_nums_consensus - -def elem_most_occurrences(lst): - pass - -def build_merkle_tree(messages): - pass - -def median(lst): - pass - -def report_from_outcome(outcome: CommitOutcome)->bytes: - pass diff --git a/core/services/ocr3/plugins/ccip_integration_tests/chainreader/chainreader_test.go b/core/services/ocr3/plugins/ccip_integration_tests/chainreader/chainreader_test.go index caff62c795..d0bedf48a9 100644 --- a/core/services/ocr3/plugins/ccip_integration_tests/chainreader/chainreader_test.go +++ b/core/services/ocr3/plugins/ccip_integration_tests/chainreader/chainreader_test.go @@ -18,6 +18,8 @@ import ( "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" + "github.com/stretchr/testify/assert" + "github.com/smartcontractkit/chainlink-common/pkg/codec" types2 "github.com/smartcontractkit/chainlink-common/pkg/types" query2 "github.com/smartcontractkit/chainlink-common/pkg/types/query" @@ -28,7 +30,6 @@ import ( logger2 "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" evmtypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" - "github.com/stretchr/testify/assert" ) const chainID = 1337 @@ -77,6 +78,9 @@ func TestChainReader(t *testing.T) { cfg := evmtypes.ChainReaderConfig{ Contracts: map[string]evmtypes.ChainContractReader{ ContractNameAlias: { + ContractPollingFilter: evmtypes.ContractPollingFilter{ + GenericEventNames: []string{EventNameAlias}, + }, ContractABI: ChainreaderMetaData.ABI, Configs: map[string]*evmtypes.ChainReaderDefinition{ EventNameAlias: { diff --git a/core/services/ocr3/plugins/ccip_integration_tests/home_chain/home_chain_test.go b/core/services/ocr3/plugins/ccip_integration_tests/home_chain/home_chain_test.go new file mode 100644 index 0000000000..ab8629f8c1 --- /dev/null +++ b/core/services/ocr3/plugins/ccip_integration_tests/home_chain/home_chain_test.go @@ -0,0 +1,89 @@ +package home_chain + +import ( + "testing" + "time" + + mapset "github.com/deckarep/golang-set/v2" + "github.com/onsi/gomega" + + libocrtypes "github.com/smartcontractkit/libocr/ragep2p/types" + + ccipreader "github.com/smartcontractkit/chainlink-ccip/pkg/reader" + cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" + capcfg "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/ccip_config" + "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" + "github.com/smartcontractkit/chainlink/v2/core/logger" + it "github.com/smartcontractkit/chainlink/v2/core/services/ocr3/plugins/ccip_integration_tests" + + "github.com/stretchr/testify/require" +) + +func TestHomeChainReader(t *testing.T) { + ctx := testutils.Context(t) + lggr := logger.TestLogger(t) + uni := it.NewTestUniverse(ctx, t, lggr) + // We need 3*f + 1 p2pIDs to have enough nodes to bootstrap + var arr []int64 + n := int(it.FChainA*3 + 1) + for i := 0; i <= n; i++ { + arr = append(arr, int64(i)) + } + p2pIDs := it.P2pIDsFromInts(arr) + uni.AddCapability(p2pIDs) + //==============================Apply configs to Capability Contract================================= + chainAConf := it.SetupConfigInfo(it.ChainA, p2pIDs, it.FChainA, []byte("ChainA")) + chainBConf := it.SetupConfigInfo(it.ChainB, p2pIDs[1:], it.FChainB, []byte("ChainB")) + chainCConf := it.SetupConfigInfo(it.ChainC, p2pIDs[2:], it.FChainC, []byte("ChainC")) + inputConfig := []capcfg.CCIPConfigTypesChainConfigInfo{ + chainAConf, + chainBConf, + chainCConf, + } + _, err := uni.CcipCfg.ApplyChainConfigUpdates(uni.Transactor, nil, inputConfig) + require.NoError(t, err) + uni.Backend.Commit() + //================================Setup HomeChainReader=============================== + + pollDuration := time.Second + homeChain := uni.HomeChainReader + + gomega.NewWithT(t).Eventually(func() bool { + configs, _ := homeChain.GetAllChainConfigs() + return configs != nil + }, testutils.WaitTimeout(t), pollDuration*5).Should(gomega.BeTrue()) + + t.Logf("homchain reader is ready") + //================================Test HomeChain Reader=============================== + expectedChainConfigs := map[cciptypes.ChainSelector]ccipreader.ChainConfig{} + for _, c := range inputConfig { + expectedChainConfigs[cciptypes.ChainSelector(c.ChainSelector)] = ccipreader.ChainConfig{ + FChain: int(c.ChainConfig.FChain), + SupportedNodes: toPeerIDs(c.ChainConfig.Readers), + } + } + configs, err := homeChain.GetAllChainConfigs() + require.NoError(t, err) + require.Equal(t, expectedChainConfigs, configs) + //=================================Remove ChainC from OnChainConfig========================================= + _, err = uni.CcipCfg.ApplyChainConfigUpdates(uni.Transactor, []uint64{it.ChainC}, nil) + require.NoError(t, err) + uni.Backend.Commit() + time.Sleep(pollDuration * 5) // Wait for the chain reader to update + configs, err = homeChain.GetAllChainConfigs() + require.NoError(t, err) + delete(expectedChainConfigs, cciptypes.ChainSelector(it.ChainC)) + require.Equal(t, expectedChainConfigs, configs) + //================================Close HomeChain Reader=============================== + //require.NoError(t, homeChain.Close()) + //require.NoError(t, uni.LogPoller.Close()) + t.Logf("homchain reader successfully closed") +} + +func toPeerIDs(readers [][32]byte) mapset.Set[libocrtypes.PeerID] { + peerIDs := mapset.NewSet[libocrtypes.PeerID]() + for _, r := range readers { + peerIDs.Add(r) + } + return peerIDs +} diff --git a/core/services/ocr3/plugins/ccip_integration_tests/integration_helpers.go b/core/services/ocr3/plugins/ccip_integration_tests/integration_helpers.go new file mode 100644 index 0000000000..b7e81cd2c9 --- /dev/null +++ b/core/services/ocr3/plugins/ccip_integration_tests/integration_helpers.go @@ -0,0 +1,291 @@ +package ccip_integration_tests + +import ( + "context" + "encoding/json" + "fmt" + "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" + + ccipreader "github.com/smartcontractkit/chainlink-ccip/pkg/reader" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/ccip_config" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/ocr3_config_encoder" + kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/capabilities_registry" + "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" + cctypes "github.com/smartcontractkit/chainlink/v2/core/services/ccipcapability/types" + "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" + + "github.com/smartcontractkit/chainlink-common/pkg/types" + + "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" + "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" + "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" + evmrelaytypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" +) + +const chainID = 1337 + +func NewReader(t *testing.T, logPoller logpoller.LogPoller, client client.Client, address common.Address, chainReaderConfig evmrelaytypes.ChainReaderConfig, contractName string) types.ContractReader { + cr, err := evm.NewChainReaderService(testutils.Context(t), logger.TestLogger(t), logPoller, client, chainReaderConfig) + require.NoError(t, err) + err = cr.Bind(testutils.Context(t), []types.BoundContract{ + { + Address: address.String(), + Name: contractName, + Pending: false, + }, + }) + require.NoError(t, err) + require.NoError(t, cr.Start(testutils.Context(t))) + for { + if err := cr.Ready(); err == nil { + break + } + } + + return cr +} + +const ( + ChainA uint64 = 1 + FChainA uint8 = 1 + + ChainB uint64 = 2 + FChainB uint8 = 2 + + ChainC uint64 = 3 + FChainC uint8 = 3 + + CcipCapabilityLabelledName = "ccip" + CcipCapabilityVersion = "v1.0" +) + +type TestUniverse struct { + Transactor *bind.TransactOpts + Backend *backends.SimulatedBackend + CapReg *kcr.CapabilitiesRegistry + CcipCfg *ccip_config.CCIPConfig + TestingT *testing.T + LogPoller logpoller.LogPoller + SimClient client.Client + HomeChainReader ccipreader.HomeChain +} + +func NewTestUniverse(ctx context.Context, t *testing.T, lggr logger.Logger) TestUniverse { + transactor := testutils.MustNewSimTransactor(t) + backend := backends.NewSimulatedBackend(core.GenesisAlloc{ + transactor.From: {Balance: assets.Ether(1000).ToInt()}, + }, 30e6) + + crAddress, _, _, err := kcr.DeployCapabilitiesRegistry(transactor, backend) + require.NoError(t, err) + backend.Commit() + + capReg, err := kcr.NewCapabilitiesRegistry(crAddress, backend) + require.NoError(t, err) + + ccAddress, _, _, err := ccip_config.DeployCCIPConfig(transactor, backend, crAddress) + require.NoError(t, err) + backend.Commit() + + cc, err := ccip_config.NewCCIPConfig(ccAddress, backend) + require.NoError(t, err) + + db := pgtest.NewSqlxDB(t) + lpOpts := logpoller.Opts{ + PollPeriod: time.Millisecond, + FinalityDepth: 0, + BackfillBatchSize: 10, + RpcBatchSize: 10, + KeepFinalizedBlocksDepth: 100000, + } + cl := client.NewSimulatedBackendClient(t, backend, big.NewInt(chainID)) + lp := logpoller.NewLogPoller(logpoller.NewORM(big.NewInt(chainID), db, lggr), cl, logger.NullLogger, lpOpts) + require.NoError(t, lp.Start(ctx)) + t.Cleanup(func() { require.NoError(t, lp.Close()) }) + + hcr := NewHomeChainReader(t, lp, cl, ccAddress) + return TestUniverse{ + Transactor: transactor, + Backend: backend, + CapReg: capReg, + CcipCfg: cc, + TestingT: t, + SimClient: cl, + LogPoller: lp, + HomeChainReader: hcr, + } +} + +func (t TestUniverse) NewContractReader(ctx context.Context, cfg []byte) (types.ContractReader, error) { + var config evmrelaytypes.ChainReaderConfig + err := json.Unmarshal(cfg, &config) + require.NoError(t.TestingT, err) + return evm.NewChainReaderService(ctx, logger.TestLogger(t.TestingT), t.LogPoller, t.SimClient, config) +} + +func P2pIDsFromInts(ints []int64) [][32]byte { + var p2pIDs [][32]byte + for _, i := range ints { + p2pID := p2pkey.MustNewV2XXXTestingOnly(big.NewInt(i)).PeerID() + p2pIDs = append(p2pIDs, p2pID) + } + return p2pIDs +} + +func (t *TestUniverse) AddCapability(p2pIDs [][32]byte) { + _, err := t.CapReg.AddCapabilities(t.Transactor, []kcr.CapabilitiesRegistryCapability{ + { + LabelledName: CcipCapabilityLabelledName, + Version: CcipCapabilityVersion, + CapabilityType: 0, + ResponseType: 0, + ConfigurationContract: t.CcipCfg.Address(), + }, + }) + require.NoError(t.TestingT, err, "failed to add capability to registry") + t.Backend.Commit() + + ccipCapabilityID, err := t.CapReg.GetHashedCapabilityId(nil, CcipCapabilityLabelledName, CcipCapabilityVersion) + require.NoError(t.TestingT, err) + + for i := 0; i < len(p2pIDs); i++ { + _, err = t.CapReg.AddNodeOperators(t.Transactor, []kcr.CapabilitiesRegistryNodeOperator{ + { + Admin: t.Transactor.From, + Name: fmt.Sprintf("nop-%d", i), + }, + }) + require.NoError(t.TestingT, err) + t.Backend.Commit() + + // get the node operator id from the event + it, err := t.CapReg.FilterNodeOperatorAdded(nil, nil, nil) + require.NoError(t.TestingT, err) + var nodeOperatorID uint32 + for it.Next() { + if it.Event.Name == fmt.Sprintf("nop-%d", i) { + nodeOperatorID = it.Event.NodeOperatorId + break + } + } + require.NotZero(t.TestingT, nodeOperatorID) + + _, err = t.CapReg.AddNodes(t.Transactor, []kcr.CapabilitiesRegistryNodeParams{ + { + NodeOperatorId: nodeOperatorID, + Signer: testutils.Random32Byte(), + P2pId: p2pIDs[i], + HashedCapabilityIds: [][32]byte{ccipCapabilityID}, + }, + }) + require.NoError(t.TestingT, err) + t.Backend.Commit() + + // verify that the node was added successfully + nodeInfo, err := t.CapReg.GetNode(nil, p2pIDs[i]) + require.NoError(t.TestingT, err) + + require.Equal(t.TestingT, nodeOperatorID, nodeInfo.NodeOperatorId) + require.Equal(t.TestingT, p2pIDs[i][:], nodeInfo.P2pId[:]) + } +} + +func NewHomeChainReader(t *testing.T, logPoller logpoller.LogPoller, client client.Client, ccAddress common.Address) ccipreader.HomeChain { + cfg := evmrelaytypes.ChainReaderConfig{ + Contracts: map[string]evmrelaytypes.ChainContractReader{ + "CCIPConfig": { + ContractABI: ccip_config.CCIPConfigMetaData.ABI, + Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ + "getAllChainConfigs": { + ChainSpecificName: "getAllChainConfigs", + }, + "getOCRConfig": { + ChainSpecificName: "getOCRConfig", + }, + }, + }, + }, + } + + cr := NewReader(t, logPoller, client, ccAddress, cfg, "CCIPConfig") + + hcr := ccipreader.NewHomeChainReader(cr, logger.TestLogger(t), 500*time.Millisecond) + require.NoError(t, hcr.Start(testutils.Context(t))) + t.Cleanup(func() { require.NoError(t, hcr.Close()) }) + + return hcr +} + +func (t *TestUniverse) AddDONToRegistry( + ccipCapabilityID [32]byte, + chainSelector uint64, + f uint8, + bootstrapP2PID [32]byte, + p2pIDs [][32]byte, +) { + tabi, err := ocr3_config_encoder.IOCR3ConfigEncoderMetaData.GetAbi() + require.NoError(t.TestingT, err) + + var ( + signers [][]byte + transmitters [][]byte + ) + for range p2pIDs { + signers = append(signers, testutils.NewAddress().Bytes()) + transmitters = append(transmitters, testutils.NewAddress().Bytes()) + } + + var ocr3Configs []ocr3_config_encoder.CCIPConfigTypesOCR3Config + for _, pluginType := range []cctypes.PluginType{cctypes.PluginTypeCCIPCommit, cctypes.PluginTypeCCIPExec} { + ocr3Configs = append(ocr3Configs, ocr3_config_encoder.CCIPConfigTypesOCR3Config{ + PluginType: uint8(pluginType), + ChainSelector: chainSelector, + F: f, + OffchainConfigVersion: 30, + OfframpAddress: testutils.NewAddress().Bytes(), + BootstrapP2PIds: [][32]byte{bootstrapP2PID}, + P2pIds: p2pIDs, + Signers: signers, + Transmitters: transmitters, + OffchainConfig: []byte("offchain config"), + }) + } + + encodedCall, err := tabi.Pack("exposeOCR3Config", ocr3Configs) + require.NoError(t.TestingT, err) + + // Trim first four bytes to remove function selector. + encodedConfigs := encodedCall[4:] + + _, err = t.CapReg.AddDON(t.Transactor, p2pIDs, []kcr.CapabilitiesRegistryCapabilityConfiguration{ + { + CapabilityId: ccipCapabilityID, + Config: encodedConfigs, + }, + }, false, false, f) + require.NoError(t.TestingT, err) + t.Backend.Commit() +} + +func SetupConfigInfo(chainSelector uint64, readers [][32]byte, fChain uint8, cfg []byte) ccip_config.CCIPConfigTypesChainConfigInfo { + return ccip_config.CCIPConfigTypesChainConfigInfo{ + ChainSelector: chainSelector, + ChainConfig: ccip_config.CCIPConfigTypesChainConfig{ + Readers: readers, + FChain: fChain, + Config: cfg, + }, + } +} diff --git a/core/services/ocr3/plugins/ccipevm/commitcodec.go b/core/services/ocr3/plugins/ccipevm/commitcodec.go new file mode 100644 index 0000000000..928cecd0a4 --- /dev/null +++ b/core/services/ocr3/plugins/ccipevm/commitcodec.go @@ -0,0 +1,138 @@ +package ccipevm + +import ( + "context" + "fmt" + "math/big" + "strings" + + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/common" + "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + + cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/evm_2_evm_multi_offramp" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/abihelpers" +) + +// CommitPluginCodecV1 is a codec for encoding and decoding commit plugin reports. +// Compatible with: +// - "EVM2EVMMultiOffRamp 1.6.0-dev" +type CommitPluginCodecV1 struct { + commitReportAcceptedEventInputs abi.Arguments +} + +func NewCommitPluginCodecV1() *CommitPluginCodecV1 { + abiParsed, err := abi.JSON(strings.NewReader(evm_2_evm_multi_offramp.EVM2EVMMultiOffRampABI)) + if err != nil { + panic(fmt.Errorf("parse multi offramp abi: %s", err)) + } + eventInputs := abihelpers.MustGetEventInputs("CommitReportAccepted", abiParsed) + return &CommitPluginCodecV1{commitReportAcceptedEventInputs: eventInputs} +} + +func (c *CommitPluginCodecV1) Encode(ctx context.Context, report cciptypes.CommitPluginReport) ([]byte, error) { + merkleRoots := make([]evm_2_evm_multi_offramp.EVM2EVMMultiOffRampMerkleRoot, 0, len(report.MerkleRoots)) + for _, root := range report.MerkleRoots { + merkleRoots = append(merkleRoots, evm_2_evm_multi_offramp.EVM2EVMMultiOffRampMerkleRoot{ + SourceChainSelector: uint64(root.ChainSel), + Interval: evm_2_evm_multi_offramp.EVM2EVMMultiOffRampInterval{ + Min: uint64(root.SeqNumsRange.Start()), + Max: uint64(root.SeqNumsRange.End()), + }, + MerkleRoot: root.MerkleRoot, + }) + } + + tokenPriceUpdates := make([]evm_2_evm_multi_offramp.InternalTokenPriceUpdate, 0, len(report.PriceUpdates.TokenPriceUpdates)) + for _, update := range report.PriceUpdates.TokenPriceUpdates { + if !common.IsHexAddress(string(update.TokenID)) { + return nil, fmt.Errorf("invalid token address: %s", update.TokenID) + } + if update.Price.IsEmpty() { + return nil, fmt.Errorf("empty price for token: %s", update.TokenID) + } + tokenPriceUpdates = append(tokenPriceUpdates, evm_2_evm_multi_offramp.InternalTokenPriceUpdate{ + SourceToken: common.HexToAddress(string(update.TokenID)), + UsdPerToken: update.Price.Int, + }) + } + + gasPriceUpdates := make([]evm_2_evm_multi_offramp.InternalGasPriceUpdate, 0, len(report.PriceUpdates.GasPriceUpdates)) + for _, update := range report.PriceUpdates.GasPriceUpdates { + if update.GasPrice.IsEmpty() { + return nil, fmt.Errorf("empty gas price for chain: %d", update.ChainSel) + } + + gasPriceUpdates = append(gasPriceUpdates, evm_2_evm_multi_offramp.InternalGasPriceUpdate{ + DestChainSelector: uint64(update.ChainSel), + UsdPerUnitGas: update.GasPrice.Int, + }) + } + + evmReport := evm_2_evm_multi_offramp.EVM2EVMMultiOffRampCommitReport{ + PriceUpdates: evm_2_evm_multi_offramp.InternalPriceUpdates{ + TokenPriceUpdates: tokenPriceUpdates, + GasPriceUpdates: gasPriceUpdates, + }, + MerkleRoots: merkleRoots, + } + + return c.commitReportAcceptedEventInputs.PackValues([]interface{}{evmReport}) +} + +func (c *CommitPluginCodecV1) Decode(ctx context.Context, bytes []byte) (cciptypes.CommitPluginReport, error) { + unpacked, err := c.commitReportAcceptedEventInputs.Unpack(bytes) + if err != nil { + return cciptypes.CommitPluginReport{}, err + } + if len(unpacked) != 1 { + return cciptypes.CommitPluginReport{}, fmt.Errorf("expected 1 argument, got %d", len(unpacked)) + } + + commitReportRaw := abi.ConvertType(unpacked[0], new(evm_2_evm_multi_offramp.EVM2EVMMultiOffRampCommitReport)) + commitReport, is := commitReportRaw.(*evm_2_evm_multi_offramp.EVM2EVMMultiOffRampCommitReport) + if !is { + return cciptypes.CommitPluginReport{}, + fmt.Errorf("expected EVM2EVMMultiOffRampCommitReport, got %T", unpacked[0]) + } + + merkleRoots := make([]cciptypes.MerkleRootChain, 0, len(commitReport.MerkleRoots)) + for _, root := range commitReport.MerkleRoots { + merkleRoots = append(merkleRoots, cciptypes.MerkleRootChain{ + ChainSel: cciptypes.ChainSelector(root.SourceChainSelector), + SeqNumsRange: cciptypes.NewSeqNumRange( + cciptypes.SeqNum(root.Interval.Min), + cciptypes.SeqNum(root.Interval.Max), + ), + MerkleRoot: root.MerkleRoot, + }) + } + + tokenPriceUpdates := make([]cciptypes.TokenPrice, 0, len(commitReport.PriceUpdates.TokenPriceUpdates)) + for _, update := range commitReport.PriceUpdates.TokenPriceUpdates { + tokenPriceUpdates = append(tokenPriceUpdates, cciptypes.TokenPrice{ + TokenID: types.Account(update.SourceToken.String()), + Price: cciptypes.NewBigInt(big.NewInt(0).Set(update.UsdPerToken)), + }) + } + + gasPriceUpdates := make([]cciptypes.GasPriceChain, 0, len(commitReport.PriceUpdates.GasPriceUpdates)) + for _, update := range commitReport.PriceUpdates.GasPriceUpdates { + gasPriceUpdates = append(gasPriceUpdates, cciptypes.GasPriceChain{ + GasPrice: cciptypes.NewBigInt(big.NewInt(0).Set(update.UsdPerUnitGas)), + ChainSel: cciptypes.ChainSelector(update.DestChainSelector), + }) + } + + return cciptypes.CommitPluginReport{ + MerkleRoots: merkleRoots, + PriceUpdates: cciptypes.PriceUpdates{ + TokenPriceUpdates: tokenPriceUpdates, + GasPriceUpdates: gasPriceUpdates, + }, + }, nil +} + +// Ensure CommitPluginCodec implements the CommitPluginCodec interface +var _ cciptypes.CommitPluginCodec = (*CommitPluginCodecV1)(nil) diff --git a/core/services/ocr3/plugins/ccipevm/commitcodec_test.go b/core/services/ocr3/plugins/ccipevm/commitcodec_test.go new file mode 100644 index 0000000000..dffc9ff55e --- /dev/null +++ b/core/services/ocr3/plugins/ccipevm/commitcodec_test.go @@ -0,0 +1,135 @@ +package ccipevm + +import ( + "math/big" + "math/rand" + "testing" + + "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" + "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" +) + +var randomReport = func() cciptypes.CommitPluginReport { + return cciptypes.CommitPluginReport{ + MerkleRoots: []cciptypes.MerkleRootChain{ + { + ChainSel: cciptypes.ChainSelector(rand.Uint64()), + SeqNumsRange: cciptypes.NewSeqNumRange( + cciptypes.SeqNum(rand.Uint64()), + cciptypes.SeqNum(rand.Uint64()), + ), + MerkleRoot: utils.RandomBytes32(), + }, + { + ChainSel: cciptypes.ChainSelector(rand.Uint64()), + SeqNumsRange: cciptypes.NewSeqNumRange( + cciptypes.SeqNum(rand.Uint64()), + cciptypes.SeqNum(rand.Uint64()), + ), + MerkleRoot: utils.RandomBytes32(), + }, + }, + PriceUpdates: cciptypes.PriceUpdates{ + TokenPriceUpdates: []cciptypes.TokenPrice{ + { + TokenID: types.Account(utils.RandomAddress().String()), + Price: cciptypes.NewBigInt(utils.RandUint256()), + }, + }, + GasPriceUpdates: []cciptypes.GasPriceChain{ + {GasPrice: cciptypes.NewBigInt(utils.RandUint256()), ChainSel: cciptypes.ChainSelector(rand.Uint64())}, + {GasPrice: cciptypes.NewBigInt(utils.RandUint256()), ChainSel: cciptypes.ChainSelector(rand.Uint64())}, + {GasPrice: cciptypes.NewBigInt(utils.RandUint256()), ChainSel: cciptypes.ChainSelector(rand.Uint64())}, + }, + }, + } +} + +func TestCommitPluginCodec(t *testing.T) { + testCases := []struct { + name string + report func(report cciptypes.CommitPluginReport) cciptypes.CommitPluginReport + expErr bool + }{ + { + name: "base report", + report: func(report cciptypes.CommitPluginReport) cciptypes.CommitPluginReport { + return report + }, + }, + { + name: "empty token address", + report: func(report cciptypes.CommitPluginReport) cciptypes.CommitPluginReport { + report.PriceUpdates.TokenPriceUpdates[0].TokenID = "" + return report + }, + expErr: true, + }, + { + name: "empty merkle root", + report: func(report cciptypes.CommitPluginReport) cciptypes.CommitPluginReport { + report.MerkleRoots[0].MerkleRoot = cciptypes.Bytes32{} + return report + }, + }, + { + name: "zero token price", + report: func(report cciptypes.CommitPluginReport) cciptypes.CommitPluginReport { + report.PriceUpdates.TokenPriceUpdates[0].Price = cciptypes.NewBigInt(big.NewInt(0)) + return report + }, + }, + { + name: "zero gas price", + report: func(report cciptypes.CommitPluginReport) cciptypes.CommitPluginReport { + report.PriceUpdates.GasPriceUpdates[0].GasPrice = cciptypes.NewBigInt(big.NewInt(0)) + return report + }, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + report := tc.report(randomReport()) + commitCodec := NewCommitPluginCodecV1() + ctx := testutils.Context(t) + encodedReport, err := commitCodec.Encode(ctx, report) + if tc.expErr { + assert.Error(t, err) + return + } + require.NoError(t, err) + decodedReport, err := commitCodec.Decode(ctx, encodedReport) + require.NoError(t, err) + require.Equal(t, report, decodedReport) + }) + } +} + +func BenchmarkCommitPluginCodec_Encode(b *testing.B) { + commitCodec := NewCommitPluginCodecV1() + ctx := testutils.Context(b) + + rep := randomReport() + for i := 0; i < b.N; i++ { + _, err := commitCodec.Encode(ctx, rep) + require.NoError(b, err) + } +} + +func BenchmarkCommitPluginCodec_Decode(b *testing.B) { + commitCodec := NewCommitPluginCodecV1() + ctx := testutils.Context(b) + encodedReport, err := commitCodec.Encode(ctx, randomReport()) + require.NoError(b, err) + + for i := 0; i < b.N; i++ { + _, err := commitCodec.Decode(ctx, encodedReport) + require.NoError(b, err) + } +} diff --git a/core/services/ocr3/plugins/ccipevm/msghasher.go b/core/services/ocr3/plugins/ccipevm/msghasher.go new file mode 100644 index 0000000000..948775a7be --- /dev/null +++ b/core/services/ocr3/plugins/ccipevm/msghasher.go @@ -0,0 +1,152 @@ +package ccipevm + +import ( + "context" + "encoding/hex" + "fmt" + "strings" + + cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" + + "github.com/ethereum/go-ethereum/common" + + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/evm_2_evm_multi_onramp" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/message_hasher" +) + +var ( + // bytes32 internal constant LEAF_DOMAIN_SEPARATOR = 0x0000000000000000000000000000000000000000000000000000000000000000; + leafDomainSeparator = [32]byte{} + + // bytes32 internal constant ANY_2_EVM_MESSAGE_HASH = keccak256("Any2EVMMessageHashV1"); + ANY_2_EVM_MESSAGE_HASH = utils.Keccak256Fixed([]byte("Any2EVMMessageHashV1")) + + messageHasherABI = types.MustGetABI(message_hasher.MessageHasherABI) +) + +// MessageHasherV1 implements the MessageHasher interface. +// Compatible with: +// - "EVM2EVMMultiOnRamp 1.6.0-dev" +type MessageHasherV1 struct { + // TODO: move these to CCIPMsg instead? + destChainSelector cciptypes.ChainSelector + onrampAddress []byte +} + +func NewMessageHasherV1( + onrampAddress []byte, + destChainSelector cciptypes.ChainSelector, +) *MessageHasherV1 { + return &MessageHasherV1{ + destChainSelector: destChainSelector, + onrampAddress: onrampAddress, + } +} + +// Hash implements the MessageHasher interface. +// It constructs all of the inputs to the final keccak256 hash in Internal._hash(Any2EVMRampMessage). +// The main structure of the hash is as follows: +/* + keccak256( + leafDomainSeparator, + keccak256(any_2_evm_message_hash, header.sourceChainSelector, header.destinationChainSelector, onRamp), + keccak256(fixedSizeMessageFields), + keccak256(messageData), + keccak256(encodedTokenAmounts), + keccak256(encodedSourceTokenData), + ) +*/ +func (h *MessageHasherV1) Hash(_ context.Context, msg cciptypes.CCIPMsg) (cciptypes.Bytes32, error) { + tokenAmounts := make([]evm_2_evm_multi_onramp.ClientEVMTokenAmount, len(msg.TokenAmounts)) + for i, ta := range msg.TokenAmounts { + tokenAmounts[i] = evm_2_evm_multi_onramp.ClientEVMTokenAmount{ + Token: common.HexToAddress(string(ta.Token)), + Amount: ta.Amount, + } + } + encodedTokens, err := h.abiEncode("encodeTokenAmountsHashPreimage", tokenAmounts) + if err != nil { + return [32]byte{}, fmt.Errorf("abi encode token amounts: %w", err) + } + + encodedSourceTokenData, err := h.abiEncode("encodeSourceTokenDataHashPreimage", msg.SourceTokenData) + if err != nil { + return [32]byte{}, fmt.Errorf("pack source token data: %w", err) + } + + metaDataHashInput, err := h.abiEncode( + "encodeMetadataHashPreimage", + ANY_2_EVM_MESSAGE_HASH, + uint64(msg.SourceChain), + uint64(h.destChainSelector), + h.onrampAddress, + ) + if err != nil { + return [32]byte{}, fmt.Errorf("abi encode metadata hash input: %w", err) + } + + var msgID [32]byte + decoded, err := hex.DecodeString(msg.ID) + if err != nil { + return [32]byte{}, fmt.Errorf("decode message ID: %w", err) + } + if len(decoded) != 32 { + return [32]byte{}, fmt.Errorf("message ID must be 32 bytes") + } + copy(msgID[:], decoded) + + // NOTE: msg.Sender is not necessarily an EVM address since this is Any2EVM. + // Accordingly, sender is defined as "bytes" in the onchain message definition + // rather than "address". + // However, its not clear how best to translate from Sender being a string representation + // to bytes. For now, we assume that the string is hex encoded, but ideally Sender would + // just be a byte array in the CCIPMsg struct that represents a sender encoded in the + // source chain family encoding scheme. + decodedSender, err := hex.DecodeString( + strings.TrimPrefix(string(msg.Sender), "0x"), + ) + if err != nil { + return [32]byte{}, fmt.Errorf("decode sender '%s': %w", msg.Sender, err) + } + fixedSizeFieldsEncoded, err := h.abiEncode( + "encodeFixedSizeFieldsHashPreimage", + msgID, + decodedSender, + common.HexToAddress(string(msg.Receiver)), + uint64(msg.SeqNum), + msg.ChainFeeLimit.Int, + msg.Nonce, + ) + if err != nil { + return [32]byte{}, fmt.Errorf("abi encode fixed size values: %w", err) + } + + packedValues, err := h.abiEncode( + "encodeFinalHashPreimage", + leafDomainSeparator, + utils.Keccak256Fixed(metaDataHashInput), + utils.Keccak256Fixed(fixedSizeFieldsEncoded), + utils.Keccak256Fixed(msg.Data), + utils.Keccak256Fixed(encodedTokens), + utils.Keccak256Fixed(encodedSourceTokenData), + ) + if err != nil { + return [32]byte{}, fmt.Errorf("abi encode packed values: %w", err) + } + + return utils.Keccak256Fixed(packedValues), nil +} + +func (h *MessageHasherV1) abiEncode(method string, values ...interface{}) ([]byte, error) { + res, err := messageHasherABI.Pack(method, values...) + if err != nil { + return nil, err + } + // trim the method selector. + return res[4:], nil +} + +// Interface compliance check +var _ cciptypes.MessageHasher = (*MessageHasherV1)(nil) diff --git a/core/services/ocr3/plugins/ccipevm/msghasher_test.go b/core/services/ocr3/plugins/ccipevm/msghasher_test.go new file mode 100644 index 0000000000..0bdf2c04b9 --- /dev/null +++ b/core/services/ocr3/plugins/ccipevm/msghasher_test.go @@ -0,0 +1,168 @@ +package ccipevm + +import ( + "context" + cryptorand "crypto/rand" + "encoding/hex" + "fmt" + "math/big" + "math/rand" + "strings" + "testing" + + "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" + + cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" + + "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/message_hasher" + "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" + + "github.com/stretchr/testify/require" +) + +func TestMessageHasher_e2e(t *testing.T) { + ctx := testutils.Context(t) + d := testSetup(t) + + // low budget "fuzz" test. + // TODO: should actually write a real fuzz test. + for i := 0; i < 5; i++ { + testHasher(ctx, t, d) + } +} + +func testHasher(ctx context.Context, t *testing.T, d *testSetupData) { + destChainSelector := rand.Uint64() + onRampAddress := testutils.NewAddress().Bytes() + ccipMsg := createCCIPMsg(t) + + evmTokenAmounts := make([]message_hasher.ClientEVMTokenAmount, 0, len(ccipMsg.TokenAmounts)) + for _, ta := range ccipMsg.TokenAmounts { + evmTokenAmounts = append(evmTokenAmounts, message_hasher.ClientEVMTokenAmount{ + Token: common.HexToAddress(string(ta.Token)), + Amount: ta.Amount, + }) + } + evmMsg := message_hasher.InternalAny2EVMRampMessage{ + Header: message_hasher.InternalRampMessageHeader{ + MessageId: mustMessageID(t, ccipMsg.ID), + SourceChainSelector: uint64(ccipMsg.SourceChain), + DestChainSelector: destChainSelector, + SequenceNumber: uint64(ccipMsg.SeqNum), + Nonce: ccipMsg.Nonce, + }, + Sender: common.HexToAddress(string(ccipMsg.Sender)).Bytes(), + Receiver: common.HexToAddress(string(ccipMsg.Receiver)), + GasLimit: ccipMsg.ChainFeeLimit.Int, + Data: ccipMsg.Data, + TokenAmounts: evmTokenAmounts, + SourceTokenData: ccipMsg.SourceTokenData, + } + + expectedHash, err := d.contract.Hash(&bind.CallOpts{Context: ctx}, evmMsg, onRampAddress) + require.NoError(t, err) + + evmMsgHasher := NewMessageHasherV1(onRampAddress, cciptypes.ChainSelector(destChainSelector)) + actualHash, err := evmMsgHasher.Hash(ctx, ccipMsg) + require.NoError(t, err) + + require.Equal(t, fmt.Sprintf("%x", expectedHash), strings.TrimPrefix(actualHash.String(), "0x")) +} + +// TODO: fix this once messageID is part of CCIPMsg +func createCCIPMsg(t *testing.T) cciptypes.CCIPMsg { + // Setup random msg data + messageID := utils.RandomBytes32() + + sourceTokenData := make([]byte, rand.Intn(2048)) + _, err := cryptorand.Read(sourceTokenData) + require.NoError(t, err) + + sourceChain := rand.Uint64() + seqNum := rand.Uint64() + chainFeeLimit := rand.Uint64() + nonce := rand.Uint64() + + messageData := make([]byte, rand.Intn(2048)) + _, err = cryptorand.Read(messageData) + require.NoError(t, err) + + sourceTokenDatas := make([][]byte, rand.Intn(10)) + for i := range sourceTokenDatas { + sourceTokenDatas[i] = sourceTokenData + } + + numTokenAmounts := rand.Intn(50) + tokenAmounts := make([]cciptypes.TokenAmount, 0, numTokenAmounts) + for i := 0; i < numTokenAmounts; i++ { + tokenAmounts = append(tokenAmounts, cciptypes.TokenAmount{ + Token: types.Account(utils.RandomAddress().String()), + Amount: big.NewInt(0).SetUint64(rand.Uint64()), + }) + } + return cciptypes.CCIPMsg{ + CCIPMsgBaseDetails: cciptypes.CCIPMsgBaseDetails{ + ID: hex.EncodeToString(messageID[:]), + SourceChain: cciptypes.ChainSelector(sourceChain), + SeqNum: cciptypes.SeqNum(seqNum), + }, + ChainFeeLimit: cciptypes.NewBigInt(big.NewInt(0).SetUint64(chainFeeLimit)), + Nonce: nonce, + Sender: types.Account(utils.RandomAddress().String()), + Receiver: types.Account(utils.RandomAddress().String()), + // TODO: remove this field if not needed, not used by the hasher + // Strict: strict, + // NOTE: not used by the hasher + // FeeToken: types.Account(utils.RandomAddress().String()), + // FeeTokenAmount: cciptypes.NewBigInt(big.NewInt(0).SetUint64(feeTokenAmount)), + Data: messageData, + TokenAmounts: tokenAmounts, + SourceTokenData: sourceTokenDatas, + } +} + +func mustMessageID(t *testing.T, msgIDHex string) [32]byte { + msgID, err := hex.DecodeString(msgIDHex) + require.NoError(t, err) + require.Len(t, msgID, 32) + var msgID32 [32]byte + copy(msgID32[:], msgID) + return msgID32 +} + +type testSetupData struct { + contractAddr common.Address + contract *message_hasher.MessageHasher + sb *backends.SimulatedBackend + auth *bind.TransactOpts +} + +func testSetup(t *testing.T) *testSetupData { + transactor := testutils.MustNewSimTransactor(t) + simulatedBackend := backends.NewSimulatedBackend(core.GenesisAlloc{ + transactor.From: {Balance: assets.Ether(1000).ToInt()}, + }, 30e6) + + // Deploy the contract + address, _, _, err := message_hasher.DeployMessageHasher(transactor, simulatedBackend) + require.NoError(t, err) + simulatedBackend.Commit() + + // Setup contract client + contract, err := message_hasher.NewMessageHasher(address, simulatedBackend) + require.NoError(t, err) + + return &testSetupData{ + contractAddr: address, + contract: contract, + sb: simulatedBackend, + auth: transactor, + } +} diff --git a/core/services/relay/evm/ccip.go b/core/services/relay/evm/ccip.go deleted file mode 100644 index ec2ff2c8b7..0000000000 --- a/core/services/relay/evm/ccip.go +++ /dev/null @@ -1,137 +0,0 @@ -package evm - -import ( - "bytes" - "context" - "crypto/sha256" - "math/big" - - "github.com/ethereum/go-ethereum/common" - "github.com/google/uuid" - ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2/types" - - commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" - - "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm" - "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/ccipcommit" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/ccipexec" - ccipconfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/config" - "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" -) - -// CCIPCommitProvider provides all components needed for a CCIP Relay OCR2 plugin. -type CCIPCommitProvider interface { - commontypes.Plugin -} - -// CCIPExecutionProvider provides all components needed for a CCIP Execution OCR2 plugin. -type CCIPExecutionProvider interface { - commontypes.Plugin -} - -type ccipCommitProvider struct { - *configWatcher - contractTransmitter *contractTransmitter -} - -func chainToUUID(chainID *big.Int) uuid.UUID { - // See https://www.rfc-editor.org/rfc/rfc4122.html#section-4.1.3 for the list of supported versions. - const VersionSHA1 = 5 - var buf bytes.Buffer - buf.WriteString("CCIP:") - buf.Write(chainID.Bytes()) - // We use SHA-256 instead of SHA-1 because the former has better collision resistance. - // The UUID will contain only the first 16 bytes of the hash. - // You can't say which algorithms was used just by looking at the UUID bytes. - return uuid.NewHash(sha256.New(), uuid.NameSpaceOID, buf.Bytes(), VersionSHA1) -} - -func NewCCIPCommitProvider(ctx context.Context, lggr logger.Logger, chainSet legacyevm.Chain, rargs commontypes.RelayArgs, transmitterID string, ks keystore.Eth) (CCIPCommitProvider, error) { - relayOpts := types.NewRelayOpts(rargs) - configWatcher, err := newStandardConfigProvider(ctx, lggr, chainSet, relayOpts) - if err != nil { - return nil, err - } - address := common.HexToAddress(relayOpts.ContractID) - typ, ver, err := ccipconfig.TypeAndVersion(address, chainSet.Client()) - if err != nil { - return nil, err - } - fn, err := ccipcommit.CommitReportToEthTxMeta(typ, ver) - if err != nil { - return nil, err - } - subjectID := chainToUUID(configWatcher.chain.ID()) - contractTransmitter, err := newOnChainContractTransmitter(ctx, lggr, rargs, transmitterID, ks, configWatcher, configTransmitterOpts{ - subjectID: &subjectID, - }, OCR2AggregatorTransmissionContractABI, fn, 0) - if err != nil { - return nil, err - } - return &ccipCommitProvider{ - configWatcher: configWatcher, - contractTransmitter: contractTransmitter, - }, nil -} - -func (c *ccipCommitProvider) ContractTransmitter() ocrtypes.ContractTransmitter { - return c.contractTransmitter -} - -func (c *ccipCommitProvider) ChainReader() commontypes.ContractReader { - return nil -} - -func (c *ccipCommitProvider) Codec() commontypes.Codec { - return nil -} - -type ccipExecutionProvider struct { - *configWatcher - contractTransmitter *contractTransmitter -} - -var _ commontypes.Plugin = (*ccipExecutionProvider)(nil) - -func NewCCIPExecutionProvider(ctx context.Context, lggr logger.Logger, chainSet legacyevm.Chain, rargs commontypes.RelayArgs, transmitterID string, ks keystore.Eth) (CCIPExecutionProvider, error) { - relayOpts := types.NewRelayOpts(rargs) - - configWatcher, err := newStandardConfigProvider(ctx, lggr, chainSet, relayOpts) - if err != nil { - return nil, err - } - address := common.HexToAddress(relayOpts.ContractID) - typ, ver, err := ccipconfig.TypeAndVersion(address, chainSet.Client()) - if err != nil { - return nil, err - } - fn, err := ccipexec.ExecReportToEthTxMeta(ctx, typ, ver) - if err != nil { - return nil, err - } - subjectID := chainToUUID(configWatcher.chain.ID()) - contractTransmitter, err := newOnChainContractTransmitter(ctx, lggr, rargs, transmitterID, ks, configWatcher, configTransmitterOpts{ - subjectID: &subjectID, - }, OCR2AggregatorTransmissionContractABI, fn, 0) - if err != nil { - return nil, err - } - return &ccipExecutionProvider{ - configWatcher: configWatcher, - contractTransmitter: contractTransmitter, - }, nil -} - -func (c *ccipExecutionProvider) ContractTransmitter() ocrtypes.ContractTransmitter { - return c.contractTransmitter -} - -func (c *ccipExecutionProvider) ChainReader() commontypes.ContractReader { - return nil -} - -func (c *ccipExecutionProvider) Codec() commontypes.Codec { - return nil -} diff --git a/core/services/relay/evm/chain_reader.go b/core/services/relay/evm/chain_reader.go index 9cfe846d55..8bc9b55cee 100644 --- a/core/services/relay/evm/chain_reader.go +++ b/core/services/relay/evm/chain_reader.go @@ -10,10 +10,11 @@ import ( "sync" "time" + "github.com/smartcontractkit/chainlink-common/pkg/types/query" + "github.com/ethereum/go-ethereum/accounts/abi" "github.com/smartcontractkit/chainlink-common/pkg/codec" - "github.com/smartcontractkit/chainlink-common/pkg/types/query" "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" commonservices "github.com/smartcontractkit/chainlink-common/pkg/services" diff --git a/core/services/relay/evm/commit_provider.go b/core/services/relay/evm/commit_provider.go new file mode 100644 index 0000000000..cccf6b0276 --- /dev/null +++ b/core/services/relay/evm/commit_provider.go @@ -0,0 +1,239 @@ +package evm + +import ( + "context" + "fmt" + "math/big" + + "github.com/ethereum/go-ethereum/accounts/abi/bind" + ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + + commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" + cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/gas" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router" + "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip" +) + +var _ commontypes.CCIPCommitProvider = (*SrcCommitProvider)(nil) +var _ commontypes.CCIPCommitProvider = (*DstCommitProvider)(nil) + +type SrcCommitProvider struct { + lggr logger.Logger + startBlock uint64 + client client.Client + lp logpoller.LogPoller +} + +func NewSrcCommitProvider( + lggr logger.Logger, + startBlock uint64, + client client.Client, + lp logpoller.LogPoller, +) commontypes.CCIPCommitProvider { + return &SrcCommitProvider{ + lggr: lggr, + startBlock: startBlock, + client: client, + lp: lp, + } +} + +type DstCommitProvider struct { + lggr logger.Logger + versionFinder ccip.VersionFinder + startBlock uint64 + client client.Client + lp logpoller.LogPoller + contractTransmitter *contractTransmitter + configWatcher *configWatcher + gasEstimator gas.EvmFeeEstimator + maxGasPrice big.Int +} + +func NewDstCommitProvider( + lggr logger.Logger, + versionFinder ccip.VersionFinder, + startBlock uint64, + client client.Client, + lp logpoller.LogPoller, + gasEstimator gas.EvmFeeEstimator, + maxGasPrice big.Int, + contractTransmitter contractTransmitter, + configWatcher *configWatcher, +) commontypes.CCIPCommitProvider { + return &DstCommitProvider{ + lggr: lggr, + versionFinder: versionFinder, + startBlock: startBlock, + client: client, + lp: lp, + contractTransmitter: &contractTransmitter, + configWatcher: configWatcher, + gasEstimator: gasEstimator, + maxGasPrice: maxGasPrice, + } +} + +func (P SrcCommitProvider) Name() string { + return "CCIPCommitProvider.SrcRelayerProvider" +} + +func (P SrcCommitProvider) Close() error { + return nil +} + +func (P SrcCommitProvider) Ready() error { + return nil +} + +func (P SrcCommitProvider) HealthReport() map[string]error { + return make(map[string]error) +} + +func (P SrcCommitProvider) OffchainConfigDigester() ocrtypes.OffchainConfigDigester { + // TODO CCIP-2494 + // "OffchainConfigDigester called on SrcCommitProvider. Valid on DstCommitProvider." + return UnimplementedOffchainConfigDigester{} +} + +func (P SrcCommitProvider) ContractConfigTracker() ocrtypes.ContractConfigTracker { + // // TODO CCIP-2494 + // "ContractConfigTracker called on SrcCommitProvider. Valid on DstCommitProvider.") + return UnimplementedContractConfigTracker{} +} + +func (P SrcCommitProvider) ContractTransmitter() ocrtypes.ContractTransmitter { + // // TODO CCIP-2494 + // "ContractTransmitter called on SrcCommitProvider. Valid on DstCommitProvider." + return UnimplementedContractTransmitter{} +} + +func (P SrcCommitProvider) ChainReader() commontypes.ContractReader { + return nil +} + +func (P SrcCommitProvider) Codec() commontypes.Codec { + return nil +} + +func (P DstCommitProvider) Name() string { + return "CCIPCommitProvider.DstRelayerProvider" +} + +func (P DstCommitProvider) Close() error { + return nil +} + +func (P DstCommitProvider) Ready() error { + return nil +} + +func (P DstCommitProvider) HealthReport() map[string]error { + return make(map[string]error) +} + +func (P DstCommitProvider) OffchainConfigDigester() ocrtypes.OffchainConfigDigester { + return P.configWatcher.OffchainConfigDigester() +} + +func (P DstCommitProvider) ContractConfigTracker() ocrtypes.ContractConfigTracker { + return P.configWatcher.ContractConfigTracker() +} + +func (P DstCommitProvider) ContractTransmitter() ocrtypes.ContractTransmitter { + return P.contractTransmitter +} + +func (P DstCommitProvider) ChainReader() commontypes.ContractReader { + return nil +} + +func (P DstCommitProvider) Codec() commontypes.Codec { + return nil +} + +func (P SrcCommitProvider) Start(ctx context.Context) error { + if P.startBlock != 0 { + P.lggr.Infow("start replaying src chain", "fromBlock", P.startBlock) + return P.lp.Replay(ctx, int64(P.startBlock)) + } + return nil +} + +func (P DstCommitProvider) Start(ctx context.Context) error { + if P.startBlock != 0 { + P.lggr.Infow("start replaying dst chain", "fromBlock", P.startBlock) + return P.lp.Replay(ctx, int64(P.startBlock)) + } + return nil +} + +func (P SrcCommitProvider) NewPriceGetter(ctx context.Context) (priceGetter cciptypes.PriceGetter, err error) { + return nil, fmt.Errorf("can't construct a price getter from one relayer") +} + +func (P DstCommitProvider) NewPriceGetter(ctx context.Context) (priceGetter cciptypes.PriceGetter, err error) { + return nil, fmt.Errorf("can't construct a price getter from one relayer") +} + +func (P SrcCommitProvider) NewCommitStoreReader(ctx context.Context, commitStoreAddress cciptypes.Address) (commitStoreReader cciptypes.CommitStoreReader, err error) { + return nil, fmt.Errorf("can't construct a commit store reader from one relayer") +} + +func (P DstCommitProvider) NewCommitStoreReader(ctx context.Context, commitStoreAddress cciptypes.Address) (commitStoreReader cciptypes.CommitStoreReader, err error) { + return nil, fmt.Errorf("can't construct a commit store reader from one relayer") +} + +func (P SrcCommitProvider) NewOnRampReader(ctx context.Context, onRampAddress cciptypes.Address, sourceChainSelector uint64, destChainSelector uint64) (onRampReader cciptypes.OnRampReader, err error) { + versionFinder := ccip.NewEvmVersionFinder() + onRampReader, err = ccip.NewOnRampReader(P.lggr, versionFinder, sourceChainSelector, destChainSelector, onRampAddress, P.lp, P.client) + return +} + +func (P DstCommitProvider) NewOnRampReader(ctx context.Context, onRampAddress cciptypes.Address, sourceChainSelector uint64, destChainSelector uint64) (onRampReader cciptypes.OnRampReader, err error) { + return nil, fmt.Errorf("invalid: NewOnRampReader called for DstCommitProvider.NewOnRampReader should be called on SrcCommitProvider") +} + +func (P SrcCommitProvider) NewOffRampReader(ctx context.Context, offRampAddr cciptypes.Address) (offRampReader cciptypes.OffRampReader, err error) { + return nil, fmt.Errorf("invalid: NewOffRampReader called for SrcCommitProvider. NewOffRampReader should be called on DstCommitProvider") +} + +func (P DstCommitProvider) NewOffRampReader(ctx context.Context, offRampAddr cciptypes.Address) (offRampReader cciptypes.OffRampReader, err error) { + offRampReader, err = ccip.NewOffRampReader(P.lggr, P.versionFinder, offRampAddr, P.client, P.lp, P.gasEstimator, &P.maxGasPrice, true) + return +} + +func (P SrcCommitProvider) NewPriceRegistryReader(ctx context.Context, addr cciptypes.Address) (priceRegistryReader cciptypes.PriceRegistryReader, err error) { + return nil, fmt.Errorf("invalid: NewPriceRegistryReader called for SrcCommitProvider. NewOffRampReader should be called on DstCommitProvider") +} + +func (P DstCommitProvider) NewPriceRegistryReader(ctx context.Context, addr cciptypes.Address) (priceRegistryReader cciptypes.PriceRegistryReader, err error) { + destPriceRegistry := ccip.NewEvmPriceRegistry(P.lp, P.client, P.lggr, ccip.CommitPluginLabel) + priceRegistryReader, err = destPriceRegistry.NewPriceRegistryReader(ctx, addr) + return +} + +func (P SrcCommitProvider) SourceNativeToken(ctx context.Context, sourceRouterAddr cciptypes.Address) (cciptypes.Address, error) { + sourceRouterAddrHex, err := ccip.GenericAddrToEvm(sourceRouterAddr) + if err != nil { + return "", err + } + sourceRouter, err := router.NewRouter(sourceRouterAddrHex, P.client) + if err != nil { + return "", err + } + sourceNative, err := sourceRouter.GetWrappedNative(&bind.CallOpts{Context: ctx}) + if err != nil { + return "", err + } + + return ccip.EvmAddrToGeneric(sourceNative), nil +} + +func (P DstCommitProvider) SourceNativeToken(ctx context.Context, sourceRouterAddr cciptypes.Address) (cciptypes.Address, error) { + return "", fmt.Errorf("invalid: SourceNativeToken called for DstCommitProvider. SourceNativeToken should be called on SrcCommitProvider") +} diff --git a/core/services/relay/evm/evm.go b/core/services/relay/evm/evm.go index 90b4abca2c..7203c142f2 100644 --- a/core/services/relay/evm/evm.go +++ b/core/services/relay/evm/evm.go @@ -1,14 +1,22 @@ package evm import ( + "bytes" "context" + "crypto/sha256" "encoding/json" "errors" "fmt" + "math/big" "strings" "sync" "time" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/ccipcommit" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/ccipexec" + ccipconfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/config" + "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" "github.com/google/uuid" @@ -72,6 +80,57 @@ func init() { var _ commontypes.Relayer = &Relayer{} //nolint:staticcheck +// The current PluginProvider interface does not support an error return. This was fine up until CCIP. +// CCIP is the first product to introduce the idea of incomplete implementations of a provider based on +// what chain (for CCIP, src or dest) the provider is created for. The Unimplemented* implementations below allow us to return +// a non nil value, which is hopefully a better developer experience should you find yourself using the right methods +// but on the *wrong* provider. + +// [UnimplementedOffchainConfigDigester] satisfies the OCR OffchainConfigDigester interface +type UnimplementedOffchainConfigDigester struct{} + +func (e UnimplementedOffchainConfigDigester) ConfigDigest(config ocrtypes.ContractConfig) (ocrtypes.ConfigDigest, error) { + return ocrtypes.ConfigDigest{}, fmt.Errorf("unimplemented for this relayer") +} + +func (e UnimplementedOffchainConfigDigester) ConfigDigestPrefix() (ocrtypes.ConfigDigestPrefix, error) { + return 0, fmt.Errorf("unimplemented for this relayer") +} + +// [UnimplementedContractConfigTracker] satisfies the OCR ContractConfigTracker interface +type UnimplementedContractConfigTracker struct{} + +func (u UnimplementedContractConfigTracker) Notify() <-chan struct{} { + return nil +} + +func (u UnimplementedContractConfigTracker) LatestConfigDetails(ctx context.Context) (changedInBlock uint64, configDigest ocrtypes.ConfigDigest, err error) { + return 0, ocrtypes.ConfigDigest{}, fmt.Errorf("unimplemented for this relayer") +} + +func (u UnimplementedContractConfigTracker) LatestConfig(ctx context.Context, changedInBlock uint64) (ocrtypes.ContractConfig, error) { + return ocrtypes.ContractConfig{}, fmt.Errorf("unimplemented for this relayer") +} + +func (u UnimplementedContractConfigTracker) LatestBlockHeight(ctx context.Context) (blockHeight uint64, err error) { + return 0, fmt.Errorf("unimplemented for this relayer") +} + +// [UnimplementedContractTransmitter] satisfies the OCR ContractTransmitter interface +type UnimplementedContractTransmitter struct{} + +func (u UnimplementedContractTransmitter) Transmit(context.Context, ocrtypes.ReportContext, ocrtypes.Report, []ocrtypes.AttributedOnchainSignature) error { + return fmt.Errorf("unimplemented for this relayer") +} + +func (u UnimplementedContractTransmitter) FromAccount() (ocrtypes.Account, error) { + return "", fmt.Errorf("unimplemented for this relayer") +} + +func (u UnimplementedContractTransmitter) LatestConfigDigestAndEpoch(ctx context.Context) (configDigest ocrtypes.ConfigDigest, epoch uint32, err error) { + return ocrtypes.ConfigDigest{}, 0, fmt.Errorf("unimplemented for this relayer") +} + type Relayer struct { ds sqlutil.DataSource chain legacyevm.Chain @@ -216,7 +275,7 @@ func (r *Relayer) NewPluginProvider(rargs commontypes.RelayArgs, pargs commontyp return nil, err } - transmitter, err := newOnChainContractTransmitter(ctx, r.lggr, rargs, pargs.TransmitterID, r.ks.Eth(), configWatcher, configTransmitterOpts{}, OCR2AggregatorTransmissionContractABI, nil, 0) + transmitter, err := newOnChainContractTransmitter(ctx, r.lggr, rargs, r.ks.Eth(), configWatcher, configTransmitterOpts{}, OCR2AggregatorTransmissionContractABI, nil, 0) if err != nil { return nil, err } @@ -314,6 +373,154 @@ func (r *Relayer) NewMercuryProvider(rargs commontypes.RelayArgs, pargs commonty return NewMercuryProvider(cp, r.chainReader, r.codec, NewMercuryChainReader(r.chain.HeadTracker()), transmitter, reportCodecV1, reportCodecV2, reportCodecV3, lggr), nil } +func chainToUUID(chainID *big.Int) uuid.UUID { + // See https://www.rfc-editor.org/rfc/rfc4122.html#section-4.1.3 for the list of supported versions. + const VersionSHA1 = 5 + var buf bytes.Buffer + buf.WriteString("CCIP:") + buf.Write(chainID.Bytes()) + // We use SHA-256 instead of SHA-1 because the former has better collision resistance. + // The UUID will contain only the first 16 bytes of the hash. + // You can't say which algorithms was used just by looking at the UUID bytes. + return uuid.NewHash(sha256.New(), uuid.NameSpaceOID, buf.Bytes(), VersionSHA1) +} + +// NewCCIPCommitProvider constructs a provider of type CCIPCommitProvider. Since this is happening in the Relayer, +// which lives in a separate process from delegate which is requesting a provider, we need to wire in through pargs +// which *type* (impl) of CCIPCommitProvider should be created. CCIP is currently a special case where the provider has a +// subset of implementations of the complete interface as certain contracts in a CCIP lane are only deployed on the src +// chain or on the dst chain. This results in the two implementations of providers: a src and dst implementation. +func (r *Relayer) NewCCIPCommitProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.CCIPCommitProvider, error) { + // TODO https://smartcontract-it.atlassian.net/browse/BCF-2887 + ctx := context.Background() + + versionFinder := ccip.NewEvmVersionFinder() + + var commitPluginConfig ccipconfig.CommitPluginConfig + err := json.Unmarshal(pargs.PluginConfig, &commitPluginConfig) + if err != nil { + return nil, err + } + sourceStartBlock := commitPluginConfig.SourceStartBlock + destStartBlock := commitPluginConfig.DestStartBlock + + // The src chain implementation of this provider does not need a configWatcher or contractTransmitter; + // bail early. + if commitPluginConfig.IsSourceProvider { + return NewSrcCommitProvider( + r.lggr, + sourceStartBlock, + r.chain.Client(), + r.chain.LogPoller(), + ), nil + } + + relayOpts := types.NewRelayOpts(rargs) + configWatcher, err := newStandardConfigProvider(ctx, r.lggr, r.chain, relayOpts) + if err != nil { + return nil, err + } + address := common.HexToAddress(relayOpts.ContractID) + typ, ver, err := ccipconfig.TypeAndVersion(address, r.chain.Client()) + if err != nil { + return nil, err + } + fn, err := ccipcommit.CommitReportToEthTxMeta(typ, ver) + if err != nil { + return nil, err + } + subjectID := chainToUUID(configWatcher.chain.ID()) + contractTransmitter, err := newOnChainContractTransmitter(ctx, r.lggr, rargs, r.ks.Eth(), configWatcher, configTransmitterOpts{ + subjectID: &subjectID, + }, OCR2AggregatorTransmissionContractABI, fn, 0) + if err != nil { + return nil, err + } + + return NewDstCommitProvider( + r.lggr, + versionFinder, + destStartBlock, + r.chain.Client(), + r.chain.LogPoller(), + r.chain.GasEstimator(), + *r.chain.Config().EVM().GasEstimator().PriceMax().ToInt(), + *contractTransmitter, + configWatcher, + ), nil +} + +// NewCCIPExecProvider constructs a provider of type CCIPExecProvider. Since this is happening in the Relayer, +// which lives in a separate process from delegate which is requesting a provider, we need to wire in through pargs +// which *type* (impl) of CCIPExecProvider should be created. CCIP is currently a special case where the provider has a +// subset of implementations of the complete interface as certain contracts in a CCIP lane are only deployed on the src +// chain or on the dst chain. This results in the two implementations of providers: a src and dst implementation. +func (r *Relayer) NewCCIPExecProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.CCIPExecProvider, error) { + // TODO https://smartcontract-it.atlassian.net/browse/BCF-2887 + ctx := context.Background() + + versionFinder := ccip.NewEvmVersionFinder() + + var execPluginConfig ccipconfig.ExecPluginConfig + err := json.Unmarshal(pargs.PluginConfig, &execPluginConfig) + if err != nil { + return nil, err + } + + usdcConfig := execPluginConfig.USDCConfig + + // The src chain implementation of this provider does not need a configWatcher or contractTransmitter; + // bail early. + if execPluginConfig.IsSourceProvider { + return NewSrcExecProvider( + r.lggr, + versionFinder, + r.chain.Client(), + r.chain.LogPoller(), + execPluginConfig.SourceStartBlock, + execPluginConfig.JobID, + usdcConfig.AttestationAPI, + int(usdcConfig.AttestationAPITimeoutSeconds), + usdcConfig.AttestationAPIIntervalMilliseconds, + usdcConfig.SourceMessageTransmitterAddress, + ) + } + + relayOpts := types.NewRelayOpts(rargs) + configWatcher, err := newStandardConfigProvider(ctx, r.lggr, r.chain, relayOpts) + if err != nil { + return nil, err + } + address := common.HexToAddress(relayOpts.ContractID) + typ, ver, err := ccipconfig.TypeAndVersion(address, r.chain.Client()) + if err != nil { + return nil, err + } + fn, err := ccipexec.ExecReportToEthTxMeta(ctx, typ, ver) + if err != nil { + return nil, err + } + subjectID := chainToUUID(configWatcher.chain.ID()) + contractTransmitter, err := newOnChainContractTransmitter(ctx, r.lggr, rargs, r.ks.Eth(), configWatcher, configTransmitterOpts{ + subjectID: &subjectID, + }, OCR2AggregatorTransmissionContractABI, fn, 0) + if err != nil { + return nil, err + } + + return NewDstExecProvider( + r.lggr, + versionFinder, + r.chain.Client(), + r.chain.LogPoller(), + execPluginConfig.DestStartBlock, + contractTransmitter, + configWatcher, + r.chain.GasEstimator(), + *r.chain.Config().EVM().GasEstimator().PriceMax().ToInt(), + ) +} + func (r *Relayer) NewLLOProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.LLOProvider, error) { // TODO https://smartcontract-it.atlassian.net/browse/BCF-2887 ctx := context.Background() @@ -532,7 +739,7 @@ type configTransmitterOpts struct { } // newOnChainContractTransmitter creates a new contract transmitter. -func newOnChainContractTransmitter(ctx context.Context, lggr logger.Logger, rargs commontypes.RelayArgs, transmitterID string, ethKeystore keystore.Eth, configWatcher *configWatcher, opts configTransmitterOpts, transmissionContractABI abi.ABI, reportToEvmTxMeta ReportToEthMetadata, transmissionContractRetention time.Duration) (*contractTransmitter, error) { +func newOnChainContractTransmitter(ctx context.Context, lggr logger.Logger, rargs commontypes.RelayArgs, ethKeystore keystore.Eth, configWatcher *configWatcher, opts configTransmitterOpts, transmissionContractABI abi.ABI, reportToEvmTxMeta ReportToEthMetadata, transmissionContractRetention time.Duration) (*contractTransmitter, error) { var relayConfig types.RelayConfig if err := json.Unmarshal(rargs.RelayConfig, &relayConfig); err != nil { return nil, err @@ -662,7 +869,7 @@ func (r *Relayer) NewMedianProvider(rargs commontypes.RelayArgs, pargs commontyp reportCodec := evmreportcodec.ReportCodec{} - contractTransmitter, err := newOnChainContractTransmitter(ctx, lggr, rargs, pargs.TransmitterID, r.ks.Eth(), configWatcher, configTransmitterOpts{}, OCR2AggregatorTransmissionContractABI, nil, 0) + contractTransmitter, err := newOnChainContractTransmitter(ctx, lggr, rargs, r.ks.Eth(), configWatcher, configTransmitterOpts{}, OCR2AggregatorTransmissionContractABI, nil, 0) if err != nil { return nil, err } diff --git a/core/services/relay/evm/exec_provider.go b/core/services/relay/evm/exec_provider.go new file mode 100644 index 0000000000..757ca3a498 --- /dev/null +++ b/core/services/relay/evm/exec_provider.go @@ -0,0 +1,307 @@ +package evm + +import ( + "context" + "fmt" + "math/big" + "net/url" + "time" + + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + + commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" + cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/gas" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router" + "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/tokendata/usdc" +) + +type SrcExecProvider struct { + lggr logger.Logger + versionFinder ccip.VersionFinder + client client.Client + lp logpoller.LogPoller + startBlock uint64 + usdcReader *ccip.USDCReaderImpl + usdcAttestationAPI string + usdcAttestationAPITimeoutSeconds int + usdcAttestationAPIIntervalMilliseconds int + usdcSrcMsgTransmitterAddr common.Address +} + +func NewSrcExecProvider( + lggr logger.Logger, + versionFinder ccip.VersionFinder, + client client.Client, + lp logpoller.LogPoller, + startBlock uint64, + jobID string, + usdcAttestationAPI string, + usdcAttestationAPITimeoutSeconds int, + usdcAttestationAPIIntervalMilliseconds int, + usdcSrcMsgTransmitterAddr common.Address, +) (commontypes.CCIPExecProvider, error) { + var usdcReader *ccip.USDCReaderImpl + var err error + if usdcAttestationAPI != "" { + usdcReader, err = ccip.NewUSDCReader(lggr, jobID, usdcSrcMsgTransmitterAddr, lp, true) + if err != nil { + return nil, fmt.Errorf("new usdc reader: %w", err) + } + } + + return &SrcExecProvider{ + lggr: lggr, + versionFinder: versionFinder, + client: client, + lp: lp, + startBlock: startBlock, + usdcReader: usdcReader, + usdcAttestationAPI: usdcAttestationAPI, + usdcAttestationAPITimeoutSeconds: usdcAttestationAPITimeoutSeconds, + usdcAttestationAPIIntervalMilliseconds: usdcAttestationAPIIntervalMilliseconds, + usdcSrcMsgTransmitterAddr: usdcSrcMsgTransmitterAddr, + }, nil +} + +func (s SrcExecProvider) Name() string { + return "CCIP.SrcExecProvider" +} + +func (s SrcExecProvider) Start(ctx context.Context) error { + if s.startBlock != 0 { + s.lggr.Infow("start replaying src chain", "fromBlock", s.startBlock) + return s.lp.Replay(ctx, int64(s.startBlock)) + } + return nil +} + +func (s SrcExecProvider) Close() error { + return nil +} + +func (s SrcExecProvider) Ready() error { + return nil +} + +func (s SrcExecProvider) HealthReport() map[string]error { + return make(map[string]error) +} + +func (s SrcExecProvider) OffchainConfigDigester() ocrtypes.OffchainConfigDigester { + // TODO CCIP-2494 + // OffchainConfigDigester called on SrcExecProvider. It should only be called on DstExecProvider + return UnimplementedOffchainConfigDigester{} +} + +func (s SrcExecProvider) ContractConfigTracker() ocrtypes.ContractConfigTracker { + // TODO CCIP-2494 + // "ContractConfigTracker called on SrcExecProvider. It should only be called on DstExecProvider + return UnimplementedContractConfigTracker{} +} + +func (s SrcExecProvider) ContractTransmitter() ocrtypes.ContractTransmitter { + // TODO CCIP-2494 + // "ContractTransmitter called on SrcExecProvider. It should only be called on DstExecProvider + return UnimplementedContractTransmitter{} +} + +func (s SrcExecProvider) ChainReader() commontypes.ContractReader { + return nil +} + +func (s SrcExecProvider) Codec() commontypes.Codec { + return nil +} + +func (s SrcExecProvider) NewCommitStoreReader(ctx context.Context, addr cciptypes.Address) (cciptypes.CommitStoreReader, error) { + // TODO CCIP-2493 + return nil, fmt.Errorf("invalid: NewCommitStoreReader not implemented") +} + +func (s SrcExecProvider) NewOffRampReader(ctx context.Context, addr cciptypes.Address) (cciptypes.OffRampReader, error) { + return nil, fmt.Errorf("invalid: NewOffRampReader called on SrcExecProvider. Valid on DstExecProvider") +} + +func (s SrcExecProvider) NewOnRampReader(ctx context.Context, onRampAddress cciptypes.Address, sourceChainSelector uint64, destChainSelector uint64) (onRampReader cciptypes.OnRampReader, err error) { + versionFinder := ccip.NewEvmVersionFinder() + onRampReader, err = ccip.NewOnRampReader(s.lggr, versionFinder, sourceChainSelector, destChainSelector, onRampAddress, s.lp, s.client) + return +} + +func (s SrcExecProvider) NewPriceRegistryReader(ctx context.Context, addr cciptypes.Address) (priceRegistryReader cciptypes.PriceRegistryReader, err error) { + srcPriceRegistry := ccip.NewEvmPriceRegistry(s.lp, s.client, s.lggr, ccip.ExecPluginLabel) + priceRegistryReader, err = srcPriceRegistry.NewPriceRegistryReader(ctx, addr) + return +} + +func (s SrcExecProvider) NewTokenDataReader(ctx context.Context, tokenAddress cciptypes.Address) (tokenDataReader cciptypes.TokenDataReader, err error) { + attestationURI, err2 := url.ParseRequestURI(s.usdcAttestationAPI) + if err2 != nil { + return nil, fmt.Errorf("failed to parse USDC attestation API: %w", err2) + } + tokenAddr, err2 := ccip.GenericAddrToEvm(tokenAddress) + if err2 != nil { + return nil, fmt.Errorf("failed to parse token address: %w", err2) + } + tokenDataReader = usdc.NewUSDCTokenDataReader( + s.lggr, + s.usdcReader, + attestationURI, + s.usdcAttestationAPITimeoutSeconds, + tokenAddr, + time.Duration(s.usdcAttestationAPIIntervalMilliseconds)*time.Millisecond, + ) + return +} + +func (s SrcExecProvider) NewTokenPoolBatchedReader(ctx context.Context, offRampAddr cciptypes.Address, sourceChainSelector uint64) (cciptypes.TokenPoolBatchedReader, error) { + return nil, fmt.Errorf("invalid: NewTokenPoolBatchedReader called on SrcExecProvider. It should only be called on DstExecProvdier") +} + +func (s SrcExecProvider) SourceNativeToken(ctx context.Context, sourceRouterAddr cciptypes.Address) (cciptypes.Address, error) { + sourceRouterAddrHex, err := ccip.GenericAddrToEvm(sourceRouterAddr) + if err != nil { + return "", err + } + sourceRouter, err := router.NewRouter(sourceRouterAddrHex, s.client) + if err != nil { + return "", err + } + sourceNative, err := sourceRouter.GetWrappedNative(&bind.CallOpts{Context: ctx}) + if err != nil { + return "", err + } + + return ccip.EvmAddrToGeneric(sourceNative), nil +} + +type DstExecProvider struct { + lggr logger.Logger + versionFinder ccip.VersionFinder + client client.Client + lp logpoller.LogPoller + startBlock uint64 + contractTransmitter *contractTransmitter + configWatcher *configWatcher + gasEstimator gas.EvmFeeEstimator + maxGasPrice big.Int +} + +func NewDstExecProvider( + lggr logger.Logger, + versionFinder ccip.VersionFinder, + client client.Client, + lp logpoller.LogPoller, + startBlock uint64, + contractTransmitter *contractTransmitter, + configWatcher *configWatcher, + gasEstimator gas.EvmFeeEstimator, + maxGasPrice big.Int, +) (commontypes.CCIPExecProvider, error) { + return &DstExecProvider{ + lggr: lggr, + versionFinder: versionFinder, + client: client, + lp: lp, + startBlock: startBlock, + contractTransmitter: contractTransmitter, + configWatcher: configWatcher, + gasEstimator: gasEstimator, + maxGasPrice: maxGasPrice, + }, nil +} + +func (d DstExecProvider) Name() string { + return "CCIP.DestRelayerExecProvider" +} + +func (d DstExecProvider) Start(ctx context.Context) error { + if d.startBlock != 0 { + d.lggr.Infow("start replaying dst chain", "fromBlock", d.startBlock) + return d.lp.Replay(ctx, int64(d.startBlock)) + } + return nil +} + +func (d DstExecProvider) Close() error { + return nil +} + +func (d DstExecProvider) Ready() error { + return nil +} + +func (d DstExecProvider) HealthReport() map[string]error { + return make(map[string]error) +} + +func (d DstExecProvider) OffchainConfigDigester() ocrtypes.OffchainConfigDigester { + return d.configWatcher.OffchainConfigDigester() +} + +func (d DstExecProvider) ContractConfigTracker() ocrtypes.ContractConfigTracker { + return d.configWatcher.ContractConfigTracker() +} + +func (d DstExecProvider) ContractTransmitter() ocrtypes.ContractTransmitter { + return d.contractTransmitter +} + +func (d DstExecProvider) ChainReader() commontypes.ContractReader { + return nil +} + +func (d DstExecProvider) Codec() commontypes.Codec { + return nil +} + +func (d DstExecProvider) NewCommitStoreReader(ctx context.Context, addr cciptypes.Address) (cciptypes.CommitStoreReader, error) { + // TODO CCIP-2493 + return nil, fmt.Errorf("invalid: NewCommitStoreReader not yet implemented") +} + +func (d DstExecProvider) NewOffRampReader(ctx context.Context, offRampAddress cciptypes.Address) (offRampReader cciptypes.OffRampReader, err error) { + offRampReader, err = ccip.NewOffRampReader(d.lggr, d.versionFinder, offRampAddress, d.client, d.lp, d.gasEstimator, &d.maxGasPrice, true) + return +} + +func (d DstExecProvider) NewOnRampReader(ctx context.Context, addr cciptypes.Address, sourceChainSelector uint64, destChainSelector uint64) (cciptypes.OnRampReader, error) { + return nil, fmt.Errorf("invalid: NewOnRampReader called on DstExecProvider. It should only be called on SrcExecProvider") +} + +func (d DstExecProvider) NewPriceRegistryReader(ctx context.Context, addr cciptypes.Address) (priceRegistryReader cciptypes.PriceRegistryReader, err error) { + destPriceRegistry := ccip.NewEvmPriceRegistry(d.lp, d.client, d.lggr, ccip.ExecPluginLabel) + priceRegistryReader, err = destPriceRegistry.NewPriceRegistryReader(ctx, addr) + return +} + +func (d DstExecProvider) NewTokenDataReader(ctx context.Context, tokenAddress cciptypes.Address) (cciptypes.TokenDataReader, error) { + return nil, fmt.Errorf("invalid: NewTokenDataReader called on DstExecProvider. It should only be called on SrcExecProvider") +} + +func (d DstExecProvider) NewTokenPoolBatchedReader(ctx context.Context, offRampAddress cciptypes.Address, sourceChainSelector uint64) (tokenPoolBatchedReader cciptypes.TokenPoolBatchedReader, err error) { + batchCaller := ccip.NewDynamicLimitedBatchCaller( + d.lggr, + d.client, + uint(ccip.DefaultRpcBatchSizeLimit), + uint(ccip.DefaultRpcBatchBackOffMultiplier), + uint(ccip.DefaultMaxParallelRpcCalls), + ) + + tokenPoolBatchedReader, err = ccip.NewEVMTokenPoolBatchedReader(d.lggr, sourceChainSelector, offRampAddress, batchCaller) + if err != nil { + return nil, fmt.Errorf("new token pool batched reader: %w", err) + } + return +} + +func (d DstExecProvider) SourceNativeToken(ctx context.Context, addr cciptypes.Address) (cciptypes.Address, error) { + return "", fmt.Errorf("invalid: SourceNativeToken called on DstExecProvider. It should only be called on SrcExecProvider") +} diff --git a/core/services/relay/evm/ocr2keeper.go b/core/services/relay/evm/ocr2keeper.go index 6ef43ead7a..359c246075 100644 --- a/core/services/relay/evm/ocr2keeper.go +++ b/core/services/relay/evm/ocr2keeper.go @@ -90,7 +90,7 @@ func (r *ocr2keeperRelayer) NewOCR2KeeperProvider(rargs commontypes.RelayArgs, p } gasLimit := cfgWatcher.chain.Config().EVM().OCR2().Automation().GasLimit() - contractTransmitter, err := newOnChainContractTransmitter(ctx, r.lggr, rargs, pargs.TransmitterID, r.ethKeystore, cfgWatcher, configTransmitterOpts{pluginGasLimit: &gasLimit}, OCR2AggregatorTransmissionContractABI, nil, 0) + contractTransmitter, err := newOnChainContractTransmitter(ctx, r.lggr, rargs, r.ethKeystore, cfgWatcher, configTransmitterOpts{pluginGasLimit: &gasLimit}, OCR2AggregatorTransmissionContractABI, nil, 0) if err != nil { return nil, err } diff --git a/core/services/relay/evm/ocr2vrf.go b/core/services/relay/evm/ocr2vrf.go index 8a00f23f96..2f9755e1c7 100644 --- a/core/services/relay/evm/ocr2vrf.go +++ b/core/services/relay/evm/ocr2vrf.go @@ -63,7 +63,7 @@ func (r *ocr2vrfRelayer) NewDKGProvider(rargs commontypes.RelayArgs, pargs commo if err != nil { return nil, err } - contractTransmitter, err := newOnChainContractTransmitter(ctx, r.lggr, rargs, pargs.TransmitterID, r.ethKeystore, configWatcher, configTransmitterOpts{}, OCR2AggregatorTransmissionContractABI, nil, 0) + contractTransmitter, err := newOnChainContractTransmitter(ctx, r.lggr, rargs, r.ethKeystore, configWatcher, configTransmitterOpts{}, OCR2AggregatorTransmissionContractABI, nil, 0) if err != nil { return nil, err } @@ -89,7 +89,7 @@ func (r *ocr2vrfRelayer) NewOCR2VRFProvider(rargs commontypes.RelayArgs, pargs c if err != nil { return nil, err } - contractTransmitter, err := newOnChainContractTransmitter(ctx, r.lggr, rargs, pargs.TransmitterID, r.ethKeystore, configWatcher, configTransmitterOpts{}, OCR2AggregatorTransmissionContractABI, nil, 0) + contractTransmitter, err := newOnChainContractTransmitter(ctx, r.lggr, rargs, r.ethKeystore, configWatcher, configTransmitterOpts{}, OCR2AggregatorTransmissionContractABI, nil, 0) if err != nil { return nil, err } diff --git a/core/web/solana_chains_controller_test.go b/core/web/solana_chains_controller_test.go index 048a3790b1..9b4e516832 100644 --- a/core/web/solana_chains_controller_test.go +++ b/core/web/solana_chains_controller_test.go @@ -13,7 +13,7 @@ import ( commoncfg "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink-common/pkg/types" - "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" + solcfg "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -80,9 +80,9 @@ Nodes = [] t.Run(tc.name, func(t *testing.T) { t.Parallel() - controller := setupSolanaChainsControllerTestV2(t, &config.TOMLConfig{ + controller := setupSolanaChainsControllerTestV2(t, &solcfg.TOMLConfig{ ChainID: ptr(validId), - Chain: config.Chain{ + Chain: solcfg.Chain{ SkipPreflight: ptr(false), TxTimeout: commoncfg.MustNewDuration(time.Hour), }, @@ -111,15 +111,16 @@ Nodes = [] func Test_SolanaChainsController_Index(t *testing.T) { t.Parallel() - chainA := &config.TOMLConfig{ + chainA := &solcfg.TOMLConfig{ ChainID: ptr(fmt.Sprintf("ChainlinktestA-%d", rand.Int31n(999999))), - Chain: config.Chain{ + Chain: solcfg.Chain{ TxTimeout: commoncfg.MustNewDuration(time.Hour), }, } - chainB := &config.TOMLConfig{ + + chainB := &solcfg.TOMLConfig{ ChainID: ptr(fmt.Sprintf("ChainlinktestB-%d", rand.Int31n(999999))), - Chain: config.Chain{ + Chain: solcfg.Chain{ SkipPreflight: ptr(false), }, } @@ -175,7 +176,7 @@ type TestSolanaChainsController struct { client cltest.HTTPClientCleaner } -func setupSolanaChainsControllerTestV2(t *testing.T, cfgs ...*config.TOMLConfig) *TestSolanaChainsController { +func setupSolanaChainsControllerTestV2(t *testing.T, cfgs ...*solcfg.TOMLConfig) *TestSolanaChainsController { for i := range cfgs { cfgs[i].SetDefaults() } diff --git a/go.md b/go.md index dda7192c1a..eeff43e365 100644 --- a/go.md +++ b/go.md @@ -28,6 +28,8 @@ 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 @@ -52,6 +54,8 @@ flowchart LR click wsrpc href "https://github.com/smartcontractkit/wsrpc" chainlink-automation --> chainlink-common chainlink-automation --> libocr + chainlink-ccip --> chainlink-common + chainlink-ccip --> libocr chainlink-common --> libocr chainlink-cosmos --> chainlink-common chainlink-cosmos --> libocr diff --git a/go.mod b/go.mod index 20c38c2e0a..ee07ef8922 100644 --- a/go.mod +++ b/go.mod @@ -11,17 +11,17 @@ require ( github.com/XSAM/otelsql v0.27.0 github.com/avast/retry-go/v4 v4.6.0 github.com/btcsuite/btcd/btcec/v2 v2.3.2 - github.com/cometbft/cometbft v0.37.2 - github.com/cosmos/cosmos-sdk v0.47.4 + github.com/cometbft/cometbft v0.37.5 + github.com/cosmos/cosmos-sdk v0.47.11 github.com/danielkov/gin-helmet v0.0.0-20171108135313-1387e224435e - github.com/deckarep/golang-set/v2 v2.3.0 + github.com/deckarep/golang-set/v2 v2.6.0 github.com/dominikbraun/graph v0.23.0 github.com/esote/minmaxheap v1.0.0 github.com/ethereum/go-ethereum v1.13.8 github.com/fatih/color v1.16.0 github.com/fxamacker/cbor/v2 v2.5.0 github.com/gagliardetto/solana-go v1.8.4 - github.com/getsentry/sentry-go v0.19.0 + github.com/getsentry/sentry-go v0.23.0 github.com/gin-contrib/cors v1.5.0 github.com/gin-contrib/expvar v0.0.1 github.com/gin-contrib/sessions v0.0.5 @@ -68,18 +68,19 @@ require ( github.com/prometheus/prometheus v0.48.1 github.com/robfig/cron/v3 v3.0.1 github.com/rogpeppe/go-internal v1.11.0 - github.com/rs/zerolog v1.30.0 + github.com/rs/zerolog v1.32.0 github.com/scylladb/go-reflectx v1.0.1 github.com/shirou/gopsutil/v3 v3.24.3 github.com/shopspring/decimal v1.3.1 github.com/smartcontractkit/chain-selectors v1.0.17 github.com/smartcontractkit/chainlink-automation v1.0.4 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625074419-c278d083facf - github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d + github.com/smartcontractkit/chainlink-ccip v0.0.0-20240702134133-a6d2f429671f + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625144005-556a7ba7b11c + github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240621143432-85370a54b141 github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 - github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 - github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240625075314-affd4529a8f5 - github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240625074951-06ab5e670dba + github.com/smartcontractkit/chainlink-feeds v0.0.0-20240523182126-1784bd4f3294 + github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240621151551-885054fb0f0e + github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240621143321-7e5949418911 github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 @@ -112,7 +113,7 @@ require ( golang.org/x/time v0.5.0 golang.org/x/tools v0.18.0 gonum.org/v1/gonum v0.14.0 - google.golang.org/grpc v1.59.0 + google.golang.org/grpc v1.62.1 google.golang.org/protobuf v1.33.0 gopkg.in/guregu/null.v4 v4.0.0 gopkg.in/natefinch/lumberjack.v2 v2.2.1 @@ -123,6 +124,9 @@ require ( github.com/bahlo/generic-list-go v0.2.0 // indirect github.com/buger/jsonparser v1.1.1 // indirect github.com/mailru/easyjson v0.7.7 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -130,14 +134,14 @@ require ( contrib.go.opencensus.io/exporter/stackdriver v0.13.5 // indirect cosmossdk.io/api v0.3.1 // indirect cosmossdk.io/core v0.5.1 // indirect - cosmossdk.io/depinject v1.0.0-alpha.3 // indirect - cosmossdk.io/errors v1.0.0 // indirect - cosmossdk.io/math v1.0.1 // indirect + cosmossdk.io/depinject v1.0.0-alpha.4 // indirect + cosmossdk.io/errors v1.0.1 // indirect + cosmossdk.io/math v1.3.0 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect - github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect + github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect github.com/CosmWasm/wasmd v0.40.1 // indirect github.com/CosmWasm/wasmvm v1.2.4 // indirect github.com/DataDog/zstd v1.5.2 // indirect @@ -157,23 +161,23 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect github.com/chenzhuoyu/iasm v0.9.0 // indirect - github.com/cockroachdb/errors v1.9.1 // indirect + github.com/cockroachdb/errors v1.10.0 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 // indirect - github.com/cockroachdb/redact v1.1.3 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/cometbft/cometbft-db v0.8.0 // indirect github.com/confio/ics23/go v0.9.0 // indirect github.com/consensys/bavard v0.1.13 // indirect github.com/consensys/gnark-crypto v0.12.1 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-proto v1.0.0-beta.2 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogoproto v1.4.11 // indirect - github.com/cosmos/iavl v0.20.0 // indirect - github.com/cosmos/ibc-go/v7 v7.2.0 // indirect + github.com/cosmos/iavl v0.20.1 // indirect + github.com/cosmos/ibc-go/v7 v7.5.1 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.12.1 // indirect + github.com/cosmos/ledger-cosmos-go v0.12.4 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 // indirect github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect @@ -188,7 +192,7 @@ require ( github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.7.0 // indirect github.com/ethereum/c-kzg-4844 v0.4.0 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect github.com/gagliardetto/binary v0.7.7 // indirect github.com/gagliardetto/treeout v0.1.4 // indirect @@ -213,7 +217,7 @@ require ( github.com/gofrs/flock v0.8.1 // indirect github.com/gogo/protobuf v1.3.3 // indirect github.com/golang-jwt/jwt/v5 v5.2.0 // indirect - github.com/golang/glog v1.1.2 // indirect + github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect @@ -292,15 +296,14 @@ require ( github.com/sethvargo/go-retry v0.2.4 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/spf13/afero v1.9.5 // indirect + github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cobra v1.8.0 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.16.0 // indirect + github.com/spf13/viper v1.18.2 // indirect 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.4.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 @@ -316,8 +319,8 @@ require ( github.com/valyala/fastjson v1.4.1 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - github.com/zondax/hid v0.9.1 // indirect - github.com/zondax/ledger-go v0.14.1 // indirect + github.com/zondax/hid v0.9.2 // indirect + github.com/zondax/ledger-go v0.14.3 // indirect go.dedis.ch/protobuf v1.0.11 // indirect go.etcd.io/bbolt v1.3.7 // indirect go.mongodb.org/mongo-driver v1.15.0 // indirect @@ -332,14 +335,13 @@ require ( go.uber.org/ratelimit v0.3.0 // indirect golang.org/x/arch v0.7.0 // indirect golang.org/x/sys v0.19.0 // indirect - google.golang.org/api v0.149.0 // indirect - google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect + google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect gopkg.in/guregu/null.v2 v2.1.2 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - pgregory.net/rapid v0.5.5 // indirect + pgregory.net/rapid v1.1.0 // indirect rsc.io/tmplfunc v0.0.3 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/go.sum b/go.sum index 201a9af590..ea0257c953 100644 --- a/go.sum +++ b/go.sum @@ -4,7 +4,6 @@ cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSR cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -15,11 +14,8 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.110.9 h1:e7ITSqGFFk4rbz/JFIqZh3G4VEHguhAL4BQcFlWtU68= -cloud.google.com/go v0.110.9/go.mod h1:rpxevX/0Lqvlbc88b7Sc1SPNdyK1riNBTUU6JXhYNpM= +cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM= +cloud.google.com/go v0.112.0/go.mod h1:3jEEVwZ/MHU4djK5t5RHuKOA/GbLddgTdVubX1qnPD4= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -33,8 +29,8 @@ cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2Aawl cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/iam v1.1.4 h1:K6n/GZHFTtEoKT5aUG3l9diPi0VduZNQ1PfdnpkkIFk= -cloud.google.com/go/iam v1.1.4/go.mod h1:l/rg8l1AaA+VFMho/HYx2Vv6xinPSLMF8qfhRPIZ0L8= +cloud.google.com/go/iam v1.1.5 h1:1jTsCu4bcsNsE4iiqNT5SHwrDRCfRmIaaaVFhRveTJI= +cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -44,9 +40,8 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= -cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= +cloud.google.com/go/storage v1.36.0 h1:P0mOkAcaJxhCTvAkMhxMfrTKiNcub4YmmPBtlhAyTr8= +cloud.google.com/go/storage v1.36.0/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= contrib.go.opencensus.io/exporter/stackdriver v0.12.6/go.mod h1:8x999/OcIPy5ivx/wDiV7Gx4D+VUPODf0mWRGRc5kSk= contrib.go.opencensus.io/exporter/stackdriver v0.13.4/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc= contrib.go.opencensus.io/exporter/stackdriver v0.13.5 h1:TNaexHK16gPUoc7uzELKOU7JULqccn1NDuqUxmxSqfo= @@ -55,14 +50,14 @@ cosmossdk.io/api v0.3.1 h1:NNiOclKRR0AOlO4KIqeaG6PS6kswOMhHD0ir0SscNXE= cosmossdk.io/api v0.3.1/go.mod h1:DfHfMkiNA2Uhy8fj0JJlOCYOBp4eWUUJ1te5zBGNyIw= cosmossdk.io/core v0.5.1 h1:vQVtFrIYOQJDV3f7rw4pjjVqc1id4+mE0L9hHP66pyI= cosmossdk.io/core v0.5.1/go.mod h1:KZtwHCLjcFuo0nmDc24Xy6CRNEL9Vl/MeimQ2aC7NLE= -cosmossdk.io/depinject v1.0.0-alpha.3 h1:6evFIgj//Y3w09bqOUOzEpFj5tsxBqdc5CfkO7z+zfw= -cosmossdk.io/depinject v1.0.0-alpha.3/go.mod h1:eRbcdQ7MRpIPEM5YUJh8k97nxHpYbc3sMUnEtt8HPWU= -cosmossdk.io/errors v1.0.0 h1:nxF07lmlBbB8NKQhtJ+sJm6ef5uV1XkvPXG2bUntb04= -cosmossdk.io/errors v1.0.0/go.mod h1:+hJZLuhdDE0pYN8HkOrVNwrIOYvUGnn6+4fjnJs/oV0= -cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca h1:msenprh2BLLRwNT7zN56TbBHOGk/7ARQckXHxXyvjoQ= -cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca/go.mod h1:PkIAKXZvaxrTRc++z53XMRvFk8AcGGWYHcMIPzVYX9c= -cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= -cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= +cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= +cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= +cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= +cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= +cosmossdk.io/log v1.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI= +cosmossdk.io/log v1.3.1/go.mod h1:2/dIomt8mKdk6vl3OWJcPk2be3pGOS8OQaLUM/3/tCM= +cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= +cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -75,7 +70,6 @@ github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo8 github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= github.com/AlekSi/pointer v1.1.0 h1:SSDMPcXD9jSl8FPy9cRzoRaMJtm9g9ggGTxecRUbQoI= github.com/AlekSi/pointer v1.1.0/go.mod h1:y7BvfRI3wXPWKXEBhU71nbnIEEZX0QTSB2Bj48UJIZE= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 h1:mFRzDkZVAjdal+s7s0MwaRv9igoPqLRdzOLzw/8Xvq8= @@ -83,14 +77,12 @@ github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358/go.mod h1:chxPXzS github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= -github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= +github.com/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRrLeDnvGIM= +github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4= github.com/ClickHouse/ch-go v0.58.2 h1:jSm2szHbT9MCAB1rJ3WuCJqmGLi5UTjlNu+f530UTS0= github.com/ClickHouse/ch-go v0.58.2/go.mod h1:Ap/0bEmiLa14gYjCiRkYGbXvbe8vwdrfTYWhsuQ99aw= github.com/ClickHouse/clickhouse-go/v2 v2.15.0 h1:G0hTKyO8fXXR1bGnZ0DY3vTG01xYfOGW76zgjg5tmC4= github.com/ClickHouse/clickhouse-go/v2 v2.15.0/go.mod h1:kXt1SRq0PIRa6aKZD7TnFnY9PQKmc2b13sHtOYcK6cQ= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= github.com/CosmWasm/wasmd v0.40.1 h1:LxbO78t/6S8TkeQlUrJ0m5O87HtAwLx4RGHq3rdrOEU= github.com/CosmWasm/wasmd v0.40.1/go.mod h1:6EOwnv7MpuFaEqxcUOdFV9i4yvrdOciaY6VQ1o7A3yg= github.com/CosmWasm/wasmvm v1.2.4 h1:6OfeZuEcEH/9iqwrg2pkeVtDCkMoj9U6PpKtcrCyVrQ= @@ -102,7 +94,6 @@ github.com/Depado/ginprom v1.8.0 h1:zaaibRLNI1dMiiuj1MKzatm8qrcHzikMlCc1anqOdyo= github.com/Depado/ginprom v1.8.0/go.mod h1:XBaKzeNBqPF4vxJpNLincSQZeMDnZp1tIbU0FU0UKgg= github.com/GeertJohan/go.incremental v1.0.0/go.mod h1:6fAjUhbVuX1KcMD3c8TEgVUqmo4seqhv0i0kdATSkM0= github.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtixis4Tib9if0= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= @@ -122,17 +113,13 @@ github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8 github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8= github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/XSAM/otelsql v0.27.0 h1:i9xtxtdcqXV768a5C6SoT/RkG+ue3JTOgkYInzlTOqs= github.com/XSAM/otelsql v0.27.0/go.mod h1:0mFB3TvLa7NCuhm/2nU7/b2wEtsczkj8Rey8ygO7V+A= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= -github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= -github.com/alecthomas/participle/v2 v2.0.0-alpha7/go.mod h1:NumScqsC42o9x+dGj8/YqsIfhrIQjFEOFovxotbBirA= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -160,7 +147,6 @@ github.com/aws/aws-sdk-go v1.22.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.45.25 h1:c4fLlh5sLdK2DCRTY1z0hyuJZU4ygxX8m1FswL6/nF4= github.com/aws/aws-sdk-go v1.45.25/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -222,35 +208,29 @@ github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6D github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= -github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= -github.com/cockroachdb/apd/v3 v3.1.0/go.mod h1:6qgPBMXjATAdD/VefbRP9NoSLKjbB4LCoA7gN4LpHs4= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/errors v1.10.0 h1:lfxS8zZz1+OjtV4MtNWgboi/W5tyLEB6VQZBXN+0VUU= +github.com/cockroachdb/errors v1.10.0/go.mod h1:lknhIsEVQ9Ss/qKDBQS/UqFSvPQjOwNq2qyKAxtHRqE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 h1:aPEJyR4rPBvDmeyi+l/FS/VtA00IWvjeFvjen1m1l1A= github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593/go.mod h1:6hk1eMY/u5t+Cf18q5lFMUA1Rc+Sm5I6Ra1QuPyxXCo= -github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONNbHU7MuEHboiFuA= github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c= -github.com/cometbft/cometbft v0.37.2 h1:XB0yyHGT0lwmJlFmM4+rsRnczPlHoAKFX6K8Zgc2/Jc= -github.com/cometbft/cometbft v0.37.2/go.mod h1:Y2MMMN//O5K4YKd8ze4r9jmk4Y7h0ajqILXbH5JQFVs= +github.com/cometbft/cometbft v0.37.5 h1:/U/TlgMh4NdnXNo+YU9T2NMCWyhXNDF34Mx582jlvq0= +github.com/cometbft/cometbft v0.37.5/go.mod h1:QC+mU0lBhKn8r9qvmnq53Dmf3DWBt4VtkcKw2C81wxY= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= @@ -273,10 +253,10 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-proto v1.0.0-beta.2 h1:X3OKvWgK9Gsejo0F1qs5l8Qn6xJV/AzgIWR2wZ8Nua8= -github.com/cosmos/cosmos-proto v1.0.0-beta.2/go.mod h1:+XRCLJ14pr5HFEHIUcn51IKXD1Fy3rkEQqt4WqmN4V0= -github.com/cosmos/cosmos-sdk v0.47.4 h1:FVUpEprm58nMmBX4xkRdMDaIG5Nr4yy92HZAfGAw9bg= -github.com/cosmos/cosmos-sdk v0.47.4/go.mod h1:R5n+uM7vguVPFap4pgkdvQCT1nVo/OtPwrlAU40rvok= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= +github.com/cosmos/cosmos-sdk v0.47.11 h1:0Qx7eORw0RJqPv+mvDuU8NQ1LV3nJJKJnPoYblWHolc= +github.com/cosmos/cosmos-sdk v0.47.11/go.mod h1:ADjORYzUQqQv/FxDi0H0K5gW/rAk1CiDR3ZKsExfJV0= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= @@ -284,14 +264,14 @@ github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiK github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= -github.com/cosmos/iavl v0.20.0 h1:fTVznVlepH0KK8NyKq8w+U7c2L6jofa27aFX6YGlm38= -github.com/cosmos/iavl v0.20.0/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= -github.com/cosmos/ibc-go/v7 v7.2.0 h1:dx0DLUl7rxdyZ8NiT6UsrbzKOJx/w7s+BOaewFRH6cg= -github.com/cosmos/ibc-go/v7 v7.2.0/go.mod h1:OOcjKIRku/j1Xs1RgKK0yvKRrJ5iFuZYMetR1n3yMlc= +github.com/cosmos/iavl v0.20.1 h1:rM1kqeG3/HBT85vsZdoSNsehciqUQPWrR4BYmqE2+zg= +github.com/cosmos/iavl v0.20.1/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= +github.com/cosmos/ibc-go/v7 v7.5.1 h1:KqS/g7W7EMX1OtOvufS8lWMJibOKpdgtNNZIU6fAgVU= +github.com/cosmos/ibc-go/v7 v7.5.1/go.mod h1:ktFg5GvKOyrGCqTWtW7Grj5uweU4ZapxrNeVS1CLLbo= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= -github.com/cosmos/ledger-cosmos-go v0.12.1 h1:sMBxza5p/rNK/06nBSNmsI/WDqI0pVJFVNihy1Y984w= -github.com/cosmos/ledger-cosmos-go v0.12.1/go.mod h1:dhO6kj+Y+AHIOgAe4L9HL/6NDdyyth4q238I9yFpD2g= +github.com/cosmos/ledger-cosmos-go v0.12.4 h1:drvWt+GJP7Aiw550yeb3ON/zsrgW0jgh5saFCr7pDnw= +github.com/cosmos/ledger-cosmos-go v0.12.4/go.mod h1:fjfVWRf++Xkygt9wzCsjEBdjcf7wiiY35fv3ctT+k4M= github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzUGSKFTcM= github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFgWl/ENIznEoYQI4= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= @@ -307,10 +287,6 @@ github.com/creachadair/taskgroup v0.4.2 h1:jsBLdAJE42asreGss2xZGZ8fJra7WtwnHWeJF github.com/creachadair/taskgroup v0.4.2/go.mod h1:qiXUOSrbwAY3u0JPGTzObbE3yf9hcXHDKBZ2ZjpCbgM= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= -github.com/cucumber/common/gherkin/go/v22 v22.0.0/go.mod h1:3mJT10B2GGn3MvVPd3FwR7m2u4tLhSRhWUqJU4KN4Fg= -github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= -github.com/cucumber/common/messages/go/v17 v17.1.1/go.mod h1:bpGxb57tDE385Rb2EohgUadLkAbhoC4IyCFi89u/JQI= github.com/daaku/go.zipexe v1.0.0/go.mod h1:z8IiR6TsVLEYKwXAoE/I+8ys/sDkgTzSL0CLnGVd57E= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= @@ -320,8 +296,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deckarep/golang-set/v2 v2.3.0 h1:qs18EKUfHm2X9fA50Mr/M5hccg2tNnVqsiBImnyDs0g= -github.com/deckarep/golang-set/v2 v2.3.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= +github.com/deckarep/golang-set/v2 v2.6.0 h1:XfcQbWM1LlMB8BsJ8N9vW5ehnnPVIw0je80NsVHagjM= +github.com/deckarep/golang-set/v2 v2.6.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= @@ -331,7 +307,6 @@ github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFM github.com/dfuse-io/logging v0.0.0-20201110202154-26697de88c79/go.mod h1:V+ED4kT/t/lKtH99JQmKIb0v9WL3VaYkJ36CfHlVECI= github.com/dfuse-io/logging v0.0.0-20210109005628-b97a57253f70 h1:CuJS05R9jmNlUK8GOxrEELPbfXm0EuGh/30LjkjN5vo= github.com/dfuse-io/logging v0.0.0-20210109005628-b97a57253f70/go.mod h1:EoK/8RFbMEteaCaz89uessDTnCWjbbcr+DXcBh4el5o= -github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= @@ -359,7 +334,6 @@ github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkp github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dvsekhvalnov/jose2go v1.7.0 h1:bnQc8+GMnidJZA8zc6lLEAb4xNrIqHwO+9TzqvtQZPo= github.com/dvsekhvalnov/jose2go v1.7.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= github.com/elastic/go-sysinfo v1.11.1 h1:g9mwl05njS4r69TisC+vwHWTSKywZFYYUu3so3T/Lao= github.com/elastic/go-sysinfo v1.11.1/go.mod h1:6KQb31j0QeWBDF88jIdWSxE8cwoOB9tO4Y4osN7Q70E= github.com/elastic/go-windows v1.0.1 h1:AlYZOldA+UJ0/2nBuqWdo90GFCgG9xuyw9SYzGUtJm0= @@ -367,28 +341,24 @@ github.com/elastic/go-windows v1.0.1/go.mod h1:FoVvqWSun28vaDQPbj2Elfc0JahhPB7WQ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= -github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= +github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/esote/minmaxheap v1.0.0 h1:rgA7StnXXpZG6qlM0S7pUmEv1KpWe32rYT4x8J8ntaA= github.com/esote/minmaxheap v1.0.0/go.mod h1:Ln8+i7fS1k3PLgZI2JAo0iA1as95QnIYiGCrqSJ5FZk= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= github.com/ethereum/go-ethereum v1.13.8 h1:1od+thJel3tM52ZUNQwvpYOeRHlbkVFZ5S8fhi0Lgsg= github.com/ethereum/go-ethereum v1.13.8/go.mod h1:sc48XYQxCzH3fG9BcrXCOOgQk2JfZzNAmIKnceogzsA= -github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= -github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= @@ -398,8 +368,8 @@ github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7z github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fxamacker/cbor/v2 v2.5.0 h1:oHsG0V/Q6E/wqTS2O1Cozzsy69nqCiguo5Q1a1ADivE= github.com/fxamacker/cbor/v2 v2.5.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= @@ -412,16 +382,14 @@ github.com/gagliardetto/solana-go v1.8.4 h1:vmD/JmTlonyXGy39bAo0inMhmbdAwV7rXZtL github.com/gagliardetto/solana-go v1.8.4/go.mod h1:i+7aAyNDTHG0jK8GZIBSI4OVvDqkt2Qx+LklYclRNG8= github.com/gagliardetto/treeout v0.1.4 h1:ozeYerrLCmCubo1TcIjFiOWTTGteOOHND1twdFpgwaw= github.com/gagliardetto/treeout v0.1.4/go.mod h1:loUefvXTrlRG5rYmJmExNryyBRh8f89VZhmMOyCyqok= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 h1:f6D9Hr8xV8uYKlyuj8XIruxlh9WjVjdh1gIicAS7ays= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2GihuqhwdILrV+7GJel5lyPV3u1+PgzrWLc0TkE= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc= github.com/gedex/inflector v0.0.0-20170307190818-16278e9db813 h1:Uc+IZ7gYqAf/rSGFplbWBSHaGolEQlNLgMgSE3ccnIQ= github.com/gedex/inflector v0.0.0-20170307190818-16278e9db813/go.mod h1:P+oSoE9yhSRvsmYyZsshflcR6ePWYLql6UU1amW13IM= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.19.0 h1:BcCH3CN5tXt5aML+gwmbFwVptLLQA+eT866fCO9wVOM= -github.com/getsentry/sentry-go v0.19.0/go.mod h1:y3+lGEFEFexZtpbG1GUE2WD/f9zGyKYwpEqryTOC/nE= +github.com/getsentry/sentry-go v0.23.0 h1:dn+QRCeJv4pPt9OjVXiMcGIBIefaTJPw/h0bZWO05nE= +github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/cors v1.5.0 h1:DgGKV7DDoOn36DFkNtbHrjoRiT5ExCe+PC9/xp7aKvk= github.com/gin-contrib/cors v1.5.0/go.mod h1:TvU7MAZ3EwrPLI2ztzTt3tqgvBCq+wn8WpZmfADjupI= @@ -440,8 +408,6 @@ github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= github.com/go-asn1-ber/asn1-ber v1.5.5 h1:MNHlNMBDgEKD4TcKr36vQN68BA00aDfjIt3/bD50WnA= github.com/go-asn1-ber/asn1-ber v1.5.5/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-faster/city v1.0.1 h1:4WAxSZ3V2Ws4QRDrscLEDcibJY8uf41H6AhXDrNDcGw= @@ -472,7 +438,6 @@ github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= @@ -498,9 +463,6 @@ github.com/go-webauthn/webauthn v0.9.4 h1:YxvHSqgUyc5AK2pZbqkWWR55qKeDPhP8zLDr6l github.com/go-webauthn/webauthn v0.9.4/go.mod h1:LqupCtzSef38FcxzaklmOn7AykGKhAhr9xlRbdbgnTw= github.com/go-webauthn/x v0.1.5 h1:V2TCzDU2TGLd0kSZOXdrqDVV5JB9ILnKxA9S53CSBw0= github.com/go-webauthn/x v0.1.5/go.mod h1:qbzWwcFcv4rTwtCLOZd+icnr6B7oSsAGZJqlt8cukqY= -github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= @@ -512,19 +474,15 @@ github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14j github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.3.1+incompatible h1:0/KbAdpx3UXAx1kEOWHJeOkpbgRFGHVgv+CFIY7dBJI= github.com/gofrs/uuid v4.3.1+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= -github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v5 v5.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw= github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= -github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -565,7 +523,6 @@ github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -579,13 +536,11 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-tpm v0.9.0 h1:sQF6YqWMi+SCXpsmS3fd21oPy/vSddwZry4JnmltHVk= github.com/google/go-tpm v0.9.0/go.mod h1:FkNVkc6C+IsvDI9Jw1OveJmxGZUUaKxtrpOS47QWKfU= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= @@ -594,7 +549,6 @@ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -604,9 +558,6 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b h1:RMpPgZTSApbPf7xaVel+QkoGPRLFLrwFO89uDUHEGf0= github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= @@ -627,7 +578,6 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= @@ -640,7 +590,6 @@ github.com/gorilla/securecookie v1.1.2 h1:YCIWL56dvtr73r6715mJs5ZvhtnY73hBvEF8kX github.com/gorilla/securecookie v1.1.2/go.mod h1:NfCASbcHqRSY+3a8tlWJwsQap2VX5pwzwo4h3eOamfo= github.com/gorilla/sessions v1.2.2 h1:lqzMYz6bOfvn2WriPUjNByzeXIlVzURcPmgMczkmTjY= github.com/gorilla/sessions v1.2.2/go.mod h1:ePLdVu+jbEgHH+KWw8I1z2wqd0BAdAQh/8LRvBeoNcQ= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= @@ -707,7 +656,6 @@ github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= @@ -742,13 +690,11 @@ github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= -github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= @@ -756,11 +702,6 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2 github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/invopop/jsonschema v0.12.0 h1:6ovsNSuvn9wEQVOyc72aycBMVQFKz7cPdMJn10CvzRI= github.com/invopop/jsonschema v0.12.0/go.mod h1:ffZ5Km5SWWRAIN6wbDXItl95euhFz2uON45H2qjYt+0= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= @@ -843,31 +784,21 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1 github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.17.3 h1:qkRjuerhUU1EmXLYGkSH6EZL+vPSxIrYjLNAK4slzwA= github.com/klauspost/compress v1.17.3/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -881,8 +812,6 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/leanovate/gopter v0.2.10-0.20210127095200-9abe2343507a h1:dHCfT5W7gghzPtfsW488uPmEOm85wewI+ypUwibyTdU= github.com/leanovate/gopter v0.2.10-0.20210127095200-9abe2343507a/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= @@ -913,12 +842,9 @@ github.com/manyminds/api2go v0.0.0-20171030193247-e7b693844a6f h1:tVvGiZQFjOXP+9 github.com/manyminds/api2go v0.0.0-20171030193247-e7b693844a6f/go.mod h1:Z60vy0EZVSu0bOugCHdcN5ZxFMKSpjRgsnh0XKPFqqk= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= @@ -926,11 +852,11 @@ github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= @@ -939,12 +865,9 @@ github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJKjyR5WD3HYQSd+U= github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94= @@ -987,16 +910,11 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/mostynb/zstdpool-freelist v0.0.0-20201229113212-927304c0c3b1 h1:mPMvm6X6tf4w8y7j9YIt6V9jfWhL6QlbEc7CCmeQlWk= github.com/mostynb/zstdpool-freelist v0.0.0-20201229113212-927304c0c3b1/go.mod h1:ye2e/VUEtE2BHE+G/QcKkcLQVAEJoYRFj5VUOQatCRE= -github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229/go.mod h1:0aYXnNPJ8l7uZxf45rWW1a/uME32OF0rhiYGNQ2oF2E= github.com/nsf/jsondiff v0.0.0-20210926074059-1e845ec5d249 h1:NHrXEjTNQY7P0Zfx1aMrNhpgxHmow66XQtm0aQLY0AE= @@ -1010,7 +928,6 @@ github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= @@ -1062,7 +979,6 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -1102,8 +1018,6 @@ github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= -github.com/regen-network/gocuke v0.6.2/go.mod h1:zYaqIHZobHyd0xOrHGPQjbhGJsuZ1oElx150u2o1xuk= github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4= github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= @@ -1118,7 +1032,6 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= @@ -1128,26 +1041,27 @@ github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= -github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c= -github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w= +github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= +github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6NgVqpn3+iol9aGu4= github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY= github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= github.com/scylladb/go-reflectx v1.0.1 h1:b917wZM7189pZdlND9PbIJ6NQxfDPfBvUaQ7cjj1iZQ= github.com/scylladb/go-reflectx v1.0.1/go.mod h1:rWnOfDIRWBGN0miMLIcoPt/Dhi2doCMZqwMCJ3KupFc= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sethvargo/go-retry v0.2.4 h1:T+jHEQy/zKJf5s95UkguisicE0zuF9y7+/vgz08Ocec= github.com/sethvargo/go-retry v0.2.4/go.mod h1:1afjQuvh7s4gflMObvjLPaWgluLLyhA1wmVZ6KLpICw= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= @@ -1170,18 +1084,20 @@ github.com/smartcontractkit/chain-selectors v1.0.17 h1:otOlYUnutS8oQBEAi9RLQICqZ github.com/smartcontractkit/chain-selectors v1.0.17/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-common v0.1.7-0.20240625074419-c278d083facf h1:d9AS/K8RSVG64USb20N/U7RaPOsYPcmuLGJq7iE+caM= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625074419-c278d083facf/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= -github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d h1:5tgMC5Gi2UAOKZ+m28W8ubjLeR0pQCAcrz6eQ0rW510= -github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20240702134133-a6d2f429671f h1:ohB9VgjJ+cvfOSzVEykZqpB/wGlzhzy3IjtdG3ZiO9E= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20240702134133-a6d2f429671f/go.mod h1:vy2vEF1K61khqGcbOCrHBKFPvSQW0O1eg19Sv74Xq/4= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625144005-556a7ba7b11c h1:dR2y3uzuZ8cJOaMSij8LQIdySuImwxkiZFjZ62ML5S0= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625144005-556a7ba7b11c/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= +github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240621143432-85370a54b141 h1:TMOoYaeSDkkI3jkCH7lKHOZaLkeDuxFTNC+XblD6M0M= +github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240621143432-85370a54b141/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540/go.mod h1:sjAmX8K2kbQhvDarZE1ZZgDgmHJ50s0BBc/66vKY2ek= -github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 h1:MD80ZRCTvxxJ8PBmhtrKoTnky8cVNYrCrIBLVRbrOM0= -github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917/go.mod h1:jwVxhctE6BgLOSSsVq9wbREpZ8Ev34H+UBxeUhESZRs= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240625075314-affd4529a8f5 h1:h0gjVZ7oQwPPQOFJuZToDhB1NTEbIBrRtsJysATTG/g= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240625075314-affd4529a8f5/go.mod h1:NbXXQaNFskVMYRut0MvBlcHu/vDgipGMwYjamvjVB9Y= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240625074951-06ab5e670dba h1:YNSlhK5mobyAaw02LPGgIEuS3lXyCTXcc6oaV2L6uUI= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240625074951-06ab5e670dba/go.mod h1:UVFRacRkP7O7TQAzFmR52v5mUlxf+G1ovMlCQAB/cHU= +github.com/smartcontractkit/chainlink-feeds v0.0.0-20240523182126-1784bd4f3294 h1:4L1878goh1mqJx6JPv/TEeMAgYvbx7+D14QFSSu/DPs= +github.com/smartcontractkit/chainlink-feeds v0.0.0-20240523182126-1784bd4f3294/go.mod h1:jwVxhctE6BgLOSSsVq9wbREpZ8Ev34H+UBxeUhESZRs= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240621151551-885054fb0f0e h1:4dwcbcVrMne6wtOX/4yWdYJwk8iSm0INVNva/EhF35E= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240621151551-885054fb0f0e/go.mod h1:rJ4+TwNMciU2pvx6dsnUNnh4sPI5bUqgmYfhSrYhQ8Y= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240621143321-7e5949418911 h1:TSgCT8Uy+R4o3GwoWUqRCGNKeciub7r7+Aa3ylmg66c= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240621143321-7e5949418911/go.mod h1:OiWUTrrpSLLTMh7FINWjEh6mmDJCVPaC4yEsDCVaWdU= github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 h1:FFdvEzlYwcuVHkdZ8YnZR/XomeMGbz5E2F2HZI3I3w8= github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868/go.mod h1:Kn1Hape05UzFZ7bOUnm3GVsHzP0TNrVmpfXYNHdqGGs= github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16 h1:TFe+FvzxClblt6qRfqEhUfa4kFQx5UobuoFGO2W4mMo= @@ -1199,12 +1115,14 @@ github.com/smartcontractkit/wsrpc v0.8.1/go.mod h1:yfg8v8fPLXkb6Mcnx6Pm/snP6jJ0r github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= @@ -1214,16 +1132,14 @@ github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJ github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= +github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/streamingfast/logging v0.0.0-20220405224725-2755dab2ce75 h1:ZqpS7rAhhKD7S7DnrpEdrnW1/gZcv82ytpMviovkli4= @@ -1250,8 +1166,8 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= @@ -1286,10 +1202,8 @@ github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2 github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= @@ -1307,14 +1221,10 @@ github.com/urfave/cli v1.22.14 h1:ebbhrRiGK2i4naQJr+1Xj92HXZCrK7MsyTS/ob3HnAk= github.com/urfave/cli v1.22.14/go.mod h1:X0eDS6pD6Exaclxm99NJ3FiCDRED7vIHpx2mDOHLvkA= github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= github.com/valyala/fastjson v1.4.1 h1:hrltpHpIpkaxll8QltMU8c3QZ5+qIiCL8yKqPFJI/yE= github.com/valyala/fastjson v1.4.1/go.mod h1:nV6MsjxL2IMJQUoHDIrjEI7oLyeqK6aBD7EFWPsvP8o= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= github.com/vertica/vertica-sql-go v1.3.3 h1:fL+FKEAEy5ONmsvya2WH5T8bhkvY27y/Ik3ReR2T+Qw= github.com/vertica/vertica-sql-go v1.3.3/go.mod h1:jnn2GFuv+O2Jcjktb7zyc4Utlbu9YVqpHH/lx63+1M4= github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc= @@ -1324,7 +1234,6 @@ github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcY github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= @@ -1335,15 +1244,11 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= github.com/ydb-platform/ydb-go-genproto v0.0.0-20231012155159-f85a672542fd h1:dzWP1Lu+A40W883dK/Mr3xyDSM/2MggS8GtHT0qgAnE= github.com/ydb-platform/ydb-go-genproto v0.0.0-20231012155159-f85a672542fd/go.mod h1:Er+FePu1dNUieD+XTMDduGpQuCPssK5Q4BjF+IIXJ3I= github.com/ydb-platform/ydb-go-sdk/v3 v3.54.2 h1:E0yUuuX7UmPxXm92+yQCjMveLFO3zfvYFIJVuAqsVRA= github.com/ydb-platform/ydb-go-sdk/v3 v3.54.2/go.mod h1:fjBLQ2TdQNl4bMjuWl9adoTGBypwUTPoGC+EqYqiIcU= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1353,10 +1258,10 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= -github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= -github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= -github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= +github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= +github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= +github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= go.dedis.ch/fixbuf v1.0.3 h1:hGcV9Cd/znUxlusJ64eAlExS+5cJDIyTyEG+otu5wQs= go.dedis.ch/fixbuf v1.0.3/go.mod h1:yzJMt34Wa5xD37V5RTdmp38cz3QhMagdGoem9anUalw= go.dedis.ch/kyber/v3 v3.0.4/go.mod h1:OzvaEnPvKlyrWyp3kGXlFdp7ap1VC6RkZDTaPikqhsQ= @@ -1386,6 +1291,8 @@ go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0. go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.49.0/go.mod h1:1P/02zM3OwkX9uki+Wmxw3a5GVb6KUXRsa7m7bOC9Fg= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 h1:SpGay3w+nEwMpfVnbqOLH5gY52/foP8RE8UzTZ1pdSE= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1/go.mod h1:4UoMYEZOC0yN/sPGH76KPkkU7zgiEWYWL9vwmbnTJPE= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 h1:aFJWCqJMNjENlcleuuOkGAPH82y0yULBScfXcIEdS24= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1/go.mod h1:sEGXWArGqc3tVa+ekntsN65DmVbVeW+7lTKTjZF3/Fo= go.opentelemetry.io/contrib/propagators/b3 v1.24.0 h1:n4xwCdTx3pZqZs2CjS/CUZAs03y3dZcGhC/FepKtEUY= go.opentelemetry.io/contrib/propagators/b3 v1.24.0/go.mod h1:k5wRxKRU2uXx2F8uNJ4TaonuEO/V7/5xoz7kdsDACT8= go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= @@ -1443,23 +1350,18 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= @@ -1489,7 +1391,6 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -1498,8 +1399,6 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= @@ -1515,7 +1414,6 @@ golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -1525,7 +1423,6 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1543,17 +1440,13 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210331212208-0fccb6fa2b5c/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= @@ -1568,10 +1461,6 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210413134643-5e61552d6c78/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= @@ -1584,7 +1473,6 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1635,38 +1523,29 @@ golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210331175145-43e1dd70ce54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1705,17 +1584,14 @@ golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -1760,16 +1636,9 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= @@ -1782,8 +1651,6 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0= gonum.org/v1/gonum v0.14.0/go.mod h1:AoWeoz0becf9QMWtE8iWXNXc27fK4fNeHNf/oMejGfU= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= @@ -1803,11 +1670,8 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.149.0 h1:b2CqT6kG+zqJIVKRQ3ELJVLN1PwHZ6DJ3dW8yl82rgY= -google.golang.org/api v0.149.0/go.mod h1:Mwn1B7JTXrzXtnvmzQE2BD6bYZQ8DShKZDZbeN9I7qI= +google.golang.org/api v0.155.0 h1:vBmGhCYs0djJttDNynWo44zosHlPvHmA0XiN2zP2DtA= +google.golang.org/api v0.155.0/go.mod h1:GI5qK5f40kCpHfPn6+YzGAByIKWv8ujFnmoWm7Igduk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1815,10 +1679,8 @@ google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww google.golang.org/appengine v1.6.2/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1854,22 +1716,13 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210401141331-865547bb08e2/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405/go.mod h1:3WDQMjmJk36UQhjQ89emUzb1mdaHcPeeAh4SCBKznB4= -google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b h1:CIC2YMXmIhYw6evmhPxBKJ4fmLbOFtXQN/GV3XOZR8k= -google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1884,16 +1737,12 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/grpc/examples v0.0.0-20210424002626-9572fd6faeae/go.mod h1:Ly7ZA/ARzg8fnPU9TyZIxoz33sEUuWX7txiqs8lPTgE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1927,10 +1776,8 @@ gopkg.in/guregu/null.v4 v4.0.0 h1:1Wm3S1WEA2I26Kq+6vcW+w0gcDo44YKYD7YIEJNHDjg= gopkg.in/guregu/null.v4 v4.0.0/go.mod h1:YoQhUrADuG3i9WqesrCmpNRwm1ypAgSHYqoOcTu/JrI= gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= @@ -1946,14 +1793,13 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 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.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= -gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +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= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1989,8 +1835,8 @@ modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g= nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= -pgregory.net/rapid v0.5.5 h1:jkgx1TjbQPD/feRoK+S/mXw9e1uj6WilpHrXJowi6oA= -pgregory.net/rapid v0.5.5/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= diff --git a/integration-tests/ccip-tests/actions/ccip_helpers.go b/integration-tests/ccip-tests/actions/ccip_helpers.go index cd7ecd56c9..e2b9b70871 100644 --- a/integration-tests/ccip-tests/actions/ccip_helpers.go +++ b/integration-tests/ccip-tests/actions/ccip_helpers.go @@ -84,6 +84,7 @@ const ( defaultUSDCDestBytesOverhead = 640 defaultUSDCDestGasOverhead = 120_000 + DefaultDestinationGasLimit = 600_000 // DefaultResubscriptionTimeout denotes the max backoff duration for resubscription for various watch events // if the subscription keeps failing even after this duration, the test will fail DefaultResubscriptionTimeout = 2 * time.Hour @@ -396,15 +397,9 @@ func (ccipModule *CCIPCommon) ApproveTokens() error { } } - allowance, err := token.Allowance(ccipModule.ChainClient.GetDefaultWallet().Address(), ccipModule.Router.Address()) + err := token.Approve(ccipModule.ChainClient.GetDefaultWallet(), ccipModule.Router.Address(), ApprovedAmountToRouter) if err != nil { - return fmt.Errorf("failed to get allowance for token %s: %w", token.ContractAddress.Hex(), err) - } - if allowance.Cmp(ApprovedAmountToRouter) < 0 { - err := token.Approve(ccipModule.ChainClient.GetDefaultWallet(), ccipModule.Router.Address(), ApprovedAmountToRouter) - if err != nil { - return fmt.Errorf("failed to approve token %s: %w", token.ContractAddress.Hex(), err) - } + return fmt.Errorf("failed to approve token %s: %w", token.ContractAddress.Hex(), err) } if token.ContractAddress == ccipModule.FeeToken.EthAddress { isApproved = true @@ -1502,6 +1497,9 @@ func (sourceCCIP *SourceCCIPModule) UpdateBalance( ) { if len(sourceCCIP.TransferAmount) > 0 { for i := range sourceCCIP.TransferAmount { + if sourceCCIP.TransferAmount[i] == nil { // nil transfer amount means no transfer for this token + continue + } // if length of sourceCCIP.TransferAmount is more than available bridge token use first bridge token token := sourceCCIP.Common.BridgeTokens[0] if i < len(sourceCCIP.Common.BridgeTokens) { @@ -1560,23 +1558,43 @@ func (sourceCCIP *SourceCCIPModule) UpdateBalance( func (sourceCCIP *SourceCCIPModule) AssertSendRequestedLogFinalized( lggr *zerolog.Logger, txHash common.Hash, + sendReqData []*contracts.SendReqEventData, prevEventAt time.Time, reqStats []*testreporters.RequestStat, ) (time.Time, uint64, error) { + if len(sendReqData) != len(reqStats) { + return time.Time{}, 0, fmt.Errorf("sendReqData and reqStats length mismatch") + } + var gasUsed uint64 + receipt, err := sourceCCIP.Common.ChainClient.GetTxReceipt(txHash) + if err == nil { + gasUsed = receipt.GasUsed + } lggr.Info().Msg("Waiting for CCIPSendRequested event log to be finalized") finalizedBlockNum, finalizedAt, err := sourceCCIP.Common.ChainClient.WaitForFinalizedTx(txHash) if err != nil || finalizedBlockNum == nil { - for _, stat := range reqStats { - stat.UpdateState(lggr, stat.SeqNum, testreporters.SourceLogFinalized, time.Since(prevEventAt), testreporters.Failure) + for i, stat := range reqStats { + stat.UpdateState(lggr, stat.SeqNum, testreporters.SourceLogFinalized, time.Since(prevEventAt), testreporters.Failure, &testreporters.TransactionStats{ + MsgID: fmt.Sprintf("0x%x", sendReqData[i].MessageId[:]), + Fee: sendReqData[i].Fee.String(), + NoOfTokensSent: sendReqData[i].NoOfTokens, + MessageBytesLength: int64(sendReqData[i].DataLength), + TxHash: txHash.Hex(), + }) } return time.Time{}, 0, fmt.Errorf("error waiting for CCIPSendRequested event log to be finalized - %w", err) } - for _, stat := range reqStats { + for i, stat := range reqStats { stat.UpdateState(lggr, stat.SeqNum, testreporters.SourceLogFinalized, finalizedAt.Sub(prevEventAt), testreporters.Success, - testreporters.TransactionStats{ - TxHash: txHash.Hex(), - FinalizedByBlock: finalizedBlockNum.String(), - FinalizedAt: finalizedAt.String(), + &testreporters.TransactionStats{ + MsgID: fmt.Sprintf("0x%x", sendReqData[i].MessageId[:]), + Fee: sendReqData[i].Fee.String(), + GasUsed: gasUsed, + NoOfTokensSent: sendReqData[i].NoOfTokens, + MessageBytesLength: int64(sendReqData[i].DataLength), + TxHash: txHash.Hex(), + FinalizedByBlock: finalizedBlockNum.String(), + FinalizedAt: finalizedAt.String(), }) } return finalizedAt, finalizedBlockNum.Uint64(), nil @@ -1632,16 +1650,10 @@ func (sourceCCIP *SourceCCIPModule) AssertEventCCIPSendRequested( seqNum := sendRequestedEvent.SequenceNumber lggr = ptr.Ptr(lggr.With(). Uint64("SequenceNumber", seqNum). - Str("msgId ", fmt.Sprintf("0x%x", sendRequestedEvent.MessageId[:])). + Str("MsgID", fmt.Sprintf("0x%x", sendRequestedEvent.MessageId[:])). Logger()) // prevEventAt is the time when the message was successful, this should be same as the time when the event was emitted - reqStat[i].UpdateState(lggr, seqNum, testreporters.CCIPSendRe, 0, testreporters.Success, - testreporters.TransactionStats{ - MsgID: fmt.Sprintf("0x%x", sendRequestedEvent.MessageId[:]), - TxHash: "", - NoOfTokensSent: sendRequestedEvent.NoOfTokens, - MessageBytesLength: int64(sendRequestedEvent.DataLength), - }) + reqStat[i].UpdateState(lggr, seqNum, testreporters.CCIPSendRe, 0, testreporters.Success, nil) } var err error if len(sendRequestedEvents) == 0 { @@ -1655,7 +1667,10 @@ func (sourceCCIP *SourceCCIPModule) AssertEventCCIPSendRequested( if sourceCCIP.Common.IsConnectionRestoredRecently != nil && !sourceCCIP.Common.IsConnectionRestoredRecently.Load() { if resetTimer > 2 { for _, stat := range reqStat { - stat.UpdateState(lggr, 0, testreporters.CCIPSendRe, time.Since(prevEventAt), testreporters.Failure) + stat.UpdateState(lggr, 0, testreporters.CCIPSendRe, time.Since(prevEventAt), testreporters.Failure, + &testreporters.TransactionStats{ + TxHash: txHash, + }) } return nil, time.Now(), fmt.Errorf("possible RPC issue - CCIPSendRequested event is not found for tx %s", txHash) } @@ -1665,7 +1680,10 @@ func (sourceCCIP *SourceCCIPModule) AssertEventCCIPSendRequested( continue } for _, stat := range reqStat { - stat.UpdateState(lggr, 0, testreporters.CCIPSendRe, time.Since(prevEventAt), testreporters.Failure) + stat.UpdateState(lggr, 0, testreporters.CCIPSendRe, time.Since(prevEventAt), testreporters.Failure, + &testreporters.TransactionStats{ + TxHash: txHash, + }) } return nil, time.Now(), fmt.Errorf("CCIPSendRequested event is not found for tx %s", txHash) } @@ -1691,6 +1709,9 @@ func (sourceCCIP *SourceCCIPModule) CCIPMsg( tokenAndAmounts := []router.ClientEVMTokenAmount{} for i, amount := range sourceCCIP.TransferAmount { + if amount == nil { // make nil transfer amount 0 to avoid panics + sourceCCIP.TransferAmount[i] = big.NewInt(0) + } token := sourceCCIP.Common.BridgeTokens[0] // if length of sourceCCIP.TransferAmount is more than available bridge token use first bridge token if i < len(sourceCCIP.Common.BridgeTokens) { @@ -2285,7 +2306,7 @@ func (destCCIP *DestCCIPModule) AssertEventExecutionStateChanged( lggr.Info().Int64("seqNum", int64(seqNum)).Uint8("ExecutionState", e.State).Msg("ExecutionStateChanged event received") reqStat.UpdateState(lggr, seqNum, testreporters.ExecStateChanged, receivedAt.Sub(timeNow), testreporters.Success, - testreporters.TransactionStats{ + &testreporters.TransactionStats{ TxHash: vLogs.TxHash.Hex(), MsgID: fmt.Sprintf("0x%x", e.MessageId[:]), GasUsed: gasUsed, @@ -2293,7 +2314,7 @@ func (destCCIP *DestCCIPModule) AssertEventExecutionStateChanged( ) return e.State, nil } - reqStat.UpdateState(lggr, seqNum, testreporters.ExecStateChanged, time.Since(timeNow), testreporters.Failure) + reqStat.UpdateState(lggr, seqNum, testreporters.ExecStateChanged, time.Since(timeNow), testreporters.Failure, nil) return e.State, fmt.Errorf("ExecutionStateChanged event state - expected %d actual - %d with data %x for seq num %v for lane %d-->%d", execState, testhelpers.MessageExecutionState(e.State), e.ReturnData, seqNum, destCCIP.SourceChainId, destCCIP.Common.ChainClient.GetChainID()) } @@ -2303,7 +2324,7 @@ func (destCCIP *DestCCIPModule) AssertEventExecutionStateChanged( if destCCIP.Common.IsConnectionRestoredRecently != nil && !destCCIP.Common.IsConnectionRestoredRecently.Load() { // if timer already has been reset 2 times we fail with warning if resetTimer > 2 { - reqStat.UpdateState(lggr, seqNum, testreporters.ExecStateChanged, time.Since(timeNow), testreporters.Failure) + reqStat.UpdateState(lggr, seqNum, testreporters.ExecStateChanged, time.Since(timeNow), testreporters.Failure, nil) return 0, fmt.Errorf("possible RPC issues - ExecutionStateChanged event not found for seq num %d for lane %d-->%d", seqNum, destCCIP.SourceChainId, destCCIP.Common.ChainClient.GetChainID()) } @@ -2312,7 +2333,7 @@ func (destCCIP *DestCCIPModule) AssertEventExecutionStateChanged( lggr.Info().Int("count of reset", resetTimer).Msg("Resetting timer to validate ExecutionStateChanged event") continue } - reqStat.UpdateState(lggr, seqNum, testreporters.ExecStateChanged, time.Since(timeNow), testreporters.Failure) + reqStat.UpdateState(lggr, seqNum, testreporters.ExecStateChanged, time.Since(timeNow), testreporters.Failure, nil) return 0, fmt.Errorf("ExecutionStateChanged event not found for seq num %d for lane %d-->%d", seqNum, destCCIP.SourceChainId, destCCIP.Common.ChainClient.GetChainID()) } @@ -2370,7 +2391,7 @@ func (destCCIP *DestCCIPModule) AssertEventReportAccepted( gasUsed = receipt.GasUsed } reqStat.UpdateState(lggr, seqNum, testreporters.Commit, totalTime, testreporters.Success, - testreporters.TransactionStats{ + &testreporters.TransactionStats{ GasUsed: gasUsed, TxHash: reportAccepted.Raw.TxHash.String(), CommitRoot: fmt.Sprintf("%x", reportAccepted.MerkleRoot), @@ -2382,7 +2403,7 @@ func (destCCIP *DestCCIPModule) AssertEventReportAccepted( // if there is connection issue reset the context : if destCCIP.Common.IsConnectionRestoredRecently != nil && !destCCIP.Common.IsConnectionRestoredRecently.Load() { if resetTimerCount > 2 { - reqStat.UpdateState(lggr, seqNum, testreporters.Commit, time.Since(prevEventAt), testreporters.Failure) + reqStat.UpdateState(lggr, seqNum, testreporters.Commit, time.Since(prevEventAt), testreporters.Failure, nil) return nil, time.Now().UTC(), fmt.Errorf("possible RPC issue - ReportAccepted is not found for seq num %d lane %d-->%d", seqNum, destCCIP.SourceChainId, destCCIP.Common.ChainClient.GetChainID()) } @@ -2391,7 +2412,7 @@ func (destCCIP *DestCCIPModule) AssertEventReportAccepted( lggr.Info().Int("count of reset", resetTimerCount).Msg("Resetting timer to validate ReportAccepted event") continue } - reqStat.UpdateState(lggr, seqNum, testreporters.Commit, time.Since(prevEventAt), testreporters.Failure) + reqStat.UpdateState(lggr, seqNum, testreporters.Commit, time.Since(prevEventAt), testreporters.Failure, nil) return nil, time.Now().UTC(), fmt.Errorf("ReportAccepted is not found for seq num %d lane %d-->%d", seqNum, destCCIP.SourceChainId, destCCIP.Common.ChainClient.GetChainID()) } @@ -2464,7 +2485,7 @@ func (destCCIP *DestCCIPModule) AssertReportBlessed( gasUsed = receipt.GasUsed } reqStat.UpdateState(lggr, seqNum, testreporters.ReportBlessed, receivedAt.Sub(prevEventAt), testreporters.Success, - testreporters.TransactionStats{ + &testreporters.TransactionStats{ GasUsed: gasUsed, TxHash: vLogs.TxHash.String(), CommitRoot: fmt.Sprintf("%x", CommitReport.MerkleRoot), @@ -2476,7 +2497,7 @@ func (destCCIP *DestCCIPModule) AssertReportBlessed( // if there is connection issue reset the context : if destCCIP.Common.IsConnectionRestoredRecently != nil && !destCCIP.Common.IsConnectionRestoredRecently.Load() { if resetTimerCount > 2 { - reqStat.UpdateState(lggr, seqNum, testreporters.ReportBlessed, time.Since(prevEventAt), testreporters.Failure) + reqStat.UpdateState(lggr, seqNum, testreporters.ReportBlessed, time.Since(prevEventAt), testreporters.Failure, nil) return time.Now().UTC(), fmt.Errorf("possible RPC issue - ReportBlessed is not found for interval min - %d max - %d lane %d-->%d", CommitReport.Min, CommitReport.Max, destCCIP.SourceChainId, destCCIP.Common.ChainClient.GetChainID()) } @@ -2485,7 +2506,7 @@ func (destCCIP *DestCCIPModule) AssertReportBlessed( lggr.Info().Int("count of reset", resetTimerCount).Msg("Resetting timer to validate ReportBlessed event") continue } - reqStat.UpdateState(lggr, seqNum, testreporters.ReportBlessed, time.Since(prevEventAt), testreporters.Failure) + reqStat.UpdateState(lggr, seqNum, testreporters.ReportBlessed, time.Since(prevEventAt), testreporters.Failure, nil) return time.Now().UTC(), fmt.Errorf("ReportBlessed is not found for interval min - %d max - %d lane %d-->%d", CommitReport.Min, CommitReport.Max, destCCIP.SourceChainId, destCCIP.Common.ChainClient.GetChainID()) } @@ -2524,7 +2545,7 @@ func (destCCIP *DestCCIPModule) AssertSeqNumberExecuted( // if there is connection issue reset the context : if destCCIP.Common.IsConnectionRestoredRecently != nil && !destCCIP.Common.IsConnectionRestoredRecently.Load() { if resetTimerCount > 2 { - reqStat.UpdateState(lggr, seqNumberBefore, testreporters.Commit, time.Since(timeNow), testreporters.Failure) + reqStat.UpdateState(lggr, seqNumberBefore, testreporters.Commit, time.Since(timeNow), testreporters.Failure, nil) return fmt.Errorf("possible RPC issue - sequence number is not increased for seq num %d lane %d-->%d", seqNumberBefore, destCCIP.SourceChainId, destCCIP.Common.ChainClient.GetChainID()) } @@ -2533,7 +2554,7 @@ func (destCCIP *DestCCIPModule) AssertSeqNumberExecuted( lggr.Info().Int("count of reset", resetTimerCount).Msg("Resetting timer to validate seqnumber increase in commit store") continue } - reqStat.UpdateState(lggr, seqNumberBefore, testreporters.Commit, time.Since(timeNow), testreporters.Failure) + reqStat.UpdateState(lggr, seqNumberBefore, testreporters.Commit, time.Since(timeNow), testreporters.Failure, nil) return fmt.Errorf("sequence number is not increased for seq num %d lane %d-->%d", seqNumberBefore, destCCIP.SourceChainId, destCCIP.Common.ChainClient.GetChainID()) } @@ -2732,7 +2753,7 @@ func (lane *CCIPLane) AddToSentReqs(txHash common.Hash, reqStats []*testreporter request, rcpt, err := CCIPRequestFromTxHash(txHash, lane.Source.Common.ChainClient) if err != nil { for _, stat := range reqStats { - stat.UpdateState(lane.Logger, 0, testreporters.TX, 0, testreporters.Failure) + stat.UpdateState(lane.Logger, 0, testreporters.TX, 0, testreporters.Failure, nil) } return rcpt, fmt.Errorf("could not get request from tx hash %s: %w", txHash.Hex(), err) } @@ -2755,7 +2776,7 @@ 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()) - genericMsg, err := lane.Source.CCIPMsg(lane.Dest.ReceiverDapp.EthAddress, big.NewInt(600_000)) + genericMsg, err := lane.Source.CCIPMsg(lane.Dest.ReceiverDapp.EthAddress, big.NewInt(DefaultDestinationGasLimit)) if err != nil { return fmt.Errorf("failed to form the ccip message: %w", err) } @@ -2764,7 +2785,7 @@ func (lane *CCIPLane) Multicall(noOfRequests int, multiSendAddr common.Address) return fmt.Errorf("failed getting the chain selector: %w", err) } var reqStats []*testreporters.RequestStat - var txstats []testreporters.TransactionStats + var txstats []*testreporters.TransactionStats for i := 1; i <= noOfRequests; i++ { // form the message for transfer msg := genericMsg @@ -2800,7 +2821,7 @@ func (lane *CCIPLane) Multicall(noOfRequests int, multiSendAddr common.Address) } } stat := testreporters.NewCCIPRequestStats(int64(lane.NumberOfReq+i), lane.SourceNetworkName, lane.DestNetworkName) - txstats = append(txstats, testreporters.TransactionStats{ + txstats = append(txstats, &testreporters.TransactionStats{ Fee: fee.String(), NoOfTokensSent: len(msg.TokenAmounts), MessageBytesLength: int64(len(msg.Data)), @@ -2821,7 +2842,7 @@ func (lane *CCIPLane) Multicall(noOfRequests int, multiSendAddr common.Address) if err != nil { // update the stats as failure for all the requests in the multicall tx for _, stat := range reqStats { - stat.UpdateState(lane.Logger, 0, testreporters.TX, 0, testreporters.Failure) + stat.UpdateState(lane.Logger, 0, testreporters.TX, 0, testreporters.Failure, nil) } return fmt.Errorf("failed to send the multicall: %w", err) } @@ -2852,12 +2873,12 @@ func (lane *CCIPLane) SendRequests(noOfRequests int, gasLimit *big.Int) error { gasLimit, ) if err != nil { - stat.UpdateState(lane.Logger, 0, testreporters.TX, txConfirmationDur, testreporters.Failure) + stat.UpdateState(lane.Logger, 0, testreporters.TX, txConfirmationDur, testreporters.Failure, nil) return fmt.Errorf("could not send request: %w", err) } err = lane.Source.Common.ChainClient.WaitForEvents() if err != nil { - stat.UpdateState(lane.Logger, 0, testreporters.TX, txConfirmationDur, testreporters.Failure) + stat.UpdateState(lane.Logger, 0, testreporters.TX, txConfirmationDur, testreporters.Failure, nil) return fmt.Errorf("could not send request: %w", err) } @@ -2867,22 +2888,11 @@ func (lane *CCIPLane) SendRequests(noOfRequests int, gasLimit *big.Int) error { noOfTokens++ } } - rcpt, err := lane.AddToSentReqs(txHash, []*testreporters.RequestStat{stat}) + _, err = lane.AddToSentReqs(txHash, []*testreporters.RequestStat{stat}) if err != nil { return err } - var gasUsed uint64 - if rcpt != nil { - gasUsed = rcpt.GasUsed - } - stat.UpdateState(lane.Logger, 0, - testreporters.TX, txConfirmationDur, testreporters.Success, testreporters.TransactionStats{ - Fee: fee.String(), - GasUsed: gasUsed, - TxHash: rcpt.TxHash.Hex(), - NoOfTokensSent: noOfTokens, - MessageBytesLength: lane.Source.MsgDataLength, - }) + stat.UpdateState(lane.Logger, 0, testreporters.TX, txConfirmationDur, testreporters.Success, nil) lane.TotalFee = bigmath.Add(lane.TotalFee, fee) } @@ -2984,7 +2994,7 @@ func (lane *CCIPLane) ExecuteManually(options ...ManualExecutionOption) error { OnRamp: lane.Source.OnRamp.Address(), OffRamp: lane.Dest.OffRamp.Address(), SendReqLogIndex: logIndex, - GasLimit: big.NewInt(600_000), + GasLimit: big.NewInt(DefaultDestinationGasLimit), } timeNow := time.Now().UTC() tx, err := args.ExecuteManually() @@ -3086,7 +3096,6 @@ func ExpectPhaseToFail(phase testreporters.Phase, phaseSpecificOptions ...PhaseS // If not, just pass in nil. func (lane *CCIPLane) ValidateRequests(validationOptionFuncs ...ValidationOptionFunc) { var opts validationOptions - require.LessOrEqual(lane.Test, len(validationOptionFuncs), 1, "only one validation option function can be passed in to ValidateRequests") for _, f := range validationOptionFuncs { if f != nil { f(lane.Logger, &opts) @@ -3137,13 +3146,13 @@ func (lane *CCIPLane) ValidateRequestByTxHash(txHash common.Hash, opts validatio return phaseErr } - sourceLogFinalizedAt, _, err := lane.Source.AssertSendRequestedLogFinalized(lane.Logger, txHash, ccipSendReqGenAt, reqStats) + sourceLogFinalizedAt, _, err := lane.Source.AssertSendRequestedLogFinalized(lane.Logger, txHash, msgLogs, ccipSendReqGenAt, reqStats) if shouldReturn, phaseErr := isPhaseValid(lane.Logger, testreporters.SourceLogFinalized, opts, err); shouldReturn { return phaseErr } for _, msgLog := range msgLogs { seqNumber := msgLog.SequenceNumber - lane.Logger = ptr.Ptr(lane.Logger.With().Str("msgId ", fmt.Sprintf("0x%x", msgLog.MessageId[:])).Logger()) + lane.Logger = ptr.Ptr(lane.Logger.With().Str("msgId", fmt.Sprintf("0x%x", msgLog.MessageId[:])).Logger()) var reqStat *testreporters.RequestStat for _, stat := range reqStats { if stat.SeqNum == seqNumber { @@ -3325,6 +3334,7 @@ func (lane *CCIPLane) StartEventWatchers() error { DataLength: len(e.Message.Data), NoOfTokens: len(e.Message.TokenAmounts), Raw: e.Raw, + Fee: e.Message.FeeTokenAmount, })) } else { lane.Source.CCIPSendRequestedWatcher.Store(e.Raw.TxHash.Hex(), []*contracts.SendReqEventData{ @@ -3334,6 +3344,7 @@ func (lane *CCIPLane) StartEventWatchers() error { DataLength: len(e.Message.Data), NoOfTokens: len(e.Message.TokenAmounts), Raw: e.Raw, + Fee: e.Message.FeeTokenAmount, }, }) } diff --git a/integration-tests/ccip-tests/chaos/ccip_test.go b/integration-tests/ccip-tests/chaos/ccip_test.go index 30681eed92..4b1dda7a91 100644 --- a/integration-tests/ccip-tests/chaos/ccip_test.go +++ b/integration-tests/ccip-tests/chaos/ccip_test.go @@ -124,7 +124,7 @@ func TestChaosCCIP(t *testing.T) { lane.RecordStateBeforeTransfer() // Send the ccip-request and verify ocr2 is running - err := lane.SendRequests(1, big.NewInt(600_000)) + err := lane.SendRequests(1, big.NewInt(actions.DefaultDestinationGasLimit)) require.NoError(t, err) lane.ValidateRequests(nil) @@ -139,7 +139,7 @@ func TestChaosCCIP(t *testing.T) { }) lane.RecordStateBeforeTransfer() // Now send the ccip-request while the chaos is at play - err = lane.SendRequests(numOfRequests, big.NewInt(600_000)) + err = lane.SendRequests(numOfRequests, big.NewInt(actions.DefaultDestinationGasLimit)) require.NoError(t, err) if in.waitForChaosRecovery { // wait for chaos to be recovered before further validation diff --git a/integration-tests/ccip-tests/contracts/contract_models.go b/integration-tests/ccip-tests/contracts/contract_models.go index a75ddced67..7ab92a673c 100644 --- a/integration-tests/ccip-tests/contracts/contract_models.go +++ b/integration-tests/ccip-tests/contracts/contract_models.go @@ -271,9 +271,6 @@ func (token *ERC20Token) Approve(onBehalf *blockchain.EthereumWallet, spender st if err != nil { return fmt.Errorf("failed to get balance of onBehalf: %w", err) } - if onBehalfBalance.Cmp(amount) < 0 { - return fmt.Errorf("onBehalf '%s' does not have enough balance to approve", onBehalf.Address()) - } currentAllowance, err := token.Allowance(onBehalf.Address(), spender) if err != nil { return fmt.Errorf("failed to get current allowance for '%s' on behalf of '%s': %w", spender, onBehalf.Address(), err) @@ -1500,6 +1497,7 @@ type SendReqEventData struct { DataLength int NoOfTokens int Raw types.Log + Fee *big.Int } type OnRampWrapper struct { @@ -1715,6 +1713,7 @@ func (onRamp *OnRamp) SetNops() error { return onRamp.client.ProcessTransaction(tx) } +// SetTokenTransferFeeConfig sets the token transfer fee configuration for the OnRamp func (onRamp *OnRamp) SetTokenTransferFeeConfig(tokenTransferFeeConfig []evm_2_evm_onramp.EVM2EVMOnRampTokenTransferFeeConfigArgs) error { opts, err := onRamp.client.TransactionOpts(onRamp.client.GetDefaultWallet()) if err != nil { diff --git a/integration-tests/ccip-tests/load/ccip_loadgen.go b/integration-tests/ccip-tests/load/ccip_loadgen.go index 8be083ccd2..ab74dd4509 100644 --- a/integration-tests/ccip-tests/load/ccip_loadgen.go +++ b/integration-tests/ccip-tests/load/ccip_loadgen.go @@ -11,7 +11,6 @@ import ( "time" "github.com/AlekSi/pointer" - "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/rs/zerolog" @@ -258,78 +257,25 @@ func (c *CCIPE2ELoad) Call(_ *wasp.Generator) *wasp.Response { } startTime := time.Now().UTC() if feeToken != common.HexToAddress("0x0") { - sendTx, err = sourceCCIP.Common.Router.CCIPSend(destChainSelector, msg, nil) + sendTx, err = sourceCCIP.Common.Router.CCIPSendAndProcessTx(destChainSelector, msg, nil) } else { // add a bit buffer to fee - sendTx, err = sourceCCIP.Common.Router.CCIPSend(destChainSelector, msg, new(big.Int).Add(big.NewInt(1e5), fee)) + sendTx, err = sourceCCIP.Common.Router.CCIPSendAndProcessTx(destChainSelector, msg, new(big.Int).Add(big.NewInt(1e5), fee)) } if err != nil { - stats.UpdateState(&lggr, 0, testreporters.TX, time.Since(startTime), testreporters.Failure) + stats.UpdateState(&lggr, 0, testreporters.TX, time.Since(startTime), testreporters.Failure, nil) res.Error = fmt.Sprintf("ccip-send tx error %s for reqNo %d", err.Error(), msgSerialNo) res.Data = stats.StatusByPhase res.Failed = true return res } - err = sourceCCIP.Common.ChainClient.MarkTxAsSentOnL2(sendTx) - - if err != nil { - stats.UpdateState(&lggr, 0, testreporters.TX, time.Since(startTime), testreporters.Failure) - res.Error = fmt.Sprintf("reqNo %d failed to mark tx as sent on L2 %s", msgSerialNo, err.Error()) - res.Data = stats.StatusByPhase - res.Failed = true - return res - } - txConfirmationTime := time.Now().UTC() // wait for the tx to be mined, timeout is set to 10 minutes lggr.Info().Str("tx", sendTx.Hash().Hex()).Msg("waiting for tx to be mined") - ctx, cancel := context.WithTimeout(context.Background(), sourceCCIP.Common.ChainClient.GetNetworkConfig().Timeout.Duration) - defer cancel() - rcpt, err := bind.WaitMined(ctx, sourceCCIP.Common.ChainClient.DeployBackend(), sendTx) - if err != nil { - res.Error = fmt.Sprintf("ccip-send request tx not mined, err=%s", err.Error()) - res.Failed = true - res.Data = stats.StatusByPhase - return res - } - if rcpt == nil { - res.Error = "ccip-send request tx not mined, receipt is nil" - res.Failed = true - res.Data = stats.StatusByPhase - return res - } - hdr, err := c.Lane.Source.Common.ChainClient.HeaderByNumber(context.Background(), rcpt.BlockNumber) - if err == nil && hdr != nil { - txConfirmationTime = hdr.Timestamp - } lggr = lggr.With().Str("Msg Tx", sendTx.Hash().String()).Logger() - if rcpt.Status != types.ReceiptStatusSuccessful { - stats.UpdateState(&lggr, 0, testreporters.TX, txConfirmationTime.Sub(startTime), testreporters.Failure, - testreporters.TransactionStats{ - Fee: fee.String(), - GasUsed: rcpt.GasUsed, - TxHash: sendTx.Hash().Hex(), - NoOfTokensSent: len(msg.TokenAmounts), - MessageBytesLength: int64(len(msg.Data)), - }) - errReason, v, err := c.Lane.Source.Common.ChainClient.RevertReasonFromTx(rcpt.TxHash, router.RouterABI) - if err != nil { - errReason = "could not decode" - } - res.Error = fmt.Sprintf("ccip-send request receipt is not successful, errReason=%s, args =%v", errReason, v) - res.Failed = true - res.Data = stats.StatusByPhase - return res - } - stats.UpdateState(&lggr, 0, testreporters.TX, txConfirmationTime.Sub(startTime), testreporters.Success, - testreporters.TransactionStats{ - Fee: fee.String(), - GasUsed: rcpt.GasUsed, - TxHash: sendTx.Hash().Hex(), - NoOfTokensSent: len(msg.TokenAmounts), - MessageBytesLength: int64(len(msg.Data)), - }) + + stats.UpdateState(&lggr, 0, testreporters.TX, txConfirmationTime.Sub(startTime), testreporters.Success, nil) err = c.Validate(lggr, sendTx, txConfirmationTime, []*testreporters.RequestStat{stats}) if err != nil { res.Error = err.Error() @@ -356,19 +302,23 @@ func (c *CCIPE2ELoad) Validate(lggr zerolog.Logger, sendTx *types.Transaction, t if c.Lane.Source.Common.ChainClient.GetNetworkConfig().FinalityDepth == 0 && lstFinalizedBlock != 0 && lstFinalizedBlock > msgLogs[0].Raw.BlockNumber { sourceLogFinalizedAt = c.LastFinalizedTimestamp.Load() - for _, stat := range stats { + for i, stat := range stats { stat.UpdateState(&lggr, stat.SeqNum, testreporters.SourceLogFinalized, sourceLogFinalizedAt.Sub(sourceLogTime), testreporters.Success, - testreporters.TransactionStats{ - TxHash: msgLogs[0].Raw.TxHash.String(), - FinalizedByBlock: strconv.FormatUint(lstFinalizedBlock, 10), - FinalizedAt: sourceLogFinalizedAt.String(), + &testreporters.TransactionStats{ + TxHash: msgLogs[i].Raw.TxHash.Hex(), + FinalizedByBlock: strconv.FormatUint(lstFinalizedBlock, 10), + FinalizedAt: sourceLogFinalizedAt.String(), + Fee: msgLogs[i].Fee.String(), + NoOfTokensSent: msgLogs[i].NoOfTokens, + MessageBytesLength: int64(msgLogs[i].DataLength), + MsgID: fmt.Sprintf("0x%x", msgLogs[i].MessageId[:]), }) } } else { var finalizingBlock uint64 sourceLogFinalizedAt, finalizingBlock, err = c.Lane.Source.AssertSendRequestedLogFinalized( - &lggr, sendTx.Hash(), sourceLogTime, stats) + &lggr, msgLogs[0].Raw.TxHash, msgLogs, sourceLogTime, stats) if err != nil { return err } @@ -379,7 +329,7 @@ func (c *CCIPE2ELoad) Validate(lggr zerolog.Logger, sendTx *types.Transaction, t for _, msgLog := range msgLogs { seqNum := msgLog.SequenceNumber var reqStat *testreporters.RequestStat - lggr = lggr.With().Str("msgId ", fmt.Sprintf("0x%x", msgLog.MessageId[:])).Logger() + lggr = lggr.With().Str("MsgID", fmt.Sprintf("0x%x", msgLog.MessageId[:])).Logger() for _, stat := range stats { if stat.SeqNum == seqNum { reqStat = stat diff --git a/integration-tests/ccip-tests/load/ccip_multicall_loadgen.go b/integration-tests/ccip-tests/load/ccip_multicall_loadgen.go index b0824ac9b1..ad3960dee2 100644 --- a/integration-tests/ccip-tests/load/ccip_multicall_loadgen.go +++ b/integration-tests/ccip-tests/load/ccip_multicall_loadgen.go @@ -1,13 +1,11 @@ package load import ( - "context" "fmt" "math/big" "testing" "time" - "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/prometheus/common/model" "github.com/rs/zerolog" @@ -178,33 +176,14 @@ func (m *CCIPMultiCallLoadGenerator) Call(_ *wasp.Generator) *wasp.Response { lggr := m.logger.With().Str("Msg Tx", sendTx.Hash().String()).Logger() txConfirmationTime := time.Now().UTC() - rcpt, err1 := bind.WaitMined(context.Background(), m.client.DeployBackend(), sendTx) - if err1 == nil { - hdr, err1 := m.client.HeaderByNumber(context.Background(), rcpt.BlockNumber) - if err1 == nil { - txConfirmationTime = hdr.Timestamp - } - } - var gasUsed uint64 - if rcpt != nil { - gasUsed = rcpt.GasUsed - } for _, rValues := range returnValuesByDest { if len(rValues.Stats) != len(rValues.Msgs) { res.Error = fmt.Sprintf("number of stats %d and msgs %d should be same", len(rValues.Stats), len(rValues.Msgs)) res.Failed = true return res } - for i, stat := range rValues.Stats { - msg := rValues.Msgs[i] - stat.UpdateState(&lggr, 0, testreporters.TX, startTime.Sub(txConfirmationTime), testreporters.Success, - testreporters.TransactionStats{ - Fee: msg.Fee.String(), - GasUsed: gasUsed, - TxHash: sendTx.Hash().Hex(), - NoOfTokensSent: len(msg.Msg.TokenAmounts), - MessageBytesLength: int64(len(msg.Msg.Data)), - }) + for _, stat := range rValues.Stats { + stat.UpdateState(&lggr, 0, testreporters.TX, startTime.Sub(txConfirmationTime), testreporters.Success, nil) } } diff --git a/integration-tests/ccip-tests/load/helper.go b/integration-tests/ccip-tests/load/helper.go index f8acd09953..64c43bc161 100644 --- a/integration-tests/ccip-tests/load/helper.go +++ b/integration-tests/ccip-tests/load/helper.go @@ -174,7 +174,7 @@ func (l *LoadArgs) ValidateCurseFollowedByUncurse() { lane.Source.TransferAmount = []*big.Int{} failedTx, _, _, err := lane.Source.SendRequest( lane.Dest.ReceiverDapp.EthAddress, - big.NewInt(600_000), // gas limit + big.NewInt(actions.DefaultDestinationGasLimit), // gas limit ) if lane.Source.Common.ChainClient.GetNetworkConfig().MinimumConfirmations > 0 { require.Error(l.t, err) diff --git a/integration-tests/ccip-tests/smoke/ccip_test.go b/integration-tests/ccip-tests/smoke/ccip_test.go index 73b4947075..a9de3abe85 100644 --- a/integration-tests/ccip-tests/smoke/ccip_test.go +++ b/integration-tests/ccip-tests/smoke/ccip_test.go @@ -128,17 +128,8 @@ func TestSmokeCCIPRateLimit(t *testing.T) { src := tc.lane.Source // add liquidity to pools on both networks if !pointer.GetBool(TestCfg.TestGroupInput.ExistingDeployment) { - addFund := func(ccipCommon *actions.CCIPCommon) { - for i, btp := range ccipCommon.BridgeTokenPools { - token := ccipCommon.BridgeTokens[i] - err := btp.AddLiquidity( - token, token.OwnerWallet, new(big.Int).Mul(AggregatedRateLimitCapacity, big.NewInt(20)), - ) - require.NoError(t, err) - } - } - addFund(src.Common) - addFund(tc.lane.Dest.Common) + addLiquidity(t, src.Common, new(big.Int).Mul(AggregatedRateLimitCapacity, big.NewInt(20))) + addLiquidity(t, tc.lane.Dest.Common, new(big.Int).Mul(AggregatedRateLimitCapacity, big.NewInt(20))) } log.Info(). Str("Source", tc.lane.SourceNetworkName). @@ -252,7 +243,7 @@ func TestSmokeCCIPRateLimit(t *testing.T) { require.NoError(t, tc.lane.Source.Common.ChainClient.WaitForEvents()) failedTx, _, _, err := tc.lane.Source.SendRequest( tc.lane.Dest.ReceiverDapp.EthAddress, - big.NewInt(600_000), // gas limit + big.NewInt(actions.DefaultDestinationGasLimit), // gas limit ) require.NoError(t, err) require.Error(t, tc.lane.Source.Common.ChainClient.WaitForEvents()) @@ -272,7 +263,7 @@ func TestSmokeCCIPRateLimit(t *testing.T) { tc.lane.Logger.Info().Str("tokensToSend", tokensToSend.String()).Msg("99% of Aggregated Capacity") tc.lane.RecordStateBeforeTransfer() src.TransferAmount[0] = tokensToSend - err = tc.lane.SendRequests(1, big.NewInt(600_000)) + err = tc.lane.SendRequests(1, big.NewInt(actions.DefaultDestinationGasLimit)) require.NoError(t, err) // try to send again with amount more than the amount refilled by rate and @@ -280,7 +271,7 @@ func TestSmokeCCIPRateLimit(t *testing.T) { src.TransferAmount[0] = new(big.Int).Mul(AggregatedRateLimitRate, big.NewInt(10)) failedTx, _, _, err = tc.lane.Source.SendRequest( tc.lane.Dest.ReceiverDapp.EthAddress, - big.NewInt(600_000), // gas limit + big.NewInt(actions.DefaultDestinationGasLimit), // gas limit ) tc.lane.Logger.Info().Str("tokensToSend", src.TransferAmount[0].String()).Msg("More than Aggregated Rate") require.NoError(t, err) @@ -347,7 +338,7 @@ func TestSmokeCCIPRateLimit(t *testing.T) { failedTx, _, _, err = tc.lane.Source.SendRequest( tc.lane.Dest.ReceiverDapp.EthAddress, - big.NewInt(600_000), // gas limit + big.NewInt(actions.DefaultDestinationGasLimit), // gas limit ) require.NoError(t, err) require.Error(t, tc.lane.Source.Common.ChainClient.WaitForEvents()) @@ -367,7 +358,7 @@ func TestSmokeCCIPRateLimit(t *testing.T) { src.TransferAmount[0] = tokensToSend tc.lane.Logger.Info().Str("tokensToSend", tokensToSend.String()).Msg("99% of Token Pool Capacity") tc.lane.RecordStateBeforeTransfer() - err = tc.lane.SendRequests(1, big.NewInt(600_000)) + err = tc.lane.SendRequests(1, big.NewInt(actions.DefaultDestinationGasLimit)) require.NoError(t, err) // try to send again with amount more than the amount refilled by token pool rate and @@ -382,7 +373,7 @@ func TestSmokeCCIPRateLimit(t *testing.T) { require.NoError(t, tc.lane.Source.Common.ChainClient.WaitForEvents()) failedTx, _, _, err = tc.lane.Source.SendRequest( tc.lane.Dest.ReceiverDapp.EthAddress, - big.NewInt(600_000), + big.NewInt(actions.DefaultDestinationGasLimit), ) require.NoError(t, err) require.Error(t, tc.lane.Source.Common.ChainClient.WaitForEvents()) @@ -403,11 +394,14 @@ func TestSmokeCCIPRateLimit(t *testing.T) { } } -func TestSmokeCCIPSelfServeRateLimitOnRamp(t *testing.T) { +func TestSmokeCCIPOnRampLimits(t *testing.T) { t.Parallel() log := logging.GetTestLogger(t) - TestCfg := testsetups.NewCCIPTestConfig(t, log, testconfig.Smoke) + TestCfg := testsetups.NewCCIPTestConfig(t, log, testconfig.Smoke, testsetups.WithNoTokensPerMessage(4), testsetups.WithTokensPerChain(4)) + require.False(t, pointer.GetBool(TestCfg.TestGroupInput.ExistingDeployment), + "This test modifies contract state. Before running it, ensure you are willing and able to do so.", + ) err := contracts.MatchContractVersionsOrAbove(map[contracts.Name]contracts.Version{ contracts.OffRampContract: contracts.V1_5_0_dev, contracts.OnRampContract: contracts.V1_5_0_dev, @@ -431,10 +425,22 @@ func TestSmokeCCIPSelfServeRateLimitOnRamp(t *testing.T) { }) } - aggregateRateLimit := big.NewInt(1e16) + var ( + capacityLimit = big.NewInt(1e16) + overCapacityAmount = new(big.Int).Add(capacityLimit, big.NewInt(1)) + + // token without any transfer config + freeTokenIndex = 0 + // token with bps non-zero, no agg rate limit + bpsTokenIndex = 1 + // token with bps zero, with agg rate limit on + aggRateTokenIndex = 2 + // token with both bps and agg rate limit + bpsAndAggTokenIndex = 3 + ) for _, tc := range tests { - t.Run(fmt.Sprintf("%s - Self Serve Rate Limit OnRamp", tc.testName), func(t *testing.T) { + t.Run(fmt.Sprintf("%s - OnRamp Limits", tc.testName), func(t *testing.T) { tc.lane.Test = t src := tc.lane.Source dest := tc.lane.Dest @@ -442,107 +448,187 @@ func TestSmokeCCIPSelfServeRateLimitOnRamp(t *testing.T) { require.GreaterOrEqual(t, len(src.Common.BridgeTokenPools), 2, "At least two bridge token pools needed for test") require.GreaterOrEqual(t, len(dest.Common.BridgeTokens), 2, "At least two bridge tokens needed for test") require.GreaterOrEqual(t, len(dest.Common.BridgeTokenPools), 2, "At least two bridge token pools needed for test") - require.NotEqualValues(t, src.Common.ChainClient.GetDefaultWallet().Address(), src.Common.BridgeTokens[0].OwnerAddress.Hex(), "Token owner and CCIP wallet should be different") - // add liquidity to pools on both networks - if !pointer.GetBool(TestCfg.TestGroupInput.ExistingDeployment) { - addFund := func(ccipCommon *actions.CCIPCommon) { - for i, btp := range ccipCommon.BridgeTokenPools { - token := ccipCommon.BridgeTokens[i] - err := btp.AddLiquidity( - token, token.OwnerWallet, new(big.Int).Mul(aggregateRateLimit, big.NewInt(20)), - ) - require.NoError(t, err) - } - } - addFund(src.Common) - addFund(dest.Common) - } + addLiquidity(t, src.Common, new(big.Int).Mul(capacityLimit, big.NewInt(20))) + addLiquidity(t, dest.Common, new(big.Int).Mul(capacityLimit, big.NewInt(20))) var ( - freeTokenIndex = 0 - limitedTokenIndex = 1 - - freeSrcToken = src.Common.BridgeTokens[freeTokenIndex] - freeDestToken = dest.Common.BridgeTokens[freeTokenIndex] - limitedSrcToken = src.Common.BridgeTokens[limitedTokenIndex] - limitedDestToken = dest.Common.BridgeTokens[limitedTokenIndex] - overLimitAmount = new(big.Int).Add(aggregateRateLimit, big.NewInt(1)) + freeToken = src.Common.BridgeTokens[freeTokenIndex] + bpsToken = src.Common.BridgeTokens[bpsTokenIndex] + aggRateToken = src.Common.BridgeTokens[aggRateTokenIndex] + bpsAndAggToken = src.Common.BridgeTokens[bpsAndAggTokenIndex] ) tc.lane.Logger.Info(). - Str("Free Source Token", freeSrcToken.Address()). - Str("Free Dest Token", freeDestToken.Address()). - Str("Limited Source Token", limitedSrcToken.Address()). - Str("Limited Dest Token", limitedDestToken.Address()). + Str("Free Token", freeToken.ContractAddress.Hex()). + Str("BPS Token", bpsToken.ContractAddress.Hex()). + Str("Agg Rate Token", aggRateToken.ContractAddress.Hex()). + Str("BPS and Agg Rate Token", bpsAndAggToken.ContractAddress.Hex()). Msg("Tokens for rate limit testing") - err := tc.lane.DisableAllRateLimiting() require.NoError(t, err, "Error disabling rate limits") - // Send both tokens with no rate limits and ensure they succeed - src.TransferAmount[freeTokenIndex] = overLimitAmount - src.TransferAmount[limitedTokenIndex] = overLimitAmount - tc.lane.RecordStateBeforeTransfer() - err = tc.lane.SendRequests(1, big.NewInt(600_000)) - require.NoError(t, err) - tc.lane.ValidateRequests() - - // Enable aggregate rate limiting on the source chains for the limited token + // Set reasonable rate limits for the tokens err = src.OnRamp.SetTokenTransferFeeConfig([]evm_2_evm_onramp.EVM2EVMOnRampTokenTransferFeeConfigArgs{ { - Token: limitedSrcToken.ContractAddress, + Token: bpsToken.ContractAddress, + AggregateRateLimitEnabled: false, + DeciBps: 10, + }, + { + Token: aggRateToken.ContractAddress, + AggregateRateLimitEnabled: true, + }, + { + Token: bpsAndAggToken.ContractAddress, AggregateRateLimitEnabled: true, + DeciBps: 10, }, }) - require.NoError(t, err, "Error setting OnRamp rate limits") + require.NoError(t, err, "Error setting OnRamp transfer fee config") err = src.OnRamp.SetRateLimit(evm_2_evm_onramp.RateLimiterConfig{ IsEnabled: true, - Capacity: aggregateRateLimit, - Rate: aggregateRateLimit, + Capacity: capacityLimit, + Rate: new(big.Int).Mul(capacityLimit, big.NewInt(500)), // Set a high rate to avoid it getting in the way }) require.NoError(t, err, "Error setting OnRamp rate limits") err = src.Common.ChainClient.WaitForEvents() require.NoError(t, err, "Error waiting for events") - tc.lane.Logger.Debug().Str("Token", limitedSrcToken.ContractAddress.Hex()).Msg("Enabled aggregate rate limit on source chain") - // Send free token that should not have a rate limit and should succeed - src.TransferAmount[freeTokenIndex] = overLimitAmount - src.TransferAmount[limitedTokenIndex] = big.NewInt(0) + + // Send all tokens under their limits and ensure they succeed + src.TransferAmount[freeTokenIndex] = overCapacityAmount + src.TransferAmount[bpsTokenIndex] = overCapacityAmount + src.TransferAmount[aggRateTokenIndex] = big.NewInt(1) + src.TransferAmount[bpsAndAggTokenIndex] = big.NewInt(1) tc.lane.RecordStateBeforeTransfer() - err = tc.lane.SendRequests(1, big.NewInt(600_000)) - require.NoError(t, err, "Free token transfer failed") + err = tc.lane.SendRequests(1, big.NewInt(actions.DefaultDestinationGasLimit)) + require.NoError(t, err) tc.lane.ValidateRequests() - tc.lane.Logger.Info().Str("Token", freeSrcToken.ContractAddress.Hex()).Msg("Free token transfer succeeded") - // Send limited token with rate limit that should fail and revert on the source chain + // Check that capacity limits are enforced src.TransferAmount[freeTokenIndex] = big.NewInt(0) - src.TransferAmount[limitedTokenIndex] = overLimitAmount - tc.lane.Logger.Info().Str("Token", limitedSrcToken.ContractAddress.Hex()).Msg("Enabled aggregate rate limit on OnRamp") - failedTx, _, _, err := tc.lane.Source.SendRequest(tc.lane.Dest.ReceiverDapp.EthAddress, big.NewInt(600_000)) + src.TransferAmount[bpsTokenIndex] = big.NewInt(0) + src.TransferAmount[aggRateTokenIndex] = overCapacityAmount + src.TransferAmount[bpsAndAggTokenIndex] = big.NewInt(0) + failedTx, _, _, err := tc.lane.Source.SendRequest(tc.lane.Dest.ReceiverDapp.EthAddress, big.NewInt(actions.DefaultDestinationGasLimit)) require.Error(t, err, "Limited token transfer should immediately revert") errReason, _, err := src.Common.ChainClient.RevertReasonFromTx(failedTx, evm_2_evm_onramp.EVM2EVMOnRampABI) require.NoError(t, err) - require.Equal(t, "AggregateValueMaxCapacityExceeded", errReason, "Expected rate limit reached error") + require.Equal(t, "AggregateValueMaxCapacityExceeded", errReason, "Expected capacity limit reached error") tc.lane.Logger. Info(). - Str("Token", limitedSrcToken.ContractAddress.Hex()). + Str("Token", aggRateToken.ContractAddress.Hex()). + Msg("Limited token transfer failed on source chain (a good thing in this context)") + + src.TransferAmount[aggRateTokenIndex] = big.NewInt(0) + src.TransferAmount[bpsAndAggTokenIndex] = overCapacityAmount + failedTx, _, _, err = tc.lane.Source.SendRequest(tc.lane.Dest.ReceiverDapp.EthAddress, big.NewInt(actions.DefaultDestinationGasLimit)) + require.Error(t, err, "Limited token transfer should immediately revert") + errReason, _, err = src.Common.ChainClient.RevertReasonFromTx(failedTx, evm_2_evm_onramp.EVM2EVMOnRampABI) + require.NoError(t, err) + require.Equal(t, "AggregateValueMaxCapacityExceeded", errReason, "Expected capacity limit reached error") + tc.lane.Logger. + Info(). + Str("Token", aggRateToken.ContractAddress.Hex()). + Msg("Limited token transfer failed on source chain (a good thing in this context)") + + // Set a high price for the tokens to more easily trigger aggregate rate limits + // Aggregate rate limits are based on USD price of the tokens + err = src.Common.PriceRegistry.UpdatePrices([]contracts.InternalTokenPriceUpdate{ + { + SourceToken: aggRateToken.ContractAddress, + UsdPerToken: big.NewInt(100), + }, + { + SourceToken: bpsAndAggToken.ContractAddress, + UsdPerToken: big.NewInt(100), + }, + }, []contracts.InternalGasPriceUpdate{}) + require.NoError(t, err, "Error updating prices") + // Enable aggregate rate limiting for the limited tokens + err = src.OnRamp.SetRateLimit(evm_2_evm_onramp.RateLimiterConfig{ + IsEnabled: true, + Capacity: new(big.Int).Mul(capacityLimit, big.NewInt(5000)), // Set a high capacity to avoid it getting in the way + Rate: big.NewInt(1), + }) + require.NoError(t, err, "Error setting OnRamp rate limits") + err = src.Common.ChainClient.WaitForEvents() + require.NoError(t, err, "Error waiting for events") + + // Send aggregate unlimited tokens and ensure they succeed + src.TransferAmount[freeTokenIndex] = overCapacityAmount + src.TransferAmount[bpsTokenIndex] = overCapacityAmount + src.TransferAmount[aggRateTokenIndex] = big.NewInt(0) + src.TransferAmount[bpsAndAggTokenIndex] = big.NewInt(0) + tc.lane.RecordStateBeforeTransfer() + err = tc.lane.SendRequests(1, big.NewInt(actions.DefaultDestinationGasLimit)) + require.NoError(t, err) + tc.lane.ValidateRequests() + + // Check that aggregate rate limits are enforced on limited tokens + src.TransferAmount[freeTokenIndex] = big.NewInt(0) + src.TransferAmount[bpsTokenIndex] = big.NewInt(0) + src.TransferAmount[aggRateTokenIndex] = capacityLimit + src.TransferAmount[bpsAndAggTokenIndex] = big.NewInt(0) + failedTx, _, _, err = tc.lane.Source.SendRequest(tc.lane.Dest.ReceiverDapp.EthAddress, big.NewInt(actions.DefaultDestinationGasLimit)) + require.Error(t, err, "Aggregate rate limited token transfer should immediately revert") + errReason, _, err = src.Common.ChainClient.RevertReasonFromTx(failedTx, evm_2_evm_onramp.EVM2EVMOnRampABI) + require.NoError(t, err) + require.Equal(t, "AggregateValueRateLimitReached", errReason, "Expected aggregate rate limit reached error") + tc.lane.Logger. + Info(). + Str("Token", aggRateToken.ContractAddress.Hex()). + Msg("Limited token transfer failed on source chain (a good thing in this context)") + + src.TransferAmount[aggRateTokenIndex] = big.NewInt(0) + src.TransferAmount[bpsAndAggTokenIndex] = capacityLimit + failedTx, _, _, err = tc.lane.Source.SendRequest(tc.lane.Dest.ReceiverDapp.EthAddress, big.NewInt(actions.DefaultDestinationGasLimit)) + require.Error(t, err, "Aggregate rate limited token transfer should immediately revert") + errReason, _, err = src.Common.ChainClient.RevertReasonFromTx(failedTx, evm_2_evm_onramp.EVM2EVMOnRampABI) + require.NoError(t, err) + require.Equal(t, "AggregateValueRateLimitReached", errReason, "Expected aggregate rate limit reached error") + tc.lane.Logger. + Info(). + Str("Token", aggRateToken.ContractAddress.Hex()). Msg("Limited token transfer failed on source chain (a good thing in this context)") }) } } -func TestSmokeCCIPSelfServeRateLimitOffRamp(t *testing.T) { +func TestSmokeCCIPOffRampCapacityLimit(t *testing.T) { + t.Parallel() + + capacityLimited := contracts.RateLimiterConfig{ + IsEnabled: true, + Capacity: big.NewInt(1e16), + Rate: new(big.Int).Mul(big.NewInt(1e16), big.NewInt(10)), // Set a high rate limit to avoid it getting in the way + } + testOffRampRateLimits(t, capacityLimited) +} + +func TestSmokeCCIPOffRampAggRateLimit(t *testing.T) { + t.Parallel() + + aggRateLimited := contracts.RateLimiterConfig{ + IsEnabled: true, + Capacity: new(big.Int).Mul(big.NewInt(1e16), big.NewInt(10)), // Set a high capacity limit to avoid it getting in the way + Rate: big.NewInt(1), + } + testOffRampRateLimits(t, aggRateLimited) +} + +func TestSmokeCCIPTokenPoolRateLimits(t *testing.T) { t.Parallel() log := logging.GetTestLogger(t) - TestCfg := testsetups.NewCCIPTestConfig(t, log, testconfig.Smoke) + TestCfg := testsetups.NewCCIPTestConfig(t, log, testconfig.Smoke, testsetups.WithNoTokensPerMessage(4), testsetups.WithTokensPerChain(4)) + require.False(t, pointer.GetBool(TestCfg.TestGroupInput.ExistingDeployment), + "This test modifies contract state. Before running it, ensure you are willing and able to do so.", + ) err := contracts.MatchContractVersionsOrAbove(map[contracts.Name]contracts.Version{ contracts.OffRampContract: contracts.V1_5_0_dev, + contracts.OnRampContract: contracts.V1_5_0_dev, }) require.NoError(t, err, "Required contract versions not met") - require.True(t, TestCfg.SelectedNetworks[0].Simulated, "This test relies on timing assumptions and should only be run on simulated networks") - // Set the default permissionless exec threshold lower so that we can manually execute the transactions faster - // Tuning this too low stops any transactions from being realistically executed - actions.DefaultPermissionlessExecThreshold = 1 * time.Minute setUpOutput := testsetups.CCIPDefaultTestSetUp(t, &log, "smoke-ccip", nil, TestCfg) if len(setUpOutput.Lanes) == 0 { return @@ -560,10 +646,18 @@ func TestSmokeCCIPSelfServeRateLimitOffRamp(t *testing.T) { }) } - aggregateRateLimit := big.NewInt(1e16) + var ( + capacityLimit = big.NewInt(1e16) + overCapacityAmount = new(big.Int).Add(capacityLimit, big.NewInt(1)) + + // token without any limits + freeTokenIndex = 0 + // token with rate limits + limitedTokenIndex = 1 + ) for _, tc := range tests { - t.Run(fmt.Sprintf("%s - Self Serve Rate Limit OffRamp", tc.testName), func(t *testing.T) { + t.Run(fmt.Sprintf("%s - Token Pool Rate Limits", tc.testName), func(t *testing.T) { tc.lane.Test = t src := tc.lane.Source dest := tc.lane.Dest @@ -571,111 +665,82 @@ func TestSmokeCCIPSelfServeRateLimitOffRamp(t *testing.T) { require.GreaterOrEqual(t, len(src.Common.BridgeTokenPools), 2, "At least two bridge token pools needed for test") require.GreaterOrEqual(t, len(dest.Common.BridgeTokens), 2, "At least two bridge tokens needed for test") require.GreaterOrEqual(t, len(dest.Common.BridgeTokenPools), 2, "At least two bridge token pools needed for test") - require.NotEqualValues(t, src.Common.ChainClient.GetDefaultWallet().Address(), src.Common.BridgeTokens[0].OwnerAddress.Hex(), "Token owner and CCIP wallet should be different") - // add liquidity to pools on both networks - if !pointer.GetBool(TestCfg.TestGroupInput.ExistingDeployment) { - addFund := func(ccipCommon *actions.CCIPCommon) { - for i, btp := range ccipCommon.BridgeTokenPools { - token := ccipCommon.BridgeTokens[i] - err := btp.AddLiquidity( - token, token.OwnerWallet, new(big.Int).Mul(aggregateRateLimit, big.NewInt(20)), - ) - require.NoError(t, err) - } - } - addFund(src.Common) - addFund(dest.Common) - } + addLiquidity(t, src.Common, new(big.Int).Mul(capacityLimit, big.NewInt(20))) + addLiquidity(t, dest.Common, new(big.Int).Mul(capacityLimit, big.NewInt(20))) var ( - freeTokenIndex = 0 - limitedTokenIndex = 1 - - freeSrcToken = src.Common.BridgeTokens[freeTokenIndex] - freeDestToken = dest.Common.BridgeTokens[freeTokenIndex] - limitedSrcToken = src.Common.BridgeTokens[limitedTokenIndex] - limitedDestToken = dest.Common.BridgeTokens[limitedTokenIndex] + freeToken = src.Common.BridgeTokens[freeTokenIndex] + limitedToken = src.Common.BridgeTokens[limitedTokenIndex] + limitedTokenPool = src.Common.BridgeTokenPools[limitedTokenIndex] ) tc.lane.Logger.Info(). - Str("Free Source Token", freeSrcToken.Address()). - Str("Free Dest Token", freeDestToken.Address()). - Str("Limited Source Token", limitedSrcToken.Address()). - Str("Limited Dest Token", limitedDestToken.Address()). + Str("Free Token", freeToken.ContractAddress.Hex()). + Str("Limited Token", limitedToken.ContractAddress.Hex()). Msg("Tokens for rate limit testing") - - err := tc.lane.DisableAllRateLimiting() + err := tc.lane.DisableAllRateLimiting() // Make sure this is pure require.NoError(t, err, "Error disabling rate limits") - // Send both tokens with no rate limits and ensure they succeed - overLimitAmount := new(big.Int).Add(aggregateRateLimit, big.NewInt(1)) - src.TransferAmount[freeTokenIndex] = overLimitAmount - src.TransferAmount[limitedTokenIndex] = overLimitAmount - tc.lane.RecordStateBeforeTransfer() - err = tc.lane.SendRequests(1, big.NewInt(600_000)) - require.NoError(t, err) - tc.lane.ValidateRequests() - - // Enable aggregate rate limiting on the destination chain for the limited token - err = dest.AddRateLimitTokens([]*contracts.ERC20Token{limitedSrcToken}, []*contracts.ERC20Token{limitedDestToken}) - require.NoError(t, err, "Error setting destination rate limits") - err = dest.OffRamp.SetRateLimit(contracts.RateLimiterConfig{ + // Check capacity limits + err = limitedTokenPool.SetRemoteChainRateLimits(src.DestChainSelector, token_pool.RateLimiterConfig{ IsEnabled: true, - Capacity: aggregateRateLimit, - Rate: aggregateRateLimit, + Capacity: capacityLimit, + Rate: new(big.Int).Sub(capacityLimit, big.NewInt(1)), // Set as high rate as possible to avoid it getting in the way }) - require.NoError(t, err, "Error setting destination rate limits") - err = dest.Common.ChainClient.WaitForEvents() + require.NoError(t, err, "Error setting token pool rate limit") + err = src.Common.ChainClient.WaitForEvents() require.NoError(t, err, "Error waiting for events") - tc.lane.Logger.Debug().Str("Token", limitedSrcToken.ContractAddress.Hex()).Msg("Enabled aggregate rate limit on destination chain") - // Send free token that should not have a rate limit and should succeed - src.TransferAmount[freeTokenIndex] = overLimitAmount - src.TransferAmount[limitedTokenIndex] = big.NewInt(0) + // Send all tokens under their limits and ensure they succeed + src.TransferAmount[freeTokenIndex] = overCapacityAmount + src.TransferAmount[limitedTokenIndex] = big.NewInt(1) tc.lane.RecordStateBeforeTransfer() - err = tc.lane.SendRequests(1, big.NewInt(600_000)) - require.NoError(t, err, "Free token transfer failed") + err = tc.lane.SendRequests(1, big.NewInt(actions.DefaultDestinationGasLimit)) + require.NoError(t, err) tc.lane.ValidateRequests() - tc.lane.Logger.Info().Str("Token", freeSrcToken.ContractAddress.Hex()).Msg("Free token transfer succeeded") - // Send limited token with rate limit that should fail on the destination chain + // Send limited token over capacity and ensure it fails src.TransferAmount[freeTokenIndex] = big.NewInt(0) - src.TransferAmount[limitedTokenIndex] = overLimitAmount - tc.lane.RecordStateBeforeTransfer() - err = tc.lane.SendRequests(1, big.NewInt(600_000)) - require.NoError(t, err, "Failed to send rate limited token transfer") - // Expect the ExecutionStateChanged event to never show up - // Since we're looking to confirm that an event has NOT occurred, this can lead to some imperfect assumptions and results - // We set the timeout to stop waiting for the event after a minute - // 99% of transactions occur in under a minute in ideal simulated conditions, so this is an okay assumption there - // but on real chains this risks false negatives - // If we don't set this timeout, this test can take a long time and hold up CI - tc.lane.ValidateRequests(actions.ExpectPhaseToFail(testreporters.ExecStateChanged, actions.WithTimeout(time.Minute))) - tc.lane.Logger.Info(). - Str("Token", limitedSrcToken.ContractAddress.Hex()). - Msg("Limited token transfer failed on destination chain (a good thing in this context)") - - // Manually execute the rate limited token transfer and expect a similar error - tc.lane.Logger.Info().Str("Wait Time", actions.DefaultPermissionlessExecThreshold.String()).Msg("Waiting for Exec Threshold to Expire") - time.Sleep(actions.DefaultPermissionlessExecThreshold) // Give time to exit the window - // See above comment on timeout - err = tc.lane.ExecuteManually(actions.WithConfirmationTimeout(time.Minute)) - require.Error(t, err, "There should be errors executing manually at this point") - tc.lane.Logger.Debug().Str("Error", err.Error()).Msg("Manually executed rate limited token transfer failed as expected") + src.TransferAmount[limitedTokenIndex] = overCapacityAmount + failedTx, _, _, err := tc.lane.Source.SendRequest(tc.lane.Dest.ReceiverDapp.EthAddress, big.NewInt(actions.DefaultDestinationGasLimit)) + require.Error(t, err, "Limited token transfer should immediately revert") + errReason, _, err := src.Common.ChainClient.RevertReasonFromTx(failedTx, lock_release_token_pool.LockReleaseTokenPoolABI) + require.NoError(t, err) + require.Equal(t, "TokenMaxCapacityExceeded", errReason, "Expected token capacity error") + tc.lane.Logger. + Info(). + Str("Token", limitedToken.ContractAddress.Hex()). + Msg("Limited token transfer failed on source chain (a good thing in this context)") - // Change rate limit to make it viable - err = dest.OffRamp.SetRateLimit(contracts.RateLimiterConfig{ + // Check rate limit + err = limitedTokenPool.SetRemoteChainRateLimits(src.DestChainSelector, token_pool.RateLimiterConfig{ IsEnabled: true, - Capacity: big.NewInt(0).Mul(aggregateRateLimit, big.NewInt(100)), - Rate: big.NewInt(0).Mul(aggregateRateLimit, big.NewInt(100)), + Capacity: new(big.Int).Mul(capacityLimit, big.NewInt(2)), // Set a high capacity to avoid it getting in the way + Rate: big.NewInt(1), }) - require.NoError(t, err, "Error setting destination rate limits") - err = dest.Common.ChainClient.WaitForEvents() + require.NoError(t, err, "Error setting token pool rate limit") + err = src.Common.ChainClient.WaitForEvents() require.NoError(t, err, "Error waiting for events") - tc.lane.Logger.Debug().Str("Token", limitedSrcToken.ContractAddress.Hex()).Msg("Enabled aggregate rate limit on destination chain") - // Execute again manually and expect a pass - err = tc.lane.ExecuteManually() - require.NoError(t, err, "Error manually executing transaction after rate limit is lifted") + // Send all tokens under their limits and ensure they succeed + src.TransferAmount[freeTokenIndex] = overCapacityAmount + src.TransferAmount[limitedTokenIndex] = capacityLimit + tc.lane.RecordStateBeforeTransfer() + err = tc.lane.SendRequests(1, big.NewInt(actions.DefaultDestinationGasLimit)) + require.NoError(t, err) + tc.lane.ValidateRequests() + + // Send limited token over rate limit and ensure it fails + src.TransferAmount[freeTokenIndex] = big.NewInt(0) + src.TransferAmount[limitedTokenIndex] = capacityLimit + failedTx, _, _, err = tc.lane.Source.SendRequest(tc.lane.Dest.ReceiverDapp.EthAddress, big.NewInt(actions.DefaultDestinationGasLimit)) + require.Error(t, err, "Limited token transfer should immediately revert") + errReason, _, err = src.Common.ChainClient.RevertReasonFromTx(failedTx, lock_release_token_pool.LockReleaseTokenPoolABI) + require.NoError(t, err) + require.Equal(t, "TokenRateLimitReached", errReason, "Expected rate limit reached error") + tc.lane.Logger. + Info(). + Str("Token", limitedToken.ContractAddress.Hex()). + Msg("Limited token transfer failed on source chain (a good thing in this context)") }) } } @@ -789,3 +854,160 @@ func TestSmokeCCIPManuallyExecuteAfterExecutionFailingDueToInsufficientGas(t *te }) } } + +// add liquidity to pools on both networks +func addLiquidity(t *testing.T, ccipCommon *actions.CCIPCommon, amount *big.Int) { + t.Helper() + + for i, btp := range ccipCommon.BridgeTokenPools { + token := ccipCommon.BridgeTokens[i] + err := btp.AddLiquidity( + token, token.OwnerWallet, amount, + ) + require.NoError(t, err) + } +} + +// testOffRampRateLimits tests the rate limiting functionality of the OffRamp contract +// it's broken into a helper to help parallelize and keep the tests DRY +func testOffRampRateLimits(t *testing.T, rateLimiterConfig contracts.RateLimiterConfig) { + t.Helper() + + log := logging.GetTestLogger(t) + TestCfg := testsetups.NewCCIPTestConfig(t, log, testconfig.Smoke) + require.False(t, pointer.GetBool(TestCfg.TestGroupInput.ExistingDeployment), + "This test modifies contract state. Before running it, ensure you are willing and able to do so.", + ) + err := contracts.MatchContractVersionsOrAbove(map[contracts.Name]contracts.Version{ + contracts.OffRampContract: contracts.V1_5_0_dev, + }) + require.NoError(t, err, "Required contract versions not met") + require.True(t, TestCfg.SelectedNetworks[0].Simulated, "This test relies on timing assumptions and should only be run on simulated networks") + require.False(t, pointer.GetBool(TestCfg.TestGroupInput.ExistingDeployment), "This test modifies contract state and cannot be run on existing deployments") + + // Set the default permissionless exec threshold lower so that we can manually execute the transactions faster + // Tuning this too low stops any transactions from being realistically executed + actions.DefaultPermissionlessExecThreshold = 1 * time.Minute + + setUpOutput := testsetups.CCIPDefaultTestSetUp(t, &log, "smoke-ccip", nil, TestCfg) + if len(setUpOutput.Lanes) == 0 { + return + } + t.Cleanup(func() { + require.NoError(t, setUpOutput.TearDown()) + }) + + var tests []testDefinition + for _, lane := range setUpOutput.Lanes { + tests = append(tests, testDefinition{ + testName: fmt.Sprintf("Network %s to network %s", + lane.ForwardLane.SourceNetworkName, lane.ForwardLane.DestNetworkName), + lane: lane.ForwardLane, + }) + } + + var ( + freeTokenIndex = 0 + limitedTokenIndex = 1 + ) + + for _, tc := range tests { + t.Run(fmt.Sprintf("%s - OffRamp Limits", tc.testName), func(t *testing.T) { + tc.lane.Test = t + src := tc.lane.Source + dest := tc.lane.Dest + var ( + capacityLimit = rateLimiterConfig.Capacity + overLimitAmount = new(big.Int).Add(capacityLimit, big.NewInt(1)) + ) + require.GreaterOrEqual(t, len(src.Common.BridgeTokens), 2, "At least two bridge tokens needed for test") + require.GreaterOrEqual(t, len(src.Common.BridgeTokenPools), 2, "At least two bridge token pools needed for test") + require.GreaterOrEqual(t, len(dest.Common.BridgeTokens), 2, "At least two bridge tokens needed for test") + require.GreaterOrEqual(t, len(dest.Common.BridgeTokenPools), 2, "At least two bridge token pools needed for test") + addLiquidity(t, src.Common, new(big.Int).Mul(capacityLimit, big.NewInt(20))) + addLiquidity(t, dest.Common, new(big.Int).Mul(capacityLimit, big.NewInt(20))) + + var ( + freeSrcToken = src.Common.BridgeTokens[freeTokenIndex] + freeDestToken = dest.Common.BridgeTokens[freeTokenIndex] + limitedSrcToken = src.Common.BridgeTokens[limitedTokenIndex] + limitedDestToken = dest.Common.BridgeTokens[limitedTokenIndex] + ) + tc.lane.Logger.Info(). + Str("Free Source Token", freeSrcToken.Address()). + Str("Free Dest Token", freeDestToken.Address()). + Str("Limited Source Token", limitedSrcToken.Address()). + Str("Limited Dest Token", limitedDestToken.Address()). + Msg("Tokens for rate limit testing") + + err := tc.lane.DisableAllRateLimiting() + require.NoError(t, err, "Error disabling rate limits") + + // Send both tokens with no rate limits and ensure they succeed + src.TransferAmount[freeTokenIndex] = overLimitAmount + src.TransferAmount[limitedTokenIndex] = overLimitAmount + tc.lane.RecordStateBeforeTransfer() + err = tc.lane.SendRequests(1, big.NewInt(actions.DefaultDestinationGasLimit)) + require.NoError(t, err) + tc.lane.ValidateRequests() + + // Enable capacity limiting on the destination chain for the limited token + err = dest.AddRateLimitTokens([]*contracts.ERC20Token{limitedSrcToken}, []*contracts.ERC20Token{limitedDestToken}) + require.NoError(t, err, "Error setting destination rate limits") + err = dest.OffRamp.SetRateLimit(rateLimiterConfig) + require.NoError(t, err, "Error setting destination rate limits") + err = dest.Common.ChainClient.WaitForEvents() + require.NoError(t, err, "Error waiting for events") + tc.lane.Logger.Debug().Str("Token", limitedSrcToken.ContractAddress.Hex()).Msg("Enabled capacity limit on destination chain") + + // Send free token that should not have a rate limit and should succeed + src.TransferAmount[freeTokenIndex] = overLimitAmount + src.TransferAmount[limitedTokenIndex] = big.NewInt(0) + tc.lane.RecordStateBeforeTransfer() + err = tc.lane.SendRequests(1, big.NewInt(actions.DefaultDestinationGasLimit)) + require.NoError(t, err, "Free token transfer failed") + tc.lane.ValidateRequests() + tc.lane.Logger.Info().Str("Token", freeSrcToken.ContractAddress.Hex()).Msg("Free token transfer succeeded") + + // Send limited token with rate limit that should fail on the destination chain + src.TransferAmount[freeTokenIndex] = big.NewInt(0) + src.TransferAmount[limitedTokenIndex] = overLimitAmount + tc.lane.RecordStateBeforeTransfer() + err = tc.lane.SendRequests(1, big.NewInt(actions.DefaultDestinationGasLimit)) + require.NoError(t, err, "Failed to send rate limited token transfer") + // Expect the ExecutionStateChanged event to never show up + // Since we're looking to confirm that an event has NOT occurred, this can lead to some imperfect assumptions and results + // We set the timeout to stop waiting for the event after a minute + // 99% of transactions occur in under a minute in ideal simulated conditions, so this is an okay assumption there + // but on real chains this risks false negatives + // If we don't set this timeout, this test can take a long time and hold up CI + tc.lane.ValidateRequests(actions.ExpectPhaseToFail(testreporters.ExecStateChanged, actions.WithTimeout(time.Minute))) + tc.lane.Logger.Info(). + Str("Token", limitedSrcToken.ContractAddress.Hex()). + Msg("Limited token transfer failed on destination chain (a good thing in this context)") + + // Manually execute the rate limited token transfer and expect a similar error + tc.lane.Logger.Info().Str("Wait Time", actions.DefaultPermissionlessExecThreshold.String()).Msg("Waiting for Exec Threshold to Expire") + time.Sleep(actions.DefaultPermissionlessExecThreshold) // Give time to exit the window + // See above comment on timeout + err = tc.lane.ExecuteManually(actions.WithConfirmationTimeout(time.Minute)) + require.Error(t, err, "There should be errors executing manually at this point") + tc.lane.Logger.Debug().Str("Error", err.Error()).Msg("Manually executed rate limited token transfer failed as expected") + + // Change limits to make it viable + err = dest.OffRamp.SetRateLimit(contracts.RateLimiterConfig{ + IsEnabled: true, + Capacity: new(big.Int).Mul(capacityLimit, big.NewInt(100)), + Rate: new(big.Int).Mul(capacityLimit, big.NewInt(100)), + }) + require.NoError(t, err, "Error setting destination rate limits") + err = dest.Common.ChainClient.WaitForEvents() + require.NoError(t, err, "Error waiting for events") + + // Execute again manually and expect a pass + err = tc.lane.ExecuteManually() + require.NoError(t, err, "Error manually executing transaction after rate limit is lifted") + }) + } + +} diff --git a/integration-tests/ccip-tests/testconfig/README.md b/integration-tests/ccip-tests/testconfig/README.md index 6da17d1125..a402c218d0 100644 --- a/integration-tests/ccip-tests/testconfig/README.md +++ b/integration-tests/ccip-tests/testconfig/README.md @@ -528,7 +528,7 @@ Specifies the number of routers to be set up for each network. ### CCIP.Groups.[testgroup].MaxNoOfLanes Specifies the maximum number of lanes to be set up between networks. If this values is not set, the test will set up lanes between all possible pairs of networks mentioned in `selected_networks` in [CCIP.Env.Networks](#ccipenvnetworksselectednetworks). -For example, if `selected_networks = ['SIMULATED_1', 'SIMULATED_2', 'SIMULATED_3']`, and `MaxNoOfLanes` is set to 3, it denotes that the test will randomly select 3 lanes between all possible pairs `SIMULATED_1`, `SIMULATED_2`, and `SIMULATED_3` for the test run. +For example, if `selected_networks = ['SIMULATED_1', 'SIMULATED_2', 'SIMULATED_3']`, and `MaxNoOfLanes` is set to 2, it denotes that the test will select the first 2 lanes between all possible pairs `SIMULATED_1`, `SIMULATED_2`, and `SIMULATED_3` for the test run. ### CCIP.Groups.[testgroup].ChaosDuration Specifies the duration for which the chaos experiment is to be run. This is only valid if the test type is 'chaos'. diff --git a/integration-tests/ccip-tests/testconfig/ccip.go b/integration-tests/ccip-tests/testconfig/ccip.go index dc73b06a28..1af5c5baee 100644 --- a/integration-tests/ccip-tests/testconfig/ccip.go +++ b/integration-tests/ccip-tests/testconfig/ccip.go @@ -19,12 +19,10 @@ import ( ) const ( - CONTRACTS_OVERRIDE_CONFIG = "BASE64_CCIP_CONFIG_OVERRIDE_CONTRACTS" + CONTRACTS_OVERRIDE_CONFIG string = "BASE64_CCIP_CONFIG_OVERRIDE_CONTRACTS" TokenOnlyTransfer string = "Token" - - DataOnlyTransfer string = "Data" - - DataAndTokenTransfer string = "DataWithToken" + DataOnlyTransfer string = "Data" + DataAndTokenTransfer string = "DataWithToken" ) type OffRampConfig struct { diff --git a/integration-tests/ccip-tests/testconfig/tomls/ccip1.4-stress-2024-06-27/baseline.toml b/integration-tests/ccip-tests/testconfig/tomls/ccip1.4-stress-2024-06-27/baseline.toml new file mode 100644 index 0000000000..9bcdbff61d --- /dev/null +++ b/integration-tests/ccip-tests/testconfig/tomls/ccip1.4-stress-2024-06-27/baseline.toml @@ -0,0 +1,188 @@ +## Baseline performance test on simulated environment (with chaos) +## 40 chains / 400 lanes +## historyDepth 200 / finalityDepth 200 +## block_time = 1s +## throughput 1msg / 5s +## 20% Token, 60% DataWithToken, 15% Regular size msgs, 5% Large msgs +## +## make test_load_ccip testimage=amazonaws.com/chainlink-ccip-tests:ccip-develop \ +## testname=TestLoadCCIPStableRequestTriggeringWithNetworkChaos \ +## override_toml=./testconfig/tomls/baseline.toml \ +## secret_toml=./testconfig/tomls/secrets.toml + +[CCIP] +[CCIP.ContractVersions] +PriceRegistry = '1.2.0' +OffRamp = '1.2.0' +OnRamp = '1.2.0' +TokenPool = '1.4.0' +CommitStore = '1.2.0' + +[CCIP.Env] +TTL = '8h' + +[CCIP.Env.Network] +selected_networks= ['PRIVATE-CHAIN-1', 'PRIVATE-CHAIN-2'] + +[CCIP.Env.Network.EVMNetworks.PRIVATE-CHAIN-1] +evm_name = 'private-chain-1' +evm_chain_id = 2337 +evm_urls = ['wss://ignore-this-url.com'] +evm_http_urls = ['https://ignore-this-url.com'] +evm_keys = ['59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d'] +evm_simulated = true +client_implementation = 'Ethereum' +evm_chainlink_transaction_limit = 5000 +evm_transaction_timeout = '3m' +evm_minimum_confirmations = 1 +evm_gas_estimation_buffer = 1000 +evm_supports_eip1559 = true +evm_default_gas_limit = 6000000 +evm_finality_depth = 200 + +[CCIP.Env.Network.EVMNetworks.PRIVATE-CHAIN-2] +evm_name = 'private-chain-2' +evm_chain_id = 1337 +evm_urls = ['wss://ignore-this-url.com'] +evm_http_urls = ['https://ignore-this-url.com'] +evm_keys = ['ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80'] +evm_simulated = true +client_implementation = 'Ethereum' +evm_chainlink_transaction_limit = 5000 +evm_transaction_timeout = '3m' +evm_minimum_confirmations = 1 +evm_gas_estimation_buffer = 1000 +evm_supports_eip1559 = true +evm_default_gas_limit = 6000000 +evm_finality_depth = 200 + +[CCIP.Env.Network.AnvilConfigs.PRIVATE-CHAIN-1] +block_time = 1 +# +[CCIP.Env.Network.AnvilConfigs.PRIVATE-CHAIN-2] +block_time = 1 + +[CCIP.Env.NewCLCluster] +NoOfNodes = 17 +NodeMemory = '10Gi' +NodeCPU = '6' +DBMemory = '16Gi' +DBCPU = '4' +DBStorageClass = 'gp3' +PromPgExporter = true +DBCapacity = '50Gi' +IsStateful = true +DBArgs = ['shared_buffers=4096MB', 'effective_cache_size=8192MB', 'work_mem=128MB'] + +[CCIP.Env.NewCLCluster.Common] +BaseConfigTOML = """ +[Feature] +LogPoller = true +CCIP = true + +[Log] +Level = 'debug' +JSONConsole = true + +[Log.File] +MaxSize = '0b' + +[WebServer] +AllowOrigins = '*' +HTTPPort = 6688 +SecureCookies = false +HTTPWriteTimeout = '1m' + +[WebServer.RateLimit] +Authenticated = 2000 +Unauthenticated = 1000 + +[WebServer.TLS] +HTTPSPort = 0 + +[Database] +MaxIdleConns = 20 +MaxOpenConns = 30 +MigrateOnStartup = true + +[OCR2] +Enabled = true +DefaultTransactionQueueDepth = 0 + +[OCR] +Enabled = false +DefaultTransactionQueueDepth = 0 + +[P2P] +[P2P.V2] +Enabled = true +ListenAddresses = ['0.0.0.0:6690'] +AnnounceAddresses = ['0.0.0.0:6690'] +DeltaDial = '500ms' +DeltaReconcile = '5s' +""" + +CommonChainConfigTOML = """ +[HeadTracker] +HistoryDepth = 200 + +[GasEstimator] +PriceMax = '200 gwei' +LimitDefault = 6000000 +FeeCapDefault = '200 gwei' +""" + +[CCIP.Groups] +[CCIP.Groups.load] +KeepEnvAlive = true +NoOfCommitNodes = 16 +PhaseTimeout = '40m' +NodeFunding = 1000.0 +NoOfRoutersPerPair = 2 +NoOfNetworks = 40 +MaxNoOfLanes = 400 + +[CCIP.Groups.load.OffRampConfig] +BatchGasLimit = 11000000 + +[CCIP.Groups.load.TokenConfig] +TimeoutForPriceUpdate = '15m' +NoOfTokensPerChain = 60 +NoOfTokensWithDynamicPrice = 15 +DynamicPriceUpdateInterval ='15s' +CCIPOwnerTokens = true + +[CCIP.Groups.load.LoadProfile] +TestDuration = '4h' +TimeUnit = '5s' +RequestPerUnitTime = [1] +OptimizeSpace = true +NetworkChaosDelay = '100ms' + +# to represent 20%, 60%, 15%, 5% of the total messages +[CCIP.Groups.load.LoadProfile.MsgProfile] +Frequencies = [4,12,3,1] + +[[CCIP.Groups.load.LoadProfile.MsgProfile.MsgDetails]] +MsgType = 'Token' +DestGasLimit = 0 +DataLength = 0 +NoOfTokens = 5 +AmountPerToken = 1 + +[[CCIP.Groups.load.LoadProfile.MsgProfile.MsgDetails]] +MsgType = 'DataWithToken' +DestGasLimit = 500000 +DataLength = 5000 +NoOfTokens = 5 +AmountPerToken = 1 + +[[CCIP.Groups.load.LoadProfile.MsgProfile.MsgDetails]] +MsgType = 'Data' +DestGasLimit = 800000 +DataLength = 10000 + +[[CCIP.Groups.load.LoadProfile.MsgProfile.MsgDetails]] +MsgType = 'Data' +DestGasLimit = 2500000 +DataLength = 10000 diff --git a/integration-tests/ccip-tests/testconfig/tomls/ccip1.4-stress-2024-06-27/prod-testnet.toml b/integration-tests/ccip-tests/testconfig/tomls/ccip1.4-stress-2024-06-27/prod-testnet.toml new file mode 100644 index 0000000000..f8321584c8 --- /dev/null +++ b/integration-tests/ccip-tests/testconfig/tomls/ccip1.4-stress-2024-06-27/prod-testnet.toml @@ -0,0 +1,964 @@ +[CCIP] +[CCIP.ContractVersions] +PriceRegistry = '1.2.0' +OffRamp = '1.2.0' +OnRamp = '1.2.0' +TokenPool = '1.4.0' +CommitStore = '1.2.0' + + +[CCIP.Deployments] +Data = """ +{ + "lane_configs": { + "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", + "router": "0xF694E193200268f9a4868e4Aa017A0118C9a8177", + "price_registry": "0x19e157E5fb1DAec1aE4BaB113fdf077F980704AA", + "wrapped_native": "0xd00ae08403B9bbb9124bB305C09058E32C39A48c", + "src_contracts": { + "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" + }, + "Optimism Sepolia": { + "off_ramp": "0x3d7CbC95DCC33257F14D6Eb780c88Bd56C6335BB", + "commit_store": "0x1fcDC02edDfb405f378ba53cF9E6104feBcB7542", + "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" + }, + "Polygon Amoy": { + "off_ramp": "0x3e33290B90fD0FF30a3FA138934DF028E4eCA348", + "commit_store": "0xCFe3556Aa42d40be09BD23aa80448a19443BE5B1", + "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" + }, + "Sepolia Testnet": { + "off_ramp": "0x9e5e4324F8608D54A50a317832d456a392E4F8C2", + "commit_store": "0x92A51eD3F041B39EbD1e464C1f7cb1e8f8A8c63f", + "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" + } + } + }, + "Base Sepolia": { + "is_native_fee_token": true, + "fee_token": "0xE4aB69C077896252FAFBD49EFD26B5D171A32410", + "bridge_tokens": [ + ], + "bridge_tokens_pools": [ + ], + "price_aggregators": null, + "arm": "0x5aA82cA372782d6CC33AA4C830Df2a91017A7e1b", + "router": "0xD3b06cEbF099CE7DA4AcCf578aaebFDBd6e88a93", + "price_registry": "0x4D20536e60832bE579Cd38E89Dc03d11E1741FbA", + "wrapped_native": "0x4200000000000000000000000000000000000006", + "src_contracts": { + "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" + }, + "Optimism Sepolia": { + "off_ramp": "0x86a3910908eCaAA31Fcd9F0fC8841D8E98f1511d", + "commit_store": "0xE99a87C9b5ed4D2b6060195DEea5106ffF655736", + "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" + }, + "Sepolia Testnet": { + "off_ramp": "0x189F61D9B886Dd2975D5Abc893c8Cf5f5effda71", + "commit_store": "0xEE7e27346DCD1e711348D0F7f7ECB53a9a3a08a7", + "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" + } + } + }, + "Optimism Sepolia": { + "is_native_fee_token": true, + "fee_token": "0xE4aB69C077896252FAFBD49EFD26B5D171A32410", + "bridge_tokens": [ + ], + "bridge_tokens_pools": [ + ], + "price_aggregators": null, + "arm": "0xf06Ff5D2084295909119ca541E93635E7D582FFc", + "router": "0x114A20A10b43D4115e5aeef7345a1A71d2a60C57", + "price_registry": "0x782a7Ba95215f2F7c3dD4C153cbB2Ae3Ec2d3215", + "wrapped_native": "0x4200000000000000000000000000000000000006", + "src_contracts": { + "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" + }, + "Base Sepolia": { + "off_ramp": "0x0a750ca77369e03613d7640548F4b2b1c695c3Bb", + "commit_store": "0x8fEBC74C26129C8d7E60288C6dCCc75eb494aA3C", + "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" + }, + "Sepolia Testnet": { + "off_ramp": "0x260AF9b83e0d2Bb6C9015fC9f0BfF8858A0CCE68", + "commit_store": "0x7a0bB92Bc8663abe6296d0162A9b41a2Cb2E0358", + "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" + } + } + }, + "Sepolia Testnet": { + "is_native_fee_token": true, + "fee_token": "0x779877A7B0D9E8603169DdbD7836e478b4624789", + "bridge_tokens": [ + ], + "bridge_tokens_pools": [ + ], + "price_aggregators": null, + "arm": "0xB4d360459F32Dd641Ef5A6985fFbAC5c4e5521aA", + "router": "0x0BF3dE8c5D3e8A2B34D2BEeB17ABfCeBaf363A59", + "price_registry": "0x9EF7D57a4ea30b9e37794E55b0C75F2A70275dCc", + "wrapped_native": "0x097D90c9d3E0B50Ca60e1ae45F6A81010f9FB534", + "src_contracts": { + "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" + }, + "Base Sepolia": { + "off_ramp": "0x31c0B81832B333419f0DfD36A69F502cF9094aed", + "commit_store": "0xDFcde9d698a2B32DB2537DC9B752Cadd1D846a52", + "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" + }, + "Gnosis Chiado": { + "off_ramp": "0x7db0115A0b3AAb01d30bf81123c5DD7B0C41Add5", + "commit_store": "0x6640723Ea801178c4383FA016b9781e7ef1016EF", + "receiver_dapp": "0x1A2A69e3eB1382FE34Bc579AdD5Bae39e31d4A2c" + }, + "Optimism Sepolia": { + "off_ramp": "0xD50590D4438411EDe47029b0FD7901A7145E5Df6", + "commit_store": "0xe85EEE9Fd434A7b8a586Ee086E828abF41839479", + "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" + } + } + } + } +} +""" + +[CCIP.Env] +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' +] + +[CCIP.Groups.load] +NetworkPairs = [ + 'AVALANCHE_FUJI,SEPOLIA', + 'OPTIMISM_SEPOLIA,BASE_SEPOLIA' +] + +BiDirectionalLane = true +PhaseTimeout = '45m' +ExistingDeployment = true + +NoOfTokensPerChain = 1 + +[CCIP.Groups.load.LoadProfile] +RequestPerUnitTime = [1] +TimeUnit = '5s' +TestDuration = '1h' +TestRunName = 'v2.12.0-ccip1.4.16-load' + +# to represent 20%, 60%, 15%, 5% of the total messages +[CCIP.Groups.load.LoadProfile.MsgProfile] +Frequencies = [4,12,3,1] + +[[CCIP.Groups.load.LoadProfile.MsgProfile.MsgDetails]] +MsgType = 'Token' +DestGasLimit = 0 +DataLength = 0 +NoOfTokens = 5 +AmountPerToken = 1 + +[[CCIP.Groups.load.LoadProfile.MsgProfile.MsgDetails]] +MsgType = 'DataWithToken' +DestGasLimit = 500000 +DataLength = 5000 +NoOfTokens = 5 +AmountPerToken = 1 + +[[CCIP.Groups.load.LoadProfile.MsgProfile.MsgDetails]] +MsgType = 'Data' +DestGasLimit = 800000 +DataLength = 10000 + +[[CCIP.Groups.load.LoadProfile.MsgProfile.MsgDetails]] +MsgType = 'Data' +DestGasLimit = 2500000 +DataLength = 10000 \ No newline at end of file diff --git a/integration-tests/ccip-tests/testconfig/tomls/scalability.toml b/integration-tests/ccip-tests/testconfig/tomls/ccip1.4-stress-2024-06-27/sample-scalability.toml similarity index 100% rename from integration-tests/ccip-tests/testconfig/tomls/scalability.toml rename to integration-tests/ccip-tests/testconfig/tomls/ccip1.4-stress-2024-06-27/sample-scalability.toml diff --git a/integration-tests/ccip-tests/testconfig/tomls/ccip1.4-stress-2024-06-27/tier-a.toml b/integration-tests/ccip-tests/testconfig/tomls/ccip1.4-stress-2024-06-27/tier-a.toml new file mode 100644 index 0000000000..b7595906e6 --- /dev/null +++ b/integration-tests/ccip-tests/testconfig/tomls/ccip1.4-stress-2024-06-27/tier-a.toml @@ -0,0 +1,226 @@ +## Baseline performance test on simulated environment (with chaos) +## 40 chains / 400 lanes +## historyDepth 200 / finalityDepth 200 +## block_time = 1s +## throughput 1msg / 5s +## 20% Token, 60% DataWithToken, 15% Regular size msgs, 5% Large msgs +## +## make test_load_ccip testimage=795953128386.dkr.ecr.us-west-2.amazonaws.com/chainlink-ccip-tests:ccip-develop \ +## testname=TestLoadCCIPStableRequestTriggeringWithNetworkChaos \ +## override_toml=./testconfig/tomls/baseline.toml \ +## secret_toml=./testconfig/tomls/secrets.toml + +[CCIP] +[CCIP.ContractVersions] +PriceRegistry = '1.2.0' +OffRamp = '1.2.0' +OnRamp = '1.2.0' +TokenPool = '1.4.0' +CommitStore = '1.2.0' + +[CCIP.Env] +TTL = '8h' + +[CCIP.Env.Network] +selected_networks= ['PRIVATE-CHAIN-1', 'SLOW-CHAIN-1', 'SLOW-CHAIN-2', 'SLOW-CHAIN-3'] + +[CCIP.Env.Network.EVMNetworks.PRIVATE-CHAIN-1] +evm_name = 'private-chain-1' +evm_chain_id = 2337 +evm_urls = ['wss://ignore-this-url.com'] +evm_http_urls = ['https://ignore-this-url.com'] +evm_keys = ['59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d'] +evm_simulated = true +client_implementation = 'Ethereum' +evm_chainlink_transaction_limit = 5000 +evm_transaction_timeout = '3m' +evm_minimum_confirmations = 1 +evm_gas_estimation_buffer = 1000 +evm_supports_eip1559 = true +evm_default_gas_limit = 6000000 +evm_finality_depth = 1 + +[CCIP.Env.Network.EVMNetworks.SLOW-CHAIN-1] +evm_name = 'slow-chain-1' +evm_chain_id = 90000001 +evm_urls = ['wss://ignore-this-url.com'] +evm_http_urls = ['https://ignore-this-url.com'] +evm_keys = ['ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80'] +evm_simulated = true +client_implementation = 'Ethereum' +evm_chainlink_transaction_limit = 5000 +evm_transaction_timeout = '3m' +evm_minimum_confirmations = 1 +evm_gas_estimation_buffer = 1000 +evm_supports_eip1559 = true +evm_default_gas_limit = 6000000 +evm_finality_depth = 1 + +[CCIP.Env.Network.EVMNetworks.SLOW-CHAIN-2] +evm_name = 'slow-chain-2' +evm_chain_id = 90000002 +evm_urls = ['wss://ignore-this-url.com'] +evm_http_urls = ['https://ignore-this-url.com'] +evm_keys = ['ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80'] +evm_simulated = true +client_implementation = 'Ethereum' +evm_chainlink_transaction_limit = 5000 +evm_transaction_timeout = '3m' +evm_minimum_confirmations = 1 +evm_gas_estimation_buffer = 1000 +evm_supports_eip1559 = true +evm_default_gas_limit = 6000000 +evm_finality_depth = 1 + +[CCIP.Env.Network.EVMNetworks.SLOW-CHAIN-3] +evm_name = 'slow-chain-3' +evm_chain_id = 1337 +evm_urls = ['wss://ignore-this-url.com'] +evm_http_urls = ['https://ignore-this-url.com'] +evm_keys = ['ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80'] +evm_simulated = true +client_implementation = 'Ethereum' +evm_chainlink_transaction_limit = 5000 +evm_transaction_timeout = '3m' +evm_minimum_confirmations = 1 +evm_gas_estimation_buffer = 1000 +evm_supports_eip1559 = true +evm_default_gas_limit = 6000000 +evm_finality_depth = 1 + +[CCIP.Env.Network.AnvilConfigs.PRIVATE-CHAIN-1] +block_time = 1 +# +[CCIP.Env.Network.AnvilConfigs.SLOW-CHAIN-1] +block_time = 12 + +[CCIP.Env.Network.AnvilConfigs.SLOW-CHAIN-2] +block_time = 12 + +[CCIP.Env.Network.AnvilConfigs.SLOW-CHAIN-3] +block_time = 12 + +[CCIP.Env.NewCLCluster] +NoOfNodes = 17 +NodeMemory = '10Gi' +NodeCPU = '6' +DBMemory = '16Gi' +DBCPU = '4' +DBStorageClass = 'gp3' +PromPgExporter = true +DBCapacity = '50Gi' +IsStateful = true +DBArgs = ['shared_buffers=4096MB', 'effective_cache_size=8192MB', 'work_mem=128MB'] + +[CCIP.Env.NewCLCluster.Common] +BaseConfigTOML = """ +[Feature] +LogPoller = true +CCIP = true + +[Log] +Level = 'debug' +JSONConsole = true + +[Log.File] +MaxSize = '0b' + +[WebServer] +AllowOrigins = '*' +HTTPPort = 6688 +SecureCookies = false +HTTPWriteTimeout = '1m' + +[WebServer.RateLimit] +Authenticated = 2000 +Unauthenticated = 1000 + +[WebServer.TLS] +HTTPSPort = 0 + +[Database] +MaxIdleConns = 20 +MaxOpenConns = 30 +MigrateOnStartup = true + +[OCR2] +Enabled = true +DefaultTransactionQueueDepth = 0 + +[OCR] +Enabled = false +DefaultTransactionQueueDepth = 0 + +[P2P] +[P2P.V2] +Enabled = true +ListenAddresses = ['0.0.0.0:6690'] +AnnounceAddresses = ['0.0.0.0:6690'] +DeltaDial = '500ms' +DeltaReconcile = '5s' +""" + +#CommonChainConfigTOML = """ +#[HeadTracker] +#HistoryDepth = 200 +# +#[GasEstimator] +#PriceMax = '200 gwei' +#LimitDefault = 6000000 +#FeeCapDefault = '200 gwei' +#""" + +[CCIP.Groups] +[CCIP.Groups.load] +KeepEnvAlive = true +NoOfCommitNodes = 16 +PhaseTimeout = '40m' +NodeFunding = 1000.0 +NoOfRoutersPerPair = 2 +NoOfNetworks = 40 +MaxNoOfLanes = 400 + +[CCIP.Groups.load.OffRampConfig] +BatchGasLimit = 11000000 + +[CCIP.Groups.load.TokenConfig] +TimeoutForPriceUpdate = '15m' +NoOfTokensPerChain = 60 +NoOfTokensWithDynamicPrice = 15 +DynamicPriceUpdateInterval ='15s' +CCIPOwnerTokens = true + +[CCIP.Groups.load.LoadProfile] +TestDuration = '4h' +TimeUnit = '5s' +RequestPerUnitTime = [1] +OptimizeSpace = true +NetworkChaosDelay = '100ms' + +# to represent 20%, 60%, 15%, 5% of the total messages +[CCIP.Groups.load.LoadProfile.MsgProfile] +Frequencies = [4,12,3,1] + +[[CCIP.Groups.load.LoadProfile.MsgProfile.MsgDetails]] +MsgType = 'Token' +DestGasLimit = 0 +DataLength = 0 +NoOfTokens = 5 +AmountPerToken = 1 + +[[CCIP.Groups.load.LoadProfile.MsgProfile.MsgDetails]] +MsgType = 'DataWithToken' +DestGasLimit = 500000 +DataLength = 5000 +NoOfTokens = 5 +AmountPerToken = 1 + +[[CCIP.Groups.load.LoadProfile.MsgProfile.MsgDetails]] +MsgType = 'Data' +DestGasLimit = 800000 +DataLength = 10000 + +[[CCIP.Groups.load.LoadProfile.MsgProfile.MsgDetails]] +MsgType = 'Data' +DestGasLimit = 2500000 +DataLength = 10000 \ No newline at end of file diff --git a/integration-tests/ccip-tests/testconfig/tomls/ccip1.4-stress-2024-06-27/tier-b.toml b/integration-tests/ccip-tests/testconfig/tomls/ccip1.4-stress-2024-06-27/tier-b.toml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/integration-tests/ccip-tests/testreporters/ccip.go b/integration-tests/ccip-tests/testreporters/ccip.go index 8341735687..b567f6a629 100644 --- a/integration-tests/ccip-tests/testreporters/ccip.go +++ b/integration-tests/ccip-tests/testreporters/ccip.go @@ -57,10 +57,10 @@ type TransactionStats struct { } type PhaseStat struct { - SeqNum uint64 `json:"seq_num,omitempty"` - Duration float64 `json:"duration,omitempty"` - Status Status `json:"success"` - SendTransactionStats TransactionStats `json:"ccip_send_data,omitempty"` + SeqNum uint64 `json:"seq_num,omitempty"` + Duration float64 `json:"duration,omitempty"` + Status Status `json:"success"` + SendTransactionStats *TransactionStats `json:"ccip_send_data,omitempty"` } type RequestStat struct { @@ -77,19 +77,17 @@ func (stat *RequestStat) UpdateState( step Phase, duration time.Duration, state Status, - sendTransactionStats ...TransactionStats, + sendTransactionStats *TransactionStats, ) { durationInSec := duration.Seconds() stat.SeqNum = seqNum phaseDetails := PhaseStat{ - SeqNum: seqNum, - Duration: durationInSec, - Status: state, + SeqNum: seqNum, + Duration: durationInSec, + Status: state, + SendTransactionStats: sendTransactionStats, } - if len(sendTransactionStats) > 0 { - phaseDetails.SendTransactionStats = sendTransactionStats[0] - } - stat.StatusByPhase[step] = phaseDetails + event := lggr.Info() if seqNum != 0 { event.Uint64("seq num", seqNum) @@ -100,12 +98,17 @@ func (stat *RequestStat) UpdateState( SeqNum: seqNum, Status: state, } + stat.StatusByPhase[step] = phaseDetails lggr.Info(). Str(fmt.Sprint(E2E), string(state)). Msgf("reqNo %d", stat.ReqNo) event.Str(string(step), string(state)).Msgf("reqNo %d", stat.ReqNo) } else { event.Str(string(step), string(Success)).Msgf("reqNo %d", stat.ReqNo) + // we don't want to save phase details for TX and CCIPSendRe to avoid redundancy if these phases are successful + if step != TX && step != CCIPSendRe { + stat.StatusByPhase[step] = phaseDetails + } if step == Commit || step == ReportBlessed || step == ExecStateChanged { stat.StatusByPhase[E2E] = PhaseStat{ SeqNum: seqNum, diff --git a/integration-tests/ccip-tests/testsetups/ccip.go b/integration-tests/ccip-tests/testsetups/ccip.go index 3a8fdf27c9..39e52164bc 100644 --- a/integration-tests/ccip-tests/testsetups/ccip.go +++ b/integration-tests/ccip-tests/testsetups/ccip.go @@ -4,7 +4,6 @@ import ( "context" "fmt" "math/big" - "math/rand" "os" "regexp" "strings" @@ -223,8 +222,13 @@ func (c *CCIPTestConfig) SetNetworkPairs(lggr zerolog.Logger) error { actualNoOfNetworks := len(c.SelectedNetworks) n := c.SelectedNetworks[0] var chainIDs []int64 + existingChainIDs := make(map[uint64]struct{}) + for _, net := range c.SelectedNetworks { + existingChainIDs[uint64(net.ChainID)] = struct{}{} + } for _, id := range chainselectors.TestChainIds() { - if id == 2337 { + // if the chain id already exists in the already provided selected networks, skip it + if _, exists := existingChainIDs[id]; exists { continue } chainIDs = append(chainIDs, int64(id)) @@ -281,11 +285,8 @@ func (c *CCIPTestConfig) SetNetworkPairs(lggr zerolog.Logger) error { c.AddPairToNetworkList(c.SelectedNetworks[0], c.SelectedNetworks[1]) } - // if the number of lanes is lesser than the number of network pairs, choose a random subset of network pairs + // if the number of lanes is lesser than the number of network pairs, choose first c.TestGroupInput.MaxNoOfLanes pairs if c.TestGroupInput.MaxNoOfLanes > 0 && c.TestGroupInput.MaxNoOfLanes < len(c.NetworkPairs) { - rand.Shuffle(len(c.NetworkPairs), func(i, j int) { - c.NetworkPairs[i], c.NetworkPairs[j] = c.NetworkPairs[j], c.NetworkPairs[i] - }) c.NetworkPairs = c.NetworkPairs[:c.TestGroupInput.MaxNoOfLanes] } @@ -347,14 +348,39 @@ func (c *CCIPTestConfig) SetOCRParams() error { // TestConfigOverrideOption is a function that modifies the test config and overrides any values passed in by test files // This is useful for setting up test specific configurations. +// The return should be a short, explanatory string that describes the change made by the override. +// This is logged at the beginning of the test run. type TestConfigOverrideOption func(*CCIPTestConfig) string -// WithCCIPOwnerTokens dictates that tokens be deployed and owned by the same account that owns all CCIP contracts. -// With Self-Serve tokens, this is unrealistic. -func WithCCIPOwnerTokens() TestConfigOverrideOption { +// UseCCIPOwnerTokens defines whether all tokens are deployed by the same address as the CCIP owner +func UseCCIPOwnerTokens(yes bool) TestConfigOverrideOption { + return func(c *CCIPTestConfig) string { + c.TestGroupInput.TokenConfig.CCIPOwnerTokens = pointer.ToBool(yes) + return fmt.Sprintf("CCIPOwnerTokens set to %t", yes) + } +} + +// WithTokensPerChain sets the number of tokens to deploy on each chain +func WithTokensPerChain(count int) TestConfigOverrideOption { + return func(c *CCIPTestConfig) string { + c.TestGroupInput.TokenConfig.NoOfTokensPerChain = pointer.ToInt(count) + return fmt.Sprintf("NoOfTokensPerChain set to %d", count) + } +} + +// WithMsgDetails sets the message details for the test +func WithMsgDetails(details *testconfig.MsgDetails) TestConfigOverrideOption { + return func(c *CCIPTestConfig) string { + c.TestGroupInput.MsgDetails = details + return "Message set" + } +} + +// WithNoTokensPerMessage sets how many tokens can be sent in a single message +func WithNoTokensPerMessage(noOfTokens int) TestConfigOverrideOption { return func(c *CCIPTestConfig) string { - c.TestGroupInput.TokenConfig.CCIPOwnerTokens = pointer.ToBool(true) - return "CCIPOwnerTokens set to true" + c.TestGroupInput.MsgDetails.NoOfTokens = pointer.ToInt(noOfTokens) + return fmt.Sprintf("MsgDetails.NoOfTokens set to %d", noOfTokens) } } diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 78f4e8d1c2..fa92bce013 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -26,15 +26,15 @@ require ( github.com/pelletier/go-toml/v2 v2.2.2 github.com/pkg/errors v0.9.1 github.com/prometheus/common v0.45.0 - github.com/rs/zerolog v1.31.0 + github.com/rs/zerolog v1.32.0 github.com/scylladb/go-reflectx v1.0.1 github.com/segmentio/ksuid v1.0.4 github.com/shopspring/decimal v1.3.1 github.com/slack-go/slack v0.12.2 github.com/smartcontractkit/chain-selectors v1.0.17 github.com/smartcontractkit/chainlink-automation v1.0.4 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625074419-c278d083facf - github.com/smartcontractkit/chainlink-testing-framework v1.31.4 + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625144005-556a7ba7b11c + github.com/smartcontractkit/chainlink-testing-framework v1.31.6 github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239 github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 github.com/smartcontractkit/chainlink/integration-tests v0.0.0-00010101000000-000000000000 @@ -73,9 +73,9 @@ require ( contrib.go.opencensus.io/exporter/stackdriver v0.13.5 // indirect cosmossdk.io/api v0.3.1 // indirect cosmossdk.io/core v0.5.1 // indirect - cosmossdk.io/depinject v1.0.0-alpha.3 // indirect - cosmossdk.io/errors v1.0.0 // indirect - cosmossdk.io/math v1.0.1 // indirect + cosmossdk.io/depinject v1.0.0-alpha.4 // indirect + cosmossdk.io/errors v1.0.1 // indirect + cosmossdk.io/math v1.3.0 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect @@ -85,7 +85,7 @@ require ( github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 // indirect - github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect + github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect github.com/CosmWasm/wasmd v0.40.1 // indirect github.com/CosmWasm/wasmvm v1.2.4 // indirect github.com/DataDog/zstd v1.5.2 // indirect @@ -126,12 +126,12 @@ require ( github.com/chenzhuoyu/iasm v0.9.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/cli/safeexec v1.0.0 // indirect - github.com/cockroachdb/errors v1.9.1 // indirect + github.com/cockroachdb/errors v1.10.0 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 // indirect - github.com/cockroachdb/redact v1.1.3 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect - github.com/cometbft/cometbft v0.37.2 // indirect + github.com/cometbft/cometbft v0.37.5 // indirect github.com/cometbft/cometbft-db v0.8.0 // indirect github.com/confio/ics23/go v0.9.0 // indirect github.com/consensys/bavard v0.1.13 // indirect @@ -141,20 +141,20 @@ require ( github.com/coreos/go-semver v0.3.0 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-proto v1.0.0-beta.2 // indirect - github.com/cosmos/cosmos-sdk v0.47.4 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect + github.com/cosmos/cosmos-sdk v0.47.11 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogoproto v1.4.11 // indirect - github.com/cosmos/iavl v0.20.0 // indirect - github.com/cosmos/ibc-go/v7 v7.2.0 // indirect + github.com/cosmos/iavl v0.20.1 // indirect + github.com/cosmos/ibc-go/v7 v7.5.1 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.12.1 // indirect + github.com/cosmos/ledger-cosmos-go v0.12.4 // indirect github.com/cpuguy83/dockercfg v0.3.1 // indirect github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 // indirect github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/deckarep/golang-set/v2 v2.3.0 // indirect + github.com/deckarep/golang-set/v2 v2.6.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/dennwc/varint v1.0.0 // indirect github.com/dfuse-io/logging v0.0.0-20210109005628-b97a57253f70 // indirect @@ -180,8 +180,8 @@ require ( github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb // indirect github.com/fatih/camelcase v1.0.0 // indirect github.com/fatih/color v1.16.0 // indirect - github.com/felixge/httpsnoop v1.0.3 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fvbommel/sortorder v1.0.2 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect github.com/gagliardetto/binary v0.7.7 // indirect @@ -189,7 +189,7 @@ require ( github.com/gagliardetto/treeout v0.1.4 // indirect github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect - github.com/getsentry/sentry-go v0.19.0 // indirect + github.com/getsentry/sentry-go v0.23.0 // indirect github.com/gin-contrib/sessions v0.0.5 // indirect github.com/gin-contrib/sse v0.1.0 // indirect github.com/gin-gonic/gin v1.9.1 // indirect @@ -225,7 +225,7 @@ require ( github.com/gogo/protobuf v1.3.3 // indirect github.com/gogo/status v1.1.1 // indirect github.com/golang-jwt/jwt/v5 v5.2.0 // indirect - github.com/golang/glog v1.1.2 // indirect + github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect @@ -375,6 +375,8 @@ require ( github.com/robfig/cron/v3 v3.0.1 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/russross/blackfriday v1.6.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect @@ -383,25 +385,25 @@ require ( github.com/shirou/gopsutil/v3 v3.24.3 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d // indirect + github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240621143432-85370a54b141 // indirect github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 // indirect - github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 // indirect - github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240625075314-affd4529a8f5 // indirect - github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240625074951-06ab5e670dba // indirect + github.com/smartcontractkit/chainlink-feeds v0.0.0-20240523182126-1784bd4f3294 // indirect + github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240621151551-885054fb0f0e // indirect + github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240621143321-7e5949418911 // indirect github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 // indirect github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 // indirect github.com/smartcontractkit/wsrpc v0.8.1 // indirect github.com/soheilhy/cmux v0.1.5 // indirect github.com/sony/gobreaker v0.5.0 // indirect - github.com/spf13/afero v1.9.5 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cast v1.6.0 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.16.0 // indirect + github.com/spf13/viper v1.18.2 // indirect 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.4.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 @@ -424,19 +426,19 @@ require ( github.com/x448/float16 v0.8.4 // indirect github.com/xlab/treeprint v1.1.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - github.com/zondax/hid v0.9.1 // indirect - github.com/zondax/ledger-go v0.14.1 // indirect + github.com/zondax/hid v0.9.2 // indirect + github.com/zondax/ledger-go v0.14.3 // indirect go.dedis.ch/fixbuf v1.0.3 // indirect go.etcd.io/bbolt v1.3.7 // indirect - go.etcd.io/etcd/api/v3 v3.5.9 // indirect - go.etcd.io/etcd/client/pkg/v3 v3.5.9 // indirect - go.etcd.io/etcd/client/v3 v3.5.9 // indirect + go.etcd.io/etcd/api/v3 v3.5.10 // indirect + go.etcd.io/etcd/client/pkg/v3 v3.5.10 // indirect + go.etcd.io/etcd/client/v3 v3.5.10 // indirect go.mongodb.org/mongo-driver v1.15.0 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/collector/pdata v1.0.0-rcv0016 // indirect go.opentelemetry.io/collector/semconv v0.87.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 // indirect go.opentelemetry.io/otel v1.24.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 // indirect @@ -459,10 +461,10 @@ require ( gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect gonum.org/v1/gonum v0.14.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect - google.golang.org/grpc v1.59.0 // indirect + google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect google.golang.org/protobuf v1.33.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect @@ -479,7 +481,7 @@ require ( k8s.io/kubectl v0.25.11 // indirect k8s.io/utils v0.0.0-20230711102312-30195339c3c7 // indirect nhooyr.io/websocket v1.8.7 // indirect - pgregory.net/rapid v0.5.5 // indirect + pgregory.net/rapid v1.1.0 // indirect rsc.io/tmplfunc v0.0.3 // indirect sigs.k8s.io/controller-runtime v0.13.0 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 5ce829c374..46bb8bcab3 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -4,7 +4,6 @@ cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSR cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -15,11 +14,8 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.110.9 h1:e7ITSqGFFk4rbz/JFIqZh3G4VEHguhAL4BQcFlWtU68= -cloud.google.com/go v0.110.9/go.mod h1:rpxevX/0Lqvlbc88b7Sc1SPNdyK1riNBTUU6JXhYNpM= +cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM= +cloud.google.com/go v0.112.0/go.mod h1:3jEEVwZ/MHU4djK5t5RHuKOA/GbLddgTdVubX1qnPD4= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -33,8 +29,8 @@ cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2Aawl cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/iam v1.1.4 h1:K6n/GZHFTtEoKT5aUG3l9diPi0VduZNQ1PfdnpkkIFk= -cloud.google.com/go/iam v1.1.4/go.mod h1:l/rg8l1AaA+VFMho/HYx2Vv6xinPSLMF8qfhRPIZ0L8= +cloud.google.com/go/iam v1.1.5 h1:1jTsCu4bcsNsE4iiqNT5SHwrDRCfRmIaaaVFhRveTJI= +cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -44,9 +40,8 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= -cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= +cloud.google.com/go/storage v1.36.0 h1:P0mOkAcaJxhCTvAkMhxMfrTKiNcub4YmmPBtlhAyTr8= +cloud.google.com/go/storage v1.36.0/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= contrib.go.opencensus.io/exporter/stackdriver v0.12.6/go.mod h1:8x999/OcIPy5ivx/wDiV7Gx4D+VUPODf0mWRGRc5kSk= contrib.go.opencensus.io/exporter/stackdriver v0.13.4/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc= contrib.go.opencensus.io/exporter/stackdriver v0.13.5 h1:TNaexHK16gPUoc7uzELKOU7JULqccn1NDuqUxmxSqfo= @@ -55,14 +50,14 @@ cosmossdk.io/api v0.3.1 h1:NNiOclKRR0AOlO4KIqeaG6PS6kswOMhHD0ir0SscNXE= cosmossdk.io/api v0.3.1/go.mod h1:DfHfMkiNA2Uhy8fj0JJlOCYOBp4eWUUJ1te5zBGNyIw= cosmossdk.io/core v0.5.1 h1:vQVtFrIYOQJDV3f7rw4pjjVqc1id4+mE0L9hHP66pyI= cosmossdk.io/core v0.5.1/go.mod h1:KZtwHCLjcFuo0nmDc24Xy6CRNEL9Vl/MeimQ2aC7NLE= -cosmossdk.io/depinject v1.0.0-alpha.3 h1:6evFIgj//Y3w09bqOUOzEpFj5tsxBqdc5CfkO7z+zfw= -cosmossdk.io/depinject v1.0.0-alpha.3/go.mod h1:eRbcdQ7MRpIPEM5YUJh8k97nxHpYbc3sMUnEtt8HPWU= -cosmossdk.io/errors v1.0.0 h1:nxF07lmlBbB8NKQhtJ+sJm6ef5uV1XkvPXG2bUntb04= -cosmossdk.io/errors v1.0.0/go.mod h1:+hJZLuhdDE0pYN8HkOrVNwrIOYvUGnn6+4fjnJs/oV0= -cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca h1:msenprh2BLLRwNT7zN56TbBHOGk/7ARQckXHxXyvjoQ= -cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca/go.mod h1:PkIAKXZvaxrTRc++z53XMRvFk8AcGGWYHcMIPzVYX9c= -cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= -cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= +cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= +cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= +cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= +cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= +cosmossdk.io/log v1.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI= +cosmossdk.io/log v1.3.1/go.mod h1:2/dIomt8mKdk6vl3OWJcPk2be3pGOS8OQaLUM/3/tCM= +cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= +cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= @@ -79,7 +74,6 @@ github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9 github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= github.com/AlekSi/pointer v1.1.0 h1:SSDMPcXD9jSl8FPy9cRzoRaMJtm9g9ggGTxecRUbQoI= github.com/AlekSi/pointer v1.1.0/go.mod h1:y7BvfRI3wXPWKXEBhU71nbnIEEZX0QTSB2Bj48UJIZE= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/azure-sdk-for-go v65.0.0+incompatible h1:HzKLt3kIwMm4KeJYTdx9EbjRYTySD/t8i1Ee/W5EGXw= github.com/Azure/azure-sdk-for-go v65.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0 h1:9kDVnTz3vbfweTqAUmk/a/pH5pWFCHtvRpHYC0G/dcA= @@ -112,10 +106,8 @@ github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 h1:WpB/QDNLpMw github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= -github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= +github.com/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRrLeDnvGIM= +github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4= github.com/CosmWasm/wasmd v0.40.1 h1:LxbO78t/6S8TkeQlUrJ0m5O87HtAwLx4RGHq3rdrOEU= github.com/CosmWasm/wasmd v0.40.1/go.mod h1:6EOwnv7MpuFaEqxcUOdFV9i4yvrdOciaY6VQ1o7A3yg= github.com/CosmWasm/wasmvm v1.2.4 h1:6OfeZuEcEH/9iqwrg2pkeVtDCkMoj9U6PpKtcrCyVrQ= @@ -129,7 +121,6 @@ github.com/GeertJohan/go.incremental v1.0.0/go.mod h1:6fAjUhbVuX1KcMD3c8TEgVUqmo github.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtixis4Tib9if0= github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= @@ -155,7 +146,6 @@ github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8 github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= @@ -164,10 +154,7 @@ github.com/Workiva/go-datastructures v1.1.0 h1:hu20UpgZneBhQ3ZvwiOGlqJSKIosin2Rd github.com/Workiva/go-datastructures v1.1.0/go.mod h1:1yZL+zfsztete+ePzZz/Zb1/t5BnDuE2Ya2MMGhzP6A= github.com/XSAM/otelsql v0.27.0 h1:i9xtxtdcqXV768a5C6SoT/RkG+ue3JTOgkYInzlTOqs= github.com/XSAM/otelsql v0.27.0/go.mod h1:0mFB3TvLa7NCuhm/2nU7/b2wEtsczkj8Rey8ygO7V+A= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= -github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= -github.com/alecthomas/participle/v2 v2.0.0-alpha7/go.mod h1:NumScqsC42o9x+dGj8/YqsIfhrIQjFEOFovxotbBirA= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -212,7 +199,6 @@ github.com/aws/constructs-go/constructs/v10 v10.1.255 h1:5hARfEmhBqHSTQf/C3QLA3s github.com/aws/constructs-go/constructs/v10 v10.1.255/go.mod h1:DCdBSjN04Ck2pajCacTD4RKFqSA7Utya8d62XreYctI= github.com/aws/jsii-runtime-go v1.75.0 h1:NhpUfyiL7/wsRuUekFsz8FFBCYLfPD/l61kKg9kL/a4= github.com/aws/jsii-runtime-go v1.75.0/go.mod h1:TKCyrtM0pygEPo4rDZzbMSDNCDNTSYSN6/mGyHI6O3I= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df h1:GSoSVRLoBaFpOOds6QyY1L8AX7uoY+Ln3BHc22W40X0= @@ -298,36 +284,30 @@ github.com/cli/shurcooL-graphql v0.0.3 h1:CtpPxyGDs136/+ZeyAfUKYmcQBjDlq5aqnrDCW github.com/cli/shurcooL-graphql v0.0.3/go.mod h1:tlrLmw/n5Q/+4qSvosT+9/W5zc8ZMjnJeYBxSdb4nWA= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= -github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= -github.com/cockroachdb/apd/v3 v3.1.0/go.mod h1:6qgPBMXjATAdD/VefbRP9NoSLKjbB4LCoA7gN4LpHs4= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/errors v1.10.0 h1:lfxS8zZz1+OjtV4MtNWgboi/W5tyLEB6VQZBXN+0VUU= +github.com/cockroachdb/errors v1.10.0/go.mod h1:lknhIsEVQ9Ss/qKDBQS/UqFSvPQjOwNq2qyKAxtHRqE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 h1:aPEJyR4rPBvDmeyi+l/FS/VtA00IWvjeFvjen1m1l1A= github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593/go.mod h1:6hk1eMY/u5t+Cf18q5lFMUA1Rc+Sm5I6Ra1QuPyxXCo= -github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONNbHU7MuEHboiFuA= github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c= -github.com/cometbft/cometbft v0.37.2 h1:XB0yyHGT0lwmJlFmM4+rsRnczPlHoAKFX6K8Zgc2/Jc= -github.com/cometbft/cometbft v0.37.2/go.mod h1:Y2MMMN//O5K4YKd8ze4r9jmk4Y7h0ajqILXbH5JQFVs= +github.com/cometbft/cometbft v0.37.5 h1:/U/TlgMh4NdnXNo+YU9T2NMCWyhXNDF34Mx582jlvq0= +github.com/cometbft/cometbft v0.37.5/go.mod h1:QC+mU0lBhKn8r9qvmnq53Dmf3DWBt4VtkcKw2C81wxY= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= @@ -356,10 +336,10 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-proto v1.0.0-beta.2 h1:X3OKvWgK9Gsejo0F1qs5l8Qn6xJV/AzgIWR2wZ8Nua8= -github.com/cosmos/cosmos-proto v1.0.0-beta.2/go.mod h1:+XRCLJ14pr5HFEHIUcn51IKXD1Fy3rkEQqt4WqmN4V0= -github.com/cosmos/cosmos-sdk v0.47.4 h1:FVUpEprm58nMmBX4xkRdMDaIG5Nr4yy92HZAfGAw9bg= -github.com/cosmos/cosmos-sdk v0.47.4/go.mod h1:R5n+uM7vguVPFap4pgkdvQCT1nVo/OtPwrlAU40rvok= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= +github.com/cosmos/cosmos-sdk v0.47.11 h1:0Qx7eORw0RJqPv+mvDuU8NQ1LV3nJJKJnPoYblWHolc= +github.com/cosmos/cosmos-sdk v0.47.11/go.mod h1:ADjORYzUQqQv/FxDi0H0K5gW/rAk1CiDR3ZKsExfJV0= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= @@ -367,14 +347,14 @@ github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiK github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= -github.com/cosmos/iavl v0.20.0 h1:fTVznVlepH0KK8NyKq8w+U7c2L6jofa27aFX6YGlm38= -github.com/cosmos/iavl v0.20.0/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= -github.com/cosmos/ibc-go/v7 v7.2.0 h1:dx0DLUl7rxdyZ8NiT6UsrbzKOJx/w7s+BOaewFRH6cg= -github.com/cosmos/ibc-go/v7 v7.2.0/go.mod h1:OOcjKIRku/j1Xs1RgKK0yvKRrJ5iFuZYMetR1n3yMlc= +github.com/cosmos/iavl v0.20.1 h1:rM1kqeG3/HBT85vsZdoSNsehciqUQPWrR4BYmqE2+zg= +github.com/cosmos/iavl v0.20.1/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= +github.com/cosmos/ibc-go/v7 v7.5.1 h1:KqS/g7W7EMX1OtOvufS8lWMJibOKpdgtNNZIU6fAgVU= +github.com/cosmos/ibc-go/v7 v7.5.1/go.mod h1:ktFg5GvKOyrGCqTWtW7Grj5uweU4ZapxrNeVS1CLLbo= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= -github.com/cosmos/ledger-cosmos-go v0.12.1 h1:sMBxza5p/rNK/06nBSNmsI/WDqI0pVJFVNihy1Y984w= -github.com/cosmos/ledger-cosmos-go v0.12.1/go.mod h1:dhO6kj+Y+AHIOgAe4L9HL/6NDdyyth4q238I9yFpD2g= +github.com/cosmos/ledger-cosmos-go v0.12.4 h1:drvWt+GJP7Aiw550yeb3ON/zsrgW0jgh5saFCr7pDnw= +github.com/cosmos/ledger-cosmos-go v0.12.4/go.mod h1:fjfVWRf++Xkygt9wzCsjEBdjcf7wiiY35fv3ctT+k4M= github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzUGSKFTcM= github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFgWl/ENIznEoYQI4= github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E= @@ -394,10 +374,6 @@ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7Do github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= -github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= -github.com/cucumber/common/gherkin/go/v22 v22.0.0/go.mod h1:3mJT10B2GGn3MvVPd3FwR7m2u4tLhSRhWUqJU4KN4Fg= -github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= -github.com/cucumber/common/messages/go/v17 v17.1.1/go.mod h1:bpGxb57tDE385Rb2EohgUadLkAbhoC4IyCFi89u/JQI= github.com/daaku/go.zipexe v1.0.0/go.mod h1:z8IiR6TsVLEYKwXAoE/I+8ys/sDkgTzSL0CLnGVd57E= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= @@ -407,8 +383,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deckarep/golang-set/v2 v2.3.0 h1:qs18EKUfHm2X9fA50Mr/M5hccg2tNnVqsiBImnyDs0g= -github.com/deckarep/golang-set/v2 v2.3.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= +github.com/deckarep/golang-set/v2 v2.6.0 h1:XfcQbWM1LlMB8BsJ8N9vW5ehnnPVIw0je80NsVHagjM= +github.com/deckarep/golang-set/v2 v2.6.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= @@ -420,7 +396,6 @@ github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFM github.com/dfuse-io/logging v0.0.0-20201110202154-26697de88c79/go.mod h1:V+ED4kT/t/lKtH99JQmKIb0v9WL3VaYkJ36CfHlVECI= github.com/dfuse-io/logging v0.0.0-20210109005628-b97a57253f70 h1:CuJS05R9jmNlUK8GOxrEELPbfXm0EuGh/30LjkjN5vo= github.com/dfuse-io/logging v0.0.0-20210109005628-b97a57253f70/go.mod h1:EoK/8RFbMEteaCaz89uessDTnCWjbbcr+DXcBh4el5o= -github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= @@ -457,24 +432,21 @@ github.com/dvsekhvalnov/jose2go v1.7.0 h1:bnQc8+GMnidJZA8zc6lLEAb4xNrIqHwO+9Tzqv github.com/dvsekhvalnov/jose2go v1.7.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/edsrzf/mmap-go v1.1.0 h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ= github.com/edsrzf/mmap-go v1.1.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= github.com/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE= github.com/emicklei/go-restful/v3 v3.10.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.11.1 h1:wSUXTlLfiAQRWs2F+p+EKOY9rUyis1MyGqJ2DIk5HpM= -github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= +github.com/envoyproxy/go-control-plane v0.12.0 h1:4X+VP1GHd1Mhj6IB5mMeGbLCleqxjletLK6K0rbxyZI= +github.com/envoyproxy/go-control-plane v0.12.0/go.mod h1:ZBTaoJ23lqITozF0M6G4/IragXCQKCnYbmlmtHvwRG0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= -github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= +github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/esote/minmaxheap v1.0.0 h1:rgA7StnXXpZG6qlM0S7pUmEv1KpWe32rYT4x8J8ntaA= github.com/esote/minmaxheap v1.0.0/go.mod h1:Ln8+i7fS1k3PLgZI2JAo0iA1as95QnIYiGCrqSJ5FZk= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= github.com/ethereum/go-ethereum v1.13.8 h1:1od+thJel3tM52ZUNQwvpYOeRHlbkVFZ5S8fhi0Lgsg= @@ -488,7 +460,6 @@ github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2 github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb h1:IT4JYU7k4ikYg1SCxNI1/Tieq/NFvh6dzLdgi7eu0tM= github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb/go.mod h1:bH6Xx7IW64qjjJq8M2u4dxNaBiDfKK+z/3eGDpXEQhc= -github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -496,9 +467,8 @@ github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= -github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= @@ -509,8 +479,8 @@ github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7z github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fvbommel/sortorder v1.0.2 h1:mV4o8B2hKboCdkJm+a7uX/SIpZob4JzUpc5GGnM45eo= github.com/fvbommel/sortorder v1.0.2/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= github.com/fxamacker/cbor/v2 v2.5.0 h1:oHsG0V/Q6E/wqTS2O1Cozzsy69nqCiguo5Q1a1ADivE= @@ -525,16 +495,14 @@ github.com/gagliardetto/solana-go v1.8.4 h1:vmD/JmTlonyXGy39bAo0inMhmbdAwV7rXZtL github.com/gagliardetto/solana-go v1.8.4/go.mod h1:i+7aAyNDTHG0jK8GZIBSI4OVvDqkt2Qx+LklYclRNG8= github.com/gagliardetto/treeout v0.1.4 h1:ozeYerrLCmCubo1TcIjFiOWTTGteOOHND1twdFpgwaw= github.com/gagliardetto/treeout v0.1.4/go.mod h1:loUefvXTrlRG5rYmJmExNryyBRh8f89VZhmMOyCyqok= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 h1:f6D9Hr8xV8uYKlyuj8XIruxlh9WjVjdh1gIicAS7ays= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2GihuqhwdILrV+7GJel5lyPV3u1+PgzrWLc0TkE= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc= github.com/gedex/inflector v0.0.0-20170307190818-16278e9db813 h1:Uc+IZ7gYqAf/rSGFplbWBSHaGolEQlNLgMgSE3ccnIQ= github.com/gedex/inflector v0.0.0-20170307190818-16278e9db813/go.mod h1:P+oSoE9yhSRvsmYyZsshflcR6ePWYLql6UU1amW13IM= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.19.0 h1:BcCH3CN5tXt5aML+gwmbFwVptLLQA+eT866fCO9wVOM= -github.com/getsentry/sentry-go v0.19.0/go.mod h1:y3+lGEFEFexZtpbG1GUE2WD/f9zGyKYwpEqryTOC/nE= +github.com/getsentry/sentry-go v0.23.0 h1:dn+QRCeJv4pPt9OjVXiMcGIBIefaTJPw/h0bZWO05nE= +github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/cors v1.5.0 h1:DgGKV7DDoOn36DFkNtbHrjoRiT5ExCe+PC9/xp7aKvk= github.com/gin-contrib/cors v1.5.0/go.mod h1:TvU7MAZ3EwrPLI2ztzTt3tqgvBCq+wn8WpZmfADjupI= @@ -544,17 +512,13 @@ github.com/gin-contrib/sessions v0.0.5 h1:CATtfHmLMQrMNpJRgzjWXD7worTh7g7ritsQfm github.com/gin-contrib/sessions v0.0.5/go.mod h1:vYAuaUPqie3WUSsft6HUlCjlwwoJQs97miaG2+7neKY= github.com/gin-contrib/size v0.0.0-20230212012657-e14a14094dc4 h1:Z9J0PVIt1PuibOShaOw1jH8hUYz+Ak8NLsR/GI0Hv5I= github.com/gin-contrib/size v0.0.0-20230212012657-e14a14094dc4/go.mod h1:CEPcgZiz8998l9E8fDm16h8UfHRL7b+5oG0j/0koeVw= -github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= github.com/go-asn1-ber/asn1-ber v1.5.5 h1:MNHlNMBDgEKD4TcKr36vQN68BA00aDfjIt3/bD50WnA= github.com/go-asn1-ber/asn1-ber v1.5.5/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= @@ -583,7 +547,6 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY= @@ -700,18 +663,15 @@ github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRx github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= -github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= github.com/gogo/status v1.1.1 h1:DuHXlSFHNKqTQ+/ACf5Vs6r4X/dH2EgIzR9Vr+H65kg= github.com/gogo/status v1.1.1/go.mod h1:jpG3dM5QPcqu19Hg8lkUhBFBa3TcLs1DG7+2Jqci7oU= -github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v5 v5.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw= github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= -github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -752,7 +712,6 @@ github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -779,7 +738,6 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github/v41 v41.0.0 h1:HseJrM2JFf2vfiZJ8anY2hqBjdfY1Vlj/K27ueww4gg= github.com/google/go-github/v41 v41.0.0/go.mod h1:XgmCA5H323A9rtgExdTcnDkcqp6S30AVACCBDOonIxg= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/go-tpm v0.9.0 h1:sQF6YqWMi+SCXpsmS3fd21oPy/vSddwZry4JnmltHVk= @@ -790,7 +748,6 @@ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -800,15 +757,12 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b h1:RMpPgZTSApbPf7xaVel+QkoGPRLFLrwFO89uDUHEGf0= github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= -github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= +github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= +github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= @@ -817,13 +771,12 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.2.5 h1:UR4rDjcgpgEnqpIEvkiqTYKBCKLNmlge2eVjoZfySzM= -github.com/googleapis/enterprise-certificate-proxy v0.2.5/go.mod h1:RxW0N9901Cko1VOCW3SXCpWP+mlIEkk2tP7jnHy9a3w= +github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= +github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gophercloud/gophercloud v1.5.0 h1:cDN6XFCLKiiqvYpjQLq9AiM7RDRbIC9450WpPH+yvXo= github.com/gophercloud/gophercloud v1.5.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -935,7 +888,6 @@ github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= @@ -981,13 +933,11 @@ github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= -github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= @@ -997,11 +947,6 @@ github.com/invopop/jsonschema v0.12.0 h1:6ovsNSuvn9wEQVOyc72aycBMVQFKz7cPdMJn10C github.com/invopop/jsonschema v0.12.0/go.mod h1:ffZ5Km5SWWRAIN6wbDXItl95euhFz2uON45H2qjYt+0= github.com/ionos-cloud/sdk-go/v6 v6.1.8 h1:493wE/BkZxJf7x79UCE0cYGPZoqQcPiEBALvt7uVGY0= github.com/ionos-cloud/sdk-go/v6 v6.1.8/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= @@ -1085,27 +1030,18 @@ github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfV github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.17.3 h1:qkRjuerhUU1EmXLYGkSH6EZL+vPSxIrYjLNAK4slzwA= github.com/klauspost/compress v1.17.3/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= @@ -1115,12 +1051,10 @@ github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b/go.mod h1:pcaDhQK0/NJZ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -1130,8 +1064,6 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/leanovate/gopter v0.2.10-0.20210127095200-9abe2343507a h1:dHCfT5W7gghzPtfsW488uPmEOm85wewI+ypUwibyTdU= github.com/leanovate/gopter v0.2.10-0.20210127095200-9abe2343507a/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= @@ -1174,12 +1106,9 @@ github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsI github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= @@ -1187,7 +1116,6 @@ github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= @@ -1201,12 +1129,9 @@ github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJKjyR5WD3HYQSd+U= github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= @@ -1273,7 +1198,6 @@ github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mostynb/zstdpool-freelist v0.0.0-20201229113212-927304c0c3b1 h1:mPMvm6X6tf4w8y7j9YIt6V9jfWhL6QlbEc7CCmeQlWk= github.com/mostynb/zstdpool-freelist v0.0.0-20201229113212-927304c0c3b1/go.mod h1:ye2e/VUEtE2BHE+G/QcKkcLQVAEJoYRFj5VUOQatCRE= -github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= @@ -1287,10 +1211,6 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8m github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229/go.mod h1:0aYXnNPJ8l7uZxf45rWW1a/uME32OF0rhiYGNQ2oF2E= github.com/nsf/jsondiff v0.0.0-20210926074059-1e845ec5d249 h1:NHrXEjTNQY7P0Zfx1aMrNhpgxHmow66XQtm0aQLY0AE= @@ -1305,7 +1225,6 @@ github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= @@ -1369,7 +1288,6 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -1427,8 +1345,6 @@ github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= -github.com/regen-network/gocuke v0.6.2/go.mod h1:zYaqIHZobHyd0xOrHGPQjbhGJsuZ1oElx150u2o1xuk= github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4= github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= @@ -1441,8 +1357,6 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= @@ -1452,8 +1366,8 @@ github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= -github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= -github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= +github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww= github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= @@ -1462,6 +1376,10 @@ github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6NgVqpn3+iol9aGu4= github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY= github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= @@ -1469,7 +1387,6 @@ github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZj github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20 h1:a9hSJdJcd16e0HoMsnFvaHvxB3pxSD+SC7+CISp7xY0= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= -github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= github.com/scylladb/go-reflectx v1.0.1 h1:b917wZM7189pZdlND9PbIJ6NQxfDPfBvUaQ7cjj1iZQ= github.com/scylladb/go-reflectx v1.0.1/go.mod h1:rWnOfDIRWBGN0miMLIcoPt/Dhi2doCMZqwMCJ3KupFc= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= @@ -1478,7 +1395,6 @@ github.com/segmentio/ksuid v1.0.4 h1:sBo2BdShXjmcugAMwjugoGUdUV0pcxY5mW4xKRn3v4c github.com/segmentio/ksuid v1.0.4/go.mod h1:/XUiZBD3kVx5SmUOl55voK5yeAbBNNIed+2O73XgrPE= github.com/sercand/kuberesolver/v5 v5.1.1 h1:CYH+d67G0sGBj7q5wLK61yzqJJ8gLLC8aeprPTHb6yY= github.com/sercand/kuberesolver/v5 v5.1.1/go.mod h1:Fs1KbKhVRnB2aDWN12NjKCB+RgYMWZJ294T3BtmVCpQ= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/sethvargo/go-retry v0.2.4 h1:T+jHEQy/zKJf5s95UkguisicE0zuF9y7+/vgz08Ocec= @@ -1509,20 +1425,20 @@ github.com/smartcontractkit/chain-selectors v1.0.17 h1:otOlYUnutS8oQBEAi9RLQICqZ github.com/smartcontractkit/chain-selectors v1.0.17/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-common v0.1.7-0.20240625074419-c278d083facf h1:d9AS/K8RSVG64USb20N/U7RaPOsYPcmuLGJq7iE+caM= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625074419-c278d083facf/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= -github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d h1:5tgMC5Gi2UAOKZ+m28W8ubjLeR0pQCAcrz6eQ0rW510= -github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625144005-556a7ba7b11c h1:dR2y3uzuZ8cJOaMSij8LQIdySuImwxkiZFjZ62ML5S0= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625144005-556a7ba7b11c/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= +github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240621143432-85370a54b141 h1:TMOoYaeSDkkI3jkCH7lKHOZaLkeDuxFTNC+XblD6M0M= +github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240621143432-85370a54b141/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540/go.mod h1:sjAmX8K2kbQhvDarZE1ZZgDgmHJ50s0BBc/66vKY2ek= -github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 h1:MD80ZRCTvxxJ8PBmhtrKoTnky8cVNYrCrIBLVRbrOM0= -github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917/go.mod h1:jwVxhctE6BgLOSSsVq9wbREpZ8Ev34H+UBxeUhESZRs= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240625075314-affd4529a8f5 h1:h0gjVZ7oQwPPQOFJuZToDhB1NTEbIBrRtsJysATTG/g= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240625075314-affd4529a8f5/go.mod h1:NbXXQaNFskVMYRut0MvBlcHu/vDgipGMwYjamvjVB9Y= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240625074951-06ab5e670dba h1:YNSlhK5mobyAaw02LPGgIEuS3lXyCTXcc6oaV2L6uUI= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240625074951-06ab5e670dba/go.mod h1:UVFRacRkP7O7TQAzFmR52v5mUlxf+G1ovMlCQAB/cHU= -github.com/smartcontractkit/chainlink-testing-framework v1.31.4 h1:5/zF5Z2w+/HTvUSSJNhWSiHvlQ2O2qxRw4e1fBbVraQ= -github.com/smartcontractkit/chainlink-testing-framework v1.31.4/go.mod h1:E6uNEZhZZid9PHv6/Kq5Vn63GlO61ZcKB+/f0DKo3Q4= +github.com/smartcontractkit/chainlink-feeds v0.0.0-20240523182126-1784bd4f3294 h1:4L1878goh1mqJx6JPv/TEeMAgYvbx7+D14QFSSu/DPs= +github.com/smartcontractkit/chainlink-feeds v0.0.0-20240523182126-1784bd4f3294/go.mod h1:jwVxhctE6BgLOSSsVq9wbREpZ8Ev34H+UBxeUhESZRs= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240621151551-885054fb0f0e h1:4dwcbcVrMne6wtOX/4yWdYJwk8iSm0INVNva/EhF35E= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240621151551-885054fb0f0e/go.mod h1:rJ4+TwNMciU2pvx6dsnUNnh4sPI5bUqgmYfhSrYhQ8Y= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240621143321-7e5949418911 h1:TSgCT8Uy+R4o3GwoWUqRCGNKeciub7r7+Aa3ylmg66c= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240621143321-7e5949418911/go.mod h1:OiWUTrrpSLLTMh7FINWjEh6mmDJCVPaC4yEsDCVaWdU= +github.com/smartcontractkit/chainlink-testing-framework v1.31.6 h1:NL91Se5alOyJCzN9cR+osZJJ0nYYgyxMVSK0cSha9wU= +github.com/smartcontractkit/chainlink-testing-framework v1.31.6/go.mod h1:E6uNEZhZZid9PHv6/Kq5Vn63GlO61ZcKB+/f0DKo3Q4= github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239 h1:Kk5OVlx/5g9q3Z3lhxytZS4/f8ds1MiNM8yaHgK3Oe8= github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239/go.mod h1:DC8sQMyTlI/44UCTL8QWFwb0bYNoXCfjwCv2hMivYZU= github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 h1:FFdvEzlYwcuVHkdZ8YnZR/XomeMGbz5E2F2HZI3I3w8= @@ -1552,12 +1468,14 @@ github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/sony/gobreaker v0.5.0 h1:dRCvqm0P490vZPmy7ppEk2qCnCieBooFJ+YoXGYB+yg= github.com/sony/gobreaker v0.5.0/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= @@ -1568,16 +1486,14 @@ github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJ github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= +github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= @@ -1605,8 +1521,8 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= @@ -1648,7 +1564,6 @@ github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaO github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= @@ -1668,14 +1583,10 @@ github.com/urfave/cli v1.22.14 h1:ebbhrRiGK2i4naQJr+1Xj92HXZCrK7MsyTS/ob3HnAk= github.com/urfave/cli v1.22.14/go.mod h1:X0eDS6pD6Exaclxm99NJ3FiCDRED7vIHpx2mDOHLvkA= github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= github.com/valyala/fastjson v1.4.1 h1:hrltpHpIpkaxll8QltMU8c3QZ5+qIiCL8yKqPFJI/yE= github.com/valyala/fastjson v1.4.1/go.mod h1:nV6MsjxL2IMJQUoHDIrjEI7oLyeqK6aBD7EFWPsvP8o= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc= @@ -1696,11 +1607,7 @@ github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1712,10 +1619,10 @@ github.com/yuin/gopher-lua v1.1.0/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7 github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= -github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= -github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= -github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= +github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= +github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= +github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= go.dedis.ch/fixbuf v1.0.3 h1:hGcV9Cd/znUxlusJ64eAlExS+5cJDIyTyEG+otu5wQs= go.dedis.ch/fixbuf v1.0.3/go.mod h1:yzJMt34Wa5xD37V5RTdmp38cz3QhMagdGoem9anUalw= go.dedis.ch/kyber/v3 v3.0.4/go.mod h1:OzvaEnPvKlyrWyp3kGXlFdp7ap1VC6RkZDTaPikqhsQ= @@ -1729,12 +1636,12 @@ go.dedis.ch/protobuf v1.0.11/go.mod h1:97QR256dnkimeNdfmURz0wAMNVbd1VmLXhG1CrTYr go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= -go.etcd.io/etcd/api/v3 v3.5.9 h1:4wSsluwyTbGGmyjJktOf3wFQoTBIURXHnq9n/G/JQHs= -go.etcd.io/etcd/api/v3 v3.5.9/go.mod h1:uyAal843mC8uUVSLWz6eHa/d971iDGnCRpmKd2Z+X8k= -go.etcd.io/etcd/client/pkg/v3 v3.5.9 h1:oidDC4+YEuSIQbsR94rY9gur91UPL6DnxDCIYd2IGsE= -go.etcd.io/etcd/client/pkg/v3 v3.5.9/go.mod h1:y+CzeSmkMpWN2Jyu1npecjB9BBnABxGM4pN8cGuJeL4= -go.etcd.io/etcd/client/v3 v3.5.9 h1:r5xghnU7CwbUxD/fbUtRyJGaYNfDun8sp/gTr1hew6E= -go.etcd.io/etcd/client/v3 v3.5.9/go.mod h1:i/Eo5LrZ5IKqpbtpPDuaUnDOUv471oDg8cjQaUr2MbA= +go.etcd.io/etcd/api/v3 v3.5.10 h1:szRajuUUbLyppkhs9K6BRtjY37l66XQQmw7oZRANE4k= +go.etcd.io/etcd/api/v3 v3.5.10/go.mod h1:TidfmT4Uycad3NM/o25fG3J07odo4GBB9hoxaodFCtI= +go.etcd.io/etcd/client/pkg/v3 v3.5.10 h1:kfYIdQftBnbAq8pUWFXfpuuxFSKzlmM5cSn76JByiT0= +go.etcd.io/etcd/client/pkg/v3 v3.5.10/go.mod h1:DYivfIviIuQ8+/lCq4vcxuseg2P2XbHygkKwFo9fc8U= +go.etcd.io/etcd/client/v3 v3.5.10 h1:W9TXNZ+oB3MCd/8UjxHTWK5J9Nquw9fQBLJd5ne5/Ao= +go.etcd.io/etcd/client/v3 v3.5.10/go.mod h1:RVeBnDz2PUEZqTpgqwAtUd8nAPf5kjyFyND7P1VkOKc= go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= @@ -1759,8 +1666,8 @@ go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0. go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.49.0/go.mod h1:1P/02zM3OwkX9uki+Wmxw3a5GVb6KUXRsa7m7bOC9Fg= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 h1:SpGay3w+nEwMpfVnbqOLH5gY52/foP8RE8UzTZ1pdSE= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1/go.mod h1:4UoMYEZOC0yN/sPGH76KPkkU7zgiEWYWL9vwmbnTJPE= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 h1:x8Z78aZx8cOF0+Kkazoc7lwUNMGy0LrzEMxTm4BbTxg= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0/go.mod h1:62CPTSry9QZtOaSsE3tOzhx6LzDhHnXJ6xHeMNNiM6Q= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 h1:aFJWCqJMNjENlcleuuOkGAPH82y0yULBScfXcIEdS24= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1/go.mod h1:sEGXWArGqc3tVa+ekntsN65DmVbVeW+7lTKTjZF3/Fo= go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= go.opentelemetry.io/otel/exporters/otlp v0.20.0 h1:PTNgq9MRmQqqJY0REVbZFvwkYOA85vbdQU/nVfxDyqg= @@ -1825,26 +1732,21 @@ golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaE golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= @@ -1875,7 +1777,6 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -1884,8 +1785,6 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= @@ -1901,7 +1800,6 @@ golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -1911,7 +1809,6 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190921015927-1a5e07d1ff72/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1930,11 +1827,8 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210331212208-0fccb6fa2b5c/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= @@ -1945,7 +1839,6 @@ golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= @@ -1962,10 +1855,6 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210413134643-5e61552d6c78/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= @@ -2039,25 +1928,19 @@ golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210331175145-43e1dd70ce54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2066,9 +1949,7 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2077,7 +1958,6 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2121,18 +2001,15 @@ golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -2182,16 +2059,9 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= @@ -2204,8 +2074,6 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0= @@ -2227,11 +2095,8 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.149.0 h1:b2CqT6kG+zqJIVKRQ3ELJVLN1PwHZ6DJ3dW8yl82rgY= -google.golang.org/api v0.149.0/go.mod h1:Mwn1B7JTXrzXtnvmzQE2BD6bYZQ8DShKZDZbeN9I7qI= +google.golang.org/api v0.155.0 h1:vBmGhCYs0djJttDNynWo44zosHlPvHmA0XiN2zP2DtA= +google.golang.org/api v0.155.0/go.mod h1:GI5qK5f40kCpHfPn6+YzGAByIKWv8ujFnmoWm7Igduk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -2278,22 +2143,14 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210401141331-865547bb08e2/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405/go.mod h1:3WDQMjmJk36UQhjQ89emUzb1mdaHcPeeAh4SCBKznB4= -google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b h1:CIC2YMXmIhYw6evmhPxBKJ4fmLbOFtXQN/GV3XOZR8k= -google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -2309,18 +2166,14 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/grpc/examples v0.0.0-20210424002626-9572fd6faeae/go.mod h1:Ly7ZA/ARzg8fnPU9TyZIxoz33sEUuWX7txiqs8lPTgE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -2347,18 +2200,14 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= -gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= gopkg.in/guregu/null.v4 v4.0.0 h1:1Wm3S1WEA2I26Kq+6vcW+w0gcDo44YKYD7YIEJNHDjg= gopkg.in/guregu/null.v4 v4.0.0/go.mod h1:YoQhUrADuG3i9WqesrCmpNRwm1ypAgSHYqoOcTu/JrI= gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= @@ -2374,7 +2223,6 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -2382,8 +2230,8 @@ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C 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.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= -gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +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= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -2415,8 +2263,8 @@ k8s.io/utils v0.0.0-20230711102312-30195339c3c7/go.mod h1:OLgZIPagt7ERELqWJFomSt nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g= nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= -pgregory.net/rapid v0.5.5 h1:jkgx1TjbQPD/feRoK+S/mXw9e1uj6WilpHrXJowi6oA= -pgregory.net/rapid v0.5.5/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index 205e71ed46..44d38aee55 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -13,11 +13,11 @@ require ( github.com/go-resty/resty/v2 v2.11.0 github.com/pelletier/go-toml/v2 v2.2.2 github.com/pkg/errors v0.9.1 - github.com/rs/zerolog v1.31.0 + github.com/rs/zerolog v1.32.0 github.com/slack-go/slack v0.12.2 github.com/smartcontractkit/chainlink-automation v1.0.4 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625074419-c278d083facf - github.com/smartcontractkit/chainlink-testing-framework v1.31.4 + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625144005-556a7ba7b11c + github.com/smartcontractkit/chainlink-testing-framework v1.31.6 github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240214231432-4ad5eb95178c github.com/smartcontractkit/chainlink/v2 v2.9.0-beta0.0.20240216210048-da02459ddad8 github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c @@ -36,9 +36,9 @@ require ( contrib.go.opencensus.io/exporter/stackdriver v0.13.5 // indirect cosmossdk.io/api v0.3.1 // indirect cosmossdk.io/core v0.5.1 // indirect - cosmossdk.io/depinject v1.0.0-alpha.3 // indirect - cosmossdk.io/errors v1.0.0 // indirect - cosmossdk.io/math v1.0.1 // indirect + 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.0 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect @@ -49,7 +49,7 @@ require ( github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 // indirect - github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect + github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect github.com/CosmWasm/wasmd v0.40.1 // indirect github.com/CosmWasm/wasmvm v1.2.4 // indirect github.com/DataDog/zstd v1.5.2 // indirect @@ -93,12 +93,12 @@ require ( github.com/chaos-mesh/chaos-mesh/api/v1alpha1 v0.0.0-20220226050744-799408773657 // indirect github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect github.com/chenzhuoyu/iasm v0.9.0 // indirect - github.com/cockroachdb/errors v1.9.1 // indirect + github.com/cockroachdb/errors v1.10.0 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 // indirect - github.com/cockroachdb/redact v1.1.3 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect - github.com/cometbft/cometbft v0.37.2 // indirect + github.com/cometbft/cometbft v0.37.5 // indirect github.com/cometbft/cometbft-db v0.8.0 // indirect github.com/confio/ics23/go v0.9.0 // indirect github.com/consensys/bavard v0.1.13 // indirect @@ -109,20 +109,20 @@ require ( github.com/coreos/go-semver v0.3.0 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-proto v1.0.0-beta.2 // indirect - github.com/cosmos/cosmos-sdk v0.47.4 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect + github.com/cosmos/cosmos-sdk v0.47.11 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogoproto v1.4.11 // indirect - github.com/cosmos/iavl v0.20.0 // indirect - github.com/cosmos/ibc-go/v7 v7.2.0 // indirect + github.com/cosmos/iavl v0.20.1 // indirect + github.com/cosmos/ibc-go/v7 v7.5.1 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.12.1 // indirect + github.com/cosmos/ledger-cosmos-go v0.12.4 // indirect github.com/cpuguy83/dockercfg v0.3.1 // indirect github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 // indirect github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/deckarep/golang-set/v2 v2.3.0 // indirect + github.com/deckarep/golang-set/v2 v2.6.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/dennwc/varint v1.0.0 // indirect github.com/dfuse-io/logging v0.0.0-20210109005628-b97a57253f70 // indirect @@ -148,8 +148,8 @@ require ( github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb // indirect github.com/fatih/camelcase v1.0.0 // indirect github.com/fatih/color v1.16.0 // indirect - github.com/felixge/httpsnoop v1.0.3 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fvbommel/sortorder v1.0.2 // indirect github.com/fxamacker/cbor/v2 v2.5.0 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect @@ -158,7 +158,7 @@ require ( github.com/gagliardetto/treeout v0.1.4 // indirect github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect - github.com/getsentry/sentry-go v0.19.0 // indirect + github.com/getsentry/sentry-go v0.23.0 // indirect github.com/gin-contrib/sessions v0.0.5 // indirect github.com/gin-contrib/sse v0.1.0 // indirect github.com/gin-gonic/gin v1.9.1 // indirect @@ -194,7 +194,7 @@ require ( github.com/gogo/protobuf v1.3.3 // indirect github.com/gogo/status v1.1.1 // indirect github.com/golang-jwt/jwt/v5 v5.2.0 // indirect - github.com/golang/glog v1.1.2 // indirect + github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect @@ -353,6 +353,8 @@ require ( github.com/robfig/cron/v3 v3.0.1 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/russross/blackfriday v1.6.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/scylladb/go-reflectx v1.0.1 // indirect @@ -365,27 +367,27 @@ require ( github.com/shopspring/decimal v1.3.1 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/smartcontractkit/chain-selectors v1.0.17 // indirect - github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d // indirect + github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240621143432-85370a54b141 // indirect github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 // indirect - github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 // indirect - github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240625075314-affd4529a8f5 // indirect - github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240625074951-06ab5e670dba // indirect + github.com/smartcontractkit/chainlink-feeds v0.0.0-20240523182126-1784bd4f3294 // indirect + github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240621151551-885054fb0f0e // indirect + github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240621143321-7e5949418911 // indirect github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239 // indirect github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 // indirect github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 // indirect github.com/smartcontractkit/wsrpc v0.8.1 // indirect github.com/soheilhy/cmux v0.1.5 // indirect github.com/sony/gobreaker v0.5.0 // indirect - github.com/spf13/afero v1.9.5 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cast v1.6.0 // indirect github.com/spf13/cobra v1.8.0 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.16.0 // indirect + github.com/spf13/viper v1.18.2 // indirect 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.4.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 @@ -411,20 +413,20 @@ require ( github.com/x448/float16 v0.8.4 // indirect github.com/xlab/treeprint v1.1.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - github.com/zondax/hid v0.9.1 // indirect - github.com/zondax/ledger-go v0.14.1 // indirect + github.com/zondax/hid v0.9.2 // indirect + github.com/zondax/ledger-go v0.14.3 // indirect go.dedis.ch/fixbuf v1.0.3 // indirect go.dedis.ch/kyber/v3 v3.1.0 // indirect go.etcd.io/bbolt v1.3.7 // indirect - go.etcd.io/etcd/api/v3 v3.5.9 // indirect - go.etcd.io/etcd/client/pkg/v3 v3.5.9 // indirect - go.etcd.io/etcd/client/v3 v3.5.9 // indirect + go.etcd.io/etcd/api/v3 v3.5.10 // indirect + go.etcd.io/etcd/client/pkg/v3 v3.5.10 // indirect + go.etcd.io/etcd/client/v3 v3.5.10 // indirect go.mongodb.org/mongo-driver v1.15.0 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/collector/pdata v1.0.0-rcv0016 // indirect go.opentelemetry.io/collector/semconv v0.87.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 // indirect go.opentelemetry.io/otel v1.24.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 // indirect @@ -453,10 +455,10 @@ require ( gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect gonum.org/v1/gonum v0.14.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect - google.golang.org/grpc v1.59.0 // indirect + google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect google.golang.org/protobuf v1.33.0 // indirect gopkg.in/guregu/null.v4 v4.0.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect @@ -475,7 +477,7 @@ require ( k8s.io/kubectl v0.25.11 // indirect k8s.io/utils v0.0.0-20230711102312-30195339c3c7 // indirect nhooyr.io/websocket v1.8.7 // indirect - pgregory.net/rapid v0.5.5 // indirect + pgregory.net/rapid v1.1.0 // indirect rsc.io/tmplfunc v0.0.3 // indirect sigs.k8s.io/controller-runtime v0.13.0 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index dfd503fee7..967a7e9b88 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -4,7 +4,6 @@ cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSR cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -15,11 +14,8 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.110.9 h1:e7ITSqGFFk4rbz/JFIqZh3G4VEHguhAL4BQcFlWtU68= -cloud.google.com/go v0.110.9/go.mod h1:rpxevX/0Lqvlbc88b7Sc1SPNdyK1riNBTUU6JXhYNpM= +cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM= +cloud.google.com/go v0.112.0/go.mod h1:3jEEVwZ/MHU4djK5t5RHuKOA/GbLddgTdVubX1qnPD4= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -33,8 +29,8 @@ cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2Aawl cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/iam v1.1.4 h1:K6n/GZHFTtEoKT5aUG3l9diPi0VduZNQ1PfdnpkkIFk= -cloud.google.com/go/iam v1.1.4/go.mod h1:l/rg8l1AaA+VFMho/HYx2Vv6xinPSLMF8qfhRPIZ0L8= +cloud.google.com/go/iam v1.1.5 h1:1jTsCu4bcsNsE4iiqNT5SHwrDRCfRmIaaaVFhRveTJI= +cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -44,9 +40,8 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= -cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= +cloud.google.com/go/storage v1.36.0 h1:P0mOkAcaJxhCTvAkMhxMfrTKiNcub4YmmPBtlhAyTr8= +cloud.google.com/go/storage v1.36.0/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= contrib.go.opencensus.io/exporter/stackdriver v0.12.6/go.mod h1:8x999/OcIPy5ivx/wDiV7Gx4D+VUPODf0mWRGRc5kSk= contrib.go.opencensus.io/exporter/stackdriver v0.13.4/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc= contrib.go.opencensus.io/exporter/stackdriver v0.13.5 h1:TNaexHK16gPUoc7uzELKOU7JULqccn1NDuqUxmxSqfo= @@ -55,14 +50,14 @@ cosmossdk.io/api v0.3.1 h1:NNiOclKRR0AOlO4KIqeaG6PS6kswOMhHD0ir0SscNXE= cosmossdk.io/api v0.3.1/go.mod h1:DfHfMkiNA2Uhy8fj0JJlOCYOBp4eWUUJ1te5zBGNyIw= cosmossdk.io/core v0.5.1 h1:vQVtFrIYOQJDV3f7rw4pjjVqc1id4+mE0L9hHP66pyI= cosmossdk.io/core v0.5.1/go.mod h1:KZtwHCLjcFuo0nmDc24Xy6CRNEL9Vl/MeimQ2aC7NLE= -cosmossdk.io/depinject v1.0.0-alpha.3 h1:6evFIgj//Y3w09bqOUOzEpFj5tsxBqdc5CfkO7z+zfw= -cosmossdk.io/depinject v1.0.0-alpha.3/go.mod h1:eRbcdQ7MRpIPEM5YUJh8k97nxHpYbc3sMUnEtt8HPWU= -cosmossdk.io/errors v1.0.0 h1:nxF07lmlBbB8NKQhtJ+sJm6ef5uV1XkvPXG2bUntb04= -cosmossdk.io/errors v1.0.0/go.mod h1:+hJZLuhdDE0pYN8HkOrVNwrIOYvUGnn6+4fjnJs/oV0= -cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca h1:msenprh2BLLRwNT7zN56TbBHOGk/7ARQckXHxXyvjoQ= -cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca/go.mod h1:PkIAKXZvaxrTRc++z53XMRvFk8AcGGWYHcMIPzVYX9c= -cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= -cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= +cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= +cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= +cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= +cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= +cosmossdk.io/log v1.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI= +cosmossdk.io/log v1.3.1/go.mod h1:2/dIomt8mKdk6vl3OWJcPk2be3pGOS8OQaLUM/3/tCM= +cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= +cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= @@ -79,7 +74,6 @@ github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9 github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= github.com/AlekSi/pointer v1.1.0 h1:SSDMPcXD9jSl8FPy9cRzoRaMJtm9g9ggGTxecRUbQoI= github.com/AlekSi/pointer v1.1.0/go.mod h1:y7BvfRI3wXPWKXEBhU71nbnIEEZX0QTSB2Bj48UJIZE= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/azure-sdk-for-go v65.0.0+incompatible h1:HzKLt3kIwMm4KeJYTdx9EbjRYTySD/t8i1Ee/W5EGXw= github.com/Azure/azure-sdk-for-go v65.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0 h1:9kDVnTz3vbfweTqAUmk/a/pH5pWFCHtvRpHYC0G/dcA= @@ -112,10 +106,8 @@ github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 h1:WpB/QDNLpMw github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= -github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= +github.com/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRrLeDnvGIM= +github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4= github.com/CosmWasm/wasmd v0.40.1 h1:LxbO78t/6S8TkeQlUrJ0m5O87HtAwLx4RGHq3rdrOEU= github.com/CosmWasm/wasmd v0.40.1/go.mod h1:6EOwnv7MpuFaEqxcUOdFV9i4yvrdOciaY6VQ1o7A3yg= github.com/CosmWasm/wasmvm v1.2.4 h1:6OfeZuEcEH/9iqwrg2pkeVtDCkMoj9U6PpKtcrCyVrQ= @@ -129,7 +121,6 @@ github.com/GeertJohan/go.incremental v1.0.0/go.mod h1:6fAjUhbVuX1KcMD3c8TEgVUqmo github.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtixis4Tib9if0= github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/K-Phoen/grabana v0.22.1 h1:b/O+C3H2H6VNYSeMCYUO4X4wYuwFXgBcRkvYa+fjpQA= github.com/K-Phoen/grabana v0.22.1/go.mod h1:3LTXrTzQzTKTgvKSXdRjlsJbizSOW/V23Q3iX00R5bU= github.com/K-Phoen/sdk v0.12.4 h1:j2EYuBJm3zDTD0fGKACVFWxAXtkR0q5QzfVqxmHSeGQ= @@ -159,7 +150,6 @@ github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8 github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= @@ -168,10 +158,7 @@ github.com/Workiva/go-datastructures v1.1.0 h1:hu20UpgZneBhQ3ZvwiOGlqJSKIosin2Rd github.com/Workiva/go-datastructures v1.1.0/go.mod h1:1yZL+zfsztete+ePzZz/Zb1/t5BnDuE2Ya2MMGhzP6A= github.com/XSAM/otelsql v0.27.0 h1:i9xtxtdcqXV768a5C6SoT/RkG+ue3JTOgkYInzlTOqs= github.com/XSAM/otelsql v0.27.0/go.mod h1:0mFB3TvLa7NCuhm/2nU7/b2wEtsczkj8Rey8ygO7V+A= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= -github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= -github.com/alecthomas/participle/v2 v2.0.0-alpha7/go.mod h1:NumScqsC42o9x+dGj8/YqsIfhrIQjFEOFovxotbBirA= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -216,7 +203,6 @@ github.com/aws/constructs-go/constructs/v10 v10.1.255 h1:5hARfEmhBqHSTQf/C3QLA3s github.com/aws/constructs-go/constructs/v10 v10.1.255/go.mod h1:DCdBSjN04Ck2pajCacTD4RKFqSA7Utya8d62XreYctI= github.com/aws/jsii-runtime-go v1.75.0 h1:NhpUfyiL7/wsRuUekFsz8FFBCYLfPD/l61kKg9kL/a4= github.com/aws/jsii-runtime-go v1.75.0/go.mod h1:TKCyrtM0pygEPo4rDZzbMSDNCDNTSYSN6/mGyHI6O3I= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df h1:GSoSVRLoBaFpOOds6QyY1L8AX7uoY+Ln3BHc22W40X0= @@ -292,36 +278,30 @@ github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6D github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= -github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= -github.com/cockroachdb/apd/v3 v3.1.0/go.mod h1:6qgPBMXjATAdD/VefbRP9NoSLKjbB4LCoA7gN4LpHs4= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/errors v1.10.0 h1:lfxS8zZz1+OjtV4MtNWgboi/W5tyLEB6VQZBXN+0VUU= +github.com/cockroachdb/errors v1.10.0/go.mod h1:lknhIsEVQ9Ss/qKDBQS/UqFSvPQjOwNq2qyKAxtHRqE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 h1:aPEJyR4rPBvDmeyi+l/FS/VtA00IWvjeFvjen1m1l1A= github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593/go.mod h1:6hk1eMY/u5t+Cf18q5lFMUA1Rc+Sm5I6Ra1QuPyxXCo= -github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONNbHU7MuEHboiFuA= github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c= -github.com/cometbft/cometbft v0.37.2 h1:XB0yyHGT0lwmJlFmM4+rsRnczPlHoAKFX6K8Zgc2/Jc= -github.com/cometbft/cometbft v0.37.2/go.mod h1:Y2MMMN//O5K4YKd8ze4r9jmk4Y7h0ajqILXbH5JQFVs= +github.com/cometbft/cometbft v0.37.5 h1:/U/TlgMh4NdnXNo+YU9T2NMCWyhXNDF34Mx582jlvq0= +github.com/cometbft/cometbft v0.37.5/go.mod h1:QC+mU0lBhKn8r9qvmnq53Dmf3DWBt4VtkcKw2C81wxY= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= @@ -350,10 +330,10 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-proto v1.0.0-beta.2 h1:X3OKvWgK9Gsejo0F1qs5l8Qn6xJV/AzgIWR2wZ8Nua8= -github.com/cosmos/cosmos-proto v1.0.0-beta.2/go.mod h1:+XRCLJ14pr5HFEHIUcn51IKXD1Fy3rkEQqt4WqmN4V0= -github.com/cosmos/cosmos-sdk v0.47.4 h1:FVUpEprm58nMmBX4xkRdMDaIG5Nr4yy92HZAfGAw9bg= -github.com/cosmos/cosmos-sdk v0.47.4/go.mod h1:R5n+uM7vguVPFap4pgkdvQCT1nVo/OtPwrlAU40rvok= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= +github.com/cosmos/cosmos-sdk v0.47.11 h1:0Qx7eORw0RJqPv+mvDuU8NQ1LV3nJJKJnPoYblWHolc= +github.com/cosmos/cosmos-sdk v0.47.11/go.mod h1:ADjORYzUQqQv/FxDi0H0K5gW/rAk1CiDR3ZKsExfJV0= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= @@ -361,14 +341,14 @@ github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiK github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= -github.com/cosmos/iavl v0.20.0 h1:fTVznVlepH0KK8NyKq8w+U7c2L6jofa27aFX6YGlm38= -github.com/cosmos/iavl v0.20.0/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= -github.com/cosmos/ibc-go/v7 v7.2.0 h1:dx0DLUl7rxdyZ8NiT6UsrbzKOJx/w7s+BOaewFRH6cg= -github.com/cosmos/ibc-go/v7 v7.2.0/go.mod h1:OOcjKIRku/j1Xs1RgKK0yvKRrJ5iFuZYMetR1n3yMlc= +github.com/cosmos/iavl v0.20.1 h1:rM1kqeG3/HBT85vsZdoSNsehciqUQPWrR4BYmqE2+zg= +github.com/cosmos/iavl v0.20.1/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= +github.com/cosmos/ibc-go/v7 v7.5.1 h1:KqS/g7W7EMX1OtOvufS8lWMJibOKpdgtNNZIU6fAgVU= +github.com/cosmos/ibc-go/v7 v7.5.1/go.mod h1:ktFg5GvKOyrGCqTWtW7Grj5uweU4ZapxrNeVS1CLLbo= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= -github.com/cosmos/ledger-cosmos-go v0.12.1 h1:sMBxza5p/rNK/06nBSNmsI/WDqI0pVJFVNihy1Y984w= -github.com/cosmos/ledger-cosmos-go v0.12.1/go.mod h1:dhO6kj+Y+AHIOgAe4L9HL/6NDdyyth4q238I9yFpD2g= +github.com/cosmos/ledger-cosmos-go v0.12.4 h1:drvWt+GJP7Aiw550yeb3ON/zsrgW0jgh5saFCr7pDnw= +github.com/cosmos/ledger-cosmos-go v0.12.4/go.mod h1:fjfVWRf++Xkygt9wzCsjEBdjcf7wiiY35fv3ctT+k4M= github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzUGSKFTcM= github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFgWl/ENIznEoYQI4= github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E= @@ -388,10 +368,6 @@ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7Do github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= -github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= -github.com/cucumber/common/gherkin/go/v22 v22.0.0/go.mod h1:3mJT10B2GGn3MvVPd3FwR7m2u4tLhSRhWUqJU4KN4Fg= -github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= -github.com/cucumber/common/messages/go/v17 v17.1.1/go.mod h1:bpGxb57tDE385Rb2EohgUadLkAbhoC4IyCFi89u/JQI= github.com/daaku/go.zipexe v1.0.0/go.mod h1:z8IiR6TsVLEYKwXAoE/I+8ys/sDkgTzSL0CLnGVd57E= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= @@ -401,8 +377,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deckarep/golang-set/v2 v2.3.0 h1:qs18EKUfHm2X9fA50Mr/M5hccg2tNnVqsiBImnyDs0g= -github.com/deckarep/golang-set/v2 v2.3.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= +github.com/deckarep/golang-set/v2 v2.6.0 h1:XfcQbWM1LlMB8BsJ8N9vW5ehnnPVIw0je80NsVHagjM= +github.com/deckarep/golang-set/v2 v2.6.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= @@ -414,7 +390,6 @@ github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFM github.com/dfuse-io/logging v0.0.0-20201110202154-26697de88c79/go.mod h1:V+ED4kT/t/lKtH99JQmKIb0v9WL3VaYkJ36CfHlVECI= github.com/dfuse-io/logging v0.0.0-20210109005628-b97a57253f70 h1:CuJS05R9jmNlUK8GOxrEELPbfXm0EuGh/30LjkjN5vo= github.com/dfuse-io/logging v0.0.0-20210109005628-b97a57253f70/go.mod h1:EoK/8RFbMEteaCaz89uessDTnCWjbbcr+DXcBh4el5o= -github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= @@ -451,24 +426,21 @@ github.com/dvsekhvalnov/jose2go v1.7.0 h1:bnQc8+GMnidJZA8zc6lLEAb4xNrIqHwO+9Tzqv github.com/dvsekhvalnov/jose2go v1.7.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/edsrzf/mmap-go v1.1.0 h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ= github.com/edsrzf/mmap-go v1.1.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= github.com/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE= github.com/emicklei/go-restful/v3 v3.10.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.11.1 h1:wSUXTlLfiAQRWs2F+p+EKOY9rUyis1MyGqJ2DIk5HpM= -github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= +github.com/envoyproxy/go-control-plane v0.12.0 h1:4X+VP1GHd1Mhj6IB5mMeGbLCleqxjletLK6K0rbxyZI= +github.com/envoyproxy/go-control-plane v0.12.0/go.mod h1:ZBTaoJ23lqITozF0M6G4/IragXCQKCnYbmlmtHvwRG0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= -github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= +github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/esote/minmaxheap v1.0.0 h1:rgA7StnXXpZG6qlM0S7pUmEv1KpWe32rYT4x8J8ntaA= github.com/esote/minmaxheap v1.0.0/go.mod h1:Ln8+i7fS1k3PLgZI2JAo0iA1as95QnIYiGCrqSJ5FZk= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= github.com/ethereum/go-ethereum v1.13.8 h1:1od+thJel3tM52ZUNQwvpYOeRHlbkVFZ5S8fhi0Lgsg= @@ -482,7 +454,6 @@ github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2 github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb h1:IT4JYU7k4ikYg1SCxNI1/Tieq/NFvh6dzLdgi7eu0tM= github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb/go.mod h1:bH6Xx7IW64qjjJq8M2u4dxNaBiDfKK+z/3eGDpXEQhc= -github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -490,9 +461,8 @@ github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= -github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= @@ -503,8 +473,8 @@ github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7z github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fvbommel/sortorder v1.0.2 h1:mV4o8B2hKboCdkJm+a7uX/SIpZob4JzUpc5GGnM45eo= github.com/fvbommel/sortorder v1.0.2/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= github.com/fxamacker/cbor/v2 v2.5.0 h1:oHsG0V/Q6E/wqTS2O1Cozzsy69nqCiguo5Q1a1ADivE= @@ -519,16 +489,14 @@ github.com/gagliardetto/solana-go v1.8.4 h1:vmD/JmTlonyXGy39bAo0inMhmbdAwV7rXZtL github.com/gagliardetto/solana-go v1.8.4/go.mod h1:i+7aAyNDTHG0jK8GZIBSI4OVvDqkt2Qx+LklYclRNG8= github.com/gagliardetto/treeout v0.1.4 h1:ozeYerrLCmCubo1TcIjFiOWTTGteOOHND1twdFpgwaw= github.com/gagliardetto/treeout v0.1.4/go.mod h1:loUefvXTrlRG5rYmJmExNryyBRh8f89VZhmMOyCyqok= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 h1:f6D9Hr8xV8uYKlyuj8XIruxlh9WjVjdh1gIicAS7ays= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2GihuqhwdILrV+7GJel5lyPV3u1+PgzrWLc0TkE= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc= github.com/gedex/inflector v0.0.0-20170307190818-16278e9db813 h1:Uc+IZ7gYqAf/rSGFplbWBSHaGolEQlNLgMgSE3ccnIQ= github.com/gedex/inflector v0.0.0-20170307190818-16278e9db813/go.mod h1:P+oSoE9yhSRvsmYyZsshflcR6ePWYLql6UU1amW13IM= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.19.0 h1:BcCH3CN5tXt5aML+gwmbFwVptLLQA+eT866fCO9wVOM= -github.com/getsentry/sentry-go v0.19.0/go.mod h1:y3+lGEFEFexZtpbG1GUE2WD/f9zGyKYwpEqryTOC/nE= +github.com/getsentry/sentry-go v0.23.0 h1:dn+QRCeJv4pPt9OjVXiMcGIBIefaTJPw/h0bZWO05nE= +github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/cors v1.5.0 h1:DgGKV7DDoOn36DFkNtbHrjoRiT5ExCe+PC9/xp7aKvk= github.com/gin-contrib/cors v1.5.0/go.mod h1:TvU7MAZ3EwrPLI2ztzTt3tqgvBCq+wn8WpZmfADjupI= @@ -538,17 +506,13 @@ github.com/gin-contrib/sessions v0.0.5 h1:CATtfHmLMQrMNpJRgzjWXD7worTh7g7ritsQfm github.com/gin-contrib/sessions v0.0.5/go.mod h1:vYAuaUPqie3WUSsft6HUlCjlwwoJQs97miaG2+7neKY= github.com/gin-contrib/size v0.0.0-20230212012657-e14a14094dc4 h1:Z9J0PVIt1PuibOShaOw1jH8hUYz+Ak8NLsR/GI0Hv5I= github.com/gin-contrib/size v0.0.0-20230212012657-e14a14094dc4/go.mod h1:CEPcgZiz8998l9E8fDm16h8UfHRL7b+5oG0j/0koeVw= -github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= github.com/go-asn1-ber/asn1-ber v1.5.5 h1:MNHlNMBDgEKD4TcKr36vQN68BA00aDfjIt3/bD50WnA= github.com/go-asn1-ber/asn1-ber v1.5.5/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= @@ -577,7 +541,6 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY= @@ -694,18 +657,15 @@ github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRx github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= -github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= github.com/gogo/status v1.1.1 h1:DuHXlSFHNKqTQ+/ACf5Vs6r4X/dH2EgIzR9Vr+H65kg= github.com/gogo/status v1.1.1/go.mod h1:jpG3dM5QPcqu19Hg8lkUhBFBa3TcLs1DG7+2Jqci7oU= -github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v5 v5.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw= github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= -github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -746,7 +706,6 @@ github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -773,7 +732,6 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github/v41 v41.0.0 h1:HseJrM2JFf2vfiZJ8anY2hqBjdfY1Vlj/K27ueww4gg= github.com/google/go-github/v41 v41.0.0/go.mod h1:XgmCA5H323A9rtgExdTcnDkcqp6S30AVACCBDOonIxg= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/go-tpm v0.9.0 h1:sQF6YqWMi+SCXpsmS3fd21oPy/vSddwZry4JnmltHVk= @@ -784,7 +742,6 @@ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -794,15 +751,12 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b h1:RMpPgZTSApbPf7xaVel+QkoGPRLFLrwFO89uDUHEGf0= github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= -github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= +github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= +github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= @@ -811,13 +765,12 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.2.5 h1:UR4rDjcgpgEnqpIEvkiqTYKBCKLNmlge2eVjoZfySzM= -github.com/googleapis/enterprise-certificate-proxy v0.2.5/go.mod h1:RxW0N9901Cko1VOCW3SXCpWP+mlIEkk2tP7jnHy9a3w= +github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= +github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gophercloud/gophercloud v1.5.0 h1:cDN6XFCLKiiqvYpjQLq9AiM7RDRbIC9450WpPH+yvXo= github.com/gophercloud/gophercloud v1.5.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -933,7 +886,6 @@ github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= @@ -977,13 +929,11 @@ github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= -github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= @@ -993,11 +943,6 @@ github.com/invopop/jsonschema v0.12.0 h1:6ovsNSuvn9wEQVOyc72aycBMVQFKz7cPdMJn10C github.com/invopop/jsonschema v0.12.0/go.mod h1:ffZ5Km5SWWRAIN6wbDXItl95euhFz2uON45H2qjYt+0= github.com/ionos-cloud/sdk-go/v6 v6.1.8 h1:493wE/BkZxJf7x79UCE0cYGPZoqQcPiEBALvt7uVGY0= github.com/ionos-cloud/sdk-go/v6 v6.1.8/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= @@ -1081,27 +1026,18 @@ github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfV github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.17.3 h1:qkRjuerhUU1EmXLYGkSH6EZL+vPSxIrYjLNAK4slzwA= github.com/klauspost/compress v1.17.3/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= @@ -1111,12 +1047,10 @@ github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b/go.mod h1:pcaDhQK0/NJZ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -1126,8 +1060,6 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/leanovate/gopter v0.2.10-0.20210127095200-9abe2343507a h1:dHCfT5W7gghzPtfsW488uPmEOm85wewI+ypUwibyTdU= github.com/leanovate/gopter v0.2.10-0.20210127095200-9abe2343507a/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= @@ -1168,12 +1100,9 @@ github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsI github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= @@ -1181,7 +1110,6 @@ github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= @@ -1195,12 +1123,9 @@ github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJKjyR5WD3HYQSd+U= github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= @@ -1267,7 +1192,6 @@ github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mostynb/zstdpool-freelist v0.0.0-20201229113212-927304c0c3b1 h1:mPMvm6X6tf4w8y7j9YIt6V9jfWhL6QlbEc7CCmeQlWk= github.com/mostynb/zstdpool-freelist v0.0.0-20201229113212-927304c0c3b1/go.mod h1:ye2e/VUEtE2BHE+G/QcKkcLQVAEJoYRFj5VUOQatCRE= -github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= @@ -1277,10 +1201,6 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8m github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229/go.mod h1:0aYXnNPJ8l7uZxf45rWW1a/uME32OF0rhiYGNQ2oF2E= github.com/nsf/jsondiff v0.0.0-20210926074059-1e845ec5d249 h1:NHrXEjTNQY7P0Zfx1aMrNhpgxHmow66XQtm0aQLY0AE= @@ -1295,7 +1215,6 @@ github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= @@ -1359,7 +1278,6 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -1417,8 +1335,6 @@ github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= -github.com/regen-network/gocuke v0.6.2/go.mod h1:zYaqIHZobHyd0xOrHGPQjbhGJsuZ1oElx150u2o1xuk= github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4= github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= @@ -1431,8 +1347,6 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= @@ -1442,8 +1356,8 @@ github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= -github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= -github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= +github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww= github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= @@ -1452,6 +1366,10 @@ github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6NgVqpn3+iol9aGu4= github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY= github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= @@ -1459,7 +1377,6 @@ github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZj github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20 h1:a9hSJdJcd16e0HoMsnFvaHvxB3pxSD+SC7+CISp7xY0= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= -github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= github.com/scylladb/go-reflectx v1.0.1 h1:b917wZM7189pZdlND9PbIJ6NQxfDPfBvUaQ7cjj1iZQ= github.com/scylladb/go-reflectx v1.0.1/go.mod h1:rWnOfDIRWBGN0miMLIcoPt/Dhi2doCMZqwMCJ3KupFc= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= @@ -1468,7 +1385,6 @@ github.com/segmentio/ksuid v1.0.4 h1:sBo2BdShXjmcugAMwjugoGUdUV0pcxY5mW4xKRn3v4c github.com/segmentio/ksuid v1.0.4/go.mod h1:/XUiZBD3kVx5SmUOl55voK5yeAbBNNIed+2O73XgrPE= github.com/sercand/kuberesolver/v5 v5.1.1 h1:CYH+d67G0sGBj7q5wLK61yzqJJ8gLLC8aeprPTHb6yY= github.com/sercand/kuberesolver/v5 v5.1.1/go.mod h1:Fs1KbKhVRnB2aDWN12NjKCB+RgYMWZJ294T3BtmVCpQ= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/sethvargo/go-retry v0.2.4 h1:T+jHEQy/zKJf5s95UkguisicE0zuF9y7+/vgz08Ocec= @@ -1499,20 +1415,20 @@ github.com/smartcontractkit/chain-selectors v1.0.17 h1:otOlYUnutS8oQBEAi9RLQICqZ github.com/smartcontractkit/chain-selectors v1.0.17/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-common v0.1.7-0.20240625074419-c278d083facf h1:d9AS/K8RSVG64USb20N/U7RaPOsYPcmuLGJq7iE+caM= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625074419-c278d083facf/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= -github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d h1:5tgMC5Gi2UAOKZ+m28W8ubjLeR0pQCAcrz6eQ0rW510= -github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625144005-556a7ba7b11c h1:dR2y3uzuZ8cJOaMSij8LQIdySuImwxkiZFjZ62ML5S0= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625144005-556a7ba7b11c/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= +github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240621143432-85370a54b141 h1:TMOoYaeSDkkI3jkCH7lKHOZaLkeDuxFTNC+XblD6M0M= +github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240621143432-85370a54b141/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540/go.mod h1:sjAmX8K2kbQhvDarZE1ZZgDgmHJ50s0BBc/66vKY2ek= -github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 h1:MD80ZRCTvxxJ8PBmhtrKoTnky8cVNYrCrIBLVRbrOM0= -github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917/go.mod h1:jwVxhctE6BgLOSSsVq9wbREpZ8Ev34H+UBxeUhESZRs= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240625075314-affd4529a8f5 h1:h0gjVZ7oQwPPQOFJuZToDhB1NTEbIBrRtsJysATTG/g= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240625075314-affd4529a8f5/go.mod h1:NbXXQaNFskVMYRut0MvBlcHu/vDgipGMwYjamvjVB9Y= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240625074951-06ab5e670dba h1:YNSlhK5mobyAaw02LPGgIEuS3lXyCTXcc6oaV2L6uUI= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240625074951-06ab5e670dba/go.mod h1:UVFRacRkP7O7TQAzFmR52v5mUlxf+G1ovMlCQAB/cHU= -github.com/smartcontractkit/chainlink-testing-framework v1.31.4 h1:5/zF5Z2w+/HTvUSSJNhWSiHvlQ2O2qxRw4e1fBbVraQ= -github.com/smartcontractkit/chainlink-testing-framework v1.31.4/go.mod h1:E6uNEZhZZid9PHv6/Kq5Vn63GlO61ZcKB+/f0DKo3Q4= +github.com/smartcontractkit/chainlink-feeds v0.0.0-20240523182126-1784bd4f3294 h1:4L1878goh1mqJx6JPv/TEeMAgYvbx7+D14QFSSu/DPs= +github.com/smartcontractkit/chainlink-feeds v0.0.0-20240523182126-1784bd4f3294/go.mod h1:jwVxhctE6BgLOSSsVq9wbREpZ8Ev34H+UBxeUhESZRs= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240621151551-885054fb0f0e h1:4dwcbcVrMne6wtOX/4yWdYJwk8iSm0INVNva/EhF35E= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240621151551-885054fb0f0e/go.mod h1:rJ4+TwNMciU2pvx6dsnUNnh4sPI5bUqgmYfhSrYhQ8Y= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240621143321-7e5949418911 h1:TSgCT8Uy+R4o3GwoWUqRCGNKeciub7r7+Aa3ylmg66c= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240621143321-7e5949418911/go.mod h1:OiWUTrrpSLLTMh7FINWjEh6mmDJCVPaC4yEsDCVaWdU= +github.com/smartcontractkit/chainlink-testing-framework v1.31.6 h1:NL91Se5alOyJCzN9cR+osZJJ0nYYgyxMVSK0cSha9wU= +github.com/smartcontractkit/chainlink-testing-framework v1.31.6/go.mod h1:E6uNEZhZZid9PHv6/Kq5Vn63GlO61ZcKB+/f0DKo3Q4= github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239 h1:Kk5OVlx/5g9q3Z3lhxytZS4/f8ds1MiNM8yaHgK3Oe8= github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239/go.mod h1:DC8sQMyTlI/44UCTL8QWFwb0bYNoXCfjwCv2hMivYZU= github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 h1:FFdvEzlYwcuVHkdZ8YnZR/XomeMGbz5E2F2HZI3I3w8= @@ -1540,12 +1456,14 @@ github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/sony/gobreaker v0.5.0 h1:dRCvqm0P490vZPmy7ppEk2qCnCieBooFJ+YoXGYB+yg= github.com/sony/gobreaker v0.5.0/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= @@ -1556,16 +1474,14 @@ github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJ github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= +github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= @@ -1593,8 +1509,8 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= @@ -1634,7 +1550,6 @@ github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaO github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= @@ -1654,14 +1569,10 @@ github.com/urfave/cli v1.22.14 h1:ebbhrRiGK2i4naQJr+1Xj92HXZCrK7MsyTS/ob3HnAk= github.com/urfave/cli v1.22.14/go.mod h1:X0eDS6pD6Exaclxm99NJ3FiCDRED7vIHpx2mDOHLvkA= github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= github.com/valyala/fastjson v1.4.1 h1:hrltpHpIpkaxll8QltMU8c3QZ5+qIiCL8yKqPFJI/yE= github.com/valyala/fastjson v1.4.1/go.mod h1:nV6MsjxL2IMJQUoHDIrjEI7oLyeqK6aBD7EFWPsvP8o= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= github.com/wiremock/go-wiremock v1.9.0 h1:9xcU4/IoEfgCaH4TGhQTtiQyBh2eMtu9JB6ppWduK+E= @@ -1684,11 +1595,7 @@ github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1700,10 +1607,10 @@ github.com/yuin/gopher-lua v1.1.0/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7 github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= -github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= -github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= -github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= +github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= +github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= +github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= go.dedis.ch/fixbuf v1.0.3 h1:hGcV9Cd/znUxlusJ64eAlExS+5cJDIyTyEG+otu5wQs= go.dedis.ch/fixbuf v1.0.3/go.mod h1:yzJMt34Wa5xD37V5RTdmp38cz3QhMagdGoem9anUalw= go.dedis.ch/kyber/v3 v3.0.4/go.mod h1:OzvaEnPvKlyrWyp3kGXlFdp7ap1VC6RkZDTaPikqhsQ= @@ -1717,12 +1624,12 @@ go.dedis.ch/protobuf v1.0.11/go.mod h1:97QR256dnkimeNdfmURz0wAMNVbd1VmLXhG1CrTYr go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= -go.etcd.io/etcd/api/v3 v3.5.9 h1:4wSsluwyTbGGmyjJktOf3wFQoTBIURXHnq9n/G/JQHs= -go.etcd.io/etcd/api/v3 v3.5.9/go.mod h1:uyAal843mC8uUVSLWz6eHa/d971iDGnCRpmKd2Z+X8k= -go.etcd.io/etcd/client/pkg/v3 v3.5.9 h1:oidDC4+YEuSIQbsR94rY9gur91UPL6DnxDCIYd2IGsE= -go.etcd.io/etcd/client/pkg/v3 v3.5.9/go.mod h1:y+CzeSmkMpWN2Jyu1npecjB9BBnABxGM4pN8cGuJeL4= -go.etcd.io/etcd/client/v3 v3.5.9 h1:r5xghnU7CwbUxD/fbUtRyJGaYNfDun8sp/gTr1hew6E= -go.etcd.io/etcd/client/v3 v3.5.9/go.mod h1:i/Eo5LrZ5IKqpbtpPDuaUnDOUv471oDg8cjQaUr2MbA= +go.etcd.io/etcd/api/v3 v3.5.10 h1:szRajuUUbLyppkhs9K6BRtjY37l66XQQmw7oZRANE4k= +go.etcd.io/etcd/api/v3 v3.5.10/go.mod h1:TidfmT4Uycad3NM/o25fG3J07odo4GBB9hoxaodFCtI= +go.etcd.io/etcd/client/pkg/v3 v3.5.10 h1:kfYIdQftBnbAq8pUWFXfpuuxFSKzlmM5cSn76JByiT0= +go.etcd.io/etcd/client/pkg/v3 v3.5.10/go.mod h1:DYivfIviIuQ8+/lCq4vcxuseg2P2XbHygkKwFo9fc8U= +go.etcd.io/etcd/client/v3 v3.5.10 h1:W9TXNZ+oB3MCd/8UjxHTWK5J9Nquw9fQBLJd5ne5/Ao= +go.etcd.io/etcd/client/v3 v3.5.10/go.mod h1:RVeBnDz2PUEZqTpgqwAtUd8nAPf5kjyFyND7P1VkOKc= go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= @@ -1747,8 +1654,8 @@ go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0. go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.49.0/go.mod h1:1P/02zM3OwkX9uki+Wmxw3a5GVb6KUXRsa7m7bOC9Fg= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 h1:SpGay3w+nEwMpfVnbqOLH5gY52/foP8RE8UzTZ1pdSE= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1/go.mod h1:4UoMYEZOC0yN/sPGH76KPkkU7zgiEWYWL9vwmbnTJPE= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 h1:x8Z78aZx8cOF0+Kkazoc7lwUNMGy0LrzEMxTm4BbTxg= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0/go.mod h1:62CPTSry9QZtOaSsE3tOzhx6LzDhHnXJ6xHeMNNiM6Q= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 h1:aFJWCqJMNjENlcleuuOkGAPH82y0yULBScfXcIEdS24= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1/go.mod h1:sEGXWArGqc3tVa+ekntsN65DmVbVeW+7lTKTjZF3/Fo= go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= go.opentelemetry.io/otel/exporters/otlp v0.20.0 h1:PTNgq9MRmQqqJY0REVbZFvwkYOA85vbdQU/nVfxDyqg= @@ -1813,26 +1720,21 @@ golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaE golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= @@ -1863,7 +1765,6 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -1872,8 +1773,6 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= @@ -1889,7 +1788,6 @@ golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -1899,7 +1797,6 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190921015927-1a5e07d1ff72/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1918,11 +1815,8 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210331212208-0fccb6fa2b5c/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= @@ -1933,7 +1827,6 @@ golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= @@ -1950,10 +1843,6 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210413134643-5e61552d6c78/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= @@ -2026,25 +1915,19 @@ golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210331175145-43e1dd70ce54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2053,9 +1936,7 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2063,7 +1944,6 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2107,18 +1987,15 @@ golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -2168,16 +2045,9 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= @@ -2190,8 +2060,6 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0= @@ -2213,11 +2081,8 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.149.0 h1:b2CqT6kG+zqJIVKRQ3ELJVLN1PwHZ6DJ3dW8yl82rgY= -google.golang.org/api v0.149.0/go.mod h1:Mwn1B7JTXrzXtnvmzQE2BD6bYZQ8DShKZDZbeN9I7qI= +google.golang.org/api v0.155.0 h1:vBmGhCYs0djJttDNynWo44zosHlPvHmA0XiN2zP2DtA= +google.golang.org/api v0.155.0/go.mod h1:GI5qK5f40kCpHfPn6+YzGAByIKWv8ujFnmoWm7Igduk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -2264,22 +2129,14 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210401141331-865547bb08e2/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405/go.mod h1:3WDQMjmJk36UQhjQ89emUzb1mdaHcPeeAh4SCBKznB4= -google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b h1:CIC2YMXmIhYw6evmhPxBKJ4fmLbOFtXQN/GV3XOZR8k= -google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -2295,18 +2152,14 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/grpc/examples v0.0.0-20210424002626-9572fd6faeae/go.mod h1:Ly7ZA/ARzg8fnPU9TyZIxoz33sEUuWX7txiqs8lPTgE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -2333,18 +2186,14 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= -gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= gopkg.in/guregu/null.v4 v4.0.0 h1:1Wm3S1WEA2I26Kq+6vcW+w0gcDo44YKYD7YIEJNHDjg= gopkg.in/guregu/null.v4 v4.0.0/go.mod h1:YoQhUrADuG3i9WqesrCmpNRwm1ypAgSHYqoOcTu/JrI= gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= @@ -2360,7 +2209,6 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -2368,8 +2216,8 @@ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C 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.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= -gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +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= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -2401,8 +2249,8 @@ k8s.io/utils v0.0.0-20230711102312-30195339c3c7/go.mod h1:OLgZIPagt7ERELqWJFomSt nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g= nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= -pgregory.net/rapid v0.5.5 h1:jkgx1TjbQPD/feRoK+S/mXw9e1uj6WilpHrXJowi6oA= -pgregory.net/rapid v0.5.5/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=