Skip to content

Commit e998af0

Browse files
committed
Merge commit 'f190212bab15e84fe49db88f495ad026e6c1d520' into oev-393_metaclient
2 parents 6479762 + f190212 commit e998af0

300 files changed

Lines changed: 71381 additions & 3491 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,4 @@ go.mod @smartcontractkit/core @smartcontractkit/foundations @smartcontractkit/co
7777
go.sum @smartcontractkit/core @smartcontractkit/foundations @smartcontractkit/core-solidity
7878

7979
pkg/txm @dimriou @smartcontractkit/bix-framework @smartcontractkit/core
80+
pkg/bindings @smartcontractkit/bix-framework

.github/workflows/build-test.yml

Lines changed: 56 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,63 +3,104 @@ name: Build and Test
33
on: [pull_request]
44

55
jobs:
6-
build-test:
6+
build-test-matrix:
77
runs-on: ubuntu-latest
8-
defaults:
9-
run:
10-
working-directory: pkg # applied only for "run" steps
8+
119
env:
1210
# We explicitly have this env var not be "CL_DATABASE_URL" to avoid having it be used by core related tests
1311
# when they should not be using it, while still allowing us to DRY up the setup
1412
DB_URL: postgresql://postgres:postgres@localhost:5432/chainlink_test?sslmode=disable
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
type:
18+
# TODO only run when needed
19+
- path: .
20+
should-run: "true"
21+
requires-foundry: "false"
22+
- path: ./gethwrappers
23+
should-run: "true"
24+
requires-foundry: "true"
25+
1526
steps:
1627
- name: Checkout
1728
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
1829

1930
- name: Set up Go
31+
if: ${{ matrix.type.should-run == 'true' }}
2032
uses: actions/setup-go@v5
2133
with:
22-
cache-dependency-path: go.sum
23-
go-version-file: go.mod
34+
cache-dependency-path: ${{ matrix.type.path }}/go.sum
35+
go-version-file: ${{ matrix.type.path }}/go.mod
36+
37+
# Only needed because we use the NPM versions of packages and not native Foundry.
38+
- name: Setup NodeJS
39+
if: ${{ matrix.type.should-run == 'true' && matrix.type.requires-foundry == 'true' }}
40+
uses: ./.github/actions/setup-nodejs
41+
with:
42+
prod: "true"
43+
44+
- name: Install Foundry
45+
if: ${{ matrix.type.should-run == 'true' && matrix.type.requires-foundry == 'true' }}
46+
uses: ./.github/actions/install-solidity-foundry
2447

2548
- name: Build
49+
if: ${{ matrix.type.should-run == 'true' }}
2650
run: go build ./...
51+
working-directory: ${{ matrix.type.path }}
2752

2853
- name: Setup Postgres
54+
if: ${{ matrix.type.should-run == 'true' }}
2955
uses: smartcontractkit/.github/actions/setup-postgres@7aa7ce23687ba493e9ba9c6ad47a063e60ae3433 # setup-postgres@0.1.0
3056

3157
- name: Setup DB
58+
if: ${{ matrix.type.should-run == 'true' }}
3259
run: make testdb
60+
working-directory: ./pkg
3361
env:
3462
CL_DATABASE_URL: ${{ env.DB_URL }}
3563

3664
- name: Unit Tests
65+
if: ${{ matrix.type.should-run == 'true' }}
3766
run: GORACE="log_path=$PWD/race" go test -race ./... -coverpkg=./... -coverprofile=coverage.txt
67+
working-directory: ${{ matrix.type.path }}
3868
env:
3969
CL_DATABASE_URL: ${{ env.DB_URL }}
4070

4171
- name: Print Races
42-
if: failure()
72+
if: ${{ matrix.type.should-run == 'true' && failure() }}
4373
run: |
4474
find race.* | xargs cat > race.txt
4575
if [[ -s race.txt ]]; then
4676
cat race.txt
4777
fi
78+
working-directory: ${{ matrix.type.path }}
4879

4980
- name: Upload Go test results
50-
if: always()
81+
if: ${{ matrix.type.should-run == 'true' }}
5182
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
5283
with:
5384
name: go-test-results
5485
path: |
55-
pkg/coverage.txt
56-
pkg/race.*
86+
${{ matrix.type.path }}/pkg/coverage.txt
87+
${{ matrix.type.path }}/pkg/race.*
88+
89+
90+
build-test:
91+
if: always()
92+
needs: [ build-test-matrix ]
93+
runs-on: ubuntu-latest
94+
steps:
95+
- name: Check format statuses and fail if any of them failed or were cancelled
96+
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
97+
run: |
98+
echo "At least one format check failed or was cancelled. Please check the logs."
99+
exit 1
100+
- run: echo 'Success'
57101

