-
Notifications
You must be signed in to change notification settings - Fork 74
add published_in_epoch to group message #2805
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
Conversation
|
This PR is part of a stack of 11 bookmarks:
Created with jj-stack |
|
Claude finished @insipx's task —— View job Code Review CompleteReview Date: November 21, 2025 00:16 UTC I've reviewed this PR which adds the ✅ Strengths
🔍 Observations1. Schema Inconsistency (Minor) 2. Test Helper Gap 3. Migration Timing SummaryThe implementation correctly adds epoch tracking to messages as described. The concerns above are minor - the inconsistency observation is primarily for future work in the stack, and the test helper is purely a maintainability suggestion. No blocking issues found. |
d027392 to
d9e4053
Compare
| /// Token is used by clients to prove to the nodes | ||
| /// that they are serving a specific wallet. | ||
| #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] | ||
| pub struct Token { | ||
| /// identity key signed by a wallet | ||
| #[prost(message, optional, tag = "1")] | ||
| pub identity_key: ::core::option::Option<super::super::message_contents::PublicKey>, | ||
| /// encoded bytes of AuthData | ||
| #[prost(bytes = "vec", tag = "2")] | ||
| pub auth_data_bytes: ::prost::alloc::vec::Vec<u8>, | ||
| /// identity key signature of AuthData bytes | ||
| #[prost(message, optional, tag = "3")] | ||
| pub auth_data_signature: ::core::option::Option< | ||
| super::super::message_contents::Signature, | ||
| >, | ||
| } | ||
| impl ::prost::Name for Token { | ||
| const NAME: &'static str = "Token"; | ||
| const PACKAGE: &'static str = "xmtp.message_api.v1"; | ||
| fn full_name() -> ::prost::alloc::string::String { | ||
| "xmtp.message_api.v1.Token".into() | ||
| } | ||
| fn type_url() -> ::prost::alloc::string::String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What can be done so that generation of these are stable and don't move around when we add more code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could try using https://docs.rs/tonic/latest/tonic/macro.include_proto.html
This would generate the protos into the rust OUT_DIR. the downside is first compile will be a bit longer as it needs to clone xmtp/proto and googleapis to generate the protos. but it will delete the entire gen/ directory, which will create smaller PRs.
at that point, i would argue for moving xmtp_proto, or at least just the "proto" part into xmtp/proto, then renaming xmtp_proto to xmtp_types or xmtp_primitives or something. Then we could get rid of the companion PR pattern and proto generation could just be a cargo update which makes versioning clearer (rather than ad-hoc commit refs we store in txt, cargo would take care of it in the lockfile)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we open an issue with prost. My guess is they're using some hash that is dependent on the contents of the protos and that's why things change around when a single field is added.
d9e4053 to
69c6929
Compare
Add
|
69c6929 to
cee6002
Compare
41d2537 to
9f5e2f8
Compare
cee6002 to
5046d87
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2805 +/- ##
==========================================
+ Coverage 74.67% 74.70% +0.02%
==========================================
Files 385 385
Lines 49762 49780 +18
==========================================
+ Hits 37158 37186 +28
+ Misses 12604 12594 -10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
1fce6b2 to
695ab3c
Compare
0eb3f0a to
ea8a79a
Compare
ea8a79a to
cfd66ae
Compare
This will help ensure message dependencies can be programmed defensively by ensuring the epoch of a commit is 1 less then the message we are setting a dependency on.