concorde
concorde copied to clipboard
test: sends messages
This PR builds upon https://github.com/graydon/concorde/pull/1
I loaded ConcordeSystem::simple()
into Stateright's Explorer and
noticed that the latest version isn't sending any messages. This commit
simply adds a regression test, which is currently failing.
The commit also adds #derive(Clone)
to ConcordeActor
and
ConcordeSystem
as those are necessary for using the Explorer.
@graydon I noticed that a recent change altered a filter to require an ordering relationship between items, whereas the older code would allow None
w/ regard to the partial order. Not sure if that was intended, so I introduced a change to adopt the old behavior (not yet part of this PR):
diff --git a/src/participant.rs b/src/participant.rs
index 35f141c..6b4bca9 100644
--- a/src/participant.rs
+++ b/src/participant.rs
@@ -119,7 +119,10 @@ impl<ObjLD: LatticeDef + 'static, Peer: DefTraits + 'static> Participant<ObjLD,
.new_opinion
.proposed_configs
.iter()
- .filter(|u| { *u >= commit_cfg })
+ .filter(|u| {
+ <crate::cfg::CfgLD<Peer> as LatticeDef>::partial_order(&u.value, &commit_cfg.value)
+ != Some(std::cmp::Ordering::Less)
+ })
.cloned()
.collect();
}
That change results in messages being sent, but then the liveness property is violated, which leads me to think that I might not be on the right track. Thoughts?