You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to remove the GroupStateStorage trait in favor of application managing storage. This is a possible alternative to #211.
Solution:
A group member will use the following code to process a proposal_message and a commit_message that includes proposal_message by reference.
// Receive proposalletProtocolMessage{group_id:&'a [u8],epoch_id: u64,content_type:ContentType::Proposal,} = proposal_message.description()else{// Do something else};let epoch = my_storage.load_epoch(group_id, epoch_id)?;// Decrypt and verify auth of proposallet proposal:Proposal = client.process_proposal(&epoch, proposal_message)?;// Receive commitletProtocolMessage{content_type:ContentType::Commit,
..
} = commit_message.description()else{// Do something else};// Currently `new_epoch_builder` would be `commit_processor`let commit_effect = client
.new_epoch_builder(epoch, commit_message)?
.with_proposal(proposal).with_psk(my_storage.load_psk(builder.required_psks()[0])?).override_proposals(my_proposal_rules(builder.proposals())?).build()?;// Delete epoch for that group. Store updated epoch and past epoch for late application messages
my_storage.store_epoch(commit_effect.new_epoch, commit_effect.past_epoch)?;
where
CommitEffect{epoch:Option<GroupState>,// None if we're removedpast_epoch:PastEpoch,// other info}
The text was updated successfully, but these errors were encountered:
Problem:
We want to remove the
GroupStateStorage
trait in favor of application managing storage. This is a possible alternative to #211.Solution:
A group member will use the following code to process a
proposal_message
and acommit_message
that includesproposal_message
by reference.where
The text was updated successfully, but these errors were encountered: