Skip to content

feat(cre): launch consensus-queue from the registry with OCR-config limits - #24260

Merged
MStreet3 merged 8 commits into
developfrom
consensus-queue-registry-launch
Nov 24, 2026
Merged

MStreet3 merged 8 commits into
developfrom
consensus-queue-registry-launch

Conversation

@MStreet3

Copy link
Copy Markdown
Contributor

Consensus-queue now starts from the Capabilities Registry, like don-time, and takes its OCR limits from the registry's OCR config instead of the job spec. The plugin was never deployed from a job spec, so no running jobs are affected.

What changes

Limits live in the OCR offchain config

  • New queuepb.ReportingPluginConfig proto holds the ReportingPluginLimits. queuepb.Decode rejects configs that are empty, malformed, or that have zero MaxObservationBytes, MaxKeyValueModifiedKeys or MaxKeyValueModifiedKeysPlusValuesBytes. It also applies libocr's own limit checks.
  • NewReportingPlugin decodes OffchainConfig and returns an error before starting if the config is invalid. The delegate no longer parses PluginConfig.
  • V3_1OracleConfig gets a typed ConsensusQueueOffchainConfig field. DefaultConsensusQueueOffchainConfig() sets 256 KiB observations, 1000 modified keys and 4 MiB of modified keys plus values. The deployment tooling validates the config with the same Decode the node uses.

Launch from the registry

  • Delegate.NewServices gains a ConsensusQueue case. cre.go routes consensus-queue@* capability IDs to it.
  • The KV store path comes from the capability ID and DON ID (registryKVSubPath). The registry gives each launch a new external job ID, so the path can't use it.
  • Consensus-queue job specs are now rejected, with an error that points to [Capabilities.Local] RegistryBasedLaunchAllowlist. The job spec code path and queue.PluginConfig are removed.

Local CRE

  • Writes the default consensus-queue offchain config and removes the []byte{} workaround in keystone.go.
  • Adds consensus-queue@1.0.0 to RegistryBasedLaunchAllowlist on DONs that have the capability. The feature now only registers the capability; the placeholder contract deploy, job proposal and job template are removed.

Breaking changes

  • NewConsensusQueuePluginFactory no longer takes a plugin config.
  • Consensus-queue job specs fail validation.
  • queue.PluginConfig is removed.

Requires

None.

Supports

None.

Deployment Validation Steps

  • Before rollout, add consensus-queue@1.0.0 to RegistryBasedLaunchAllowlist on the target nodes. Write the consensus-queue offchain config into the registry OCR config with ConsensusQueueOffchainConfig.
  • Local CRE (workflow-gateway-capabilities-don.toml): all 4 workflow nodes logged jobName: consensus-queue@1.0.0 with jobID: 0, and seqNr kept advancing. Smoke suite bucket A passes.
  • Expect one runWithContractConfig: error writing new config to database (FK offchainreporting2_contract_configs_oracle_spec_fkey) per node at startup. Every registry-launched OCR plugin, don-time included, hits it on develop because there is no OCR spec row. libocr only saves the config as a startup cache and keeps the protocol running.

Known issues (not changed here)

  • Capabilities nodes warn multiple consensus capabilities with an OCR3 config found: [consensus-queue@1.0.0 consensus@1.0.0-alpha], so they skip verifying the workflow DON's report signatures. The same consensus-queue registration already exists on develop.

@github-actions

Copy link
Copy Markdown
Contributor

✅ No conflicts with other open PRs targeting develop

The consensus-queue plugin reads its OCR limits from the job spec,
which the OCR config digest does not cover. Nodes with different
limits could run the same rounds without any error.

Add a ReportingPluginConfig proto, starting with the OCR limits, that
travels in the OCR offchain config. Decode and OCRLimits validate it,
so the node and the deployment tooling share one set of rules: the
config must be non-empty, MaxObservationBytes, MaxKeyValueModifiedKeys
and MaxKeyValueModifiedKeysPlusValuesBytes must be at least 1, and all
limits must be within libocr's maximums.
Add a typed ConsensusQueueOffchainConfig field to V3_1OracleConfig, next
to the DKG and Vault configs. The generator encodes it as the reporting
plugin config, so CLD and Local CRE can write the consensus-queue limits
into the registry's OCR config.

Marshal validates with queuepb.Decode, so a config the node would
reject fails at generation time. DefaultConsensusQueueOffchainConfig
holds the starting limits. Only one typed offchain config may be set.
Local CRE now sets ConsensusQueueOffchainConfig to the defaults on the
consensus-queue OCR 3.1 config, so the registry's OCR config carries
the plugin limits.

Remove the []byte{} plugin config workaround in embedOCR3_1Config. Every
OCR 3.1 capability in Local CRE now sets a typed offchain config, and a
capability without one fails at generation time instead of running
with an empty plugin config.
NewReportingPlugin now decodes config.OffchainConfig with queuepb and
builds ReportingPluginInfo1.Limits from it. It returns an error, without
starting the plugin, if the config is empty or invalid. The config
digest covers these bytes, so every oracle in a round runs with the
same limits.

The delegate no longer parses spec.PluginConfig for consensus-queue,
and NewConsensusQueuePluginFactory drops its *PluginConfig parameter.

BREAKING CHANGE: NewConsensusQueuePluginFactory no longer takes a
*PluginConfig, and a consensus-queue OCR config without a queuepb
plugin config no longer starts.
Add a ConsensusQueue case to Delegate.NewServices, so the
LocalCapabilityManager can start consensus-queue from the Capabilities
Registry the way it starts don-time.

Registry launches get a fresh ExternalJobID each time, so keying the KV
store by it would lose the queue's state on every restart.
registryKVSubPath derives the KV sub-path from the capability ID and
DON ID instead.

The plugin ignores the registry configJSON. Its limits come only from
the OCR offchain config.
The LocalCapabilityManager now sends allowlisted consensus-queue
capabilities to the OCR2 delegate, the same way it sends don-time.

Move the inline capability ID check into registryOCR2PluginType so the
routing has a test.
Consensus-queue now starts only from the Capabilities Registry, so
remove its ServicesForSpec case and reject consensus-queue job specs in
validation with a pointer to RegistryBasedLaunchAllowlist. The plugin
was never deployed from a job spec, so no running jobs are affected.

Delete queue.PluginConfig. Its limits now live in the OCR offchain
config, and nothing else reads it.

BREAKING CHANGE: consensus-queue job specs are rejected, and
queue.PluginConfig is removed.
Local CRE adds consensus-queue@1.0.0 to the RegistryBasedLaunchAllowlist
of every DON with the consensus-queue flag, next to the HTTP
capabilities. The feature now only registers the capability and its
OCR 3.1 config.

Remove the placeholder OCR3 contract deploy, the job proposal and
approval, and the consensus-queue job template with its tests. The
nodes no longer accept a consensus-queue job spec.

These changes ship together so Local CRE never both proposes a job and
allowlists the capability, which would start two oracles.
@MStreet3
MStreet3 force-pushed the consensus-queue-registry-launch branch from 874d989 to 995e8d9 Compare November 23, 2026 18:45
@MStreet3
MStreet3 marked this pull request as ready for review November 23, 2026 18:53
@MStreet3
MStreet3 requested review from a team as code owners November 23, 2026 18:53
@MStreet3
MStreet3 enabled auto-merge November 23, 2026 18:56
@MStreet3
MStreet3 added this pull request to the merge queue Nov 24, 2026
Merged via the queue into develop with commit 21b2edb Nov 24, 2026
329 of 331 checks passed
@MStreet3
MStreet3 deleted the consensus-queue-registry-launch branch November 24, 2026 09:50
MStreet3 added a commit that referenced this pull request Nov 24, 2026
The consensus-queue defaults from #24260 left every blob limit at zero.
The reporting plugin in #24102 broadcasts trigger events as blobs and
rejects a config whose blob quotas cannot hold a full observation, so
DONs deployed with the defaults would fail to start the plugin once
#24102 lands.

Take #24102's limits as the defaults: 512 KiB observations, 4 modified
keys, 10 MiB of keys plus values, 5 MiB blobs, 100 unexpired blobs and
100 MiB of unexpired blob payload per oracle.

Refs: CRE-6011
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