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: Transaction kernel error constant generation #906

Merged
merged 8 commits into from
Oct 8, 2024

Conversation

PhilippGackstatter
Copy link
Contributor

@PhilippGackstatter PhilippGackstatter commented Oct 4, 2024

Generates the transaction kernel error constants from the masm files with a build.rs file.

Also reworks the error names aligned with #712 and supersedes that PR.
I did not generally add a context to the error messages like "transaction prologue: account nonce must be ..." but rather tried to weave the context into the error message to make its origin clear.

Some unused error constants in the prologue were removed.

Closes #671

See that issue's comments for details.

@PhilippGackstatter PhilippGackstatter marked this pull request as draft October 4, 2024 12:26
@PhilippGackstatter PhilippGackstatter marked this pull request as ready for review October 7, 2024 08:19
Copy link
Contributor

@Fumuran Fumuran left a comment

Choose a reason for hiding this comment

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

Thank you! Great work!

I suggested some changes inline, but the main thing is that we should also check the miden and note_scripts folders for errors to include them in the generated list.

miden-tx/build.rs Outdated Show resolved Hide resolved
miden-tx/src/errors/tx_kernel_errors.rs Show resolved Hide resolved
miden-tx/src/errors/tx_kernel_errors.rs Outdated Show resolved Hide resolved
miden-tx/src/errors/tx_kernel_errors.rs Outdated Show resolved Hide resolved
miden-tx/src/errors/tx_kernel_errors.rs Outdated Show resolved Hide resolved
miden-tx/src/errors/tx_kernel_errors.rs Outdated Show resolved Hide resolved
@Fumuran Fumuran mentioned this pull request Oct 7, 2024
@PhilippGackstatter PhilippGackstatter force-pushed the pgackst-tx-kernel-error-generation-671 branch from 2afa7ff to a22032e Compare October 7, 2024 17:32
Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

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

Looks great! Thank you! I left just two small comments inline. Once these are addressed, we can merge.

miden-tx/src/errors/mod.rs Outdated Show resolved Hide resolved
miden-tx/build.rs Show resolved Hide resolved
Copy link
Contributor

@Fumuran Fumuran left a comment

Choose a reason for hiding this comment

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

Looks good, thank you!

@PhilippGackstatter PhilippGackstatter force-pushed the pgackst-tx-kernel-error-generation-671 branch from a22032e to bc240e0 Compare October 8, 2024 12:53
@PhilippGackstatter PhilippGackstatter merged commit 6dd2004 into next Oct 8, 2024
8 checks passed
@PhilippGackstatter PhilippGackstatter deleted the pgackst-tx-kernel-error-generation-671 branch October 8, 2024 14:32
@bobbinth bobbinth mentioned this pull request Oct 15, 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.

3 participants