Skip to content

Commit

Permalink
Merge branch 'develop' into KS-391/capabilities-registry-audit-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cds95 committed Aug 8, 2024
2 parents b7980d9 + 4f0f780 commit 445aad5
Show file tree
Hide file tree
Showing 148 changed files with 20,197 additions and 1,631 deletions.
5 changes: 5 additions & 0 deletions .changeset/eight-radios-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

#added merging core/capabilities/ccip from https://github.com/smartcontractkit/ccip
5 changes: 5 additions & 0 deletions .changeset/rich-chairs-hug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#internal
5 changes: 5 additions & 0 deletions .changeset/seven-kiwis-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

Added custom client error messages for Mantle to capture InsufficientEth and Fatal errors. #added
5 changes: 5 additions & 0 deletions .changeset/shy-windows-juggle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#internal
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ updates:
directory: "/"
schedule:
interval: monthly
open-pull-requests-limit: 10
open-pull-requests-limit: 0
ignore:
# Old versions are pinned for libocr.
- dependency-name: github.com/libp2p/go-libp2p-core
Expand Down
32 changes: 28 additions & 4 deletions .github/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ runner-test-matrix:
test_env_type: k8s-remote-runner
runs_on: ubuntu-latest
test_cmd: cd integration-tests/ && go test soak/ocr_test.go -v -test.run ^TestOCRv1Soak$ -test.parallel=1 -timeout 30m -count=1 -json
test_config_override_required: true
test_secrets_required: true
test_inputs:
test_suite: soak

Expand Down Expand Up @@ -543,15 +545,37 @@ runner-test-matrix:
chainlink_upgrade_version: develop
pyroscope_env: ci-smoke-automation-upgrade-tests

- id: integration-tests/reorg/automation_reorg_test.go
- id: integration-tests/reorg/automation_reorg_test.go^TestAutomationReorg/registry_2_0
path: integration-tests/reorg/automation_reorg_test.go
runs_on: ubuntu-latest
test_env_type: k8s-remote-runner
test_env_type: docker
test_inputs:
test_suite: reorg
workflows:
- Run Automation On Demand Tests (TEST WORKFLOW)
test_cmd: cd integration-tests/reorg && DETACH_RUNNER=false go test -v -test.run ^TestAutomationReorg/registry_2_0 -test.parallel=1 -timeout 30m -count=1 -json
pyroscope_env: ci-automation-on-demand-reorg

- id: integration-tests/reorg/automation_reorg_test.go^TestAutomationReorg/registry_2_1
path: integration-tests/reorg/automation_reorg_test.go
runs_on: ubuntu-latest
test_env_type: docker
test_inputs:
test_suite: reorg
workflows:
- Run Automation On Demand Tests (TEST WORKFLOW)
test_cmd: cd integration-tests/reorg && DETACH_RUNNER=false go test -v -test.run ^TestAutomationReorg/registry_2_1 -test.parallel=2 -timeout 30m -count=1 -json
pyroscope_env: ci-automation-on-demand-reorg

- id: integration-tests/reorg/automation_reorg_test.go^TestAutomationReorg/registry_2_2
path: integration-tests/reorg/automation_reorg_test.go
runs_on: ubuntu-latest
test_env_type: docker
test_inputs:
test_suite: reorg
workflows:
- Run Automation On Demand Tests (TEST WORKFLOW)
test_cmd: cd integration-tests/reorg && DETACH_RUNNER=false go test -v -test.run ^TestAutomationReorg$ -test.parallel=7 -timeout 60m -count=1 -json
test_cmd: cd integration-tests/reorg && DETACH_RUNNER=false go test -v -test.run ^TestAutomationReorg/registry_2_2 -test.parallel=2 -timeout 30m -count=1 -json
pyroscope_env: ci-automation-on-demand-reorg

- id: integration-tests/chaos/automation_chaos_test.go
Expand All @@ -560,7 +584,7 @@ runner-test-matrix:
runs_on: ubuntu-latest
workflows:
- Run Automation On Demand Tests (TEST WORKFLOW)
test_cmd: cd integration-tests/chaos && DETACH_RUNNER=false go test -v -test.run ^TestAutomationChaos$ -test.parallel=15 -timeout 60m -count=1 -json
test_cmd: cd integration-tests/chaos && DETACH_RUNNER=false go test -v -test.run ^TestAutomationChaos$ -test.parallel=20 -timeout 60m -count=1 -json
pyroscope_env: ci-automation-on-demand-chaos
test_inputs:
test_suite: chaos
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/run-automation-ondemand-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,18 @@ jobs:
# Run reorg tests if enabled
if [[ "${{ github.event.inputs.enableReorg }}" == 'true' ]]; then
cat >> test_list.yaml <<EOF
- id: integration-tests/reorg/automation_reorg_test.go
- id: integration-tests/reorg/automation_reorg_test.go^TestAutomationReorg/registry_2_0
test_inputs:
chainlink_image: ${{ steps.determine-build.outputs.image }}
chainlink_version: ${{ steps.determine-build.outputs.version }}
- id: integration-tests/reorg/automation_reorg_test.go^TestAutomationReorg/registry_2_1
test_inputs:
chainlink_image: ${{ steps.determine-build.outputs.image }}
chainlink_version: ${{ steps.determine-build.outputs.version }}
- id: integration-tests/reorg/automation_reorg_test.go^TestAutomationReorg/registry_2_2
test_inputs:
chainlink_image: ${{ steps.determine-build.outputs.image }}
chainlink_version: ${{ steps.determine-build.outputs.version }}
EOF
fi
Expand Down
4 changes: 4 additions & 0 deletions .mockery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ packages:
github.com/smartcontractkit/chainlink/v2/core/bridges:
interfaces:
ORM:
github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/types:
interfaces:
CCIPOracle:
OracleCreator:
github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types:
interfaces:
Dispatcher:
Expand Down
18 changes: 5 additions & 13 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,8 @@ gomod: ## Ensure chainlink's go dependencies are installed.
go mod download

.PHONY: gomodtidy
gomodtidy: ## Run go mod tidy on all modules.
go mod tidy
cd ./core/scripts && go mod tidy
cd ./integration-tests && go mod tidy
cd ./integration-tests/load && go mod tidy
cd ./dashboard-lib && go mod tidy
gomodtidy: gomods ## Run go mod tidy on all modules.
gomods tidy

.PHONY: docs
docs: ## Install and run pkgsite to view Go docs
Expand Down Expand Up @@ -89,12 +85,8 @@ abigen: ## Build & install abigen.
./tools/bin/build_abigen

.PHONY: generate
generate: abigen codecgen mockery protoc ## Execute all go:generate commands.
go generate -x ./...
cd ./core/scripts && go generate -x ./...
cd ./integration-tests && go generate -x ./...
cd ./integration-tests/load && go generate -x ./...
cd ./dashboard-lib && go generate -x ./...
generate: abigen codecgen mockery protoc gomods ## Execute all go:generate commands.
gomods -w go generate -x ./...
mockery

.PHONY: rm-mocked
Expand Down Expand Up @@ -136,7 +128,7 @@ presubmit: ## Format go files and imports.

.PHONY: gomods
gomods: ## Install gomods
go install github.com/jmank88/gomods@v0.1.1
go install github.com/jmank88/gomods@v0.1.3

.PHONY: mockery
mockery: $(mockery) ## Install mockery.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ THE SOFTWARE.


*All content residing under (1) “/contracts/src/v0.8/ccip”; (2)
“/core/gethwrappers/ccip”; (3) “/core/services/ocr2/plugins/ccip” are licensed
“/core/gethwrappers/ccip”; (3) “/core/services/ocr2/plugins/ccip”; (4) "/core/capabilities/ccip" are licensed
under “Business Source License 1.1” with a Change Date of May 23, 2027 and
Change License to “MIT License”

Expand Down
5 changes: 5 additions & 0 deletions contracts/.changeset/loud-lobsters-guess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@chainlink/contracts': patch
---

auto: create a replication from v2_3 to v2_3_zksync
5 changes: 5 additions & 0 deletions contracts/.changeset/mean-zoos-fly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@chainlink/contracts': patch
---

add OZ v0.5 contracts
5 changes: 5 additions & 0 deletions contracts/.changeset/polite-masks-jog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@chainlink/contracts': patch
---

