ipfs/kubo

canonical method for checking locality of a block via coreAPI

Open

#6,726 opened on 2019幎10月24日

GitHub で芋る
 (5 comments) (0 reactions) (0 assignees)Go (2,725 forks)batch import
help wantedkind/enhancement

Repository metrics

Stars
 (13,906 stars)
PR merge metrics
 (平均マヌゞ 4d 2h) (30d で 28 merged PRs)

説明

Location

:wave: 👚‍👧‍👧! I'm looking for the best way to ask "hey is this block local"?

Given that we're in IPFS user land, we should be using core API for this stuff. Which means we're trying to do stuff that's easiest accomplished with a blockstore via coreapi.

Blockstore method that works exactly as we'd like:

https://github.com/ipfs/go-ipfs-blockstore/blob/3eee0dff760dea94c59381e9a18b9aa290361b28/blockstore.go#L36

Relevant coreAPI subsystem:

https://github.com/ipfs/interface-go-ipfs-core/blob/1c94e6217184ed07abab840143aa1f417e314c3d/block.go#L20-L37

Description

We also have the same question about complete DAGs, happy to file a separate issue if you'd prefer. I'd love to be pointed to the canonical methods of determining if a block or dag is local via core API.

Thanks!

コントリビュヌタヌガむド