Skip to content

Commit

Permalink
Temporarily disable tracker (#11857)
Browse files Browse the repository at this point in the history
* Disable tracker

* Remove all tracker calls
  • Loading branch information
DylanTinianov authored Jan 23, 2024
1 parent d7fe683 commit 5057899
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 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 @@ -191,10 +191,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 @@ -274,9 +276,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 @@ -391,7 +395,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 @@ -419,10 +424,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

0 comments on commit 5057899

Please sign in to comment.