status-im / nimbus-eth2

Nim implementation of the Ethereum Beacon Chain
https://nimbus.guide
Other
523 stars 227 forks source link

more concise RLP decoding syntax in EL helpers #6514

Closed etan-status closed 1 month ago

etan-status commented 1 month ago

The comment in readExecutionTransaction is not actually relevant when the rlp.decode template is called from a non-generic function. The function still cannot be simply inlined; is_valid_versioned_hashes is itself generic and would require an export eth_types_rlp to work properly (generic sandwich issue). The non-generic function wrapper seems simpler and avoids injecting RLP into importing modules.