Skip to content

Commit

Permalink
Merge branch 'develop' into feat/DEPLOY-178-l2ep-scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-de-leon-cll committed Dec 12, 2023
2 parents ebbb791 + cf74cd0 commit 1b8c936
Show file tree
Hide file tree
Showing 127 changed files with 1,131 additions and 1,535 deletions.
67 changes: 66 additions & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -325,11 +325,73 @@ jobs:
- name: ocr
nodes: 1
os: ubuntu20.04-8cores-32GB
run: -run TestOCRJobReplacement
file: ocr
pyroscope_env: ci-smoke-ocr-evm-simulated
- name: ocr-geth
nodes: 1
os: ubuntu20.04-8cores-32GB
run: -run TestOCRBasic
file: ocr
client: geth
pyroscope_env: ci-smoke-ocr-evm-simulated
# Uncomment, when https://smartcontract-it.atlassian.net/browse/TT-753 is DONE
# - name: ocr-nethermind
# nodes: 1
# os: ubuntu20.04-8cores-32GB
# run: -run TestOCRBasic
# file: ocr
# client: nethermind
# pyroscope_env: ci-smoke-ocr-evm-simulated
- name: ocr-besu
nodes: 1
os: ubuntu20.04-8cores-32GB
run: -run TestOCRBasic
file: ocr
client: besu
pyroscope_env: ci-smoke-ocr-evm-simulated
- name: ocr-erigon
nodes: 1
os: ubuntu20.04-8cores-32GB
run: -run TestOCRBasic
file: ocr
client: erigon
pyroscope_env: ci-smoke-ocr-evm-simulated
- name: ocr2
nodes: 1
os: ubuntu20.04-8cores-32GB
run: -run TestOCRv2JobReplacement
file: ocr2
pyroscope_env: ci-smoke-ocr2-evm-simulated
- name: ocr2-geth
nodes: 1
os: ubuntu20.04-8cores-32GB
run: -run TestOCRv2Basic
file: ocr2
client: geth
pyroscope_env: ci-smoke-ocr2-evm-simulated
# Uncomment, when https://smartcontract-it.atlassian.net/browse/TT-753 is DONE
# - name: ocr2-nethermind
# nodes: 1
# os: ubuntu20.04-8cores-32GB
# run: -run TestOCRv2Basic
# file: ocr2
# client: nethermind
# pyroscope_env: ci-smoke-ocr2-evm-simulated
- name: ocr2-besu
nodes: 1
os: ubuntu20.04-8cores-32GB
run: -run TestOCRv2Basic
file: ocr2
client: besu
pyroscope_env: ci-smoke-ocr2-evm-simulated
- name: ocr2-erigon
nodes: 1
os: ubuntu20.04-8cores-32GB
run: -run TestOCRv2Basic
file: ocr2
client: erigon
pyroscope_env: ci-smoke-ocr2-evm-simulated
- name: ocr2
nodes: 1
os: ubuntu20.04-8cores-32GB
Expand All @@ -345,12 +407,14 @@ jobs:
pyroscope_env: ci-smoke-vrf-evm-simulated
- name: vrfv2
nodes: 1
run: -run TestVRFv2MultipleSendingKeys
file: vrfv2
os: ubuntu20.04-8cores-32GB
pyroscope_env: ci-smoke-vrf2-evm-simulated
- name: vrfv2plus
nodes: 1
os: ubuntu20.04-8cores-32GB
pyroscope_env: ci-smoke-vrf2plus-evm-simulated
pyroscope_env: ci-smoke-vrf2plus-evm-simulated
- name: forwarder_ocr
nodes: 1
os: ubuntu20.04-8cores-32GB
Expand Down Expand Up @@ -435,6 +499,7 @@ jobs:
PYROSCOPE_SERVER: ${{ matrix.product.pyroscope_env == '' && '' || !startsWith(github.ref, 'refs/tags/') && '' || secrets.QA_PYROSCOPE_INSTANCE }} # Avoid sending blank envs https://github.com/orgs/community/discussions/25725
PYROSCOPE_ENVIRONMENT: ${{ matrix.product.pyroscope_env }}
PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }}
ETH2_EL_CLIENT: ${{matrix.product.client}}
LOKI_TENANT_ID: ${{ vars.LOKI_TENANT_ID }}
LOKI_URL: ${{ secrets.LOKI_URL }}
LOKI_BASIC_AUTH: ${{ secrets.LOKI_BASIC_AUTH }}
Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/on-demand-vrfv2-eth2-clients-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: On Demand VRFV2 Smoke Test (Ethereum clients)
on:
workflow_dispatch:
inputs:
client:
description: Execution client to use
type: choice
options:
- "geth"
- "nethermind"
- "besu"
- "erigon"
chainlinkImage:
description: Container image location for the Chainlink nodes
required: true
default: public.ecr.aws/chainlink/chainlink
chainlinkVersion:
description: Container image version for the Chainlink nodes
required: true
default: "2.6.0"
configBase64:
description: TOML config in base64 (Needed when overriding config or providing contract addresses for existing env)
required: false
jobs:
vrfv2_smoke_test:
name: VRFV2 Smoke Test with ${{ inputs.client }} client
environment: integration
runs-on: ubuntu20.04-8cores-32GB
permissions:
checks: write
pull-requests: write
id-token: write
contents: read
env:
SELECTED_NETWORKS: "SIMULATED"
CONFIG: ${{ inputs.configBase64 }}
TEST_LOG_LEVEL: debug
REF_NAME: ${{ github.head_ref || github.ref_name }}
CHAINLINK_IMAGE: ${{ inputs.chainlinkImage }}
CHAINLINK_VERSION: ${{ inputs.chainlinkVersion }}
steps:
- name: Setup Push Tag
shell: bash
run: |
echo "### chainlink image used for this test run :link:" >>$GITHUB_STEP_SUMMARY
echo "\`${{ inputs.chainlinkVersion }}\`" >>$GITHUB_STEP_SUMMARY
echo "### chainlink-tests image tag for this test run :ship:" >>$GITHUB_STEP_SUMMARY
echo "\`${GITHUB_SHA}\`" >>$GITHUB_STEP_SUMMARY
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: Run Tests
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@7d541cbbca52d45b8a718257af86d9cf49774d1f # v2.2.15
with:
test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json -run TestVRFv2Basic ./smoke/vrfv2_test.go 2>&1 | tee /tmp/gotest.log | gotestfmt
test_download_vendor_packages_command: cd ./integration-tests && go mod download
cl_repo: ${{ inputs.chainlinkImage }}
cl_image_tag: ${{ inputs.chainlinkVersion }}
aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
artifacts_name: vrf-test-logs
artifacts_location: ./integration-tests/smoke/logs/
token: ${{ secrets.GITHUB_TOKEN }}
go_mod_path: ./integration-tests/go.mod
should_cleanup: false
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_KUBECONFIG: ""
env:
ETH2_EL_CLIENT: ${{ inputs.client }}
70 changes: 70 additions & 0 deletions .github/workflows/on-demand-vrfv2plus-eth2-clients-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: On Demand VRFV2Plus Smoke Test (Ethereum clients)
on:
workflow_dispatch:
inputs:
client:
description: Execution client to use
type: choice
options:
- "geth"
- "nethermind"
- "besu"
- "erigon"
chainlinkImage:
description: Container image location for the Chainlink nodes
required: true
default: public.ecr.aws/chainlink/chainlink
chainlinkVersion:
description: Container image version for the Chainlink nodes
required: true
default: "2.6.0"
configBase64:
description: TOML config in base64 (Needed when overriding config or providing contract addresses for existing env)
required: false
jobs:
vrfv2plus_smoke_test:
name: VRFV2Plus Smoke Test with ${{ inputs.client }} client
environment: integration
runs-on: ubuntu20.04-8cores-32GB
permissions:
checks: write
pull-requests: write
id-token: write
contents: read
env:
SELECTED_NETWORKS: "SIMULATED"
CONFIG: ${{ inputs.configBase64 }}
TEST_LOG_LEVEL: debug
REF_NAME: ${{ github.head_ref || github.ref_name }}
CHAINLINK_IMAGE: ${{ inputs.chainlinkImage }}
CHAINLINK_VERSION: ${{ inputs.chainlinkVersion }}
steps:
- name: Setup Push Tag
shell: bash
run: |
echo "### chainlink image used for this test run :link:" >>$GITHUB_STEP_SUMMARY
echo "\`${{ inputs.chainlinkVersion }}\`" >>$GITHUB_STEP_SUMMARY
echo "### chainlink-tests image tag for this test run :ship:" >>$GITHUB_STEP_SUMMARY
echo "\`${GITHUB_SHA}\`" >>$GITHUB_STEP_SUMMARY
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: Run Tests
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@7d541cbbca52d45b8a718257af86d9cf49774d1f # v2.2.15
with:
test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json -run ^TestVRFv2Plus$/^Link_Billing$ ./smoke/vrfv2plus_test.go 2>&1 | tee /tmp/gotest.log | gotestfmt
test_download_vendor_packages_command: cd ./integration-tests && go mod download
cl_repo: ${{ inputs.chainlinkImage }}
cl_image_tag: ${{ inputs.chainlinkVersion }}
aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
artifacts_name: vrfplus-test-logs
artifacts_location: ./integration-tests/smoke/logs/
token: ${{ secrets.GITHUB_TOKEN }}
go_mod_path: ./integration-tests/go.mod
should_cleanup: false
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_KUBECONFIG: ""
env:
ETH2_EL_CLIENT: ${{ inputs.client }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ go.work*
tools/flakeytests/coverage.txt

.test_summary/
.run.id
.run.id
2 changes: 1 addition & 1 deletion charts/chainlink-cluster/dashboard/cmd/dashboard_deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"os"

"github.com/smartcontractkit/chainlink/v2/dashboard/dashboard"
"github.com/smartcontractkit/chainlink/charts/chainlink-cluster/dashboard/dashboard"
"github.com/smartcontractkit/wasp"
)

