Closed sduchesneau closed 4 years ago
either we have mindreader publish merged-blocks-file inside the temporary location (currently called one-block-files) and the merger can use it (careful on resource usages, then :( )
or we keep pushing the blocks that were not in the "seen" cache further and further away (that's the chosen scenario)
scenario:
develop
, when the blocks are old enough or clearly behind LIB, to prevent creating gazillions of one-block files when we know there won't be any fork...)Issues:
Solution to be implemented:
The merger should keep the last written block bundle on local disk (in its 'progress' file) and, if it exists, restart from there. It should only "try to find starting block" once...
The merger will try to create bundle 100->199 from one-block-files. If it cannot, AND it sees the merged-blocks.100 created by someone else, it will download it, list the existing blocks and populate its seen-cache.
The merger will then look at 200-299 range, try to create it itself. if it cannot, look for existing merged-block, again, reading it to insert its own blocks and overwrite...
NOTE: we cannot modify already published merged-blocks-files... so....