From 2c662bdbf139616589a58b00d2d4219bc4788321 Mon Sep 17 00:00:00 2001 From: zzzckck <152148891+zzzckck@users.noreply.github.com> Date: Fri, 14 Feb 2025 15:56:37 +0800 Subject: [PATCH 1/2] config: update BSC Testnet hardfork date: Pascal & Praque (#2894) expected Testet Pascal&Praque hard fork date: 2025-02-25 03:08:00 AM UTC --- params/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/params/config.go b/params/config.go index c8e05ee430..8a8d1f5cae 100644 --- a/params/config.go +++ b/params/config.go @@ -235,8 +235,8 @@ var ( HaberTime: newUint64(1716962820), // 2024-05-29 06:07:00 AM UTC HaberFixTime: newUint64(1719986788), // 2024-07-03 06:06:28 AM UTC BohrTime: newUint64(1724116996), // 2024-08-20 01:23:16 AM UTC - PascalTime: newUint64(1740021480), // 2025-02-20 03:18:00 AM UTC - PragueTime: newUint64(1740021480), // 2025-02-20 03:18:00 AM UTC + PascalTime: newUint64(1740452880), // 2025-02-25 03:08:00 AM UTC + PragueTime: newUint64(1740452880), // 2025-02-25 03:08:00 AM UTC Parlia: &ParliaConfig{ Period: 3, From c84a7f82f801b202a063a26d67514f0c972622d3 Mon Sep 17 00:00:00 2001 From: Mars Date: Fri, 14 Feb 2025 03:04:00 -0500 Subject: [PATCH 2/2] fix: wait builder's final bid during the peak time (#2892) --- miner/worker.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/miner/worker.go b/miner/worker.go index 31eb752901..e23b0eced0 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -1391,6 +1391,24 @@ LOOP: // when in-turn, compare with remote work. from := bestWork.coinbase if w.bidFetcher != nil && bestWork.header.Difficulty.Cmp(diffInTurn) == 0 { + // We want to start sealing the block as late as possible here if mev is enabled, so we could give builder the chance to send their final bid. + // Time left till sealing the block. + tillSealingTime := time.Until(time.Unix(int64(bestWork.header.Time), 0)) - w.config.DelayLeftOver + if tillSealingTime > max(100*time.Millisecond, w.config.DelayLeftOver) { + // Still a lot of time left, wait for the best bid. + // This happens during the peak time of the network, the local block building LOOP would break earlier than + // the final sealing time by meeting the errBlockInterruptedByOutOfGas criteria. + + log.Info("commitWork local building finished, wait for the best bid", "tillSealingTime", common.PrettyDuration(tillSealingTime)) + stopTimer.Reset(tillSealingTime) + select { + case <-stopTimer.C: + case <-interruptCh: + log.Debug("commitWork interruptCh closed, new block imported or resubmit triggered") + return + } + } + if pendingBid := w.bidFetcher.GetSimulatingBid(bestWork.header.ParentHash); pendingBid != nil { waitBidTimer := time.NewTimer(waitMEVMinerEndTimeLimit) defer waitBidTimer.Stop()