{"id":19358472,"url":"https://github.com/paritytech/substrate-contracts-node","last_synced_at":"2025-04-13T02:09:12.303Z","repository":{"id":37082623,"uuid":"401561609","full_name":"paritytech/substrate-contracts-node","owner":"paritytech","description":"Minimal Substrate node configured for smart contracts via pallet-contracts.","archived":false,"fork":false,"pushed_at":"2024-11-29T11:04:23.000Z","size":794,"stargazers_count":133,"open_issues_count":22,"forks_count":148,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-04-13T02:08:33.937Z","etag":null,"topics":["blockchain","smart-contracts","substrate"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paritytech.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":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-08-31T03:32:33.000Z","updated_at":"2025-04-04T04:33:51.000Z","dependencies_parsed_at":"2024-01-15T23:10:46.122Z","dependency_job_id":"f60df133-48fc-48ee-a8f7-8d401415260a","html_url":"https://github.com/paritytech/substrate-contracts-node","commit_stats":null,"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fsubstrate-contracts-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fsubstrate-contracts-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fsubstrate-contracts-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fsubstrate-contracts-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paritytech","download_url":"https://codeload.github.com/paritytech/substrate-contracts-node/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248654091,"owners_count":21140236,"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","smart-contracts","substrate"],"created_at":"2024-11-10T07:11:58.637Z","updated_at":"2025-04-13T02:09:12.268Z","avatar_url":"https://github.com/paritytech.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# substrate-contracts-node\n\n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/paritytech/substrate-contracts-node)\n\nThis repository contains Substrate's [`node-template`](https://github.com/paritytech/substrate/tree/master/bin/node-template)\nconfigured to include Substrate's [`pallet-contracts`](https://github.com/paritytech/substrate/tree/master/frame/contracts)\n‒ a smart contract module.\n\n_This repository contains a couple of modifications that make it unsuitable\nfor a production deployment, but a great fit for development and testing:_\n\n* The unstable features of the [`pallet-contracts`](https://github.com/paritytech/substrate/tree/master/frame/contracts)\n  are enabled by default (see the [`runtime/Cargo.toml`](https://github.com/paritytech/substrate-contracts-node/blob/main/runtime/Cargo.toml)).\n* The consensus algorithm has been switched to `manual-seal` in\n  [#42](https://github.com/paritytech/substrate-contracts-node/pull/42).\n  Hereby blocks are authored immediately at every transaction, so there\n  is none of the typical six seconds block time associated with `grandpa` or `aura`.\n  * By default, either manual or instant seal does not result in block finalization unless the `engine_finalizeBlock` \n    RPC is executed. However, it is possible to configure the finalization of sealed blocks to occur after a certain \n    amount of time by setting the `--finalize-delay-sec` option to a specific value, which specifies the number of seconds \n    to delay before finalizing the blocks. The default value is 1 second.\n    ```shell\n    ./target/release/substrate-contracts-node --finalize-delay-sec 5\n    ```\n* _If no CLI arguments are passed the node is started in development mode\n  by default._\n* A custom logging filter is applied by default that hides block production noise\n  and prints the contracts debug buffer to the console.\n* _With each start of the node process the chain starts from genesis ‒ so no\n  chain state is retained, all contracts will be lost! If you want to retain\n  chain state you have to supply a `--base-path`._\n* For `pallet_contracts::Config` we increased the allowed contract sizes. This\n  avoids running into `CodeTooLarge` when uploading contracts during development.\n  See the comment in [`runtime/src/lib.rs`](https://github.com/paritytech/substrate-contracts-node/blob/main/runtime/src/lib.rs)\n  for more details.\n\nIf you are looking for a node suitable for production see these configurations:\n\n* [Substrate Node Template](https://github.com/paritytech/substrate/tree/master/bin/node-template)\n* [Substrate Cumulus Parachain Template](https://github.com/paritytech/cumulus/tree/master/parachain-template)\n* [Contracts Parachain Configuration for Rococo](https://github.com/paritytech/cumulus/tree/master/parachains/runtimes/contracts/contracts-rococo)\n\n## Installation\n\n### Download Binary\n\nThe easiest way is to download a binary release from [our releases page](https://github.com/paritytech/substrate-contracts-node/releases)\nand just execute `./substrate-contracts-node`.\n\n### Build Locally\n\nFollow the [official installation steps](https://docs.substrate.io/install/) to set up all Substrate prerequisites.\n\nAfterwards you can install this node via\n\n```bash\ncargo install contracts-node\n```\n\n## Usage\n\nTo run a local dev node execute\n\n```bash\nsubstrate-contracts-node\n```\n\nA new chain in temporary directory will be created each time the command is executed. This is the\ndefault for this node. If you want to persist chain state across runs you need to\nspecify a directory with `--base-path`.\n\nSee our FAQ for more details:\n[How do I print something to the console from the runtime?](https://paritytech.github.io/ink-docs/faq/#how-do-i-print-something-to-the-console-from-the-runtime).\n\n## Connect with frontend\n\nOnce the node template is running locally, you can connect to it with frontends like [Contracts UI](https://contracts-ui.substrate.io/#/?rpc=ws://127.0.0.1:9944) or [Polkadot-JS Apps](https://polkadot.js.org/apps/#/explorer?rpc=ws://localhost:9944) and interact with your chain.\n\n## How to upgrade to new Polkadot release\n\nWe can have two types of releases:\n\n* Internal release: This type of release does not involve releasing the crates on crates.io. It involves using Git\n  references in the Cargo.toml dependencies. We utilize this type of release for faster iteration when we don't want\n  to wait for the substrate crates to be released.\n\n* Crate release: This is the preferable type of release, which involves specifying crate versions in the Cargo.toml\n  dependencies and releasing the crates on crates.io..\n\n- [ ] Check Substrate's [`solochain-template`](https://github.com/paritytech/polkadot-sdk/tree/master/templates/solochain),\n      for new commits between the new polkadot release branch and the one this repository is currently synced with.\n      The current branch is mentioned in the last release.\n- [ ] Apply each commit that happened in this `solochain-template` folder since the last sync.\n- [ ] Check [`parachain-template`](https://github.com/paritytech/polkadot-sdk/tree/master/templates/parachain)\n      and apply each commit that has occurred in its folder since the last sync.\n- [ ] Check commits for [`pallet-contracts`](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/contracts)\n      since the last time someone synchronized this repository with Substrate\n      in order to not miss any important changes.\n- [ ] (Crate release only) Execute `psvm -p ./Cargo.toml -v X.X.X`, to update the dependencies to the required versions.\n      Replace `X.X.X` with the requested Polkadot release version.\n- [ ] (Internal release only)  Manually update the dependencies in Cargo.toml to the required Git SHA versions.\n- [ ] Increment the minor version number in `Cargo.toml` and `node/Cargo.toml`.\n- [ ] Execute `cargo run --release`. If successful, it should produce blocks\n      and a new, up to date, `Cargo.lock` will be created.\n- [ ] Create a PR with the changes, have it reviewed.\n- [ ] (Crate release only) Upload crates to `crates.io` using the commands below, replacing `XX` with your incremented\n      version number:\n      `cargo release 0.XX.0 -v --no-tag --no-push -p contracts-node-runtime -p contracts-parachain-runtime --execute`\n      `cargo release 0.XX.0 -v --no-tag --no-push -p contracts-node --execute`\n      Note: Before uploading, perform a dry run to ensure that it will be successful.\n- [ ] Merge the release PR branch.\n- [ ] Set the tag and run the following commands to push the tag. The tag must contain a message, otherwise the github action won't be able to create a release:\n  \n```bash\nTAG=\"v0.XX.0\"\ngit checkout main\ngit pull\ngit tag -a ${TAG} -m \"${TAG}\"\ngit push origin ${TAG}\n```\n\n\n- [ ] After tag is pushed CI creates a GitHub draft release.\n      This draft release will contain a binary for Linux and Mac and appear\n      under [Releases](https://github.com/paritytech/substrate-contracts-node/releases).\n      Add a description in the style of \"Synchronized with [`polkadot-v1.8.0`](https://github.com/paritytech/polkadot-sdk/tree/release-polkadot-v1.8.0) branch.\"\n      and publish it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparitytech%2Fsubstrate-contracts-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparitytech%2Fsubstrate-contracts-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparitytech%2Fsubstrate-contracts-node/lists"}