-
Notifications
You must be signed in to change notification settings - Fork 2
Description
We need a test framework that creates random tests and simulates scenarios where nodes either crash or go offline and recover, while transactions are being sent to the nodes.
For that, we need a simple and trivial memory pool that we can inject fake transactions into.
Injecting a transaction into the memory pool will be done by adding a transaction to the memory pool of each instance.
Once a block is indexed in storage, the memory pool is cleaned from the transactions in the block.
For a max round window
The test will have a random number of nodes -
- Inject transactions in a slow and controlled manner until
$l$ blocks are finalized. - Divide the time to intervals of
$T$ seconds (1-2 seconds), and will randomly crash or disconnect up to$f$ nodes in an interval.
The first stage of each test will be generating a scenario descriptor, in some human readable format (e.g a JSON array) and then feeding it into a driver module that will orchestrate the nodes and network according to the descriptor.
The test will log what it is doing at each time interval, as well as the status of all nodes.
The motivation is that by creating random test scenarios, we might uncover edge cases and will then later be able to re-run them by taking the descriptor and feeding it into the test driver module.