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
28 changes: 28 additions & 0 deletions CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ Set to zero to disable.
## Transactions
```toml
[Transactions]
ConfirmationTimeout = '60s' # Default
Enabled = true # Default
ForwardersEnabled = false # Default
MaxInFlight = 16 # Default
Expand All @@ -280,6 +281,12 @@ ResendAfterThreshold = '1m' # Default
```


### ConfirmationTimeout
```toml
ConfirmationTimeout = '60s' # Default
```
ConfirmationTimeout time to wait for a TX to get into a block in the blockchain. This is used for the EVMService.SubmitTransaction operation.

### Enabled
```toml
Enabled = true # Default
Expand Down Expand Up @@ -1233,6 +1240,9 @@ GasLimit controls the gas limit for transmit transactions from ocr2automation jo
FromAddress = '0x2a3e23c6f242F5345320814aC8a1b4E58707D292' # Example
ForwarderAddress = '0x2a3e23c6f242F5345320814aC8a1b4E58707D292' # Example
GasLimitDefault = 400_000 # Default
TxAcceptanceState = 2 # Default
PollPeriod = '2s' # Default
AcceptanceTimeout = '30s' # Default
```


Expand All @@ -1254,3 +1264,21 @@ GasLimitDefault = 400_000 # Default
```
GasLimitDefault is the default gas limit for workflow transactions.

### TxAcceptanceState
```toml
TxAcceptanceState = 2 # Default
```
TxAcceptanceState is the default acceptance state for writer DON tranmissions.

### PollPeriod
```toml
PollPeriod = '2s' # Default
```
PollPeriod is the default poll period for checking transmission state

### AcceptanceTimeout
```toml
AcceptanceTimeout = '30s' # Default
```
AcceptanceTimeout is the default timeout for a tranmission to be accepted on chain

2 changes: 1 addition & 1 deletion gethwrappers/zksync/go_generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ package gethwrappers
//go:generate go run ../generation/zksync/wrap.go shared WETH9ZKSync weth9_zksync
//go:generate go run ../generation/zksync/wrap.go shared MockV3Aggregator mock_v3_aggregator_contract

//go:generate go run ../generation/zksync/wrap.go automation MockETHUSDAggregator mock_ethusd_aggregator_wrapper
//go:generate go run ../generation/zksync/wrap.go automation MockETHUSDAggregator mock_ethusd_aggregator_wrapper
7 changes: 4 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ require (
github.com/prometheus/client_model v0.6.1
github.com/prometheus/common v0.63.0
github.com/shopspring/decimal v1.4.0
github.com/smartcontractkit/chainlink-common v0.7.1-0.20250618162808-a5a42ee8701b
github.com/smartcontractkit/chainlink-common v0.7.1-0.20250627002929-2cbb7418aaa5
github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250618164021-9b34289a9502
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250616180023-87b70c08d7c0
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250627121608-e7b52913fae2
github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20250618135814-7e3f79ab707e
github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250522110034-65c54665034a
github.com/smartcontractkit/chainlink-protos/svr v1.1.0
Expand Down Expand Up @@ -92,7 +92,7 @@ require (
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.25.0 // indirect
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
github.com/go-viper/mapstructure/v2 v2.3.0 // indirect
github.com/goccy/go-json v0.10.5 // indirect
github.com/gofrs/flock v0.8.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
Expand Down Expand Up @@ -155,6 +155,7 @@ require (
github.com/santhosh-tekuri/jsonschema/v5 v5.2.0 // indirect
github.com/scylladb/go-reflectx v1.0.1 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/smartcontractkit/chainlink-common/pkg/values v0.0.0-20250626141212-e50b2e7ffe2d // indirect
github.com/smartcontractkit/freeport v0.1.1 // indirect
github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 // indirect
github.com/stephenlacy/go-ethereum-hdwallet v0.0.0-20230913225845-a4fa94429863 // indirect
Expand Down
14 changes: 8 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8Wd
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss=
github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
github.com/go-viper/mapstructure/v2 v2.3.0 h1:27XbWsHIqhbdR5TIC911OfYvgSaW93HM+dX7970Q7jk=
github.com/go-viper/mapstructure/v2 v2.3.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4=
github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
Expand Down Expand Up @@ -636,12 +636,14 @@ github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJV
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/smartcontractkit/chainlink-common v0.7.1-0.20250618162808-a5a42ee8701b h1:nS5njF5W9lY1LnTITt3V2M35dT19JPpuVg6//vlzFiU=
github.com/smartcontractkit/chainlink-common v0.7.1-0.20250618162808-a5a42ee8701b/go.mod h1:1ntZ0rtQpPx6h+xlcOJp0ccqHFaxTzW2Z62FJG358q0=
github.com/smartcontractkit/chainlink-common v0.7.1-0.20250627002929-2cbb7418aaa5 h1:ZadFXdmkBFJz3GYPAF20IvtNSHbcRFoLrhCU/LKS9oQ=
github.com/smartcontractkit/chainlink-common v0.7.1-0.20250627002929-2cbb7418aaa5/go.mod h1:mRKPMPyJhg1RBjxtRTL2gHvRhTcZ+nk2Upu/u97Y16M=
github.com/smartcontractkit/chainlink-common/pkg/values v0.0.0-20250626141212-e50b2e7ffe2d h1:86gp4tIXRb6ccSrjcm4gV8iA5wJN6er3rJY9f2UxRLU=
github.com/smartcontractkit/chainlink-common/pkg/values v0.0.0-20250626141212-e50b2e7ffe2d/go.mod h1:QUEPHdSkH19Or+E1iMGG+rDQ6jpCTIbm//9Osa6MXDE=
github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250618164021-9b34289a9502 h1:WLgEB8/lIfA1vI+7O4RE/PYitO57TRkKUqVllDIgJD4=
github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250618164021-9b34289a9502/go.mod h1:Kb8f+wt2YmBdD0PfbsC9bDhdUG/Y8sqUkzAvC2Dn8/M=
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250616180023-87b70c08d7c0 h1:OpFlG2f+LXsDp3cejSQju2rmoNsxBlhgrwXMIsk72IA=
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250616180023-87b70c08d7c0/go.mod h1:X+a4k2a+2G2/yeAaRQMCTLmlhNdQYAeN6v+ZpLzRZww=
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250627121608-e7b52913fae2 h1:WRwVcv2IW59subaJDNl6B+N4OkZiAO7U2e9001XSw7c=
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250627121608-e7b52913fae2/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 pkg/.mockery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ packages:
interfaces:
GasEstimator:
ChainScopedConfig:
EVM:
Workflow:
github.com/smartcontractkit/chainlink-evm/pkg/gas:
interfaces:
Config:
Expand Down
15 changes: 15 additions & 0 deletions pkg/chains/legacyevm/evm_txm.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package legacyevm

import (
"fmt"
"time"

"github.com/smartcontractkit/chainlink-common/pkg/logger"
"github.com/smartcontractkit/chainlink-common/pkg/sqlutil"
Expand Down Expand Up @@ -40,6 +41,11 @@ func newEvmTxm(
"limitDefault", cfg.GasEstimator().LimitDefault(),
)

err = validateConfirmationTimeout(cfg)
if err != nil {
return nil, err
}

if opts.GenTxManager == nil {
var txmv2 txmgr.TxManager
if cfg.Transactions().TransactionManagerV2().Enabled() {
Expand Down Expand Up @@ -80,6 +86,15 @@ func newEvmTxm(
return
}

const maximumConfirmationTimeout = time.Second * 600

func validateConfirmationTimeout(cfg evmconfig.EVM) error {
if cfg.ConfirmationTimeout() > maximumConfirmationTimeout {
return fmt.Errorf("ConfirmationTimeout cannot be greater than 10 minutes, got %s", cfg.ConfirmationTimeout())
}
return nil
}

func newGasEstimator(
cfg evmconfig.EVM,
client evmclient.Client,
Expand Down
1 change: 1 addition & 0 deletions pkg/client/config_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func NewClientConfigs(
noNewFinalizedHeadsThreshold time.Duration,
finalizedBlockPollInterval time.Duration,
newHeadsPollInterval time.Duration,
confirmationTimeout time.Duration,
) (multinode.ChainConfig, evmconfig.NodePool, []*toml.Node, error) {
nodes, err := parseNodeConfigs(nodeCfgs)
if err != nil {
Expand Down
3 changes: 2 additions & 1 deletion pkg/client/config_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func TestClientConfigBuilder(t *testing.T) {
enforceRepeatableRead := ptr(true)
deathDeclarationDelay := time.Second * 3
noNewFinalizedBlocksThreshold := time.Second
confirmationTimeout := time.Second * 60
nodeConfigs := []client.NodeConfig{
{
Name: ptr("foo"),
Expand All @@ -41,7 +42,7 @@ func TestClientConfigBuilder(t *testing.T) {
chainCfg, nodePool, nodes, err := client.NewClientConfigs(selectionMode, leaseDuration, chainTypeStr, nodeConfigs,
pollFailureThreshold, pollInterval, syncThreshold, nodeIsSyncingEnabled, noNewHeadsThreshold, finalityDepth,
finalityTagEnabled, finalizedBlockOffset, enforceRepeatableRead, deathDeclarationDelay, noNewFinalizedBlocksThreshold,
pollInterval, newHeadsPollInterval)
pollInterval, newHeadsPollInterval, confirmationTimeout)
require.NoError(t, err)

// Validate node pool configs
Expand Down
5 changes: 3 additions & 2 deletions pkg/client/evm_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func TestNewEvmClient(t *testing.T) {
noNewFinalizedBlocksThreshold := time.Second * 5
finalizedBlockPollInterval := time.Second * 4
newHeadsPollInterval := time.Second * 4
confirmationTimeout := time.Second * 60
nodeConfigs := []client.NodeConfig{
{
Name: ptr("foo"),
Expand All @@ -51,7 +52,7 @@ func TestNewEvmClient(t *testing.T) {
chainCfg, nodePool, nodes, err := client.NewClientConfigs(selectionMode, leaseDuration, chainTypeStr, nodeConfigs,
pollFailureThreshold, pollInterval, syncThreshold, nodeIsSyncingEnabled, noNewHeadsThreshold, finalityDepth,
finalityTagEnabled, finalizedBlockOffset, enforceRepeatableRead, deathDeclarationDelay, noNewFinalizedBlocksThreshold,
finalizedBlockPollInterval, newHeadsPollInterval)
finalizedBlockPollInterval, newHeadsPollInterval, confirmationTimeout)
require.NoError(t, err)

client, err := client.NewEvmClient(nodePool, chainCfg, nil, logger.Test(t), testutils.FixtureChainID, nodes, chaintype.ChainType(chainTypeStr))
Expand All @@ -77,7 +78,7 @@ func TestChainClientMetrics(t *testing.T) {
}
chainCfg, nodePool, nodes, err := client.NewClientConfigs(ptr("HighestHead"), time.Duration(0), "", nodeConfigs,
ptr[uint32](5), 10*time.Second, ptr[uint32](5), ptr(false), time.Minute, ptr[uint32](5), ptr(false),
ptr[uint32](5), ptr(false), 10*time.Second, 10*time.Second, 10*time.Second, 10*time.Second)
ptr[uint32](5), ptr(false), 10*time.Second, 10*time.Second, 10*time.Second, 10*time.Second, 60*time.Second)
require.NoError(t, err)

chainID := big.NewInt(68472)
Expand Down
4 changes: 4 additions & 0 deletions pkg/config/chain_scoped.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ type EVMConfig struct {
C *toml.EVMConfig
}

func (e *EVMConfig) ConfirmationTimeout() time.Duration {
return e.C.ConfirmationTimeout()
}

func (e *EVMConfig) IsEnabled() bool {
return e.C.IsEnabled()
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ type EVM interface {
NodeNoNewHeadsThreshold() time.Duration
FinalizedBlockOffset() uint32
NoNewFinalizedHeadsThreshold() time.Duration
// Applies to EVMService. This is the maximum amount of time we will wait for a TX to get confirmed in the chain.
ConfirmationTimeout() time.Duration

IsEnabled() bool
TOMLString() (string, error)
Expand Down
Loading
Loading