{"id":26233674,"url":"https://github.com/docknetwork/dock-substrate","last_synced_at":"2026-03-07T21:32:31.010Z","repository":{"id":38536513,"uuid":"244471521","full_name":"docknetwork/dock-substrate","owner":"docknetwork","description":"Substrate node for Dock blockchain","archived":false,"fork":false,"pushed_at":"2025-10-27T11:12:40.000Z","size":66348,"stargazers_count":59,"open_issues_count":22,"forks_count":17,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-10-27T11:39:07.696Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/docknetwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":"audit-reports/Audit Report - Dock Token Migration.pdf","citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-03-02T20:44:57.000Z","updated_at":"2025-07-03T12:59:27.000Z","dependencies_parsed_at":"2024-01-29T18:11:50.226Z","dependency_job_id":"554a1b82-f2ea-447e-8323-125c6c4869ea","html_url":"https://github.com/docknetwork/dock-substrate","commit_stats":null,"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"purl":"pkg:github/docknetwork/dock-substrate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docknetwork%2Fdock-substrate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docknetwork%2Fdock-substrate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docknetwork%2Fdock-substrate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docknetwork%2Fdock-substrate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/docknetwork","download_url":"https://codeload.github.com/docknetwork/dock-substrate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docknetwork%2Fdock-substrate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30231636,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T19:01:10.287Z","status":"ssl_error","status_checked_at":"2026-03-07T18:59:58.103Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2025-03-13T01:17:04.265Z","updated_at":"2026-03-07T21:32:30.984Z","avatar_url":"https://github.com/docknetwork.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dock Blockchain Node\n\n[Rust Docs](https://docknetwork.github.io/dock-substrate/dock_runtime).\n[Javascript Client](https://github.com/docknetwork/sdk).\n\nThe dock blockchain serves as registry for [Decentralized Identifiers](https://www.w3.org/TR/did-core) and for revocations of [Verifiable Credentials](https://www.w3.org/TR/vc-data-model).\n\n## Quickstart\n\nDocker can be used to quickly spin up a node (may require sudo):\n\n```\ndocker run -p 9944:9944 -p 30333:30333 docknetwork/dock-substrate:mainnet --chain ./cspec/knox_raw.json --ws-external --enable-offchain-indexing=true\n             |            |                       |                         |                              |                        |\n             |     Expose p2p port                |                 Join the mainnet                       |                        |\n             |                                    |                                                        |                        |\n    Expose websocket port          Use the node image from dockerhub                     Listen for rpc over websocket   Enables off-chain indexing\n```\n\nThe above command will run a mainnet node. To run a testnet node, use the chainspec `knox_test_raw.json` in place of `knox_raw.json`\nand image `docknetwork/dock-substrate:testnet` in place of `docknetwork/dock-substrate:mainnet` in the above command.\n\nTo view possible command line arguments:\n\n```\ndocker run docknetwork/dock-substrate --help\n```\n\n## Build\n\nTo build the node executable yourself, you'll need to install the following dependencies.\n\n```bash\n# Install Rust.\ncurl https://sh.rustup.rs -sSf | sh\n\n# Ensure rust nightly version pinned by ./rust-toolchain is installed.\nrustup update nightly\n\n# Install the wasm32-unknown-unknown target for the rust version pinned by ./rust-toolchain.\nrustup target add wasm32-unknown-unknown --toolchain nightly\n```\n\nThe project is known to build with cargo 1.62.1 and rust 1.62.1. Upgrade to these versions or higher if unable to build\n\nNow you can build the node binary.\n\n```bash\ncargo build --release --features wasmtime\n```\n\nAbove command will build a node with ss58 prefix 42 which is for dev nodes. To build node for testnet or mainnet, use the \nfeatures `testnet` and `mainnet` respectively as below\n\n```bash\ncargo build --release --features testnet,wasmtime\n```\n\nThe `spec_name` with the above command will be `dock-pos-test-runtime` and ss58 prefix will be 21. \n\n```bash\ncargo build --release --features mainnet,wasmtime\n```\n\nThe `spec_name` with the above command will be `dock-pos-main-runtime` and ss58 prefix will be 22.\n\nRunning without any features will result in `spec_name` of `dock-dev-runtime`\n\nWhen building a node to run in the network, it's recommended to build with `production` profile rather than `--release` like this\n\n```bash\ncargo build --profile=production\n```\n\nThis will put the `dock-node` binary in `target/production`\n\nYou can add the above features to it. For testnet\n\n```bash\ncargo build --profile=production --features testnet,wasmtime\n```\n\nFor mainnet\n\n```bash\ncargo build --profile=production --features mainnet,wasmtime\n```\n\n### Building a node for testing staking, governance\n\nTesting staking, elections, governance, etc capabilities requires quite some time as the duration of corresponding \noperations varies between a few hours to few days. Eg. an epoch is 3 hours long, era is 12 hours long, it takes 7 days to unbond, \na new referendum is launched every 20 days, voting lasts for 15 days, and so on. To test these features in a reasonable time, these \ndurations need to be small. Such a node can be built by using feature `small_durations` as shown below. This feature can be combined \nwith feature `testnet` or `mainnet`. \n\n```\ncargo build --release --features small_durations\n```\n\n### Building a node for faster block production\nFor **testing** with SDK, faster block production is needed, i.e. \u003c 1sec. Use the `fastblock` feature to achieve that.  \n\n```bash\ncargo build --release --features fastblock\n```\n\n### Building Docker image\n\nTo build image for testnet node, run the following from the repository's root\n\n```bash\ndocker build --build-arg features='--features testnet,wasmtime' .\n```\n\nTo build image for mainnet node, run the following from the repository's root\n\n```bash\ndocker build --build-arg features='--features mainnet,wasmtime' .\n```\n\n\nThe above commands will build the `production` profile which tradeoffs build time for performance. For slightly better build time, \nyou can build the node in release mode as following\n\n```bash\ndocker build --build-arg release=Y --build-arg features='--features testnet,wasmtime' .\n```\n\n### Building chain spec\n\nTo build chain spec, use the `build-spec` command as shown below. The below commands show the spec being built \nfor `testnet` (defined in `load_spec` of `Cli`) chain spec. Always use the raw chainspec (`knox_test_raw`) to run the \nchain\n```\n./target/release/dock-node build-spec --chain=testnet \u003e knox_test.json\n./target/release/dock-node build-spec --chain=knox_test.json --raw \u003e knox_test_raw.json\n```\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md) for contribution guidelines.\n\n## Releases\nThe testnet and mainnet codebases are tagged as `testnet` and `mainnet` respectively. On the releases page, you will only \nfind mainnet releases. Similarly, the docker images corresponding to testnet and mainnet are tagged as `testnet` and `mainnet` \nrespectively, and you can find pull them as `docker pull docknetwork/dock-substrate:testnet` or `docker pull docknetwork/dock-substrate:mainnet`\n\n## Recipes\n\n```\n# Build and run unit tests.\ncargo test --all\n\n# Build and run a node in local development node for testing.\ncargo run -- --dev\n\n# Clear chain state after running the local development node.\ncargo run -- purge-chain --dev\n\n# View available command line options.\ncargo run -- --help\n\n# Incase block finalisation stalls for some reason, exporting the blocks, purging the chain and importing the blocks fixes it\n# Make sure node is stopped before running followig commands. The `pruning mode` is by default `archive`\n\n# Export blocks to file blocks.bin\n./target/\u003cdebug or release\u003e/dock-node export-blocks --binary --chain=\u003cchain spec\u003e --base-path=\u003cdata directory of the node\u003e [--pruning=\u003cpruning mode\u003e] blocks.bin\n\n# Purge chain\n./target/\u003cdebug or release\u003e/dock-node purge-chain --chain=\u003cchain spec\u003e --base-path=\u003cdata directory of the node\u003e\n\n# Import blocks from file blocks.bin\n./target/\u003cdebug or release\u003e/dock-node import-blocks --binary --chain=\u003cchain spec\u003e --base-path=\u003cdata directory of the node\u003e [--pruning=\u003cpruning mode\u003e] blocks.bin \n```\n\n## Polkadot-js UI\n\nThe [polkadot-js UI](https://polkadot.js.org/apps) UI can be used to interact with the dock network through a locally running node. \nSome custom types will need to be specified in the `Settings \u003e Developer` section of the UI. The definitions for these types \ncan currently be found in the [types.json](types.json) file.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocknetwork%2Fdock-substrate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdocknetwork%2Fdock-substrate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocknetwork%2Fdock-substrate/lists"}