Expand Down
24 changes: 23 additions & 1 deletion charts/chainlink-cluster/devspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ version: v2beta1
name: chainlink

vars:
NS_TTL: 72h
DEVSPACE_IMAGE:
source: env

Expand All @@ -20,17 +21,38 @@ pipelines:
run_dependencies --all # 1. Deploy any projects this project needs (see "dependencies")
ensure_pull_secrets --all # 2. Ensure pull secrets
build_images --all -t $(git rev-parse --short HEAD) # 3. Build, tag (git commit hash) and push all images (see "images")
create_deployments --all # 4. Deploy Helm charts and manifests specfied as "deployments"
create_deployments --all # 5. Deploy Helm charts and manifests specfied as "deployments"
kubectl annotate namespace ${DEVSPACE_NAMESPACE} janitor/ttl=${NS_TTL}
echo "Namespace ${DEVSPACE_NAMESPACE} will be deleted in ${NS_TTL}"
purge:
run: |-
kubectl delete ns ${DEVSPACE_NAMESPACE}
commands:
connect: |-
sudo kubefwd svc -n ${DEVSPACE_NAMESPACE}
images:
app:
image: ${DEVSPACE_IMAGE}
dockerfile: ../../core/chainlink.devspace.Dockerfile
context: ../..

hooks:
- wait:
running: true
terminatedWithCode: 0
container:
labelSelector:
# vars don't work here, = releaseName
release: "app"
events: ["after:deploy:app"]
name: "wait-for-pod-hook"

