nim-eth/eth
Kim De Mey 522db295f2
Fix RLP deserialzation for Enum with holes (#554)
RLP Enum deserialization would currently not check if "hole values"
were attempted to be converted to the enum type. Now use
checkedEnumAssign and fail with RlpTypeMismatch on invalid values.

There is at least one occurance of an enum with holes in rlpx p2p:
DisconnectionReason. For this enum the issue could occur.

Also:
- Added enum RLP tests and rlpx p2p disconnect message tests to
test the DisconnectionReason with enum hole value.
- Fixed worse custom DisconnectionReason decoding occurance
in rlpx in waitSingleMsg proc where this issue could occur.
2022-11-14 15:49:37 +01:00
..
common Networkid common (#547) 2022-10-20 08:49:20 +02:00
db Add sqlite3.isInsideTransaction 2022-08-22 18:09:13 +07:00
keyfile Revert #544 "Fix related to nim devel branch" (#551) 2022-11-09 18:57:04 +01:00
net Tackle some Nim warnings new since Nim 1.4 & 1.6 (#553) 2022-11-10 16:32:57 +01:00
p2p Fix RLP deserialzation for Enum with holes (#554) 2022-11-14 15:49:37 +01:00
rlp Style fixes according to --styleCheck:usages (#452) 2021-12-20 13:14:50 +01:00
trie Safer mpt proof verification (#536) 2022-09-14 19:02:05 +02:00
utp Revert #544 "Fix related to nim devel branch" (#551) 2022-11-09 18:57:04 +01:00
async_utils.nim awaitWithTimeout for Future[void] 2021-02-04 16:45:50 +02:00
bloom.nim clean up eth_types (#531) 2022-09-02 16:57:52 +02:00
common.nim clean up eth_types (#531) 2022-09-02 16:57:52 +02:00
eip1559.nim Add a helper for calculating the EIP1559 base fee 2022-08-18 23:36:45 +03:00
keyfile.nim Add build_dcli target and add it to CI (#344) 2021-04-06 13:33:24 +02:00
keys.nim clean up eth_types (#531) 2022-09-02 16:57:52 +02:00
p2p.nim Revert #544 "Fix related to nim devel branch" (#551) 2022-11-09 18:57:04 +01:00
rlp.nim Fix RLP deserialzation for Enum with holes (#554) 2022-11-14 15:49:37 +01:00
trie.nim Add build_dcli target and add it to CI (#344) 2021-04-06 13:33:24 +02:00