Commit Graph

5 Commits

Author SHA1 Message Date
Jordan Hrycaj 98b2a34075
Fix rlpx hello crash caused by rlp decoder (#721)
* Restricting exception catcher

why:
  `CatchableError` is not needed here

* Check data length before converting to `openArray[]`

why:
  Getting the first entry of an `openArray[]` crashes with `IndexDefect`.
  This is particularly annoying when decoding messages in rlpx.

* Added unit test using rlpx message that causes this problem to detect
2024-08-19 11:38:46 +00:00
Kim De Mey 8ab060b19f
Move Ethereum specific RLP encoding tests under tests/common (#673)
This is more according to the structure of the code itself.
And also, currently some of these tests live under tests/rlp but
some under tests/common. Could use some further re-organisation
within the different tests, but this move is a first step.
2024-02-09 17:30:24 +01:00
jangko 7ff6de2367
fix rlp.readRecordType of BlockBody and friends
including:
- fix rlp.append of BlockHeader
- add tests for rlp.readRecordType of BlockBody
- add tests for rlp.append of BlockHeader
- add tests for EthBlock roundtrip
2023-05-23 14:37:47 +07:00
Jacek Sieka 205b57fe71
port kvstore from nim-beacon-chain (#230)
* port kvstore from nim-beacon-chain
* remove old database backends
* use kvstore in trie database
* add sqlite dep
* avoid template param double evaluation
* clean up heterogenous lookup todo
2020-04-27 15:16:11 +02:00
Jacek Sieka 1646d78d83
cleanups (#226) 2020-04-18 10:17:59 +02:00