Skip to content

Commit

Permalink
Merge branch 'syncUpstream/active' into jt/permissionless-batches-rec…
Browse files Browse the repository at this point in the history
…overy
  • Loading branch information
jonastheis authored Nov 18, 2024
2 parents afdc961 + 4f473ce commit 86aa203
Show file tree
Hide file tree
Showing 211 changed files with 6,719 additions and 3,373 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ jobs:
- stage: build
if: type = push
os: osx
osx_image: xcode14.2
go: 1.21.x
env:
- azure-osx
Expand All @@ -104,6 +105,8 @@ jobs:
script:
- go run build/ci.go install -dlgo
- go run build/ci.go archive -type tar -signer OSX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
- go run build/ci.go install -dlgo -arch arm64
- go run build/ci.go archive -arch arm64 -type tar -signer OSX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds

# These builders run the tests
- stage: build
Expand Down
30 changes: 15 additions & 15 deletions build/checksums.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
# https://github.com/ethereum/execution-spec-tests/releases/download/v1.0.6/
485af7b66cf41eb3a8c1bd46632913b8eb95995df867cf665617bbc9b4beedd1 fixtures_develop.tar.gz

# version:golang 1.21.3
# version:golang 1.21.4
# https://go.dev/dl/
186f2b6f8c8b704e696821b09ab2041a5c1ee13dcbc3156a13adcf75931ee488 go1.21.3.src.tar.gz
27014fc69e301d7588a169ca239b3cc609f0aa1abf38528bf0d20d3b259211eb go1.21.3.darwin-amd64.tar.gz
65302a7a9f7a4834932b3a7a14cb8be51beddda757b567a2f9e0cbd0d7b5a6ab go1.21.3.darwin-arm64.tar.gz
8e0cd2f66cf1bde9d07b4aee01e3d7c3cfdd14e20650488e1683da4b8492594a go1.21.3.freebsd-386.tar.gz
6e74f65f586e93d1f3947894766f69e9b2ebda488592a09df61f36f06bfe58a8 go1.21.3.freebsd-amd64.tar.gz
fb209fd070db500a84291c5a95251cceeb1723e8f6142de9baca5af70a927c0e go1.21.3.linux-386.tar.gz
1241381b2843fae5a9707eec1f8fb2ef94d827990582c7c7c32f5bdfbfd420c8 go1.21.3.linux-amd64.tar.gz
fc90fa48ae97ba6368eecb914343590bbb61b388089510d0c56c2dde52987ef3 go1.21.3.linux-arm64.tar.gz
a1ddcaaf0821a12a800884c14cb4268ce1c1f5a0301e9060646f1e15e611c6c7 go1.21.3.linux-armv6l.tar.gz
3b0e10a3704f164a6e85e0377728ec5fd21524fabe4c925610e34076586d5826 go1.21.3.linux-ppc64le.tar.gz
4c78e2e6f4c684a3d5a9bdc97202729053f44eb7be188206f0627ef3e18716b6 go1.21.3.linux-s390x.tar.gz
e36737f4f2fadb4d2f919ec4ce517133a56e06064cca6e82fc883bb000c4d56c go1.21.3.windows-386.zip
27c8daf157493f288d42a6f38debc6a2cb391f6543139eba9152fceca0be2a10 go1.21.3.windows-amd64.zip
bfb7a5c56f9ded07d8ae0e0b3702ac07b65e68fa8f33da24ed6df4ce01fe2c5c go1.21.3.windows-arm64.zip
47b26a83d2b65a3c1c1bcace273b69bee49a7a7b5168a7604ded3d26a37bd787 go1.21.4.src.tar.gz
cd3bdcc802b759b70e8418bc7afbc4a65ca73a3fe576060af9fc8a2a5e71c3b8 go1.21.4.darwin-amd64.tar.gz
8b7caf2ac60bdff457dba7d4ff2a01def889592b834453431ae3caecf884f6a5 go1.21.4.darwin-arm64.tar.gz
f1e685d086eb36f4be5b8b953b52baf7752bc6235400d84bb7d87e500b65f03e go1.21.4.freebsd-386.tar.gz
59f9b32187efb98d344a3818a631d3815ebb5c7bbefc367bab6515caaca544e9 go1.21.4.freebsd-amd64.tar.gz
64d3e5d295806e137c9e39d1e1f10b00a30fcd5c2f230d72b3298f579bb3c89a go1.21.4.linux-386.tar.gz
73cac0215254d0c7d1241fa40837851f3b9a8a742d0b54714cbdfb3feaf8f0af go1.21.4.linux-amd64.tar.gz
ce1983a7289856c3a918e1fd26d41e072cc39f928adfb11ba1896440849b95da go1.21.4.linux-arm64.tar.gz
6c62e89113750cc77c498194d13a03fadfda22bd2c7d44e8a826fd354db60252 go1.21.4.linux-armv6l.tar.gz
2c63b36d2adcfb22013102a2ee730f058ec2f93b9f27479793c80b2e3641783f go1.21.4.linux-ppc64le.tar.gz
7a75ba4afc7a96058ca65903d994cd862381825d7dca12b2183f087c757c26c0 go1.21.4.linux-s390x.tar.gz
870a0e462b94671dc2d6cac707e9e19f7524fdc3c90711e6cd4450c3713a8ce0 go1.21.4.windows-386.zip
79e5428e068c912d9cfa6cd115c13549856ec689c1332eac17f5d6122e19d595 go1.21.4.windows-amd64.zip
58bc7c6f4d4c72da2df4d2650c8222fe03c9978070eb3c66be8bbaa2a4757ac1 go1.21.4.windows-arm64.zip

# version:golangci 1.51.1
# https://github.com/golangci/golangci-lint/releases/
Expand Down
3 changes: 3 additions & 0 deletions build/ci.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,9 @@ func doTest(cmdline []string) {
// Enable CKZG backend in CI.
gotest.Args = append(gotest.Args, "-tags=ckzg")

// Enable integration-tests
gotest.Args = append(gotest.Args, "-tags=integrationtests")

// Test a single package at a time. CI builders are slow
// and some tests run into timeouts under load.
gotest.Args = append(gotest.Args, "-p", "1")
Expand Down
3 changes: 1 addition & 2 deletions build/update-license.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,8 @@ var (
"vendor/", "tests/testdata/", "build/",

// don't relicense vendored sources
"cmd/internal/browser",
"common/bitutil/bitutil",
"common/prque/",
"consensus/ethash/xor.go",
"crypto/blake2b/",
"crypto/bn256/",
"crypto/bls12381/",
Expand All @@ -78,6 +76,7 @@ var (
"log/",
"metrics/",
"signer/rules/deps",
"internal/reexec",

// skip special licenses
"crypto/secp256k1", // Relicensed to BSD-3 via https://github.com/ethereum/go-ethereum/pull/17225
Expand Down
2 changes: 1 addition & 1 deletion cmd/clef/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"os"
"testing"

"github.com/docker/docker/pkg/reexec"
"github.com/scroll-tech/go-ethereum/internal/cmdtest"
"github.com/scroll-tech/go-ethereum/internal/reexec"
)

const registeredName = "clef-test"
Expand Down
6 changes: 3 additions & 3 deletions cmd/devp2p/internal/ethtest/chain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func TestChain_GetHeaders(t *testing.T) {
}{
{
req: GetBlockHeaders{
GetBlockHeadersRequest: &eth.GetBlockHeadersRequest{
GetBlockHeadersPacket: &eth.GetBlockHeadersPacket{
Origin: eth.HashOrNumber{Number: uint64(2)},
Amount: uint64(5),
Skip: 1,
Expand All @@ -162,7 +162,7 @@ func TestChain_GetHeaders(t *testing.T) {
},
{
req: GetBlockHeaders{
GetBlockHeadersRequest: &eth.GetBlockHeadersRequest{
GetBlockHeadersPacket: &eth.GetBlockHeadersPacket{
Origin: eth.HashOrNumber{Number: uint64(chain.Len() - 1)},
Amount: uint64(3),
Skip: 0,
Expand All @@ -177,7 +177,7 @@ func TestChain_GetHeaders(t *testing.T) {
},
{
req: GetBlockHeaders{
GetBlockHeadersRequest: &eth.GetBlockHeadersRequest{
GetBlockHeadersPacket: &eth.GetBlockHeadersPacket{
Origin: eth.HashOrNumber{Hash: chain.Head().Hash()},
Amount: uint64(1),
Skip: 0,
Expand Down
13 changes: 7 additions & 6 deletions cmd/devp2p/internal/ethtest/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func (s *Suite) dial() (*Conn, error) {
}
// set default p2p capabilities
conn.caps = []p2p.Cap{
{Name: "eth", Version: 66},
{Name: "eth", Version: 67},
{Name: "eth", Version: 68},
}
Expand Down Expand Up @@ -236,8 +237,8 @@ func (c *Conn) readAndServe(chain *Chain, timeout time.Duration) Message {
return errorf("could not get headers for inbound header request: %v", err)
}
resp := &BlockHeaders{
RequestId: msg.ReqID(),
BlockHeadersRequest: eth.BlockHeadersRequest(headers),
RequestId: msg.ReqID(),
BlockHeadersPacket: eth.BlockHeadersPacket(headers),
}
if err := c.Write(resp); err != nil {
return errorf("could not write to connection: %v", err)
Expand Down Expand Up @@ -266,7 +267,7 @@ func (c *Conn) headersRequest(request *GetBlockHeaders, chain *Chain, reqID uint
if !ok {
return nil, fmt.Errorf("unexpected message received: %s", pretty.Sdump(msg))
}
headers := []*types.Header(resp.BlockHeadersRequest)
headers := []*types.Header(resp.BlockHeadersPacket)
return headers, nil
}

Expand Down Expand Up @@ -378,7 +379,7 @@ func (s *Suite) waitForBlockImport(conn *Conn, block *types.Block) error {
conn.SetReadDeadline(time.Now().Add(20 * time.Second))
// create request
req := &GetBlockHeaders{
GetBlockHeadersRequest: &eth.GetBlockHeadersRequest{
GetBlockHeadersPacket: &eth.GetBlockHeadersPacket{
Origin: eth.HashOrNumber{Hash: block.Hash()},
Amount: 1,
},
Expand Down Expand Up @@ -603,8 +604,8 @@ func (s *Suite) hashAnnounce() error {
pretty.Sdump(blockHeaderReq))
}
err = sendConn.Write(&BlockHeaders{
RequestId: blockHeaderReq.ReqID(),
BlockHeadersRequest: eth.BlockHeadersRequest{nextBlock.Header()},
RequestId: blockHeaderReq.ReqID(),
BlockHeadersPacket: eth.BlockHeadersPacket{nextBlock.Header()},
})
if err != nil {
return fmt.Errorf("failed to write to connection: %v", err)
Expand Down
38 changes: 19 additions & 19 deletions cmd/devp2p/internal/ethtest/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (s *Suite) TestGetBlockHeaders(t *utesting.T) {
}
// write request
req := &GetBlockHeaders{
GetBlockHeadersRequest: &eth.GetBlockHeadersRequest{
GetBlockHeadersPacket: &eth.GetBlockHeadersPacket{
Origin: eth.HashOrNumber{Hash: s.chain.blocks[1].Hash()},
Amount: 2,
Skip: 1,
Expand Down Expand Up @@ -150,7 +150,7 @@ func (s *Suite) TestSimultaneousRequests(t *utesting.T) {
// create two requests
req1 := &GetBlockHeaders{
RequestId: uint64(111),
GetBlockHeadersRequest: &eth.GetBlockHeadersRequest{
GetBlockHeadersPacket: &eth.GetBlockHeadersPacket{
Origin: eth.HashOrNumber{
Hash: s.chain.blocks[1].Hash(),
},
Expand All @@ -161,7 +161,7 @@ func (s *Suite) TestSimultaneousRequests(t *utesting.T) {
}
req2 := &GetBlockHeaders{
RequestId: uint64(222),
GetBlockHeadersRequest: &eth.GetBlockHeadersRequest{
GetBlockHeadersPacket: &eth.GetBlockHeadersPacket{
Origin: eth.HashOrNumber{
Hash: s.chain.blocks[1].Hash(),
},
Expand Down Expand Up @@ -201,10 +201,10 @@ func (s *Suite) TestSimultaneousRequests(t *utesting.T) {
if err != nil {
t.Fatalf("failed to get expected headers for request 2: %v", err)
}
if !headersMatch(expected1, headers1.BlockHeadersRequest) {
if !headersMatch(expected1, headers1.BlockHeadersPacket) {
t.Fatalf("header mismatch: \nexpected %v \ngot %v", expected1, headers1)
}
if !headersMatch(expected2, headers2.BlockHeadersRequest) {
if !headersMatch(expected2, headers2.BlockHeadersPacket) {
t.Fatalf("header mismatch: \nexpected %v \ngot %v", expected2, headers2)
}
}
Expand All @@ -224,7 +224,7 @@ func (s *Suite) TestSameRequestID(t *utesting.T) {
reqID := uint64(1234)
request1 := &GetBlockHeaders{
RequestId: reqID,
GetBlockHeadersRequest: &eth.GetBlockHeadersRequest{
GetBlockHeadersPacket: &eth.GetBlockHeadersPacket{
Origin: eth.HashOrNumber{
Number: 1,
},
Expand All @@ -233,7 +233,7 @@ func (s *Suite) TestSameRequestID(t *utesting.T) {
}
request2 := &GetBlockHeaders{
RequestId: reqID,
GetBlockHeadersRequest: &eth.GetBlockHeadersRequest{
GetBlockHeadersPacket: &eth.GetBlockHeadersPacket{
Origin: eth.HashOrNumber{
Number: 33,
},
Expand Down Expand Up @@ -270,10 +270,10 @@ func (s *Suite) TestSameRequestID(t *utesting.T) {
if err != nil {
t.Fatalf("failed to get expected block headers: %v", err)
}
if !headersMatch(expected1, headers1.BlockHeadersRequest) {
if !headersMatch(expected1, headers1.BlockHeadersPacket) {
t.Fatalf("header mismatch: \nexpected %v \ngot %v", expected1, headers1)
}
if !headersMatch(expected2, headers2.BlockHeadersRequest) {
if !headersMatch(expected2, headers2.BlockHeadersPacket) {
t.Fatalf("header mismatch: \nexpected %v \ngot %v", expected2, headers2)
}
}
Expand All @@ -290,7 +290,7 @@ func (s *Suite) TestZeroRequestID(t *utesting.T) {
t.Fatalf("peering failed: %v", err)
}
req := &GetBlockHeaders{
GetBlockHeadersRequest: &eth.GetBlockHeadersRequest{
GetBlockHeadersPacket: &eth.GetBlockHeadersPacket{
Origin: eth.HashOrNumber{Number: 0},
Amount: 2,
},
Expand Down Expand Up @@ -322,7 +322,7 @@ func (s *Suite) TestGetBlockBodies(t *utesting.T) {
// create block bodies request
req := &GetBlockBodies{
RequestId: uint64(55),
GetBlockBodiesRequest: eth.GetBlockBodiesRequest{
GetBlockBodiesPacket: eth.GetBlockBodiesPacket{
s.chain.blocks[54].Hash(),
s.chain.blocks[75].Hash(),
},
Expand All @@ -336,11 +336,11 @@ func (s *Suite) TestGetBlockBodies(t *utesting.T) {
if !ok {
t.Fatalf("unexpected: %s", pretty.Sdump(msg))
}
bodies := resp.BlockBodiesResponse
bodies := resp.BlockBodiesPacket
t.Logf("received %d block bodies", len(bodies))
if len(bodies) != len(req.GetBlockBodiesRequest) {
if len(bodies) != len(req.GetBlockBodiesPacket) {
t.Fatalf("wrong bodies in response: expected %d bodies, "+
"got %d", len(req.GetBlockBodiesRequest), len(bodies))
"got %d", len(req.GetBlockBodiesPacket), len(bodies))
}
}

Expand Down Expand Up @@ -481,16 +481,16 @@ func (s *Suite) TestLargeTxRequest(t *utesting.T) {
hashes = append(hashes, hash)
}
getTxReq := &GetPooledTransactions{
RequestId: 1234,
GetPooledTransactionsRequest: hashes,
RequestId: 1234,
GetPooledTransactionsPacket: hashes,
}
if err = conn.Write(getTxReq); err != nil {
t.Fatalf("could not write to conn: %v", err)
}
// check that all received transactions match those that were sent to node
switch msg := conn.waitForResponse(s.chain, timeout, getTxReq.RequestId).(type) {
case *PooledTransactions:
for _, gotTx := range msg.PooledTransactionsResponse {
for _, gotTx := range msg.PooledTransactionsPacket {
if _, exists := hashMap[gotTx.Hash()]; !exists {
t.Fatalf("unexpected tx received: %v", gotTx.Hash())
}
Expand Down Expand Up @@ -547,8 +547,8 @@ func (s *Suite) TestNewPooledTxs(t *utesting.T) {
msg := conn.readAndServe(s.chain, timeout)
switch msg := msg.(type) {
case *GetPooledTransactions:
if len(msg.GetPooledTransactionsRequest) != len(hashes) {
t.Fatalf("unexpected number of txs requested: wanted %d, got %d", len(hashes), len(msg.GetPooledTransactionsRequest))
if len(msg.GetPooledTransactionsPacket) != len(hashes) {
t.Fatalf("unexpected number of txs requested: wanted %d, got %d", len(hashes), len(msg.GetPooledTransactionsPacket))
}
return

Expand Down
Loading

0 comments on commit 86aa203

Please sign in to comment.