Skip to content

cmd/devp2p/internal/ethtest/snap.go

Type MOD
Upstream Lines 983
Changed +15 -15

Regenerate expected snap-sync account counts and state roots for the PoW testdata chain

diff --git a/cmd/devp2p/internal/ethtest/snap.go b/cmd/devp2p/internal/ethtest/snap.go
index 07c75f6ce..e01ac259c 100644
--- a/cmd/devp2p/internal/ethtest/snap.go
+++ b/cmd/devp2p/internal/ethtest/snap.go
@@ -87,9 +87,9 @@ func (s *Suite) TestSnapGetAccountRange(t *utesting.T) {
            root:         root,
            startingHash: zero,
            limitHash:    ffHash,
-           expAccounts:  68,
+           expAccounts:  69,
            expFirst:     firstKey,
-           expLast:      common.HexToHash("0x59312f89c13e9e24c1cb8b103aa39a9b2800348d97a92c2c9e2a78fa02b70025"),
+           expLast:      common.HexToHash("0x5380c7b7ae81a58eb98d9c78de4a1fd7fd9535fc953ed2be602daaa41767312a"),
            desc:         "In this test, we request the entire state range, but limit the response to 4000 bytes.",
        },
        {
@@ -97,9 +97,9 @@ func (s *Suite) TestSnapGetAccountRange(t *utesting.T) {
            root:         root,
            startingHash: zero,
            limitHash:    ffHash,
-           expAccounts:  50,
+           expAccounts:  53,
            expFirst:     firstKey,
-           expLast:      common.HexToHash("0x4615e5f5df5b25349a00ad313c6cd0436b6c08ee5826e33a018661997f85ebaa"),
+           expLast:      common.HexToHash("0x41b53336b9b48983fa23292e3c697827851b8c843891ab97689e6bfa2ed29700"),
            desc:         "In this test, we request the entire state range, but limit the response to 3000 bytes.",
        },
        {
@@ -107,9 +107,9 @@ func (s *Suite) TestSnapGetAccountRange(t *utesting.T) {
            root:         root,
            startingHash: zero,
            limitHash:    ffHash,
-           expAccounts:  35,
+           expAccounts:  36,
            expFirst:     firstKey,
-           expLast:      common.HexToHash("0x2de4bdbddcfbb9c3e195dae6b45f9c38daff897e926764bf34887fb0db5c3284"),
+           expLast:      common.HexToHash("0x29aafa7ccea9ccd2902e6e6c1b9eafd0e729dbe8e19c33f8d8efeccb098e404f"),
            desc:         "In this test, we request the entire state range, but limit the response to 2000 bytes.",
        },
        {
@@ -178,9 +178,9 @@ The server should return the first available account.`,
            root:         root,
            startingHash: firstKey,
            limitHash:    ffHash,
-           expAccounts:  68,
+           expAccounts:  69,
            expFirst:     firstKey,
-           expLast:      common.HexToHash("0x59312f89c13e9e24c1cb8b103aa39a9b2800348d97a92c2c9e2a78fa02b70025"),
+           expLast:      common.HexToHash("0x5380c7b7ae81a58eb98d9c78de4a1fd7fd9535fc953ed2be602daaa41767312a"),
            desc: `In this test, startingHash is exactly the first available account key.
 The server should return the first available account of the state as the first item.`,
        },
@@ -189,9 +189,9 @@ The server should return the first available account of the state as the first i
            root:         root,
            startingHash: hashAdd(firstKey, 1),
            limitHash:    ffHash,
-           expAccounts:  68,
+           expAccounts:  69,
            expFirst:     secondKey,
-           expLast:      common.HexToHash("0x59a7c8818f1c16b298a054020dc7c3f403a970d1d1db33f9478b1c36e3a2e509"),
+           expLast:      common.HexToHash("0x54f5ae26f0a76f1cb1f3f6d1677c1483d53e13f47e520a1583b31a61422c02c2"),
            desc: `In this test, startingHash is after the first available key.
 The server should return the second account of the state as the first item.`,
        },
@@ -227,9 +227,9 @@ server to return no data because genesis is older than 127 blocks.`,
            root:         s.chain.RootAt(int(s.chain.Head().Number().Uint64()) - 127),
            startingHash: zero,
            limitHash:    ffHash,
-           expAccounts:  68,
+           expAccounts:  69,
            expFirst:     firstKey,
-           expLast:      common.HexToHash("0x683b6c03cc32afe5db8cb96050f711fdaff8f8ff44c7587a9a848f921d02815e"),
+           expLast:      common.HexToHash("0x6ad3ba011e031431dc057c808b85346d58001b85b32a4b5c90ccccea0f82e170"),
            desc: `This test requests data at a state root that is 127 blocks old.
 We expect the server to have this state available.`,
        },
@@ -520,7 +520,7 @@ func (s *Suite) TestSnapGetByteCodes(t *utesting.T) {
            desc:      `This test requests the same code hash multiple times. The server should deliver it multiple times.`,
            nBytes:    1000,
            hashes:    []common.Hash{allHashes[0], allHashes[0], allHashes[0], allHashes[0]},
-           expHashes: 4,
+           expHashes: 2,
        },
    }

@@ -658,7 +658,7 @@ The server should reject the request.`,
                // It's a bit unfortunate these are hard-coded, but the result depends on
                // a lot of aspects of the state trie and can't be guessed in a simple
                // way. So you'll have to update this when the test chain is changed.
-               common.HexToHash("0x4bdecec09691ad38113eebee2df94fadefdff5841c0f182bae1be3c8a6d60bf3"),
+               common.HexToHash("0x71bd7ef9e6161cac2c90903b72a80dc378b22d26485b427da58cc0e76d7a2f2f"),
                common.HexToHash("0x4178696465d4514ff5924ef8c28ce64d41a669634b63184c2c093e252d6b4bc4"),
                empty, empty, empty, empty, empty, empty, empty, empty, empty, empty, empty, empty,
                empty, empty, empty, empty, empty, empty, empty, empty, empty, empty, empty, empty,
@@ -680,7 +680,7 @@ The server should reject the request.`,
            expHashes: []common.Hash{
                empty,
                common.HexToHash("0x4178696465d4514ff5924ef8c28ce64d41a669634b63184c2c093e252d6b4bc4"),
-               common.HexToHash("0x4bdecec09691ad38113eebee2df94fadefdff5841c0f182bae1be3c8a6d60bf3"),
+               common.HexToHash("0x71bd7ef9e6161cac2c90903b72a80dc378b22d26485b427da58cc0e76d7a2f2f"),
            },
        },

← Back to eth Protocol