Skip to content

Carry the rejector's round inside StaleRound instead of the reject id - #1082

Open
volovyks wants to merge 2 commits into
developfrom
serhii/stale-round-payload
Open

Carry the rejector's round inside StaleRound instead of the reject id#1082
volovyks wants to merge 2 commits into
developfrom
serhii/stale-round-payload

Conversation

@volovyks

@volovyks volovyks commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Reshapes the StaleRound reject introduced in #1048:

  • The reject's id now echoes the rejected message's round (an address, not
    content); the rejector's current round rides inside StaleRound(usize)

@volovyks
volovyks requested a review from yvonneanne July 29, 2026 14:53
@volovyks volovyks changed the title carry the rejector's round inside StaleRound instead of the reject id Carry the rejector's round inside StaleRound instead of the reject id Jul 29, 2026
@yapignolet

Copy link
Copy Markdown

Cool, much better!

Comment thread chain-signatures/node/src/protocol/request/posit.rs
/// 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants