IntersectMBO / IntersectMBO/ouroboros-consensus
Catch-and-restart on fewer miniprotocol exceptions
- Dominant language
- Haskell
- Stars
- 67
- Forks
- 43
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 43
Description
input-output-hk/ouroboros-network#773 added a handler to the mini protocol threads in `test-consensus`: when they throw exceptions matching a certain type, they are caught and the mini protocol threads (both client and server sides of that direction) are simply restarted at the beginning of the next slot. This coarsely emulates the related behavior of the implementation.
Right now the handler is only limited by type. This Issue is to further refine the handler to only catch certain data constructors. Ultimately, it should only catch exceptions that are expected to be raised during normal operation (eg `ForkTooDeep`). All other exceptions are unexpected and should cause the `test-consensus` infrastructure to crash out with QuickCheck failures, by simply not being caught by this handler.
I don't yet know exactly which constructors should be caught. Currently, it includes at least `ForkTooDeep` and `InvalidRollForward` in my experience. (We anticipate that input-output-hk/ouroboros-consensus#763 will render `InvalidRollForward` unexpected.)
This Issue is similar to if not blocked by the ongoing determination of concrete error policies (eg input-output-hk/ouroboros-network#798).
Contributor guide
Assessment
This issue has not been assessed yet.