Skip to content

Commit 847cef9

Browse files
authored
Merge pull request bnb-chain#2895 from bnb-chain/develop
Patch for release v1.5.6
2 parents d652149 + c84a7f8 commit 847cef9

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

miner/worker.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,6 +1391,24 @@ LOOP:
13911391
// when in-turn, compare with remote work.
13921392
from := bestWork.coinbase
13931393
if w.bidFetcher != nil && bestWork.header.Difficulty.Cmp(diffInTurn) == 0 {
1394+
// 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.
1395+
// Time left till sealing the block.
1396+
tillSealingTime := time.Until(time.Unix(int64(bestWork.header.Time), 0)) - w.config.DelayLeftOver
1397+
if tillSealingTime > max(100*time.Millisecond, w.config.DelayLeftOver) {
1398+
// Still a lot of time left, wait for the best bid.
1399+
// This happens during the peak time of the network, the local block building LOOP would break earlier than
1400+
// the final sealing time by meeting the errBlockInterruptedByOutOfGas criteria.
1401+
1402+
log.Info("commitWork local building finished, wait for the best bid", "tillSealingTime", common.PrettyDuration(tillSealingTime))
1403+
stopTimer.Reset(tillSealingTime)
1404+
select {
1405+
case <-stopTimer.C:
1406+
case <-interruptCh:
1407+
log.Debug("commitWork interruptCh closed, new block imported or resubmit triggered")
1408+
return
1409+
}
1410+
}
1411+
13941412
if pendingBid := w.bidFetcher.GetSimulatingBid(bestWork.header.ParentHash); pendingBid != nil {
13951413
waitBidTimer := time.NewTimer(waitMEVMinerEndTimeLimit)
13961414
defer waitBidTimer.Stop()

params/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ var (
235235
HaberTime: newUint64(1716962820), // 2024-05-29 06:07:00 AM UTC
236236
HaberFixTime: newUint64(1719986788), // 2024-07-03 06:06:28 AM UTC
237237
BohrTime: newUint64(1724116996), // 2024-08-20 01:23:16 AM UTC
238-
PascalTime: newUint64(1740021480), // 2025-02-20 03:18:00 AM UTC
239-
PragueTime: newUint64(1740021480), // 2025-02-20 03:18:00 AM UTC
238+
PascalTime: newUint64(1740452880), // 2025-02-25 03:08:00 AM UTC
239+
PragueTime: newUint64(1740452880), // 2025-02-25 03:08:00 AM UTC
240240

241241
Parlia: &ParliaConfig{
242242
Period: 3,

0 commit comments

Comments
 (0)