aabbe4923b
chore(codecs): add proptest roundtrip to all main_codec ( #803 )
2023-01-10 22:06:01 -08:00
e5e74cbc02
fix(execution): Increase cache scope, and apply block reward to cache ( #793 )
...
* bug: Apply block reward to evm cache
* Move cache to all blocks
* add tests
* Update crates/executor/src/executor.rs
Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com >
Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com >
2023-01-10 08:05:50 -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
15e6a359b4
fix: enable missing feature ( #644 )
2022-12-29 11:07:49 +01: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
562e895f21
ci: unused dependencies sanity check ( #590 )
...
* ci: add unused deps sanity check
* ci: fix unused deps issue template title
* ci: rename udeps job
* chore: formatting
* chore: make `cargo-udeps` ignore `aquamarine`
* deps: resolve unused deps
* ci: check every feature and target in udeps job
2022-12-23 13:19:50 +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
c2719ec27e
chore(deps): bump secp256k1 from 0.24.1 to 0.24.2 ( #440 )
...
Bumps [secp256k1](https://github.com/rust-bitcoin/rust-secp256k1 ) from 0.24.1 to 0.24.2.
- [Release notes](https://github.com/rust-bitcoin/rust-secp256k1/releases )
- [Changelog](https://github.com/rust-bitcoin/rust-secp256k1/blob/secp256k1-0.24.2/CHANGELOG.md )
- [Commits](https://github.com/rust-bitcoin/rust-secp256k1/compare/secp256k1-0.24.1...secp256k1-0.24.2 )
---
updated-dependencies:
- dependency-name: secp256k1
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-14 16:40:16 +02: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
e014eaad33
feat(db): Refactor storage libraries ( #371 )
2022-12-09 23:14:07 -08:00
4fb3626546
chore: Last PR cleanup, nits ( #353 )
...
* chore: cleanup, tests and nits
* fmt
2022-12-08 11:16:01 +01:00
4d718bbf33
s/foundry-rs/paradigmxyz
2022-12-07 00:00:45 -08:00
6c91322251
feat(eth-wire): derive serde traits for eth-wire types ( #348 )
...
* wip: start adding serde to stuff
* add serde traits to NewBlockHashes
* derive serde traits for the rest of the types
* derive serde traits for p2p subprotocol messages
* cargo fmt
2022-12-06 18:05:22 -08:00
9628d03871
feat(sync): headers commit threshold ( #296 )
...
* headers stream init
* fix tests
* return header if available regardless of control flow
* proper stream termination & docs
* upd headers stage to consume stream
* adjust response validation for stream
* use cursor.insert for headers
* wrap poll_next in a loop to bypass poking waker
* fix typo
* fix last td lookup
* Apply suggestions from code review
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com >
* misc
* remove waker ref
* dedup response handling logic
* clippy
* add docs to poll
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com >
2022-12-06 18:02:04 -08:00
2671cd1cb6
chore(primitives): impl serde traits for ForkId ( #342 )
2022-12-06 18:02:04 -08:00
a68cb3f357
feat(stage): Add execution stage ( #287 )
...
* Execution stage
* StorageProviderRef. cleanup, fmt/clippy
* block inclusion
* insert blocks for execution stage
* Sanity test for execution stage
* nits
* Update crates/stages/src/stages/execution.rs
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com >
* Update crates/stages/Cargo.toml
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com >
* Update crates/stages/src/stages/execution.rs
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com >
* Update crates/stages/src/stages/execution.rs
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com >
* feat(execution) Execution change diff. (#323 )
* Insert to execution changediffs
* progress on exec stage unwind
* wip
* Remove tables:BlockBody from execution stage
* unwind passing
* Nits cleanup and refactoring
* DatabaseIntegrity errors
* KECCAK_EMPTY acc to None
* Update crates/interfaces/src/db/tables.rs
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com >
* Update crates/interfaces/src/provider/block.rs
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com >
* Update crates/stages/src/stages/execution.rs
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com >
* nits
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com >
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com >
2022-12-06 18:02:04 -08:00
13df80c1d1
chore(codecs): contain [Struct]Flags in a mod and import what's necessary ( #329 )
...
* contain StructFlags in a mod with its imports
* update code generation test
2022-12-06 18:02:04 -08:00
2b6ef0afcf
fix(eth-wire): encode p2p message id as valid rlp ( #324 )
2022-12-06 18:02:04 -08:00
bb014eea25
codecs: "type specialization" for Compact on Vec<T> & Option<T> ( #297 )
...
* maybe_zero no longer necessary on bytecode_hash
* add alt impl for Compact to/from
* add some more docs
* add default vec impl on generator test
* use default trait impl
* rename from alternative to specialized
2022-12-02 01:56:08 -08:00
a0c35f1f48
refactor: replace reverse with HeadersDirection ( #305 )
2022-12-01 17:59:33 +01:00
3355b0c605
test(net): add e2e request body test ( #304 )
...
* test(net): add e2e request body test
* test(net): add e2e request header test
2022-12-01 15:35:14 +01:00
480097a7ca
feat(net): add eth request handler ( #293 )
...
* feat(net): add block request manager
* refactor: change ommers type to Header
* feat: impl handlers
* rename to EthRequestHandler
* impl checks
* fix: skip as step
* chore: rustfmt
2022-11-30 21:19:50 +01:00
267b857a8f
refactor: change ommers type to Header ( #292 )
2022-11-30 00:13:52 +01:00
96afa2d41d
chore: Noted about code origin ( #278 )
2022-11-28 09:26:36 -08:00
3efc6ee67e
feat(db): Make TransactionSigned compactable ( #252 )
2022-11-27 23:29:30 -08:00
dda8df7341
refactor: headers client ( #249 )
...
* refactor: headers client
* chore: rustfmt
* chore(clippy): make clippy happy
* address comments
* use Error instead
* fix(sync): headers test client & stage tests (#255 )
* headers test client & stage tests
* fix timeout test
* fix import
Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com >
2022-11-25 14:00:06 +01:00
d6a11c7f48
chore(deps): bump ethers + ethereum types + revm ( #228 )
...
* chore(deps): bump ethers + ethereum types
* bump revm
* chore(clippy): make clippy happy
2022-11-23 11:54:54 +01:00
027fc2bbf2
feat(db): derive Compact codec ( #177 )
2022-11-22 20:46:45 -08:00