Commit Graph

59 Commits

Author SHA1 Message Date
DaniPopes
f8ceda9ea8 chore: reduce size of common types (#5304) 2023-11-06 12:45:20 +00:00
Thomas Coratger
dd6913cd98 feat(primitives): add _HASH suffix for constants hashes (#5175) 2023-10-25 14:07:21 +00:00
Thomas Coratger
98e03ee4e2 feat(primitives): clean up primitives proof.rs file (#5167) 2023-10-25 13:30:56 +00:00
Dan Cline
b1a7a871cd chore: bump revm (#4884)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: rakita <rakita@users.noreply.github.com>
2023-10-03 13:45:53 +00:00
DaniPopes
5f9a917fb1 feat: Alloy migration (#4737)
Co-authored-by: Alessandro Mazza <121622391+alessandromazza98@users.noreply.github.com>
Co-authored-by: Supernovahs.eth <91280922+supernovahs@users.noreply.github.com>
Co-authored-by: Oliver Nordbjerg <hi@notbjerg.me>
2023-09-28 15:55:39 +00:00
Thomas Coratger
4dbd8835e5 feat(primitives): remove mod ethers_compat (#4771) 2023-09-26 19:03:49 +00:00
Dan Cline
e83d3aa704 chore: bump revm (#4723) 2023-09-22 01:05:10 +00:00
Matthias Seitz
20455d0550 refactor: use revm blob fee calc (#4637) 2023-09-18 16:50:11 +00:00
Dan Cline
83987420f1 fix: use blob_fee to calculate blob_gas_used in receipts (#4523) 2023-09-08 11:27:33 +00:00
Matthias Seitz
97cf35673e feat: add blob fee calc functions (#4440) 2023-08-31 20:47:07 +00:00
Thomas Coratger
2e332b5c8d feat(primitives): add doc for parent_beacon_block_root in Header (#4415) 2023-08-30 22:26:45 +00:00
Dan Cline
0c7a93717a feat: add EIP-4788 parent_beacon_block_root to Header (#4299) 2023-08-29 17:55:13 +00:00
PatStiles
c412f3935d feat: add kzg_to_versioned_hash (#4085)
Co-authored-by: Dan Cline <6798349+Rjected@users.noreply.github.com>
2023-08-10 17:56:03 +00:00
Roberto Bayardo
9569debbb5 feat: make base fee computation parameters configurable via chain spec (#3992) 2023-08-07 15:52:27 +00:00
Dan Cline
334d6068ad feat: add 4844 header fields and consensus checks (#3972) 2023-07-29 12:51:16 +00:00
Dan Cline
6934428be9 feat: better blocksize heuristics (#3748) 2023-07-15 22:36:39 +03:00
Dan Cline
596d32686c feat: download block ranges (#3416)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2023-07-06 11:33:14 +00:00
Matthias Seitz
f49feff5a7 chore: phase out some ethers usage (#3467) 2023-06-29 15:28:28 +00:00
Matthias Seitz
f7a35f09b5 chore: typos, rm oudated todos (#2962) 2023-06-02 13:41:31 +00:00
Matthias Seitz
71581abef5 chore: add SealedHeader::split (#2763) 2023-05-22 12:04:34 +02:00
rakita
435df44127 feat(tree): unconnected block buffering (#2397)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2023-04-28 23:46:45 +02:00
Matthias Seitz
9fb66ffeff chore: move next base fee to header impl (#2400) 2023-04-26 12:31:35 +02:00
rakita
237fd5ce6e feat: BlockchainTree (#1212)
Co-authored-by: Dragan Rakita <draganrakita@192.168.1.4>
2023-03-14 11:17:14 -07:00
Matthias Seitz
d7456dfc2f fix: initialize missing fields (#1448)
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2023-02-18 15:25:58 -08:00
Matthias Seitz
0ef81c9a1d perf: compute hash from input buffer (#1450) 2023-02-18 10:08:50 -08:00
Roman Krasiuk
9b81b4f20d chore: Header::seal and Header::seal_slow distinction (#1409) 2023-02-16 08:55:58 -08:00
Roman Krasiuk
e97753c768 feat: withdrawals (#1322)
Co-authored-by: rakita <rakita@users.noreply.github.com>
2023-02-16 04:44:05 -08:00
Roman Krasiuk
3566c56478 perf(sync): do not store empty ommers entries (#1313) 2023-02-13 16:00:45 +01:00
Roman Krasiuk
eba63b8f77 fix: chainspec ttd check (#1285)
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2023-02-11 12:49:01 -08:00
joshieDo
7e68373f2d perf(stages): Adds benchmark to TransactionLookupStage (#1130)
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
2023-02-09 13:10:12 -08:00
Bjerg
02a6aec3fb feat: support time-based forking (#1128) 2023-02-06 12:55:41 -08:00
Georgios Konstantopoulos
d0e3741136 impl From for Status/SealedHeader (#927) 2023-01-18 19:23:02 -08:00
Dan Cline
9ab244f8f4 feat(primitives): impl From<Genesis> for ChainSpec (#921) 2023-01-18 13:13:59 -08:00
joshieDo
d50d9bd0fe chore(net): Add proptest roundtrip to rlp types (#829) 2023-01-16 09:50:58 -08:00
Matthias Seitz
18dbcd4e6a fix: use correct boolean conversion for direction (#870) 2023-01-13 15:50:39 +01:00
joshieDo
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
joshieDo
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
Andrew Kirillov
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
DaniPopes
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
Roman Krasiuk
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
0xKitsune
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
Dan Cline
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
Roman Krasiuk
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
joshieDo
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
Matthias Seitz
a0c35f1f48 refactor: replace reverse with HeadersDirection (#305) 2022-12-01 17:59:33 +01:00
joshieDo
3efc6ee67e feat(db): Make TransactionSigned compactable (#252) 2022-11-27 23:29:30 -08:00
Matthias Seitz
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
joshieDo
027fc2bbf2 feat(db): derive Compact codec (#177) 2022-11-22 20:46:45 -08:00
rakita
7e693046c6 feat(executor): Execute block of transactions and return tx patches (#238)
* wip executor commit

* finish commit, make execution as functions

* rlp block encoding, fixing proof

* Block execution and test example
2022-11-22 22:57:22 +01:00
Bjerg
92a7818512 feat: bodies stage (#190)
* chore: clean up `.gitignore`

* fix: make RO cursors `Send + Sync`

* feat(wip): bodies stage

* driveby: improve docs

* chore: don't panic if we're the first stage

* chore: use `Vec` for ommers

* feat: error handling in bodies downloader

* chore: remove stale comment

* chore: pascal-case stage id

* refactor: remove unused new fns

* refactor: distinguish downloaders with prefix

* refactor: move downloader errs to own module

* refactor: `stream_bodies` -> `bodies_stream`

* test: fix borked imports in header stage

* test: clean up header tests

* test: add basic body stage tests

* test: add 2 more body stage test skeletons

* test: move generator test utils to own module

* refactor: move proof functions to primitives crate

* feat: add block generator test utils

* test: more body stage tests

* chore: fix typo (`Cannonical*` -> `Canonical`)

* docs: document `bodies_to_download`

* test: more body stage tests

* test: more body stage tests

* refactor: clean up body stage tests a bit

* test: fix broken tests

* refactor: clean up body stage tests

* test: more body stage tests
2022-11-15 08:49:11 +01:00