Commit Graph

44 Commits

Author SHA1 Message Date
Dan Cline
a40b79e193 fix: set sync state at startup to idle (#2722) 2023-05-17 22:32:56 +02:00
Roman Krasiuk
9b79218c18 fix(p2p): network sync state (#2699) 2023-05-16 22:24:40 +02:00
Matthias Seitz
c132c6681a fix(net): syncing should be true at startup (#2395) 2023-04-25 17:09:37 +02:00
mempirate
21ebfee461 feat(p2p): add reputation management features (#2389) 2023-04-25 14:18:53 +02:00
Aditya Pandey
6f15f844a5 Removing reth network api dependency from rpc types (#2281)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2023-04-17 14:03:06 +02:00
Matthias Seitz
47b9738ede chore: fix some typos (#2025) 2023-03-29 14:49:50 +02:00
Matthias Seitz
2a457c7023 feat(rpc): add eth_syncing implementation (#1859) 2023-03-20 04:22:17 -07:00
Matthias Seitz
f78da81e1e feat(net): support eth68 transactions (#1482) 2023-02-21 14:34:59 -05:00
Kim, JinSan
c9075920c1 feat(net): support eth/68 (#1361)
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2023-02-20 19:37:03 -08:00
Bjerg
02a6aec3fb feat: support time-based forking (#1128) 2023-02-06 12:55:41 -08:00
Mariano A. Nicolini
dab1f4f497 feat(net): add shutdown network signal (#1011)
Co-authored-by: lambdaclass-user <github@lambdaclass.com>
2023-02-04 12:28:13 -08:00
Matthias Seitz
5c32ad01c9 refactor: add Peers trait und decouple rpc from NetworkHandle (#1100) 2023-01-31 10:32:45 -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
Aurélien
0666e29427 feat: move ReputationChangeKind to network-api (#1035) 2023-01-25 13:17:26 +01:00
Aurélien
e493720f64 feat: integrate chain_id and protocol_version in NetworkInfo (#1029) 2023-01-25 13:08:40 +01:00
Aurélien
1c93b2c528 feat: refactoring get_status() to return NetworkStatus (#997) 2023-01-24 14:38:21 +01:00
Aurélien
6f047a5de0 feat: add Web3 namespace RPC handler (#990) 2023-01-23 22:53:15 +01:00
Ikechukwu Ahiara Marvellous
a331b54bb0 Create Network variant in reth_interfaces::Error (#950) 2023-01-22 20:59:50 +01:00
Enrique Ortiz
cfef666886 Network: Extend NetworkInfo trait with NetworkStatus (#923) 2023-01-19 14:43:51 -05:00
Enrique Ortiz
0603f07c6c feat(net): add way to get the NodeRecord of the local node (#875)
Co-authored-by: Enrique Ortiz <evalir@users.noreply.github.com>
2023-01-13 15:57:29 +01:00
Matthias Seitz
3f9e7a080a feat(net): introduce PeersInfo trait (#860) 2023-01-13 12:04:39 +01:00
Matthias Seitz
ba3048ceb0 refactor: add network-api crate (#838) 2023-01-12 19:39:44 -08:00
Dimitris Apostolou
31cb66902e fix: Fix typos (#773) 2023-01-09 01:43:51 +01:00
Andrew Kirillov
2da828478c feat(net): Bandwidth monitoring (#707)
* WIP for draft PR

* added basic test

* using BandwidthMeterInner type & added TcpStream test

* formatted

* formatted w/ +nightly

* using  &  for  and

* formatted

* added default impl for BandwidthMeter

* using _bandwidth_meter bc unused

* removed redundant clone

* addressed nits, renamed file

* addressed nits, renamed file
2023-01-06 21:43:13 +01:00
Aurélien
65bc3cb7b8 RPC Admin namespace implementation (#685)
* AdminApi first draft

* Implement add_trusted_peer and remove_trusted_peer

* Fix tests

* Refactoring NetworkHandle peer related methods

* Refactoring add_discovered_node in PeersManager

* Change record type from String to NodeRecord

* Adding NetworkHandleMessage::RemovePeer command
2023-01-03 14:02:05 +01:00
Matthias Seitz
debf21d34e feat: add SyncState traits (#693)
* feat: add SyncState traits

* docs: clarify execution stage
2023-01-03 14:56:50 +02:00
Ayush
de6630a121 feat(network): get peer info (#603)
* Create struct PeerInfo

* Add GetPeerInfo command

* Minor changes

* Use oneshot::sender

* Add GetPeerInfoById

* Use async/await

* Add client_id to establish connection

* Add method calls

* Add test_get_peer

* Add test_get_peer_by_id

* fmt changes

* clippy changes

* chore: rustfmt

* smol touch ups

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2022-12-29 14:20:17 +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
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
a5f01238b9 feat(net): allow disconnect with reason (#519) 2022-12-19 16:22:24 +01: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
Matthias Seitz
c117d4b44f docs(net): add example docs and fix links (#375) 2022-12-10 09:19:25 -08:00
Matthias Seitz
5300c83a50 feat(net): send full transactions to fraction of all peers (#272)
* refactor(net): use shared objects on a per peer basis

* feat(net): send full transactions to fraction of all peers

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-12-02 04:21:23 -08:00
Matthias Seitz
7879389059 chore(net): deny unused and cleanup (#289) 2022-11-29 20:57:40 +01:00
Matthias Seitz
e53ed8ffc2 refactor(net): use shared objects on a per peer basis (#270) 2022-11-29 11:43:45 +01:00
Matthias Seitz
b6d9fe87b9 feat(net): propagate new transactions (#256) 2022-11-25 22:13:20 +01:00
Matthias Seitz
8966daad9d feat(net): reputation system and peer reporting (#239)
* refactor: move to module

* feat(net): reputation system and peer reporting

* be specific in test

* use saturating sub
2022-11-24 10:14:50 +01:00
Matthias Seitz
0f45f16455 test(net): add Testnet implementation for testing (#232)
* test(net): add Testnet implementation for testing

* test(net): add testnet type and test
2022-11-22 19:33:01 -05:00
Matthias Seitz
f7c6ae5858 feat(net): impl active session (#219)
* feat(net): impl active stream

* rename fields

* work on active

* feat(net): add disconnect function

* more work on active session

* feat(net): add broadcast message variants

* feat: impl session future

* misc: refactor

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-11-21 11:31:03 +01:00
Matthias Seitz
09ba65fa75 feat(net): add NetworkMode to enforce POS rules (#215) 2022-11-16 11:42:58 -08:00
Matthias Seitz
f8fddcdfa4 feat(p2p): integrate txpool in p2p (#208) 2022-11-15 22:27:41 +01:00
Matthias Seitz
b60ced1de1 feat: add missing message handling (#200)
* feat: add missing message handling

* refactor: new block message handling

* feat: add events and commands for transaction handling

* more work in transactions

* chore: silence warnings
2022-11-15 10:34:28 +01:00
Dan Cline
f1e6639374 feat(net): authenticate sessions (#178)
* Switch stream type of ActiveSession to EthStream

 * Start `StatusBuilder` for initializing the `Status` message required
   for the handshake
 * Add `Hardfork` for `Status` default forkid
 * Add `MAINNET_GENESIS` constant

* finish `StatusBuilder`

* initialize eth streams in session

 * add status, hello, and fork filter to session manager
 * fix status builder example
 * add status and hello to network config
   * will probably remove

* removing status and hello from networkconfig

* move forkid to primitives

* change imports for forkid

* add hardfork to primitives

* remove hardfork and forkid from eth-wire

* fix remaining eth-wire forkid references

* put mainnet genesis in constants, remove NodeId

* replace NodeId with PeerId

 * the only NodeId remaining is inherited from enr
 * PeerId still needs to be documented
 * also run cargo fmt

* replace loop with iter().any()

* ignore missing docs for hardforks

* use correct PeerId for Discv4::bind example test

* document PeerId as secp256k1 public key

* cargo fmt

* temporarily allow too_many_arguments

 * the authenticate and start_pending_incoming_session methods have many
   arguments, we can reconsider the lint or fix the methods at a later
   point
2022-11-14 12:03:05 -05:00
Matthias Seitz
b7cdfbf4f9 feat(net): network scaffolding (#110)
* feat(net): network scaffolding
2022-11-07 09:27:08 +01:00