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

feat(rpc/trace): add is_reverted flag to FUNCTION_INVOCATION #2500

Merged
merged 2 commits into from
Jan 21, 2025

Conversation

kkovaacs
Copy link
Contributor

Starting from Starknet 0.13.4 panics in calls can be caught and handled by callers, so failure in an individual call does not cause the transaction to fail (and revert) immediately.

To be able to find out which calls have failed an update to the 0.8 OpenRPC spec now requires the is_reverted flag for function invocations.

Closes: #2496

The version number in the files do not match the actual version though
because it has not been updated properly before the release.
An update to the 0.8 OpenRPC spec now requires the `is_reverted` flag
for function invocations.

Closes: #2496
Comment on lines +496 to +498
// Pre-0.13.4 failures in individual calls are not possible -- the whole TX is reverted in
// that case.
is_reverted: false,
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if I get this right but shouldn't there be a TODO here to manage 0.14.0 (ie. the gateway will provide this field)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if I get this right but shouldn't there be a TODO here to manage 0.14.0 (ie. the gateway will provide this field)?

Good question. As things stand the gateway can no longer provide traces starting with Starknet 0.13.2. Based on a recent discussion with Starkware it seems that it's not only disabled, they're not even generating those traces.

Whether or not this will ever change is a good question...

@kkovaacs kkovaacs merged commit f3edbd7 into main Jan 21, 2025
7 of 8 checks passed
@kkovaacs kkovaacs deleted the krisztian/add-is-reverted-flag-to-tx-traces branch January 21, 2025 13:54
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.

Add is_reverted to each call in traces
2 participants