-
Notifications
You must be signed in to change notification settings - Fork 2
chore: update documentation #139
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
Changes from all commits
012f1ac
0b7284c
7f0a554
a8dac5d
8eb1315
aca3cf2
b24c995
e75b1f2
f3611da
8d8b31f
6942aad
d3d5f46
7df2aed
0329e23
99c219b
a3142ee
c7a5641
5b5fc3a
ae74537
b2a7321
1e3fec6
e53aa28
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,10 @@ | ||
| # Contributor's guide | ||
|
|
||
| ## Commit signing | ||
|
|
||
| Enable [commit signing](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) | ||
|
|
||
| ```sh | ||
| git config commit.gpgsign true | ||
| ``` | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| * [Rust](https://www.rust-lang.org/tools/install) | ||
| * [Protobuf](https://protobuf.dev/installation/) | ||
| * [Docker](https://www.docker.com/) | ||
| * [cargo deny](https://github.com/EmbarkStudios/cargo-deny) | ||
| * [oas3-gen](https://github.com/eklipse2k8/oas3-gen) | ||
|
|
||
|
|
@@ -23,17 +16,25 @@ Install a pre-push git hook: | |
| git config core.hooksPath .githooks | ||
| ``` | ||
|
|
||
| ## Running the Rust Documentation Locally | ||
|
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. Should we suggest to use
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. No, Nix is used only to set up a reproducible environment and it's intended to be used by those already familiar with Nix; we don't want to force it as a dependency. |
||
| After cloning the repository, follow the instructions below to run the documentation locally: | ||
| ## Building | ||
| To build the project with all its crates, run: | ||
|
|
||
| ```sh | ||
| cargo doc | ||
| cargo build --workspace --all-features | ||
| ``` | ||
|
|
||
| Docs for `TODO(template) template_crate`: | ||
| ## Run Unit and Integration Tests | ||
| To run all tests - unit and integration - run: | ||
|
|
||
| ```sh | ||
| cargo test --workspace --all-features | ||
| ``` | ||
|
|
||
| ## Running the Rust Documentation Locally | ||
| To build the documentation locally: | ||
|
|
||
| ```sh | ||
| RUSTDOCFLAGS="--html-in-header katex-header.html" cargo doc --no-deps -p template_crate --open | ||
| cargo doc --workspace --all-features --no-deps | ||
| ``` | ||
|
|
||
| ## Performance | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,146 +1,51 @@ | ||
| # :crab: RUST PROJECT TEMPLATE - TODO(template) PUT PROJECT NAME HERE | ||
| <!--`TODO(template) update each badge with your username and repository name.`--> | ||
| [](https://github.com/NethermindEth/rust-template/actions/workflows/docs.yml) | ||
| [](https://github.com/NethermindEth/rust-template/actions/workflows/linter.yml) | ||
| [](https://github.com/NethermindEth/rust-template/actions/workflows/build-and-test.yml) | ||
| [](https://github.com/NethermindEth/rust-template/actions/workflows/dependency-audit.yml) | ||
| [](https://github.com/NethermindEth/rust-template/actions/workflows/ub-detection.yml) | ||
| [](https://github.com/NethermindEth/rust-template/actions/workflows/coverage.yml) | ||
| <!-- You can replace them with a single badge if you create a main CI file that calls the other workflows | ||
| [](https://github.com/{{USERNAME}}/{{REPOSITORY}}/actions) | ||
| --> | ||
| <!--`TODO(template) update with your rust version` | ||
| If you want to change from stable to Minimum Supported Rust Version (MSRV), replace the badge with: | ||
|  TODO(template) update specific version | ||
| --> | ||
|  | ||
| <!--`TODO(template) update license version if needed. Check LICENSE first`--> | ||
| # Pluto | ||
|
emlautarom1 marked this conversation as resolved.
|
||
| [](https://github.com/NethermindEth/charon-rs/actions/workflows/docs.yml) | ||
| [](https://github.com/NethermindEth/charon-rs/actions/workflows/linter.yml) | ||
| [](https://github.com/NethermindEth/charon-rs/actions/workflows/test.yml) | ||
| [](https://github.com/NethermindEth/charon-rs/actions/workflows/dependency-audit.yml) | ||
|  | ||
|
|
||
|  | ||
| [](https://opensource.org/licenses/Apache-2.0) | ||
| <!--`TODO(template) update with your crate information. Remove if not needed.`--> | ||
| [](https://crates.io/crates/{{CRATE_NAME}}) | ||
| [](https://docs.rs/{{CRATE_NAME}}) | ||
|
|
||
| TODO(template) describe the project | ||
|
|
||
| ## TODO(template) - rust template usage (remove this section after setup) | ||
|
|
||
| This is a rust template from ZKE team :rocket: (a focus on cryptographic libs in sync Rust). | ||
|
|
||
| :bike: To use it - find `TODO(template)` over the repository and set appropriate values. | ||
|
|
||
| - [ ] Settings -> Collaborators and teams - add your team group as admins for the repo (e.g. [zk-engineering](https://github.com/orgs/NethermindEth/teams/zk-engineering)) | ||
| - [ ] Settings -> General -> Pull Requests - allow only `Allow squash merging`, also tick `Automatically delete head branches` | ||
| - [ ] Settings -> Pages -> Build and deployment -> Source Github Actions | ||
| - [ ] Update the description of the repo at the repo's page, add tag topics | ||
| - [ ] Introduce necessary sections at the repo's page (releases, deployments etc) | ||
| - [ ] Add a website url (if applicable) or a docs page (see [docs](./.github/workflows/docs.yml) flow for public repos) | ||
| - [ ] Add [all contributors](https://allcontributors.org/docs/en/cli/installation) | ||
| - [ ] Import protection rulesets (see below) in the repo settings (Settings -> Rules -> Rulesets -> Import a ruleset) | ||
| - [ ] For binary crates with specific requirements to Rust features consider also [pinning](https://rust-lang.github.io/rustup/overrides.html#the-toolchain-file) the rust toolchain version | ||
|
|
||
| Main branch protection | ||
|
|
||
| ```json | ||
| { | ||
| "id": 4981961, | ||
| "name": "Main protection", | ||
| "target": "branch", | ||
| "source_type": "Repository", | ||
| "source": "NethermindEth/rust-template", | ||
| "enforcement": "active", | ||
| "conditions": { | ||
| "ref_name": { | ||
| "exclude": [], | ||
| "include": [ | ||
| "~DEFAULT_BRANCH" | ||
| ] | ||
| } | ||
| }, | ||
| "rules": [ | ||
| { | ||
| "type": "deletion" | ||
| }, | ||
| { | ||
| "type": "non_fast_forward" | ||
| }, | ||
| { | ||
| "type": "required_deployments", | ||
| "parameters": { | ||
| "required_deployment_environments": [] | ||
| } | ||
| }, | ||
| { | ||
| "type": "required_signatures" | ||
| }, | ||
| { | ||
| "type": "pull_request", | ||
| "parameters": { | ||
| "required_approving_review_count": 1, | ||
| "dismiss_stale_reviews_on_push": false, | ||
| "require_code_owner_review": false, | ||
| "require_last_push_approval": false, | ||
| "required_review_thread_resolution": true, | ||
| "automatic_copilot_code_review_enabled": false, | ||
| "allowed_merge_methods": [ | ||
| "merge", | ||
| "squash", | ||
| "rebase" | ||
| ] | ||
| } | ||
| } | ||
| ], | ||
| "bypass_actors": [] | ||
| } | ||
| ``` | ||
|
|
||
| Signed commits | ||
|
|
||
| ```json | ||
| { | ||
| "id": 4982030, | ||
| "name": "Signed commits", | ||
| "target": "branch", | ||
| "source_type": "Repository", | ||
| "source": "NethermindEth/rust-template", | ||
| "enforcement": "active", | ||
| "conditions": { | ||
| "ref_name": { | ||
| "exclude": [], | ||
| "include": [ | ||
| "~ALL" | ||
| ] | ||
| } | ||
| }, | ||
| "rules": [ | ||
| { | ||
| "type": "required_signatures" | ||
| } | ||
| ], | ||
| "bypass_actors": [] | ||
| } | ||
| ``` | ||
|
|
||
| ## How to use | ||
|
|
||
| To generate a new project from this template, you need to install [cargo-generate](https://github.com/cargo-generate/cargo-generate) and run: | ||
|
|
||
| ```sh | ||
| cargo install cargo-generate | ||
|
|
||
| cargo generate --git https://github.com/NethermindEth/rust-template | ||
| ``` | ||
|
|
||
| Pluto is an alternative implementation of [Charon](https://github.com/ObolNetwork/charon/), a distributed validator middleware client for Ethereum Staking. It enables a group of independent operators to safely run a single validator by coordinating duties across multiple nodes. | ||
|
|
||
| Pluto, like Charon, is used by stakers to distribute the responsibility of running Ethereum Validators across a number of different instances and client implementations. | ||
|
|
||
| See the official docs at https://docs.obol.org/ for introductions and key concepts. | ||
|
|
||
| ## Documentation | ||
|
|
||
| The [Obol Docs](https://docs.obol.org/) website is the best place to get started. | ||
| The important sections are [intro](https://docs.obol.org/learn/charon), | ||
|
emlautarom1 marked this conversation as resolved.
|
||
| [key concepts](https://docs.obol.org/docs/int/key-concepts) and [charon](https://docs.obol.org/docs/charon/intro). | ||
|
emlautarom1 marked this conversation as resolved.
emlautarom1 marked this conversation as resolved.
|
||
|
|
||
| ## Version compatibility | ||
|
|
||
| Considering [semver](https://semver.org) as the project's versioning scheme, two given versions of Charon are: | ||
| - **compatible** if their `MAJOR` number is the same, `MINOR` and `PATCH` numbers differ | ||
|
emlautarom1 marked this conversation as resolved.
|
||
| - **incompatible** if their `MAJOR` number differs | ||
|
emlautarom1 marked this conversation as resolved.
|
||
|
|
||
|
emlautarom1 marked this conversation as resolved.
|
||
| 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 | ||
|
|
||
| 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. | ||
|
emlautarom1 marked this conversation as resolved.
|
||
|
|
||
| ## Examples | ||
|
|
||
| See [examples](./examples/). | ||
| Examples are located in crate-specific example folders: | ||
|
|
||
| ## License | ||
| - [P2P](crates/charon-p2p/examples/metrics.rs) | ||
| - [Peerinfo](crates/peerinfo/examples/peerinfo.rs) | ||
| - [Relay Server](crates/relay-server/examples/relay_server.rs) | ||
| - [Tracing](crates/tracing/examples/basic.rs) | ||
|
|
||
| TODO(template) - update [license](https://www.notion.so/nethermind/Open-Source-Software-Usage-and-Licensing-Policy-1c3360fc38d080fd9e61c29b35d1d5af) if needed. | ||
| For commercial licenses it is required to get an approve from Legal. | ||
| ## License | ||
|
|
||
| Apache 2.0 | ||
|
|
||
| ## Would like to contribute? | ||
|
|
||
| see [Contributing](./CONTRIBUTING.md). | ||
| See [Contributing](./CONTRIBUTING.md). | ||
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.
I think it was important notice, since it's the first think that will break if a new developer makes a PR
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 don't enforce signing at the repo level; I recently found that I never had it enabled and I've been able to commit and push just fine.
We can update the docs again in case we happen to enable it.