Skip to content

Commit

Permalink
feat(p2p): add rpc messages and codec
Browse files Browse the repository at this point in the history
  • Loading branch information
dancoombs committed Oct 10, 2023
1 parent f1c3f5d commit fb701ba
Show file tree
Hide file tree
Showing 11 changed files with 3,354 additions and 139 deletions.
1,854 changes: 1,716 additions & 138 deletions Cargo.lock

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,11 @@ test-spec-integrated: ## Run spec tests in integrated mode
.PHONY: test-spec-modular
test-spec-modular: ## Run spec tests in modular mode
test/spec-tests/remote/run-spec-tests.sh


.PHONY: test-coverage-all
test-coverage-all: ## Run tests and display coverage
cargo llvm-cov nextest --all-features --open --workspace

.PHONY: test-coverage
test-coverage: ## Run tests and display coverage for a single package
cargo llvm-cov nextest --all-features --open -p $(package)
28 changes: 28 additions & 0 deletions crates/network/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[package]
name = "rundler-network"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true

[dependencies]
rundler-types = { path = "../types" }

ethereum_ssz = "0.5.3"
ethereum_ssz_derive = "0.5.3"
ethers.workspace = true
snap = "1.1.0"
ssz_types = "0.5.4"
tokio-util = { workspace = true, features = ["codec", "compat"] }
thiserror.workspace = true
tracing.workspace = true
unsigned-varint = { version = "0.7.2", features = ["codec"] }

[dependencies.libp2p]
version = "0.52.3"
default-features = false
features = ["tokio", "noise", "macros", "tcp", "identify", "yamux", "secp256k1"]

[dev-dependencies]
rand.workspace = true
29 changes: 29 additions & 0 deletions crates/network/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// This file is part of Rundler.
//
// Rundler is free software: you can redistribute it and/or modify it under the
// terms of the GNU Lesser General Public License as published by the Free Software
// Foundation, either version 3 of the License, or (at your option) any later version.
//
// Rundler is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along with Rundler.
// If not, see https://www.gnu.org/licenses/.

#![warn(missing_docs, unreachable_pub)]
#![deny(unused_must_use, rust_2018_idioms)]
#![doc(test(
no_crate_inject,
attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables))
))]

//! Implementation of the ERC-4337 Bundler P2P Network Protocol.
//! See the [specification](https://github.com/eth-infinitism/bundler-spec/blob/main/p2p-specs/p2p-interface.md) for more details.
//!
//! Lots of inspiration for the components of this implementation were taken from the Lighthouse implementation
//! of the Ethereum consensus layer p2p protocol. See [here](https://github.com/sigp/lighthouse/) for more details.
// TODO(danc): remove this before release
#[allow(dead_code)]
mod rpc;
Loading

0 comments on commit fb701ba

Please sign in to comment.