Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f6065bc
bump geth v1.15.7
jmank88 Apr 3, 2025
74ac754
make generate
jmank88 Apr 3, 2025
8f57ec4
bumped chainlink-integration
Unheilbar Apr 8, 2025
8e6bedf
fix dependency
Unheilbar Apr 8, 2025
79ebd90
update chainID
Unheilbar Apr 8, 2025
061385b
fix test chain id assert
Unheilbar Apr 8, 2025
19816e9
Merge branch 'develop' into geth-v1.15.7_
Unheilbar Apr 8, 2025
68059ed
bumped cl-integration & multinode
Unheilbar Apr 8, 2025
0861563
fix hardcoded chainId in job spec
Unheilbar Apr 8, 2025
4df2c68
Merge branch 'develop' into geth-v1.15.7_
Unheilbar Apr 8, 2025
62b429f
fx chainID hardcoded
Unheilbar Apr 8, 2025
1ebb612
fix another hardcoded chainId...
Unheilbar Apr 8, 2025
92cfb86
updte hardcoded chain ID
Unheilbar Apr 8, 2025
4209f6a
fix ardcoded chain id
Unheilbar Apr 8, 2025
8b26901
fix hardcoded chainId in asserts
Unheilbar Apr 8, 2025
c3fb04b
fix factory for tx
Unheilbar Apr 8, 2025
4f6ba53
fix txmgr tests
Unheilbar Apr 8, 2025
3971a49
fix tests in txmgr
Unheilbar Apr 8, 2025
160cdd3
Merge branch 'develop' into geth-v1.15.7_
Unheilbar Apr 9, 2025
960bffe
resolve conflicts
Unheilbar Apr 9, 2025
8c58f20
rm chainlink-integrations deps
Unheilbar Apr 9, 2025
38d1715
update default chain id
Unheilbar Apr 9, 2025
bc4c45f
update fixtures for health report
Unheilbar Apr 9, 2025
6e91993
fix direct request specs
Unheilbar Apr 9, 2025
5829693
update OCR spec
Unheilbar Apr 9, 2025
11faa32
fix tests for /services/job/
Unheilbar Apr 9, 2025
431276a
fix cmd tests
Unheilbar Apr 9, 2025
a1e3edf
fix headreporter asserts
Unheilbar Apr 9, 2025
a74ffa3
fix pipeline
Unheilbar Apr 9, 2025
bbb4194
rm default override
Unheilbar Apr 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions core/chains/evm/log/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
"github.com/smartcontractkit/chainlink-evm/pkg/testutils"
evmtypes "github.com/smartcontractkit/chainlink-evm/pkg/types"
"github.com/smartcontractkit/chainlink-evm/pkg/utils"
ubig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/log"
logmocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/log/mocks"
"github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm"
Expand Down Expand Up @@ -1668,6 +1669,7 @@ func newBroadcasterHelperWithEthClient(t *testing.T, ethClient evmclient.Client,
c.Database.LogQueries = ptr(true)
finality := uint32(10)
c.EVM[0].FinalityDepth = &finality
c.EVM[0].ChainID = ubig.New(testutils.FixtureChainID)

if overridesFn != nil {
overridesFn(c, s)
Expand Down
17 changes: 15 additions & 2 deletions core/chains/evm/txmgr/broadcaster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import (
"github.com/smartcontractkit/chainlink-evm/pkg/keys/keystest"
"github.com/smartcontractkit/chainlink-evm/pkg/testutils"
evmtypes "github.com/smartcontractkit/chainlink-evm/pkg/types"
ubig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr"
"github.com/smartcontractkit/chainlink/v2/core/internal/cltest"
)
Expand Down Expand Up @@ -247,6 +248,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Success(t *testing.T) {
InitialBroadcastAt: &timeNow,
Error: null.String{},
State: txmgrcommon.TxUnconfirmed,
ChainID: testutils.FixtureChainID,
}
etxWithError := txmgr.Tx{
Sequence: nil,
Expand All @@ -257,6 +259,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Success(t *testing.T) {
FeeLimit: gasLimit,
Error: null.StringFrom(errStr),
State: txmgrcommon.TxFatalError,
ChainID: testutils.FixtureChainID,
}

require.NoError(t, txStore.InsertTx(ctx, &etxUnconfirmed))
Expand All @@ -277,6 +280,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Success(t *testing.T) {
FeeLimit: gasLimit,
CreatedAt: time.Unix(0, 0),
State: txmgrcommon.TxUnstarted,
ChainID: testutils.FixtureChainID,
}
ethClient.On("SendTransactionReturnCode", mock.Anything, mock.MatchedBy(func(tx *gethTypes.Transaction) bool {
return tx.Nonce() == uint64(2) && tx.Value().Cmp(big.NewInt(242)) == 0
Expand All @@ -296,6 +300,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Success(t *testing.T) {
CreatedAt: time.Unix(0, 1),
State: txmgrcommon.TxUnstarted,
Meta: &meta,
ChainID: testutils.FixtureChainID,
}
ethClient.On("SendTransactionReturnCode", mock.Anything, mock.MatchedBy(func(tx *gethTypes.Transaction) bool {
if tx.Nonce() != uint64(0) {
Expand All @@ -319,6 +324,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Success(t *testing.T) {
FeeLimit: gasLimit,
CreatedAt: time.Unix(1, 0),
State: txmgrcommon.TxUnstarted,
ChainID: testutils.FixtureChainID,
}
ethClient.On("SendTransactionReturnCode", mock.Anything, mock.MatchedBy(func(tx *gethTypes.Transaction) bool {
if tx.Nonce() != uint64(1) {
Expand Down Expand Up @@ -400,6 +406,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Success(t *testing.T) {

rnd := int64(1000000000 + rand.Intn(5000))
evmcfg = configtest.NewChainScopedConfig(t, func(c *toml.EVMConfig) {
c.ChainID = ubig.New(testutils.FixtureChainID)
c.GasEstimator.EIP1559DynamicFees = ptr(true)
c.GasEstimator.TipCapDefault = assets.NewWeiI(rnd)
c.GasEstimator.FeeCapDefault = assets.NewWeiI(rnd + 1)
Expand Down Expand Up @@ -1153,6 +1160,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) {
State: txmgrcommon.TxUnstarted,
PipelineTaskRunID: uuid.NullUUID{UUID: tr.ID, Valid: true},
SignalCallback: true,
ChainID: testutils.FixtureChainID,
}

t.Run("with erroring callback bails out", func(t *testing.T) {
Expand Down Expand Up @@ -1453,6 +1461,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) {
Value: value,
FeeLimit: gasLimit,
State: txmgrcommon.TxUnstarted,
ChainID: testutils.FixtureChainID,
}
require.NoError(t, txStore.InsertTx(ctx, &etxUnfinished))

Expand Down Expand Up @@ -1525,6 +1534,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) {
evmcfg := configtest.NewChainScopedConfig(t, func(c *toml.EVMConfig) {
c.GasEstimator.BumpMin = assets.NewWeiI(0)
c.GasEstimator.BumpPercent = ptr[uint16](0)
c.ChainID = ubig.New(testutils.FixtureChainID)
})
eb2 := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, dbListenerCfg, evmcfg.EVM(), &testCheckerFactory{}, false, nonceTracker)
mustCreateUnstartedTx(t, txStore, fromAddress, toAddress, encodedPayload, gasLimit, value, testutils.FixtureChainID)
Expand Down Expand Up @@ -1612,6 +1622,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) {
// to zero (even though that should not be possible due to config
// validation)
evmcfg := configtest.NewChainScopedConfig(t, func(c *toml.EVMConfig) {
c.ChainID = ubig.New(testutils.FixtureChainID)
c.GasEstimator.EIP1559DynamicFees = ptr(true)
c.GasEstimator.BumpMin = assets.NewWeiI(0)
c.GasEstimator.BumpPercent = ptr[uint16](0)
Expand Down Expand Up @@ -1647,6 +1658,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) {
evmcfg := configtest.NewChainScopedConfig(t, func(c *toml.EVMConfig) {
c.GasEstimator.EIP1559DynamicFees = ptr(true)
c.GasEstimator.TipCapDefault = gasTipCapDefault
c.ChainID = ubig.New(testutils.FixtureChainID)
})
localNextNonce := getLocalNextNonce(t, nonceTracker, fromAddress)
ethClient.On("NonceAt", mock.Anything, fromAddress, mock.Anything).Return(localNextNonce, nil).Once()
Expand Down Expand Up @@ -1692,6 +1704,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_GasEstimationError(t *testing.T)
config := configtest.NewChainScopedConfig(t, func(c *toml.EVMConfig) {
c.GasEstimator.EstimateLimit = ptr(true) // Enabled gas limit estimation
c.GasEstimator.LimitMultiplier = ptr(decimal.NewFromFloat32(limitMultiplier)) // Set LimitMultiplier for the buffer
c.ChainID = ubig.New(testutils.FixtureChainID)
})
ethClient.On("NonceAt", mock.Anything, fromAddress, mock.Anything).Return(uint64(0), nil).Once()
lggr := logger.Test(t)
Expand Down Expand Up @@ -1859,7 +1872,7 @@ func TestEthBroadcaster_NonceTracker_InProgressTx(t *testing.T) {
txStore := cltest.NewTestTxStore(t, db)
memKS := keystest.NewMemoryChainStore()
fromAddress := memKS.MustCreate(t)
ethKeyStore := keys.NewChainStore(memKS, big.NewInt(0))
ethKeyStore := keys.NewChainStore(memKS, testutils.FixtureChainID)

ethClient := clienttest.NewClientWithDefaultChainID(t)
evmcfg := configtest.NewChainScopedConfig(t, nil)
Expand Down Expand Up @@ -1897,7 +1910,7 @@ func TestEthBroadcaster_HederaBroadcastValidation(t *testing.T) {
db := testutils.NewSqlxDB(t)
txStore := cltest.NewTestTxStore(t, db)
memKS := keystest.NewMemoryChainStore()
ethKeyStore := keys.NewChainStore(memKS, big.NewInt(0))
ethKeyStore := keys.NewChainStore(memKS, testutils.FixtureChainID)
evmcfg := configtest.NewChainScopedConfig(t, nil)
ethClient := clienttest.NewClientWithDefaultChainID(t)
lggr, observed := logger.TestObserved(t, zapcore.DebugLevel)
Expand Down
2 changes: 2 additions & 0 deletions core/chains/evm/txmgr/confirmer_benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/smartcontractkit/chainlink-evm/pkg/keys/keystest"
"github.com/smartcontractkit/chainlink-evm/pkg/testutils"
evmtypes "github.com/smartcontractkit/chainlink-evm/pkg/types"
ubig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big"
txmgrcommon "github.com/smartcontractkit/chainlink-framework/chains/txmgr"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
Expand All @@ -25,6 +26,7 @@ func BenchmarkEthConfirmer(b *testing.B) {
ethClient := clienttest.NewClientWithDefaultChainID(b)
evmcfg := configtest.NewChainScopedConfig(b, func(c *toml.EVMConfig) {
c.GasEstimator.PriceMax = assets.GWei(500)
c.ChainID = ubig.New(testutils.FixtureChainID)
})

blockNum := int64(100)
Expand Down
7 changes: 5 additions & 2 deletions core/chains/evm/txmgr/confirmer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"github.com/smartcontractkit/chainlink-common/pkg/utils/tests"
"github.com/smartcontractkit/chainlink-evm/pkg/keys"
"github.com/smartcontractkit/chainlink-evm/pkg/keys/keystest"
ubig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big"
"github.com/smartcontractkit/chainlink-framework/chains/fees"
txmgrcommon "github.com/smartcontractkit/chainlink-framework/chains/txmgr"
txmgrtypes "github.com/smartcontractkit/chainlink-framework/chains/txmgr/types"
Expand Down Expand Up @@ -1280,10 +1281,11 @@ func TestEthConfirmer_RebroadcastWhereNecessary_TerminallyUnderpriced_ThenGoesTh

memKS := keystest.NewMemoryChainStore()
fromAddress := memKS.MustCreate(t)
kst := keys.NewChainStore(memKS, big.NewInt(0))
kst := keys.NewChainStore(memKS, testutils.FixtureChainID)

evmcfg := configtest.NewChainScopedConfig(t, func(c *toml.EVMConfig) {
c.GasEstimator.PriceMax = assets.GWei(500)
c.ChainID = ubig.New(testutils.FixtureChainID)
})

currentHead := int64(30)
Expand Down Expand Up @@ -1546,7 +1548,7 @@ func TestEthConfirmer_ForceRebroadcast(t *testing.T) {
memKS := keystest.NewMemoryChainStore()
fromAddress := memKS.MustCreate(t)
config := configtest.NewChainScopedConfig(t, nil)
ethKeyStore := keys.NewChainStore(memKS, big.NewInt(0))
ethKeyStore := keys.NewChainStore(memKS, testutils.FixtureChainID)

mustCreateUnstartedGeneratedTx(t, txStore, fromAddress, config.EVM().ChainID())
mustInsertInProgressEthTx(t, txStore, 0, fromAddress)
Expand Down Expand Up @@ -1665,6 +1667,7 @@ func TestEthConfirmer_ProcessStuckTransactions(t *testing.T) {
c.Transactions.AutoPurge.Enabled = ptr(true)
c.Transactions.AutoPurge.Threshold = ptr(autoPurgeThreshold)
c.Transactions.AutoPurge.MinAttempts = ptr(autoPurgeMinAttempts)
c.ChainID = ubig.New(testutils.FixtureChainID)
})
ge := evmcfg.EVM().GasEstimator()
txBuilder := txmgr.NewEvmTxAttemptBuilder(*ethClient.ConfiguredChainID(), ge, ethKeyStore, feeEstimator)
Expand Down
6 changes: 4 additions & 2 deletions core/chains/evm/txmgr/evm_tx_store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -673,11 +673,11 @@ func Test_FindTxWithIdempotencyKey(t *testing.T) {
t.Run("returns transaction if it exists", func(t *testing.T) {
idempotencyKey := "777"
cfg.EVM().ChainID()
etx := mustCreateUnstartedGeneratedTx(t, txStore, fromAddress, big.NewInt(0),
etx := mustCreateUnstartedGeneratedTx(t, txStore, fromAddress, testutils.FixtureChainID,
txRequestWithIdempotencyKey(idempotencyKey))
require.Equal(t, idempotencyKey, *etx.IdempotencyKey)

res, err := txStore.FindTxWithIdempotencyKey(tests.Context(t), idempotencyKey, big.NewInt(0))
res, err := txStore.FindTxWithIdempotencyKey(tests.Context(t), idempotencyKey, testutils.FixtureChainID)
require.NoError(t, err)
assert.Equal(t, etx.Sequence, res.Sequence)
require.Equal(t, idempotencyKey, *res.IdempotencyKey)
Expand Down Expand Up @@ -1860,6 +1860,7 @@ func TestORM_UpdateTxStatesToFinalizedUsingTxHashes(t *testing.T) {
State: txmgrcommon.TxConfirmed,
BroadcastAt: &broadcast,
InitialBroadcastAt: &broadcast,
ChainID: testutils.FixtureChainID,
}
err := txStore.InsertTx(ctx, tx)
require.NoError(t, err)
Expand Down Expand Up @@ -2063,6 +2064,7 @@ func mustInsertTerminallyStuckTxWithAttempt(t testing.TB, txStore txmgr.TestEvmT
BroadcastAt: &broadcast,
InitialBroadcastAt: &broadcast,
Error: null.StringFrom(client.TerminallyStuckMsg),
ChainID: testutils.FixtureChainID,
}
require.NoError(t, txStore.InsertTx(ctx, &tx))
attempt := cltest.NewLegacyEthTxAttempt(t, tx.ID)
Expand Down
5 changes: 5 additions & 0 deletions core/chains/evm/txmgr/finalizer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ func TestFinalizer_MarkTxFinalized(t *testing.T) {
State: txmgrcommon.TxConfirmed,
BroadcastAt: &broadcast,
InitialBroadcastAt: &broadcast,
ChainID: testutils.FixtureChainID,
}
attemptHash := insertTxAndAttemptWithIdempotencyKey(t, txStore, tx, idempotencyKey)
// Insert receipt for unfinalized block num
Expand Down Expand Up @@ -107,6 +108,7 @@ func TestFinalizer_MarkTxFinalized(t *testing.T) {
State: txmgrcommon.TxConfirmed,
BroadcastAt: &broadcast,
InitialBroadcastAt: &broadcast,
ChainID: testutils.FixtureChainID,
}
attemptHash := insertTxAndAttemptWithIdempotencyKey(t, txStore, tx, idempotencyKey)
// Insert receipt for finalized block num
Expand Down Expand Up @@ -139,6 +141,7 @@ func TestFinalizer_MarkTxFinalized(t *testing.T) {
State: txmgrcommon.TxConfirmed,
BroadcastAt: &broadcast,
InitialBroadcastAt: &broadcast,
ChainID: testutils.FixtureChainID,
}
attemptHash := insertTxAndAttemptWithIdempotencyKey(t, txStore, tx, idempotencyKey)
// Insert receipt for finalized block num
Expand Down Expand Up @@ -169,6 +172,7 @@ func TestFinalizer_MarkTxFinalized(t *testing.T) {
State: txmgrcommon.TxConfirmed,
BroadcastAt: &broadcast,
InitialBroadcastAt: &broadcast,
ChainID: testutils.FixtureChainID,
}
attemptHash := insertTxAndAttemptWithIdempotencyKey(t, txStore, tx, idempotencyKey)
// Insert receipt for finalized block num
Expand All @@ -185,6 +189,7 @@ func TestFinalizer_MarkTxFinalized(t *testing.T) {
State: txmgrcommon.TxConfirmed,
BroadcastAt: &broadcast,
InitialBroadcastAt: &broadcast,
ChainID: testutils.FixtureChainID,
}
attemptHash = insertTxAndAttemptWithIdempotencyKey(t, txStore, tx, idempotencyKey)
// Insert receipt for finalized block num
Expand Down
6 changes: 3 additions & 3 deletions core/chains/evm/txmgr/resender_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func Test_EthResender_resendUnconfirmed(t *testing.T) {
fromAddress := memKS.MustCreate(t)
fromAddress2 := memKS.MustCreate(t)
fromAddress3 := memKS.MustCreate(t)
ethKeyStore := keys.NewChainStore(memKS, big.NewInt(0))
ethKeyStore := keys.NewChainStore(memKS, testutils.FixtureChainID)

txStore := cltest.NewTestTxStore(t, db)

Expand Down Expand Up @@ -108,7 +108,7 @@ func Test_EthResender_alertUnconfirmed(t *testing.T) {
ethClient := clienttest.NewClientWithDefaultChainID(t)
memKS := keystest.NewMemoryChainStore()
fromAddress := memKS.MustCreate(t)
ethKeyStore := keys.NewChainStore(memKS, big.NewInt(0))
ethKeyStore := keys.NewChainStore(memKS, testutils.FixtureChainID)

ethClient.On("IsL2").Return(false).Maybe()
// Set this to the smallest non-zero value possible for the attempt to be eligible for resend
Expand Down Expand Up @@ -153,7 +153,7 @@ func Test_EthResender_Start(t *testing.T) {
txStore := cltest.NewTestTxStore(t, db)
memKS := keystest.NewMemoryChainStore()
fromAddress := memKS.MustCreate(t)
ethKeyStore := keys.NewChainStore(memKS, big.NewInt(0))
ethKeyStore := keys.NewChainStore(memKS, testutils.FixtureChainID)
lggr := logger.Test(t)

t.Run("resends transactions that have been languishing unconfirmed for too long", func(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion core/chains/evm/txmgr/tracker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
func newTestEvmTrackerSetup(t *testing.T) (*txmgr.Tracker, txmgr.TestEvmTxStore) {
db := testutils.NewSqlxDB(t)
txStore := cltest.NewTestTxStore(t, db)
chainID := big.NewInt(0)
chainID := testutils.FixtureChainID
ethKeyStore := cltest.NewKeyStore(t, db).Eth()
var enabledAddresses []common.Address
_, addr1 := cltest.MustInsertRandomKey(t, ethKeyStore, *ubig.NewI(chainID.Int64()))
Expand Down
Loading
Loading