Support for a partial chain
This MR attempts to solve item 2 of #339.
It edits the predecessor access functions in module
State so as to handle the possibility that a block may be known and validated without it having its predecessor in the database.
It also creates the
prune store hashremoves most information about a block, leaving only its header information. Blocks within
max_operation_ttlof a block you would want to validate on must have this data.
delete store hashremoves all information from a block.
purge chain hashfirst prunes all block information, starting from the block
breferenced by the
hashdown to the one indexed by min(max_op_ttl(b), level(b)) before
b. Then it deletes all block information from the predecessor of this block down to the end of the chain.
Note that as of right now, the context information is not deleted from the database. This shall be done when item 3 of #339 is completed.
Potential problem: the logarithmic predecessor lookup has not been changed.