From b8c2a23eabdc5fd57856ef1d7c377b49567d03c3 Mon Sep 17 00:00:00 2001 From: Mohamed Mehany <7327188+mohamed-mehany@users.noreply.github.com> Date: Tue, 7 May 2024 21:55:08 +0200 Subject: [PATCH] Updates L2EP staleness threshold to 10 minutes --- .changeset/cold-penguins-hope.md | 5 +++++ packages/sources/layer2-sequencer-health/README.md | 2 +- packages/sources/layer2-sequencer-health/schemas/env.json | 2 +- packages/sources/layer2-sequencer-health/src/config/index.ts | 4 ++-- 4 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 .changeset/cold-penguins-hope.md diff --git a/.changeset/cold-penguins-hope.md b/.changeset/cold-penguins-hope.md new file mode 100644 index 0000000000..8aa28164ff --- /dev/null +++ b/.changeset/cold-penguins-hope.md @@ -0,0 +1,5 @@ +--- +'@chainlink/layer2-sequencer-health-adapter': minor +--- + +Updates block height staleness threshold (delta) to 10 minutes diff --git a/packages/sources/layer2-sequencer-health/README.md b/packages/sources/layer2-sequencer-health/README.md index 14a86c145a..12fc370a9d 100644 --- a/packages/sources/layer2-sequencer-health/README.md +++ b/packages/sources/layer2-sequencer-health/README.md @@ -6,7 +6,7 @@ Adapter that checks the Layer 2 Sequencer status | Required? | Name | Description | Options | Defaults to | | :-------: | :-------------------------------: | :-----------------------------------------------------------------------------: | :-----: | :--------------------------------------------------------------: | -| | `DELTA` | Maximum time in milliseconds from last seen block to consider sequencer healthy | | 120000 (2 min) | +| | `DELTA` | Maximum time in milliseconds from last seen block to consider sequencer healthy | | 600000 (10 min) | | | `DELTA_BLOCKS` | Maximum allowed number of blocks that Nodes can fall behind | | 6 | | | `NETWORK_TIMEOUT_LIMIT` | Maximum time in milliseconds to wait for a transaction receipt | | 5000 (5 secs) | | | `ARBITRUM_RPC_ENDPOINT` | Arbitrum RPC Endpoint | | https://arb1.arbitrum.io/rpc | diff --git a/packages/sources/layer2-sequencer-health/schemas/env.json b/packages/sources/layer2-sequencer-health/schemas/env.json index 56978c9ada..5745592db7 100644 --- a/packages/sources/layer2-sequencer-health/schemas/env.json +++ b/packages/sources/layer2-sequencer-health/schemas/env.json @@ -6,7 +6,7 @@ "properties": { "DELTA": { "type": "number", - "default": 180000 + "default": 600000 }, "ARBITRUM_RPC_ENDPOINT": { "type": "string", diff --git a/packages/sources/layer2-sequencer-health/src/config/index.ts b/packages/sources/layer2-sequencer-health/src/config/index.ts index 8b10e4a191..6a1b71df84 100644 --- a/packages/sources/layer2-sequencer-health/src/config/index.ts +++ b/packages/sources/layer2-sequencer-health/src/config/index.ts @@ -11,8 +11,8 @@ export const adapterContext: AdapterContext = { name: NAME, envDefaultOverrides export const DEFAULT_ENDPOINT = 'health' -// 2 minutes -export const DEFAULT_DELTA_TIME = 2 * 60 * 1000 +// 10 minutes +export const DEFAULT_DELTA_TIME = 10 * 60 * 1000 // Blocks that replica nodes can fall behind export const DEFAULT_DELTA_BLOCKS = 6 // milliseconds to consider a timeout transaction (10 secs)