@effectstream/utils 0.100.21 → 0.100.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/config.ts +10 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effectstream/utils",
3
- "version": "0.100.21",
3
+ "version": "0.100.23",
4
4
  "license": "MIT",
5
5
  "homepage": "https://effectstream.github.io/docs/",
6
6
  "repository": {
package/src/config.ts CHANGED
@@ -321,6 +321,13 @@ const definitions: Record<string, ConfigDefinition> = {
321
321
  description:
322
322
  "Fold consecutive empty catch-up blocks into one DB transaction when behind the chain tip. Default: false.",
323
323
  },
324
+ EFFECTSTREAM_FINALIZED_STREAM_CAP: {
325
+ key: "EFFECTSTREAM_FINALIZED_STREAM_CAP",
326
+ type: "number",
327
+ defaultValue: 2048,
328
+ description:
329
+ "Backpressure cap on the in-memory finalized-block queue between the merge and the runtime apply loop. The merge blocks once this many produced blocks are unconsumed, bounding memory during deep catch-up. Default: 2048.",
330
+ },
324
331
  } as const;
325
332
 
326
333
  type ENV_TYPES = string | number | boolean | undefined;
@@ -461,6 +468,9 @@ export class ENV {
461
468
  static get EFFECTSTREAM_COALESCE_EMPTY_BLOCKS(): boolean {
462
469
  return ENV.getConfig(definitions.EFFECTSTREAM_COALESCE_EMPTY_BLOCKS);
463
470
  }
471
+ static get EFFECTSTREAM_FINALIZED_STREAM_CAP(): number {
472
+ return ENV.getConfig(definitions.EFFECTSTREAM_FINALIZED_STREAM_CAP);
473
+ }
464
474
 
465
475
  public static getConfig<T>(config: ConfigDefinition): T {
466
476
  switch (config.type) {