Commit Graph

30 Commits

Author SHA1 Message Date
9df9c03a88 fix(tracing): wrong header in error (#7767) 2024-04-20 00:31:14 +00:00
566a7804a3 fix(stages): block number in error (#7766) 2024-04-20 00:00:52 +00:00
f8ceda9ea8 chore: reduce size of common types (#5304) 2023-11-06 12:45:20 +00:00
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
1ff26dd2fd feat(stages): unwind on detached local head (#3066) 2023-06-09 17:35:46 +00:00
576f33b151 fix: consensus validation method typo (#2432) 2023-04-27 16:04:50 +02:00
837555e296 chore(consensus): Clear up the naming and intention behind checks (#2415)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2023-04-26 18:04:36 +02:00
1711d801af feat: continuous download (#1744) 2023-03-16 22:33:11 -04:00
63bbafaaa7 docs: update stages docs (#1413)
Co-authored-by: lambdaclass-user <github@lambdaclass.com>
2023-02-16 12:23:38 -08:00
02a6aec3fb feat: support time-based forking (#1128) 2023-02-06 12:55:41 -08:00
87306f2892 ci: ensure docs build (#1073)
Co-authored-by: xqft <estefano.bargas@fing.edu.uy>
Co-authored-by: lambdaclass-user <github@lambdaclass.com>
2023-01-27 18:49:22 +01:00
bd540c70ce feat(download): bodies task downloader and header selection fix (#1049) 2023-01-26 04:43:22 -08:00
6c37b0aa1b feat: add task header downloader (#958) 2023-01-25 12:32:28 +01:00
7905100f6d refactor: use dyn Consensus (#1007) 2023-01-24 14:33:48 +01:00
a24048a237 refactor: deprecate downloader trait (#959) 2023-01-24 13:38:11 +01:00
b4080a7de5 feat: concurrent headers downloader (#891) 2023-01-20 12:06:06 +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
2b0f5316f9 fix(sync): headers stage progress (#467)
* fix(sync): headers stage progress

* add tests to head/tip and split suite

* fix(sync): headers stage progress

* add tests to head/tip and split suite

* fix local tip and address comments

* rename error
2022-12-15 10:41:32 -08:00
22dc50e5f6 feat(sync): download peer penalization (#427)
* feat(sync): download peer penalization

* peer penalization

* add tracing on penalization

* add trace on request

* rename consensus back

* clippy

* fix tests

* nit: download result

* nit: fix comment

* rename penalize() to report_bad_message() and move DownloadError

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-12-15 10:42:18 +02: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
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
ba758c5f54 chore(sync): remove timeout from downloader (#356) 2022-12-08 04:53:56 -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
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
f0388e4032 refactor: move BlockHashOrNumber to primitives (#203) 2022-11-15 09:44:07 -08:00
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
caad026c70 refactor: rename HeaderLocked to SealedHeader (#173) 2022-11-07 21:06:53 +01:00
f6d3a49d28 feat(sync): stage tx index (#149)
* init

* feat(sync): tx index stage

* create test runner

* finish tests

* clippy

* cleanup & docs

* add more comments

* revert headers test refactor

* rm unused function
2022-11-04 03:28:18 -07:00
61b8829bdf feat(sync): headers stage (#126)
* port headers stage

* clean up, utils & tests

* more tests

* unwind cleanup & tests

* remove unused rand crate
2022-10-25 16:50:01 -07:00
15bd88e637 headers(part2) - feat: add Downloader trait and test utils (#118)
* feat(interfaces): implement header client traits

* feat: add downloader trait implementer

* feat: use explicit error type instead of ok(false)

* feat: add constructor to HeaderLocked

* test: scaffold mock consensus, downloader and headersclient helpers

* test: implement test consensus

* test: implement test headers client

* refactor: cleanup download headers

* chore: fix lint

* s/test_utils/test_helpers

* headers(part 3) feat: implement Linear downloader (#119)

* feat: add headers downloaders crate

* feat: more scaffolding

* interfaces: generalize retryable erros

* feat: implement linear downloader

* fix linear downloader tests & add builder

* extend & reverse

* feat: linear downloader generics behind arc and reversed return order (#120)

* put client & consensus behind arc and return headers in rev

* cleanup

Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>

* extract test_utils

* cargo fmt

Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>
2022-10-24 04:56:43 -07:00