diff --git a/deployment/cre/ocr3/ocr3_1/config_test.go b/deployment/cre/ocr3/ocr3_1/config_test.go index 685760e825b..2454a7d00f8 100644 --- a/deployment/cre/ocr3/ocr3_1/config_test.go +++ b/deployment/cre/ocr3/ocr3_1/config_test.go @@ -488,11 +488,26 @@ func Test_GenerateOCR3_1Config_ConsensusQueueOffchainConfig(t *testing.T) { t.Errorf("encoded limits mismatch (-want +got):\n%s", diff) } + // Asserts the defaults decode on the node and keep the blob quotas the plugin needs. t.Run("defaults are valid", func(t *testing.T) { b, err := DefaultConsensusQueueOffchainConfig().Marshal() require.NoError(t, err) - _, err = queuepb.Decode(b) + decoded, err := queuepb.Decode(b) require.NoError(t, err) + got, err := decoded.OCRLimits() + require.NoError(t, err) + + want := ocr3_1types.ReportingPluginLimits{ + MaxObservationBytes: 512 * 1024, + MaxKeyValueModifiedKeys: 4, + MaxKeyValueModifiedKeysPlusValuesBytes: 10 * 1024 * 1024, + MaxBlobPayloadBytes: 5 * 1024 * 1024, + MaxPerOracleUnexpiredBlobCumulativePayloadBytes: 100 * 1024 * 1024, + MaxPerOracleUnexpiredBlobCount: 100, + } + if diff := cmp.Diff(want, got); diff != "" { + t.Errorf("default limits mismatch (-want +got):\n%s", diff) + } }) t.Run("invalid limits fail to marshal", func(t *testing.T) { diff --git a/deployment/cre/ocr3/ocr3_1/oracle_config.go b/deployment/cre/ocr3/ocr3_1/oracle_config.go index f540ad1c526..b082f0cb7ce 100644 --- a/deployment/cre/ocr3/ocr3_1/oracle_config.go +++ b/deployment/cre/ocr3/ocr3_1/oracle_config.go @@ -130,14 +130,19 @@ type ConsensusQueueLimits struct { } // DefaultConsensusQueueOffchainConfig returns starting limits for a consensus-queue DON. -// The plugin has no queries, reports or blobs yet, so those limits are zero. +// The plugin broadcasts trigger events as blobs, so the blob quotas hold every blob in a full observation, +// and it writes a fixed handful of KV keys per round. +// The plugin has no queries or reports, so those limits are zero. // The node never applies defaults itself. Different node versions would otherwise disagree under the same digest. func DefaultConsensusQueueOffchainConfig() *ConsensusQueueOffchainConfig { return &ConsensusQueueOffchainConfig{ Limits: ConsensusQueueLimits{ - MaxObservationBytes: 256 * 1024, - MaxKeyValueModifiedKeys: 1_000, - MaxKeyValueModifiedKeysPlusValuesBytes: 4 * 1024 * 1024, + MaxObservationBytes: 512 * 1024, + MaxKeyValueModifiedKeys: 4, + MaxKeyValueModifiedKeysPlusValuesBytes: 10 * 1024 * 1024, + MaxBlobPayloadBytes: 5 * 1024 * 1024, + MaxPerOracleUnexpiredBlobCumulativePayloadBytes: 100 * 1024 * 1024, + MaxPerOracleUnexpiredBlobCount: 100, }, } }