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

Stop sending blocks and transactions on error #1818

Merged
merged 1 commit into from Feb 25, 2021
Merged

Conversation

teor2345
Copy link
Contributor

Motivation

Zebra continues sending blocks and transactions to peers after there is an error on the connection.

This causes panics like #1599.

Solution

Return after the first error when sending blocks or transactions.

Review

@yaahc is doing the refactor of this code.

This fix is urgent, because it stops Zebra panicking when peer connections have errors.

Related Issues

#1610 - initial refactor attempt
#1817 - current refactor attempt

Follow Up Work

Finish the refactor that prevents future bugs like this #1817

@teor2345 teor2345 added C-bug Category: This is a bug A-rust Area: Updates to Rust code P-High I-panic Zebra panics with an internal error message labels Feb 25, 2021
@teor2345 teor2345 requested a review from yaahc February 25, 2021 11:12
@teor2345 teor2345 self-assigned this Feb 25, 2021
@teor2345 teor2345 added this to Review in progress in 🦓 via automation Feb 25, 2021
@teor2345 teor2345 added this to the 2021 Sprint 4 milestone Feb 25, 2021
@yaahc yaahc merged commit 9c3f236 into main Feb 25, 2021
@yaahc yaahc deleted the stop-send-on-error branch February 25, 2021 16:44
🦓 automation moved this from Review in progress to Done Feb 25, 2021
@dconnolly
Copy link
Contributor

@teor2345 does this close #1801 ?

@teor2345
Copy link
Contributor Author

@teor2345 does this close #1801 ?

#1803 stops the hangs in #1801 by reverting #1721.
This closes #1599 by stopping the panic.

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
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants