-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add transaction status function for external components to use #13040
Merged
jmank88
merged 27 commits into
develop
from
BCI-3055-Add-new-TXM-method-to-allow-products-to-query-transaction-status
Jun 19, 2024
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
f61af52
Added transaction status function for external components to use
amit-momin 0863a2a
Added changeset and fixed linting
amit-momin fc94f9e
Updated changeset
amit-momin 5b0aec7
Made internal error regex matching explicit
amit-momin 5565139
Updated common client error list
amit-momin 892a260
Defined a generalized tx error interface for chain agnostic compatibi…
amit-momin 3c93af1
Adjusted to align as close as possible with the ChainWriter interface
amit-momin 26d8c4a
Updated to align transaction status method to ChainWriter expectations
amit-momin 2b3e6de
Updated to use the TransactionStatus type from chainlink-common
amit-momin e9d5a64
Simplified the TxError interface
amit-momin 8162421
Merge branch 'develop' into BCI-3055-Add-new-TXM-method-to-allow-prod…
amit-momin 3b6fdb9
Updated FindTxWithIdempotencyKey to return error if no rows found
amit-momin 2dd59fc
Removed sql error checks outside of txstore
amit-momin 37683bb
Updated method signature to accept string instead of uuid
amit-momin 0163c9f
Updated mocks
amit-momin 28ec50f
Moved tx finality check to Confirmer and renamed fields
amit-momin 13fc5b9
Merge branch 'develop' into BCI-3055-Add-new-TXM-method-to-allow-prod…
amit-momin 0aec4a2
Updated tx finalized check to consider re-orgs
amit-momin f24f811
Fixed linting
amit-momin 048d06e
Merge branch 'develop' into BCI-3055-Add-new-TXM-method-to-allow-prod…
amit-momin 3abff06
Removed finality from GetTransactionStatus method
amit-momin b25bc20
Cleaned out unused client method
amit-momin efed3e2
Merge branch 'develop' into BCI-3055-Add-new-TXM-method-to-allow-prod…
amit-momin ccf87d7
Merge branch 'develop' into BCI-3055-Add-new-TXM-method-to-allow-prod…
amit-momin 3fd7d32
Merge branch 'develop' into BCI-3055-Add-new-TXM-method-to-allow-prod…
amit-momin 9486641
Merge branch 'develop' into BCI-3055-Add-new-TXM-method-to-allow-prod…
amit-momin 77b66a7
Rephrased comment to match others
amit-momin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"chainlink": minor | ||
--- | ||
|
||
Added API for products to query a transaction's status in the TXM #internal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is a good idea. There is already a
Fatal
method at the top. AddingIsFatal
is a bit confusing to me. Shouldn't we aggregate those? If the notion ofFailed
transactions for the CW includes transactions that can be retried, shouldn't we returned the retryable type there instead?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's a distinction between what's fatal/retryable at the TXM level and what's fatal/retryable(failed) at the product level.
SendError
classifies these errors for the TXM level so something that's classified as retryable here doesn't necessarily require any action from the product side. The only time they need to take action is once the transaction is in a completed state likefatal_error
. The CW errors require us to split the reason forfatal_error
into two. This is sort of where the confusion is introduced. What'sfatal
from the product's perspective is ZK overflow (terminally stuck) errors. The rest are consideredfailed
which are classified as fatal in SendError.I think I'm probably making things confusing here by trying to leverage
SendError
errors for CW error classification. I considered creating a wrapper but felt it was adding more bloat when we could already idenitfy ZK overflow through it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I could rename this and also update the
ErrorClassifier
type to make it less confusing. Would you be ok withIsFatalForProducts
or I could make it CW specific withIsChainWriterFatal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I see the distinction now. I think
IsFatalForProducts
is a bad name, as we would expose product level information to the underlying component. Same goes forIsChainWriterFatal
. Personally, I would just keep theIsTerminallyStuck
name, but I think once the txm gets degeneralize, we'll have to change that so it's not a big deal, you can keep it as it.