Carry the rejector's round inside StaleRound instead of the reject id - #1082
Carry the rejector's round inside StaleRound instead of the reject id#1082volovyks wants to merge 2 commits into
Conversation
|
Cool, much better! |
| /// carries the rejector's round so the sender can catch up in one bump. | ||
| StaleRound = 4, | ||
| InvalidRequest, | ||
| /// The message's round is behind the rejector's current round, carried |
There was a problem hiding this comment.
Unit → tuple changes this variant's CBOR shape and breaks wire compat.
Externally tagged, StaleRound encodes as a bare text string (6a "StaleRound"); StaleRound(usize) encodes as a map (a1 6a "StaleRound" 05). A single message seems to decode fine only because ciborium::from_reader ignores trailing bytes — in the real Vec batch decode the leftover byte desyncs the stream and both directions fail.
PositRejectReason has no fallback (unlike Message::Unknown, message/types.rs:174-177), so inbox.rs drops the entire batch — including unrelated messages bundled alongside — with just a warn!. During a rolling upgrade, posit traffic between mixed-version peers silently disappears until every node is upgraded.
Can we keep the variant shape and carrying the round as an optional field instead?
Reshapes the
StaleRoundreject introduced in #1048:content); the rejector's current round rides inside
StaleRound(usize)