goethereum dependency to v1.14~ (#14351)

* updating the goethereum dependency

* fixing dependencies

* reverting workspace

* more fixes, work in progress

* trying with upgraded geth version

* fixing deprecated functions except for the time related ones on eth1 distance due to time issues

* fixing time issues

* gaz

* fixing test and upgrading some dependencies and reverting others

* Disable cgo in hid, delete old vendored usb library

* changelog

* rolling back dependencies

* fixing go mod tidy

* Geth v1.13.6

* fix tests

* Add ping interval, set to 500ms for tests. This didnt work

* Update to v1.14.8

* Spread it out to different bootnodes

* Fix it

* Remove Memsize

* Update all out of date dependencies

* Fix geth body change

* Fix Test

* Fix Build

* Fix Tests

* Fix Tests Again

* Fix Tests Again

* Fix Tests

* Fix Test

* Copy USB Package for HID

* Push it up

* Finally fix all tests with felix's changes

* updating geth dependency

* Update go-ethereum to v1.14.11

* fixing import

* reverting blob change

* fixing Implicit memory aliasing in for loop.

* WIP changes

* wip getting a little further on e2e runs

* getting a little further

* getting a little further

* setting everything to capella

* more partial fixes

* more fixes but still WIP

* fixing access list transactions"

* some cleanup

* making configs dynamic

* reverting time

* skip lower bound in builder

* updating to geth v1.14.12

* fixing verify blob to pointer

* go mod tidy

* fixing linting

* missed removing another terminal difficulty item

* another missed update

* updating more dependencies to fix cicd

* fixing holiman dependency update

* downgrading geth to 1.14.11 due to p2p loop issue

* reverting builder middleware caused by downgrade

* fixing more rollback issues

* upgrading back to 1.14.12 after discussing with preston

* mod tidy

* gofmt

* partial review feedback

* trying to start e2e from bellatrix instead

* reverting some changes

---------

Co-authored-by: Preston Van Loon <preston@pvl.dev>
Co-authored-by: nisdas <nishdas93@gmail.com>
This commit is contained in:
james-prysm
2025-01-14 02:35:49 -06:00
committed by GitHub
parent e5784d09f0
commit e36564c4d3
57 changed files with 614 additions and 388 deletions

View File

@@ -18,7 +18,6 @@ go_library(
importpath = "github.com/prysmaticlabs/prysm/v5/runtime/debug",
visibility = ["//visibility:public"],
deps = [
"@com_github_fjl_memsize//memsizeui:go_default_library",
"@com_github_prometheus_client_golang//prometheus:go_default_library",
"@com_github_prometheus_client_golang//prometheus/promauto:go_default_library",
"@com_github_sirupsen_logrus//:go_default_library",

View File

@@ -37,7 +37,6 @@ import (
"sync"
"time"
"github.com/fjl/memsize/memsizeui"
log "github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"
)
@@ -45,8 +44,6 @@ import (
// Handler is the global debugging handler.
var Handler = new(HandlerT)
// Memsize is the memsizeui Handler(?).
var Memsize memsizeui.Handler
var (
// PProfFlag to enable pprof HTTP server.
PProfFlag = &cli.BoolFlag{
@@ -351,7 +348,6 @@ func Setup(ctx *cli.Context) error {
}
func startPProf(address string) {
http.Handle("/memsize/", http.StripPrefix("/memsize", &Memsize))
log.WithField("addr", fmt.Sprintf("http://%s/debug/pprof", address)).Info("Starting pprof server")
go func() {
srv := &http.Server{

View File

@@ -1,13 +1,13 @@
package interop
import (
"fmt"
"math"
"math/big"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/params"
clparams "github.com/prysmaticlabs/prysm/v5/config/params"
"github.com/prysmaticlabs/prysm/v5/time/slots"
@@ -126,57 +126,51 @@ func GethPragueTime(genesisTime uint64, cfg *clparams.BeaconChainConfig) *uint64
// like in an e2e test. The parameters are minimal but the full value is returned unmarshaled so that it can be
// customized as desired.
func GethTestnetGenesis(genesisTime uint64, cfg *clparams.BeaconChainConfig) *core.Genesis {
ttd, ok := big.NewInt(0).SetString(clparams.BeaconConfig().TerminalTotalDifficulty, 10)
if !ok {
panic(fmt.Sprintf("unable to parse TerminalTotalDifficulty as an integer = %s", clparams.BeaconConfig().TerminalTotalDifficulty))
}
shanghaiTime := GethShanghaiTime(genesisTime, cfg)
if cfg.CapellaForkEpoch == 0 {
shanghaiTime = &genesisTime
}
cancunTime := GethCancunTime(genesisTime, cfg)
if cfg.DenebForkEpoch == 0 {
cancunTime = &genesisTime
}
pragueTime := GethPragueTime(genesisTime, cfg)
if cfg.ElectraForkEpoch == 0 {
pragueTime = &genesisTime
}
cc := &params.ChainConfig{
ChainID: big.NewInt(defaultTestChainId),
HomesteadBlock: bigz,
DAOForkBlock: bigz,
EIP150Block: bigz,
EIP155Block: bigz,
EIP158Block: bigz,
ByzantiumBlock: bigz,
ConstantinopleBlock: bigz,
PetersburgBlock: bigz,
IstanbulBlock: bigz,
MuirGlacierBlock: bigz,
BerlinBlock: bigz,
LondonBlock: bigz,
ArrowGlacierBlock: bigz,
GrayGlacierBlock: bigz,
MergeNetsplitBlock: bigz,
TerminalTotalDifficulty: ttd,
TerminalTotalDifficultyPassed: false,
Clique: &params.CliqueConfig{
Period: cfg.SecondsPerETH1Block,
Epoch: 20000,
},
ShanghaiTime: shanghaiTime,
CancunTime: cancunTime,
PragueTime: pragueTime,
ChainID: big.NewInt(defaultTestChainId),
HomesteadBlock: bigz,
DAOForkBlock: bigz,
EIP150Block: bigz,
EIP155Block: bigz,
EIP158Block: bigz,
ByzantiumBlock: bigz,
ConstantinopleBlock: bigz,
PetersburgBlock: bigz,
IstanbulBlock: bigz,
MuirGlacierBlock: bigz,
BerlinBlock: bigz,
LondonBlock: bigz,
ArrowGlacierBlock: bigz,
GrayGlacierBlock: bigz,
MergeNetsplitBlock: bigz,
TerminalTotalDifficulty: bigz,
ShanghaiTime: shanghaiTime,
CancunTime: cancunTime,
PragueTime: pragueTime,
}
da := defaultDepositContractAllocation(cfg.DepositContractAddress)
ma := minerAllocation()
extra, err := hexutil.Decode(DefaultCliqueSigner)
if err != nil {
panic(fmt.Sprintf("unable to decode DefaultCliqueSigner, with error %v", err.Error()))
}
return &core.Genesis{
Config: cc,
Nonce: 0, // overridden for authorized signer votes in clique, so we should leave it empty?
Timestamp: genesisTime,
ExtraData: extra,
GasLimit: cfg.DefaultBuilderGasLimit,
Difficulty: common.HexToHash(defaultDifficulty).Big(),
Mixhash: common.HexToHash(defaultMixhash),
Coinbase: common.HexToAddress(defaultCoinbase),
Alloc: core.GenesisAlloc{
Alloc: types.GenesisAlloc{
da.Address: da.Account,
ma.Address: ma.Account,
},
@@ -186,13 +180,13 @@ func GethTestnetGenesis(genesisTime uint64, cfg *clparams.BeaconChainConfig) *co
type depositAllocation struct {
Address common.Address
Account core.GenesisAccount
Account types.Account
}
func minerAllocation() depositAllocation {
return depositAllocation{
Address: common.HexToAddress(defaultMinerAddress),
Account: core.GenesisAccount{
Account: types.Account{
Balance: minerBalance,
},
}
@@ -209,7 +203,7 @@ func defaultDepositContractAllocation(contractAddress string) depositAllocation
}
return depositAllocation{
Address: common.HexToAddress(contractAddress),
Account: core.GenesisAccount{
Account: types.Account{
Code: codeBytes,
Storage: s,
Balance: bigz,

View File

@@ -634,7 +634,7 @@ func (s *PremineGenesisConfig) setExecutionPayload(g state.BeaconState) error {
GasLimit: gb.GasLimit(),
GasUsed: gb.GasUsed(),
Timestamp: gb.Time(),
ExtraData: gb.Extra()[:32],
ExtraData: gb.Extra(),
BaseFeePerGas: bytesutil.PadTo(bytesutil.ReverseByteOrder(gb.BaseFee().Bytes()), fieldparams.RootLength),
BlockHash: gb.Hash().Bytes(),
Transactions: make([][]byte, 0),
@@ -673,7 +673,7 @@ func (s *PremineGenesisConfig) setExecutionPayload(g state.BeaconState) error {
GasLimit: gb.GasLimit(),
GasUsed: gb.GasUsed(),
Timestamp: gb.Time(),
ExtraData: gb.Extra()[:32],
ExtraData: gb.Extra(),
BaseFeePerGas: bytesutil.PadTo(bytesutil.ReverseByteOrder(gb.BaseFee().Bytes()), fieldparams.RootLength),
BlockHash: gb.Hash().Bytes(),
Transactions: make([][]byte, 0),
@@ -689,7 +689,6 @@ func (s *PremineGenesisConfig) setExecutionPayload(g state.BeaconState) error {
if err != nil {
return err
}
ed, err := blocks.WrappedExecutionPayloadHeaderCapella(eph)
if err != nil {
return err
@@ -710,7 +709,7 @@ func (s *PremineGenesisConfig) setExecutionPayload(g state.BeaconState) error {
GasLimit: gb.GasLimit(),
GasUsed: gb.GasUsed(),
Timestamp: gb.Time(),
ExtraData: gb.Extra()[:32],
ExtraData: gb.Extra(),
BaseFeePerGas: bytesutil.PadTo(bytesutil.ReverseByteOrder(gb.BaseFee().Bytes()), fieldparams.RootLength),
BlockHash: gb.Hash().Bytes(),
Transactions: make([][]byte, 0),