58102
check-tidy:
59103
runs-on: ubuntu-latest
60-
defaults:
61-
run:
62-
working-directory: pkg # applied only for "run" steps
63104
steps:
64105
- name: Checkout
65106
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
@@ -72,12 +113,12 @@ jobs:
72113

73114
- name: Ensure gomodtidy has been run
74115
run: |
75-
go mod tidy
116+
make tidy
76117
git add --all
77118
git diff --minimal --cached --exit-code
78119
79120
- name: Ensure "make generate" has been run
80121
run: |
81122
make rm-mocked && make generate
82123
git add --all
83-
git diff --stat --cached --exit-code
124+
git diff --stat --cached --exit-code

.github/workflows/ci-protobuf.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/solidity-foundry.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ jobs:
203203
uses: baptiste0928/cargo-install@904927dbe77864e0f2281519fe9d5bd097a220b3 # v3.1.1
204204
with:
205205
crate: svm-rs
206+
version: '0.5.17'
206207

207208
- name: Find and install all Solc versions with SVM
208209
if: ${{ steps.check-for-solc-version.outputs.has_solc_version == 'false'

.golangci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ linters:
1111
- exhaustive
1212
- fatcontext
1313
- ginkgolinter
14+
- gomoddirectives
1415
- gocritic
1516
- goimports
1617
- gosec
@@ -179,3 +180,4 @@ issues:
179180
- gosec
180181
exclude-files:
181182
- evm/ # need to move files here for evm extraction that have outstanding issues
183+
- pkg/bindings/abigen

CONFIG.md

Lines changed: 63 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ Set to zero to disable.
270270
## Transactions
271271
```toml
272272
[Transactions]
273+
ConfirmationTimeout = '60s' # Default
273274
Enabled = true # Default
274275
ForwardersEnabled = false # Default
275276
MaxInFlight = 16 # Default
@@ -280,6 +281,12 @@ ResendAfterThreshold = '1m' # Default
280281
```
281282

282283

284+
### ConfirmationTimeout
285+
```toml
286+
ConfirmationTimeout = '60s' # Default
287+
```
288+
ConfirmationTimeout time to wait for a TX to get into a block in the blockchain. This is used for the EVMService.SubmitTransaction operation.
289+
283290
### Enabled
284291
```toml
285292
Enabled = true # Default
@@ -796,9 +803,10 @@ the prices and end up in stale values.
796803
HistoryDepth = 100 # Default
797804
MaxBufferSize = 3 # Default
798805
SamplingInterval = '1s' # Default
799-
FinalityTagBypass = true # Default
806+
FinalityTagBypass = false # Default
800807
MaxAllowedFinalityDepth = 10000 # Default
801808
PersistenceEnabled = true # Default
809+
PersistenceBatchSize = 100 # Default
802810
```
803811
The head tracker continually listens for new heads from the chain.
804812

@@ -831,11 +839,10 @@ SamplingInterval means that head tracker callbacks will at maximum be made once
831839

832840
### FinalityTagBypass
833841
```toml
834-
FinalityTagBypass = true # Default
842+
FinalityTagBypass = false # Default
835843
```
836844
FinalityTagBypass disables FinalityTag support in HeadTracker and makes it track blocks up to FinalityDepth from the most recent head.
837-
It should only be used on chains with an extremely large actual finality depth (the number of blocks between the most recent head and the latest finalized block).
838-
Has no effect if `FinalityTagsEnabled` = false
845+
This param is considered deprecated, and should be set to false on all chains
839846

840847
### MaxAllowedFinalityDepth
841848
```toml
@@ -854,6 +861,16 @@ Persistence is helpful on chains with large finality depth, where fetching block
854861
On chains with fast finality, the persistence layer does not improve the chain's load time and only consumes database resources (mainly IO).
855862
NOTE: persistence should not be disabled for products that use LogBroadcaster, as it might lead to missed on-chain events.
856863

864+
### PersistenceBatchSize
865+
```toml
866+
PersistenceBatchSize = 100 # Default
867+
```
868+
PersistenceBatchSize is used to batch head tracker db transactions (inserts and deletes).
869+
If set to 100, the head tracker will insert and delete to the db every 100 heads.
870+
If the head tracker crashes before the batch size is reached (i.e it fails to write the current batch to the db).
871+
Then it will have to load that batch of heads from the rpc on startup (check PersistenceEnabled above).
872+
To limit that initial fetch while also improving db usage, 100 is the default for now.
873+
857874
## KeySpecific
858875
```toml
859876
[[KeySpecific]]
@@ -888,6 +905,7 @@ EnforceRepeatableRead = true # Default
888905
DeathDeclarationDelay = '1m' # Default
889906
NewHeadsPollInterval = '0s' # Default
890907
VerifyChainID = true # Default
908+
ExternalRequestMaxResponseSize = 0 # Default
891909
```
892910
The node pool manages multiple RPC endpoints.
893911

@@ -995,6 +1013,17 @@ VerifyChainID = true # Default
9951013
```
9961014
VerifyChainID enforces RPC Client ChainIDs to match configured ChainID
9971015

1016+
### ExternalRequestMaxResponseSize
1017+
```toml
1018+
ExternalRequestMaxResponseSize = 0 # Default
1019+
```
1020+
ExternalRequestMaxResponseSize sets the maximum allowed size (in bytes) for responses to external requests.
1021+
Responses larger than this value will be rejected to prevent the node from being overloaded.
1022+
Only CRE workflow requests are considered external requests.
1023+
Only applies for RPCs configured with HTTP urls. There is no limit for WS only RPCs, as WS RPCs only allow to define
1024+
global limits that are applied to both internal and external requests.
1025+
Set to 0 to disable the size check and allow responses of any size.
1026+
9981027
## NodePool.Errors
9991028
:warning: **_ADVANCED_**: _Do not change these settings unless you know what you are doing._
10001029
```toml
@@ -1175,6 +1204,7 @@ HTTPURL = 'https://foo.web' # Example
11751204
HTTPURLExtraWrite = 'https://foo.web/extra' # Example
11761205
SendOnly = false # Default
11771206
Order = 100 # Default
1207+
IsLoadBalancedRPC = false # Example
11781208
```
11791209

11801210

@@ -1214,6 +1244,14 @@ Order = 100 # Default
12141244
```
12151245
Order of the node in the pool, will takes effect if `SelectionMode` is `PriorityLevel` or will be used as a tie-breaker for `HighestHead` and `TotalDifficulty`
12161246

1247+
### IsLoadBalancedRPC
1248+
```toml
1249+
IsLoadBalancedRPC = false # Example
1250+
```
1251+
IsLoadBalancedRPC indicates whether the http/ws url above has multiple rpc's behind it.
1252+
If true, we should try reconnecting to the node even when its the only node in the Nodes list.
1253+
If false and its the only node in the nodes list, we will mark it alive even when its out of sync, because it might still be able to send txs.
1254+
12171255
## OCR2.Automation
12181256
```toml
12191257
[OCR2.Automation]
@@ -1233,6 +1271,9 @@ GasLimit controls the gas limit for transmit transactions from ocr2automation jo
12331271
FromAddress = '0x2a3e23c6f242F5345320814aC8a1b4E58707D292' # Example
12341272
ForwarderAddress = '0x2a3e23c6f242F5345320814aC8a1b4E58707D292' # Example
12351273
GasLimitDefault = 400_000 # Default
1274+
TxAcceptanceState = 2 # Default
1275+
PollPeriod = '2s' # Default
1276+
AcceptanceTimeout = '30s' # Default
12361277
```
12371278

12381279

@@ -1254,3 +1295,21 @@ GasLimitDefault = 400_000 # Default
12541295
```
12551296
GasLimitDefault is the default gas limit for workflow transactions.
12561297

1298+
### TxAcceptanceState
1299+
```toml
1300+
TxAcceptanceState = 2 # Default
1301+
```
1302+
TxAcceptanceState is the default acceptance state for writer DON tranmissions.
1303+
1304+
### PollPeriod
1305+
```toml
1306+
PollPeriod = '2s' # Default
1307+
```
1308+
PollPeriod is the default poll period for checking transmission state
1309+
1310+
### AcceptanceTimeout
1311+
```toml
1312+
AcceptanceTimeout = '30s' # Default
1313+
```
1314+
AcceptanceTimeout is the default timeout for a tranmission to be accepted on chain
1315+

0 commit comments

Comments
 (0)