-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IndexSorted
should not load CIDs with multihash code of IDENTITY
#215
Comments
Indeedy, we even included this in the spec and made it bold:
|
The new index type does this already; I'll get this sorted in the |
masih
changed the title
CIDs with multihash code of
Sep 2, 2021
IDENTITY
IndexSorted
should not load CIDs with multihash code of IDENTITY
masih
added a commit
that referenced
this issue
Sep 2, 2021
Skip `IDENTITY` CIDs in `IndexSorted`, as required by CARv2 specification. Re-generate `sample-wrapped-v2.car` testdata, since its previous index contained CIDs with `IDENTITY` multihash. Gracefully handle CIDs with `IDENTITY` multihash code in the `blockstore` API. Since `Get`, `GetSize` and `Has` interfaces rely on the index, decode given keys directly to satisfy calls for such CIDs. See: - https://ipld.io/specs/transport/car/carv2/#index-format Fixes #215
masih
added a commit
that referenced
this issue
Sep 7, 2021
Skip `IDENTITY` CIDs in `IndexSorted`, as required by CARv2 specification. Re-generate `sample-wrapped-v2.car` testdata, since its previous index contained CIDs with `IDENTITY` multihash. Gracefully handle CIDs with `IDENTITY` multihash code in the `blockstore` API. Since `Get`, `GetSize` and `Has` interfaces rely on the index, decode given keys directly to satisfy calls for such CIDs. See: - https://ipld.io/specs/transport/car/carv2/#index-format Fixes #215
masih
added a commit
that referenced
this issue
Sep 7, 2021
Skip `IDENTITY` CIDs in `IndexSorted`, as required by CARv2 specification. Re-generate `sample-wrapped-v2.car` testdata, since its previous index contained CIDs with `IDENTITY` multihash. Gracefully handle CIDs with `IDENTITY` multihash code in the `blockstore` API. Since `Get`, `GetSize` and `Has` interfaces rely on the index, decode given keys directly to satisfy calls for such CIDs. See: - https://ipld.io/specs/transport/car/carv2/#index-format Fixes #215
masih
added a commit
that referenced
this issue
Sep 8, 2021
Skip `IDENTITY` CIDs in `IndexSorted`, as required by CARv2 specification. Re-generate `sample-wrapped-v2.car` testdata, since its previous index contained CIDs with `IDENTITY` multihash. Gracefully handle CIDs with `IDENTITY` multihash code in the `blockstore` API. Since `Get`, `GetSize` and `Has` interfaces rely on the index, decode given keys directly to satisfy calls for such CIDs. See: - https://ipld.io/specs/transport/car/carv2/#index-format Fixes #215
masih
added a commit
that referenced
this issue
Sep 8, 2021
Skip `IDENTITY` CIDs in `IndexSorted`, as required by CARv2 specification. Re-generate `sample-wrapped-v2.car` testdata, since its previous index contained CIDs with `IDENTITY` multihash. Gracefully handle CIDs with `IDENTITY` multihash code in the `blockstore` API. Since `Get`, `GetSize` and `Has` interfaces rely on the index, decode given keys directly to satisfy calls for such CIDs. See: - https://ipld.io/specs/transport/car/carv2/#index-format Fixes #215
masih
added a commit
that referenced
this issue
Sep 8, 2021
Skip `IDENTITY` CIDs in `IndexSorted`, as required by CARv2 specification. Re-generate `sample-wrapped-v2.car` testdata, since its previous index contained CIDs with `IDENTITY` multihash. Gracefully handle CIDs with `IDENTITY` multihash code in the `blockstore` API. Since `Get`, `GetSize` and `Has` interfaces rely on the index, decode given keys directly to satisfy calls for such CIDs. See: - https://ipld.io/specs/transport/car/carv2/#index-format Fixes #215
masih
added a commit
that referenced
this issue
Sep 8, 2021
Skip `IDENTITY` CIDs in `IndexSorted`, as required by CARv2 specification. Re-generate `sample-wrapped-v2.car` testdata, since its previous index contained CIDs with `IDENTITY` multihash. Gracefully handle CIDs with `IDENTITY` multihash code in the `blockstore` API. Since `Get`, `GetSize` and `Has` interfaces rely on the index, decode given keys directly to satisfy calls for such CIDs. See: - https://ipld.io/specs/transport/car/carv2/#index-format Fixes #215
masih
added a commit
that referenced
this issue
Sep 17, 2021
Implement two additional options that allow a CARv2 file to 1) include IDENTNTIY CIDs, and 2) specify a maximum allowed CID length with default of 2KiB as a sufficiently large default. Configure ReadWrite blockstore to persist given blocks with IDENTITY CIDs. Introduce a new Characteristics filed that signalls whether an index in a CAR file contains a full catalog of CIDs for backward compatibility purposes. Note, this is a new addition and will need to be added to the spec in a separate PR. Relates to #215
masih
added a commit
that referenced
this issue
Sep 17, 2021
Implement two additional options that allow a CARv2 file to 1) include IDENTNTIY CIDs, and 2) specify a maximum allowed CID length with default of 2KiB as a sufficiently large default. Configure ReadWrite blockstore to persist given blocks with IDENTITY CIDs. Introduce a new Characteristics filed that signalls whether an index in a CAR file contains a full catalog of CIDs for backward compatibility purposes. Note, this is a new addition and will need to be added to the spec in a separate PR. Relates to #215
masih
added a commit
that referenced
this issue
Sep 17, 2021
Implement two additional options that allow a CARv2 file to 1) include IDENTNTIY CIDs, and 2) specify a maximum allowed CID length with default of 2KiB as a sufficiently large default. Configure ReadWrite blockstore to persist given blocks with IDENTITY CIDs. Introduce a new Characteristics filed that signalls whether an index in a CAR file contains a full catalog of CIDs for backward compatibility purposes. Note, this is a new addition and will need to be added to the spec in a separate PR. Relates to #215
masih
added a commit
that referenced
this issue
Sep 20, 2021
Implement two additional options that allow a CARv2 file to 1) include IDENTNTIY CIDs, and 2) specify a maximum allowed CID length with default of 2KiB as a sufficiently large default. Configure ReadWrite blockstore to persist given blocks with IDENTITY CIDs. Introduce a new Characteristics filed that signalls whether an index in a CAR file contains a full catalog of CIDs for backward compatibility purposes. Note, this is a new addition and will need to be added to the spec in a separate PR. Relates to #215
masih
added a commit
that referenced
this issue
Sep 20, 2021
Implement two additional options that allow a CARv2 file to 1) include IDENTNTIY CIDs, and 2) specify a maximum allowed CID length with default of 2KiB as a sufficiently large default. Configure ReadWrite blockstore to persist given blocks with IDENTITY CIDs. Introduce a new Characteristics filed that signalls whether an index in a CAR file contains a full catalog of CIDs for backward compatibility purposes. Note, this is a new addition and will need to be added to the spec in a separate PR. Relates to #215
masih
added a commit
that referenced
this issue
Sep 20, 2021
Implement two additional options that allow a CARv2 file to 1) include IDENTNTIY CIDs, and 2) specify a maximum allowed CID length with default of 2KiB as a sufficiently large default. Configure ReadWrite blockstore to persist given blocks with IDENTITY CIDs. Introduce a new Characteristics filed that signalls whether an index in a CAR file contains a full catalog of CIDs for backward compatibility purposes. Note, this is a new addition and will need to be added to the spec in a separate PR. Relates to #215
masih
added a commit
that referenced
this issue
Sep 20, 2021
Implement two additional options that allow a CARv2 file to 1) include IDENTNTIY CIDs, and 2) specify a maximum allowed CID length with default of 2KiB as a sufficiently large default. Configure ReadWrite blockstore to persist given blocks with IDENTITY CIDs. Introduce a new Characteristics filed that signalls whether an index in a CAR file contains a full catalog of CIDs for backward compatibility purposes. Note, this is a new addition and will need to be added to the spec in a separate PR. Relates to #215
masih
added a commit
that referenced
this issue
Sep 20, 2021
Implement two additional options that allow a CARv2 file to 1) include IDENTNTIY CIDs, and 2) specify a maximum allowed CID length with default of 2KiB as a sufficiently large default. Configure ReadWrite blockstore to persist given blocks with IDENTITY CIDs. Introduce a new Characteristics filed that signalls whether an index in a CAR file contains a full catalog of CIDs for backward compatibility purposes. Note, this is a new addition and will need to be added to the spec in a separate PR. Relates to #215
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is possible for a CAR file to contain CIDs with multihash
IDENTITY
. Such CIDs could significantly bloat the index size and cause OOM error. As stated in the CARv2 spec Index should disallow them and safely skip over them when indexing a CAR file.IndexSorted
currently loads all given CIDs. Skip over CIDs with multihashIDENTITY
.The text was updated successfully, but these errors were encountered: