Skip to content

Commit

Permalink
common,docs: Update subgraph maxBlockDistance default values
Browse files Browse the repository at this point in the history
The default values were far too strict, leading to the agent operations
halting
  • Loading branch information
fordN committed Jul 12, 2024
1 parent f7bfcdd commit 772cdc3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
11 changes: 3 additions & 8 deletions docs/subgraph-freshness.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,15 @@ Here is a snippet of an Arbitrum network specification file with the suggested o

```yaml
subgraphs:
maxBlockDistance: 60
maxBlockDistance: 5000
freshnessSleepMilliseconds: 10000
```
## Practical Implications
The following default values have been established based on **Ethereum** observations:
The following default values have been established based on **Arbitrum-One** observations:
- **maxBlockDistance:** 0 blocks
- **freshnessSleepMilliseconds:** 5000 (5 seconds)
The recommended settings for **Arbitrum** networks are:
- **maxBlockDistance:** 60 blocks
- **maxBlockDistance:** 1000 blocks
- **freshnessSleepMilliseconds:** 10000 (10 seconds)
Expand Down
4 changes: 2 additions & 2 deletions packages/indexer-common/src/network-specification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ export type Subgraph = z.infer<typeof Subgraph>
// All pertinent subgraphs in the protocol
export const ProtocolSubgraphs = z
.object({
maxBlockDistance: z.number().nonnegative().finite().default(0),
freshnessSleepMilliseconds: positiveNumber().default(5_000),
maxBlockDistance: z.number().nonnegative().finite().default(1000),
freshnessSleepMilliseconds: positiveNumber().default(10_000),
networkSubgraph: Subgraph,
epochSubgraph: Subgraph,
tapSubgraph: OptionalSubgraph,
Expand Down

0 comments on commit 772cdc3

Please sign in to comment.