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

Add min balance violation to statuses in Transaction_snark.Base.User_command_failure #6448

Merged
merged 8 commits into from
Oct 21, 2020

Conversation

psteckler
Copy link
Member

@psteckler psteckler commented Oct 20, 2020

Recently, a constructor representing a minimum balance violation was added to User_command_status.Failure.t.

The type Transaction_snark.Base.User_command_failure.t is meant to capture the ways a user command can fail, and so should mirror the type above. There was no corresponding item for a minimum balance violation.

This PR adds the missing item, and uses it in Transaction_snark.compute_unchecked. For most transactions, it's false. For payments, the Transaction_logic timing validator is called, and sets the value to true iff the there's a min balance violation.

Added a comment to User_command_status.Failure.t to change User_command_failure.t if the fields change.

Note: there are other missing failure statuses in User_command_failure.t. I suspect that's unintentional.

Copy link
Member

@mrmr1993 mrmr1993 left a comment

Choose a reason for hiding this comment

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

Nice!

@psteckler psteckler added ci-build-me Add this label to trigger a circle+buildkite build for this branch ready-to-merge Adding this label will trigger mergify and trigger CI to run and merge the PR labels Oct 20, 2020
@psteckler psteckler changed the title Add min balance violation to statuses in Transaction_snark.Base Add min balance violation to statuses in Transaction_snark.Base.User_command_failure Oct 20, 2020
@psteckler
Copy link
Member Author

Added #6450 as an issue re other missing failure cases.

@netlify
Copy link

netlify bot commented Oct 21, 2020

Deploy preview for mina-staging ready!

Built with commit 6f8682c

https://deploy-preview-6448--mina-staging.netlify.app

@mergify mergify bot merged commit 93c92d8 into develop Oct 21, 2020
@mergify mergify bot deleted the fix/compute-unchecked-min-bal-violation branch October 21, 2020 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-build-me Add this label to trigger a circle+buildkite build for this branch ready-to-merge Adding this label will trigger mergify and trigger CI to run and merge the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants