Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(l1): p2p architecture #1854

Draft
wants to merge 19 commits into
base: main
Choose a base branch
from
Draft

refactor(l1): p2p architecture #1854

wants to merge 19 commits into from

Conversation

ilitteri
Copy link
Contributor

@ilitteri ilitteri commented Jan 30, 2025

Motivation

Description

Testing Discovery

Run the following and read the logs. CTRL-C to stop.

cargo run --release --example discovery

Testing RLPx as Initiator

Run the following and read the logs. CTRL-C to stop.

cargo run --release --example rlpx_initiator

Testing RLPx as Receiver

Run the following and read the logs. CTRL-C to stop.

cargo run --release --example rlpx_initiator

@ilitteri ilitteri added the L1 label Jan 30, 2025
@ilitteri ilitteri self-assigned this Jan 30, 2025
Copy link

github-actions bot commented Jan 30, 2025

| File                                                                                            | Lines | Diff |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/cmd/ef_tests/levm/runner/levm_runner.rs                         | 392   | -6   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/cmd/ethrex/ethrex.rs                                            | 351   | -46  |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/cmd/ethrex/networks.rs                                          | 16    | -6   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/blockchain/blockchain.rs                                 | 185   | +3   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/blockchain/constants.rs                                  | 18    | +6   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/blockchain/error.rs                                      | 93    | -2   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/blockchain/payload.rs                                    | 481   | -165 |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/common/core.rs                                           | 4     | -2   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/common/types/block.rs                                    | 643   | -5   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/common/types/genesis.rs                                  | 418   | -198 |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/l2/utils/test_data_io.rs                                 | 86    | +1   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p/bootnode.rs                               | 48    | +48  |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p/discv4/server.rs                          | 683   | +7   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p/kademlia.rs                               | 468   | -24  |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p/net.rs                                    | 160   | +6   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p/peer_channels.rs                          | 418   | +418 |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p/rlpx/connection.rs                        | 546   | +152 |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p/rlpx/error.rs                             | 68    | -4   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p/rlpx/eth/transactions.rs                  | 280   | -8   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p/rlpx/frame.rs                             | 204   | +9   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p/rlpx/handshake.rs                         | 264   | -158 |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p/rlpx/utils.rs                             | 72    | -11  |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p/sync.rs                                   | 804   | +35  |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p/types.rs                                  | 235   | -170 |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p_actors/examples/discovery.rs              | 70    | +70  |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p_actors/examples/rlpx_initiator.rs         | 35    | +35  |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p_actors/examples/rlpx_recipient.rs         | 29    | +29  |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p_actors/src/discovery/actor.rs             | 533   | +533 |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p_actors/src/discovery/ingress.rs           | 42    | +42  |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p_actors/src/discovery/mod.rs               | 5     | +5   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p_actors/src/discovery/packet.rs            | 358   | +358 |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p_actors/src/discovery/utils.rs             | 120   | +120 |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p_actors/src/lib.rs                         | 4     | +4   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p_actors/src/peer/actor.rs                  | 98    | +98  |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p_actors/src/peer/caps/mod.rs               | 27    | +27  |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p_actors/src/peer/caps/p2p.rs               | 126   | +126 |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p_actors/src/peer/constants.rs              | 1     | +1   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p_actors/src/peer/crypto.rs                 | 128   | +128 |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p_actors/src/peer/handshake.rs              | 122   | +122 |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p_actors/src/peer/ingress.rs                | 31    | +31  |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p_actors/src/peer/mod.rs                    | 10    | +10  |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p_actors/src/peer/packet.rs                 | 74    | +74  |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p_actors/src/peer/utils.rs                  | 15    | +15  |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p_actors/src/supervisor/actor.rs            | 154   | +154 |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p_actors/src/supervisor/ingress.rs          | 48    | +48  |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p_actors/src/supervisor/mod.rs              | 3     | +3   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p_actors/src/supervisor/types.rs            | 55    | +55  |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/p2p_actors/src/types.rs                       | 344   | +344 |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/rpc/admin/mod.rs                              | 46    | -11  |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/rpc/engine/payload.rs                         | 445   | -4   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/rpc/eth/block.rs                              | 358   | -12  |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/rpc/eth/fee_market.rs                         | 178   | -20  |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/rpc/eth/filter.rs                             | 545   | -3   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/rpc/eth/gas_price.rs                          | 124   | +3   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/rpc/eth/max_priority_fee.rs                   | 109   | +3   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/rpc/rpc.rs                                    | 453   | -58  |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/networking/rpc/utils.rs                                  | 261   | -16  |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/storage/store/engines/api.rs                             | 173   | -1   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/storage/store/engines/in_memory.rs                       | 437   | +5   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/storage/store/engines/libmdbx.rs                         | 810   | +3   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/storage/store/engines/redb.rs                            | 785   | -11  |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/storage/store/storage.rs                                 | 1191  | -7   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/bench/revm_comparison/src/compile.rs             | 63    | -6   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/call_frame.rs                                | 118   | -17  |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/environment.rs                               | 36    | -2   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/errors.rs                                    | 239   | -2   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/opcode_handlers/bitwise_comparison.rs        | 232   | -47  |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/opcode_handlers/keccak.rs                    | 37    | -1   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/opcode_handlers/logging.rs                   | 50    | +3   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/opcode_handlers/stack_memory_storage_flow.rs | 271   | +2   |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/opcode_handlers/system.rs                    | 662   | +13  |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/utils.rs                                     | 444   | +13  |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/levm/src/vm.rs                                        | 719   | -45  |
+-------------------------------------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/vm/vm.rs                                                 | 838   | -4   |
+-------------------------------------------------------------------------------------------------+-------+------+

Total lines added: +3162
Total lines removed: 1072
Total lines changed: 4234

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants