Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:smartcontractkit/chainlink into …
Browse files Browse the repository at this point in the history
…liveWorkflow
  • Loading branch information
kalverra committed Nov 7, 2023
2 parents 3c5ddc6 + 4e45a2a commit 1a2875c
Show file tree
Hide file tree
Showing 46 changed files with 1,351 additions and 361 deletions.
2 changes: 1 addition & 1 deletion .github/actions/build-sign-publish-chainlink/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ runs:
- if: inputs.sign-images == 'true'
name: Install cosign
uses: sigstore/cosign-installer@581838fbedd492d2350a9ecd427a95d6de1e5d01 # v2.1.0
uses: sigstore/cosign-installer@11086d25041f77fe8fe7b9ea4e48e3b9192b8f19 # v3.1.2
with:
cosign-release: "v1.6.0"

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/goreleaser-build-sign-publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ runs:
version: ${{ inputs.zig-version }}
- name: Setup cosign
if: inputs.enable-cosign == 'true'
uses: sigstore/cosign-installer@581838fbedd492d2350a9ecd427a95d6de1e5d01 # v2.1.0
uses: sigstore/cosign-installer@11086d25041f77fe8fe7b9ea4e48e3b9192b8f19 # v3.1.2
with:
cosign-release: ${{ inputs.cosign-version }}
- name: Login to docker registry
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/automation-benchmark-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
id-token: write
contents: read
name: ${{ inputs.network }} Automation Benchmark Test
runs-on: ubuntu-latest
runs-on: ubuntu20.04-16cores-64GB
env:
SELECTED_NETWORKS: ${{ inputs.network }}
SLACK_API_KEY: ${{ secrets.QA_SLACK_API_KEY }}
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,6 @@ jobs:
cl_repo: ${{ env.CHAINLINK_IMAGE }}
cl_image_tag: ${{ github.sha }}
aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
dockerhub_username: ${{ secrets.DOCKERHUB_READONLY_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_READONLY_PASSWORD }}
artifacts_location: ./integration-tests/smoke/logs/
publish_check_name: ${{ matrix.product.name }}
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -402,8 +400,6 @@ jobs:
cl_repo: ${{ env.CHAINLINK_IMAGE }}
cl_image_tag: ${{ github.sha }}${{ matrix.product.tag_suffix }}
aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
dockerhub_username: ${{ secrets.DOCKERHUB_READONLY_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_READONLY_PASSWORD }}
artifacts_name: ${{ matrix.product.name }}-test-logs
artifacts_location: ./integration-tests/smoke/logs/
publish_check_name: ${{ matrix.product.name }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/on-demand-ocr-soak-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ on:
- "FANTOM_MAINNET"
- "KROMA_MAINNET"
- "KROMA_SEPOLIA"
- "WEMIX_TESTNET"
- "WEMIX_MAINNET"
fundingPrivateKey:
description: Private funding key (Skip for Simulated)
required: false
Expand Down
2 changes: 1 addition & 1 deletion contracts/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ abigen: ## Build & install abigen.

.PHONY: mockery
mockery: $(mockery) ## Install mockery.
go install github.com/vektra/mockery/v2@v2.28.1
go install github.com/vektra/mockery/v2@v2.35.4

.PHONY: foundry
foundry: ## Install foundry.
Expand Down
18 changes: 17 additions & 1 deletion core/chains/evm/client/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,23 @@ var harmony = ClientErrors{
Fatal: harmonyFatal,
}

var clients = []ClientErrors{parity, geth, arbitrum, metis, substrate, avalanche, nethermind, harmony, besu, erigon, klaytn, celo}
var zkSync = ClientErrors{
NonceTooLow: regexp.MustCompile(`(?:: |^)nonce too low\..+actual: \d*$`),
NonceTooHigh: regexp.MustCompile(`(?:: |^)nonce too high\..+actual: \d*$`),
TerminallyUnderpriced: regexp.MustCompile(`(?:: |^)max fee per gas less than block base fee$`),
InsufficientEth: regexp.MustCompile(`(?:: |^)(?:insufficient balance for transfer$|insufficient funds for gas + value)`),
TxFeeExceedsCap: regexp.MustCompile(`(?:: |^)max priority fee per gas higher than max fee per gas$`),
// intrinsic gas too low - gas limit less than 14700
// Not enough gas for transaction validation - gas limit less than L2 fee
// Failed to pay the fee to the operator - gas limit less than L2+L1 fee
// Error function_selector = 0x, data = 0x - contract call with gas limit of 0
// can't start a transaction from a non-account - trying to send from an invalid address, e.g. estimating a contract -> contract tx
// max fee per gas higher than 2^64-1 - uint64 overflow
// oversized data - data too large
Fatal: regexp.MustCompile(`(?:: |^)(?:exceeds block gas limit|intrinsic gas too low|Not enough gas for transaction validation|Failed to pay the fee to the operator|Error function_selector = 0x, data = 0x|invalid sender. can't start a transaction from a non-account|max(?: priority)? fee per (?:gas|pubdata byte) higher than 2\^64-1|oversized data. max: \d+; actual: \d+)$`),
}

var clients = []ClientErrors{parity, geth, arbitrum, metis, substrate, avalanche, nethermind, harmony, besu, erigon, klaytn, celo, zkSync}

func (s *SendError) is(errorType int) bool {
if s == nil || s.err == nil {
Expand Down
16 changes: 16 additions & 0 deletions core/chains/evm/client/errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func Test_Eth_Errors(t *testing.T) {
{"call failed: nonce too low: address 0x0499BEA33347cb62D79A9C0b1EDA01d8d329894c current nonce (5833) > tx nonce (5511)", true, "Avalanche"},
{"call failed: OldNonce", true, "Nethermind"},
{"call failed: OldNonce, Current nonce: 22, nonce of rejected tx: 17", true, "Nethermind"},
{"nonce too low. allowed nonce range: 427 - 447, actual: 426", true, "zkSync"},
}

for _, test := range tests {
Expand All @@ -60,6 +61,7 @@ func Test_Eth_Errors(t *testing.T) {
{"nonce too high: address 0x336394A3219e71D9d9bd18201d34E95C1Bb7122C, tx: 8089 state: 8090", true, "Arbitrum"},
{"nonce too high", true, "Geth"},
{"nonce too high", true, "Erigon"},
{"nonce too high. allowed nonce range: 427 - 477, actual: 527", true, "zkSync"},
}

for _, test := range tests {
Expand Down Expand Up @@ -152,6 +154,7 @@ func Test_Eth_Errors(t *testing.T) {
{"FeeTooLowToCompete", true, "Nethermind"},
{"transaction underpriced", true, "Klaytn"},
{"intrinsic gas too low", true, "Klaytn"},
{"max fee per gas less than block base fee", true, "zkSync"},
}

for _, test := range tests {
Expand Down Expand Up @@ -194,6 +197,8 @@ func Test_Eth_Errors(t *testing.T) {
{"call failed: InsufficientFunds, Account balance: 4740799397601480913, cumulative cost: 22019342038993800000", true, "Nethermind"},
{"insufficient funds", true, "Klaytn"},
{"insufficient funds for gas * price + value + gatewayFee", true, "celo"},
{"insufficient balance for transfer", true, "zkSync"},
{"insufficient funds for gas + value. balance: 42719769622667482000, fee: 48098250000000, value: 42719769622667482000", true, "celo"},
}
for _, test := range tests {
err = evmclient.NewSendErrorS(test.message)
Expand All @@ -213,6 +218,7 @@ func Test_Eth_Errors(t *testing.T) {
{"invalid gas fee cap", true, "Klaytn"},
{"max fee per gas higher than max priority fee per gas", true, "Klaytn"},
{"tx fee (1.10 of currency celo) exceeds the configured cap (1.00 celo)", true, "celo"},
{"max priority fee per gas higher than max fee per gas", true, "zkSync"},
}
for _, test := range tests {
err = evmclient.NewSendErrorS(test.message)
Expand Down Expand Up @@ -329,6 +335,16 @@ func Test_Eth_Errors_Fatal(t *testing.T) {
{"`to` address of transaction in blacklist", true, "Harmony"},
{"`from` address of transaction in blacklist", true, "Harmony"},
{"staking message does not match directive message", true, "Harmony"},

{"intrinsic gas too low", true, "zkSync"},
{"failed to validate the transaction. reason: Validation revert: Account validation error: Not enough gas for transaction validation", true, "zkSync"},
{"failed to validate the transaction. reason: Validation revert: Failed to pay for the transaction: Failed to pay the fee to the operator", true, "zkSync"},
{"failed to validate the transaction. reason: Validation revert: Account validation error: Error function_selector = 0x, data = 0x", true, "zkSync"},
{"invalid sender. can't start a transaction from a non-account", true, "zkSync"},
{"Failed to serialize transaction: max fee per gas higher than 2^64-1", true, "zkSync"},
{"Failed to serialize transaction: max fee per pubdata byte higher than 2^64-1", true, "zkSync"},
{"Failed to serialize transaction: max priority fee per gas higher than 2^64-1", true, "zkSync"},
{"Failed to serialize transaction: oversized data. max: 1000000; actual: 1000000", true, "zkSync"},
}

for _, test := range tests {
Expand Down
Loading

0 comments on commit 1a2875c

Please sign in to comment.