Commit Graph

10 Commits

Author SHA1 Message Date
Jacek Sieka 6bd6bae86c
Align core types with execution spec (#733)
Since these types were written, we've gained an executable spec:

https://github.com/ethereum/execution-specs

This PR aligns some of the types we use with this spec to simplify
comparisons and cross-referencing.

Using a `distinct` type is a tradeoff between nim ergonomics, type
safety and the ability to work around nim quirks and stdlib weaknesses.

In particular, it allows us to overload common functions such as `hash`
with correct and performant versions as well as maintain control over
string conversions etc at the cost of a little bit of ceremony when
instantiating them.

Apart from distinct byte types, `Hash32`, is introduced in lieu of the
existing `Hash256`, again aligning this commonly used type with the spec
which picks bytes rather than bits in the name.
2024-09-29 10:52:19 +02:00
Jacek Sieka 56f72c7a66
Revert speedups (#718)
* Revert "hash compatibility fix (#717)"

This reverts commit 047de2b788.

* Revert "port eth2_digest speedups to eth_hash (#716)"

This reverts commit 864d54467e.
2024-08-09 07:20:35 +02:00
Jacek Sieka 864d54467e
port eth2_digest speedups to eth_hash (#716)
* port eth2_digest speedups to eth_hash

* faster comparison
* `hash` integration
* lower-case printing
2024-08-08 05:44:15 +00:00
Jacek Sieka d31abca010
clean up eth_types (#531)
`eth_types` is being imported from many projects and ends up causing
long build times due to its extensive import lists - this PR starts
cleaning some of that up by moving the chain DB and RLP to their own
modules.

this PR also moves `keccakHash` to its own module and uses it in many
places.
2022-09-02 16:57:52 +02:00
Kim De Mey 2c236f6495
Style fixes according to --styleCheck:usages (#452)
Currently only setting `--styleCheck:hint` as there are some
dependency fixes required and the compiler seems to trip over the
findnode MessageKind, findnode Message field and the findNode
proc. Also over protocol.Protocol usage.
2021-12-20 13:14:50 +01:00
jangko 6c0bc31ad6
add 'BloomFilter.init' implementation 2020-09-30 12:04:23 +07:00
jangko 0194fb85eb
make 'bloom.incl(h256)' public 2020-09-30 11:57:57 +07:00
jangko 2f37870b6b
make 'bloom.contains' public 2020-09-30 11:01:50 +07:00
Jacek Sieka 4c6878343c tighten a few imports 2019-12-09 14:37:21 +02:00
Yuriy Glukhov afeb2c0b93 Moved eth_bloom to eth, some fixes 2019-02-05 16:22:21 +02:00