Skip to content

Commit

Permalink
Merge branch 'develop' into feature/oti-head-report
Browse files Browse the repository at this point in the history
  • Loading branch information
bukata-sa authored Aug 15, 2024
2 parents b94bcf4 + 8fa8c3a commit ccbfbf7
Show file tree
Hide file tree
Showing 98 changed files with 23,610 additions and 412 deletions.
5 changes: 5 additions & 0 deletions .changeset/calm-badgers-jump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

add error handling when arbitrum sequencer is not accessible #added
5 changes: 5 additions & 0 deletions .changeset/chilly-cars-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

add error handle for gnosis chiado for seen tx #added
5 changes: 5 additions & 0 deletions .changeset/early-glasses-rhyme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

use FilteredLogs in EventBinding GetLatestValue instead of manual filtering. #internal
5 changes: 5 additions & 0 deletions .changeset/fast-insects-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

#internal Change CapabilityType to string; remove possiblity of a panic
5 changes: 5 additions & 0 deletions .changeset/new-eagles-marry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#internal prevent editing whether or not a DON accepts workflows
5 changes: 5 additions & 0 deletions .changeset/ninety-ways-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#internal speed up keystone e2e tests
5 changes: 5 additions & 0 deletions .changeset/tasty-windows-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#bugfix balance shutdown deadlock
5 changes: 5 additions & 0 deletions .changeset/yellow-cougars-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

Added client error classification for terminally stuck transactions in the TXM #internal
41 changes: 28 additions & 13 deletions .github/actions/goreleaser-build-sign-publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,13 @@ inputs:
description: The docker registry
default: localhost:5001
required: false
# snapshot inputs
enable-goreleaser-snapshot:
description: Enable goreleaser build / release snapshot
default: "false"
docker-image-name:
description: The docker image name
default: chainlink
required: false
docker-image-tag:
description: The docker image tag
default: develop
required: false
# goreleaser inputs
goreleaser-exec:
Expand All @@ -43,6 +46,17 @@ inputs:
description: "The goreleaser configuration yaml"
default: ".goreleaser.yaml"
required: false
enable-goreleaser-snapshot:
description: Enable goreleaser build / release snapshot
default: "false"
required: false
enable-goreleaser-split:
description: Enable goreleaser split and merge builds
default: "false"
required: false
goreleaser-split-arch:
description: The architecture to split the goreleaser build
required: false
# signing inputs
enable-cosign:
description: Enable signing of docker images
Expand All @@ -57,13 +71,6 @@ inputs:
cosign-password:
description: The password to decrypt the cosign private key needed to sign the image
required: false
outputs:
goreleaser-metadata:
description: "Build result metadata"
value: ${{ steps.goreleaser.outputs.metadata }}
goreleaser-artifacts:
description: "Build result artifacts"
value: ${{ steps.goreleaser.outputs.artifacts }}
runs:
using: composite
steps:
Expand Down Expand Up @@ -97,14 +104,22 @@ runs:
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
with:
registry: ${{ inputs.docker-registry }}
- name: Goreleaser release
id: goreleaser
- name: Set goreleaser split env
if: inputs.enable-goreleaser-split == 'true'
shell: bash
run: |
echo "GOOS=linux" | tee -a $GITHUB_ENV
echo "GOARCH=${{ inputs.goreleaser-split-arch }}" | tee -a $GITHUB_ENV
- name: Run goreleaser release
shell: bash
env:
ENABLE_COSIGN: ${{ inputs.enable-cosign }}
ENABLE_GORELEASER_SNAPSHOT: ${{ inputs.enable-goreleaser-snapshot }}
ENABLE_GORELEASER_SPLIT: ${{ inputs.enable-goreleaser-split }}
ENABLE_DOCKER_PUBLISH: ${{ inputs.enable-docker-publish }}
IMAGE_PREFIX: ${{ inputs.docker-registry }}
IMAGE_NAME: ${{ inputs.docker-image-name }}
IMAGE_TAG: ${{ inputs.docker-image-tag }}
GORELEASER_EXEC: ${{ inputs.goreleaser-exec }}
GORELEASER_CONFIG: ${{ inputs.goreleaser-config }}
COSIGN_PASSWORD: ${{ inputs.cosign-password }}
Expand Down
32 changes: 25 additions & 7 deletions .github/actions/goreleaser-build-sign-publish/action_utils
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -euo pipefail

