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

Queryable Content Types in Rust #74

Merged
merged 13 commits into from
Dec 20, 2024

Conversation

cameronvoell
Copy link
Contributor

@cameronvoell cameronvoell commented Dec 3, 2024

Adding initial draft

To do:

  • Finish Backwards Compatibility
  • Test cases
  • Add links for Reference Implementation
  • Security Consideration
  • Address lint warnings

@cameronvoell cameronvoell marked this pull request as ready for review December 4, 2024 01:35
@cameronvoell cameronvoell requested a review from jhaaaa as a code owner December 4, 2024 01:35

#### 2. An older XMTP SDK version sends messages with old JSON content types to users on newer SDK versions

One option is for integrator targeted SDKs to retain code for decoding older JSON content types. A second option is to update integrator targeted SDKs to only support the latest protobuf based content types that will work in new content type based message functions, and to only use fallback text for messages that are not compatible with the latest content types.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree that backwards compatibility isn't the top priority. The only thing that makes me lean towards the first option is how straightforward it should be.

Will make integrators lives easier if they can trust that any reaction they see will be decoded properly. I worry that if we don't integrators will see the fallback from older messages and try to parse it or manually decode the content.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I worry that if we don't integrators will see the fallback from older messages and try to parse it or manually decode the content.

Good point, and I agree it shouldnt be too difficult. Updated here f403869. (also simplified the backwards compatability section since it can be summarized as two cases instead of four)

@jhaaaa jhaaaa force-pushed the cv/content-type-local-db-integration branch from 75e4cee to 42b3685 Compare December 20, 2024 19:42
Copy link
Contributor

@jhaaaa jhaaaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for this XIP, @cameronvoell! Made just a few XIP copyedits and posted to https://community.xmtp.org/t/xip-48-queryable-content-types-in-rust/845.

One note for a future iteration is whether you'd like to add a "threat model" section. So sorry I didn't mention it earlier! I need to update the XIP template to include this section.

Copy link
Contributor

@jhaaaa jhaaaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you next-level @cameronvoell ! Added just a couple of suggested edits. 🫡

@cameronvoell cameronvoell merged commit 2f1514e into main Dec 20, 2024
1 check passed
@cameronvoell cameronvoell deleted the cv/content-type-local-db-integration branch December 20, 2024 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants