This PR implements a Replace proposal long the lines discussed in #170 and draft-barnes-mls-replace. Changes are gated behind a feature flag replace_proposal, as discussed in #171.
Call-outs:
There are a few questions around error codes highlighted with XXX(RLB) in the code.
The current code does not reflect support for the Replace proposal in Capabilities when this feature is enabled, and probably should to be specification-compliant. Somewhat surprisingly, this does not cause tests to fail. I suspect there's a general bug to fix in that there doesn't seem to be any check that a proposal is supported by the group before it is applied.
Testing:
In general, the testing strategy is broadly parallel to testing of Update, since this new proposal type is closely related:
Tests that the commit builder properly includes Replace proposals in src/group/commit.rs
Tests of overall functionality in src/group/mod.rs
Tests that proposal list rules are applied in src/group/proposal_cache.rs
As a small drive-by, I also added tests that duplicate Updates are correctly filtered / detected, and the corresponding code to implement this policy.
I think these tests are complete and in the right places, but my familiarity with this code base is pretty rudimentary.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT license.
Issues:
Resolves #170
Description of changes:
This PR implements a Replace proposal long the lines discussed in #170 and draft-barnes-mls-replace. Changes are gated behind a feature flag
replace_proposal
, as discussed in #171.Call-outs:
There are a few questions around error codes highlighted with
XXX(RLB)
in the code.The current code does not reflect support for the Replace proposal in Capabilities when this feature is enabled, and probably should to be specification-compliant. Somewhat surprisingly, this does not cause tests to fail. I suspect there's a general bug to fix in that there doesn't seem to be any check that a proposal is supported by the group before it is applied.
Testing:
In general, the testing strategy is broadly parallel to testing of Update, since this new proposal type is closely related:
src/group/commit.rs
src/group/mod.rs
src/group/proposal_cache.rs
As a small drive-by, I also added tests that duplicate Updates are correctly filtered / detected, and the corresponding code to implement this policy.
I think these tests are complete and in the right places, but my familiarity with this code base is pretty rudimentary.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT license.