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

Dump state also on error #86

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

JulianGCalderon
Copy link
Contributor

@JulianGCalderon JulianGCalderon commented Oct 30, 2024

Closes #72

This PR writes the execution error to the state dump if it fails to complete. For example, the following command:

cargo run --features state_dump,only_cairo_vm tx 0x01438d65c0b7f923b9cd40b52341b99c1061ac5dc0ab97720d798b8d0ce0f882 mainnet 724000

Will generate the following file:

> cat state_dumps/vm/block724000/0x01438d65c0b7f923b9cd40b52341b99c1061ac5dc0ab97720d798b8d0ce0f882.json 
"Invalid transaction nonce of contract at address 0x066be86a31e7a708e17a2f813073fd489f661cf6fa4d949d2c3c8d59e7003a74. Account nonce: 0x00000000000000000000000000000000000000000000000000000000000000db; got: 0x00000000000000000000000000000000000000000000000000000000000000dc."

Rather than generating nothing

@JulianGCalderon JulianGCalderon added this pull request to the merge queue Nov 1, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 1, 2024
@edg-l edg-l added this pull request to the merge queue Nov 4, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 4, 2024
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.

Create state dump even if unexpected error occurs
3 participants