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
6 changes: 6 additions & 0 deletions yarn-project/foundation/src/config/env_var.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,12 @@ export type EnvVar =
| 'TX_COLLECTION_FILE_STORE_URLS'
| 'TX_COLLECTION_FILE_STORE_SLOW_DELAY_MS'
| 'TX_COLLECTION_FILE_STORE_FAST_DELAY_MS'
| 'TX_COLLECTION_FILE_STORE_FAST_WORKER_COUNT'
| 'TX_COLLECTION_FILE_STORE_SLOW_WORKER_COUNT'
| 'TX_COLLECTION_FILE_STORE_FAST_BACKOFF_BASE_MS'
| 'TX_COLLECTION_FILE_STORE_SLOW_BACKOFF_BASE_MS'
| 'TX_COLLECTION_FILE_STORE_FAST_BACKOFF_MAX_MS'
| 'TX_COLLECTION_FILE_STORE_SLOW_BACKOFF_MAX_MS'
| 'TX_FILE_STORE_URL'
| 'TX_FILE_STORE_UPLOAD_CONCURRENCY'
| 'TX_FILE_STORE_MAX_QUEUE_SIZE'
Expand Down
42 changes: 42 additions & 0 deletions yarn-project/p2p/src/services/tx_collection/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@ export type TxCollectionConfig = {
txCollectionFileStoreSlowDelayMs: number;
/** Delay in ms before file store collection starts after fast collection is triggered */
txCollectionFileStoreFastDelayMs: number;
/** Number of concurrent workers for fast file store collection */
txCollectionFileStoreFastWorkerCount: number;
/** Number of concurrent workers for slow file store collection */
txCollectionFileStoreSlowWorkerCount: number;
/** Base backoff time in ms for fast file store collection retries */
txCollectionFileStoreFastBackoffBaseMs: number;
/** Base backoff time in ms for slow file store collection retries */
txCollectionFileStoreSlowBackoffBaseMs: number;
/** Max backoff time in ms for fast file store collection retries */
txCollectionFileStoreFastBackoffMaxMs: number;
/** Max backoff time in ms for slow file store collection retries */
txCollectionFileStoreSlowBackoffMaxMs: number;
};

export const txCollectionConfigMappings: ConfigMappingsType<TxCollectionConfig> = {
Expand Down Expand Up @@ -121,4 +133,34 @@ export const txCollectionConfigMappings: ConfigMappingsType<TxCollectionConfig>
description: 'Delay before file store collection starts after fast collection',
...numberConfigHelper(2_000),
},
txCollectionFileStoreFastWorkerCount: {
env: 'TX_COLLECTION_FILE_STORE_FAST_WORKER_COUNT',
description: 'Number of concurrent workers for fast file store collection',
...numberConfigHelper(5),
},
txCollectionFileStoreSlowWorkerCount: {
env: 'TX_COLLECTION_FILE_STORE_SLOW_WORKER_COUNT',
description: 'Number of concurrent workers for slow file store collection',
...numberConfigHelper(2),
},
txCollectionFileStoreFastBackoffBaseMs: {
env: 'TX_COLLECTION_FILE_STORE_FAST_BACKOFF_BASE_MS',
description: 'Base backoff time in ms for fast file store collection retries',
...numberConfigHelper(1_000),
},
txCollectionFileStoreSlowBackoffBaseMs: {
env: 'TX_COLLECTION_FILE_STORE_SLOW_BACKOFF_BASE_MS',
description: 'Base backoff time in ms for slow file store collection retries',
...numberConfigHelper(5_000),
},
txCollectionFileStoreFastBackoffMaxMs: {
env: 'TX_COLLECTION_FILE_STORE_FAST_BACKOFF_MAX_MS',
description: 'Max backoff time in ms for fast file store collection retries',
...numberConfigHelper(5_000),
},
txCollectionFileStoreSlowBackoffMaxMs: {
env: 'TX_COLLECTION_FILE_STORE_SLOW_BACKOFF_MAX_MS',
description: 'Max backoff time in ms for slow file store collection retries',
...numberConfigHelper(30_000),
},
};
Loading
Loading