hbbft icon indicating copy to clipboard operation
hbbft copied to clipboard

Document `net-trace_` file naming scheme.

Open afck opened this issue 6 years ago • 2 comments

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?

afck avatar Oct 28 '18 09:10 afck

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"?

mbr avatar Oct 29 '18 16:10 mbr

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.

afck avatar Oct 30 '18 07:10 afck