From 8cf518f41f73f30ec392ac4f0916e5c5451ac003 Mon Sep 17 00:00:00 2001 From: rfxfxfx Date: Mon, 31 Aug 2026 17:24:35 +0800 Subject: [PATCH] docs: fix the contributor setup instructions Four things in the setup section either do not work or contradict the repo. - The clone command is `git clone .../your-username/orbinum-node.git` followed by `cd orbinum-node`. The repository is named `node`, so both the URL and the directory are wrong and the very first step of the guide fails. Also added the upstream remote, since the section is headed "Fork the repository" and a fork without one cannot be kept in sync. - Requirements say "Rust 1.75+ (specified in rust-toolchain.toml)". rust-toolchain.toml pins `channel = "1.88.0"`, which is not a minimum and not 1.75. The practical point is that a contributor does not choose a version at all: rustup reads the pin and fetches the toolchain, the wasm32v1-none target and the listed components. Said that instead. - The system packages are missing entirely. CI installs build-essential, clang, libclang-dev and protobuf-compiler before it builds, and the build fails without them. Following the guide as written on a clean machine does not get you a build. - Steps 2 and 4 use bare cargo commands that do not match what CI runs, and the Makefile is only mentioned once, in the last step. Pointed the steps at the Makefile targets so a green local run means a green CI run, and referenced `make help` for the rest. Also noted the disk requirement. A full workspace build needs roughly 40 GB, which is worth knowing before starting rather than after running out partway through. Documentation only. Note: this touches CONTRIBUTING.md, as does #135. The two edit different sections and should merge cleanly in either order, but flagging it in case you take one and not the other. Co-Authored-By: Claude Opus 5 --- CONTRIBUTING.md | 41 +++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 919f4645..bbb8e737 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,39 +23,56 @@ We appreciate your interest. We will notify you when we open contributions. ## Getting Started ### Requirements -- **Rust 1.75+** (specified in `rust-toolchain.toml`) +- **Rust**, pinned to 1.88.0 by `rust-toolchain.toml`. You do not need to install + a version yourself: rustup reads the pin and fetches that toolchain, the + `wasm32v1-none` target, and the components the build needs. `make setup` does + this explicitly. +- **System packages** for the Substrate build. On Debian or Ubuntu: + ```bash + sudo apt-get install build-essential clang libclang-dev protobuf-compiler + ``` + These are the same packages CI installs; the build fails without them, and + `protobuf-compiler` in particular fails late. - **Git** -- **Node.js 16+** (for circuit compilation and tests) +- **Node.js 16+** (for the TypeScript integration tests under `ts-tests/`) +- Roughly 40 GB of free disk for a full workspace build - Basic knowledge of Rust, Substrate, and blockchain development ### Setting up your Environment -1. **Fork the repository** +1. **Fork the repository and clone your fork** ```bash - git clone https://github.com/your-username/orbinum-node.git - cd orbinum-node + git clone https://github.com/your-username/node.git + cd node + git remote add upstream https://github.com/orbinum/node.git ``` -2. **Install dependencies** +2. **Install the pinned toolchain** ```bash - cargo build --release + make setup ``` -3. **Setup development environment** +3. **Set up the development environment** ```bash ./scripts/setup-dev.sh ``` -4. **Run tests** +4. **Build** ```bash - cargo test --workspace + make build-release ``` -5. **Verify format and lints** +5. **Run tests and lints** ```bash - make check + make test-release + make clippy-release + make fmt-check ``` + `make help` lists the rest. Prefer the Makefile targets over bare cargo + commands: they carry the feature flags and profile CI uses, so a green run + locally means a green run in CI. + ## Contribution Workflow ### 1. Identify an area to contribute