-
Notifications
You must be signed in to change notification settings - Fork 5
docs: fix README, CONTRIBUTING, and AGENTS drift #650
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,9 @@ The easiest way to set up the development environment is using [Nix](https://nix | |
| nix develop | ||
| ``` | ||
|
|
||
| This automatically provides all required dependencies (Rust toolchain, Protobuf, oas3-gen, cargo-deny, cargo-machete) and configures git hooks. | ||
| This automatically provides the auxiliary dependencies (Protobuf, Go, oas3-gen, cargo-deny, cargo-machete) and configures git hooks. | ||
|
|
||
| > **Note:** `nix develop` does **not** manage the Rust toolchain. The toolchain is pinned in `rust-toolchain.toml` and must be installed separately via [rustup](https://rustup.rs/). After installing rustup, run `rustup show` once in the repo root to install the pinned toolchain automatically. The nightly toolchain is also required for `rustfmt` — install it with `rustup toolchain install nightly`. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is outdated: the Nix setup already provides the correct Rust toolchain. Drop this note entirely.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done — dropped the note entirely. Merged |
||
|
|
||
| ### Manual Setup | ||
|
|
||
|
|
@@ -29,6 +31,8 @@ Then install the pre-push git hook: | |
| git config core.hooksPath .githooks | ||
| ``` | ||
|
|
||
| The pre-push hook (`.githooks/pre-push`) runs the full quality-gate sequence in order: `cargo deny check`, `cargo machete`, `cargo +nightly fmt --all -- --check`, `cargo clippy --locked --all-targets --all-features -- -D warnings`, and `cargo test --locked --workspace --all-features`. All checks must pass before a push is accepted. | ||
|
|
||
| ## Building | ||
| To build the project with all its crates, run: | ||
|
|
||
|
|
@@ -43,6 +47,8 @@ To run all tests - unit and integration - run: | |
| cargo test --workspace --all-features | ||
| ``` | ||
|
|
||
| > **Note:** `--all-features` enables the `integration` feature in `crates/eth2api`, which uses [testcontainers](https://github.com/testcontainers/testcontainers-rs) and therefore requires a **running Docker daemon**. Without Docker the integration tests will fail with opaque errors. Smoke tests that invoke Go tooling (e.g. `create-cluster-compare.sh`) additionally require [Go](https://go.dev/dl/) to be installed. | ||
|
|
||
| ## Running the Rust Documentation Locally | ||
| To build the documentation locally: | ||
|
|
||
|
|
@@ -102,9 +108,9 @@ This command will open a browser page that contains a graphic representation of | |
|
|
||
| ### Dhat | ||
| We can add Dhat as a dependency: | ||
| ```rust | ||
| ```toml | ||
| [dependencies] | ||
| dhat = "latest" | ||
| dhat = "0.3" | ||
|
|
||
| [features] | ||
| dhat-heap = [] | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -22,16 +22,39 @@ The important sections are [intro](https://docs.obol.org/learn/charon), | |||||||||
|
|
||||||||||
| ## Version compatibility | ||||||||||
|
|
||||||||||
| Considering [semver](https://semver.org) as the project's versioning scheme, two given versions of Charon are: | ||||||||||
| Pluto tracks [Charon](https://github.com/ObolNetwork/charon/) parity: the workspace version reflects the Charon release that Pluto aims to be compatible with. | ||||||||||
|
|
||||||||||
| Following [semver](https://semver.org), two given versions of Pluto are: | ||||||||||
| - **compatible** if their `MAJOR` number is the same, `MINOR` and `PATCH` numbers differ | ||||||||||
| - **incompatible** if their `MAJOR` number differs | ||||||||||
|
|
||||||||||
| There are several reasons to justify a new `MAJOR` release, for example: | ||||||||||
| - a new Ethereum hardfork | ||||||||||
| - an old Ethereum hardfork is removed due to network inactivity | ||||||||||
| - modifications to the internal P2P network or consensus mechanism requiring deep changes to the codebase | ||||||||||
| Reasons for a new `MAJOR` release include a new Ethereum hardfork, removal of an old hardfork, or breaking changes to the internal P2P network or consensus mechanism. | ||||||||||
|
|
||||||||||
| The `pluto dkg` subcommand is **more restrictive**: all peers must run matching `MAJOR` and `MINOR` versions for the DKG ceremony; patch versions may differ, though running the latest patch is recommended. | ||||||||||
|
|
||||||||||
| ## Build / Run / Test | ||||||||||
|
|
||||||||||
| **Docker (pre-built image):** | ||||||||||
| ```sh | ||||||||||
| docker pull ghcr.io/nethermindeth/pluto:latest | ||||||||||
| docker run --rm ghcr.io/nethermindeth/pluto:latest pluto --help | ||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't use Github's container registry. Also, the entrypoint is already
Suggested change
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Applied the suggestion — Docker Hub ( |
||||||||||
| ``` | ||||||||||
|
|
||||||||||
| **Build from source:** | ||||||||||
| ```sh | ||||||||||
| cargo build --release --workspace | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| **Run tests:** | ||||||||||
| ```sh | ||||||||||
| cargo test --workspace --all-features # requires a running Docker daemon | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| The `charon dkg` subcommand **is more restrictive** than this general compatibility promise; all peers should use matching `MAJOR` and `MINOR` versions of Charon for the DKG process, patch versions may differ though it is recommended to use the latest patch of any version. | ||||||||||
| **Local cluster with test-infra:** | ||||||||||
| ```sh | ||||||||||
| cd test-infra | ||||||||||
| docker compose up | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| ## Examples | ||||||||||
|
|
||||||||||
|
|
@@ -40,9 +63,14 @@ Examples are located in crate-specific example folders: | |||||||||
| - [Relay Server](crates/relay-server/examples/relay_server.rs) | ||||||||||
| - [Peerinfo](crates/peerinfo/examples/peerinfo.rs) | ||||||||||
| - [P2P](crates/p2p/examples/p2p.rs) | ||||||||||
| - [P2P Bootnode](crates/p2p/examples/bootnode.rs) | ||||||||||
| - [Quic Upgrade](crates/p2p/examples/quic_upgrade.rs) | ||||||||||
| - [Metrics](crates/p2p/examples/metrics.rs) | ||||||||||
| - [Tracing](crates/tracing/examples/basic.rs) | ||||||||||
| - [Consensus (QBFT)](crates/consensus/examples/qbft.rs) | ||||||||||
| - [DKG Broadcast](crates/dkg/examples/bcast.rs) | ||||||||||
| - [DKG Sync](crates/dkg/examples/sync.rs) | ||||||||||
| - [Parsigex](crates/parsigex/examples/parsigex.rs) | ||||||||||
|
|
||||||||||
| ## License | ||||||||||
|
|
||||||||||
|
|
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We won't have the Go toolchain for long (#597), and we'll eventually drop the
oas3-gendependency (#611)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Acknowledged — kept them listed for now since they're still current dev deps, but I'll trim Go once #597 lands and oas3-gen once #611 lands.