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

Add a Replace proposal #174

Draft
wants to merge 26 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a9395e3
Add Rust scaffolding
bifurcation May 31, 2024
17740df
Attempt to make a foreign-compatible trait
bifurcation May 31, 2024
6bb2247
Stub in test case for creation of a commit covering a Replace proposal
bifurcation Jul 1, 2024
66e5ed8
Add a struct for a Replace proposal
bifurcation Jul 1, 2024
19d9341
Allow inclusion of Replace in a Commit
bifurcation Jul 4, 2024
6079c58
Verify correct processing of Replace by committer and member
bifurcation Jul 5, 2024
c6f93e7
Apply validation rules to Replace proposals
bifurcation Jul 5, 2024
0130e04
Segregate pending update state by source
bifurcation Jul 5, 2024
cfc536e
Clean up some things that need to be feature-gated
bifurcation Jul 5, 2024
62ded9d
Test and fix abandonment logic
bifurcation Jul 5, 2024
494179f
Add leaf_node_epoch extension
bifurcation Jul 6, 2024
1269317
Partly revert update state tracking changes
bifurcation Jul 11, 2024
2e41ed7
Add tests for leaf node epoch logic
bifurcation Jul 11, 2024
78ac756
Fix test failures outside of 'replace'
bifurcation Jul 14, 2024
251f823
More test cleanup
bifurcation Jul 14, 2024
2096668
Move integration tests to group/mod.rs
bifurcation Jul 14, 2024
890945f
Clear errors building without default features
bifurcation Jul 14, 2024
21b682f
CI errors
bifurcation Jul 14, 2024
8fc1de2
Only derive serde traits when serde is enabled
bifurcation Jul 14, 2024
4d70372
Revert accidentally committed changes
bifurcation Jul 15, 2024
a0f8dcf
Fix no-std issues
bifurcation Jul 15, 2024
c864672
Build properly with only -F replace_proposal
bifurcation Jul 15, 2024
6c4ad02
Clippy errors
bifurcation Jul 15, 2024
9ae9682
Fix bad nolint directive
bifurcation Jul 15, 2024
eb8dd52
Address first comments from @mulmarta
bifurcation Jul 15, 2024
75f265d
if let
bifurcation Jul 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
if let
bifurcation committed Jul 16, 2024
commit 75f265d049c171c7c55d792b24eb069bd8ec8fab
13 changes: 7 additions & 6 deletions mls-rs/src/group/mod.rs
Original file line number Diff line number Diff line change
@@ -1893,13 +1893,14 @@ where

// If the current leaf node contains an epoch value, delete any cached state for
// updates from prior epochs.
self.current_user_leaf_node()?
let epoch_ext = self
.current_user_leaf_node()?
.extensions
.get_as::<LeafNodeEpochExt>()?
.map(|epoch_ext| {
self.pending_updates
.retain(|_pk, upd| upd.epoch >= epoch_ext.epoch);
});
.get_as::<LeafNodeEpochExt>()?;
if let Some(epoch_ext) = epoch_ext {
self.pending_updates
.retain(|_pk, upd| upd.epoch >= epoch_ext.epoch);
}
}

self.pending_commit = None;