ENABLE_COSIGN=${ENABLE_COSIGN:-false}
ENABLE_GORELEASER_SNAPSHOT=${ENABLE_GORELEASER_SNAPSHOT:-false}
ENABLE_GORELEASER_SPLIT=${ENABLE_GORELEASER_SPLIT:-false}
ENABLE_DOCKER_PUBLISH=${ENABLE_DOCKER_PUBLISH:-false}
COSIGN_PASSWORD=${COSIGN_PASSWORD:-""}
GORELEASER_EXEC=${GORELEASER_EXEC:-goreleaser}
Expand All @@ -27,8 +28,12 @@ _publish_snapshot_manifests() {
local docker_manifest_extra_args=$DOCKER_MANIFEST_EXTRA_ARGS
local full_sha=$(git rev-parse HEAD)
local images=$(docker images --filter "label=org.opencontainers.image.revision=$full_sha" --format "{{.Repository}}:{{.Tag}}" | sort)
local arches=(amd64 arm64)
local raw_manifest_lists=""
if [[ $ENABLE_GORELEASER_SPLIT == "true" ]]; then
local arches=(${GOARCH:-""})
else
local arches=(amd64 arm64)
fi
for image in $images; do
for arch in "${arches[@]}"; do
image=${image%"-$arch"}
Expand All @@ -51,22 +56,35 @@ _publish_snapshot_manifests() {

# wrapper function to invoke goreleaser release
goreleaser_release() {
goreleaser_flags=()

# set goreleaser flags
if [[ $ENABLE_GORELEASER_SNAPSHOT == "true" ]]; then
goreleaser_flags+=("--snapshot")
goreleaser_flags+=("--clean")
fi
if [[ $ENABLE_GORELEASER_SPLIT == "true" ]]; then
goreleaser_flags+=("--split")
fi
flags=$(printf "%s " "${goreleaser_flags[@]}")
flags=$(echo "$flags" | sed 's/ *$//')

if [[ $ENABLE_COSIGN == "true" ]]; then
echo "$COSIGN_PUBLIC_KEY" > cosign.pub
echo "$COSIGN_PRIVATE_KEY" > cosign.key
fi

if [[ -n $MACOS_SDK_DIR ]]; then
MACOS_SDK_DIR=$(echo "$(cd "$(dirname "$MACOS_SDK_DIR")" || exit; pwd)/$(basename "$MACOS_SDK_DIR")")
fi
if [[ $ENABLE_GORELEASER_SNAPSHOT == "true" ]]; then
$GORELEASER_EXEC release --snapshot --clean --config "$GORELEASER_CONFIG" "$@"
if [[ $ENABLE_DOCKER_PUBLISH == "true" ]]; then

$GORELEASER_EXEC release ${flags} --config "$GORELEASER_CONFIG" "$@"

if [[ $ENABLE_DOCKER_PUBLISH == "true" ]]; then
_publish_snapshot_images
_publish_snapshot_manifests
fi
else
$GORELEASER_EXEC release --clean --config "$GORELEASER_CONFIG" "$@"
fi

if [[ $ENABLE_COSIGN == "true" ]]; then
rm -rf cosign.pub
rm -rf cosign.key
Expand Down
187 changes: 187 additions & 0 deletions .github/actions/setup-create-base64-config-ccip/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
name: Create Base64 Config for CCIP Tests
description: A composite action that creates a base64-encoded config to be used by ccip integration tests

inputs:
runId:
description: The run id
existingNamespace:
description: If test needs to run against already deployed namespace
testLogCollect:
description: Whether to always collect logs, even for passing tests
default: "false"
selectedNetworks:
description: The networks to run tests against
chainlinkImage:
description: The chainlink image to use
default: "public.ecr.aws/chainlink/chainlink"
chainlinkVersion:
description: The git commit sha to use for the image tag
upgradeImage:
description: The chainlink image to upgrade to
default: ""
upgradeVersion:
description: The git commit sha to use for the image tag
lokiEndpoint:
description: Loki push endpoint
lokiTenantId:
description: Loki tenant id
lokiBasicAuth:
description: Loki basic auth
logstreamLogTargets:
description: Where to send logs (e.g. file, loki)
grafanaUrl:
description: Grafana URL
grafanaDashboardUrl:
description: Grafana dashboard URL
grafanaBearerToken:
description: Grafana bearer token
customEvmNodes:
description: Custom EVM nodes to use in key=value format, where key is chain id and value is docker image to use. If they are provided the number of networksSelected must be equal to the number of customEvmNodes
evmNodeLogLevel:
description: Log level for the custom EVM nodes
default: "info"

runs:
using: composite
steps:
- name: Prepare Base64 TOML override
shell: bash
id: base64-config-override
env:
RUN_ID: ${{ inputs.runId }}
SELECTED_NETWORKS: ${{ inputs.selectedNetworks }}
EXISTING_NAMESPACE: ${{ inputs.existingNamespace }}
TEST_LOG_COLLECT: ${{ inputs.testLogCollect }}
CHAINLINK_IMAGE: ${{ inputs.chainlinkImage }}
CHAINLINK_VERSION: ${{ inputs.chainlinkVersion }}
UPGRADE_IMAGE: ${{ inputs.upgradeImage }}
UPGRADE_VERSION: ${{ inputs.upgradeVersion }}
LOKI_ENDPOINT: ${{ inputs.lokiEndpoint }}
LOKI_TENANT_ID: ${{ inputs.lokiTenantId }}
LOKI_BASIC_AUTH: ${{ inputs.lokiBasicAuth }}
LOGSTREAM_LOG_TARGETS: ${{ inputs.logstreamLogTargets }}
GRAFANA_URL: ${{ inputs.grafanaUrl }}
GRAFANA_DASHBOARD_URL: ${{ inputs.grafanaDashboardUrl }}
GRAFANA_BEARER_TOKEN: ${{ inputs.grafanaBearerToken }}
CUSTOM_EVM_NODES: ${{ inputs.customEvmNodes }}
EVM_NODE_LOG_LEVEL: ${{ inputs.evmNodeLogLevel }}
run: |
echo ::add-mask::$CHAINLINK_IMAGE
function convert_to_toml_array() {
local IFS=','
local input_array=($1)
local toml_array_format="["
for element in "${input_array[@]}"; do
toml_array_format+="\"$element\","
done
toml_array_format="${toml_array_format%,}]"
echo "$toml_array_format"
}
selected_networks=$(convert_to_toml_array "$SELECTED_NETWORKS")
log_targets=$(convert_to_toml_array "$LOGSTREAM_LOG_TARGETS")
if [ -n "$TEST_LOG_COLLECT" ]; then
test_log_collect=true
else
test_log_collect=false
fi
# make sure the number of networks and nodes match
IFS=',' read -r -a networks_array <<< "$SELECTED_NETWORKS"
IFS=',' read -r -a nodes_array <<< "$CUSTOM_EVM_NODES"
networks_count=${#networks_array[@]}
nodes_count=${#nodes_array[@]}
# Initialize or clear CONFIG_TOML environment variable
custom_nodes_toml=""
# Check if the number of CUSTOM_EVM_NODES is zero
if [ $nodes_count -eq 0 ]; then
echo "The number of CUSTOM_EVM_NODES is zero, won't output any custom private Ethereum network configurations."
else
if [ $networks_count -ne $nodes_count ]; then
echo "The number of elements in SELECTED_NETWORKS (${networks_count}) and CUSTOM_EVM_NODES does not match (${nodes_count})."
exit 1
else
for i in "${!networks_array[@]}"; do
IFS='=' read -r chain_id docker_image <<< "${nodes_array[i]}"
custom_nodes_toml+="
[CCIP.Env.PrivateEthereumNetworks.${networks_array[i]}]
ethereum_version=\"\"
execution_layer=\"\"
[CCIP.Env.PrivateEthereumNetworks.${networks_array[i]}.EthereumChainConfig]
seconds_per_slot=3
slots_per_epoch=2
genesis_delay=15
validator_count=4
chain_id=${chain_id}
addresses_to_fund=[\"0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266\", \"0x70997970C51812dc3A010C7d01b50e0d17dc79C8\"]
node_log_level=\"${EVM_NODES_LOG_LEVEL}\"
[CCIP.Env.PrivateEthereumNetworks.${networks_array[i]}.EthereumChainConfig.HardForkEpochs]
Deneb=500
[CCIP.Env.PrivateEthereumNetworks.${networks_array[i]}.CustomDockerImages]
execution_layer=\"${docker_image}\"
"
done
fi
fi
grafana_bearer_token=""
if [ -n "$GRAFANA_BEARER_TOKEN" ]; then
grafana_bearer_token="bearer_token_secret=\"$GRAFANA_BEARER_TOKEN\""
fi
cat << EOF > config.toml
[CCIP]
[CCIP.Env]
EnvToConnect="$EXISTING_NAMESPACE"
[CCIP.Env.Network]
selected_networks = $selected_networks
[CCIP.Env.NewCLCluster]
[CCIP.Env.NewCLCluster.Common]
[CCIP.Env.NewCLCluster.Common.ChainlinkImage]
image="$CHAINLINK_IMAGE"
version="$CHAINLINK_VERSION"
[CCIP.Env.NewCLCluster.Common.ChainlinkUpgradeImage]
image="$UPGRADE_IMAGE"
version="$UPGRADE_VERSION"
$custom_nodes_toml
[CCIP.Env.Logging]
test_log_collect=$test_log_collect
run_id="$RUN_ID"
[CCIP.Env.Logging.LogStream]
log_targets=$log_targets
[CCIP.Env.Logging.Loki]
tenant_id="$LOKI_TENANT_ID"
endpoint="$LOKI_ENDPOINT"
basic_auth_secret="$LOKI_BASIC_AUTH"
[CCIP.Env.Logging.Grafana]
base_url="$GRAFANA_URL"
dashboard_url="$GRAFANA_DASHBOARD_URL"
$grafana_bearer_token
[CCIP.Groups.load]
TestRunName = '$EXISTING_NAMESPACE'
[CCIP.Groups.smoke]
TestRunName = '$EXISTING_NAMESPACE'
EOF
BASE64_CCIP_SECRETS_CONFIG=$(cat config.toml | base64 -w 0)
echo ::add-mask::$BASE64_CCIP_SECRETS_CONFIG
echo "BASE64_CCIP_SECRETS_CONFIG=$BASE64_CCIP_SECRETS_CONFIG" >> $GITHUB_ENV
echo "TEST_BASE64_CCIP_SECRETS_CONFIG=$BASE64_CCIP_SECRETS_CONFIG" >> $GITHUB_ENV
Loading

0 comments on commit ccbfbf7

Please sign in to comment.