Skip to content

Commit

Permalink
evm: Bump chainlink-common version to commit 6d926be950a6f6ca289a84ed…
Browse files Browse the repository at this point in the history
…ad938d4eef2ee337 (#13612)

* evm: Bump chainlink-common version to commit 6d926be950a6f6ca289a84edad938d4eef2ee337

* evm: Fix tests

* Fix default sorting order in dsl parser to match common test

---------

Co-authored-by: ilija <[email protected]>
  • Loading branch information
nickcorin and ilija42 authored Jun 18, 2024
1 parent 42c74fc commit 9810856
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 23 deletions.
5 changes: 5 additions & 0 deletions .changeset/chilled-panthers-joke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#internal bump `chainlink-common` version to commit 6d926be950a6f6ca289a84edad938d4eef2ee337.
2 changes: 1 addition & 1 deletion core/chains/evm/logpoller/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const (
timestampFieldName = "block_timestamp"
txHashFieldName = "tx_hash"
eventSigFieldName = "event_sig"
defaultSort = "block_number DESC, log_index DESC"
defaultSort = "block_number ASC, log_index ASC"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion core/scripts/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ require (
github.com/prometheus/client_golang v1.17.0
github.com/shopspring/decimal v1.3.1
github.com/smartcontractkit/chainlink-automation v1.0.4
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618130725-a238e16838db
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618152957-6d926be950a6
github.com/smartcontractkit/chainlink-vrf v0.0.0-20240222010609-cd67d123c772
github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000
github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c
Expand Down
4 changes: 2 additions & 2 deletions core/scripts/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1212,8 +1212,8 @@ github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCq
github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE=
github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8=
github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618130725-a238e16838db h1:ShcEAs8w5MYag3ku4Zz+KYeBpDQQQ3T4oTf2muGUbnU=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618130725-a238e16838db/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618152957-6d926be950a6 h1:4N8c0U+oNtdvZHhWmRCtyGHwW3KI7VvSGr5770PNrM4=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618152957-6d926be950a6/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d h1:5tgMC5Gi2UAOKZ+m28W8ubjLeR0pQCAcrz6eQ0rW510=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k=
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo=
Expand Down
8 changes: 4 additions & 4 deletions core/services/relay/evm/chain_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ func (w *chainWriter) GetFeeComponents(ctx context.Context) (*commontypes.ChainF
l1Oracle := w.ge.L1Oracle()
if l1Oracle == nil {
return &commontypes.ChainFeeComponents{
ExecutionFee: *gasPrice,
DataAvailabilityFee: *big.NewInt(0),
ExecutionFee: gasPrice,
DataAvailabilityFee: big.NewInt(0),
}, nil
}
l1OracleFee, err := l1Oracle.GasPrice(ctx)
Expand All @@ -198,8 +198,8 @@ func (w *chainWriter) GetFeeComponents(ctx context.Context) (*commontypes.ChainF
}

return &commontypes.ChainFeeComponents{
ExecutionFee: *gasPrice,
DataAvailabilityFee: *big.NewInt(l1OracleFee.Int64()),
ExecutionFee: gasPrice,
DataAvailabilityFee: big.NewInt(l1OracleFee.Int64()),
}, nil
}

Expand Down
12 changes: 6 additions & 6 deletions core/services/relay/evm/chain_writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,17 @@ func TestChainWriter(t *testing.T) {
t.Run("Returns valid FeeComponents", func(t *testing.T) {
feeComponents, err = cw.GetFeeComponents(ctx)
require.NoError(t, err)
assert.Equal(t, big.NewInt(1000000002), &feeComponents.ExecutionFee)
assert.Equal(t, big.NewInt(1000000004), &feeComponents.DataAvailabilityFee)
assert.Equal(t, big.NewInt(1000000002), feeComponents.ExecutionFee)
assert.Equal(t, big.NewInt(1000000004), feeComponents.DataAvailabilityFee)
})

ge.On("L1Oracle", mock.Anything).Return(nil).Twice()

t.Run("Returns valid FeeComponents with no L1Oracle", func(t *testing.T) {
feeComponents, err = cw.GetFeeComponents(ctx)
require.NoError(t, err)
assert.Equal(t, big.NewInt(1000000002), &feeComponents.ExecutionFee)
assert.Equal(t, big.NewInt(0), &feeComponents.DataAvailabilityFee)
assert.Equal(t, big.NewInt(1000000002), feeComponents.ExecutionFee)
assert.Equal(t, big.NewInt(0), feeComponents.DataAvailabilityFee)
})

t.Run("Returns Legacy Fee in absence of Dynamic Fee", func(t *testing.T) {
Expand All @@ -94,8 +94,8 @@ func TestChainWriter(t *testing.T) {
}, uint64(0), nil).Once()
feeComponents, err = cw.GetFeeComponents(ctx)
require.NoError(t, err)
assert.Equal(t, big.NewInt(1000000001), &feeComponents.ExecutionFee)
assert.Equal(t, big.NewInt(0), &feeComponents.DataAvailabilityFee)
assert.Equal(t, big.NewInt(1000000001), feeComponents.ExecutionFee)
assert.Equal(t, big.NewInt(0), feeComponents.DataAvailabilityFee)
})

t.Run("Fails when neither legacy or dynamic fee is available", func(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ require (
github.com/shopspring/decimal v1.3.1
github.com/smartcontractkit/chain-selectors v1.0.10
github.com/smartcontractkit/chainlink-automation v1.0.4
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618130725-a238e16838db
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618152957-6d926be950a6
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540
github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1171,8 +1171,8 @@ github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCq
github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE=
github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8=
github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618130725-a238e16838db h1:ShcEAs8w5MYag3ku4Zz+KYeBpDQQQ3T4oTf2muGUbnU=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618130725-a238e16838db/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618152957-6d926be950a6 h1:4N8c0U+oNtdvZHhWmRCtyGHwW3KI7VvSGr5770PNrM4=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618152957-6d926be950a6/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d h1:5tgMC5Gi2UAOKZ+m28W8ubjLeR0pQCAcrz6eQ0rW510=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k=
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo=
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ require (
github.com/shopspring/decimal v1.3.1
github.com/slack-go/slack v0.12.2
github.com/smartcontractkit/chainlink-automation v1.0.4
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618130725-a238e16838db
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618152957-6d926be950a6
github.com/smartcontractkit/chainlink-testing-framework v1.30.9
github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868
github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1512,8 +1512,8 @@ github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCq
github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE=
github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8=
github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618130725-a238e16838db h1:ShcEAs8w5MYag3ku4Zz+KYeBpDQQQ3T4oTf2muGUbnU=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618130725-a238e16838db/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618152957-6d926be950a6 h1:4N8c0U+oNtdvZHhWmRCtyGHwW3KI7VvSGr5770PNrM4=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618152957-6d926be950a6/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d h1:5tgMC5Gi2UAOKZ+m28W8ubjLeR0pQCAcrz6eQ0rW510=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k=
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo=
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/load/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require (
github.com/rs/zerolog v1.30.0
github.com/slack-go/slack v0.12.2
github.com/smartcontractkit/chainlink-automation v1.0.4
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618130725-a238e16838db
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618152957-6d926be950a6
github.com/smartcontractkit/chainlink-testing-framework v1.30.9
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240214231432-4ad5eb95178c
github.com/smartcontractkit/chainlink/v2 v2.9.0-beta0.0.20240216210048-da02459ddad8
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/load/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1502,8 +1502,8 @@ github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCq
github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE=
github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8=
github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618130725-a238e16838db h1:ShcEAs8w5MYag3ku4Zz+KYeBpDQQQ3T4oTf2muGUbnU=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618130725-a238e16838db/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618152957-6d926be950a6 h1:4N8c0U+oNtdvZHhWmRCtyGHwW3KI7VvSGr5770PNrM4=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618152957-6d926be950a6/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d h1:5tgMC5Gi2UAOKZ+m28W8ubjLeR0pQCAcrz6eQ0rW510=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k=
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo=
Expand Down

0 comments on commit 9810856

Please sign in to comment.