LambdaClass
4460dc7b25
feat(net): adaptable request timeouts ( #789 )
2023-01-12 11:10:14 +01:00
Enrique Ortiz
dc8edcabb3
chore: double default session event buffer to 128 ( #819 )
...
Co-authored-by: Enrique Ortiz <evalir@users.noreply.github.com >
2023-01-11 17:43:19 +01:00
TurboFish
16d506d21c
add a helper function for ActiveSession on_request to safely emit_message ( #806 )
...
Co-authored-by: turbofish <junwow@amazon.com >
2023-01-11 11:04:23 +01: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
Matthias Seitz
db4f0befee
fix: bump request timeout ( #695 )
2023-01-03 16:12:05 +02: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
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
Matthias Seitz
ebd686a407
refactor(net): rename and restructure wire error types ( #614 )
2022-12-26 16:33:59 +02:00
Matthias Seitz
4e677b5993
refactor(net): unify dropped connection handling ( #595 )
2022-12-23 21:46:44 +01:00
Matthias Seitz
cb58759e66
feat(net): validate discovered enr forkid ( #586 )
2022-12-23 12:15:07 +01:00
mempirate
e549b29cce
feat(net): increase session command buffer ( #585 )
...
* refactor: unnecessary return
* feat: increase session command buffer to 32
2022-12-23 11:24:04 +01:00
Matthias Seitz
1400e51495
chore(net): add more active session traces ( #557 )
...
* chore(net): add more active session traces
* Update crates/net/network/src/session/active.rs
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com >
2022-12-21 15:44:39 +02:00
Matthias Seitz
63406d5a6d
perf(net): put timeout check behind interval ( #537 )
2022-12-20 18:02:35 +01:00
Matthias Seitz
7a13cf6688
feat(net): add ForkTransition type ( #542 )
2022-12-20 18:01:54 +01:00
Dan Cline
aab385c84a
feat(eth-wire): RLP encode then compress ( #535 )
2022-12-20 14:33:47 +02:00
Matthias Seitz
40579bf233
test: decrease test timeout for keep alive ( #523 )
2022-12-19 18:03:50 +01:00
Matthias Seitz
e713b0c015
fix(net): poll after starting disconnect ( #522 )
2022-12-19 18:03:36 +01:00
Matthias Seitz
aac078a132
fix(net): add already connected check ( #521 )
...
* fix(net): add already connected check
* fix: get events before adding peer
2022-12-19 18:03:10 +01:00
Matthias Seitz
864e6481da
fix: set forkfilter correctly ( #486 )
...
* fix: set forkfilter correctly
* fix types
* update tests
2022-12-16 14:14:07 +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
Matthias Seitz
43f6bb9127
feat(net): integrate discovery banlist ( #442 )
...
* feat(net): integrate discovery banlist
* fix typos
2022-12-14 19:47:11 +02:00
Matthias Seitz
9946f232a7
chore(net): improve session error traces ( #435 )
2022-12-14 13:48:28 +02:00
Matthias Seitz
12e7f0acbc
feat(net): make Status and Hello configurable ( #431 )
...
* feat(net): make Status and Hello configurable
* set port
2022-12-14 11:39:09 +01:00
Will Smith
fecdc3f0f2
feat(net): add peer_id/ip blacklist ( #366 )
2022-12-11 02:05:07 -08:00
Matthias Seitz
c117d4b44f
docs(net): add example docs and fix links ( #375 )
2022-12-10 09:19:25 -08:00
Matthias Seitz
4318a54f59
feat(net): integrate TaskExecutor ( #369 )
2022-12-09 09:47:18 -08:00
Matthias Seitz
f65969e90f
perf(net): exclude bootnodes from update stream ( #319 )
2022-12-06 18:02:04 -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
b5300aafec
feat(net): add request timeout ( #273 )
2022-11-28 14:41:39 -08:00
Matthias Seitz
6232505b94
fix(net): substract from correct var ( #262 )
2022-11-26 00:35:51 +01:00
Matthias Seitz
37809ce774
feat(net): add session limits ( #253 )
2022-11-25 18:56:49 +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
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
46e4ad9744
test(net): add active session tests ( #230 )
...
* test(net): add active session tests
* more tests
2022-11-22 00:22:43 -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
3ffc0da7c8
feat(net): add disconnect reason ( #218 )
2022-11-16 11:11:34 -08: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
836ad6aaee
feat(net): add request/response message types ( #176 )
...
* feat(net): add request/response message types
* chore: rustfmt
2022-11-08 17:52:17 +01:00
Matthias Seitz
1408309b74
feat(net): add active session type ( #169 )
...
* refactor(net): unify capability types
* refactor(net): unify capability types
* feat(net): add active session type
2022-11-07 23:15:38 +01:00
Matthias Seitz
5721262740
refactor(net): unify capability types ( #168 )
...
* refactor(net): unify capability types
* refactor(net): unify capability types
2022-11-07 18:04:17 +01:00
Matthias Seitz
b7cdfbf4f9
feat(net): network scaffolding ( #110 )
...
* feat(net): network scaffolding
2022-11-07 09:27:08 +01:00