Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/MERC-6304-ea-telem-view-…
Browse files Browse the repository at this point in the history
…function' into feature/MERC-6304-ea-telem-view-function
  • Loading branch information
akuzni2 committed Sep 17, 2024
2 parents 50ddc2e + 0e4248f commit b143754
Show file tree
Hide file tree
Showing 107 changed files with 4,072 additions and 941 deletions.
5 changes: 5 additions & 0 deletions .changeset/curvy-boxes-burn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

RMNCrypto evm implementation for CCIP - RMN Integration #added
5 changes: 5 additions & 0 deletions .changeset/curvy-points-grin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#updated refactor ccip oracle creator
5 changes: 5 additions & 0 deletions .changeset/hot-roses-add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

#internal Update to latest UI - PeerId field is introduced for OCR2 bootstrap node in chain config page
5 changes: 5 additions & 0 deletions .changeset/two-pumas-lie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

Updating CCIP OCR3 integration tests according to changes in the chainlink-ccip repo #internal
5 changes: 5 additions & 0 deletions .changeset/unlucky-dolphins-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#internal Add ccip JobType in feeds service and other jobtype validations
5 changes: 5 additions & 0 deletions .changeset/wise-bears-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

#updated mercury plugin to consider PluginConfig as optional if EnableTriggerCapability relay config is true. Then if PluginConfig is nil, skip fetching latestPrice for linkFeedId and nativeFeedId.
38 changes: 37 additions & 1 deletion .github/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,43 @@ runner-test-matrix:
- Nightly E2E Tests
test_cmd: cd integration-tests/ccip-tests/smoke && go test ccip_test.go -test.run ^TestSmokeCCIPOffRampAggRateLimit$ -timeout 30m -count=1 -test.parallel=1 -json
test_env_vars:
E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2
E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2

- id: ccip-tests/smoke/ccip_test.go:^TestSmokeCCIPReorgBelowFinality$
path: integration-tests/ccip-tests/smoke/ccip_test.go
test_env_type: docker
runs_on: ubuntu-latest
workflows:
- PR E2E CCIP Tests
- Nightly E2E Tests
test_cmd: cd integration-tests/ccip-tests/smoke && go test ccip_test.go -test.run ^TestSmokeCCIPReorgBelowFinality$ -timeout 30m -count=1 -test.parallel=1 -json
test_env_vars:
E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2
test_config_override_path: integration-tests/ccip-tests/testconfig/tomls/ccip-reorg.toml

- id: ccip-tests/smoke/ccip_test.go:^TestSmokeCCIPReorgAboveFinalityAtDestination$
path: integration-tests/ccip-tests/smoke/ccip_test.go
test_env_type: docker
runs_on: ubuntu-latest
workflows:
- PR E2E CCIP Tests
- Nightly E2E Tests
test_cmd: cd integration-tests/ccip-tests/smoke && go test ccip_test.go -test.run ^TestSmokeCCIPReorgAboveFinalityAtDestination$ -timeout 30m -count=1 -test.parallel=1 -json
test_env_vars:
E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2
test_config_override_path: integration-tests/ccip-tests/testconfig/tomls/ccip-reorg.toml

- id: ccip-tests/smoke/ccip_test.go:^TestSmokeCCIPReorgAboveFinalityAtSource$
path: integration-tests/ccip-tests/smoke/ccip_test.go
test_env_type: docker
runs_on: ubuntu-latest
workflows:
- PR E2E CCIP Tests
- Nightly E2E Tests
test_cmd: cd integration-tests/ccip-tests/smoke && go test ccip_test.go -test.run ^TestSmokeCCIPReorgAboveFinalityAtSource$ -timeout 30m -count=1 -test.parallel=1 -json
test_env_vars:
E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2
test_config_override_path: integration-tests/ccip-tests/testconfig/tomls/ccip-reorg.toml

