Skip to content

Ignore a NewView message for a view the node already installed - #704

Merged
HagarMeir merged 1 commit into
hyperledger:mainfrom
HagarMeir:fix/ignore-duplicate-newview
Oct 18, 2026
Merged

HagarMeir merged 1 commit into
hyperledger:mainfrom
HagarMeir:fix/ignore-duplicate-newview

Conversation

@HagarMeir

Copy link
Copy Markdown
Contributor

Written by Claude (Anthropic's AI assistant) on behalf of Hagar Meir.

Fixes #703.

A NewView message for the view a node is already in was processed again from the start. That repeats the whole view installation: the WAL record, ViewChanged, the timer restarts, and the in-flight check. When the in-flight proposal was already decided and the node had moved past it, it ended in a panic in commitInFlightProposal.

Changes

  • New flag. ViewChanger keeps acceptedNewView:
    • it is set when processNewViewMsg installs the view, and when informNewView moves the node to a view;
    • it is cleared when a view change moves the node to the next view.
  • processMsg ignores a NewView while the flag is set.
  • New test. TestNewViewOfCurrentViewIsIgnored sends the same NewView twice, once without and once with an in-flight proposal, and checks that the view is installed once. On main, the first case calls ViewChanged twice, and the second panics.

A NewView that didn't install the view still leaves the next one to be processed as before. No message changes.

🤖 Generated with Claude Code

@pfi79

pfi79 commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

@HagarMeir need a rebase

@HagarMeir
HagarMeir force-pushed the fix/ignore-duplicate-newview branch from 03cceb1 to 57ba23d Compare October 18, 2026 07:08
A NewView message for the view the node is already in was processed
again from the start, repeating the view installation: the in-flight
check, the WAL record, ViewChanged and the timer restarts. When the
in-flight proposal had already been decided and the node had moved past
it, commitInFlightProposal panicked.

Keep a flag recording that a NewView was accepted for the current view,
set when the view is installed or the node is informed of it, cleared
when a view change moves to the next view, and ignore NewView messages
while it is set.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hagar Meir <hagar.meir@ibm.com>
@HagarMeir
HagarMeir force-pushed the fix/ignore-duplicate-newview branch from 57ba23d to 6d6dac3 Compare October 18, 2026 07:14
@HagarMeir
HagarMeir merged commit bfe706c into hyperledger:main Oct 18, 2026
6 checks passed
@HagarMeir
HagarMeir deleted the fix/ignore-duplicate-newview branch October 18, 2026 07:22
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.

A NewView message for the view a node is already in is processed again

2 participants