NethermindEth / juno

Starknet client implementation.
https://juno.nethermind.io
Apache License 2.0
402 stars 170 forks source link

correct rpc transaction status #2132

Closed rianhughes closed 1 month ago

rianhughes commented 2 months ago

close https://github.com/NethermindEth/juno/issues/2131

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Project coverage is 78.36%. Comparing base (b2f565e) to head (fa2a2cb). Report is 53 commits behind head on main.

Files with missing lines Patch % Lines
rpc/transaction.go 0.00% 6 Missing :warning:
starknet/transaction.go 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

rianhughes commented 2 months ago

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.

eg https://alpha-mainnet.starknet.io/feeder_gateway/get_transaction?transactionHash=0x1b59029be1c10c12298f1bb272b1c3c622e1e89a379e18f77ae33bcb3886379

rianhughes commented 1 month ago

Closing since this PR is incorrect