Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simulators/ethereum/engine,pyspec: Update Trusted Setup #915

Merged
merged 5 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion configs/cancun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
dockerfile: git
build_args:
github: lightclient/go-ethereum
tag: devnet-9
tag: devnet-10

- client: nethermind
nametag: cancun-git
Expand Down
28 changes: 14 additions & 14 deletions simulators/ethereum/engine/devp2p/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,24 +103,24 @@ func (msg Transactions) Code() int { return 18 }
func (msg Transactions) ReqID() uint64 { return 18 }

// GetBlockHeaders represents a block header query.
type GetBlockHeaders eth.GetBlockHeadersPacket66
type GetBlockHeaders eth.GetBlockHeadersPacket

func (msg GetBlockHeaders) Code() int { return 19 }
func (msg GetBlockHeaders) ReqID() uint64 { return msg.RequestId }

type BlockHeaders eth.BlockHeadersPacket66
type BlockHeaders eth.BlockHeadersPacket

func (msg BlockHeaders) Code() int { return 20 }
func (msg BlockHeaders) ReqID() uint64 { return msg.RequestId }

// GetBlockBodies represents a GetBlockBodies request
type GetBlockBodies eth.GetBlockBodiesPacket66
type GetBlockBodies eth.GetBlockBodiesPacket

func (msg GetBlockBodies) Code() int { return 21 }
func (msg GetBlockBodies) ReqID() uint64 { return msg.RequestId }

// BlockBodies is the network packet for block content distribution.
type BlockBodies eth.BlockBodiesPacket66
type BlockBodies eth.BlockBodiesPacket

func (msg BlockBodies) Code() int { return 22 }
func (msg BlockBodies) ReqID() uint64 { return msg.RequestId }
Expand All @@ -132,7 +132,7 @@ func (msg NewBlock) Code() int { return 23 }
func (msg NewBlock) ReqID() uint64 { return 0 }

// NewPooledTransactionHashes66 is the network packet for the tx hash propagation message.
type NewPooledTransactionHashes66 eth.NewPooledTransactionHashesPacket66
type NewPooledTransactionHashes66 eth.NewPooledTransactionHashesPacket67

func (msg NewPooledTransactionHashes66) Code() int { return 24 }
func (msg NewPooledTransactionHashes66) ReqID() uint64 { return 0 }
Expand All @@ -143,7 +143,7 @@ type NewPooledTransactionHashes eth.NewPooledTransactionHashesPacket68
func (msg NewPooledTransactionHashes) Code() int { return 24 }
func (msg NewPooledTransactionHashes) ReqID() uint64 { return 0 }

type GetPooledTransactions eth.GetPooledTransactionsPacket66
type GetPooledTransactions eth.GetPooledTransactionsPacket

func (msg GetPooledTransactions) Code() int { return 25 }
func (msg GetPooledTransactions) ReqID() uint64 { return msg.RequestId }
Expand Down Expand Up @@ -200,25 +200,25 @@ func (c *Conn) Read() (Message, error) {
case (Status{}).Code():
msg = new(Status)
case (GetBlockHeaders{}).Code():
ethMsg := new(eth.GetBlockHeadersPacket66)
ethMsg := new(eth.GetBlockHeadersPacket)
if err := rlp.DecodeBytes(rawData, ethMsg); err != nil {
return nil, errorf("could not rlp decode message: %v, %x", err, rawData)
}
return (*GetBlockHeaders)(ethMsg), nil
case (BlockHeaders{}).Code():
ethMsg := new(eth.BlockHeadersPacket66)
ethMsg := new(eth.BlockHeadersPacket)
if err := rlp.DecodeBytes(rawData, ethMsg); err != nil {
return nil, errorf("could not rlp decode message: %v, %x", err, rawData)
}
return (*BlockHeaders)(ethMsg), nil
case (GetBlockBodies{}).Code():
ethMsg := new(eth.GetBlockBodiesPacket66)
ethMsg := new(eth.GetBlockBodiesPacket)
if err := rlp.DecodeBytes(rawData, ethMsg); err != nil {
return nil, errorf("could not rlp decode message: %v, %x", err, rawData)
}
return (*GetBlockBodies)(ethMsg), nil
case (BlockBodies{}).Code():
ethMsg := new(eth.BlockBodiesPacket66)
ethMsg := new(eth.BlockBodiesPacket)
if err := rlp.DecodeBytes(rawData, ethMsg); err != nil {
return nil, errorf("could not rlp decode message: %v, %x", err, rawData)
}
Expand All @@ -237,7 +237,7 @@ func (c *Conn) Read() (Message, error) {
}
msg = new(NewPooledTransactionHashes66)
case (GetPooledTransactions{}.Code()):
ethMsg := new(eth.GetPooledTransactionsPacket66)
ethMsg := new(eth.GetPooledTransactionsPacket)
if err := rlp.DecodeBytes(rawData, ethMsg); err != nil {
return nil, errorf("could not rlp decode message: %v, %x", err, rawData)
}
Expand Down Expand Up @@ -422,8 +422,8 @@ func (c *Conn) readAndServe(timeout time.Duration) (Message, error) {
return nil, errorf("could not get headers for inbound header request: %v", err)
}
resp := &BlockHeaders{
RequestId: msg.ReqID(),
BlockHeadersPacket: eth.BlockHeadersPacket(headers),
RequestId: msg.ReqID(),
BlockHeadersRequest: eth.BlockHeadersRequest(headers),
}
if _, err := c.Write(resp); err != nil {
return nil, errorf("could not write to connection: %v", err)
Expand Down Expand Up @@ -455,7 +455,7 @@ func (c *Conn) headersRequest(request *GetBlockHeaders, reqID uint64) ([]*types.
if !ok {
return nil, fmt.Errorf("unexpected message received: %s", pretty.Sdump(msg))
}
headers := []*types.Header(resp.BlockHeadersPacket)
headers := []*types.Header(resp.BlockHeadersRequest)
return headers, nil
}

Expand Down
33 changes: 17 additions & 16 deletions simulators/ethereum/engine/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ module github.com/ethereum/hive/simulators/ethereum/engine
go 1.20

require (
github.com/crate-crypto/go-kzg-4844 v0.3.0
github.com/crate-crypto/go-kzg-4844 v0.6.1-0.20231019121413-3621cc59f0c7
github.com/davecgh/go-spew v1.1.1
github.com/ethereum/go-ethereum v1.13.1
github.com/ethereum/hive v0.0.0-20230919110229-d58aec4a3eb5
github.com/golang-jwt/jwt/v4 v4.4.3
github.com/golang-jwt/jwt/v4 v4.5.0
github.com/holiman/uint256 v1.2.3
github.com/pkg/errors v0.9.1
golang.org/x/exp v0.0.0-20230810033253-352e893a4cad
golang.org/x/exp v0.0.0-20230905200255-921286631fa9
)

require (
github.com/DataDog/zstd v1.5.2 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/VictoriaMetrics/fastcache v1.12.0 // indirect
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.7.0 // indirect
Expand All @@ -25,15 +25,16 @@ require (
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cockroachdb/errors v1.9.1 // indirect
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
github.com/cockroachdb/pebble v0.0.0-20230906160148-46873a6a7a06 // indirect
github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 // indirect
github.com/cockroachdb/redact v1.1.3 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/consensys/bavard v0.1.13 // indirect
github.com/consensys/gnark-crypto v0.11.0 // indirect
github.com/consensys/gnark-crypto v0.12.1 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/deckarep/golang-set/v2 v2.1.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect
github.com/deepmap/oapi-codegen v1.12.4 // indirect
github.com/ethereum/c-kzg-4844 v0.3.1 // indirect
github.com/ethereum/c-kzg-4844 v0.3.2-0.20231019020040-748283cced54 // indirect
github.com/fjl/memsize v0.0.1 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect
Expand All @@ -42,7 +43,7 @@ require (
github.com/go-stack/stack v1.8.1 // indirect
github.com/gofrs/flock v0.8.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
Expand All @@ -59,7 +60,7 @@ require (
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
Expand All @@ -85,17 +86,17 @@ require (
github.com/urfave/cli/v2 v2.25.7 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
golang.org/x/crypto v0.12.0 // indirect
golang.org/x/mod v0.11.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.11.0 // indirect
golang.org/x/text v0.12.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.9.1 // indirect
golang.org/x/tools v0.13.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
rsc.io/tmplfunc v0.0.3 // indirect
)

replace github.com/ethereum/go-ethereum => github.com/lightclient/go-ethereum v1.10.10-0.20230926150549-ae44519d720c
replace github.com/ethereum/go-ethereum => github.com/lightclient/go-ethereum v1.10.10-0.20231019143932-4d161dee0c4c
Loading