Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions llo/dev/v31/blobpump.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ const (
// MinBlobLifetimeRounds is the smallest lifetime that lets a snapshot be
// offered for one round.
MinBlobLifetimeRounds = BlobFetchMarginRounds + 1
// DefaultBlobObservationDurationMultiplier scales MaxDurationObservation
// into the pump's per-cycle budget. The pump runs off the OCR critical
// path, so it can afford to wait longer than a synchronous observation.
DefaultBlobObservationDurationMultiplier = 2
// MaxBlobLifetimeRounds bounds BlobLifetimeRounds. The pump broadcasts
// roughly one blob per round, so the unexpired-blob budget declared to
// libocr grows with the lifetime; this keeps that budget sane.
Expand Down
7 changes: 4 additions & 3 deletions llo/dev/v31/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ type PluginFactoryParams struct {
// [MinBlobLifetimeRounds, MaxBlobLifetimeRounds].
BlobLifetimeRounds uint64
// MaxDurationBlobObservation overrides the pump's per-cycle observation
// budget (default: DefaultBlobObservationDurationMultiplier *
// cfg.MaxDurationObservation).
// budget (default: cfg.MaxDurationObservation, the deadline v30 passes to
// DataSource.Observe). The data source scales its cache TTL and refresh
// cadence with this budget, so a larger value serves older values.
MaxDurationBlobObservation time.Duration
// BlobInFlightWaitFactor overrides defaultBlobInFlightWaitFactor if
// non-zero. Divides cfg.MaxDurationObservation into how long Take waits for
Expand Down Expand Up @@ -136,7 +137,7 @@ func (f *PluginFactory) NewReportingPlugin(ctx context.Context, cfg ocr3types.Re

blobObservationTimeout := f.MaxDurationBlobObservation
if blobObservationTimeout <= 0 {
blobObservationTimeout = DefaultBlobObservationDurationMultiplier * cfg.MaxDurationObservation
blobObservationTimeout = cfg.MaxDurationObservation
}

p := &Plugin{
Expand Down
2 changes: 1 addition & 1 deletion llo/dev/v31/flow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ func Test_Factory_NewReportingPlugin_maxDurationObservation(t *testing.T) {
p, _, err := f.NewReportingPlugin(ctx, cfg, nil)
require.NoError(t, err)
pump := p.(*Plugin).pump
require.Equal(t, DefaultBlobObservationDurationMultiplier*time.Second, pump.observationTimeout)
require.Equal(t, time.Second, pump.observationTimeout)
require.Equal(t, time.Second/time.Duration(defaultBlobInFlightWaitFactor), pump.inFlightWait)
require.NoError(t, p.Close())
})
Expand Down
2 changes: 1 addition & 1 deletion llo/pluginconfig/v31config.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ type V31Config struct {
BlobLifetimeRounds uint64 `json:"blobLifetimeRounds" toml:"blobLifetimeRounds"`

// MaxDurationBlobObservation is the blob pump's per-cycle observation
// budget.
// budget. Zero uses the OCR MaxDurationObservation, as v30 does.
MaxDurationBlobObservation Duration `json:"maxDurationBlobObservation" toml:"maxDurationBlobObservation"`

// BlobInFlightWaitFactor divides MaxDurationObservation into how long Take
Expand Down
Loading