Skip to content

Commit

Permalink
Merge branch 'develop' into cancun-hardfork
Browse files Browse the repository at this point in the history
  • Loading branch information
simsonraj authored Feb 21, 2024
2 parents fc339f9 + 2cd4bc5 commit 6a20664
Show file tree
Hide file tree
Showing 61 changed files with 3,880 additions and 352 deletions.
15 changes: 10 additions & 5 deletions .github/actions/goreleaser-build-sign-publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,24 @@ description: A composite action that allows building and publishing signed chain
inputs:
goreleaser-version:
description: The goreleaser version
default: 1.15.2
default: 1.23.0
required: false
goreleaser-key:
description: The goreleaser key
required: false
zig-version:
description: The zig version
default: 0.10.1
required: false
cosign-version:
description: The cosign version
default: v1.13.1
default: v2.2.2
required: false
macos-sdk-dir:
description: The macos sdk directory
default: MacOSX12.3.sdk
required: false
# publising inputs
# publishing inputs
enable-docker-publish:
description: Enable publishing of docker images / manifests
default: "true"
Expand Down Expand Up @@ -75,16 +78,18 @@ runs:
- name: Setup goreleaser
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0
with:
distribution: goreleaser
distribution: goreleaser-pro
install-only: true
version: ${{ inputs.goreleaser-version }}
env:
GORELEASER_KEY: ${{ inputs.goreleaser-key }}
- name: Setup zig
uses: goto-bus-stop/setup-zig@7ab2955eb728f5440978d5824358023be3a2802d # v2.2.0
with:
version: ${{ inputs.zig-version }}
- name: Setup cosign
if: inputs.enable-cosign == 'true'
uses: sigstore/cosign-installer@11086d25041f77fe8fe7b9ea4e48e3b9192b8f19 # v3.1.2
uses: sigstore/cosign-installer@9614fae9e5c5eddabb09f90a270fcb487c9f7149 # v3.3.0
with:
cosign-release: ${{ inputs.cosign-version }}
- name: Login to docker registry
Expand Down
4 changes: 1 addition & 3 deletions .github/actions/goreleaser-build-sign-publish/action_utils
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env bash
set -x
set -euo pipefail

ENABLE_COSIGN=${ENABLE_COSIGN:-false}
ENABLE_GORELEASER_SNAPSHOT=${ENABLE_GORELEASER_SNAPSHOT:-false}
Expand Down Expand Up @@ -70,9 +71,6 @@ goreleaser_release() {
rm -rf cosign.pub
rm -rf cosign.key
fi

echo "metadata=$(cat dist/metadata.json)" >> "$GITHUB_OUTPUT"
echo "artifacts=$(cat dist/artifacts.json)" >> "$GITHUB_OUTPUT"
}

"$@"
5 changes: 3 additions & 2 deletions .github/workflows/goreleaser-build-publish-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ jobs:
enable-goreleaser-snapshot: "true"
goreleaser-exec: ./tools/bin/goreleaser_wrapper
goreleaser-config: .goreleaser.develop.yaml
# ISSUE: https://github.com/golang/go/issues/52690
zig-version: 0.11.0-dev.3380+7e0a02ee2 # TODO: update action to v0.11.x once released
goreleaser-key: ${{ secrets.GORELEASER_KEY }}
zig-version: 0.11.0
- name: Collect Metrics
if: always()
id: collect-gha-metrics
Expand All @@ -46,6 +46,7 @@ jobs:
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }}
this-job-name: push-chainlink-develop-goreleaser
continue-on-error: true

mercury-e2e-tests:
needs: [push-chainlink-develop-goreleaser]
runs-on:
Expand Down
12 changes: 5 additions & 7 deletions .goreleaser.develop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ env:

before:
hooks:
- go mod tidy
- ./tools/bin/goreleaser_utils before_hook

