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

fix(batch): Return an error instead of panicking in the batch verifier on shutdown #5530

Merged
merged 1 commit into from
Nov 2, 2022

Conversation

teor2345
Copy link
Contributor

@teor2345 teor2345 commented Nov 1, 2022

Motivation

Zebra can panic on shutdown in the batch verifier, but it should return an error to the transaction verifier instead. (This will cancel any pending transactions on shutdown.)

Solution

  • Handle JoinError::Cancelled correctly, the task can be cancelled by the tokio runtime on shutdown

Review

Anyone can review this PR.

Reviewer Checklist

  • Will the PR name make sense to users?
    • Does it need extra CHANGELOG info? (new features, breaking changes, large changes)
  • Are the PR labels correct?
  • Does the code do what the ticket and PR says?
  • How do you know it works? Does it have tests?

@teor2345 teor2345 added C-bug Category: This is a bug A-rust Area: Updates to Rust code P-Medium ⚡ I-panic Zebra panics with an internal error message labels Nov 1, 2022
@teor2345 teor2345 self-assigned this Nov 1, 2022
@teor2345 teor2345 requested a review from a team as a code owner November 1, 2022 22:39
@teor2345 teor2345 requested review from arya2 and removed request for a team November 1, 2022 22:39
Copy link
Contributor

@arya2 arya2 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!

mergify bot added a commit that referenced this pull request Nov 2, 2022
@mergify mergify bot merged commit c5e6adc into main Nov 2, 2022
@mergify mergify bot deleted the batch-shutdown-panic branch November 2, 2022 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rust Area: Updates to Rust code C-bug Category: This is a bug I-panic Zebra panics with an internal error message
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants