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

Release v1.13.4 #20

Merged
merged 57 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
3dc45a3
params: begin v1.13.3 release cycle
karalabe Sep 28, 2023
37a2d91
params: update 4788 beacon roots contract addr (#28205)
lightclient Sep 28, 2023
46c850a
internal/ethapi: compact db missing key starts with 0xff (#28207)
jsvisa Sep 28, 2023
b9450bf
core, eth: typos and some code formatting (#28201)
phenix3443 Sep 28, 2023
f988b23
ethdb, internal/ethapi: support exposing Pebble stats too, beside Lev…
karalabe Sep 28, 2023
1f6e639
core: fix typos (#28218)
0xbstn Sep 29, 2023
0ded110
core: infer blobGasUsed in chain maker (#28212)
s1na Sep 29, 2023
c5ff839
core/state: small trie prefetcher nits (#28183)
aaronbuchwald Sep 29, 2023
1f9d672
common: remove address.Hash footgun (#28228)
karalabe Sep 29, 2023
22dcb7a
ethdb/pebble: upgrade pebble to master (aa077af62593) (#28070)
rjl493456442 Sep 29, 2023
966e50b
ethdb/pebble: luv you linter
karalabe Sep 29, 2023
a408e37
eth/catalyst: add validation error in new paylaod hash mismatch (#28226)
lightclient Sep 29, 2023
7b6ff52
cmd, eth: switch the dev synctarget to hash from block (#28209)
karalabe Sep 29, 2023
c39cbc1
core: implement BLOBBASEFEE opcode (0x4a) (#28098)
MariusVanDerWijden Oct 2, 2023
705a51e
eth, rpc: add configurable option for wsMessageSizeLimit (#27801)
tylerni7 Oct 3, 2023
07dec7a
cmd/evm: cancun-updates for b11r and t8n -tools (#28195)
lightclient Oct 3, 2023
339a4cf
core: fix typos (#28238)
0xbstn Oct 3, 2023
2091ebd
trie: fix benchmark by ensuring key immutability (#28221)
DeVil2O Oct 3, 2023
7963c4e
rpc: fix erroneous error-message in test (#28227)
hyunchel Oct 3, 2023
bc6d184
cmd/devp2p, eth: drop eth/66 (#28239)
karalabe Oct 3, 2023
a8a9c8e
core, eth, miner: start propagating and consuming blob txs (#28243)
karalabe Oct 4, 2023
95b0555
eth: when snap is complaining for missing eth, be verbose about the d…
karalabe Oct 4, 2023
052355f
cmd/evm/internal/t8ntoo: tiny bugfix for difficulty field (#28245)
tactical-retreat Oct 4, 2023
4e1e373
core/txpool/legacypool: fix typo (#28258)
hyunchel Oct 7, 2023
0832679
trie: refactor stacktrie (#28233)
holiman Oct 10, 2023
fa6107c
core: fix typos (#28255)
0xbstn Oct 10, 2023
db9afae
eth, params: fix typos (#28286)
hyunchel Oct 10, 2023
6b1e4f4
all: move light.NodeSet to trienode.ProofSet (#28287)
holiman Oct 10, 2023
6505297
trie: fix a typo, use correct docstrings (#28302)
bnovil Oct 10, 2023
8afbcf4
eth: enforce announcement metadatas and drop peers violating the prot…
karalabe Oct 10, 2023
5e43ed0
git: ignore tests/spec-tests folder (#28254)
lightclient Oct 10, 2023
2c007cf
accounts/abi/bind/backend: use requested header for gas prices and ga…
karalabe Oct 10, 2023
8976a0c
trie: remove owner and binary marshaling from stacktrie (#28291)
holiman Oct 11, 2023
7776a32
ethdb/pebble: add level file metrics (#28271)
rjl493456442 Oct 11, 2023
a6deb2d
eth/fetcher: throttle tx fetches to 128KB responses (#28304)
karalabe Oct 11, 2023
13d1d42
eth/fetcher: fix typo
karalabe Oct 11, 2023
eeb5dc3
cmd, core: resolve scheme from a read-write database (#28313)
rjl493456442 Oct 11, 2023
0004c6b
accounts, cmd: fix typos (#28300)
vuittont60 Oct 11, 2023
d2c0bed
cmd/geth: fix failing test (#28322)
holiman Oct 12, 2023
0d45d72
params: release Geth v.1.13.3
karalabe Oct 12, 2023
2f66d7c
params: begin v1.13.4 release cycle
karalabe Oct 12, 2023
1cb3b6a
eth/protocols/snap: fix snap sync failure on empty storage range (#28…
rjl493456442 Oct 13, 2023
1f30cae
go.mod, internal/build: update Azure dependencies (#28329)
karalabe Oct 13, 2023
78c8e10
go.mod: update gnark lib to fix a malleability issue (#28333)
karalabe Oct 13, 2023
660cbe4
go.mod: update fastcache to latest (#28334)
karalabe Oct 13, 2023
ed5da55
build: move version-info into checksum file (#28324)
holiman Oct 13, 2023
31b566f
go.mod: update AWS APIs to latest heads (#28332)
karalabe Oct 13, 2023
f62c58f
trie: make rhs-proof align with last key in range proofs (#28311)
holiman Oct 13, 2023
425cb6f
go.mod: pull in the latest cloudflare API libs (#28336)
karalabe Oct 13, 2023
509a64f
cmd, core, ethdb: enable Pebble on 32 bits and OpenBSD too (#28335)
karalabe Oct 13, 2023
4632b7b
tests: update execution-spec-tests to 1.0.5 (#28337)
holiman Oct 16, 2023
2e478aa
eth/fetcher: only make noise big mismatches (#28356)
karalabe Oct 16, 2023
a5544d3
fix: broken url link (#28342)
phenix3443 Oct 17, 2023
8b99ad4
internal/ethapi: fix codehash lookup in eth_getProof (#28357)
holiman Oct 17, 2023
00c6383
cmd: fix typos (#28323)
xiaolou86 Oct 17, 2023
667966c
eth/fetcher: fix fetcher timeout (#28220)
MariusVanDerWijden Oct 17, 2023
3f907d6
params: release Geth v1.13.4
karalabe Oct 17, 2023
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,6 @@ profile.cov
/dashboard/assets/package-lock.json

**/yarn-error.log
logs/
logs/

tests/spec-tests/
7 changes: 3 additions & 4 deletions accounts/abi/bind/backends/simulated.go
Original file line number Diff line number Diff line change
Expand Up @@ -606,8 +606,7 @@ func (b *SimulatedBackend) callContract(ctx context.Context, call ethereum.CallM
if call.GasPrice != nil && (call.GasFeeCap != nil || call.GasTipCap != nil) {
return nil, errors.New("both gasPrice and (maxFeePerGas or maxPriorityFeePerGas) specified")
}
head := b.blockchain.CurrentHeader()
if !b.blockchain.Config().IsLondon(head.Number) {
if !b.blockchain.Config().IsLondon(header.Number) {
// If there's no basefee, then it must be a non-1559 execution
if call.GasPrice == nil {
call.GasPrice = new(big.Int)
Expand All @@ -629,13 +628,13 @@ func (b *SimulatedBackend) callContract(ctx context.Context, call ethereum.CallM
// Backfill the legacy gasPrice for EVM execution, unless we're all zeroes
call.GasPrice = new(big.Int)
if call.GasFeeCap.BitLen() > 0 || call.GasTipCap.BitLen() > 0 {
call.GasPrice = math.BigMin(new(big.Int).Add(call.GasTipCap, head.BaseFee), call.GasFeeCap)
call.GasPrice = math.BigMin(new(big.Int).Add(call.GasTipCap, header.BaseFee), call.GasFeeCap)
}
}
}
// Ensure message is initialized properly.
if call.Gas == 0 {
call.Gas = 50000000
call.Gas = 10 * header.GasLimit
}
if call.Value == nil {
call.Value = new(big.Int)
Expand Down
2 changes: 1 addition & 1 deletion accounts/scwallet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

## Preparing the smartcard

**WARNING: FOILLOWING THESE INSTRUCTIONS WILL DESTROY THE MASTER KEY ON YOUR CARD. ONLY PROCEED IF NO FUNDS ARE ASSOCIATED WITH THESE ACCOUNTS**
**WARNING: FOLLOWING THESE INSTRUCTIONS WILL DESTROY THE MASTER KEY ON YOUR CARD. ONLY PROCEED IF NO FUNDS ARE ASSOCIATED WITH THESE ACCOUNTS**

You can use status' [keycard-cli](https://github.com/status-im/keycard-cli) and you should get _at least_ version 2.1.1 of their [smartcard application](https://github.com/status-im/status-keycard/releases/download/2.2.1/keycard_v2.2.1.cap)

Expand Down
45 changes: 29 additions & 16 deletions build/checksums.txt
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
# This file contains sha256 checksums of optional build dependencies.

# version:spec-tests 1.0.5
# https://github.com/ethereum/execution-spec-tests/releases
24bac679f3a2d8240d8e08e7f6a70b70c2dabf673317d924cf1d1887b9fe1f81 fixtures.tar.gz
# https://github.com/ethereum/execution-spec-tests/releases/download/v1.0.5/
d4fd06a0e5f94beb970f3c68374b38ef9de82d4be77517d326bcf739c3cbf3a2 fixtures_develop.tar.gz

# version:golang 1.21.3
# https://go.dev/dl/
bfa36bf75e9a1e9cbbdb9abcf9d1707e479bd3a07880a8ae3564caee5711cb99 go1.21.1.src.tar.gz
809f5b0ef4f7dcdd5f51e9630a5b2e5a1006f22a047126d61560cdc365678a19 go1.21.1.darwin-amd64.tar.gz
ffd40391a1e995855488b008ad9326ff8c2e81803a6e80894401003bae47fcf1 go1.21.1.darwin-arm64.tar.gz
9919a9a4dc82371aba3da5b7c830bcb6249fc1502cd26d959eb340a60e41ee01 go1.21.1.freebsd-386.tar.gz
2571f10f6047e04d87c1f5986a05e5e8f7b511faf98803ef12b66d563845d2a1 go1.21.1.freebsd-amd64.tar.gz
b93850666cdadbd696a986cf7b03111fe99db8c34a9aaa113d7c96d0081e1901 go1.21.1.linux-386.tar.gz
b3075ae1ce5dab85f89bc7905d1632de23ca196bd8336afd93fa97434cfa55ae go1.21.1.linux-amd64.tar.gz
7da1a3936a928fd0b2602ed4f3ef535b8cd1990f1503b8d3e1acc0fa0759c967 go1.21.1.linux-arm64.tar.gz
f3716a43f59ae69999841d6007b42c9e286e8d8ce470656fb3e70d7be2d7ca85 go1.21.1.linux-armv6l.tar.gz
eddf018206f8a5589bda75252b72716d26611efebabdca5d0083ec15e9e41ab7 go1.21.1.linux-ppc64le.tar.gz
a83b3e8eb4dbf76294e773055eb51397510ff4d612a247bad9903560267bba6d go1.21.1.linux-s390x.tar.gz
170256c820f466f29d64876f25f4dfa4029ed9902a0a9095d8bd603aecf4d83b go1.21.1.windows-386.zip
10a4f5b63215d11d1770453733dbcbf024f3f74872f84e28d7ea59f0250316c6 go1.21.1.windows-amd64.zip
41135ce6e0ced4bc1e459cb96bd4090c9dc2062e24179c3f337d855af9b560ef go1.21.1.windows-arm64.zip
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

# https://github.com/golangci/golangci-lint/releases
# version:golangci 1.51.1
# https://github.com/golangci/golangci-lint/releases/
# https://github.com/golangci/golangci-lint/releases/download/v1.51.1/
fba08acc4027f69f07cef48fbff70b8a7ecdfaa1c2aba9ad3fb31d60d9f5d4bc golangci-lint-1.51.1-darwin-amd64.tar.gz
75b8f0ff3a4e68147156be4161a49d4576f1be37a0b506473f8c482140c1e7f2 golangci-lint-1.51.1-darwin-arm64.tar.gz
e06b3459aaed356e1667580be00b05f41f3b2e29685d12cdee571c23e1edb414 golangci-lint-1.51.1-freebsd-386.tar.gz
Expand Down Expand Up @@ -48,4 +53,12 @@ bce02f7232723cb727755ee11f168a700a00896a25d37f87c4b173bce55596b4 golangci-lint-
cf6403f84707ce8c98664736772271bc8874f2e760c2fd0f00cf3e85963507e9 golangci-lint-1.51.1-windows-armv7.zip

# This is the builder on PPA that will build Go itself (inception-y), don't modify!
#
# This version is fine to be old and full of security holes, we just use it
# to build the latest Go. Don't change it. If it ever becomes insufficient,
# we need to switch over to a recursive builder to jump across supported
# versions.
#
# version:ppa-builder 1.19.6
# https://go.dev/dl/
d7f0013f82e6d7f862cc6cb5c8cdb48eef5f2e239b35baa97e2f1a7466043767 go1.19.6.src.tar.gz
48 changes: 25 additions & 23 deletions build/ci.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,23 +136,6 @@ var (
"golang-go": "/usr/lib/go",
}

// This is the version of Go that will be downloaded by
//
// go run ci.go install -dlgo
dlgoVersion = "1.21.1"

// This is the version of Go that will be used to bootstrap the PPA builder.
//
// This version is fine to be old and full of security holes, we just use it
// to build the latest Go. Don't change it. If it ever becomes insufficient,
// we need to switch over to a recursive builder to jumpt across supported
// versions.
gobootVersion = "1.19.6"

// This is the version of execution-spec-tests that we are using.
// When updating, you must also update build/checksums.txt.
executionSpecTestsVersion = "1.0.2"

// This is where the tests should be unpacked.
executionSpecTestsDir = "tests/spec-tests"
)
Expand Down Expand Up @@ -192,6 +175,8 @@ func main() {
doWindowsInstaller(os.Args[2:])
case "purge":
doPurge(os.Args[2:])
case "sanitycheck":
doSanityCheck()
default:
log.Fatal("unknown command ", os.Args[1])
}
Expand All @@ -213,9 +198,8 @@ func doInstall(cmdline []string) {
tc := build.GoToolchain{GOARCH: *arch, CC: *cc}
if *dlgo {
csdb := build.MustLoadChecksums("build/checksums.txt")
tc.Root = build.DownloadGo(csdb, dlgoVersion)
tc.Root = build.DownloadGo(csdb)
}

// Disable CLI markdown doc generation in release builds.
buildTags := []string{"urfave_cli_no_docs"}

Expand Down Expand Up @@ -312,7 +296,7 @@ func doTest(cmdline []string) {
// Configure the toolchain.
tc := build.GoToolchain{GOARCH: *arch, CC: *cc}
if *dlgo {
tc.Root = build.DownloadGo(csdb, dlgoVersion)
tc.Root = build.DownloadGo(csdb)
}
gotest := tc.Go("test")

Expand Down Expand Up @@ -345,8 +329,12 @@ func doTest(cmdline []string) {

// downloadSpecTestFixtures downloads and extracts the execution-spec-tests fixtures.
func downloadSpecTestFixtures(csdb *build.ChecksumDB, cachedir string) string {
executionSpecTestsVersion, err := build.Version(csdb, "spec-tests")
if err != nil {
log.Fatal(err)
}
ext := ".tar.gz"
base := "fixtures" // TODO(MariusVanDerWijden) rename once the version becomes part of the filename
base := "fixtures_develop" // TODO(MariusVanDerWijden) rename once the version becomes part of the filename
url := fmt.Sprintf("https://github.com/ethereum/execution-spec-tests/releases/download/v%s/%s%s", executionSpecTestsVersion, base, ext)
archivePath := filepath.Join(cachedir, base+ext)
if err := csdb.DownloadFile(url, archivePath); err != nil {
Expand Down Expand Up @@ -377,9 +365,11 @@ func doLint(cmdline []string) {

// downloadLinter downloads and unpacks golangci-lint.
func downloadLinter(cachedir string) string {
const version = "1.51.1"

csdb := build.MustLoadChecksums("build/checksums.txt")
version, err := build.Version(csdb, "golangci")
if err != nil {
log.Fatal(err)
}
arch := runtime.GOARCH
ext := ".tar.gz"

Expand Down Expand Up @@ -761,6 +751,10 @@ func doDebianSource(cmdline []string) {
// to bootstrap the builder Go.
func downloadGoBootstrapSources(cachedir string) string {
csdb := build.MustLoadChecksums("build/checksums.txt")
gobootVersion, err := build.Version(csdb, "ppa-builder")
if err != nil {
log.Fatal(err)
}
file := fmt.Sprintf("go%s.src.tar.gz", gobootVersion)
url := "https://dl.google.com/go/" + file
dst := filepath.Join(cachedir, file)
Expand All @@ -773,6 +767,10 @@ func downloadGoBootstrapSources(cachedir string) string {
// downloadGoSources downloads the Go source tarball.
func downloadGoSources(cachedir string) string {
csdb := build.MustLoadChecksums("build/checksums.txt")
dlgoVersion, err := build.Version(csdb, "golang")
if err != nil {
log.Fatal(err)
}
file := fmt.Sprintf("go%s.src.tar.gz", dlgoVersion)
url := "https://dl.google.com/go/" + file
dst := filepath.Join(cachedir, file)
Expand Down Expand Up @@ -1099,3 +1097,7 @@ func doPurge(cmdline []string) {
log.Fatal(err)
}
}

func doSanityCheck() {
build.DownloadAndVerifyChecksums(build.MustLoadChecksums("build/checksums.txt"))
}
2 changes: 1 addition & 1 deletion cmd/clef/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,7 @@ func GenDoc(ctx *cli.Context) error {
URL: accounts.URL{Path: ".. ignored .."},
},
{
Address: common.HexToAddress("0xffffffffffffffffffffffffffffffffffffffff"),
Address: common.MaxAddress,
},
}})
}
Expand Down
23 changes: 17 additions & 6 deletions cmd/devp2p/dns_cloudflare.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (c *cloudflareClient) uploadRecords(name string, records map[string]string)
records = lrecords

log.Info(fmt.Sprintf("Retrieving existing TXT records on %s", name))
entries, err := c.DNSRecords(context.Background(), c.zoneID, cloudflare.DNSRecord{Type: "TXT"})
entries, _, err := c.ListDNSRecords(context.Background(), cloudflare.ZoneIdentifier(c.zoneID), cloudflare.ListDNSRecordsParams{Type: "TXT"})
if err != nil {
return err
}
Expand All @@ -141,14 +141,25 @@ func (c *cloudflareClient) uploadRecords(name string, records map[string]string)
if path != name {
ttl = treeNodeTTLCloudflare // Max TTL permitted by Cloudflare
}
record := cloudflare.DNSRecord{Type: "TXT", Name: path, Content: val, TTL: ttl}
_, err = c.CreateDNSRecord(context.Background(), c.zoneID, record)
record := cloudflare.CreateDNSRecordParams{Type: "TXT", Name: path, Content: val, TTL: ttl}
_, err = c.CreateDNSRecord(context.Background(), cloudflare.ZoneIdentifier(c.zoneID), record)
} else if old.Content != val {
// Entry already exists, only change its content.
log.Info(fmt.Sprintf("Updating %s from %q to %q", path, old.Content, val))
updated++
old.Content = val
err = c.UpdateDNSRecord(context.Background(), c.zoneID, old.ID, old)

record := cloudflare.UpdateDNSRecordParams{
Type: old.Type,
Name: old.Name,
Content: val,
Data: old.Data,
ID: old.ID,
Priority: old.Priority,
TTL: old.TTL,
Proxied: old.Proxied,
Tags: old.Tags,
}
_, err = c.UpdateDNSRecord(context.Background(), cloudflare.ZoneIdentifier(c.zoneID), record)
} else {
skipped++
log.Debug(fmt.Sprintf("Skipping %s = %q", path, val))
Expand All @@ -168,7 +179,7 @@ func (c *cloudflareClient) uploadRecords(name string, records map[string]string)
// Stale entry, nuke it.
log.Debug(fmt.Sprintf("Deleting %s = %q", path, entry.Content))
deleted++
if err := c.DeleteDNSRecord(context.Background(), c.zoneID, entry.ID); err != nil {
if err := c.DeleteDNSRecord(context.Background(), cloudflare.ZoneIdentifier(c.zoneID), entry.ID); err != nil {
return fmt.Errorf("failed to delete %s: %v", path, err)
}
}
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{
GetBlockHeadersPacket: &eth.GetBlockHeadersPacket{
GetBlockHeadersRequest: &eth.GetBlockHeadersRequest{
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{
GetBlockHeadersPacket: &eth.GetBlockHeadersPacket{
GetBlockHeadersRequest: &eth.GetBlockHeadersRequest{
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{
GetBlockHeadersPacket: &eth.GetBlockHeadersPacket{
GetBlockHeadersRequest: &eth.GetBlockHeadersRequest{
Origin: eth.HashOrNumber{Hash: chain.Head().Hash()},
Amount: uint64(1),
Skip: 0,
Expand Down
13 changes: 6 additions & 7 deletions cmd/devp2p/internal/ethtest/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ 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 @@ -237,8 +236,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(),
BlockHeadersPacket: eth.BlockHeadersPacket(headers),
RequestId: msg.ReqID(),
BlockHeadersRequest: eth.BlockHeadersRequest(headers),
}
if err := c.Write(resp); err != nil {
return errorf("could not write to connection: %v", err)
Expand Down Expand Up @@ -267,7 +266,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.BlockHeadersPacket)
headers := []*types.Header(resp.BlockHeadersRequest)
return headers, nil
}

Expand Down Expand Up @@ -379,7 +378,7 @@ func (s *Suite) waitForBlockImport(conn *Conn, block *types.Block) error {
conn.SetReadDeadline(time.Now().Add(20 * time.Second))
// create request
req := &GetBlockHeaders{
GetBlockHeadersPacket: &eth.GetBlockHeadersPacket{
GetBlockHeadersRequest: &eth.GetBlockHeadersRequest{
Origin: eth.HashOrNumber{Hash: block.Hash()},
Amount: 1,
},
Expand Down Expand Up @@ -604,8 +603,8 @@ func (s *Suite) hashAnnounce() error {
pretty.Sdump(blockHeaderReq))
}
err = sendConn.Write(&BlockHeaders{
RequestId: blockHeaderReq.ReqID(),
BlockHeadersPacket: eth.BlockHeadersPacket{nextBlock.Header()},
RequestId: blockHeaderReq.ReqID(),
BlockHeadersRequest: eth.BlockHeadersRequest{nextBlock.Header()},
})
if err != nil {
return fmt.Errorf("failed to write to connection: %v", err)
Expand Down
16 changes: 6 additions & 10 deletions cmd/devp2p/internal/ethtest/snap.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/eth/protocols/snap"
"github.com/ethereum/go-ethereum/internal/utesting"
"github.com/ethereum/go-ethereum/light"
"github.com/ethereum/go-ethereum/trie"
"github.com/ethereum/go-ethereum/trie/trienode"
"golang.org/x/crypto/sha3"
)

Expand Down Expand Up @@ -58,7 +58,7 @@ type accRangeTest struct {
func (s *Suite) TestSnapGetAccountRange(t *utesting.T) {
var (
root = s.chain.RootAt(999)
ffHash = common.HexToHash("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")
ffHash = common.MaxHash
zero = common.Hash{}
firstKeyMinus1 = common.HexToHash("0x00bf49f440a1cd0527e4d06e2765654c0f56452257516d793a9b8d604dcfdf29")
firstKey = common.HexToHash("0x00bf49f440a1cd0527e4d06e2765654c0f56452257516d793a9b8d604dcfdf2a")
Expand Down Expand Up @@ -125,7 +125,7 @@ type stRangesTest struct {
// TestSnapGetStorageRanges various forms of GetStorageRanges requests.
func (s *Suite) TestSnapGetStorageRanges(t *utesting.T) {
var (
ffHash = common.HexToHash("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")
ffHash = common.MaxHash
zero = common.Hash{}
firstKey = common.HexToHash("0x00bf49f440a1cd0527e4d06e2765654c0f56452257516d793a9b8d604dcfdf2a")
secondKey = common.HexToHash("0x09e47cd5056a689e708f22fe1f932709a320518e444f5f7d8d46a3da523d6606")
Expand Down Expand Up @@ -530,17 +530,13 @@ func (s *Suite) snapGetAccountRange(t *utesting.T, tc *accRangeTest) error {
for i, key := range hashes {
keys[i] = common.CopyBytes(key[:])
}
nodes := make(light.NodeList, len(proof))
nodes := make(trienode.ProofList, len(proof))
for i, node := range proof {
nodes[i] = node
}
proofdb := nodes.NodeSet()
proofdb := nodes.Set()

var end []byte
if len(keys) > 0 {
end = keys[len(keys)-1]
}
_, err = trie.VerifyRangeProof(tc.root, tc.origin[:], end, keys, accounts, proofdb)
_, err = trie.VerifyRangeProof(tc.root, tc.origin[:], keys, accounts, proofdb)
return err
}

Expand Down
Loading