Skip to content

Commit

Permalink
Merge branch 'develop' into AUTO-8804
Browse files Browse the repository at this point in the history
  • Loading branch information
infiloop2 authored Feb 14, 2024
2 parents 73f7880 + efdb8af commit f83a90d
Show file tree
Hide file tree
Showing 137 changed files with 8,809 additions and 3,008 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ jobs:
pushd $(go list -m -f "{{.Dir}}" github.com/smartcontractkit/chainlink-starknet/relayer)
go install ./pkg/chainlink/cmd/chainlink-starknet
popd
make install-mercury-loop
- name: Increase Race Timeout
if: github.event.schedule != ''
run: |
Expand Down Expand Up @@ -257,6 +258,8 @@ jobs:
uses: ./.github/actions/setup-go
with:
only-modules: "true"
- name: Install protoc-gen-go-wsrpc
run: curl https://github.com/smartcontractkit/wsrpc/raw/main/cmd/protoc-gen-go-wsrpc/protoc-gen-go-wsrpc --output $HOME/go/bin/protoc-gen-go-wsrpc && chmod +x $HOME/go/bin/protoc-gen-go-wsrpc
- name: Setup NodeJS
uses: ./.github/actions/setup-nodejs
- run: make generate # generate install go deps
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/nightlyfuzz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: 'nightly/tag fuzz'
on:
schedule:
# Note: The schedule event can be delayed during periods of high
# loads of GitHub Actions workflow runs. High load times include
# the start of every hour. To decrease the chance of delay,
# schedule your workflow to run at a different time of the hour.
- cron: "25 0 * * *" # at 25 past midnight every day
push:
tags:
- '*'
workflow_dispatch: null
jobs:
fuzzrun:
name: "run native fuzzers"
runs-on: "ubuntu20.04-4cores-16GB"
steps:
- name: "Checkout"
uses: "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11" # v4.1.1
- name: "Setup go"
uses: "actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491" # v5.0.0
with:
go-version-file: 'go.mod'
cache: true
cache-dependency-path: 'go.sum'
- name: "Get corpus directory"
id: "get-corpus-dir"
run: echo "corpus_dir=$(go env GOCACHE)/fuzz" >> $GITHUB_OUTPUT
shell: "bash"
- name: "Restore corpus"
uses: "actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2" # v4.0.0
id: "restore-corpus"
with:
path: "${{ steps.get-corpus-dir.outputs.corpus_dir }}"
# We need to ensure uniqueness of the key, as saving to a key more than once will fail (see Save corpus step).
# We never expect a cache hit with the key but we do expect a hit with the restore-keys prefix that is going
# to match the latest cache that has that prefix.
key: "nightlyfuzz-corpus-${{ github.run_id }}-${{ github.run_attempt }}"
restore-keys: "nightlyfuzz-corpus-"
- name: "Run native fuzzers"
# Fuzz for 1 hour
run: "cd fuzz && ./fuzz_all_native.py --seconds 3600"
- name: "Print failing testcases"
if: failure()
run: find . -type f|fgrep '/testdata/fuzz/'|while read f; do echo $f; cat $f; done
- name: "Save corpus"
uses: "actions/cache/save@13aacd865c20de90d75de3b17ebe84f7a17d57d2" # v4.0.0
# We save also on failure, so that we can keep the valuable corpus generated that led to finding a crash.
# If the corpus gets clobbered for any reason, we can remove the offending cache from the Github UI.
if: always()
with:
path: "${{ steps.get-corpus-dir.outputs.corpus_dir }}"
key: "${{ steps.restore-corpus.outputs.cache-primary-key }}"
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ linters-settings:
- name: identical-branches
- name: get-return
# - name: flag-parameter
# - name: early-return
- name: early-return
- name: defer
- name: constant-logical-expr
# - name: confusing-naming
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ postgres 13.3
helm 3.10.3
zig 0.10.1
golangci-lint 1.55.2
protoc 23.2
protoc 25.1
7 changes: 6 additions & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ abigen: ## Build & install abigen.
./tools/bin/build_abigen

.PHONY: generate
generate: abigen codecgen mockery ## Execute all go:generate commands.
generate: abigen codecgen mockery protoc ## Execute all go:generate commands.
go generate -x ./...

.PHONY: testscripts
Expand Down Expand Up @@ -124,6 +124,11 @@ mockery: $(mockery) ## Install mockery.
codecgen: $(codecgen) ## Install codecgen
go install github.com/ugorji/go/codec/[email protected]

.PHONY: protoc
protoc: ## Install protoc
core/scripts/install-protoc.sh 25.1 /
go install google.golang.org/protobuf/cmd/protoc-gen-go@`go list -m -json google.golang.org/protobuf | jq -r .Version`

.PHONY: telemetry-protobuf
telemetry-protobuf: $(telemetry-protobuf) ## Generate telemetry protocol buffers.
protoc \
Expand Down
7 changes: 7 additions & 0 deletions common/client/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,15 @@ const (
InsufficientFunds // Tx was rejected due to insufficient funds.
ExceedsMaxFee // Attempt's fee was higher than the node's limit and got rejected.
FeeOutOfValidRange // This error is returned when we use a fee price suggested from an RPC, but the network rejects the attempt due to an invalid range(mostly used by L2 chains). Retry by requesting a new suggested fee price.
sendTxReturnCodeLen // tracks the number of errors. Must always be last
)

// sendTxSevereErrors - error codes which signal that transaction would never be accepted in its current form by the node
var sendTxSevereErrors = []SendTxReturnCode{Fatal, Underpriced, Unsupported, ExceedsMaxFee, FeeOutOfValidRange, Unknown}

// sendTxSuccessfulCodes - error codes which signal that transaction was accepted by the node
var sendTxSuccessfulCodes = []SendTxReturnCode{Successful, TransactionAlreadyKnown}

type NodeTier int

const (
Expand Down
Loading

0 comments on commit f83a90d

Please sign in to comment.