Test suite for concurrency bugs
At least the P2P layer and the Sync layer involve non-trivial concurrency. We need good testing for that. Dejafu seems well suited for that task.
➤ Colin Woodbury commented:
What kind of issues could we foresee for Sync?
➤ Lars Kuhtz commented:
There are two levels of concurrency:
- concurrency between chainweb nodes, which collaboratively compute the chainweb block chain in a distributed network, and
- concurrency between components of a single Chainweb-node using Haskell threads, system resources, and shared variables.
I would be surprised if there are no subtle races in the code that affect correctness or performance for both aspects of concurrency.
Moving away from a symmetric protocol to an asymmetric REST API helped making the code more robust with respect to the first item.
At a minimum we should test the system over noisy/unreliable networks, which often is a good way to reveal concurrency issues.