Merge branch 'v1.2.5-beta-candidate' into shivam/upstream-geth-1.13.5

This commit is contained in:
Shivam Sharma 2024-02-12 16:33:55 +05:30
commit 01740e47de
16 changed files with 48 additions and 37 deletions

View file

@ -14,6 +14,7 @@
"berlinBlock": 13996000,
"londonBlock": 22640000,
"shanghaiBlock": 41874000,
"cancunBlock": 45648608,
"bor": {
"jaipurBlock": 22770000,
"delhiBlock": 29638656,

View file

@ -15,7 +15,8 @@
// along with go-ethereum. If not, see <http://www.gnu.org/licenses/>.
// bootnode runs a bootstrap node for the Ethereum Discovery Protocol.
package main
// Keep package as bootnode during upstram merge.
package bootnode
import (
"crypto/ecdsa"
@ -34,6 +35,7 @@ import (
"github.com/ethereum/go-ethereum/p2p/netutil"
)
// nolint
func main() {
var (
listenAddr = flag.String("addr", ":30301", "listen address")
@ -213,3 +215,12 @@ func doPortMapping(natm nat.Interface, ln *enode.LocalNode, addr *net.UDPAddr) *
return extaddr
}
// Implemented separate functions so that there are minimal conflicts during upstream merge
func PrintNotice(nodeKey *ecdsa.PublicKey, addr net.UDPAddr) {
printNotice(nodeKey, addr)
}
func DoPortMapping(natm nat.Interface, ln *enode.LocalNode, addr *net.UDPAddr) *net.UDPAddr {
return doPortMapping(natm, ln, addr)
}

View file

@ -37,6 +37,8 @@ var (
rewindLengthMeter = metrics.NewRegisteredMeter("chain/autorewind/length", nil)
)
const maxRewindLen uint64 = 126
type borVerifier struct {
verify func(ctx context.Context, eth *Ethereum, handler *ethHandler, start uint64, end uint64, hash string, isCheckpoint bool) (string, error)
}
@ -117,8 +119,8 @@ func borVerify(ctx context.Context, eth *Ethereum, handler *ethHandler, start ui
}
}
if head-rewindTo > 255 {
rewindTo = head - 255
if head-rewindTo > maxRewindLen {
rewindTo = head - maxRewindLen
}
if isCheckpoint {

View file

@ -13,6 +13,7 @@ import (
"syscall"
"time"
"github.com/ethereum/go-ethereum/cmd/bootnode"
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/internal/cli/flagset"
@ -213,33 +214,25 @@ func (b *BootnodeCommand) Run(args []string) int {
}
conn, err := net.ListenUDP("udp", addr)
if err != nil {
b.UI.Error(fmt.Sprintf("failed to listen udp addr '%s': %v", b.listenAddr, err))
return 1
}
realaddr := conn.LocalAddr().(*net.UDPAddr)
if natm != nil {
if !realaddr.IP.IsLoopback() {
go nat.Map(natm, nil, "udp", realaddr.Port, realaddr.Port, "ethereum discovery")
}
if ext, err := natm.ExternalIP(); err == nil {
// nolint: govet
realaddr = &net.UDPAddr{IP: ext, Port: realaddr.Port}
}
}
n := enode.NewV4(&nodeKey.PublicKey, addr.IP, addr.Port, addr.Port)
b.UI.Info(n.String())
if b.dryRun {
return 0
}
defer conn.Close()
db, _ := enode.OpenDB("")
ln := enode.NewLocalNode(db, nodeKey)
listenerAddr := conn.LocalAddr().(*net.UDPAddr)
if natm != nil {
natAddr := bootnode.DoPortMapping(natm, ln, listenerAddr)
if natAddr != nil {
listenerAddr = natAddr
}
}
bootnode.PrintNotice(&nodeKey.PublicKey, *listenerAddr)
cfg := discover.Config{
PrivateKey: nodeKey,
Log: log.Root(),

View file

@ -28,6 +28,7 @@ var mumbaiTestnet = &Chain{
BerlinBlock: big.NewInt(13996000),
LondonBlock: big.NewInt(22640000),
ShanghaiBlock: big.NewInt(41874000),
CancunBlock: big.NewInt(45648608),
Bor: &params.BorConfig{
JaipurBlock: big.NewInt(22770000),
DelhiBlock: big.NewInt(29638656),

View file

@ -15,6 +15,7 @@
"berlinBlock": 13996000,
"londonBlock": 13996000,
"shanghaiBlock": 41874000,
"cancunBlock": 45648608,
"bor": {
"period": {
"0": 2,

View file

@ -17,6 +17,7 @@
"berlinBlock":13996000,
"londonBlock":13996000,
"shanghaiBlock": 41874000,
"cancunBlock": 45648608,
"bor":{
"period":{
"0":2,

View file

@ -925,7 +925,7 @@ func (w *worker) commitTransactions(env *environment, txs *transactionsByPriceAn
EnableMVHashMap := w.chainConfig.IsCancun(env.header.Number)
// create and add empty mvHashMap in statedb
if EnableMVHashMap {
if EnableMVHashMap && w.IsRunning() {
deps = map[int]map[int]bool{}
chDeps = make(chan blockstm.TxDep)
@ -961,7 +961,7 @@ func (w *worker) commitTransactions(env *environment, txs *transactionsByPriceAn
mainloop:
for {
if interruptCtx != nil {
if EnableMVHashMap {
if EnableMVHashMap && w.IsRunning() {
env.state.AddEmptyMVHashMap()
}
@ -1070,7 +1070,7 @@ mainloop:
coalescedLogs = append(coalescedLogs, logs...)
env.tcount++
if EnableMVHashMap {
if EnableMVHashMap && w.IsRunning() {
env.depsMVFullWriteList = append(env.depsMVFullWriteList, env.state.MVFullWriteList())
env.mvReadMapList = append(env.mvReadMapList, env.state.MVReadMap())
@ -1100,7 +1100,7 @@ mainloop:
txs.Pop()
}
if EnableMVHashMap {
if EnableMVHashMap && w.IsRunning() {
env.state.ClearReadMap()
env.state.ClearWriteMap()
}

View file

@ -1,5 +1,5 @@
Source: bor
Version: 1.2.3
Version: 1.2.5-beta
Section: develop
Priority: standard
Maintainer: Polygon <release-team@polygon.technology>

View file

@ -1,5 +1,5 @@
Source: bor
Version: 1.2.3
Version: 1.2.5-beta
Section: develop
Priority: standard
Maintainer: Polygon <release-team@polygon.technology>

View file

@ -1,5 +1,5 @@
Source: bor-profile
Version: 1.2.3
Version: 1.2.5-beta
Section: develop
Priority: standard
Maintainer: Polygon <release-team@polygon.technology>

View file

@ -1,5 +1,5 @@
Source: bor-profile
Version: 1.2.3
Version: 1.2.5-beta
Section: develop
Priority: standard
Maintainer: Polygon <release-team@polygon.technology>

View file

@ -1,5 +1,5 @@
Source: bor-profile
Version: 1.2.3
Version: 1.2.5-beta
Section: develop
Priority: standard
Maintainer: Polygon <release-team@polygon.technology>

View file

@ -1,5 +1,5 @@
Source: bor-profile
Version: 1.2.3
Version: 1.2.5-beta
Section: develop
Priority: standard
Maintainer: Polygon <release-team@polygon.technology>

View file

@ -199,6 +199,7 @@ var (
BerlinBlock: big.NewInt(13996000),
LondonBlock: big.NewInt(22640000),
ShanghaiBlock: big.NewInt(41874000),
CancunBlock: big.NewInt(45648608),
Bor: &BorConfig{
JaipurBlock: big.NewInt(22770000),
DelhiBlock: big.NewInt(29638656),

View file

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