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

[BCI-2235] Abandoned Transaction Tracking #11143

Merged
merged 90 commits into from
Nov 29, 2023

Conversation

DylanTinianov
Copy link
Contributor

@DylanTinianov DylanTinianov commented Nov 1, 2023

Created Tracker to track abandoned transactions (fromAddress’s in evm.txes that are not present in the Confirmer's enabledAddresses list). Abandoned transactions are given a finite time to live (default 6hrs) before marking as fatal_error if not yet confirmed.

The tracker updates when a new block is received and checks if any abandoned transactions have been finalized (receipt is passed minConfirmations / finality_depth)

@DylanTinianov DylanTinianov self-assigned this Nov 1, 2023
Copy link
Contributor

github-actions bot commented Nov 1, 2023

I see that you haven't updated any README files. Would it make sense to do so?

@DylanTinianov DylanTinianov changed the title Track Abandoned Transactions [BCI-2235] Track Abandoned Transactions Nov 1, 2023
@DylanTinianov DylanTinianov changed the title [BCI-2235] Track Abandoned Transactions [BCI-2235] Abandoned Transaction Tracking Nov 1, 2023
Copy link
Contributor

@prashantkumar1982 prashantkumar1982 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great work!

I would say, also add abandoned Txs handling inside the Resender. As long as we are tracking those uncofirmed txs, lets also keep resending them.

common/txmgr/confirmer.go Outdated Show resolved Hide resolved
common/txmgr/abandoned_tracker.go Outdated Show resolved Hide resolved
Copy link
Contributor

@prashantkumar1982 prashantkumar1982 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to merge, just a few minor comemnts

common/txmgr/tracker.go Outdated Show resolved Hide resolved
common/txmgr/tracker.go Outdated Show resolved Hide resolved
@cl-sonarqube-production
Copy link

@prashantkumar1982 prashantkumar1982 added this pull request to the merge queue Nov 29, 2023
Merged via the queue into develop with commit c8ca97e Nov 29, 2023
88 checks passed
@prashantkumar1982 prashantkumar1982 deleted the BCI-2235-txm-abandoned-tx-tracking branch November 29, 2023 00:48
fbac pushed a commit that referenced this pull request Dec 14, 2023
* Create Abandoned Tracker

* Handle abandoned transactions

* Update abandoned_tracker.go

* fix tabbing

* Query for non-finalized txes

* fix tracker

* Resend abandoned txes

* Add evm_tx_store test

* Resend abandoned transactions

* add tracker testing

* presubmit

* tidy

* generate

* fix test

* lint

* tidy

* fix txmgr tests

* generate

* Get tx by ID

* generate

* ensure tx attemps

* Confirm abandoned txes

* tracker reset

* lint

* Update tracker.go

* Get Tx by ID

* Update text

* Make tracker its own component

* check finality_depth

* remove TxAbandoned state

* generate

* Fix race conditions

* Update db functions

* Add state machine to tracker

* Delete coverage.txt

* lint

* count receipts in query

* add context

* update cltest

* Add tracker description

* filter chainID

* update logger

* generate

* Update CHANGELOG.md

* Test unstarted txes

* lint

* undo imports

---------

Co-authored-by: amit-momin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants