Skip to content

Commit 4e5f704

Browse files
committed
adding PR feedback
updating go mods
1 parent 80131d7 commit 4e5f704

File tree

20 files changed

+297
-222
lines changed

20 files changed

+297
-222
lines changed

CONFIG.md

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ RPCBlockQueryDelay = 1 # Default
4040
FinalizedBlockOffset = 0 # Default
4141
LogBroadcasterEnabled = true # Default
4242
NoNewFinalizedHeadsThreshold = '0' # Default
43-
TxMinimumWaitTimeForConfirmation = '60s' # Default
44-
TxMaximumWaitTimeForConfirmation = '300s' # Default
4543
```
4644

4745

@@ -269,21 +267,10 @@ out-of-sync. Only applicable if `FinalityTagEnabled=true`
269267

270268
Set to zero to disable.
271269

272-
### TxMinimumWaitTimeForConfirmation
273-
```toml
274-
TxMinimumWaitTimeForConfirmation = '60s' # Default
275-
```
276-
TxMinimumWaitTimeForConfirmation minimum time to wait for a TX to get into a block in the blockchain. This is used for the EVMService.SubmitTransaction operation. It won't check for TX status updates until this time passes
277-
278-
### TxMaximumWaitTimeForConfirmation
279-
```toml
280-
TxMaximumWaitTimeForConfirmation = '300s' # Default
281-
```
282-
TxMaximumWaitTimeForConfirmation time after TxMinimumWaitTimeForConfirmation to wait for a TX to get into a block. After TxMinimumWaitTimeForConfirmation the operation will check every 100 milliseconds to see if the TX gets into a block and will do it for no longer than TxMaximumWaitTimeForConfirmation. Total wait time will be TxMinimumWaitTimeForConfirmation + TxMaximumWaitTimeForConfirmation
283-
284270
## Transactions
285271
```toml
286272
[Transactions]
273+
ConfirmationTimeout = '60s' # Default
287274
Enabled = true # Default
288275
ForwardersEnabled = false # Default
289276
MaxInFlight = 16 # Default
@@ -294,6 +281,12 @@ ResendAfterThreshold = '1m' # Default
294281
```
295282

296283

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+
297290
### Enabled
298291
```toml
299292
Enabled = true # Default

gethwrappers/zksync/go_generate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ package gethwrappers
88
//go:generate go run ../generation/zksync/wrap.go shared WETH9ZKSync weth9_zksync
99
//go:generate go run ../generation/zksync/wrap.go shared MockV3Aggregator mock_v3_aggregator_contract
1010

11-
//go:generate go run ../generation/zksync/wrap.go automation MockETHUSDAggregator mock_ethusd_aggregator_wrapper
11+
//go:generate go run ../generation/zksync/wrap.go automation MockETHUSDAggregator mock_ethusd_aggregator_wrapper

