refactor packet relaying and increase signed_blocks_window in e2e tests #967
Labels
scope: testing
Code review, testing, making sure the code is following the specification.
type: bug
Issues that need priority attention -- something isn't working
type: tech-debt
Slows down development in the long run
Problem
relayPackets
action in e2e is non-deterministic & thesigned_blocks_window
is set too low causing misinterpretation of test results such as:Closing criteria
Make
relayPackets
function wait for at least 1 block to be produced to ensure all Txs have been included in a block.Make
signed_blocks_window
at least 10 (instead of 2) so validators have some room to breatheProblem details
At the time of writing the
relayPackets
helper func in e2e testing looks like this:Please notice that the function simply invokes
hermes clear packets
and does not have a way of confirming that packet send Txs were included in a block.This can lead to weird and confusing situations where the packets are relayed, but the state is unmodified becaue not enough time had elapsed (the Tx was not included in a block, no state was modified).
This was especially confusing during Downtime tests for soft opt-out.
In this scenario we have the following steps:
Here, step 3 would begin before results from 2 were commited to state. When a downtime was initiated, > 2/3 of validator power would be excluded from the network causing the chain to halt.
The solution
Wait a couple blocks after relaying to ensure all operations are completed.
The text was updated successfully, but these errors were encountered: