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-2591 TXM TX Finalized State #11878

Closed
wants to merge 19 commits into from

Conversation

dhaidashenko
Copy link
Collaborator

  • Added finalized state to TXM Tx and TxAttempt that signals the inclusion of the corresponding transaction into the block that is deeper than configured finality depth. If the finality tag is enabled, the block was marked as finalized.
  • Fix guarantee that confirmed transactions, excluded from the chain due to reorg, are rebroadcasted.
  • GET /v2/transactions/ endpoint prefers finalized attempts to the latest.

Copy link
Contributor

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

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.
I will have to review in detail later.
One thing is, ideally we wanted to add all finalization logic to the HeadTracker/HeadReader, and then the TXM should just call the HeadReader to fetch latest finalized block, without knowing anything about finalityTags or finalityDepth.
I know that hasn't yet been built in the HeadReader, but long term that's the direction we want to get at.

There are comments from Sam on Design Doc about Finality Depth, that we first need to get alignment on too.

Perhaps lets talk more at the Offsite.


finalizedBlock = big.NewInt(head.BlockNumber() - int64(finalityDepth))
if useFinalityTag {
finalizedBlock = big.NewInt(head.BlockNumber())
Copy link
Contributor

Choose a reason for hiding this comment

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

If the req for eth_getBlcokNumber fails, then the head variable won't hold the right finalizedBlock

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We handle the error on line 190

Copy link
Contributor

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Apr 22, 2024
@github-actions github-actions bot closed this Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants