Repository navigation
feat(cre): launch consensus-queue from the registry with OCR-config limits - #24260
Merged
Merged
Conversation
Contributor
|
✅ No conflicts with other open PRs targeting |
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
force-pushed
the
consensus-queue-registry-launch
branch
from
November 23, 2026 18:45
874d989 to
995e8d9
Compare
MStreet3
marked this pull request as ready for review
November 23, 2026 18:53
product-security-plaid-production
Bot
requested review from
bolekk,
ecPablo,
george-dorin and
vyzaldysanchez
November 23, 2026 18:53
MStreet3
enabled auto-merge
November 23, 2026 18:56
jmank88
approved these changes
Nov 23, 2026
mchain0
approved these changes
Nov 24, 2026
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
queuepb.ReportingPluginConfigproto holds theReportingPluginLimits.queuepb.Decoderejects configs that are empty, malformed, or that have zeroMaxObservationBytes,MaxKeyValueModifiedKeysorMaxKeyValueModifiedKeysPlusValuesBytes. It also applies libocr's own limit checks.NewReportingPlugindecodesOffchainConfigand returns an error before starting if the config is invalid. The delegate no longer parsesPluginConfig.V3_1OracleConfiggets a typedConsensusQueueOffchainConfigfield.DefaultConsensusQueueOffchainConfig()sets 256 KiB observations, 1000 modified keys and 4 MiB of modified keys plus values. The deployment tooling validates the config with the sameDecodethe node uses.Launch from the registry
Delegate.NewServicesgains aConsensusQueuecase.cre.goroutesconsensus-queue@*capability IDs to it.registryKVSubPath). The registry gives each launch a new external job ID, so the path can't use it.[Capabilities.Local] RegistryBasedLaunchAllowlist. The job spec code path andqueue.PluginConfigare removed.Local CRE
[]byte{}workaround inkeystone.go.consensus-queue@1.0.0toRegistryBasedLaunchAllowliston 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
NewConsensusQueuePluginFactoryno longer takes a plugin config.queue.PluginConfigis removed.Requires
None.
Supports
None.
Deployment Validation Steps
consensus-queue@1.0.0toRegistryBasedLaunchAllowliston the target nodes. Write the consensus-queue offchain config into the registry OCR config withConsensusQueueOffchainConfig.workflow-gateway-capabilities-don.toml): all 4 workflow nodes loggedjobName: consensus-queue@1.0.0withjobID: 0, and seqNr kept advancing. Smoke suite bucket A passes.runWithContractConfig: error writing new config to database(FKoffchainreporting2_contract_configs_oracle_spec_fkey) per node at startup. Every registry-launched OCR plugin, don-time included, hits it ondevelopbecause 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)
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 ondevelop.