# This is a list of `deployments` that DevSpace can create for this project
deployments:
app:
namespace: ${DEVSPACE_NAMESPACE}
helm:
releaseName: "app"
chart:
Expand Down
6 changes: 1 addition & 5 deletions charts/chainlink-cluster/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/smartcontractkit/chainlink/v2/dashboard
module github.com/smartcontractkit/chainlink/charts/chainlink-cluster/dashboard

go 1.21

Expand Down Expand Up @@ -170,10 +170,6 @@ require (
)

replace (
// Fixes go mod tidy issue for ambiguous imports from go-ethereum
// See https://github.com/ugorji/go/issues/279
github.com/btcsuite/btcd => github.com/btcsuite/btcd v0.22.1

github.com/go-kit/log => github.com/go-kit/log v0.2.1

// replicating the replace directive on cosmos SDK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
spec:
namespaceSelector:
matchNames:
- "cl-cluster"
- {{ $.Release.Namespace }}
podMetricsEndpoints:
- port: access
selector:
Expand Down
7 changes: 4 additions & 3 deletions common/client/node_lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ import (
"github.com/prometheus/client_golang/prometheus/promauto"

"github.com/smartcontractkit/chainlink-common/pkg/logger"
"github.com/smartcontractkit/chainlink-common/pkg/utils"
bigmath "github.com/smartcontractkit/chainlink-common/pkg/utils/big_math"

"github.com/smartcontractkit/chainlink/v2/core/utils"
iutils "github.com/smartcontractkit/chainlink/v2/common/internal/utils"
)

var (
Expand Down Expand Up @@ -360,7 +361,7 @@ func (n *node[CHAIN_ID, HEAD, RPC]) unreachableLoop() {
lggr := logger.Named(n.lfcLog, "Unreachable")
lggr.Debugw("Trying to revive unreachable RPC node", "nodeState", n.State())

dialRetryBackoff := utils.NewRedialBackoff()
dialRetryBackoff := iutils.NewRedialBackoff()

for {
select {
Expand Down Expand Up @@ -416,7 +417,7 @@ func (n *node[CHAIN_ID, HEAD, RPC]) invalidChainIDLoop() {
lggr := logger.Named(n.lfcLog, "InvalidChainID")
lggr.Debugw(fmt.Sprintf("Periodically re-checking RPC node %s with invalid chain ID", n.String()), "nodeState", n.State())

chainIDRecheckBackoff := utils.NewRedialBackoff()
chainIDRecheckBackoff := iutils.NewRedialBackoff()

for {
select {
Expand Down
2 changes: 1 addition & 1 deletion common/client/send_only_node_lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"time"

"github.com/smartcontractkit/chainlink/v2/core/utils"
"github.com/smartcontractkit/chainlink/v2/common/internal/utils"
)

// verifyLoop may only be triggered once, on Start, if initial chain ID check
Expand Down
6 changes: 3 additions & 3 deletions common/headtracker/head_broadcaster.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (

"github.com/smartcontractkit/chainlink-common/pkg/logger"
"github.com/smartcontractkit/chainlink-common/pkg/services"
"github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox"

"github.com/smartcontractkit/chainlink/v2/common/types"
"github.com/smartcontractkit/chainlink/v2/core/utils"
)

const TrackableCallbackTimeout = 2 * time.Second
Expand All @@ -30,7 +30,7 @@ type HeadBroadcaster[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] struct
services.StateMachine
logger logger.Logger
callbacks callbackSet[H, BLOCK_HASH]
mailbox *utils.Mailbox[H]
mailbox *mailbox.Mailbox[H]
mutex sync.Mutex
chClose services.StopChan
wgDone sync.WaitGroup
Expand All @@ -48,7 +48,7 @@ func NewHeadBroadcaster[
return &HeadBroadcaster[H, BLOCK_HASH]{
logger: logger.Named(lggr, "HeadBroadcaster"),
callbacks: make(callbackSet[H, BLOCK_HASH]),
mailbox: utils.NewSingleMailbox[H](),
mailbox: mailbox.NewSingle[H](),
chClose: make(chan struct{}),
}
}
Expand Down
Loading

0 comments on commit 1b8c936

Please sign in to comment.