Open
Conversation
@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 the `blocks-cars-position` table, which contains `carpath`, `length` and `offset`. He then uses the `carpath` 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` and `admin/upload/inspect` to reflect the (imho better) names used in the implementations.
admin/blocks/inspect capabilityadmin/block/inspect capability
Contributor
|
I'm in favour of making our life easier. My only concern is I'd like us to figure out what the guiding principle should be for deciding if a thing is an implementation detail or a specified feature of the system. Also note that an api for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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-positiontable, which containscarpath,lengthandoffset. He then uses thecarpathto 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/inspectandadmin/upload/inspectto reflect the (imho better) names used in the implementations.