Skip to content

Restore the requests of a proposal recovered from the WAL - #716

Merged
pfi79 merged 1 commit into
hyperledger:mainfrom
HagarMeir:fix/restored-view-requests
Oct 20, 2026
Merged

pfi79 merged 1 commit into
hyperledger:mainfrom
HagarMeir:fix/restored-view-requests

Conversation

@HagarMeir

Copy link
Copy Markdown
Contributor

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

Fixes #715.

A view restored from the WAL after a restart had its proposal but not its requests, and no pre-prepare time. So when it decided the proposal, the requests were not removed from the pool, CountTxsAll was not increased, and LatencyBatchProcessing recorded about 292 years. #702 fixed the same gap for the in-flight view.

Changes

  • recoverProposed and recoverPrepared set the view's inFlightRequests from Verifier.RequestsFromProposal, and beginPrePrepare to the time of the restore. That's what a view sets when it accepts a proposal, and the WAL doesn't persist it.
  • TestViewPersisted now checks that each decision passes on the proposal's requests and records a reasonable latency, with and without a crash. On main, the three crash cases fail.
  • TestStateRestore gives its view a verifier, as every view built by ProposalMaker has.

No message or decision rule changes.

🤖 Generated with Claude Code

A view restored from the WAL after a restart had its proposal but not
its requests, and no pre-prepare time. So when it decided the proposal,
its requests were not removed from the pool, CountTxsAll was not
increased, and LatencyBatchProcessing recorded the time since the zero
time.

Set the view's requests from the verifier and its pre-prepare time when
restoring an in-flight proposal, as a view does when it accepts one, and
check both in TestViewPersisted.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hagar Meir <hagar.meir@ibm.com>
@pfi79
pfi79 merged commit 3c24f63 into hyperledger:main Oct 20, 2026
6 checks passed
@HagarMeir
HagarMeir deleted the fix/restored-view-requests branch October 20, 2026 19:14
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 view restored from the WAL decides its proposal without its requests and records a bogus batch latency

2 participants