mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-13 22:04:52 +00:00
b793f0de8d
* Redefine `seq[Blob]` => `seq[SnapProof]` for `snap/1` protocol why: Proof nodes are traded as `Blob` type items rather than Nim objects. So the RLP transcoder must not extra wrap proofs which are of type seq[Blob]. Without custom encoding one would produce a `list(blob(item1), blob(item2) ..)` instead of `list(item1, item2 ..)`. * Limit leaf extractor by RLP size rather than number of items why: To be used serving `snap/1` requests, the result of function `hexaryRangeLeafsProof()` is limited by the maximal space needed to serialise the result which will be part of the `snap/1` repsonse. * Let the range extractor `hexaryRangeLeafsProof()` return RLP list sizes why: When collecting accounts, the size oft the accounts list when encoded as RLP is continually updated. So the summed up value is available anyway. For the proof nodes list, there are not many (~ 10) so summing up is not expensive here.
41 lines
1.0 KiB
Nim
41 lines
1.0 KiB
Nim
#
|
|
# Copyright (c) 2018-2021 Status Research & Development GmbH
|
|
# Licensed under either of
|
|
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
|
|
# http://www.apache.org/licenses/LICENSE-2.0)
|
|
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or
|
|
# http://opensource.org/licenses/MIT)
|
|
# at your option. This file may not be copied, modified, or
|
|
# distributed except according to those terms.
|
|
|
|
import
|
|
../../nimbus/common/chain_config,
|
|
./test_types
|
|
|
|
const
|
|
bulkTest0* = CaptureSpecs(
|
|
name: "some-goerli",
|
|
network: GoerliNet,
|
|
file: "goerli68161.txt.gz",
|
|
numBlocks: 1_000)
|
|
|
|
bulkTest1* = CaptureSpecs(
|
|
name: "full-goerli",
|
|
network: bulkTest0.network,
|
|
file: bulkTest0.file,
|
|
numBlocks: high(int))
|
|
|
|
bulkTest2* = CaptureSpecs(
|
|
name: "more-goerli",
|
|
network: GoerliNet,
|
|
file: "goerli482304.txt.gz",
|
|
numBlocks: high(int))
|
|
|
|
bulkTest3* = CaptureSpecs(
|
|
name: "mainnet",
|
|
network: MainNet,
|
|
file: "mainnet332160.txt.gz",
|
|
numBlocks: high(int))
|
|
|
|
# End
|