Skip to content

feat(group): add MlsGroup::member_at_epoch - #63

Merged
neekolas merged 2 commits into
xmtp-0.9from
neekolas/audit-d78-member-at-epoch
Oct 30, 2026
Merged

neekolas merged 2 commits into
xmtp-0.9from
neekolas/audit-d78-member-at-epoch

Conversation

@neekolas

@neekolas neekolas commented Oct 29, 2026 •

Copy link
Copy Markdown

Adds a public MlsGroup::member_at_epoch(epoch, leaf_index) accessor. For the current epoch it returns member_at(leaf_index); for a retained past epoch it returns the Member stored for that leaf in the message secrets store (the same leaves process_message already uses to verify past-epoch senders). It returns None for a blank leaf or an epoch that is not retained.

libxmtp needs this to check that the leaf which signed a past-epoch application message is still held by the same signature key in the current tree.

Test: member_at_epoch_reads_retained_leaves adds and then removes a member and checks that the accessor returns the member for the retained epoch, None for the current tree, and None for an epoch that is no longer retained.

🤖 Generated with Claude Code

Note

Add MlsGroup::member_at_epoch member lookup for current and past epochs

Adds a public method to look up a member by leaf index in membership.rs. For the current epoch it delegates to the current-tree lookup; for past epochs it reads stored leaves and clones the member if present. Returns None when the leaf or epoch is unavailable.

The test in past_secrets.rs covers a current member, a removed member in a retained epoch, a blank leaf, and an epoch that is no longer retained.

Macroscope summarized ce59e41.

Return the member at a leaf index in a given epoch, reading the leaves
retained for past epochs. Callers can compare the leaf that signed a
past-epoch message with the leaf that holds that index now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Oct 29, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Approvability

Verdict: Approved at ce59e41

Macroscope's review found this PR approvable — Adds a read-only lookup for members in the current or retained past epochs, with regression coverage. It leaves existing behavior, retention policies, and cryptographic state unchanged.

You can add or adjust custom eligibility rules. Learn more.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@macroscopeapp
macroscopeapp Bot dismissed their stale review October 30, 2026 00:40

Dismissing prior approval to re-evaluate ce59e41

@neekolas
neekolas merged commit 39cddd5 into xmtp-0.9 Oct 30, 2026
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant