Commit Graph

21 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
Kim De Mey 26212c881b
Use results.Opt instead of option in discv5, utp and nat (#705)
+ some other minor cleanups
2024-06-18 18:09:27 +02:00
Jacek Sieka 0e83cfda97
results: use standalone repo (#687) 2024-05-30 14:46:57 +02:00
Jacek Sieka 22df101fcf
keyfile: reduce imports (#633) 2023-08-21 11:11:52 +02:00
Kim De Mey d57a1094b1
Remove all Defect raises to avoid unnecessary warnings (#607)
As this module dropped support for Nim versions < 1.6, all Defect
raises can be removed to avoid unnecessary warnings
2023-05-10 15:50:04 +02:00
Justin Traglia e7d3de6ebf
Fix some typos (#557) 2022-11-16 17:44:00 +01:00
andri lim 10870d8b15
Revert #544 "Fix related to nim devel branch" (#551)
This reverts commit:
5d13052dd9
e1bdf1741a
d238693571
2022-11-09 18:57:04 +01:00
jangko 5d13052dd9
refactor: compile with nim-devel 2022-11-08 11:08:25 +07: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
Kim De Mey 762415319c
Add build_dcli target and add it to CI (#344)
* Add build_dcli target and add it to CI

* Fix local imports for dcli

* And use local imports for all other files too

* Use local imports in tests and rlpx protocols
2021-04-06 13:33:24 +02:00
jangko f2f988d6d7
fix keyfile using newest scrypt api 2020-08-03 09:28:46 +07:00
jangko 7afa22cf41
add scrypt kdf to keyfile and implement test for it 2020-07-27 19:34:36 +07:00
Jacek Sieka 61feae0f21
secp: requiresInit updates (#258)
* secp: requiresInit updates

* fixup!

* clean up mapconverts
2020-06-22 18:07:48 +02:00
Jacek Sieka ec1492a65a result -> results 2020-04-07 13:32:10 +03:00
Jacek Sieka 0b110f3287
Secp more refactor (#211)
* simplify some modules

* mark several modules with raises
* fix clearing of keys in auth.nim
* fix keyfile case dropping off
* fix keyfile stream storage
* uuid should be output in lowercase

* enode: simplify API
2020-04-06 18:24:15 +02:00
Jacek Sieka ac5bbe4d3d
keys: get rid of deprecated calls (#213) 2020-04-04 18:44:01 +02:00
Jacek Sieka a899e09f68
fix endian conversion issues 2020-03-05 12:13:48 +01:00
Zahary Karadjov d70bb85392 Review all exceptions and classify them as Defects and Errors 2020-02-06 16:32:00 +01:00
kdeme 0229547c41
More explicit Exceptions + fix re-raising 2019-12-04 12:34:37 +01:00
kdeme 44400ee549 Fix nim v1.0.2 compile issues 2019-10-29 14:44:26 +02:00
Yuriy Glukhov 0d18ffac31 Moved eth-keyfile to eth 2019-02-05 12:45:09 +02:00