go-pulse/eth
Martin Holst Swende f62c58f8de
trie: make rhs-proof align with last key in range proofs (#28311)
During snap-sync, we request ranges of values: either a range of accounts or a range of storage values. For any large trie, e.g. the main account trie or a large storage trie, we cannot fetch everything at once.

Short version; we split it up and request in multiple stages. To do so, we use an origin field, to say "Give me all storage key/values where key > 0x20000000000000000". When the server fulfils this, the server provides the first key after origin, let's say 0x2e030000000000000 -- never providing the exact origin. However, the client-side needs to be able to verify that the 0x2e03.. indeed is the first one after 0x2000.., and therefore the attached proof concerns the origin, not the first key.

So, short-short version: the left-hand side of the proof relates to the origin, and is free-standing from the first leaf.

On the other hand, (pun intended), the right-hand side, there's no such 'gap' between "along what path does the proof walk" and the last provided leaf. The proof must prove the last element (unless there are no elements).

Therefore, we can simplify the semantics for trie.VerifyRangeProof by removing an argument. This doesn't make much difference in practice, but makes it so that we can remove some tests. The reason I am raising this is that the upcoming stacktrie-based verifier does not support such fancy features as standalone right-hand borders.
2023-10-13 16:05:29 +02:00
..
catalyst core, eth, miner: start propagating and consuming blob txs (#28243) 2023-10-04 12:36:36 +03:00
downloader cmd/devp2p, eth: drop eth/66 (#28239) 2023-10-03 15:03:19 +03:00
ethconfig cmd, core: resolve scheme from a read-write database (#28313) 2023-10-11 11:27:44 +03:00
fetcher eth/fetcher: fix typo 2023-10-11 11:23:57 +03:00
filters all: activate pbss as experimental feature (#26274) 2023-08-10 22:21:36 +03:00
gasprice all: update golang/x/ext and fix slice sorting fallout (#27909) 2023-08-12 00:04:12 +02:00
protocols trie: make rhs-proof align with last key in range proofs (#28311) 2023-10-13 16:05:29 +02:00
tracers all: use rlp.DecodeBytes instead of rlp.Decode where possible (#27994) 2023-08-24 11:47:42 +03:00
api_admin.go eth: ignore genesis block on importChain (#27956) 2023-08-21 13:32:34 -04:00
api_backend.go core, eth, miner: start propagating and consuming blob txs (#28243) 2023-10-04 12:36:36 +03:00
api_debug_test.go core/state: simplify storage trie update and commit (#28030) 2023-08-31 14:33:18 -04:00
api_debug.go eth: abort on api operations not available in pbss-mode (#28104) 2023-09-14 03:10:37 -04:00
api_miner.go core/txpool: make transaction validation reusable across packages (pools) (#27429) 2023-06-06 12:53:29 +03:00
api.go les, eth: fix typo in comment (#27369) 2023-05-30 14:55:03 +02:00
backend.go cmd, core: resolve scheme from a read-write database (#28313) 2023-10-11 11:27:44 +03:00
bloombits.go eth: move eth.Config to a common package (#22205) 2021-02-05 13:51:15 +01:00
handler_eth_test.go core, eth, miner: start propagating and consuming blob txs (#28243) 2023-10-04 12:36:36 +03:00
handler_eth.go eth: enforce announcement metadatas and drop peers violating the protocol (#28261) 2023-10-10 11:35:51 +03:00
handler_snap.go eth: check snap satelliteness, delegate drop to eth (#22235) 2021-02-02 10:44:36 +02:00
handler_test.go core, eth, miner: start propagating and consuming blob txs (#28243) 2023-10-04 12:36:36 +03:00
handler.go eth: enforce announcement metadatas and drop peers violating the protocol (#28261) 2023-10-10 11:35:51 +03:00
peer.go eth: remove admin.peers[i].eth.head and difficulty (#26804) 2023-03-06 09:27:46 +02:00
peerset.go eth: when snap is complaining for missing eth, be verbose about the details (#28249) 2023-10-04 12:37:04 +03:00
state_accessor.go core, eth, trie: expose more detailed dirty ram tracking for diff layers (#27971) 2023-08-23 14:08:39 +03:00
sync_test.go cmd/devp2p, eth: drop eth/66 (#28239) 2023-10-03 15:03:19 +03:00
sync.go core, accounts, eth, trie: handle genesis state missing (#28171) 2023-09-28 10:00:53 +03:00