hbbft
hbbft copied to clipboard
Document `net-trace_` file naming scheme.
When I run a test with HBBFT_TEST_TRACE=true
, it produces ten net-trace_*.txt
files with cryptic numbers. We should document in tests/README.md
which of them is the last one (corresponding to the simplest test)?
The files even have the same size; is proptest running the exact same test ten times for some reason?
Yes, proptest
will run the same test every time if it is a "known regression", stored in tests/net_dynamic_hb.proptest-regressions
for example. Running with an identical random seed and unchanged test will result in creating the same network packets as a result.
The "strange numbers" are the process id and a random number, but I will concede that these could be documented better. I did not include a timestamp because the filesystem manages those already sufficiently well.
On the other hand, I am thinking of moving the networking logs to logging and just have a simple, filterable logging facility. How do we want to go ahead here? Add the docs or migrate to logging and just "wait it out"?
Migrating to logging would also have the advantage of being able to see the production code's log messages in the right place in the test's log.