From 0c71440c1edac533a5472057b199bdd0b4fa875f Mon Sep 17 00:00:00 2001 From: Paul <108695806+pxrl@users.noreply.github.com> Date: Tue, 31 Dec 2024 07:20:40 +0100 Subject: [PATCH] improve(retryProvider): Skip quorum on pending blocks (#811) The relayer is currently using the pending block to determine the current base fee. This is inherently incompatible with quorum because some chains will typically not return a consistent pending block. --- package.json | 2 +- src/providers/retryProvider.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 311df23c..62577d2e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@across-protocol/sdk", "author": "UMA Team", - "version": "3.3.30", + "version": "3.3.31", "license": "AGPL-3.0", "homepage": "https://docs.across.to/reference/sdk", "files": [ diff --git a/src/providers/retryProvider.ts b/src/providers/retryProvider.ts index 76d4f38e..8b1a3c29 100644 --- a/src/providers/retryProvider.ts +++ b/src/providers/retryProvider.ts @@ -320,7 +320,7 @@ export class RetryProvider extends ethers.providers.StaticJsonRpcProvider { } // getBlockByNumber should only use the quorum if it's not asking for the latest block. - if (method === "eth_getBlockByNumber" && params[0] !== "latest") { + if (method === "eth_getBlockByNumber" && params[0] !== "latest" && params[0] !== "pending") { return this.nodeQuorumThreshold; }