Skip to content

DON Time: clean ObservedDonTimes#1904

Open
DylanTinianov wants to merge 6 commits intomainfrom
dontime-plugin-fixes
Open

DON Time: clean ObservedDonTimes#1904
DylanTinianov wants to merge 6 commits intomainfrom
dontime-plugin-fixes

Conversation

@DylanTinianov
Copy link
Contributor

@DylanTinianov DylanTinianov commented Mar 17, 2026

Summary

  • Stop creating empty ObservedDonTimes entries during observation counting in Outcome. The old code inserted &pb.ObservedDonTimes{} into prevOutcome.ObservedDonTimes as a side effect of computing currSeqNum, but entries that never reached quorum were left with no timestamps and never cleaned up.

  • Add cleanup for entries with nil/empty timestamps in the expiry loop, so any pre-existing orphaned entries are purged on the first round after deployment.

Context

Empty ObservedDonTimes entries accumulated indefinitely because the expiry logic required len(Timestamps) > 0. Since the outcome is the OCR report transmitted by every node every round, this caused unbounded growth in P2P traffic and progressively slower OCR rounds.

@github-actions
Copy link

github-actions bot commented Mar 17, 2026

📊 API Diff Results

No changes detected for module github.com/smartcontractkit/chainlink-common

View full report

@DylanTinianov DylanTinianov changed the title Update plugin.go Prevent unbounded ObservedDonTimes growth in DonTime OCR outcome Mar 17, 2026
@DylanTinianov DylanTinianov changed the title Prevent unbounded ObservedDonTimes growth in DonTime OCR outcome DON Time: Prevent unbounded ObservedDonTimes growth in outcome Mar 17, 2026
@DylanTinianov DylanTinianov changed the title DON Time: Prevent unbounded ObservedDonTimes growth in outcome DON Time: clean ObservedDonTimes Mar 17, 2026
Copy link
Contributor

@prashantkumar1982 prashantkumar1982 left a comment

Choose a reason for hiding this comment

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

Sorry, didn't mean to approve before the unit-tests.
Plz add a unit-test for the empty ObservedDonTimes entry.

@prashantkumar1982 prashantkumar1982 marked this pull request as ready for review March 17, 2026 16:29
@prashantkumar1982 prashantkumar1982 requested a review from a team as a code owner March 17, 2026 16:29
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.

2 participants