Skip to content
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

upgrade libipld dep to 2.0.0 #1316

Open
snarfed opened this issue Sep 10, 2024 · 1 comment
Open

upgrade libipld dep to 2.0.0 #1316

snarfed opened this issue Sep 10, 2024 · 1 comment
Labels

Comments

@snarfed
Copy link
Owner

snarfed commented Sep 10, 2024

It's faster! ...but has a breaking change, it returns blob CIDs as raw bytes, not base-32 encoded strings. https://github.com/MarshalX/python-libipld/releases/tag/v2.0.0

It was straightforward to add support for this to granary.bluesky.blob_to_url in snarfed/granary@59b207c, but it's not as easy to support it in the Object.bsky datastore property. It's a webutil.models.JsonProperty, which JSON-encodes its value. That class doesn't know anything about ATProto or CIDs, and I don't plan to make it assume that bytes values are CIDs...but the other option is to walk all objects somewhere in BF, eg in atproto_firehose._handle, find all of the blob fields (by checking against lexicons?), and convert their bytes to CIDs. Basically a libipld post-processing to apply to some records to convert CIDs to multiformats.CID instances. Seems like overkill. Hrmph.

@snarfed snarfed added the infra label Sep 10, 2024
snarfed added a commit that referenced this issue Sep 10, 2024
we're not quite ready for raw bytes CIDs :/ see #1316

also updates a test to match snarfed/granary@59b207c
snarfed added a commit to snarfed/lexrpc that referenced this issue Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant