filecoin-project / consensus

Filecoin consensus work
Other
42 stars 5 forks source link

Feat/export data format (plot twist it was there the whole time!!) #9

Closed ZenGround0 closed 5 years ago

ZenGround0 commented 5 years ago

This doesn't get as far as I was hoping :/ but I think this carries us over the edge.

We are now committed to a SINGLE DATA FORMAT output for each run. Plot twist: its the dot file we've been generating (it has everything we need). I also added in a heaviest chain node so that programs with just the dot file can reconstruct the heaviest chain.

There is a little brittle parser for the dot file format that we specifically are writing to turn dot files into intermediate representations.

Finally there is a code taking these representations into workable metrics.

Note the TODO added to the go code that mentions my confusion around not resetting blocks in simulation rounds where no blocks were mined. I think this does not lead to a correctness issue but possibly causes inefficiencies and might be responsible for the panic seen earlier.

Caveats:

sternhenri commented 5 years ago

@zixuanzh @decentralion per our convo yesterday!