Skip to content

Commit 56af3dc

Browse files
authored
Merge pull request #1810 from 0xPolygon/v2.3.1-hotfix-2
V2.3.1 hotfix 2
2 parents 2d6045e + 4d35c0f commit 56af3dc

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

consensus/bor/bor.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,11 +1203,12 @@ func (c *Bor) Seal(chain consensus.ChainHeaderReader, block *types.Block, witnes
12031203
// Sweet, the protocol permits us to sign the block, wait for our time
12041204
if c.config.IsBhilai(header.Number) {
12051205
delay = time.Until(time.Unix(int64(header.Time), 0)) // Wait until we reach header time for non-primary validators
1206-
if successionNumber == 0 {
1207-
// For primary producers, set the delay to `header.Time - block time` instead of `header.Time`
1208-
// for early block announcement instead of waiting for full block time.
1209-
delay = time.Until(time.Unix(int64(header.Time-c.config.CalculatePeriod(number)), 0))
1210-
}
1206+
// Disable early block announcement
1207+
// if successionNumber == 0 {
1208+
// // For primary producers, set the delay to `header.Time - block time` instead of `header.Time`
1209+
// // for early block announcement instead of waiting for full block time.
1210+
// delay = time.Until(time.Unix(int64(header.Time-c.config.CalculatePeriod(number)), 0))
1211+
// }
12111212
} else {
12121213
delay = time.Until(time.Unix(int64(header.Time), 0)) // Wait until we reach header time
12131214
}

miner/worker.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1555,7 +1555,12 @@ func (w *worker) commitWork(interrupt *atomic.Int32, noempty bool, timestamp int
15551555

15561556
// Create an empty block based on temporary copied state for
15571557
// sealing in advance without waiting block execution finished.
1558-
if !noempty && !w.noempty.Load() {
1558+
// If the block is a veblop block, we will never try to create a commit for an empty block.
1559+
var isRio bool
1560+
if w.chainConfig.Bor != nil {
1561+
isRio = w.chainConfig.Bor.IsRio(work.header.Number)
1562+
}
1563+
if !noempty && !w.noempty.Load() && !isRio {
15591564
_ = w.commit(work.copy(), nil, false, start)
15601565
}
15611566
// Fill pending transactions from the txpool into the block.

params/version.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ import (
2323
)
2424

2525
const (
26-
VersionMajor = 2 // Major version component of the current release
27-
VersionMinor = 3 // Minor version component of the current release
28-
VersionPatch = 1 // Patch version component of the current release
29-
VersionMeta = "miner-fix" // Version metadata to append to the version string
26+
VersionMajor = 2 // Major version component of the current release
27+
VersionMinor = 3 // Minor version component of the current release
28+
VersionPatch = 1 // Patch version component of the current release
29+
VersionMeta = "hotfix" // Version metadata to append to the version string
3030
)
3131

3232
var (

0 commit comments

Comments
 (0)