Conversation
|
Whats your usecase for getting the bitfields out? Since this is adding the semver'ed api surface, we're per default a little conservative about adding apis |
|
I have an indexer that wants to index all downloaded blocks for a list of (sparse) feeds.Therefore, it tracks which key-seq pairs it has indexed already. With hyperspace, I cannot ensure that there's no downloads happening while the indexer is not running. So, to check for that, on each start of the indexer, without this patch I'd have to do one async |
|
@mafintosh if a new method |
This adds two optional fields
bitfieldandlengthto thehasmethod request. If set, the response includes a run-length encoded bitfield of the downloaded blocks fromseqforlength.On the client side, a new
getBitfieldmethod is added. It resolves to the decoded bitfield, wrapped in a bitfield instance.This, together with #5, solves #2 and should allow indexers to work reliably and efficiently on sparsely synced hypercores.