{"id":13746846,"url":"https://github.com/kaspanet/rusty-kaspa","last_synced_at":"2026-02-08T02:24:57.580Z","repository":{"id":56779008,"uuid":"514979191","full_name":"kaspanet/rusty-kaspa","owner":"kaspanet","description":"Kaspa full-node reference implementation and related libraries in the Rust programming language","archived":false,"fork":false,"pushed_at":"2025-05-07T14:48:02.000Z","size":10094,"stargazers_count":613,"open_issues_count":105,"forks_count":194,"subscribers_count":72,"default_branch":"master","last_synced_at":"2025-05-07T15:48:55.137Z","etag":null,"topics":["consensus-protocol","cryptocurrency","rust","wasm"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kaspanet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-07-17T23:32:26.000Z","updated_at":"2025-05-07T14:48:07.000Z","dependencies_parsed_at":"2023-10-12T18:17:55.230Z","dependency_job_id":"cdcc802a-78e3-45ca-a9cf-11f2ccfecab4","html_url":"https://github.com/kaspanet/rusty-kaspa","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaspanet%2Frusty-kaspa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaspanet%2Frusty-kaspa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaspanet%2Frusty-kaspa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaspanet%2Frusty-kaspa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kaspanet","download_url":"https://codeload.github.com/kaspanet/rusty-kaspa/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254052667,"owners_count":22006716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["consensus-protocol","cryptocurrency","rust","wasm"],"created_at":"2024-08-03T06:01:02.840Z","updated_at":"2026-02-08T02:24:57.573Z","avatar_url":"https://github.com/kaspanet.png","language":"Rust","funding_links":[],"categories":["Applications","Others"],"sub_categories":["Blockchain"],"readme":"[![DeepWiki](https://img.shields.io/badge/DeepWiki-kaspanet%2Frusty--kaspa-blue.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAyCAYAAAAnWDnqAAAAAXNSR0IArs4c6QAAA05JREFUaEPtmUtyEzEQhtWTQyQLHNak2AB7ZnyXZMEjXMGeK/AIi+QuHrMnbChYY7MIh8g01fJoopFb0uhhEqqcbWTp06/uv1saEDv4O3n3dV60RfP947Mm9/SQc0ICFQgzfc4CYZoTPAswgSJCCUJUnAAoRHOAUOcATwbmVLWdGoH//PB8mnKqScAhsD0kYP3j/Yt5LPQe2KvcXmGvRHcDnpxfL2zOYJ1mFwrryWTz0advv1Ut4CJgf5uhDuDj5eUcAUoahrdY/56ebRWeraTjMt/00Sh3UDtjgHtQNHwcRGOC98BJEAEymycmYcWwOprTgcB6VZ5JK5TAJ+fXGLBm3FDAmn6oPPjR4rKCAoJCal2eAiQp2x0vxTPB3ALO2CRkwmDy5WohzBDwSEFKRwPbknEggCPB/imwrycgxX2NzoMCHhPkDwqYMr9tRcP5qNrMZHkVnOjRMWwLCcr8ohBVb1OMjxLwGCvjTikrsBOiA6fNyCrm8V1rP93iVPpwaE+gO0SsWmPiXB+jikdf6SizrT5qKasx5j8ABbHpFTx+vFXp9EnYQmLx02h1QTTrl6eDqxLnGjporxl3NL3agEvXdT0WmEost648sQOYAeJS9Q7bfUVoMGnjo4AZdUMQku50McDcMWcBPvr0SzbTAFDfvJqwLzgxwATnCgnp4wDl6Aa+Ax283gghmj+vj7feE2KBBRMW3FzOpLOADl0Isb5587h/U4gGvkt5v60Z1VLG8BhYjbzRwyQZemwAd6cCR5/XFWLYZRIMpX39AR0tjaGGiGzLVyhse5C9RKC6ai42ppWPKiBagOvaYk8lO7DajerabOZP46Lby5wKjw1HCRx7p9sVMOWGzb/vA1hwiWc6jm3MvQDTogQkiqIhJV0nBQBTU+3okKCFDy9WwferkHjtxib7t3xIUQtHxnIwtx4mpg26/HfwVNVDb4oI9RHmx5WGelRVlrtiw43zboCLaxv46AZeB3IlTkwouebTr1y2NjSpHz68WNFjHvupy3q8TFn3Hos2IAk4Ju5dCo8B3wP7VPr/FGaKiG+T+v+TQqIrOqMTL1VdWV1DdmcbO8KXBz6esmYWYKPwDL5b5FA1a0hwapHiom0r/cKaoqr+27/XcrS5UwSMbQAAAABJRU5ErkJggg==)](https://deepwiki.com/kaspanet/rusty-kaspa)\r\n\u003c!-- DeepWiki badge generated by https://deepwiki.ryoppippi.com/ --\u003e\r\n\u003ch1\u003eKaspa on Rust\u003c/h1\u003e\r\n\r\nWelcome to the Rust-based implementation of the Kaspa full-node and its ancillary libraries. The contained node release serves as a drop-in replacement to the established \u003ca href=\"https://github.com/kaspanet/kaspad\"\u003eGolang node\u003c/a\u003e and to date is the recommended node software for the Kaspa network, introducing developers to the possibilities of Rust in the Kaspa network's context.\r\n\r\nWe invite developers and blockchain enthusiasts to collaborate, test, and optimize our Rust implementation. Each line of code here is an opportunity to contribute to the open-source blockchain movement, shaping a platform designed for scalability and speed without compromising on security and decentralization.\r\n\r\nYour feedback, contributions, and issue reports will be integral to evolving this codebase and continuing its maturity as a reliable node in the Kaspa network.\r\n\r\nThe default branch of this repository is `master` and new contributions are constantly merged into it. For a stable branch corresponding to the latest stable release please pull and compile the `stable` branch. \r\n\r\n## The Crescendo Hardfork  \r\n\r\nThe [Crescendo Hardfork](docs/crescendo-guide.md) took place on May 5, 2025, at approximately 15:00 UTC. The fork has transitioned the network from a blockrate of 1 BPS to that of 10 BPS, and incorporated several major KIPs.\r\n\r\n\r\n\r\n## Installation\r\n  \u003cdetails\u003e\r\n  \u003csummary\u003eBuilding on Linux\u003c/summary\u003e\r\n\r\n  1. Install general prerequisites\r\n\r\n      ```bash\r\n      sudo apt install curl git build-essential libssl-dev pkg-config\r\n      ```\r\n\r\n  2. Install Protobuf (required for gRPC)\r\n\r\n      ```bash\r\n      sudo apt install protobuf-compiler libprotobuf-dev #Required for gRPC\r\n      ```\r\n  3. Install the clang toolchain (required for RocksDB and WASM secp256k1 builds)\r\n\r\n      ```bash\r\n      sudo apt-get install clang-format clang-tidy \\\r\n      clang-tools clang clangd libc++-dev \\\r\n      libc++1 libc++abi-dev libc++abi1 \\\r\n      libclang-dev libclang1 liblldb-dev \\\r\n      libllvm-ocaml-dev libomp-dev libomp5 \\\r\n      lld lldb llvm-dev llvm-runtime \\\r\n      llvm python3-clang\r\n      ```\r\n  3. Install the [rust toolchain](https://rustup.rs/)\r\n\r\n     If you already have rust installed, update it by running: `rustup update`\r\n  4. Install wasm-pack\r\n      ```bash\r\n      cargo install wasm-pack\r\n      ```\r\n  4. Install wasm32 target\r\n      ```bash\r\n      rustup target add wasm32-unknown-unknown\r\n      ```\r\n  5. Clone the repo\r\n      ```bash\r\n      git clone https://github.com/kaspanet/rusty-kaspa\r\n      cd rusty-kaspa\r\n      ```\r\n  \u003c/details\u003e\r\n\r\n\r\n\r\n  \u003cdetails\u003e\r\n  \u003csummary\u003eBuilding on Windows\u003c/summary\u003e\r\n\r\n\r\n  1. [Install Git for Windows](https://gitforwindows.org/) or an alternative Git distribution.\r\n\r\n  2. Install [Protocol Buffers](https://github.com/protocolbuffers/protobuf/releases/download/v21.10/protoc-21.10-win64.zip) and add the `bin` directory to your `Path`\r\n\r\n\r\n3. Install [LLVM-15.0.6-win64.exe](https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.6/LLVM-15.0.6-win64.exe)\r\n\r\n    Add the `bin` directory of the LLVM installation (`C:\\Program Files\\LLVM\\bin`) to PATH\r\n\r\n    set `LIBCLANG_PATH` environment variable to point to the `bin` directory as well\r\n\r\n    **IMPORTANT:** Due to C++ dependency configuration issues, LLVM `AR` installation on Windows may not function correctly when switching between WASM and native C++ code compilation (native `RocksDB+secp256k1` vs WASM32 builds of `secp256k1`). Unfortunately, manually setting `AR` environment variable also confuses C++ build toolchain (it should not be set for native but should be set for WASM32 targets). Currently, the best way to address this, is as follows: after installing LLVM on Windows, go to the target `bin` installation directory and copy or rename `LLVM_AR.exe` to `AR.exe`.\r\n\r\n  4. Install the [rust toolchain](https://rustup.rs/)\r\n\r\n     If you already have rust installed, update it by running: `rustup update`\r\n  5. Install wasm-pack\r\n      ```bash\r\n      cargo install wasm-pack\r\n      ```\r\n  6. Install wasm32 target\r\n      ```bash\r\n      rustup target add wasm32-unknown-unknown\r\n      ```\r\n  7. Clone the repo\r\n      ```bash\r\n      git clone https://github.com/kaspanet/rusty-kaspa\r\n      cd rusty-kaspa\r\n      ```\r\n \u003c/details\u003e\r\n\r\n\r\n  \u003cdetails\u003e\r\n  \u003csummary\u003eBuilding on Mac OS\u003c/summary\u003e\r\n\r\n\r\n  1. Install Protobuf (required for gRPC)\r\n      ```bash\r\n      brew install protobuf\r\n      ```\r\n  2. Install llvm.\r\n\r\n      The default XCode installation of `llvm` does not support WASM build targets.\r\nTo build WASM on MacOS you need to install `llvm` from homebrew (at the time of writing, the llvm version for MacOS is 16.0.1).\r\n      ```bash\r\n      brew install llvm\r\n      ```\r\n\r\n      **NOTE:** Homebrew can use different keg installation locations depending on your configuration. For example:\r\n      - `/opt/homebrew/opt/llvm` -\u003e `/opt/homebrew/Cellar/llvm/16.0.1`\r\n      - `/usr/local/Cellar/llvm/16.0.1`\r\n\r\n      To determine the installation location you can use `brew list llvm` command and then modify the paths below accordingly:\r\n      ```bash\r\n      % brew list llvm\r\n      /usr/local/Cellar/llvm/16.0.1/bin/FileCheck\r\n      /usr/local/Cellar/llvm/16.0.1/bin/UnicodeNameMappingGenerator\r\n      ...\r\n      ```\r\n      If you have `/opt/homebrew/Cellar`, then you should be able to use `/opt/homebrew/opt/llvm`.\r\n\r\n      Add the following to your `~/.zshrc` file:\r\n      ```bash\r\n      export PATH=\"/opt/homebrew/opt/llvm/bin:$PATH\"\r\n      export LDFLAGS=\"-L/opt/homebrew/opt/llvm/lib\"\r\n      export CPPFLAGS=\"-I/opt/homebrew/opt/llvm/include\"\r\n      export AR=/opt/homebrew/opt/llvm/bin/llvm-ar\r\n      ```\r\n\r\n      Reload the `~/.zshrc` file\r\n      ```bash\r\n      source ~/.zshrc\r\n      ```\r\n  3. Install the [rust toolchain](https://rustup.rs/)\r\n\r\n     If you already have rust installed, update it by running: `rustup update`\r\n  4. Install wasm-pack\r\n      ```bash\r\n      cargo install wasm-pack\r\n      ```\r\n  4. Install wasm32 target\r\n      ```bash\r\n      rustup target add wasm32-unknown-unknown\r\n      ```\r\n  5. Clone the repo\r\n      ```bash\r\n      git clone https://github.com/kaspanet/rusty-kaspa\r\n      cd rusty-kaspa\r\n      ```\r\n\r\n \u003c/details\u003e\r\n\r\n \u003cdetails\u003e\r\n \u003csummary\u003e Building with Docker \u003c/summary\u003e\r\n\r\n  You can build the project using Docker in two ways: a simple single-architecture build, or a multi-architecture build using the provided script.\r\n\r\n  #### 1. Simple Docker Build\r\n\r\n  To build for your current architecture (e.g., `linux/amd64`):\r\n\r\n  ```sh\r\n  docker build -f docker/Dockerfile.kaspad -t kaspad:latest .\r\n  ```\r\n\r\n  Replace `Dockerfile.kaspad` with the appropriate Dockerfile for your target (`kaspad`, `kaspa-wallet`, `rothschild`, or `simpa`).\r\n\r\n  #### 2. Multi-Architecture Build\r\n\r\n  To build images for multiple architectures (e.g., `linux/amd64` and `linux/arm64`) and optionally push them to a registry, use the `build-docker-multi-arch.sh` script:\r\n\r\n  ```sh\r\n  ./build-docker-multi-arch.sh --tag \u003ctag\u003e --artifact \u003cartifact\u003e [--arches \"\u003carches\u003e\"] [--push]\r\n  ```\r\n\r\n  - `--tag \u003ctag\u003e`: **(required)** The Docker image tag to use.\r\n  - `--artifact \u003cartifact\u003e`: The build target/artifact (default: `kaspad`). Must match the Dockerfile name, e.g., `kaspad` for `Dockerfile.kaspad`.\r\n  - `--arches \"\u003carches\u003e\"`: Space-separated list of architectures (default: `\"linux/amd64 linux/arm64\"`).\r\n  - `--push`: If specified, the built images will be pushed to your Docker registry.\r\n\r\n  **Examples:**\r\n\r\n  Build and push a multi-arch image for `kaspad`:\r\n\r\n  ```sh\r\n  ./build-docker-multi-arch.sh --tag myrepo/kaspad:latest --artifact kaspad --push\r\n  ```\r\n\r\n  Build a multi-arch image for `kaspa-wallet` without pushing:\r\n\r\n  ```sh\r\n  ./build-docker-multi-arch.sh --tag kaspa-wallet:test --artifact kaspa-wallet\r\n  ```\r\n\r\n  **Note:**  \r\n  In order to use `build-docker-multi-arch.sh`, you need Docker with Buildx enabled.\r\n \u003c/details\u003e\r\n\r\n  \u003cdetails\u003e\r\n\r\n  \u003csummary\u003eBuilding WASM32 SDK\u003c/summary\u003e\r\n\r\n  Rust WebAssembly (WASM) refers to the use of the Rust programming language to write code that can be compiled into WebAssembly, a binary instruction format that runs in web browsers and NodeJs. This allows for easy development using JavaScript and TypeScript programming languages while retaining the benefits of Rust.\r\n\r\n  WASM SDK components can be built from sources by running:\r\n    - `./build-release` - build a full release package (includes both release and debug builds for web and nodejs targets)\r\n    - `./build-docs` - build TypeScript documentation\r\n    - `./build-web` - release web build\r\n    - `./build-web-dev` - development web build\r\n    - `./build-nodejs` - release nodejs build\r\n    - `./build-nodejs-dev` - development nodejs build\r\n\r\n  IMPORTANT: do not use `dev` builds in production. They are significantly larger, slower and include debug symbols.\r\n\r\n### Requirements\r\n\r\n  - NodeJs (v20+): https://nodejs.org/en\r\n  - TypeDoc: https://typedoc.org/\r\n\r\n### Builds \u0026 documentation\r\n\r\n  - Release builds: https://github.com/kaspanet/rusty-kaspa/releases\r\n  - Developer builds: https://kaspa.aspectron.org/nightly/downloads/\r\n  - Developer TypeScript documentation: https://kaspa.aspectron.org/docs/\r\n\r\n  \u003c/details\u003e\r\n\u003cdetails\u003e\r\n\r\n\u003csummary\u003e\r\nKaspa CLI + Wallet\r\n\u003c/summary\u003e\r\n\r\n`kaspa-cli` crate provides a cli-driven RPC interface to the node and a\r\nterminal interface to the Rusty Kaspa Wallet runtime. These wallets are\r\ncompatible with WASM SDK Wallet API and Kaspa NG projects.\r\n\r\n\r\n```bash\r\ncd cli\r\ncargo run --release\r\n```\r\n\r\n\u003c/details\u003e\r\n\r\n\r\n\r\n\u003cdetails\u003e\r\n\r\n\u003csummary\u003e\r\nLocal Web Wallet\r\n\u003c/summary\u003e\r\n\r\nRun an http server inside of `wallet/wasm/web` folder. If you don't have once, you can use the following:\r\n\r\n```bash\r\ncd wallet/wasm/web\r\ncargo install basic-http-server\r\nbasic-http-server\r\n```\r\nThe *basic-http-server* will serve on port 4000 by default, so open your web browser and load http://localhost:4000\r\n\r\nThe framework is compatible with all major desktop and mobile browsers.\r\n\r\n\r\n\u003c/details\u003e\r\n\r\n\r\n## Running the node\r\n\r\n  **Start a mainnet node**\r\n\r\n  ```bash\r\n  cargo run --release --bin kaspad\r\n  # or with UTXO-index enabled (needed when using wallets)\r\n  cargo run --release --bin kaspad -- --utxoindex\r\n  ```\r\n  **Start a testnet node**\r\n\r\n  ```bash\r\ncargo run --release --bin kaspad -- --testnet\r\n  ```\r\n\r\n\u003cdetails\u003e\r\n  \u003csummary\u003e\r\n    Start a devnet node\r\n  \u003c/summary\u003e\r\n\r\nStart the DevNet node with the following command:\r\n\r\n```bash\r\ncargo run --bin kaspad -- --devnet --enable-unsynced-mining --rpclisten=127.0.0.1 --rpclisten-borsh=127.0.0.1 --utxoindex\r\n```\r\n* `enable-unsynced-mining` is required when the network isn't synchronized, which is the case on the first launch\r\n* `utxoindex` enables the UTXO index, which is necessary for wallet functionality.\r\n* `rpclisten` and `rpclisten-borsh` are likely to be required by mining software\r\n\r\nnote: it will take a bit of time for difficulty to adjust, so you may need to wait a bit before you see blocks being mined consistently.\r\n\r\n\u003c/details\u003e\r\n\r\n\u003cdetails\u003e\r\n\r\n  \u003csummary\u003e\r\nUsing a configuration file\r\n  \u003c/summary\u003e\r\n\r\n  ```bash\r\ncargo run --release --bin kaspad -- --configfile /path/to/configfile.toml\r\n# or\r\ncargo run --release --bin kaspad -- -C /path/to/configfile.toml\r\n  ```\r\n  - The config file should be a list of \\\u003cCLI argument\\\u003e = \\\u003cvalue\\\u003e separated by newlines.\r\n  - Whitespace around the `=` is fine, `arg=value` and `arg = value` are both parsed correctly.\r\n  - Values with special characters like `.` or `=` will require quoting the value i.e \\\u003cCLI argument\\\u003e = \"\\\u003cvalue\\\u003e\".\r\n  - Arguments with multiple values should be surrounded with brackets like `addpeer = [\"10.0.0.1\", \"1.2.3.4\"]`.\r\n\r\n  For example:\r\n  ```\r\ntestnet = true\r\nutxoindex = false\r\ndisable-upnp = true\r\nperf-metrics = true\r\nappdir = \"some-dir\"\r\nnetsuffix = 11\r\naddpeer = [\"10.0.0.1\", \"1.2.3.4\"]\r\n  ```\r\n Pass the `--help` flag to view all possible arguments\r\n\r\n  ```bash\r\ncargo run --release --bin kaspad -- --help\r\n  ```\r\n\u003c/details\u003e\r\n\r\n\u003cdetails\u003e\r\n\r\n  \u003csummary\u003e\r\nwRPC\r\n  \u003c/summary\u003e\r\n\r\n  wRPC subsystem is disabled by default in `kaspad` and can be enabled via:\r\n\r\n\r\n  JSON protocol:\r\n  ```bash\r\n  --rpclisten-json=\u003cinterface:port\u003e\r\n  # or use the defaults for current network\r\n  --rpclisten-json=default\r\n  ```\r\n\r\n  Borsh protocol:\r\n  ```bash\r\n  --rpclisten-borsh=\u003cinterface:port\u003e\r\n  # or use the defaults for current network\r\n  --rpclisten-borsh=default\r\n  ```\r\n\r\n  **Sidenote:**\r\n\r\n  Rusty Kaspa integrates an optional wRPC\r\n  subsystem. wRPC is a high-performance, platform-neutral, Rust-centric, WebSocket-framed RPC\r\n  implementation that can use [Borsh](https://borsh.io/) and JSON protocol encoding.\r\n\r\n  JSON protocol messaging\r\n  is similar to JSON-RPC 1.0, but differs from the specification due to server-side\r\n  notifications.\r\n\r\n  [Borsh](https://borsh.io/) encoding is meant for inter-process communication. When using [Borsh](https://borsh.io/)\r\n  both client and server should be built from the same codebase.\r\n\r\n  JSON protocol is based on\r\n  Kaspa data structures and is data-structure-version agnostic. You can connect to the\r\n  JSON endpoint using any WebSocket library. Built-in RPC clients for JavaScript and\r\n  TypeScript capable of running in web browsers and Node.js are available as a part of\r\n  the Kaspa WASM framework.\r\n\r\n\u003c/details\u003e\r\n\r\n## Stratum Bridge Beta\r\n\r\nThis Stratum Bridge is currently in BETA. Support is available in the Kaspa Discord’s [#mining-and-hardware](https://discord.com/channels/599153230659846165/910178666099646584) channel.\r\n\r\nFor bug reports or feature request, please open an issue at https://github.com/kaspanet/rusty-kaspa/issues and prefix your issue title with [Bridge].\r\n\r\nCheck out the [README.md](bridge/docs/README.md) for instructions on how to run the stratum bridge.\r\n\r\n## Benchmarking \u0026 Testing\r\n\r\n\r\n\u003cdetails\u003e\r\n\r\n\u003csummary\u003eSimulation framework (Simpa)\u003c/summary\u003e\r\n\r\nThe current codebase supports a full in-process network simulation, building an actual DAG over virtual time with virtual delay and benchmarking validation time (following the simulation generation).\r\n\r\nTo see the available commands\r\n```bash\r\ncargo run --release --bin simpa -- --help\r\n```\r\n\r\nThe following command will run a simulation to produce 1000 blocks with communication delay of 2 seconds and 8 BPS (blocks per second) while attempting to fill each block with up to 200 transactions.\r\n\r\n```bash\r\ncargo run --release --bin simpa -- -t=200 -d=2 -b=8 -n=1000\r\n```\r\n\r\n\u003c/details\u003e\r\n\r\n\r\n\r\n\r\n\u003cdetails\u003e\r\n\r\n\u003csummary\u003eHeap Profiling\u003c/summary\u003e\r\n\r\nHeap-profiling in `kaspad` and `simpa` can be done by enabling `heap` feature and profile using the `--features` argument\r\n\r\n```bash\r\ncargo run --bin kaspad --profile heap --features=heap\r\n```\r\n\r\nIt will produce `{bin-name}-heap.json` file in the root of the workdir, that can be inspected by the [dhat-viewer](https://github.com/unofficial-mirror/valgrind/tree/master/dhat)\r\n\r\n\u003c/details\u003e\r\n\r\n\r\n\u003cdetails\u003e\r\n\r\n\u003csummary\u003eTests\u003c/summary\u003e\r\n\r\n\r\n**Run unit and most integration tests**\r\n\r\n```bash\r\ncd rusty-kaspa\r\ncargo test --release\r\n// or install nextest and run\r\n```\r\n\r\n\r\n\r\n**Using nextest**\r\n\r\n```bash\r\ncd rusty-kaspa\r\ncargo nextest run --release\r\n```\r\n\r\n\u003c/details\u003e\r\n\r\n\u003cdetails\u003e\r\n\r\n\u003csummary\u003eLints\u003c/summary\u003e\r\n\r\n```bash\r\ncd rusty-kaspa\r\n./check\r\n```\r\n\r\n\u003c/details\u003e\r\n\r\n\r\n\u003cdetails\u003e\r\n\r\n\u003csummary\u003eBenchmarks\u003c/summary\u003e\r\n\r\n```bash\r\ncd rusty-kaspa\r\ncargo bench\r\n```\r\n\r\n\u003c/details\u003e\r\n\r\n\u003cdetails\u003e\r\n\r\n\u003csummary\u003eLogging\u003c/summary\u003e\r\n\r\nLogging in `kaspad` and `simpa` can be [filtered](https://docs.rs/env_logger/0.10.0/env_logger/#filtering-results) by either:\r\n\r\n1. Defining the environment variable `RUST_LOG`\r\n2. Adding the --loglevel argument like in the following example:\r\n\r\n    ```\r\n    (cargo run --bin kaspad -- --loglevel info,kaspa_rpc_core=trace,kaspa_grpc_core=trace,consensus=trace,kaspa_core=trace) 2\u003e\u00261 | tee ~/rusty-kaspa.log\r\n    ```\r\n    In this command we set the `loglevel` to `INFO`.\r\n\r\n\u003c/details\u003e\r\n\r\n\u003cdetails\u003e\r\n\r\n\u003csummary\u003eOverride consensus parameters\u003c/summary\u003e\r\n\r\nYou can experiment with non-standard consensus parameters in non-mainnet environments by supplying a JSON file with `--override-params-file \u003cpath\u003e`. See [docs/override-params.md](docs/override-params.md) for a more detailed explanation.\r\n\r\n\u003c/details\u003e\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaspanet%2Frusty-kaspa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaspanet%2Frusty-kaspa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaspanet%2Frusty-kaspa/lists"}