chainweb-node icon indicating copy to clipboard operation
chainweb-node copied to clipboard

Test suite for concurrency bugs

Open mercadoa opened this issue 6 years ago • 2 comments

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.

mercadoa avatar Apr 16 '19 15:04 mercadoa

➤ Colin Woodbury commented:

What kind of issues could we foresee for Sync?

mercadoa avatar Apr 16 '19 15:04 mercadoa

➤ Lars Kuhtz commented:

There are two levels of concurrency:

  1. concurrency between chainweb nodes, which collaboratively compute the chainweb block chain in a distributed network, and
  2. 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.

mercadoa avatar Apr 16 '19 15:04 mercadoa