IntersectMBO / ouroboros-network

Specifications of network protocols and implementations of components running these protocols which support a family of Ouroboros Consesus protocols; the diffusion layer of the Cardano Node.
https://ouroboros-network.cardano.intersectmbo.org
Apache License 2.0
272 stars 86 forks source link

Reduce QSM boilerplate #4109

Open dnadales opened 1 year ago

dnadales commented 1 year ago

At the moment all the quick-check state-machine from consensus use the scaffolding described in this blogpost. Each new test requires around 500 LOC of boilerplate. If we continue using QSM we should abstract this away.

Also, we need to evaluate if the scaffolding above is suitable for running parallel tests.

jorisdral commented 1 year ago

One example where abstraction would be applicable is the lockstep function, which is defined separately in each state-machine test setup, though the definitions are very similar:

jorisdral commented 1 year ago

https://github.com/input-output-hk/ouroboros-network/issues/4116 is a related issue that proposes to explore the use of the quickcheck-dynamic package in Conensus, which seems to require less boilerplate code to run state-machine tests