Skip to content

Commit

Permalink
chore: add msrv to manifests, add and use workspace.package (paradi…
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes authored Jun 6, 2023
1 parent adf4328 commit 171166e
Show file tree
Hide file tree
Showing 48 changed files with 306 additions and 300 deletions.
1 change: 1 addition & 0 deletions .clippy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
msrv = "1.70"
10 changes: 8 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,21 @@ members = [
"crates/tasks",
"crates/transaction-pool",
"crates/trie",
"testing/ef-tests"
"testing/ef-tests",
]
default-members = ["bin/reth"]

# Explicitly set the resolver to version 2, which is the default for packages with edition >= 2021
# https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html
resolver = "2"

[workspace.package]
edition = "2021"
rust-version = "1.70" # Remember to update .clippy.toml and README.md
license = "MIT OR Apache-2.0"
homepage = "https://paradigmxyz.github.io/reth"
repository = "https://github.com/paradigmxyz/reth"

# Like release, but with full debug symbols. Useful for e.g. `perf`.
[profile.debug-fast]
inherits = "release"
Expand All @@ -66,6 +73,5 @@ incremental = false
# patched for quantity U256 responses <https://github.com/recmo/uint/issues/224>
ruint = { git = "https://github.com/paradigmxyz/uint" }


[workspace.dependencies]
tracing = "^0.1.0"
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ Reth (short for Rust Ethereum, [pronunciation](https://twitter.com/kelvinfichter
As a full Ethereum node, Reth allows users to connect to the Ethereum network and interact with the Ethereum blockchain. This includes sending and receiving transactions/logs/traces, as well as accessing and interacting with smart contracts. Building a successful Ethereum node requires creating a high-quality implementation that is both secure and efficient, as well as being easy to use on consumer hardware. It also requires building a strong community of contributors who can help support and improve the software.

More concretely, our goals are:

1. **Modularity**: Every component of Reth is built to be used as a library: well-tested, heavily documented and benchmarked. We envision that developers will import the node's crates, mix and match, and innovate on top of them. Examples of such usage include but are not limited to spinning up standalone P2P networks, talking directly to a node's database, or "unbundling" the node into the components you need. To achieve that, we are licensing Reth under the Apache/MIT permissive license. You can learn more about the project's components [here](./docs/repo/layout.md).
2. **Performance**: Reth aims to be fast, so we used Rust and the [Erigon staged-sync](https://erigon.substack.com/p/erigon-stage-sync-and-control-flows) node architecture. We also use our Ethereum libraries (including [ethers-rs](https://github.com/gakonst/ethers-rs/) and [revm](https://github.com/bluealloy/revm/)) which we’ve battle-tested and optimized via [Foundry](https://github.com/foundry-rs/foundry/).
3. **Free for anyone to use any way they want**: Reth is free open source software, built for the community, by the community. By licensing the software under the Apache/MIT license, we want developers to use it without being bound by business licenses, or having to think about the implications of GPL-like licenses.
4. **Client Diversity**: The Ethereum protocol becomes more antifragile when no node implementation dominates. This ensures that if there's a software bug, the network does not finalize a bad block. By building a new client, we hope to contribute to Ethereum's antifragility.
5. **Support as many EVM chains as possible**: We aspire that Reth can full-sync not only Ethereum, but also other chains like Optimism, Polygon, BNB Smart Chain, and more. If you're working on any of these projects, please reach out.
6. **Configurability**: We want to solve for node operators that care about fast historical queries, but also for hobbyists who cannot operate on large hardware. We also want to support teams and individuals who want both sync from genesis and via "fast sync". We envision that Reth will be configurable enough and provide configurable "profiles" for the tradeoffs that each team faces.


## Status

The project is not ready for use. We hope to have full sync implemented sometime in Q1 2023, followed by optimizations. In the meantime, we're working on making sure every crate of the repository is well documented, abstracted and tested.
Expand All @@ -43,9 +43,9 @@ See the [Reth Book](https://paradigmxyz.github.io/reth) for instructions on how

### Build & Test

Rust minimum required version to build this project is 1.70.0 published 01.06.2023.
The Minimum Supported Rust Version (MSRV) of this project is [1.70.0](https://blog.rust-lang.org/2023/06/01/Rust-1.70.0.html).

See the book for detailed instructions on how to build from [source](https://paradigmxyz.github.io/reth/installation/source.html).
See the book for detailed instructions on how to [build from source](https://paradigmxyz.github.io/reth/installation/source.html).

To fully test Reth, you will need to have [Geth installed](https://geth.ethereum.org/docs/getting-started/installing-geth), but it is possible to run a subset of tests without Geth.

Expand All @@ -60,10 +60,10 @@ Next, run the tests:

```sh
# Without Geth
cargo test --all
cargo test --workspace

# With Geth
cargo test --all --features geth-tests
cargo test --workspace --features geth-tests
```

We recommend using [`cargo nextest`](https://nexte.st/) to speed up testing. With nextest installed, simply substitute `cargo test` with `cargo nextest run`.
Expand Down
20 changes: 8 additions & 12 deletions bin/reth/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "reth"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/paradigmxyz/reth"
readme = "README.md"
build = "build.rs"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[dependencies]
# reth
Expand All @@ -17,7 +17,7 @@ reth-provider = { path = "../../crates/storage/provider", features = ["test-util
reth-revm = { path = "../../crates/revm" }
reth-revm-inspectors = { path = "../../crates/revm/revm-inspectors" }
reth-staged-sync = { path = "../../crates/staged-sync" }
reth-stages = { path = "../../crates/stages"}
reth-stages = { path = "../../crates/stages" }
reth-interfaces = { path = "../../crates/interfaces", features = ["test-utils"] }
reth-transaction-pool = { path = "../../crates/transaction-pool" }
reth-beacon-consensus = { path = "../../crates/consensus/beacon" }
Expand All @@ -40,11 +40,7 @@ reth-metrics = { path = "../../crates/metrics" }
jemallocator = { version = "0.5.0", optional = true }

# crypto
secp256k1 = { version = "0.27.0", features = [
"global-context",
"rand-std",
"recovery",
] }
secp256k1 = { version = "0.27.0", features = ["global-context", "rand-std", "recovery"] }

# tracing
tracing = { workspace = true }
Expand All @@ -56,7 +52,7 @@ serde_json = "1.0"
shellexpand = "3.0.0"
dirs-next = "2.0.0"
confy = "0.5"
toml = {version = "0.7", features = ["display"]}
toml = { version = "0.7", features = ["display"] }

# metrics
metrics-exporter-prometheus = "0.11.0"
Expand Down
15 changes: 7 additions & 8 deletions crates/blockchain-tree/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[package]
name = "reth-blockchain-tree"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/paradigmxyz/reth"
readme = "README.md"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[package.metadata.cargo-udeps.ignore]
normal = [
Expand All @@ -19,22 +20,20 @@ reth-interfaces = { path = "../interfaces" }
reth-db = { path = "../storage/db" }
reth-provider = { path = "../storage/provider" }


# common
parking_lot = { version = "0.12"}
parking_lot = { version = "0.12" }
lru = "0.10"
tracing = { workspace = true }

# mics
aquamarine = "0.3.0"
linked_hash_set = "0.1.4"


[dev-dependencies]
reth-db = { path = "../storage/db", features = ["test-utils"] }
reth-interfaces = { path = "../interfaces", features = ["test-utils"] }
reth-primitives = { path = "../primitives", features = ["test-utils"] }
reth-provider = { path = "../storage/provider", features = ["test-utils"] }
reth-provider = { path = "../storage/provider", features = ["test-utils"] }
parking_lot = "0.12"
assert_matches = "1.5"
tokio = { version = "1", features = ["macros", "sync"] }
Expand Down
16 changes: 6 additions & 10 deletions crates/config/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[package]
name = "reth-config"
version = "0.1.0"
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/paradigmxyz/reth"
readme = "README.md"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[dependencies]
# reth
Expand All @@ -18,13 +19,8 @@ serde = "1.0"
serde_json = "1.0.91"

#crypto
secp256k1 = { version = "0.27.0", features = [
"global-context",
"rand-std",
"recovery",
] }
secp256k1 = { version = "0.27.0", features = ["global-context", "rand-std", "recovery"] }

confy = "0.5"

tempfile = "3.4"

9 changes: 5 additions & 4 deletions crates/consensus/auto-seal/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[package]
name = "reth-auto-seal-consensus"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/paradigmxyz/reth"
readme = "README.md"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
description = "A consensus impl for local testing purposes"

[dependencies]
Expand Down
9 changes: 5 additions & 4 deletions crates/consensus/beacon/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[package]
name = "reth-beacon-consensus"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/paradigmxyz/reth"
readme = "README.md"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[dependencies]
# reth
Expand Down
10 changes: 5 additions & 5 deletions crates/consensus/common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
[package]
name = "reth-consensus-common"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/paradigmxyz/reth"
readme = "README.md"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[dependencies]
# reth
reth-primitives = { path = "../../primitives" }
reth-interfaces = { path = "../../interfaces" }
reth-provider = { path = "../../storage/provider" }


[dev-dependencies]
reth-interfaces = { path = "../../interfaces", features = ["test-utils"] }
reth-provider = { path = "../../storage/provider", features = ["test-utils"] }
Expand Down
9 changes: 5 additions & 4 deletions crates/interfaces/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[package]
name = "reth-interfaces"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/paradigmxyz/reth"
readme = "README.md"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[dependencies]
reth-codecs = { path = "../storage/codecs" }
Expand Down
8 changes: 5 additions & 3 deletions crates/metrics/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
[package]
name = "reth-metrics"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/paradigmxyz/reth"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
description = "reth metrics utilities"

[dependencies]
Expand Down
9 changes: 5 additions & 4 deletions crates/metrics/metrics-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[package]
name = "reth-metrics-derive"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/paradigmxyz/reth"
readme = "README.md"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
proc-macro = true
Expand Down
8 changes: 5 additions & 3 deletions crates/net/common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
[package]
name = "reth-net-common"
version = "0.1.0"
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/paradigmxyz/reth"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
description = """
Types shared across network code
"""
Expand Down
20 changes: 7 additions & 13 deletions crates/net/discv4/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[package]
name = "reth-discv4"
version = "0.1.0"
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/paradigmxyz/reth"
readme = "README.md"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
description = """
Ethereum network discovery
"""
Expand All @@ -19,15 +20,8 @@ reth-net-nat = { path = "../nat" }

# ethereum
discv5 = { git = "https://github.com/sigp/discv5" }
secp256k1 = { version = "0.27.0", features = [
"global-context",
"rand-std",
"recovery",
"serde"
] }
enr = { version = "0.8.1", default-features = false, features = [
"rust-secp256k1",
] }
secp256k1 = { version = "0.27.0", features = ["global-context", "rand-std", "recovery", "serde"] }
enr = { version = "0.8.1", default-features = false, features = ["rust-secp256k1"] }

# async/futures
tokio = { version = "1", features = ["io-util", "net", "time"] }
Expand Down
16 changes: 6 additions & 10 deletions crates/net/dns/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[package]
name = "reth-dns-discovery"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/paradigmxyz/reth"
readme = "README.md"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
description = "Support for EIP-1459 Node Discovery via DNS"

[dependencies]
Expand All @@ -14,12 +15,7 @@ reth-net-common = { path = "../common" }
reth-rlp = { path = "../../rlp" }

# ethereum
secp256k1 = { version = "0.27.0", features = [
"global-context",
"rand-std",
"recovery",
"serde"
] }
secp256k1 = { version = "0.27.0", features = ["global-context", "rand-std", "recovery", "serde"] }
enr = { version = "0.8.1", default-features = false, features = ["rust-secp256k1"] }

# async/futures
Expand Down
9 changes: 5 additions & 4 deletions crates/net/downloaders/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[package]
name = "reth-downloaders"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/paradigmxyz/reth"
readme = "README.md"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
description = "Implementations of various block downloaders"

[dependencies]
Expand Down
Loading

0 comments on commit 171166e

Please sign in to comment.