-
Notifications
You must be signed in to change notification settings - Fork 167
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
correct rpc transaction status #2132
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2132 +/- ##
=======================================
Coverage 78.35% 78.36%
=======================================
Files 100 100
Lines 9221 9225 +4
=======================================
+ Hits 7225 7229 +4
- Misses 1356 1357 +1
+ Partials 640 639 -1 ☔ View full report in Codecov by Sentry. |
@@ -791,8 +793,6 @@ func adaptTransactionStatus(txStatus *starknet.TransactionStatus) (*TransactionS | |||
status.Execution = TxnSuccess | |||
case starknet.Reverted: | |||
status.Execution = TxnFailure | |||
case starknet.Rejected: | |||
status.Finality = TxnStatusRejected |
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.
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.
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.
This image in this doc suggests it should be apart of Finality Status
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.
The behaviour of this endpoint is a bit strange, because the FGW can return "NOT_RECEIVED" as the finality status (see the url below), but the RPC spec does not allow returning this value. This means users who query for the transaction status of a transaction that is unknown to the FGW will receive an unofficial error (eg "unknown FinalityStatus.."), rather than the "NOT_RECEIVED" finality status (which the docs suggest). Imo, the spec should be changed, but this PR follows 0.7.1 as expected. |
close #2131