# See https://goreleaser.com/customization/build/
Expand Down Expand Up @@ -62,6 +63,7 @@ dockers:
goarch: amd64
extra_files:
- tmp/linux_amd64/libs
- tools/bin/ldd_fix
build_flag_templates:
- "--platform=linux/amd64"
- "--pull"
Expand All @@ -84,6 +86,7 @@ dockers:
goarch: arm64
extra_files:
- tmp/linux_arm64/libs
- tools/bin/ldd_fix
build_flag_templates:
- "--platform=linux/arm64"
- "--pull"
Expand All @@ -106,6 +109,7 @@ dockers:
goarch: amd64
extra_files:
- tmp/linux_amd64/libs
- tools/bin/ldd_fix
build_flag_templates:
- "--platform=linux/amd64"
- "--pull"
Expand All @@ -129,6 +133,7 @@ dockers:
goarch: arm64
extra_files:
- tmp/linux_arm64/libs
- tools/bin/ldd_fix
build_flag_templates:
- "--platform=linux/arm64"
- "--pull"
Expand Down Expand Up @@ -170,13 +175,6 @@ docker_signs:
- artifacts: all
stdin: "{{ .Env.COSIGN_PASSWORD }}"

archives:
- rlcp: true
files:
- src: tmp/{{ .Os }}_{{ .Arch }}/libs/*
dst: libs
strip_parent: true

checksum:
name_template: "checksums.txt"

Expand Down
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
golang 1.21.5
golang 1.21.7
mockery 2.38.0
nodejs 16.16.0
postgres 13.3
helm 3.10.3
zig 0.10.1
zig 0.11.0
golangci-lint 1.55.2
protoc 25.1
19 changes: 14 additions & 5 deletions common/txmgr/confirmer.go
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ func (ec *Confirmer[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Fin
oldestBlocksBehind = blockNum - *oldestBlockNum
}
} else {
logger.Sugared(lggr).AssumptionViolationf("Expected tx for gas bump to have at least one attempt", "etxID", etx.ID, "blockNum", blockNum, "address", address)
logger.Sugared(lggr).AssumptionViolationw("Expected tx for gas bump to have at least one attempt", "etxID", etx.ID, "blockNum", blockNum, "address", address)
}
lggr.Infow(fmt.Sprintf("Found %d transactions to re-sent that have still not been confirmed after at least %d blocks. The oldest of these has not still not been confirmed after %d blocks. These transactions will have their gas price bumped. %s", len(etxBumps), gasBumpThreshold, oldestBlocksBehind, label.NodeConnectivityProblemWarning), "blockNum", blockNum, "address", address, "gasBumpThreshold", gasBumpThreshold)
}
Expand Down Expand Up @@ -858,10 +858,19 @@ func (ec *Confirmer[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) han
}
return ec.handleInProgressAttempt(ctx, lggr, etx, replacementAttempt, blockHeight)
case client.ExceedsMaxFee:
// Confirmer: The gas price was bumped too high. This transaction attempt cannot be accepted.
// Best thing we can do is to re-send the previous attempt at the old
// price and discard this bumped version.
fallthrough
// Confirmer: Note it is not guaranteed that all nodes share the same tx fee cap.
// So it is very likely that this attempt was successful on another node since
// it was already successfully broadcasted. So we assume it is successful and
// warn the operator that the RPC node is misconfigured.
// This failure scenario is a strong indication that the RPC node
// is misconfigured. This is a critical error and should be resolved by the
// node operator.
// If there is only one RPC node, or all RPC nodes have the same
// configured cap, this transaction will get stuck and keep repeating
// forever until the issue is resolved.
lggr.Criticalw(`RPC node rejected this tx as outside Fee Cap but it may have been accepted by another Node`, "attempt", attempt)
timeout := ec.dbConfig.DefaultQueryTimeout()
return ec.txStore.SaveSentAttempt(ctx, timeout, &attempt, now)
case client.Fatal:
// WARNING: This should never happen!
// Should NEVER be fatal this is an invariant violation. The
Expand Down
Loading

0 comments on commit 6a20664

Please sign in to comment.