Commit Graph

70 Commits

Author SHA1 Message Date
Matthias Seitz
94dfeb3ade fix: validate headers in full block downloader (#4034) 2023-08-02 16:36:48 +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
64554dd0f1 fix: add missing single block body download validation (#3563) 2023-07-03 17:58:50 +00:00
Roman Krasiuk
1ff26dd2fd feat(stages): unwind on detached local head (#3066) 2023-06-09 17:35:46 +00:00
Matthias Seitz
ba4776a0ca feat: track total size of buffered blocks (#2838) 2023-05-25 16:42:11 +00:00
Matthias Seitz
352b55dc05 chore: rename Error to DatabaseError (#2718) 2023-05-17 15:21:46 +02:00
Roman Krasiuk
9b79218c18 fix(p2p): network sync state (#2699) 2023-05-16 22:24:40 +02:00
Dan Cline
2436e019c6 fix: use auto seal client for consensus (#2690)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2023-05-16 13:10:48 +02:00
Matthias Seitz
a5dbbe4187 fix: don't starve high priority requests (#2660) 2023-05-13 13:18:24 -04:00
Matthias Seitz
e34cdc4e0d feat: extend engine syncing with single block downloads (#2626) 2023-05-12 15:02:45 +02:00
Matthias Seitz
abcadd987c fix: reset correct value (#2618) 2023-05-10 12:14:27 +02:00
Matthias Seitz
64250b3b07 feat: add fullblock client (#2613) 2023-05-09 16:46:17 +02:00
Roman Krasiuk
576f33b151 fix: consensus validation method typo (#2432) 2023-04-27 16:04:50 +02:00
rakita
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
Bjerg
68d8506d8e feat: block level indexing (#2275)
Co-authored-by: rakita <dragan0rakita@gmail.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2023-04-20 15:03:48 -04:00
Matthias Seitz
7263c9a644 chore: use downloader and client traits where possible (#1992) 2023-03-27 19:45:17 +02:00
Dan Cline
b28c40223e chore: move block body to primitives (#1874) 2023-03-20 21:14:23 -07:00
Dan Cline
1711d801af feat: continuous download (#1744) 2023-03-16 22:33:11 -04:00
Matthias Seitz
ad5f9aa78c refactor: extract transaction consensus errors to standalone type (#1697) 2023-03-10 04:43:04 -08:00
Matías Ignacio González
63bbafaaa7 docs: update stages docs (#1413)
Co-authored-by: lambdaclass-user <github@lambdaclass.com>
2023-02-16 12:23:38 -08:00
Bjerg
d216081b58 feat: add Finish stage (#1279) 2023-02-14 17:10:50 +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
Roman Krasiuk
ee413da924 chore(download): remove body download range recovery (#1201) 2023-02-07 05:39:25 -08:00
Bjerg
02a6aec3fb feat: support time-based forking (#1128) 2023-02-06 12:55:41 -08:00
Matthias Seitz
705d9fcc82 fix: consider empty headers response edge case (#1180) 2023-02-06 11:28:59 +01:00
Matthias Seitz
28cb91c6b4 perf(net): use qualified types for headers client future (#1115) 2023-02-01 13:12:48 +01:00
Aurélien
c5bc272057 fix: report reputation changes correctly (#1086)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2023-01-31 11:05:13 -08:00
Aurélien
e2ac4d3f3c feat: convert HeadersClient BodiesClient futures into associated types (#1063) 2023-01-30 01:25:15 -08:00
Bjerg
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
Roman Krasiuk
bd540c70ce feat(download): bodies task downloader and header selection fix (#1049) 2023-01-26 04:43:22 -08:00
Matthias Seitz
6c37b0aa1b feat: add task header downloader (#958) 2023-01-25 12:32:28 +01:00
Roman Krasiuk
d08aa94f5d feat(download): bodies downloader metrics (#1027) 2023-01-25 02:59:12 -08:00
Roman Krasiuk
c5cd64bb0e chore(download): cleanup bodies downloader errors (#1026) 2023-01-25 02:05:24 -08:00
Roman Krasiuk
e195e1d14c chore(download): propagate fatal bodies db error (#1008) 2023-01-24 06:17:53 -08:00
Bjerg
7905100f6d refactor: use dyn Consensus (#1007) 2023-01-24 14:33:48 +01:00
Matthias Seitz
a24048a237 refactor: deprecate downloader trait (#959) 2023-01-24 13:38:11 +01:00
Roman Krasiuk
d601895940 feat(download): bodies downloader stream (#905)
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2023-01-23 10:48:03 -08:00
Matthias Seitz
009d2056f9 fix: mark response correctly (#966) 2023-01-22 16:48:04 +01:00
Aurélien
583426bb95 Prevent follow-up requests if a response is likely bad (#946) 2023-01-21 20:13:20 -08:00
Ikechukwu Ahiara Marvellous
ac9f26fcab Extend HeadersClient, BodiesClient with a priority argument (#935)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2023-01-20 14:20:46 +01:00
Matthias Seitz
b4080a7de5 feat: concurrent headers downloader (#891) 2023-01-20 12:06:06 +01:00
Matthias Seitz
79fad91ca0 feat(net): integrate num active peers in downloader (#900)
Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>
2023-01-17 01:31:52 -08:00
Matthias Seitz
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
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
Genysys
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
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
Roman Krasiuk
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
Roman Krasiuk
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
mempirate
c23c65fc3b feat(net): draft for sending status updates through NetworkHandle (#436)
* feat(net): draft for sending status updates through `NetworkHandle`

* feat(net): draft for sending status updates through `NetworkHandle`

* fix(net): remove unused import

* feat(net): implement getters for status update sender half

* docs(net): document methods

* chore: cargo fmt

* feat(net): move status updating logic to NetworkManager and NetworkHandle

* feat(net): move status updating logic to NetworkManager and NetworkHandle

* fix(net): fix headers stage testing

* fix: derive default

* fix: remove StatusUpdate struct

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2022-12-15 08:59:28 +01:00