{"id":22799933,"url":"https://github.com/tangle-network/dkg-substrate","last_synced_at":"2025-04-19T16:52:31.718Z","repository":{"id":37045921,"uuid":"421102162","full_name":"tangle-network/dkg-substrate","owner":"tangle-network","description":"Multy-party threshold ECDSA (GG20) Substrate node","archived":false,"fork":false,"pushed_at":"2023-12-18T16:13:30.000Z","size":24037,"stargazers_count":60,"open_issues_count":30,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T23:05:16.201Z","etag":null,"topics":["blockchain","cryptography","gg20","multiparty-computation","polkadot","substrate","zero-knowledge"],"latest_commit_sha":null,"homepage":"https://tangle.webb.tools/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-25T16:30:13.000Z","updated_at":"2024-11-19T14:26:20.000Z","dependencies_parsed_at":"2023-02-15T10:32:07.250Z","dependency_job_id":"86c70ad1-884f-4b24-81db-a6014eeaf3d5","html_url":"https://github.com/tangle-network/dkg-substrate","commit_stats":{"total_commits":308,"total_committers":20,"mean_commits":15.4,"dds":0.8116883116883117,"last_synced_commit":"fc8ed3f6612992501df341e3da512bd3734a78e6"},"previous_names":["tangle-network/dkg-substrate","webb-tools/dkg-substrate"],"tags_count":46,"template":false,"template_full_name":"polkadot-developers/substrate-parachain-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fdkg-substrate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fdkg-substrate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fdkg-substrate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fdkg-substrate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tangle-network","download_url":"https://codeload.github.com/tangle-network/dkg-substrate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248665748,"owners_count":21142123,"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","cryptography","gg20","multiparty-computation","polkadot","substrate","zero-knowledge"],"created_at":"2024-12-12T07:10:29.754Z","updated_at":"2025-04-19T16:52:31.696Z","avatar_url":"https://github.com/tangle-network.png","language":"Rust","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🚀 Threshold ECDSA Distributed Key Generation Protocol 🔑 \u003c/strong\u003e\n\u003c/p\u003e\n\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/webb-tools/dkg-substrate/checks.yml?branch=master\u0026style=flat-square)](https://github.com/webb-tools/dkg-substrate/actions) [![Codecov](https://img.shields.io/codecov/c/gh/webb-tools/dkg-substrate?style=flat-square\u0026token=HNT1CEZ01E)](https://codecov.io/gh/webb-tools/dkg-substrate) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) [![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\"\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\"\u003eGetting Started\u003c/a\u003e\u003c/li\u003e\n    \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#prerequisites\"\u003ePrerequisites\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#install\"\u003eInstallation\u003c/a\u003e\u003c/li\u003e\n    \u003c/ul\u003e\n    \u003cli\u003e\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\u003c/li\u003e\n    \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#standalone\"\u003eStandalone Testnet\u003c/a\u003e\u003c/li\u003e\n    \u003c/ul\u003e\n    \u003cli\u003e\u003ca href=\"#test\"\u003eTesting\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contribute\"\u003eContributing\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n  \u003c/ul\u003e\n\u003c/details\u003e\n\n\u003ch1 id=\"start\"\u003e Getting Started  🎉 \u003c/h1\u003e\n\nThe DKG is a multi-party computation protocol that generates a group public and private key. We aim to use this group keypair to sign arbitrary messages that will govern protocols deployed around the blockchain ecosystem. One primary purpose for the DKG is to govern and facilitate operations of the private signature bridge/anchor system.\n\nFor additional information, please refer to the [Webb DKG Rust Docs](https://webb-tools.github.io/dkg-substrate/) 📝. Have feedback on how to improve the dkg? Or have a specific question to ask? Checkout the [DKG Feedback Discussion](https://github.com/webb-tools/feedback/discussions/categories/dkg-feedback) 💬.\n\n## Prerequisites\n\nThis guide uses \u003chttps://rustup.rs\u003e installer and the `rustup` tool to manage the Rust toolchain.\n\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 stable version, add nightly and the nightly wasm target:\n\n```bash\nrustup default nightly\nrustup update\nrustup update nightly\nrustup target add wasm32-unknown-unknown\n```\n\n## Installation 💻\n\n```bash\ncargo build --release\n```\n\n\u003e NOTE: You _must_ use the release builds! The optimizations here are required\n\u003e as in debug mode, it is expected that nodes are not able to run fast enough to produce blocks.\n\n## Installation Using Nix 💻\n\n1. Install [Nix](https://nixos.org/download.html)\n2. Enable [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. Run `nix develop` in the root of this repo to get a shell with all the dependencies installed.\n\n\n\u003ch1 id=\"usage\"\u003e Usage \u003c/h1\u003e\n\n\u003ch3 id=\"standalone\"\u003e Standalone Local Testnet \u003c/h3\u003e\n\n```bash\n./scripts/run-local-testnet.sh --clean\n```\n\nThis should start the local testnet, you can view the logs in `/tmp` directory for all the authorities and use [polkadotJS](https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/explorer) to view the running testnet.\n\n\n\u003ch2 id=\"test\"\u003e Testing 🧪 \u003c/h2\u003e\n\nThe following instructions outline how to run dkg-substrate's base test suite and E2E test suite.\n\n### Unit Tests\n\n```\ncargo test\n```\n\n### Stress Tests\n\nWhen debugging the internal mechanics of the DKG, it is useful to run the stress tests. These tests are designed to run the DKG with a custom number of authorities. This allows you to quickly debug the DKG without having to setup a local chain.\n\n```\n# Build the dkg-standalone node\ncargo build --release -p dkg-standalone-node --features=integration-tests,testing\n\n# run the orchestrator, making sure to use the proper config\ncargo run --package dkg-test-orchestrator --release --features=testing -- --config /path/to/orchestrator_config.toml\n```\n\n### Local Chain Tests (Automatic)\n\nTo test the DKG against a local testnet, run:\n\n```\ncargo make integration-tests\n```\n\n### Local Chain Tests (Manual)\n\nIf manual control is needed over the nodes (e.g., for debugging and/or shutting down nodes to test fault-tolerance), first build the binary:\n\n```\ncargo make build-test\n```\n\nThen, start the bootnode (Alice):\n\n```\ncargo make alice\n```\n\nOnce Alice is running, start the other nodes each in separate terminals/processes:\n\n```\ncargo make bob\ncargo make charlie\ncargo make dave\ncargo make eve\n```\n\n\n\n### Setting up debugging logs\n\nIf you would like to run the dkg with verbose logs you may add the following arguments during initial setup. You may change the target to include `debug | error | info| trace | warn`. You may also want to review [Substrate runtime debugging](https://docs.substrate.io/v3/runtime/debugging/).\n\n```\n-ldkg=debug \\\n-ldkg_metadata=debug \\\n-lruntime::offchain=debug \\\n-ldkg_proposal_handler=debug \\\n-ldkg_proposals=debug\n```\n\n\u003ch2 id=\"contribute\"\u003e Contributing \u003c/h2\u003e\n\nInterested in contributing to the Webb DKG Protocol? 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\u003ch2 id=\"license\"\u003e License \u003c/h2\u003e\n\nLicensed under \u003ca href=\"LICENSE\"\u003eGNU General Public License v3.0\u003c/a\u003e.\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the GNU General Public License v3.0 license, shall be licensed as above, without any additional terms or conditions.\n\n\n## Troubleshooting\nThe linking phase may fail due to not finding libgmp (i.e., \"could not find library -lgmp\") when building on a mac M1. To fix this problem, run:\n\n```bash\nbrew install gmp\n# make sure to run the commands below each time when starting a new env, or, append them to .zshrc\nexport LIBRARY_PATH=$LIBRARY_PATH:/opt/homebrew/lib\nexport INCLUDE_PATH=$INCLUDE_PATH:/opt/homebrew/include\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftangle-network%2Fdkg-substrate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftangle-network%2Fdkg-substrate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftangle-network%2Fdkg-substrate/lists"}