- id: ccip-tests/chaos/ccip_test.go
path: integration-tests/ccip-tests/chaos/ccip_test.go
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/automation-nightly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
E2E_TEST_GRAFANA_DASHBOARD_URL: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs"
E2E_TEST_GRAFANA_BEARER_TOKEN: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }}
with:
test_command_to_run: cd ./integration-tests && go test -timeout 60m -count=1 -json -test.parallel=${{ matrix.tests.nodes }} ${{ matrix.tests.command }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs
test_command_to_run: cd ./integration-tests && go test -timeout 60m -count=1 -json -test.parallel=${{ matrix.tests.nodes }} ${{ matrix.tests.command }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false
test_download_vendor_packages_command: cd ./integration-tests && go mod download
cl_repo: 'public.ecr.aws/chainlink/chainlink'
cl_image_tag: 'latest'
Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/ccip-load-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,14 @@ jobs:
run: |
# if the matrix.type.config_path is set, use it as the override config
if [ -n "${{ matrix.type.config_path }}" ]; then
BASE64_CCIP_CONFIG_OVERRIDE=$(base64 -w 0 -i ${{ matrix.type.config_path }})
echo ::add-mask::$BASE64_CCIP_CONFIG_OVERRIDE
echo "base_64_override=$BASE64_CCIP_CONFIG_OVERRIDE" >> $GITHUB_OUTPUT
BASE64_CONFIG_OVERRIDE=$(base64 -w 0 -i ${{ matrix.type.config_path }})
echo ::add-mask::$BASE64_CONFIG_OVERRIDE
echo "base_64_override=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_OUTPUT
fi
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
BASE64_CCIP_CONFIG_OVERRIDE=$(jq -r '.inputs.base64_test_input' $GITHUB_EVENT_PATH)
echo ::add-mask::$BASE64_CCIP_CONFIG_OVERRIDE
echo "base_64_override=$BASE64_CCIP_CONFIG_OVERRIDE" >> $GITHUB_OUTPUT
BASE64_CONFIG_OVERRIDE=$(jq -r '.inputs.base64_test_input' $GITHUB_EVENT_PATH)
echo ::add-mask::$BASE64_CONFIG_OVERRIDE
echo "base_64_override=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_OUTPUT
fi
- name: step summary
shell: bash
Expand All @@ -190,9 +190,8 @@ jobs:
RR_MEM: 8Gi
RR_CPU: 4
TEST_TRIGGERED_BY: ccip-load-test-ci-${{ matrix.type.name }}
BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.set_override_config.outputs.base_64_override }},${{ steps.setup_create_base64_config_ccip.outputs.base64_config }}
TEST_BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }},${{ steps.set_override_config.outputs.base_64_override }}
E2E_TEST_LOGGING_RUN_ID: ${{ github.run_id }}
BASE64_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }},${{ steps.set_override_config.outputs.base_64_override }}
TEST_BASE64_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }},${{ steps.set_override_config.outputs.base_64_override }}
E2E_TEST_CHAINLINK_IMAGE: ${{ env.CHAINLINK_IMAGE }}
E2E_TEST_CHAINLINK_VERSION: ${{ env.CHAINLINK_VERSION }}
E2E_TEST_LOKI_TENANT_ID: ${{ secrets.LOKI_TENANT_ID }}
Expand Down Expand Up @@ -300,4 +299,4 @@ jobs:
slack_bot_token: ${{ secrets.QA_SLACK_API_KEY }}
slack_thread_ts: ${{ needs.start-slack-thread.outputs.thread_ts }}

