Commit Graph

309 Commits

Author SHA1 Message Date
68c76664d0 test: small serialization test of u256 into json (#991)
Co-authored-by: lambdaclass-user <github@lambdaclass.com>
2023-01-23 20:03:12 +01:00
b354a17f65 test: add missing fork_id tests for the Görli and Sepolia nets (#987)
Co-authored-by: lambdaclass-user <github@lambdaclass.com>
2023-01-23 17:32:29 +01:00
1e84189fec chore(primitives): revise signature interface and transaction encode (#928)
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2023-01-22 12:53:32 -08:00
3f7744398b build: bump the CRC crate from 1.x to 3.x (#930) 2023-01-20 18:55:24 -08:00
c41bdd9cbf chore: prevent redundant hash initialization (#947) 2023-01-21 03:47:49 +01:00
a1d83dbbd3 chore: prevent redundant hash initialization (#944) 2023-01-20 09:03:34 -08:00
b4080a7de5 feat: concurrent headers downloader (#891) 2023-01-20 12:06:06 +01:00
78ffd0a7c0 fix(primitives): remove Hardfork::Eip150, Eip158 (#926) 2023-01-18 19:38:25 -08:00
d0e3741136 impl From for Status/SealedHeader (#927) 2023-01-18 19:23:02 -08:00
82b10fae41 feat(primitives): add Hardfork::Eip150 and Eip158 (#925) 2023-01-18 15:04:16 -08:00
9ab244f8f4 feat(primitives): impl From<Genesis> for ChainSpec (#921) 2023-01-18 13:13:59 -08:00
a8b7a089b6 feat(bin): Format db list & db status subcommands (#667)
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2023-01-18 09:59:09 -08:00
161fe0d957 test: signature & transaction w/ EIP155 (#914) 2023-01-18 09:48:52 -08:00
115e623ae6 Ability to (de)serialize NetworkConfigBuilder (#897) 2023-01-18 11:17:43 +01:00
e1aae3e120 feat(primitives): impl genesis state root helper (#904) 2023-01-17 16:15:42 -08:00
74fb28932f fix(node): insert genesis on node startup (#909) 2023-01-17 22:34:24 +01:00
075493ea5e chore(primitives): test all mainnet forkids (#907) 2023-01-17 16:08:36 -05:00
f9de425ad8 refactor: unify all chains confs (#747)
Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
2023-01-17 07:47:34 -08:00
d50d9bd0fe chore(net): Add proptest roundtrip to rlp types (#829) 2023-01-16 09:50:58 -08:00
18dbcd4e6a fix: use correct boolean conversion for direction (#870) 2023-01-13 15:50:39 +01:00
c4bafe809b fix: clippy warnings, or_fun_call and unnecessary_lazy_evaluations (#846) 2023-01-13 11:10:02 +01:00
09c5a04c7b feat(disc): add DnsDiscovery service (#794) 2023-01-12 12:49:02 +01:00
aabbe4923b chore(codecs): add proptest roundtrip to all main_codec (#803) 2023-01-10 22:06:01 -08:00
2b5ee2b18d chore(primitives): use reth::Bytes and implements arbitrary (#776)
* clippy

* add arbitrary to reth Bytes

* clean

* add missing dependency
2023-01-09 12:09:18 +01:00
da59ead58d fix(net): use mapped v4 when inserting records (#761) 2023-01-07 13:36:13 +01:00
258431aac8 primitives: add own Bloom type with arbitrary (#746)
* add own Bloom type with arbitrary

* use impl_hash_compact instead

* add doc to exported macro

* remove unused crate and code

* fix rlp encode length for Bloom

* use RlpDecodableWrapper and RlpEncodableWrapper instead
2023-01-06 13:10:19 +02:00
6407b5087e chore: use B160, B256 and U256 coming from revm and ruint (#676)
* use B256, B160 and U256 from revm

* fix U256 from_str

* use U256::ZERO

* use temporary commit for revm and interpreter

* more U256::ZERO

* more changes for revm/ruint types

* clippy

* change revm and revm-interpreter repo

* remove H160 wrap

* minor cleanup

* remove unused

* fix MIN_PROTOCOL_BASE_FEE
2023-01-04 11:11:48 +02:00
75ebfcf0d6 chore: add RLP encoding support for IpAddr (#659)
* Add rlp encoding support for IpAddr

* Lock support behind std feature

* Replace Octets with IpAddr

* Derive Rlp traits for NodeEndpoint

* Derive Rlp traits for NodeRecord
2022-12-29 22:27:51 +01:00
3ab6c278e8 fix(net): improve error propagation (#620)
* fix(net): improve error propagation

* refactor: unify on closed session

* add noop helpers

* add noop helpers

* test setup

* test: add dropped connection test

* rename mock --> test-utils
2022-12-29 16:05:56 +01:00
565a0aa90b feat(engine): new payload execution (#631)
* feat(engine): new payload execution

* address PR comments

* rm unused dev deps

* add comment about lru

* remove par_iter
2022-12-29 02:36:56 -08:00
d4d8a8c882 Moves code walkthrough book chapters to docs (#629)
* replaced template blocks with code blocks in stages chapter

* replaced template blocks with code blocks in network chapter

* moved book sections to docs

* fix indentation in recover_signer codeblock

* remove unnecessary TODO comment in network.md
2022-12-28 10:24:39 +01:00
dcd3923d19 Add serde support for NodeRecord primitive type (#617)
* Add serde support to NodeRecord

* Move NodeRecord to primitives

along with NodeKey and Octets

* Reexport NodeRecord from discv4

* Move NodeKey and kad_key back to discv4::node

Also, move NodeRecord::key functionality to a helper function: discv4::node::record_key.
This avoids the discv5 dependency in the primitives crate.

* Fix NodeRecord (de)serializing

The default derive macros work with a dictionary like display.
Changed that to serde_with macros, that use Display and FromStr traits.

* Add some tests for NodeRecord (de)serializing

* Hide NodeKey struct

* Move Octets after NodeRecord

* Replace record_key with From trait

* Fix clippy error

unnecessary into()
2022-12-27 18:03:54 +01:00
19a618e3a4 fix(db): Dont compress DupSort SubKey (#594)
* bug(db): Dont compress DupSort SubKey

* unwrap or default config, Added notes

* fmt empty lines
2022-12-25 01:13:03 +01:00
284391c181 test(execution): chain test state check, execution bug fixes/upgrades (#472)
* temp: header stage backoff stand-in

* feat(execution): Check chain post state, fix StateProviderLatest and evm return

* Disable receipt merkle tree check

* update and merge

* Fix storage double values in dup table

* fmt

* Update bin/reth/src/test_eth_chain/runner.rs

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* Enable receipt root check after byzantium

* Receipt inner rlp without header for proof root

* some cleanup nits

* nit

Co-authored-by: Oliver Nordbjerg <hi@notbjerg.me>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-12-23 18:42:19 +01:00
9d439d6fc8 chore(deps): bump ethers (#591) 2022-12-23 13:04:35 +01:00
0b1b5368e6 chore: Rename BlockLocked to SealedBlock (#573)
* chore: Rename BlockLocked to SealedBlock

* chore: fmt

Co-authored-by: Genysys <112424909+samtvlabs@users.noreply.github.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-12-22 14:45:36 +02:00
c070e77524 chore(primitives): Update keccak256 implementation (#563)
* chore(primitives): Update keccak256 implementation

* chore(primitives): Update keccak256 implementation

* revert BytesMut

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2022-12-21 21:22:18 +01:00
7a13cf6688 feat(net): add ForkTransition type (#542) 2022-12-20 18:01:54 +01:00
80b34a961e chore: rm some clippy lints (#540) 2022-12-20 15:25:32 +01:00
daaf039fbf feat(sync): state transition indexes (#449)
* introduce state transitions and revert/modify block bodies table

* init refactor

* revamp transaction iteration based on bodies and add state transition mappings

* change expected return on empty db execution

* interim commit

* fix body downloader & stage

* refactor(bodies/dl): make fetch bodies fn more clear

* chore: disable unused vars/fns temporarily until exec is back

* chore: fmt

* test: fix tests

* use transitions in execution stage

* clarify empty unwind test

* remove last_tx_index fn

* rename fn and var names

* fix full block response comment

* rename fetcher`s get_block_body to get_block_bodies

* Update crates/stages/src/db.rs

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* fmt

* fix index overlap check error

* uncomment eth chain command

* fix doc comment

* typos

* cleanup

* any_last_tx_index -> last_tx_index

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
Co-authored-by: Oliver Nordbjerg <hi@notbjerg.me>
2022-12-16 08:37:49 -08:00
864e6481da fix: set forkfilter correctly (#486)
* fix: set forkfilter correctly

* fix types

* update tests
2022-12-16 14:14:07 +02:00
f509213cb4 refactor: clean up reth node (#450)
* feat: parse genesis block from a json spec

* refactor: clean up `init_genesis`
2022-12-15 17:09:31 +02:00
7b6bf0820e fix(cli): remove usage of StageDB on DbTool (#448)
* use view and update instead of StageDB

* change DbTool docs

* clippy
2022-12-15 08:33:49 +01:00
ad191efe88 fix: typo (#432) 2022-12-14 10:46:24 +01:00
df9d14127d Reth Book - Stages framework/draft (#360)
* Added framework and start to draft for stages, stopping here to get feedback on approach before pushing forward

* Update README.md

Fixing some wording / grammar.

* Fixing grammar/wording.

* Added note about non-exhaustive stages list, fixed grammar, fixed State exectuion function name, updated language to reflect that the stream yields a SealedHeader and added language to describe that the initial header validation is only a basic validation.

* updated stages chapter, added bodies, senders, execution, next chapter prelude

* typo

* Added line numbers to code snippets for the stages chapter of the reth book

* address reverse header download + other nits

* add note about book hosting

* tweaked wording, formatting

* Address typo "staring"

* Address typo "HeadderDownloader"

* consolidated book.toml

* updating snippets in stages chapter to ignore errors

* template & removed empty fields from book.toml

* addressed build issues, added templating for source code

* only deploy on push to main

* using single quotes in github action if expression

Co-authored-by: Andrew Kirillov <andrew@paradigm.xyz>
Co-authored-by: Andrew Kirillov <20803092+akirillo@users.noreply.github.com>
2022-12-14 10:30:45 +02:00
0fa7d5c29b bug: Correct nonce validation (#409)
* feat: Correct nonce validation

* clenup

* Update crates/consensus/src/verification.rs

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-12-13 19:28:05 +02:00
5057e8ec0a feat(p2p): refactor downloaders and add peer id to the result (#410)
* feat(p2p): refactor downloaders and add peer id to the result

* rm unused import

* fix tests

* clean up deps

* Update crates/interfaces/src/p2p/error.rs

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* add split fn

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2022-12-13 17:14:45 +01:00
2b1bb05ca3 tests(chain): add unit tests (#411)
* add chain id and display unit tests

* add from, into and default implementation tests

* add encodable length test for id chain
2022-12-13 17:02:55 +01:00
6e622d7533 tests(hex_bytes): add unit tests (#395)
* Add from_bytes and to_vec tests

* add encodable unit tests

* add partialeq unit tests

* apply code formatting

* add asserts for mirrored partialeq

* add decode test
2022-12-13 11:23:54 +02:00
4fb3626546 chore: Last PR cleanup, nits (#353)
* chore: cleanup, tests and nits

* fmt
2022-12-08 11:16:01 +01:00