{"id":22799908,"url":"https://github.com/tangle-network/protocol-substrate","last_synced_at":"2025-04-19T16:44:46.266Z","repository":{"id":37098184,"uuid":"375404845","full_name":"tangle-network/protocol-substrate","owner":"tangle-network","description":"Webb protocol implementation in Substrate.","archived":false,"fork":false,"pushed_at":"2023-06-23T17:38:27.000Z","size":31165,"stargazers_count":37,"open_issues_count":20,"forks_count":11,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-29T10:23:57.136Z","etag":null,"topics":["blockchain","bridge","cryptography","merkle-tree","rust","zero-knowledge"],"latest_commit_sha":null,"homepage":"https://docs.webb.tools/v1/anchor-system/overview/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tangle-network.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","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}},"created_at":"2021-06-09T15:32:03.000Z","updated_at":"2024-07-18T13:25:54.000Z","dependencies_parsed_at":"2024-06-19T01:30:14.723Z","dependency_job_id":"1910e5eb-98e9-4841-9fc9-8bac705b0804","html_url":"https://github.com/tangle-network/protocol-substrate","commit_stats":{"total_commits":284,"total_committers":20,"mean_commits":14.2,"dds":0.7359154929577465,"last_synced_commit":"f3153a7ce71d32826946e65ded0de3b2569ffa01"},"previous_names":["tangle-network/protocol-substrate"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fprotocol-substrate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fprotocol-substrate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fprotocol-substrate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fprotocol-substrate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tangle-network","download_url":"https://codeload.github.com/tangle-network/protocol-substrate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249740945,"owners_count":21318718,"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":["blockchain","bridge","cryptography","merkle-tree","rust","zero-knowledge"],"created_at":"2024-12-12T07:10:18.848Z","updated_at":"2025-04-19T16:44:46.246Z","avatar_url":"https://github.com/tangle-network.png","language":"TypeScript","readme":"\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://www.webb.tools/\"\u003e\n\n  ![Webb Logo](./assets/webb_banner_light.png#gh-light-mode-only)\n  ![Webb Logo](./assets/webb_banner_dark.png#gh-dark-mode-only)\n  \u003c/a\u003e\n\u003c/div\u003e\n\u003cp align=\"left\"\u003e\n    \u003cstrong\u003e🚀 Webb's Substrate Pallet Implementation 🚀\u003c/strong\u003e\n\u003c/p\u003e\n\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/webb-tools/protocol-substrate/check.yml?branch=main\u0026style=flat-square)](https://github.com/webb-tools/protocol-substrate/actions) [![Codecov](https://img.shields.io/codecov/c/gh/webb-tools/protocol-substrate?style=flat-square\u0026token=A4WGU76TWU)](https://codecov.io/gh/webb-tools/protocol-substrate) [![License Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square)](https://opensource.org/licenses/Apache-2.0) [![Twitter](https://img.shields.io/twitter/follow/webbprotocol.svg?style=flat-square\u0026label=Twitter\u0026color=1DA1F2)](https://twitter.com/webbprotocol) [![Telegram](https://img.shields.io/badge/Telegram-gray?logo=telegram)](https://t.me/webbprotocol) [![Discord](https://img.shields.io/discord/833784453251596298.svg?style=flat-square\u0026label=Discord\u0026logo=discord)](https://discord.gg/cv8EfJu3Tn)\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003ch2 id=\"table-of-contents\" style=border:0!important\u003e 📖 Table of Contents\u003c/h2\u003e\n\n\u003cdetails open=\"open\"\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003cul\u003e\n    \u003cli\u003e\u003ca href=\"#start\"\u003e Getting Started\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#test\"\u003eTesting\u003c/a\u003e\u003c/li\u003e\n\u003c/details\u003e\n\n\u003ch2 id=\"start\"\u003e Getting Started  🎉 \u003c/h2\u003e\n\nFor additional information, please refer to the [Webb Protocol-Substrate Rust Docs](https://webb-tools.github.io/protocol-substrate/) 📝. Have feedback on how to improve protocol-substrate? Or have a specific question to ask? Checkout the [Anchor Protocol Feedback Discussion](https://github.com/webb-tools/feedback/discussions/categories/anchor-protocol) 💬.\n\n### Pallet layout\n\n```\npallets/\n  |____linkable-tree/       # A module for constructing, modifying and inspecting linkable trees.\n  |____hasher/              # A module for abstracting over arbitrary hash functions primarily for zero-knowledge friendly hash functions that have potentially large parameters to deal with.\n  |____mixer/               # A simple module for building Mixers.\n  |____signature-bridge/    # A module for managing voting, resource, and maintainer composition through signature verification.\n  |____token-wrapper/       # A module for wrapping pooled assets and minting pool share tokens\n  |____vanchor/             # A simple module for building variable Anchors.\n  |____vanchor-handler/     # A module for executing the modification of vanchors.\n  |____verifier/            # A module for abstracting over arbitrary zero-knowledge verifiers for arbitrary zero-knowledge gadgets\n  |____xanchor/             # A module for managing the linking process between anchors.\n```\n\n### Prerequisites\n\nThis guide uses \u003chttps://rustup.rs\u003e installer and the `rustup` tool to manage the Rust toolchain.\nFirst install and configure `rustup`:\n\n```bash\n# Install\ncurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n# Configure\nsource ~/.cargo/env\n```\n\nConfigure the Rust toolchain to default to the latest nightly version, and add the nightly wasm target:\n\n```bash\nrustup default nightly\nrustup update\nrustup update nightly\nrustup target add wasm32-unknown-unknown --toolchain nightly\n```\n\nGreat! Now your Rust environment is ready! 🚀🚀\n\n### Installation 💻\n\nInstall protobuf-compiler\n\n```bash\n# For linux\napt install -y protobuf-compiler\n\n# For macos\nbrew install protobuf\n```\n\nRepo environment setup:\n\n```bash\n# clone the repo\ngit clone git@github.com:webb-tools/protocol-substrate.git\n\n# Fetch fixtures\nRun the script in `scripts/fetch-fixtures.sh` file.\n```\n\nBuild the node in `release mode`:\n\n```bash\ncargo build --release\n```\n\n## Installation Using Nix 💻\n\n1. Install [Nix](https://nixos.org/download.html)\n2. Enable Flakes (if you are not already see here: [Flakes](https://nixos.wiki/wiki/Flakes))\n3. If you have [`direnv`](https://github.com/nix-community/nix-direnv#installation) installed, everything should work out of the box.\n4. Alternatively, you can run `nix flake develop` in the root of this repo to get a shell with all the dependencies installed.\n5. Happy hacking!\n\n#### Troubleshooting for Apple Silicon users\n\nInstall Homebrew if you have not already. You can check if you have it installed with the following command:\n\n```bash\nbrew help\n```\n\nIf you do not have it installed open the Terminal application and execute the following commands:\n\n```bash\n# Install Homebrew if necessary https://brew.sh/\n/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)\"\n\n# Make sure Homebrew is up-to-date, install openssl\nbrew update\nbrew install openssl\n```\n\n❗ **Note:** Native ARM Homebrew installations are only going to be supported at `/opt/homebrew`. After Homebrew installs, make sure to add `/opt/homebrew/bin` to your PATH.\n\n```bash\necho 'export PATH=/opt/homebrew/bin:$PATH' \u003e\u003e ~/.bash_profile\n```\n\nIn order to build **protocol-substrate** in `--release` mode using `aarch64-apple-darwin` Rust toolchain you need to set the following environment variables:\n\n```bash\necho 'export CC=\"/opt/homebrew/opt/llvm/bin/clang\"' \u003e\u003e ~/.bash_profile\necho 'export AR=\"/opt/homebrew/opt/llvm/bin/llvm-ar\"' \u003e\u003e ~/.bash_profile\n```\n\n\u003ch2 id=\"usage\"\u003e Usage \u003c/h2\u003e\n\n### Quick Start ⚡\n\n#### Standalone Local Testnet\n\nIn order to run the standalone development network, you will need to prepare 2 terminal windows. Once the below commands are executed it will set up a development network using the BABE consensus mechanism for a 2 node network.\n\n**Terminal 1:**\n\n```jsx\n./target/release/webb-standalone-node --dev --alice --node-key 0000000000000000000000000000000000000000000000000000000000000001\n```\n\n**Terminal 2:**\n\n```jsx\n./target/release/webb-standalone-node --dev --bob --port 33334 --tmp   --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp\n```\n\nYou now have successfully set up a standalone local testnet! 🎉\n\n### Docker 🐳\n\nTo build the [standalone](./docker/Standalone.Dockerfile) docker image specified in `docker/` :\n\n```sh\ndocker build -f ./docker/Standalone.Dockerfile -t protocol-substrate/standalone .\n```\n\nTo run docker image:\n\n```sh\ndocker run protocol-substrate/standalone\n```\n\n\u003ch2 id=\"test\"\u003e Testing 🧪 \u003c/h2\u003e\n\nThe following instructions outlines how to run the protocol-substrate base test suite and integration test suite.\n\n### To run base tests\n\n```\ncargo test --release --workspace --exclude webb-client\n```\n\n### To run integration tests\n\n1. Run `cd scripts`\n2. Run `sh run-integrations.sh`\n\n### Code Coverage\n\nYou need to have docker installed to generate code coverage.\n\n\u003e Build docker image:\n\n```sh\ndocker build -t cov -f docker/Coverage.Dockerfile .\n```\n\n\u003e Run docker image and generate code coverage reports:\n\n```sh\ndocker run --security-opt seccomp=unconfined cov\n```\n\n### Benchmarks\n\nTo generate benchmarks for a pallet run\n\n```\ncargo b --release --features runtime-benchmarks -p webb-standalone-node\n\n./target/release/webb-standalone-node benchmark pallet \\\n--chain=dev \\\n--steps=20 \\\n--repeat=10 \\\n--log=warn \\\n--pallet=\u003cpallet_name\u003e \\\n--extrinsic=\"*\" \\\n--execution=wasm \\\n--wasm-execution=compiled \\\n--output=./pallets/signature-bridge/src/weights.rs \\\n--template=./.maintain/webb-weight-template.hbs\n```\n\n## Contributing\n\nInterested in contributing to protocol-substrate? Thank you so much for your interest! We are always appreciative for contributions from the open-source community!\n\nIf you have a contribution in mind, please check out our [Contribution Guide](./.github/CONTRIBUTING.md) for information on how to do so. We are excited for your first contribution!\n\n## License\n\nLicensed under \u003ca href=\"LICENSE\"\u003eApache 2.0 license\u003c/a\u003e.\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache 2.0 license, shall be licensed as above, without any additional terms or conditions.\n\n## Supported by\n\n\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\n \u003cimg src=\"./assets/w3f.jpeg\" width=\"30%\" height=\"60%\" \u003e\n\u003c/p\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftangle-network%2Fprotocol-substrate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftangle-network%2Fprotocol-substrate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftangle-network%2Fprotocol-substrate/lists"}