zebra/zebrad
Jane Lusby 8c178c3ee4
fix panic in seed subcommand (#401)
Co-authored-by: Jane Lusby <jane@zfnd.org>

Prior to this change, the seed subcommand would consistently encounter a panic in one of the background tasks, but would continue running after the panic. This is indicative of two bugs. 

First, zebrad was not configured to treat panics as non recoverable and instead defaulted to the tokio defaults, which are to catch panics in tasks and return them via the join handle if available, or to print them if the join handle has been discarded. This is likely a poor fit for zebrad as an application, we do not need to maximize uptime or minimize the extent of an outage should one of our tasks / services start encountering panics. Ignoring a panic increases our risk of observing invalid state, causing all sorts of wild and bad bugs. To deal with this we've switched the default panic behavior from `unwind` to `abort`. This makes panics fail immediately and take down the entire application, regardless of where they occur, which is consistent with our treatment of misbehaving connections.

The second bug is the panic itself. This was triggered by a duplicate entry in the initial_peers set. To fix this we've switched the storage for the peers from a `Vec` to a `HashSet`, which has similar properties but guarantees uniqueness of its keys.
2020-05-27 17:40:12 -07:00
..
src fix panic in seed subcommand (#401) 2020-05-27 17:40:12 -07:00
tests cleanup warnings throughout codebase 2020-05-27 15:42:29 -04:00
Cargo.toml Bump once_cell from 1.3.1 to 1.4.0 2020-05-13 22:28:18 -04:00
README.md Create workspace skeleton based on design.md 2019-08-29 14:46:54 -07:00

README.md

Zebrad

Zebrad is an application.

Getting Started

This application is authored using Abscissa, a Rust application framework.

For more information, see:

Documentation