#internal
112 changes: 112 additions & 0 deletions contracts/.gas-snapshot
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
CapabilitiesRegistry_AddCapabilitiesTest:test_AddCapability_NoConfigurationContract() (gas: 154832)
CapabilitiesRegistry_AddCapabilitiesTest:test_AddCapability_WithConfiguration() (gas: 178813)
CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_CalledByNonAdmin() (gas: 24723)
CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_CapabilityExists() (gas: 145703)
CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_ConfigurationContractDoesNotMatchInterface() (gas: 94606)
CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_ConfigurationContractNotDeployed() (gas: 92961)
CapabilitiesRegistry_AddDONTest:test_AddDON() (gas: 372302)
CapabilitiesRegistry_AddDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19273)
CapabilitiesRegistry_AddDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 169752)
CapabilitiesRegistry_AddDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 239789)
CapabilitiesRegistry_AddDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 249596)
CapabilitiesRegistry_AddDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 116890)
CapabilitiesRegistry_AddDONTest:test_RevertWhen_FaultToleranceIsZero() (gas: 43358)
CapabilitiesRegistry_AddDONTest:test_RevertWhen_NodeAlreadyBelongsToWorkflowDON() (gas: 343924)
CapabilitiesRegistry_AddDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 180150)
CapabilitiesRegistry_AddNodeOperatorsTest:test_AddNodeOperators() (gas: 184135)
CapabilitiesRegistry_AddNodeOperatorsTest:test_RevertWhen_CalledByNonAdmin() (gas: 17602)
CapabilitiesRegistry_AddNodeOperatorsTest:test_RevertWhen_NodeOperatorAdminAddressZero() (gas: 18498)
CapabilitiesRegistry_AddNodesTest:test_AddsNodeParams() (gas: 358448)
CapabilitiesRegistry_AddNodesTest:test_OwnerCanAddNodes() (gas: 358414)
CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingDuplicateP2PId() (gas: 301229)
CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 55174)
CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidNodeOperator() (gas: 24895)
CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithoutCapabilities() (gas: 27669)
CapabilitiesRegistry_AddNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25108)
CapabilitiesRegistry_AddNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 27408)
CapabilitiesRegistry_AddNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 27047)
CapabilitiesRegistry_AddNodesTest:test_RevertWhen_SignerAddressNotUnique() (gas: 309679)
CapabilitiesRegistry_DeprecateCapabilitiesTest:test_DeprecatesCapability() (gas: 89807)
CapabilitiesRegistry_DeprecateCapabilitiesTest:test_EmitsEvent() (gas: 89935)
CapabilitiesRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CalledByNonAdmin() (gas: 22944)
CapabilitiesRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 16231)
CapabilitiesRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CapabilityIsDeprecated() (gas: 91264)
CapabilitiesRegistry_GetCapabilitiesTest:test_ReturnsCapabilities() (gas: 135553)
CapabilitiesRegistry_GetDONsTest:test_CorrectlyFetchesDONs() (gas: 65468)
CapabilitiesRegistry_GetDONsTest:test_DoesNotIncludeRemovedDONs() (gas: 64924)
CapabilitiesRegistry_GetHashedCapabilityTest:test_CorrectlyGeneratesHashedCapabilityId() (gas: 11428)
CapabilitiesRegistry_GetHashedCapabilityTest:test_DoesNotCauseIncorrectClashes() (gas: 13087)
CapabilitiesRegistry_GetNodeOperatorsTest:test_CorrectlyFetchesNodeOperators() (gas: 36407)
CapabilitiesRegistry_GetNodeOperatorsTest:test_DoesNotIncludeRemovedNodeOperators() (gas: 38692)
CapabilitiesRegistry_GetNodesTest:test_CorrectlyFetchesNodes() (gas: 65288)
CapabilitiesRegistry_GetNodesTest:test_DoesNotIncludeRemovedNodes() (gas: 73533)
CapabilitiesRegistry_RemoveDONsTest:test_RemovesDON() (gas: 54761)
CapabilitiesRegistry_RemoveDONsTest:test_RevertWhen_CalledByNonAdmin() (gas: 15647)
CapabilitiesRegistry_RemoveDONsTest:test_RevertWhen_DONDoesNotExist() (gas: 16550)
CapabilitiesRegistry_RemoveNodeOperatorsTest:test_RemovesNodeOperator() (gas: 36122)
CapabilitiesRegistry_RemoveNodeOperatorsTest:test_RevertWhen_CalledByNonOwner() (gas: 15816)
CapabilitiesRegistry_RemoveNodesTest:test_CanAddNodeWithSameSignerAddressAfterRemoving() (gas: 115151)
CapabilitiesRegistry_RemoveNodesTest:test_CanRemoveWhenDONDeleted() (gas: 287716)
CapabilitiesRegistry_RemoveNodesTest:test_CanRemoveWhenNodeNoLongerPartOfDON() (gas: 561023)
CapabilitiesRegistry_RemoveNodesTest:test_OwnerCanRemoveNodes() (gas: 73376)
CapabilitiesRegistry_RemoveNodesTest:test_RemovesNode() (gas: 75211)
CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25053)
CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 18418)
CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_NodePartOfCapabilitiesDON() (gas: 385369)
CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 18408)
CapabilitiesRegistry_TypeAndVersionTest:test_TypeAndVersion() (gas: 9796)
CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19415)
CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 152914)
CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DONDoesNotExist() (gas: 17835)
CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 222996)
CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 232804)
CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 107643)
CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 163357)
CapabilitiesRegistry_UpdateDONTest:test_UpdatesDON() (gas: 371909)
CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_CalledByNonAdminAndNonOwner() (gas: 20728)
CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorAdminIsZeroAddress() (gas: 20052)
CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorDoesNotExist() (gas: 19790)
CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorIdAndParamLengthsMismatch() (gas: 15430)
CapabilitiesRegistry_UpdateNodeOperatorTest:test_UpdatesNodeOperator() (gas: 37034)
CapabilitiesRegistry_UpdateNodesTest:test_CanUpdateParamsIfNodeSignerAddressNoLongerUsed() (gas: 256371)
CapabilitiesRegistry_UpdateNodesTest:test_OwnerCanUpdateNodes() (gas: 162166)
CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 35873)
CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_CalledByAnotherNodeOperatorAdmin() (gas: 29200)
CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 29377)
CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 29199)
CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_NodeSignerAlreadyAssignedToAnotherNode() (gas: 31326)
CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 29165)
CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_RemovingCapabilityRequiredByCapabilityDON() (gas: 470910)
CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_RemovingCapabilityRequiredByWorkflowDON() (gas: 341191)
CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 29058)
CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_UpdatingNodeWithoutCapabilities() (gas: 27587)
CapabilitiesRegistry_UpdateNodesTest:test_UpdatesNodeParams() (gas: 162220)
KeystoneForwarder_ReportTest:test_Report_ConfigVersion() (gas: 2002057)
KeystoneForwarder_ReportTest:test_Report_FailedDeliveryWhenReceiverInterfaceNotSupported() (gas: 128934)
KeystoneForwarder_ReportTest:test_Report_FailedDeliveryWhenReceiverNotContract() (gas: 130621)
KeystoneForwarder_ReportTest:test_Report_SuccessfulDelivery() (gas: 359123)
KeystoneForwarder_ReportTest:test_Report_SuccessfulRetryWithMoreGas() (gas: 423982)
KeystoneForwarder_ReportTest:test_RevertWhen_AnySignatureIsInvalid() (gas: 86348)
KeystoneForwarder_ReportTest:test_RevertWhen_AnySignerIsInvalid() (gas: 118486)
KeystoneForwarder_ReportTest:test_RevertWhen_ReportHasDuplicateSignatures() (gas: 94516)
KeystoneForwarder_ReportTest:test_RevertWhen_ReportHasIncorrectDON() (gas: 75930)
KeystoneForwarder_ReportTest:test_RevertWhen_ReportHasInexistentConfigVersion() (gas: 76320)
KeystoneForwarder_ReportTest:test_RevertWhen_ReportIsMalformed() (gas: 45585)
KeystoneForwarder_ReportTest:test_RevertWhen_RetryingInvalidContractTransmission() (gas: 143354)
KeystoneForwarder_ReportTest:test_RevertWhen_RetryingSuccessfulTransmission() (gas: 353272)
KeystoneForwarder_ReportTest:test_RevertWhen_TooFewSignatures() (gas: 55292)
KeystoneForwarder_ReportTest:test_RevertWhen_TooManySignatures() (gas: 56050)
KeystoneForwarder_SetConfigTest:test_RevertWhen_ExcessSigners() (gas: 20184)
KeystoneForwarder_SetConfigTest:test_RevertWhen_FaultToleranceIsZero() (gas: 88057)
KeystoneForwarder_SetConfigTest:test_RevertWhen_InsufficientSigners() (gas: 14533)
KeystoneForwarder_SetConfigTest:test_RevertWhen_NotOwner() (gas: 88766)
KeystoneForwarder_SetConfigTest:test_RevertWhen_ProvidingDuplicateSigners() (gas: 114570)
KeystoneForwarder_SetConfigTest:test_RevertWhen_ProvidingZeroAddressSigner() (gas: 114225)
KeystoneForwarder_SetConfigTest:test_SetConfig_FirstTime() (gas: 1540541)
KeystoneForwarder_SetConfigTest:test_SetConfig_WhenSignersAreRemoved() (gas: 1535211)
KeystoneForwarder_TypeAndVersionTest:test_TypeAndVersion() (gas: 9641)
KeystoneRouter_SetConfigTest:test_AddForwarder_RevertWhen_NotOwner() (gas: 10978)
KeystoneRouter_SetConfigTest:test_RemoveForwarder_RevertWhen_NotOwner() (gas: 10923)
KeystoneRouter_SetConfigTest:test_RemoveForwarder_Success() (gas: 17599)
KeystoneRouter_SetConfigTest:test_Route_RevertWhen_UnauthorizedForwarder() (gas: 18552)
KeystoneRouter_SetConfigTest:test_Route_Success() (gas: 76407)
1 change: 1 addition & 0 deletions contracts/.solhintignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
./src/v0.8/automation/libraries/internal/Cron.sol
./src/v0.8/automation/AutomationForwarder.sol
./src/v0.8/automation/AutomationForwarderLogic.sol
./src/v0.8/automation/ZKSyncAutomationForwarder.sol
./src/v0.8/automation/interfaces/v2_2/IAutomationRegistryMaster.sol
./src/v0.8/automation/interfaces/v2_3/IAutomationRegistryMaster2_3.sol

Expand Down
Loading

0 comments on commit 445aad5

Please sign in to comment.