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
Andrew Kirillov
a51fa4fd63
docs(book): start book chapter for network crate ( #445 )
...
* WIP FOR DRAFT PR
* WIP draft, walking through usage in pipeline
* diving deeper into instantiation of NetworkHandle & FetchClient
* WIP network management task & eth requests task done (ish)
* address pr comments: networkmanager as standalone task, networkconfig as main entrypoint for setup
* complete draft of the crate docs
* restructured, starts w/ expl of
* added more snippets/anchors
* using ignore flag on code blocks, brief explanation of struct
* typos addressed
2022-12-27 14:53:15 -08:00
Matthias Seitz
c1f124d3e3
feat(net): temporarily ban bad peers ( #492 )
...
* feat(net): temporarily ban bad peers
* use half duration interval
* Update crates/net/network/src/peers/manager.rs
Co-authored-by: Bjerg <onbjerg@users.noreply.github.com >
* fix bad test
Co-authored-by: Bjerg <onbjerg@users.noreply.github.com >
2022-12-16 18:22:25 +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
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
Roman Krasiuk
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
Matthias Seitz
b0149f0b9f
fix(net): prevent bad loop if no peers available ( #359 )
...
* fix(net): prevent bad loop if no peers available
* test: add poll fetcher test
2022-12-09 12:39:08 +01:00
Matthias Seitz
2f73345696
misc(net): unify naming ( #358 )
2022-12-08 09:12:58 -08:00
Matthias Seitz
a0c35f1f48
refactor: replace reverse with HeadersDirection ( #305 )
2022-12-01 17:59:33 +01:00
Matthias Seitz
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
Matthias Seitz
7879389059
chore(net): deny unused and cleanup ( #289 )
2022-11-29 20:57:40 +01:00
Matthias Seitz
b5300aafec
feat(net): add request timeout ( #273 )
2022-11-28 14:41:39 -08:00
Matthias Seitz
0e436ae543
feat(net): add missing report on bad response ( #271 )
2022-11-27 23:33:04 -08:00
Matthias Seitz
fd840e1c66
refactor: bodies client API ( #257 )
...
* refactor: bodies client API
* chore: fix errors
2022-11-26 10:04:42 +01:00
Matthias Seitz
fb2861f112
feat(net): integrate HeadersClient ( #251 )
...
* refactor: headers client
* chore: rustfmt
* chore(clippy): make clippy happy
* feat(net): integrate HeadersClient
* fix: parse td as U256 with from_little_endian
* conflicts
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com >
2022-11-25 14:26:43 +01:00
Matthias Seitz
f4dbeddc97
refactor: rename FetchClient and move to submodule ( #245 )
...
* refactor: rename FetchClient and move to submodule
* chore(clippy): make clippy happy
2022-11-24 11:43:05 +01:00