go.mod

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@ require (
2121
github.com/prometheus/client_model v0.6.1
2222
github.com/prometheus/common v0.63.0
2323
github.com/shopspring/decimal v1.4.0
24-
github.com/smartcontractkit/chainlink-common v0.7.1-0.20250618162808-a5a42ee8701b
24+
github.com/smartcontractkit/chainlink-common v0.7.1-0.20250624120719-4492b86d73bf
2525
github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250618164021-9b34289a9502
26-
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250616180023-87b70c08d7c0
26+
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250624120854-3e3761916496
2727
github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20250618135814-7e3f79ab707e
28-
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250617131436-7c15436c29fd
2928
github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250522110034-65c54665034a
3029
github.com/smartcontractkit/chainlink-protos/svr v1.1.0
3130
github.com/smartcontractkit/chainlink-tron/relayer v0.0.11-0.20250528121202-292529af39df

go.sum

Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -636,45 +636,14 @@ github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJV
636636
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
637637
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
638638
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
639-
<<<<<<< HEAD
640-
<<<<<<< HEAD
641-
github.com/smartcontractkit/chainlink-common v0.7.1-0.20250618162808-a5a42ee8701b h1:nS5njF5W9lY1LnTITt3V2M35dT19JPpuVg6//vlzFiU=
642-
github.com/smartcontractkit/chainlink-common v0.7.1-0.20250618162808-a5a42ee8701b/go.mod h1:1ntZ0rtQpPx6h+xlcOJp0ccqHFaxTzW2Z62FJG358q0=
639+
github.com/smartcontractkit/chainlink-common v0.7.1-0.20250624120719-4492b86d73bf h1:c39VNnUvJlxU3D94Wc18doK9buP9x8mdKg4heb2djVY=
640+
github.com/smartcontractkit/chainlink-common v0.7.1-0.20250624120719-4492b86d73bf/go.mod h1:crejZI9ZpBHfhqghQOG9u7Sri7CBzEUYQ/0lVnN60yg=
643641
github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250618164021-9b34289a9502 h1:WLgEB8/lIfA1vI+7O4RE/PYitO57TRkKUqVllDIgJD4=
644642
github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250618164021-9b34289a9502/go.mod h1:Kb8f+wt2YmBdD0PfbsC9bDhdUG/Y8sqUkzAvC2Dn8/M=
645-
=======
646-
github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250522110034-65c54665034a h1:XpT8sAcjUVVD7Tcuxx77rD9g5DXFZu3LFxk59SDmPm0=
647-
github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250522110034-65c54665034a/go.mod h1:NVoJQoPYr6BorpaXTusoIH1IYTySCmanQ8Q1yv3mNh4=
648-
<<<<<<< HEAD
649-
>>>>>>> 545e5a9129 (PLEX-250 - WriteReport initial implementation)
650-
=======
651-
github.com/smartcontractkit/chainlink-common v0.7.1-0.20250617130623-1b825fd1d77e h1:UcF/QDseqx4uwujULxAQ6ai0d3rRXGXU9Vn1LVelils=
652-
github.com/smartcontractkit/chainlink-common v0.7.1-0.20250617130623-1b825fd1d77e/go.mod h1:1ntZ0rtQpPx6h+xlcOJp0ccqHFaxTzW2Z62FJG358q0=
653-
github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250522110034-65c54665034a h1:XpT8sAcjUVVD7Tcuxx77rD9g5DXFZu3LFxk59SDmPm0=
654-
github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250522110034-65c54665034a/go.mod h1:NVoJQoPYr6BorpaXTusoIH1IYTySCmanQ8Q1yv3mNh4=
655-
<<<<<<< HEAD
656-
<<<<<<< HEAD
657-
<<<<<<< HEAD
658-
>>>>>>> e0f33af5de (fixing compilation issue)
659-
=======
660-
<<<<<<< HEAD
661-
>>>>>>> b6687cf564 (fixing test cases and docs)
662-
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250616180023-87b70c08d7c0 h1:OpFlG2f+LXsDp3cejSQju2rmoNsxBlhgrwXMIsk72IA=
663-
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250616180023-87b70c08d7c0/go.mod h1:X+a4k2a+2G2/yeAaRQMCTLmlhNdQYAeN6v+ZpLzRZww=
664-
<<<<<<< HEAD
643+
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250624120854-3e3761916496 h1:U0or8LjW6JOPWN+R2abDwDW18Qj+S/p1xRHyVkmTJ2o=
644+
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250624120854-3e3761916496/go.mod h1:NyUcC8YCEJ0tN5a0nbrsCbkrcEvV0EFa5ECIpjMwps4=
665645
github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20250618135814-7e3f79ab707e h1:LRT+PltY99+hxZAJn+4nyTfqGVNEM1S6FJ675B9BtJo=
666646
github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20250618135814-7e3f79ab707e/go.mod h1:jo+cUqNcHwN8IF7SInQNXDZ8qzBsyMpnLdYbDswviFc=
667-
=======
668-
=======
669-
>>>>>>> a1239ddce6 (PLEX-250 - WriteReport initial implementation)
670-
=======
671-
=======
672-
>>>>>>> 30c81f8ea5 (fixing test cases and docs)
673-
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250617131436-7c15436c29fd h1:7dEEuuLos8YlXI2AsnEfqLwTfUIawSF0WlknsJ4/Eog=
674-
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250617131436-7c15436c29fd/go.mod h1:BLEQYCcR2mSSTdUqGxnvJ3bqwzQN7KjTBG1BDJwaXY4=
675-
github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20250522110034-65c54665034a h1:bFYBcW0cmhq0G8NSjPxSFfL/fVODuhEGluyWOxJTqqk=
676-
github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20250522110034-65c54665034a/go.mod h1:jo+cUqNcHwN8IF7SInQNXDZ8qzBsyMpnLdYbDswviFc=
677-
>>>>>>> 1ea3fe4233 (PLEX-250 - WriteReport initial implementation)
678647
github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250522110034-65c54665034a h1:O28vgyHM7QF1YLg1BwkQSIbOYA+t0RiH9+b+k90GPG8=
679648
github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250522110034-65c54665034a/go.mod h1:zYqPBBRUXUQ/L+aD4Q7phnYsfVeC5rDBXtPt1VYwtws=
680649
github.com/smartcontractkit/chainlink-protos/svr v1.1.0 h1:79Z9N9dMbMVRGaLoDPAQ+vOwbM+Hnx8tIN2xCPG8H4o=

pkg/chains/legacyevm/evm_txm.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func newEvmTxm(
4141
"limitDefault", cfg.GasEstimator().LimitDefault(),
4242
)
4343

44-
err = validateTxWaitTimeForSubmitTransaction(cfg)
44+
err = validateConfirmationTimeout(cfg)
4545
if err != nil {
4646
return nil, err
4747
}
@@ -86,12 +86,11 @@ func newEvmTxm(
8686
return
8787
}
8888

89-
func validateTxWaitTimeForSubmitTransaction(cfg evmconfig.EVM) error {
90-
if cfg.TxMinimumWaitTimeForConfirmation().Seconds() > time.Duration(600).Seconds() {
91-
return fmt.Errorf("txMinimumWaitTimeForConfirmation cannot be greater than 10 minutes, got %s", cfg.TxMinimumWaitTimeForConfirmation())
92-
}
93-
if cfg.TxMinimumWaitTimeForConfirmation()+cfg.TxMaximumWaitTimeForConfirmation() <= time.Duration(600*time.Second) {
94-
return fmt.Errorf("txMaximumWaitTimeForConfirmation cannot be greater than 10 minutes, got %s", cfg.TxMaximumWaitTimeForConfirmation())
89+
const maximumConfirmationTimeout = time.Second * 600
90+
91+
func validateConfirmationTimeout(cfg evmconfig.EVM) error {
92+
if cfg.ConfirmationTimeout() > maximumConfirmationTimeout {
93+
return fmt.Errorf("ConfirmationTimeout cannot be greater than 10 minutes, got %s", cfg.ConfirmationTimeout())
9594
}
9695
return nil
9796
}

pkg/client/config_builder.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func NewClientConfigs(
4545
finalizedBlockPollInterval time.Duration,
4646
newHeadsPollInterval time.Duration,
4747
txMinimumWaitTimeForConfirmation time.Duration,
48-
txMaximumWaitTimeForConfirmation time.Duration,
48+
confirmationTimeout time.Duration,
4949
) (multinode.ChainConfig, evmconfig.NodePool, []*toml.Node, error) {
5050
nodes, err := parseNodeConfigs(nodeCfgs)
5151
if err != nil {
@@ -73,8 +73,6 @@ func NewClientConfigs(
7373
NoNewHeadsThreshold: commonconfig.MustNewDuration(noNewHeadsThreshold),
7474
FinalizedBlockOffset: finalizedBlockOffset,
7575
NoNewFinalizedHeadsThreshold: commonconfig.MustNewDuration(noNewFinalizedHeadsThreshold),
76-
TxMinimumWaitTimeForConfirmation: commonconfig.MustNewDuration(txMinimumWaitTimeForConfirmation),
77-
TxMaximumWaitTimeForConfirmation: commonconfig.MustNewDuration(txMaximumWaitTimeForConfirmation),
7876
},
7977
},
8078
}

pkg/config/chain_scoped.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,10 @@ type EVMConfig struct {
3535
C *toml.EVMConfig
3636
}
3737

38-
func (e *EVMConfig) TxMaximumWaitTimeForConfirmation() time.Duration {
38+
func (e *EVMConfig) ConfirmationTimeout() time.Duration {
3939
return e.C.TxMaximumWaitTimeForConfirmation()
4040
}
4141

42-
func (e *EVMConfig) TxMinimumWaitTimeForConfirmation() time.Duration {
43-
return e.C.TxMaximumWaitTimeForConfirmation()
44-
}
45-
4642
func (e *EVMConfig) IsEnabled() bool {
4743
return e.C.IsEnabled()
4844
}

pkg/config/config.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,8 @@ type EVM interface {
5151
NodeNoNewHeadsThreshold() time.Duration
5252
FinalizedBlockOffset() uint32
5353
NoNewFinalizedHeadsThreshold() time.Duration
54-
// Applies to EVMService. This is the minimum amount of time it takes a TX to get confirmed in the chain. When submitting transaction and waiting for TX confirmation we will wait for at least this amount of time before checking confirmation.
55-
TxMinimumWaitTimeForConfirmation() time.Duration
56-
// Applies to EVMService. This is the maximum amount of time we will wait for a TX to get confirmed in the chain. This duration is added to the TxMinimumWaitTimeForConfiguration parameter to the total time we will wait for a TX to be confirmed.
57-
TxMaximumWaitTimeForConfirmation() time.Duration
54+
// Applies to EVMService. This is the maximum amount of time we will wait for a TX to get confirmed in the chain.
55+
ConfirmationTimeout() time.Duration
5856

5957
IsEnabled() bool
6058
TOMLString() (string, error)

pkg/config/mocks/evm.go

Lines changed: 90 additions & 90 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)