Skip to content

Speed up payer report conflict resolution#1810

Merged
fbac merged 1 commit intomainfrom
fbac/payer-report-speed-up-conflicts
Mar 13, 2026
Merged

Speed up payer report conflict resolution#1810
fbac merged 1 commit intomainfrom
fbac/payer-report-speed-up-conflicts

Conversation

@fbac
Copy link
Copy Markdown
Collaborator

@fbac fbac commented Mar 12, 2026

Current behavior can stall convergence when a node keeps generating a pending report that peers locally reject.

Generator blocking currently treats non-expired pending reports at the boundary as valid blockers regardless of local attestation result.

Current Knuth distribution in testnet:

Node ID Generator (w=1) Submitter (w=2) Settlement (w=3)
100 :47 :52 :57
200 :35 :40 :45
300 :22 :27 :32

Example loop:

T0 = 10:47
Node 100 (generator minute :47) creates pending report R0 at boundary start=0.

T0+
Nodes 200 (:35) and 300 (:22) receive R0, locally reject attestation (attestation_status=2) due to divergent history.

10:47 -> 04:47 (+18h)
R0 remains submission_status=pending and non-expired.
On each generator tick, peers see a valid boundary blocker (start=0, pending, non-expired), so they skip generating replacements.

T1 = 04:47 next day (+18h)
Node 100 runs again, expires R0 (sets submission_status=rejected), then immediately generates R1 at the same boundary in the same run.

T1+
Peers still disagree with node 100’s history, locally reject R1 too.

Repeat every ~18h
Until some node can propose an alternative report that gets majority attestation, payer-report progression at that boundary can remain stalled.

Note

Skip attestation-rejected pending reports when resolving payer report generation conflicts

In GeneratorWorker.maybeGenerateReport, pending reports with AttestationRejected status are now excluded from the set of valid reports that block generation at a boundary. Previously, these locally rejected reports would prevent generateReport from running. Behavioral Change: generation now proceeds when the only blocking reports are locally attestation-rejected, which may cause duplicate or overlapping report generation in edge cases where rejection state diverges across nodes.

Macroscope summarized 8e8ba9f.

@fbac fbac requested a review from a team as a code owner March 12, 2026 09:57
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented Mar 12, 2026

Approvability

Verdict: Approved

Small, targeted optimization adding a skip condition for locally-rejected pending reports during conflict resolution. The change is self-contained (~10 lines of new logic), clearly intentioned, and the author is the designated code owner of the modified file.

You can customize Macroscope's approvability policy. Learn more.

Copy link
Copy Markdown
Contributor

@neekolas neekolas left a comment

Choose a reason for hiding this comment

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

This looks like a reasonable change to me. If someone else has a garbage report pending, I should still "shoot my shot" at producing a better report.

@fbac fbac merged commit 2b8f289 into main Mar 13, 2026
16 checks passed
@fbac fbac deleted the fbac/payer-report-speed-up-conflicts branch March 13, 2026 10:59
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