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.
Goals
Fix issues with #82
Implementation
My identity CID approach has a weakness -- the actual CID used to look up claims is the link for the root block, not cid of the whole claim serialized to CAR.
This PR converts to using root links as the identity cid, rather than the whole serialized claim. Fortunately, this is roughly equivalent since the synthesized claim has only one block.
This means that a fallback using an identity CID will work all the way through the query process.
You can see an alternate approach in the commit history continues to use the identity CID of the serialzied CAR but modifies the legacy claims mapper so that it passes on this CID correctly. Ultimately I decided this approach was more "correct" and less messy, though it means some slightly odd reconstruction of delegations to maintain the identity CID.
query before
query after
> go run ./cmd query -u https://hannah.indexer.storacha.network baguqeera2tvekmqau6baz36o5cudqiekmcb2boqspofdjip3b3ib2hn6k6qq Query: Hashes (1): zQmcfnLAk4i1bZETqNde8qL6fjFA5CNikbNkdK6qQLdj67a Results: Claims (2): bafyreibkvewseedfog6lbbkaijzbo2ggbz2nwna2frntxsxdvcceiwfcoy Type: assert/index Content: baguqeera2tvekmqau6baz36o5cudqiekmcb2boqspofdjip3b3ib2hn6k6qq Index: bagbaieradicy56yjedke4kaqw2aq34scek4wzoytw37suh34bfi5fdskubgq bafyreig4f3n73zzv5plhngchcejkanmvodjvery5ztyxwd4tjwzudbkpke Type: assert/location Content: zQmQ6EE3NqfJTaC5DtxUCLbtQ9bVoVGss8PAqP51MLdJ6uA Locations: https://carpark-prod-0.r2.w3s.link/zQmQ6EE3NqfJTaC5DtxUCLbtQ9bVoVGss8PAqP51MLdJ6uA/zQmQ6EE3NqfJTaC5DtxUCLbtQ9bVoVGss8PAqP51MLdJ6uA.blob Range: 0-379 Indexes (1): bagbaiera23wlwcndsnbnp6g4f4a53obzwrjlygai4pmxqodfzgjyd4n5kanq Content: baguqeera2tvekmqau6baz36o5cudqiekmcb2boqspofdjip3b3ib2hn6k6qq Shards (1): zQmSQ26wcoCYcdMpwUbMkaZNfow3Y8B3iHjCjNkCqwkSAGT Slices (2): zQmSQ26wcoCYcdMpwUbMkaZNfow3Y8B3iHjCjNkCqwkSAGT @ 0-186 zQmcfnLAk4i1bZETqNde8qL6fjFA5CNikbNkdK6qQLdj67a @ 98-186