Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions ccip/config/evm/fallback.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ SamplingInterval = '5s'
FinalityTagBypass = false
MaxAllowedFinalityDepth = 10000
PersistenceEnabled = true
PersistenceBatchSize = 100

[NodePool]
PollFailureThreshold = 5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ func makeTestEvmTxm(t *testing.T, db *sqlx.DB, ethClient client.Client, keyStore
chainID := big.NewInt(1337)
headSaver := heads.NewSaver(
logger.NullLogger,
heads.NewORM(*chainID, db),
heads.NewORM(*chainID, db, 0),
evmConfig,
evmConfig.HeadTrackerConfig,
)
Expand Down Expand Up @@ -715,6 +715,10 @@ func (t *TestHeadTrackerConfig) PersistenceEnabled() bool {
return true
}

func (t *TestHeadTrackerConfig) PersistenceBatchSize() int64 {
return 0
}

var _ evmconfig.HeadTracker = (*TestHeadTrackerConfig)(nil)

type TestEvmConfig struct {
Expand Down
6 changes: 6 additions & 0 deletions core/config/docs/chains-evm.toml
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,12 @@ MaxAllowedFinalityDepth = 10000 # Default
# On chains with fast finality, the persistence layer does not improve the chain's load time and only consumes database resources (mainly IO).
# NOTE: persistence should not be disabled for products that use LogBroadcaster, as it might lead to missed on-chain events.
PersistenceEnabled = true # Default
# PersistenceBatchSize is used to batch head tracker db transactions (inserts and deletes).
# If set to 100, the head tracker will insert and delete to the db every 100 heads.
# If the head tracker crashes before the batch size is reached (i.e it fails to write the current batch to the db).
# Then it will have to load that batch of heads from the rpc on startup (check PersistenceEnabled above).
# To limit that initial fetch while also improving db usage, 100 is the default for now.
PersistenceBatchSize = 100 # Default

[[EVM.KeySpecific]]
# Key is the account to apply these settings to
Expand Down
2 changes: 1 addition & 1 deletion core/internal/cltest/factories.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func MustGenerateRandomKey(t testing.TB) ethkey.KeyV2 {

func MustInsertHead(t *testing.T, ds sqlutil.DataSource, number int64) *evmtypes.Head {
h := evmtypes.NewHead(big.NewInt(number), evmutils.NewHash(), evmutils.NewHash(), ubig.New(&FixtureChainID))
horm := heads.NewORM(FixtureChainID, ds)
horm := heads.NewORM(FixtureChainID, ds, 0)

err := horm.IdempotentInsertHead(testutils.Context(t), &h)
require.NoError(t, err)
Expand Down
4 changes: 2 additions & 2 deletions core/scripts/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ require (
github.com/smartcontractkit/chainlink-common/pkg/values v0.0.0-20250716113058-ebc5e77f06ba
github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250604171706-a98fa6515eae
github.com/smartcontractkit/chainlink-deployments-framework v0.17.2
github.com/smartcontractkit/chainlink-evm v0.0.0-20250716125226-8f70efcc16dd
github.com/smartcontractkit/chainlink-evm v0.0.0-20250717140849-58bcb2816c08
github.com/smartcontractkit/chainlink-testing-framework/framework v0.9.9
github.com/smartcontractkit/chainlink-testing-framework/framework/components/dockercompose v0.1.2
github.com/smartcontractkit/chainlink-testing-framework/lib v1.54.4
Expand Down Expand Up @@ -453,7 +453,7 @@ require (
github.com/smartcontractkit/chainlink-common/pkg/workflows/sdk/v2/pb v0.0.0-20250715132921-fbb00f834ac8 // indirect
github.com/smartcontractkit/chainlink-feeds v0.1.2-0.20250227211209-7cd000095135 // indirect
github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250702183345-3f9ae622e391 // indirect
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250715134218-10b17f312eae // indirect
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250717121125-2350c82883e2 // indirect
github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20250618135814-7e3f79ab707e // indirect
github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250522110034-65c54665034a // indirect
github.com/smartcontractkit/chainlink-protos/billing/go v0.0.0-20250701181457-37bd0d618b58 // indirect
Expand Down
8 changes: 4 additions & 4 deletions core/scripts/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1521,14 +1521,14 @@ github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250604171706-a98fa
github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250604171706-a98fa6515eae/go.mod h1:2MggrMtbhqr0u4U2pcYa21lvAtvaeSawjxdIy1ytHWE=
github.com/smartcontractkit/chainlink-deployments-framework v0.17.2 h1:eJWeT9YAoGQwj8NHqcVI9cFJorLth3N4Clmoh7i503I=
github.com/smartcontractkit/chainlink-deployments-framework v0.17.2/go.mod h1:U4vWLp0dTmYgiN3Y7BXasDfM8NF3ZTIhDo5NjM+7RhQ=
github.com/smartcontractkit/chainlink-evm v0.0.0-20250716125226-8f70efcc16dd h1:7gcjs9EhwyrODjY6XLv5nQLUQ2sO8n0/ZueBRPfyLN0=
github.com/smartcontractkit/chainlink-evm v0.0.0-20250716125226-8f70efcc16dd/go.mod h1:U3GiPMFKEab331vmmqftKXRuMP1do7KPY5+O0qgX50E=
github.com/smartcontractkit/chainlink-evm v0.0.0-20250717140849-58bcb2816c08 h1:CppYDovAiyJz+D14jtaci8wuHnumHTB2lQ68LamGbdg=
github.com/smartcontractkit/chainlink-evm v0.0.0-20250717140849-58bcb2816c08/go.mod h1:c+0Vwbh3whz8SUxRvsYiOkbuQUlK1ckyQ49HTNUjJcI=
github.com/smartcontractkit/chainlink-feeds v0.1.2-0.20250227211209-7cd000095135 h1:8u9xUrC+yHrTDexOKDd+jrA6LCzFFHeX1G82oj2fsSI=
github.com/smartcontractkit/chainlink-feeds v0.1.2-0.20250227211209-7cd000095135/go.mod h1:NkvE4iQgiT7dMCP6U3xPELHhWhN5Xr6rHC0axRebyMU=
github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250702183345-3f9ae622e391 h1:4dUBtClcoG6QHY2JYqkpZ3GLL6DUX6pVP52wb7qVY48=
github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250702183345-3f9ae622e391/go.mod h1:GSz65mYV8hzb8LCRhbhoVn4i3el87nrXTBQE8KF1Qao=
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250715134218-10b17f312eae h1:YMNUE9QbLC//33OzZX+Mxz0NG60pCys8Z5Yb561djWk=
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250715134218-10b17f312eae/go.mod h1:+pRGfDej1r7cHMs1dYmuyPuOZzYB9Q+PKu0FvZOYlmw=
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250717121125-2350c82883e2 h1:JU1JUrkzdAUHsOYdS9DENPkJfmrxweFRPRSztad6oPM=
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250717121125-2350c82883e2/go.mod h1:+pRGfDej1r7cHMs1dYmuyPuOZzYB9Q+PKu0FvZOYlmw=
github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20250618135814-7e3f79ab707e h1:LRT+PltY99+hxZAJn+4nyTfqGVNEM1S6FJ675B9BtJo=
github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20250618135814-7e3f79ab707e/go.mod h1:jo+cUqNcHwN8IF7SInQNXDZ8qzBsyMpnLdYbDswviFc=
github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250522110034-65c54665034a h1:O28vgyHM7QF1YLg1BwkQSIbOYA+t0RiH9+b+k90GPG8=
Expand Down
2 changes: 2 additions & 0 deletions core/services/chainlink/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,7 @@ func TestConfig_Marshal(t *testing.T) {
FinalityTagBypass: ptr[bool](false),
MaxAllowedFinalityDepth: ptr[uint32](1500),
PersistenceEnabled: ptr(false),
PersistenceBatchSize: ptr[int64](100),
},

NodePool: evmcfg.NodePool{
Expand Down Expand Up @@ -1211,6 +1212,7 @@ SamplingInterval = '1h0m0s'
MaxAllowedFinalityDepth = 1500
FinalityTagBypass = false
PersistenceEnabled = false
PersistenceBatchSize = 100

[[EVM.KeySpecific]]
Key = '0x2a3e23c6f242F5345320814aC8a1b4E58707D292'
Expand Down
1 change: 1 addition & 0 deletions core/services/chainlink/testdata/config-full.toml
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ SamplingInterval = '1h0m0s'
MaxAllowedFinalityDepth = 1500
FinalityTagBypass = false
PersistenceEnabled = false
PersistenceBatchSize = 100

[[EVM.KeySpecific]]
Key = '0x2a3e23c6f242F5345320814aC8a1b4E58707D292'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ SamplingInterval = '1s'
MaxAllowedFinalityDepth = 10000
FinalityTagBypass = false
PersistenceEnabled = false
PersistenceBatchSize = 100

[EVM.NodePool]
PollFailureThreshold = 5
Expand Down Expand Up @@ -544,6 +545,7 @@ SamplingInterval = '1s'
MaxAllowedFinalityDepth = 10000
FinalityTagBypass = false
PersistenceEnabled = true
PersistenceBatchSize = 100

[EVM.NodePool]
PollFailureThreshold = 5
Expand Down Expand Up @@ -658,6 +660,7 @@ SamplingInterval = '1s'
MaxAllowedFinalityDepth = 10000
FinalityTagBypass = false
PersistenceEnabled = true
PersistenceBatchSize = 100

[EVM.NodePool]
PollFailureThreshold = 5
Expand Down
2 changes: 1 addition & 1 deletion core/services/vrf/delegate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func buildVrfUni(t *testing.T, db *sqlx.DB, cfg chainlink.GeneralConfig) vrfUniv
_, dbConfig, evmConfig := txmgr.MakeTestConfigs(t)
evmKs := keys.NewChainStore(keystore.NewEthSigner(ks.Eth(), ec.ConfiguredChainID()), ec.ConfiguredChainID())
txm, err := txmgr.NewTxm(db, evmConfig, evmConfig.GasEstimator(), evmConfig.Transactions(), nil, dbConfig, dbConfig.Listener(), ec, logger.TestLogger(t), nil, evmKs, nil, nil, nil)
orm := heads.NewORM(*testutils.FixtureChainID, db)
orm := heads.NewORM(*testutils.FixtureChainID, db, 0)
require.NoError(t, orm.IdempotentInsertHead(testutils.Context(t), cltest.Head(51)))
jrm := job.NewORM(db, prm, btORM, ks, lggr)
t.Cleanup(func() { assert.NoError(t, jrm.Close()) })
Expand Down
1 change: 1 addition & 0 deletions core/web/resolver/testdata/config-full.toml
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ SamplingInterval = '1h0m0s'
MaxAllowedFinalityDepth = 10000
FinalityTagBypass = false
PersistenceEnabled = false
PersistenceBatchSize = 100

[[EVM.KeySpecific]]
Key = '0x2a3e23c6f242F5345320814aC8a1b4E58707D292'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ SamplingInterval = '1s'
MaxAllowedFinalityDepth = 10000
FinalityTagBypass = false
PersistenceEnabled = false
PersistenceBatchSize = 100

[EVM.NodePool]
PollFailureThreshold = 5
Expand Down Expand Up @@ -544,6 +545,7 @@ SamplingInterval = '1s'
MaxAllowedFinalityDepth = 10000
FinalityTagBypass = false
PersistenceEnabled = true
PersistenceBatchSize = 100

[EVM.NodePool]
PollFailureThreshold = 5
Expand Down Expand Up @@ -658,6 +660,7 @@ SamplingInterval = '1s'
MaxAllowedFinalityDepth = 10000
FinalityTagBypass = false
PersistenceEnabled = true
PersistenceBatchSize = 100

[EVM.NodePool]
PollFailureThreshold = 5
Expand Down
4 changes: 2 additions & 2 deletions deployment/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ require (
github.com/smartcontractkit/chainlink-common v0.8.1-0.20250716155550-5a0b5ac522b2
github.com/smartcontractkit/chainlink-common/pkg/values v0.0.0-20250716113058-ebc5e77f06ba
github.com/smartcontractkit/chainlink-deployments-framework v0.17.2
github.com/smartcontractkit/chainlink-evm v0.0.0-20250716125226-8f70efcc16dd
github.com/smartcontractkit/chainlink-evm v0.0.0-20250717140849-58bcb2816c08
github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250522110034-65c54665034a
github.com/smartcontractkit/chainlink-protos/job-distributor v0.13.1
github.com/smartcontractkit/chainlink-protos/orchestrator v0.8.1
Expand Down Expand Up @@ -383,7 +383,7 @@ require (
github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250604171706-a98fa6515eae // indirect
github.com/smartcontractkit/chainlink-feeds v0.1.2-0.20250227211209-7cd000095135 // indirect
github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250702183345-3f9ae622e391 // indirect
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250715134218-10b17f312eae // indirect
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250717121125-2350c82883e2 // indirect
github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20250618135814-7e3f79ab707e // indirect
github.com/smartcontractkit/chainlink-protos/billing/go v0.0.0-20250701181457-37bd0d618b58 // indirect
github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-15e0d4cde2a6 // indirect
Expand Down
8 changes: 4 additions & 4 deletions deployment/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1271,14 +1271,14 @@ github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250604171706-a98fa
github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250604171706-a98fa6515eae/go.mod h1:2MggrMtbhqr0u4U2pcYa21lvAtvaeSawjxdIy1ytHWE=
github.com/smartcontractkit/chainlink-deployments-framework v0.17.2 h1:eJWeT9YAoGQwj8NHqcVI9cFJorLth3N4Clmoh7i503I=
github.com/smartcontractkit/chainlink-deployments-framework v0.17.2/go.mod h1:U4vWLp0dTmYgiN3Y7BXasDfM8NF3ZTIhDo5NjM+7RhQ=
github.com/smartcontractkit/chainlink-evm v0.0.0-20250716125226-8f70efcc16dd h1:7gcjs9EhwyrODjY6XLv5nQLUQ2sO8n0/ZueBRPfyLN0=
github.com/smartcontractkit/chainlink-evm v0.0.0-20250716125226-8f70efcc16dd/go.mod h1:U3GiPMFKEab331vmmqftKXRuMP1do7KPY5+O0qgX50E=
github.com/smartcontractkit/chainlink-evm v0.0.0-20250717140849-58bcb2816c08 h1:CppYDovAiyJz+D14jtaci8wuHnumHTB2lQ68LamGbdg=
github.com/smartcontractkit/chainlink-evm v0.0.0-20250717140849-58bcb2816c08/go.mod h1:c+0Vwbh3whz8SUxRvsYiOkbuQUlK1ckyQ49HTNUjJcI=
github.com/smartcontractkit/chainlink-feeds v0.1.2-0.20250227211209-7cd000095135 h1:8u9xUrC+yHrTDexOKDd+jrA6LCzFFHeX1G82oj2fsSI=
github.com/smartcontractkit/chainlink-feeds v0.1.2-0.20250227211209-7cd000095135/go.mod h1:NkvE4iQgiT7dMCP6U3xPELHhWhN5Xr6rHC0axRebyMU=
github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250702183345-3f9ae622e391 h1:4dUBtClcoG6QHY2JYqkpZ3GLL6DUX6pVP52wb7qVY48=
github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250702183345-3f9ae622e391/go.mod h1:GSz65mYV8hzb8LCRhbhoVn4i3el87nrXTBQE8KF1Qao=
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250715134218-10b17f312eae h1:YMNUE9QbLC//33OzZX+Mxz0NG60pCys8Z5Yb561djWk=
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250715134218-10b17f312eae/go.mod h1:+pRGfDej1r7cHMs1dYmuyPuOZzYB9Q+PKu0FvZOYlmw=
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250717121125-2350c82883e2 h1:JU1JUrkzdAUHsOYdS9DENPkJfmrxweFRPRSztad6oPM=
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250717121125-2350c82883e2/go.mod h1:+pRGfDej1r7cHMs1dYmuyPuOZzYB9Q+PKu0FvZOYlmw=
github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20250618135814-7e3f79ab707e h1:LRT+PltY99+hxZAJn+4nyTfqGVNEM1S6FJ675B9BtJo=
github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20250618135814-7e3f79ab707e/go.mod h1:jo+cUqNcHwN8IF7SInQNXDZ8qzBsyMpnLdYbDswviFc=
github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250522110034-65c54665034a h1:O28vgyHM7QF1YLg1BwkQSIbOYA+t0RiH9+b+k90GPG8=
Expand Down
Loading
Loading