Skip to content

Commit 80131d7

Browse files
committed
fixing test cases and docs
1 parent 5e3bff5 commit 80131d7

File tree

9 files changed

+33
-22
lines changed

9 files changed

+33
-22
lines changed

CONFIG.md

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

4547

@@ -267,6 +269,18 @@ out-of-sync. Only applicable if `FinalityTagEnabled=true`
267269

268270
Set to zero to disable.
269271

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+
270284
## Transactions
271285
```toml
272286
[Transactions]

go.sum

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,11 @@ github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-202505221100
654654
github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250522110034-65c54665034a/go.mod h1:NVoJQoPYr6BorpaXTusoIH1IYTySCmanQ8Q1yv3mNh4=
655655
<<<<<<< HEAD
656656
<<<<<<< HEAD
657+
<<<<<<< HEAD
657658
>>>>>>> e0f33af5de (fixing compilation issue)
659+
=======
660+
<<<<<<< HEAD
661+
>>>>>>> b6687cf564 (fixing test cases and docs)
658662
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250616180023-87b70c08d7c0 h1:OpFlG2f+LXsDp3cejSQju2rmoNsxBlhgrwXMIsk72IA=
659663
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250616180023-87b70c08d7c0/go.mod h1:X+a4k2a+2G2/yeAaRQMCTLmlhNdQYAeN6v+ZpLzRZww=
660664
<<<<<<< HEAD
@@ -664,9 +668,10 @@ github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20250618135814-7e
664668
=======
665669
>>>>>>> a1239ddce6 (PLEX-250 - WriteReport initial implementation)
666670
=======
671+
=======
672+
>>>>>>> 30c81f8ea5 (fixing test cases and docs)
667673
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250617131436-7c15436c29fd h1:7dEEuuLos8YlXI2AsnEfqLwTfUIawSF0WlknsJ4/Eog=
668674
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250617131436-7c15436c29fd/go.mod h1:BLEQYCcR2mSSTdUqGxnvJ3bqwzQN7KjTBG1BDJwaXY4=
669-
>>>>>>> c31efa585b (fixing compilation issue)
670675
github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20250522110034-65c54665034a h1:bFYBcW0cmhq0G8NSjPxSFfL/fVODuhEGluyWOxJTqqk=
671676
github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20250522110034-65c54665034a/go.mod h1:jo+cUqNcHwN8IF7SInQNXDZ8qzBsyMpnLdYbDswviFc=
672677
>>>>>>> 1ea3fe4233 (PLEX-250 - WriteReport initial implementation)

pkg/client/config_builder_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func TestClientConfigBuilder(t *testing.T) {
2828
deathDeclarationDelay := time.Second * 3
2929
noNewFinalizedBlocksThreshold := time.Second
3030
txMinimumWaitTimeForConfirmation := time.Second * 60
31-
txMaximumWaitTimeForConfirmation := time.Second * 20
31+
txMaximumWaitTimeForConfirmation := time.Second * 300
3232
nodeConfigs := []client.NodeConfig{
3333
{
3434
Name: ptr("foo"),

pkg/client/evm_client_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func TestNewEvmClient(t *testing.T) {
4040
finalizedBlockPollInterval := time.Second * 4
4141
newHeadsPollInterval := time.Second * 4
4242
txMinimumWaitTimeForConfirmation := time.Second * 60
43-
txMaximumWaitTimeForConfirmation := time.Second * 20
43+
txMaximumWaitTimeForConfirmation := time.Second * 300
4444
nodeConfigs := []client.NodeConfig{
4545
{
4646
Name: ptr("foo"),
@@ -79,7 +79,7 @@ func TestChainClientMetrics(t *testing.T) {
7979
}
8080
chainCfg, nodePool, nodes, err := client.NewClientConfigs(ptr("HighestHead"), time.Duration(0), "", nodeConfigs,
8181
ptr[uint32](5), 10*time.Second, ptr[uint32](5), ptr(false), time.Minute, ptr[uint32](5), ptr(false),
82-
ptr[uint32](5), ptr(false), 10*time.Second, 10*time.Second, 10*time.Second, 10*time.Second, 60*time.Second, 20*time.Second)
82+
ptr[uint32](5), ptr(false), 10*time.Second, 10*time.Second, 10*time.Second, 10*time.Second, 60*time.Second, 300*time.Second)
8383
require.NoError(t, err)
8484

8585
chainID := big.NewInt(68472)

pkg/config/toml/config_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,8 @@ var fullConfig = EVMConfig{
270270
RPCDefaultBatchSize: ptr[uint32](17),
271271
RPCBlockQueryDelay: ptr[uint16](10),
272272
NoNewFinalizedHeadsThreshold: config.MustNewDuration(time.Hour),
273-
TxMinimumWaitTimeForConfirmation: config.MustNewDuration(60 * time.Second),
274-
TxMaximumWaitTimeForConfirmation: config.MustNewDuration(20 * time.Second),
273+
TxMinimumWaitTimeForConfirmation: config.MustNewDuration(1 * time.Minute),
274+
TxMaximumWaitTimeForConfirmation: config.MustNewDuration(5 * time.Minute),
275275

276276
Transactions: Transactions{
277277
Enabled: ptr(true),

pkg/config/toml/defaults/fallback.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ RPCBlockQueryDelay = 1
1818
FinalizedBlockOffset = 0
1919
NoNewFinalizedHeadsThreshold = '0'
2020
LogBroadcasterEnabled = true
21-
TxMinimumWaitTimeForConfirmation = '60s'
22-
TxMaximumWaitTimeForConfirmation = '20s'
21+
TxMinimumWaitTimeForConfirmation = '1m0s'
22+
TxMaximumWaitTimeForConfirmation = '5m0s'
2323

2424
[Transactions]
2525
Enabled = true

pkg/config/toml/docs.toml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,10 @@ LogBroadcasterEnabled = true # Default
118118
#
119119
# Set to zero to disable.
120120
NoNewFinalizedHeadsThreshold = '0' # Default
121-
# 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
122-
TxMinimumWaitTimeForConfirmation = '60s'
123-
# TODO: Find a proper name
124-
# Maximum 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
125-
TxMaximumWaitTimeForConfirmation = '20s'
126-
121+
# 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
122+
TxMinimumWaitTimeForConfirmation = '60s' # Default
123+
# 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
124+
TxMaximumWaitTimeForConfirmation = '300s' # Default
127125

128126
[Transactions]
129127
# Enabled is a feature flag for the Transaction Manager. This flag also enables or disables the gas estimator since it is dependent on the TXM to start it.

pkg/config/toml/testdata/config-full.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ RPCDefaultBatchSize = 17
2424
RPCBlockQueryDelay = 10
2525
FinalizedBlockOffset = 16
2626
NoNewFinalizedHeadsThreshold = '1h0m0s'
27-
TxMaximumWaitTimeForConfirmation = '20s'
27+
TxMaximumWaitTimeForConfirmation = '5m0s'
2828
TxMinimumWaitTimeForConfirmation = '1m0s'
2929

3030
[Transactions]

pkg/heads/tracker.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,4 @@ func (*nullTracker) LatestSafeBlock(ctx context.Context) (safe *evmtypes.Head, e
5353
}
5454
func (*nullTracker) LatestAndFinalizedBlock(ctx context.Context) (latest, finalized *evmtypes.Head, err error) {
5555
return nil, nil, nil
56-
}
57-
58-
func (*nullTracker) LatestSafeBlock(ctx context.Context) (safe *evmtypes.Head, err error) {
59-
return nil, nil
60-
}
61-
62-
56+
}

0 commit comments

Comments
 (0)