Merge branch 'temp-v2.1.1' into merge

This commit is contained in:
David Zhou 2025-06-19 11:29:58 -04:00
commit 776cc24c75
6 changed files with 16 additions and 8 deletions

View file

@ -15,11 +15,13 @@
"londonBlock": 23850000, "londonBlock": 23850000,
"shanghaiBlock": 50523000, "shanghaiBlock": 50523000,
"cancunBlock": 54876000, "cancunBlock": 54876000,
"pragueBlock": 73440256,
"bor": { "bor": {
"jaipurBlock": 23850000, "jaipurBlock": 23850000,
"delhiBlock": 38189056, "delhiBlock": 38189056,
"indoreBlock": 44934656, "indoreBlock": 44934656,
"ahmedabadBlock": 62278656, "ahmedabadBlock": 62278656,
"bhilaiBlock": 73440256,
"stateSyncConfirmationDelay": { "stateSyncConfirmationDelay": {
"44934656": 128 "44934656": 128
}, },

View file

@ -232,7 +232,7 @@ type Bor struct {
// The fields below are for testing only // The fields below are for testing only
fakeDiff bool // Skip difficulty verifications fakeDiff bool // Skip difficulty verifications
devFakeAuthor bool DevFakeAuthor bool
closeOnce sync.Once closeOnce sync.Once
} }
@ -277,7 +277,7 @@ func New(
GenesisContractsClient: genesisContracts, GenesisContractsClient: genesisContracts,
HeimdallClient: heimdallClient, HeimdallClient: heimdallClient,
spanStore: spanStore, spanStore: spanStore,
devFakeAuthor: devFakeAuthor, DevFakeAuthor: devFakeAuthor,
} }
c.authorizedSigner.Store(&signer{ c.authorizedSigner.Store(&signer{
@ -554,7 +554,7 @@ func (c *Bor) verifyCascadingFields(chain consensus.ChainHeaderReader, header *t
func (c *Bor) snapshot(chain consensus.ChainHeaderReader, number uint64, hash common.Hash, parents []*types.Header) (*Snapshot, error) { func (c *Bor) snapshot(chain consensus.ChainHeaderReader, number uint64, hash common.Hash, parents []*types.Header) (*Snapshot, error) {
// Search for a snapshot in memory or on disk for checkpoints // Search for a snapshot in memory or on disk for checkpoints
signer := common.BytesToAddress(c.authorizedSigner.Load().signer.Bytes()) signer := common.BytesToAddress(c.authorizedSigner.Load().signer.Bytes())
if c.devFakeAuthor && signer.String() != "0x0000000000000000000000000000000000000000" { if c.DevFakeAuthor && signer.String() != "0x0000000000000000000000000000000000000000" {
log.Info("👨💻Using DevFakeAuthor", "signer", signer) log.Info("👨💻Using DevFakeAuthor", "signer", signer)
val := valset.NewValidator(signer, 1000) val := valset.NewValidator(signer, 1000)

View file

@ -29,11 +29,13 @@ var mainnetBor = &Chain{
LondonBlock: big.NewInt(23850000), LondonBlock: big.NewInt(23850000),
ShanghaiBlock: big.NewInt(50523000), ShanghaiBlock: big.NewInt(50523000),
CancunBlock: big.NewInt(54876000), CancunBlock: big.NewInt(54876000),
PragueBlock: big.NewInt(73440256),
Bor: &params.BorConfig{ Bor: &params.BorConfig{
JaipurBlock: big.NewInt(23850000), JaipurBlock: big.NewInt(23850000),
DelhiBlock: big.NewInt(38189056), DelhiBlock: big.NewInt(38189056),
IndoreBlock: big.NewInt(44934656), IndoreBlock: big.NewInt(44934656),
AhmedabadBlock: big.NewInt(62278656), AhmedabadBlock: big.NewInt(62278656),
BhilaiBlock: big.NewInt(73440256),
StateSyncConfirmationDelay: map[string]uint64{ StateSyncConfirmationDelay: map[string]uint64{
"44934656": 128, "44934656": 128,
}, },

View file

@ -597,11 +597,13 @@ func (w *worker) mainLoop() {
} }
}() }()
bor, isBor := w.engine.(*bor.Bor)
devFakeAuthor := isBor && bor != nil && bor.DevFakeAuthor
for { for {
select { select {
case req := <-w.newWorkCh: case req := <-w.newWorkCh:
if w.chainConfig.ChainID.Cmp(params.BorMainnetChainConfig.ChainID) == 0 || w.chainConfig.ChainID.Cmp(params.MumbaiChainConfig.ChainID) == 0 || w.chainConfig.ChainID.Cmp(params.AmoyChainConfig.ChainID) == 0 { if w.chainConfig.ChainID.Cmp(params.BorMainnetChainConfig.ChainID) == 0 || w.chainConfig.ChainID.Cmp(params.MumbaiChainConfig.ChainID) == 0 || w.chainConfig.ChainID.Cmp(params.AmoyChainConfig.ChainID) == 0 {
if w.eth.PeerCount() > 0 { if w.eth.PeerCount() > 0 || devFakeAuthor {
//nolint:contextcheck //nolint:contextcheck
w.commitWork(req.interrupt, req.noempty, req.timestamp) w.commitWork(req.interrupt, req.noempty, req.timestamp)
} }

View file

@ -390,11 +390,13 @@ var (
LondonBlock: big.NewInt(23850000), LondonBlock: big.NewInt(23850000),
ShanghaiBlock: big.NewInt(50523000), ShanghaiBlock: big.NewInt(50523000),
CancunBlock: big.NewInt(54876000), CancunBlock: big.NewInt(54876000),
PragueBlock: big.NewInt(73440256),
Bor: &BorConfig{ Bor: &BorConfig{
JaipurBlock: big.NewInt(23850000), JaipurBlock: big.NewInt(23850000),
DelhiBlock: big.NewInt(38189056), DelhiBlock: big.NewInt(38189056),
IndoreBlock: big.NewInt(44934656), IndoreBlock: big.NewInt(44934656),
AhmedabadBlock: big.NewInt(62278656), AhmedabadBlock: big.NewInt(62278656),
BhilaiBlock: big.NewInt(73440256),
StateSyncConfirmationDelay: map[string]uint64{ StateSyncConfirmationDelay: map[string]uint64{
"44934656": 128, "44934656": 128,
}, },

View file

@ -23,10 +23,10 @@ import (
) )
const ( const (
VersionMajor = 2 // Major version component of the current release VersionMajor = 2 // Major version component of the current release
VersionMinor = 1 // Minor version component of the current release VersionMinor = 1 // Minor version component of the current release
VersionPatch = 0 // Patch version component of the current release VersionPatch = 1 // Patch version component of the current release
VersionMeta = "beta4" // Version metadata to append to the version string VersionMeta = "" // Version metadata to append to the version string
) )
var ( var (