From 78411f75c19ef2b09dd755aca40a25585623c0ad Mon Sep 17 00:00:00 2001 From: Morty <70688412+yiweichi@users.noreply.github.com> Date: Thu, 7 Aug 2025 22:42:24 +0800 Subject: [PATCH] fix(GPO): failed to get block receipt during calculating suggest price tip (#1233) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(GPO): failed to get block receipt during calculating suggest priority fee * chore: auto version bump [bot] * change debug level * degrade version * chore: auto version bump [bot] * degrade version --- eth/gasprice/scroll_gasprice.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/eth/gasprice/scroll_gasprice.go b/eth/gasprice/scroll_gasprice.go index 2a03ddac02..c6a9d4ff1a 100644 --- a/eth/gasprice/scroll_gasprice.go +++ b/eth/gasprice/scroll_gasprice.go @@ -43,7 +43,12 @@ func (oracle *Oracle) calculateSuggestPriorityFee(ctx context.Context, header *t // capacity margin receipts, err := oracle.backend.GetReceipts(ctx, header.Hash()) if receipts == nil || err != nil { - log.Error("failed to get block receipts", "block number", header.Number, "err", err) + log.Debug("failed to get block receipts during calculating suggest priority fee", "block number", header.Number, "err", err) + // If the lastIsCongested is true on the cache, return the lastPrice. + // We believe it's better to err on the side of returning a higher-than-needed suggestion than a lower-than-needed one. + if lastIsCongested { + return lastPrice, lastIsCongested + } return suggestion, isCongested } var maxTxGasUsed uint64