Skip to content

consensus queue: fix blob expiry and validate config limits - #24266

Merged
jmank88 merged 3 commits into
developfrom
CRE-6002-fixes
Nov 24, 2026
Merged

jmank88 merged 3 commits into
developfrom
CRE-6002-fixes

Conversation

@jmank88

@jmank88 jmank88 commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Use the event deadline retained in the observation for a blob's expiration hint, instead of the same event after observeEvent strips its timestamps. The hint was always the minimum lifetime (~30s), so blobs expired long before their events could be executed and backlogged events were silently dropped, DON-wide.

Validate the limits the plugin relies on. A config now needs at least four modified KV keys and enough bytes for them, an observation large enough for one event plus the blob handle reservation for the DON's N and F, a blob payload large enough for one event, and positive per-oracle blob quotas. The checks run when the config is decoded, when the plugin is created, and in the deployment config generator, so a wedging config fails loudly instead of stalling the DON.

Size the default per-oracle blob quotas from the event lifetime at the DON's DeltaRound, with reaping slack. Share the sizing constants and quota formula in the new queuelimits package; queuepb keeps the config protos, conversion and validation.


consensus queue: bound blob broadcasts and fetches with a timeout

A stalled blob store, or a peer that advertises a blob but never serves
it, could block Observation, ValidateObservation and Committed
indefinitely: OCR3.1 background plugin calls pass an epoch context with no
deadline.

Give each blob broadcast and fetch a two second timeout, mirroring the
vault plugin's blobBroadcastTimeout. A timed-out broadcast is treated as a
failed blob, so Observation still returns with that blob's events omitted;
a timed-out fetch rejects the observation or drops the execution, and all
spawned goroutines exit.

Add tests with a fetcher and broadcaster that block until their context
ends, asserting all three paths return promptly.

@jmank88
jmank88 requested a review from MStreet3 November 24, 2026 18:18
@github-actions

Copy link
Copy Markdown
Contributor

✅ No conflicts with other open PRs targeting develop

@github-actions

Copy link
Copy Markdown
Contributor

I see you updated files related to core. Please run make gocs in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

@jmank88
jmank88 marked this pull request as ready for review November 24, 2026 18:26
@jmank88
jmank88 requested review from a team as code owners November 24, 2026 18:26
@jmank88
jmank88 requested a review from agparadiso November 24, 2026 18:29
MStreet3
MStreet3 previously approved these changes Nov 24, 2026
// Plugin sizing constants.
const (
// MaxBlobHandlesPerObservation is the most blobs a node broadcasts in one Observation.
MaxBlobHandlesPerObservation = 10

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.

Any reason these are constants instead of settings? If we want to try and optimize them we'd have to wait for a full release to update them and there might be some issues with different nodes running different limits. i.e. if 1 node has MaxBlobHandlesPerObservation set at 10 and a new node has it set at 20, the old node will reject the new nodes observations that have > 10 blobs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As in a cresetting? Is there a clean way to do that without having to defensive about the non-atomicity? Or should we use the plugin config to avoid that issue?

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.

cresettings will be faster than a constant but there's still some non-atomicity. I posted in the other PR for how the vault is going to handle having atomic flags which should probably be included in here in a future update

jmank88 and others added 2 commits November 24, 2026 14:12
Use the event deadline retained in the observation for a blob's expiration
hint, instead of the same event after observeEvent strips its timestamps.
The hint was always the minimum lifetime (~30s), so blobs expired long
before their events could be executed and backlogged events were silently
dropped, DON-wide.

Validate the limits the plugin relies on. A config now needs at least four
modified KV keys and enough bytes for them, an observation large enough for
one event plus the blob handle reservation for the DON's N and F, a blob
payload large enough for one event, and positive per-oracle blob quotas.
The checks run when the config is decoded, when the plugin is created, and
in the deployment config generator, so a wedging config fails loudly
instead of stalling the DON.

Size the default per-oracle blob quotas from the event lifetime at the
DON's DeltaRound, with reaping slack. Share the sizing constants and quota
formula in the new queuelimits package; queuepb keeps the config protos,
conversion and validation.

Co-Authored-By: Claude Code <noreply@anthropic.com>
A stalled blob store, or a peer that advertises a blob but never serves
it, could block Observation, ValidateObservation and Committed
indefinitely: OCR3.1 background plugin calls pass an epoch context with no
deadline.

Give each blob broadcast and fetch a two second timeout, mirroring the
vault plugin's blobBroadcastTimeout. A timed-out broadcast is treated as a
failed blob, so Observation still returns with that blob's events omitted;
a timed-out fetch rejects the observation or drops the execution, and all
spawned goroutines exit.

Add tests with a fetcher and broadcaster that block until their context
ends, asserting all three paths return promptly.

Co-Authored-By: Claude Code <noreply@anthropic.com>
russell-stern
russell-stern previously approved these changes Nov 24, 2026
@jmank88
jmank88 dismissed stale reviews from russell-stern and MStreet3 via 27dc4f8 November 24, 2026 20:28
@jmank88
jmank88 enabled auto-merge November 24, 2026 20:29
@jmank88
jmank88 requested a review from HashWrangler November 24, 2026 20:29
@jmank88
jmank88 added this pull request to the merge queue Nov 24, 2026
Merged via the queue into develop with commit 40d97e2 Nov 24, 2026
242 of 243 checks passed
@jmank88
jmank88 deleted the CRE-6002-fixes branch November 24, 2026 21:10
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.

4 participants