Skip to content

Commit

Permalink
Merge pull request #11858 from smartcontractkit/hotfit-disable-tracker
Browse files Browse the repository at this point in the history
Hotfix disable tracker
  • Loading branch information
snehaagni authored Jan 23, 2024
2 parents 0d4f232 + 7deb0ce commit 848f7df
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
3 changes: 2 additions & 1 deletion common/txmgr/resender.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ func (er *Resender[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) resendUnco
return fmt.Errorf("Resender failed getting enabled keys for chain %s: %w", er.chainID.String(), err)
}

resendAddresses = append(resendAddresses, er.tracker.GetAbandonedAddresses()...)
// Tracker currently disabled for BCI-2638; refactor required
// resendAddresses = append(resendAddresses, er.tracker.GetAbandonedAddresses()...)

ageThreshold := er.txConfig.ResendAfterThreshold()
maxInFlightTransactions := er.txConfig.MaxInFlight()
Expand Down
9 changes: 8 additions & 1 deletion common/txmgr/txmgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,12 @@ func (b *Txm[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Start(ctx
return fmt.Errorf("Txm: Estimator failed to start: %w", err)
}

/* Tracker currently disabled for BCI-2638; refactor required
b.logger.Info("Txm starting tracker")
if err := ms.Start(ctx, b.tracker); err != nil {
return fmt.Errorf("Txm: Tracker failed to start: %w", err)
}
*/

b.logger.Info("Txm starting runLoop")
b.wg.Add(1)
Expand Down Expand Up @@ -272,9 +274,11 @@ func (b *Txm[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Close() (m
merr = errors.Join(merr, fmt.Errorf("Txm: failed to close TxAttemptBuilder: %w", err))
}

/* Tracker currently disabled for BCI-2638; refactor required
if err := b.tracker.Close(); err != nil {
merr = errors.Join(merr, fmt.Errorf("Txm: failed to close Tracker: %w", err))
}
*/

return nil
})
Expand Down Expand Up @@ -389,7 +393,8 @@ func (b *Txm[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) runLoop()
b.broadcaster.Trigger(address)
case head := <-b.chHeads:
b.confirmer.mb.Deliver(head)
b.tracker.mb.Deliver(head.BlockNumber())
// Tracker currently disabled for BCI-2638; refactor required
// b.tracker.mb.Deliver(head.BlockNumber())
case reset := <-b.reset:
// This check prevents the weird edge-case where you can select
// into this block after chStop has already been closed and the
Expand Down Expand Up @@ -417,10 +422,12 @@ func (b *Txm[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) runLoop()
if err != nil && (!errors.Is(err, services.ErrAlreadyStopped) || !errors.Is(err, services.ErrCannotStopUnstarted)) {
b.logger.Errorw(fmt.Sprintf("Failed to Close Confirmer: %v", err), "err", err)
}
/* Tracker currently disabled for BCI-2638; refactor required
err = b.tracker.Close()
if err != nil && (!errors.Is(err, services.ErrAlreadyStopped) || !errors.Is(err, services.ErrCannotStopUnstarted)) {
b.logger.Errorw(fmt.Sprintf("Failed to Close Tracker: %v", err), "err", err)
}
*/
return
case <-keysChanged:
// This check prevents the weird edge-case where you can select
Expand Down
4 changes: 4 additions & 0 deletions core/chains/evm/txmgr/tracker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ func containsID(txes []*txmgr.Tx, id int64) bool {
}

func TestEvmTracker_Initialization(t *testing.T) {
t.Skip("BCI-2638 tracker disabled")
t.Parallel()

tracker, _, _, _ := newTestEvmTrackerSetup(t)
Expand All @@ -65,6 +66,7 @@ func TestEvmTracker_Initialization(t *testing.T) {
}

func TestEvmTracker_AddressTracking(t *testing.T) {
t.Skip("BCI-2638 tracker disabled")
t.Parallel()

t.Run("track abandoned addresses", func(t *testing.T) {
Expand Down Expand Up @@ -94,6 +96,7 @@ func TestEvmTracker_AddressTracking(t *testing.T) {
})

t.Run("stop tracking finalized tx", func(t *testing.T) {
t.Skip("BCI-2638 tracker disabled")
tracker, txStore, _, _ := newTestEvmTrackerSetup(t)
confirmedAddr := cltest.MustGenerateRandomKey(t).Address
_ = mustInsertConfirmedEthTxWithReceipt(t, txStore, confirmedAddr, 123, 1)
Expand All @@ -118,6 +121,7 @@ func TestEvmTracker_AddressTracking(t *testing.T) {
}

func TestEvmTracker_ExceedingTTL(t *testing.T) {
t.Skip("BCI-2638 tracker disabled")
t.Parallel()

t.Run("confirmed but unfinalized transaction still tracked", func(t *testing.T) {
Expand Down
1 change: 0 additions & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Added a tracker component to the txmgr for tracking and gracefully handling abandoned transactions. Abandoned transactions occur when a fromAddress is removed from the keystore by a node operator. The tracker gives abandoned transactions a chance to be finalized on chain, or marks them as fatal_error if they are not finalized within a specified time to live (default 6hrs).
- Added distributed tracing in the OpenTelemetry trace format to the node, currently focused at the LOOPP Plugin development effort. This includes a new set of `Tracing` TOML configurations. The default for collecting traces is off - you must explicitly enable traces and setup a valid OpenTelemetry collector. Refer to `.github/tracing/README.md` for more details.
- Added a new, optional WebServer authentication option that supports LDAP as a user identity provider. This enables user login access and user roles to be managed and provisioned via a centralized remote server that supports the LDAP protocol, which can be helpful when running multiple nodes. See the documentation for more information and config setup instructions. There is a new `[WebServer].AuthenticationMethod` config option, when set to `ldap` requires the new `[WebServer.LDAP]` config section to be defined, see the reference `docs/core.toml`.
- New prom metrics for mercury transmit queue:
Expand Down

0 comments on commit 848f7df

Please sign in to comment.