wip: propose admin/block/inspect
capability
#80
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@dchoi27 often needs to get information about CIDs that identify blocks packed into CARs stored. The current process for this is to calculate the multihash of the CID (eg,
ipfs cid format -f "%m" -b base58btc bafybeicfs2nuef675li6pxrdzar4bkmdp5ktud4shubtgkenk5gwtjqde4
) and then to use that multihash to query theblocks-cars-position
table, which containscarpath
,length
andoffset
. He then uses thecarpath
to determine the parent CAR's CID, which can be used to figure out which space the content has been uploaded to, allowing him to block the space and/or user who registered the space.I'm very open to reworking this or tackling it a different way - this is meant to be an initial proposal to start a discussion on the best way to support this admin workflow.
Also tweak the return values of the
admin/store/inspect
andadmin/upload/inspect
to reflect the (imho better) names used in the implementations.