docs: reth design decisions

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
This commit is contained in:
Dan Cline
2022-12-06 02:10:37 -05:00
committed by Georgios Konstantopoulos
parent 181954ec66
commit b34e2bfa45
6 changed files with 49 additions and 2 deletions

7
docs/design/p2p.md Normal file
View File

@ -0,0 +1,7 @@
# P2P
> Explanation of the [Reth P2P Stack](../../crates/net/p2p) design process
* Our initial design exploration started in [#64](https://github.com/foundry-rs/reth/issues/64), which focused on layering dependent subprotocols as generic async streams, then using those streams to construct higher level network abstractions.
* Following the above design, we then implemented `P2PStream` and `EthStream`, corresponding to the `p2p` and `eth` subprotocol respectively.
* The wire protocol used to decode messages in `EthStream` came from ethp2p, making it easy to get the full stack to work.