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 $m$, we can define a random length for a test - $l=m\cdot k$ for some $k>1$. This will be the length of the number of blocks that need to be finalized.
The test will have a random number of nodes - $3<n<10$ and will do two things in parallel:
- 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.
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$m$ , we can define a random length for a test - $l=m\cdot k$ for some $k>1$ . This will be the length of the number of blocks that need to be finalized.
The test will have a random number of nodes -$3<n<10$ and will do two things in parallel:
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.