# End Reporting Jobs
# End Reporting Jobs
2 changes: 1 addition & 1 deletion .github/workflows/on-demand-keeper-smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
- name: Run Tests
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@d2f9642bcc24a73400568756f24b72c188ac7a9a # v2.3.31
with:
test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json -test.parallel=${{ matrix.product.nodes }} ${{ steps.build-go-test-command.outputs.run_command }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs
test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json -test.parallel=${{ matrix.product.nodes }} ${{ steps.build-go-test-command.outputs.run_command }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false
test_download_vendor_packages_command: cd ./integration-tests && go mod download
test_config_chainlink_version: ${{ inputs.evm-ref || github.sha }}
test_config_selected_networks: ${{ env.SELECTED_NETWORKS }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run-e2e-tests-reusable-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ jobs:
E2E_TEST_PYROSCOPE_KEY: ${{ matrix.tests.pyroscope_env != '' && secrets.QA_PYROSCOPE_KEY || '' }}
E2E_TEST_PYROSCOPE_ENABLED: ${{ matrix.tests.pyroscope_env != '' && 'true' || '' }}
with:
test_command_to_run: ${{ matrix.tests.test_cmd }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs
test_command_to_run: ${{ matrix.tests.test_cmd }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false
test_download_vendor_packages_command: cd $(dirname ${{ matrix.tests.path }}) && go mod download
test_secrets_override_base64: ${{ secrets.TEST_SECRETS_OVERRIDE_BASE64 }}
test_config_override_path: ${{ env.TEST_CONFIG_OVERRIDE_PATH }}
Expand Down Expand Up @@ -797,7 +797,7 @@ jobs:
E2E_TEST_PYROSCOPE_ENABLED: ${{ matrix.tests.pyroscope_env != '' && 'true' || '' }}
DATABASE_URL: postgresql://postgres:node@localhost:5432/chainlink_test?sslmode=disable
with:
test_command_to_run: ${{ matrix.tests.test_cmd }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs
test_command_to_run: ${{ matrix.tests.test_cmd }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false
test_download_vendor_packages_command: make gomod
test_secrets_override_base64: ${{ secrets.TEST_SECRETS_OVERRIDE_BASE64 }}
test_config_override_path: ${{ env.TEST_CONFIG_OVERRIDE_PATH }}
Expand Down
2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ modgraph:

.PHONY: test-short
test-short: ## Run 'go test -short' and suppress uninteresting output
go test -short ./... | grep -v "[no test files]" | grep -v "\(cached\)"
go test -short ./... | grep -v "no test files" | grep -v "\(cached\)"

help:
@echo ""
Expand Down
2 changes: 1 addition & 1 deletion contracts/STYLE_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ We will be looking into `forge fmt`, but for now, we still use `prettier`.
This will help massively during audits and onboarding new team members.
- Headers should be used to group functionality, the following header style and length are recommended.
- Don’t use headers for a single function, or to say “getters”. Group by functionality e.g. the `Tokens and pools`, or `fees` logic within the CCIP OnRamp.
- Comments should start with a capital letter and end with a period.

```solidity
// ================================================================
Expand Down Expand Up @@ -419,4 +420,3 @@ function setConfig(uint64 _foo, uint64 _bar, uint64 _baz) external {
```

rule: `tbd`

12 changes: 12 additions & 0 deletions core/capabilities/ccip/ccipevm/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import (
"bytes"
"fmt"
"math/big"

"github.com/ethereum/go-ethereum/accounts/abi"
)

func decodeExtraArgsV1V2(extraArgs []byte) (gasLimit *big.Int, err error) {
Expand Down Expand Up @@ -31,3 +33,13 @@ func decodeExtraArgsV1V2(extraArgs []byte) (gasLimit *big.Int, err error) {
}
return ifaces[0].(*big.Int), nil
}

// abiEncodeMethodInputs encodes the inputs for a method call.
// example abi: `[{ "name" : "method", "type": "function", "inputs": [{"name": "a", "type": "uint256"}]}]`
func abiEncodeMethodInputs(abiDef abi.ABI, inputs ...interface{}) ([]byte, error) {
packed, err := abiDef.Pack("method", inputs...)
if err != nil {
return nil, err
}
return packed[4:], nil // remove the method selector
}
10 changes: 5 additions & 5 deletions core/capabilities/ccip/ccipevm/msghasher.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ func (h *MessageHasherV1) Hash(_ context.Context, msg cciptypes.Message) (ccipty
Amount: rta.Amount.Int,
})
}
encodedRampTokenAmounts, err := abiEncode("encodeTokenAmountsHashPreimage", rampTokenAmounts)
encodedRampTokenAmounts, err := h.abiEncode("encodeTokenAmountsHashPreimage", rampTokenAmounts)
if err != nil {
return [32]byte{}, fmt.Errorf("abi encode token amounts: %w", err)
}

metaDataHashInput, err := abiEncode(
metaDataHashInput, err := h.abiEncode(
"encodeMetadataHashPreimage",
ANY_2_EVM_MESSAGE_HASH,
uint64(msg.Header.SourceChainSelector),
Expand All @@ -86,7 +86,7 @@ func (h *MessageHasherV1) Hash(_ context.Context, msg cciptypes.Message) (ccipty
return [32]byte{}, fmt.Errorf("decode extra args: %w", err)
}

fixedSizeFieldsEncoded, err := abiEncode(
fixedSizeFieldsEncoded, err := h.abiEncode(
"encodeFixedSizeFieldsHashPreimage",
msg.Header.MessageID,
[]byte(msg.Sender),
Expand All @@ -99,7 +99,7 @@ func (h *MessageHasherV1) Hash(_ context.Context, msg cciptypes.Message) (ccipty
return [32]byte{}, fmt.Errorf("abi encode fixed size values: %w", err)
}

packedValues, err := abiEncode(
packedValues, err := h.abiEncode(
"encodeFinalHashPreimage",
leafDomainSeparator,
utils.Keccak256Fixed(metaDataHashInput),
Expand All @@ -114,7 +114,7 @@ func (h *MessageHasherV1) Hash(_ context.Context, msg cciptypes.Message) (ccipty
return utils.Keccak256Fixed(packedValues), nil
}

func abiEncode(method string, values ...interface{}) ([]byte, error) {
func (h *MessageHasherV1) abiEncode(method string, values ...interface{}) ([]byte, error) {
res, err := messageHasherABI.Pack(method, values...)
if err != nil {
return nil, err
Expand Down
Loading

0 comments on commit b143754

Please sign in to comment.