Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix attempt for Canary : v2.8.0-rc0 upgrade fails on Polygon. #11828

Merged
merged 6 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 6 additions & 2 deletions common/txmgr/tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ func NewTracker[
}

func (tr *Tracker[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Start(_ context.Context) (err error) {
tr.lock.Lock()
defer tr.lock.Unlock()
DylanTinianov marked this conversation as resolved.
Show resolved Hide resolved
tr.lggr.Infow("Abandoned transaction tracking enabled")
DylanTinianov marked this conversation as resolved.
Show resolved Hide resolved
return tr.StartOnce("Tracker", func() error {
return tr.startInternal()
})
Expand All @@ -115,6 +114,8 @@ func (tr *Tracker[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) startIntern
tr.lggr.Infow("no abandoned txes found, skipping runLoop")
return nil
}

tr.lggr.Infow(fmt.Sprintf("%d abandoned txes found, starting runLoop", len(tr.txCache)))
DylanTinianov marked this conversation as resolved.
Show resolved Hide resolved
tr.wg.Add(1)
go tr.runLoop()
return nil
Expand Down Expand Up @@ -211,6 +212,7 @@ func (tr *Tracker[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) trackAbando
return fmt.Errorf("tracker already started")
}

tr.lggr.Infow("Retrieving non fatal transactions from txStore")
nonFatalTxes, err := tr.txStore.GetNonFatalTransactions(ctx, tr.chainID)
if err != nil {
return fmt.Errorf("failed to get non fatal txes from txStore: %w", err)
Expand Down Expand Up @@ -239,6 +241,8 @@ func (tr *Tracker[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) HandleTxesB
}

func (tr *Tracker[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) handleTxesByState(ctx context.Context, blockHeight int64) error {
tr.lggr.Infow("Handling transactions by state")

for id, atx := range tr.txCache {
tx, err := tr.txStore.GetTxByID(ctx, atx.id)
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions common/txmgr/txmgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ func (b *Txm[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Start(ctx
return fmt.Errorf("Txm: Tracker failed to start: %w", err)
}

b.logger.Infow("Txm starting runLoop")
DylanTinianov marked this conversation as resolved.
Show resolved Hide resolved
b.wg.Add(1)
go b.runLoop()
<-b.chSubbed
Expand Down
Loading