From 06a6637f10b3fa5c7630915b5f80aae57c0664cd Mon Sep 17 00:00:00 2001 From: Joyce Siqueira <98593770+the-right-joyce@users.noreply.github.com> Date: Fri, 25 Aug 2023 21:06:16 +0200 Subject: [PATCH 01/14] update readmes --- cumulus/README.md | 266 ++++++++++++++++++++++++++++++++++++++++++-- polkadot/README.md | 265 +++++++++++++++++++++++++++++++++++++++++-- substrate/README.md | 36 ++++-- 3 files changed, 546 insertions(+), 21 deletions(-) diff --git a/cumulus/README.md b/cumulus/README.md index 59e0cff015d3..4ceb9ff09107 100644 --- a/cumulus/README.md +++ b/cumulus/README.md @@ -1,13 +1,265 @@ -Dear contributors and users, +# Cumulus ☁️ -We would like to inform you that we have recently made significant changes to our repository structure. In order to streamline our development process and foster better contributions, we have merged three separate repositories Cumulus, Substrate and Polkadot into a single new repository: [the Polkadot SDK](https://github.com/paritytech/polkadot-sdk). Go ahead and make sure to support us by giving a star ⭐️ to the new repo. +[![Doc](https://img.shields.io/badge/cumulus%20docs-master-brightgreen)](https://paritytech.github.io/cumulus/) -By consolidating our codebase, we aim to enhance collaboration and provide a more efficient platform for future development. +This repository contains both the Cumulus SDK and also specific chains implemented +on top of this SDK. -If you currently have an open pull request in any of the merged repositories, we kindly request that you resubmit your PR in the new repository. This will ensure that your contributions are considered within the updated context and enable us to review and merge them more effectively. +If you only want to run a **Polkadot Parachain Node**, check out our [container section](./docs/container.md). -We appreciate your understanding and ongoing support throughout this transition. Should you have any questions or require further assistance, please don't hesitate to [reach out to us](https://forum.polkadot.network/t/psa-parity-is-currently-working-on-merging-the-polkadot-stack-repositories-into-one-single-repository/2883). +## Cumulus SDK -Best Regards, +A set of tools for writing [Substrate](https://substrate.io/)-based +[Polkadot](https://wiki.polkadot.network/en/) +[parachains](https://wiki.polkadot.network/docs/en/learn-parachains). Refer to the included +[overview](docs/overview.md) for architectural details, and the +[Connect to a relay chain how-to guide](https://docs.substrate.io/reference/how-to-guides/parachains/connect-to-a-relay-chain/) for a +guided walk-through of using these tools. -Parity Technologies \ No newline at end of file +It's easy to write blockchains using Substrate, and the overhead of writing parachains' +distribution, p2p, database, and synchronization layers should be just as low. This project aims to +make it easy to write parachains for Polkadot by leveraging the power of Substrate. + +Cumulus clouds are shaped sort of like dots; together they form a system that is intricate, +beautiful and functional. + +### Consensus + +[`parachain-consensus`](https://github.com/paritytech/cumulus/blob/master/client/consensus/common/src/parachain_consensus.rs) is a +[consensus engine](https://docs.substrate.io/v3/advanced/consensus) for Substrate +that follows a Polkadot +[relay chain](https://wiki.polkadot.network/docs/en/learn-architecture#relay-chain). This will run +a Polkadot node internally, and dictate to the client and synchronization algorithms which chain +to follow, +[finalize](https://wiki.polkadot.network/docs/en/learn-consensus#probabilistic-vs-provable-finality), +and treat as best. + +### Collator + +A Polkadot [collator](https://wiki.polkadot.network/docs/en/learn-collator) for the parachain is +implemented by the `polkadot-parachain` binary (previously called `polkadot-collator`). + +You may run `polkadot-parachain` locally after building it or using one of the container option described [here](./docs/container.md). + +### Relay Chain Interaction +To operate a parachain node, a connection to the corresponding relay chain is necessary. This can be +achieved in one of three ways: +1. Run a full relay chain node within the parachain node (default) +2. Connect to an external relay chain node via WebSocket RPC +3. Run a light client for the relay chain + +#### In-process Relay Chain Node +If an external relay chain node is not specified (default behavior), then a full relay chain node is +spawned within the same process. + +This node has all of the typical components of a regular Polkadot node and will have to fully sync +with the relay chain to work. + +##### Example command +```bash +polkadot-parachain \ + --chain parachain-chainspec.json \ + --tmp \ + -- \ + --chain relaychain-chainspec.json +``` + +#### External Relay Chain Node +An external relay chain node is connected via WebsSocket RPC by using the `--relay-chain-rpc-urls` +command line argument. This option accepts one or more space-separated WebSocket URLs to a full relay +chain node. By default, only the first URL will be used, with the rest as a backup in case the +connection to the first node is lost. + +Parachain nodes using this feature won't have to fully sync with the relay chain to work, so in general +they will use fewer system resources. + +**Note:** At this time, any parachain nodes using this feature will still spawn a significantly cut-down +relay chain node in-process. Even though they lack the majority of normal Polkadot subsystems, they +will still need to connect directly to the relay chain network. +##### Example command +```bash +polkadot-parachain \ + --chain parachain-chainspec.json \ + --tmp \ + --relay-chain-rpc-urls \ + "ws://relaychain-rpc-endpoint:9944" \ + "ws://relaychain-rpc-endpoint-backup:9944" \ + -- \ + --chain relaychain-chainspec.json +``` + +#### Relay Chain Light Client +An internal relay chain light client provides a fast and lightweight approach for connecting to the relay chain network. +It provides relay chain notifications and facilitates runtime calls. + +To specify which chain the light client should connect to, users need to supply a relay chain chain-spec as part of the relay chain arguments. + +**Note:** At this time, any parachain nodes using this feature will still spawn a significantly cut-down +relay chain node in-process. Even though they lack the majority of normal Polkadot subsystems, they +will still need to connect directly to the relay chain network. + +##### Example command +```bash +polkadot-parachain \ + --chain parachain-chainspec.json \ + --tmp \ + --relay-chain-light-client \ + -- \ + --chain relaychain-chainspec.json +``` + +## Installation and Setup +Before building Cumulus SDK based nodes / runtimes prepare your environment by following Substrate +[installation instructions](https://docs.substrate.io/main-docs/install/). + +To launch a local network, you can use [zombienet](https://github.com/paritytech/zombienet) for +quick setup and experimentation or follow the [manual setup](#manual-setup). + +### Zombienet +We use Zombienet to spin up networks for integration tests and local networks. +Follow [these installation steps](https://github.com/paritytech/zombienet#requirements-by-provider) +to set it up on your machine. A simple network specification with two relay chain nodes and one collator is +located at [zombienet/examples/small_network.toml](zombienet/examples/small_network.toml). + + +#### Which provider should I use? +Zombienet offers multiple providers to run networks. Choose the one that best fits your needs: +- **Podman:** Choose this if you want to spin up a network quick and easy. +- **Native:** Choose this if you want to develop and deploy your changes. Requires compilation +of the binaries. +- **Kubernetes:** Choose this for advanced use-cases or running on cloud-infrastructure. + +#### How to run +To run the example network, use the following commands: + +```bash +# Podman provider +zombienet --provider podman spawn ./zombienet/examples/small_network.toml + +# Native provider, assumes polkadot and polkadot-parachains binary in $PATH +zombienet --provider native spawn ./zombienet/examples/small_network.toml +``` + +### Manual Setup +#### Launch the Relay Chain + +```bash +# Clone +git clone https://github.com/paritytech/polkadot +cd polkadot + +# Compile Polkadot with the real overseer feature +cargo build --release --bin polkadot + +# Generate a raw chain spec +./target/release/polkadot build-spec --chain rococo-local --disable-default-bootnode --raw > rococo-local-cfde.json + +# Alice +./target/release/polkadot --chain rococo-local-cfde.json --alice --tmp + +# Bob (In a separate terminal) +./target/release/polkadot --chain rococo-local-cfde.json --bob --tmp --port 30334 +``` + +#### Launch the Parachain + +```bash +# Clone +git clone https://github.com/paritytech/cumulus +cd cumulus + +# Compile +cargo build --release --bin polkadot-parachain + +# Export genesis state +./target/release/polkadot-parachain export-genesis-state > genesis-state + +# Export genesis wasm +./target/release/polkadot-parachain export-genesis-wasm > genesis-wasm + +# Collator1 +./target/release/polkadot-parachain --collator --alice --force-authoring --tmp --port 40335 --rpc-port 9946 -- --chain ../polkadot/rococo-local-cfde.json --port 30335 + +# Collator2 +./target/release/polkadot-parachain --collator --bob --force-authoring --tmp --port 40336 --rpc-port 9947 -- --chain ../polkadot/rococo-local-cfde.json --port 30336 + +# Parachain Full Node 1 +./target/release/polkadot-parachain --tmp --port 40337 --rpc-port 9948 -- --chain ../polkadot/rococo-local-cfde.json --port 30337 +``` + +#### Register the parachain + +![image](https://user-images.githubusercontent.com/2915325/99548884-1be13580-2987-11eb-9a8b-20be658d34f9.png) + + +## Asset Hub 🪙 + +This repository also contains the Asset Hub runtimes. Asset Hub is a system parachain providing an +asset store for the Polkadot ecosystem. + +### Build & Launch a Node + +To run an Asset Hub node, you will need to compile the `polkadot-parachain` binary: + +```bash +cargo build --release --locked --bin polkadot-parachain +``` + +Once the executable is built, launch the parachain node via: + +```bash +CHAIN=asset-hub-westend # or asset-hub-kusama +./target/release/polkadot-parachain --chain $CHAIN +``` + +Refer to the [setup instructions](#manual-setup) to run a local network for development. + +## Contracts 📝 + +See [the `contracts-rococo` readme](parachains/runtimes/contracts/contracts-rococo/README.md) for details. + +## Bridge-hub 📝 + +See [the `bridge-hubs` readme](parachains/runtimes/bridge-hubs/README.md) for details. + +## Rococo 👑 + +[Rococo](https://polkadot.js.org/apps/?rpc=wss://rococo-rpc.polkadot.io) is becoming a +[Community Parachain Testbed](https://polkadot.network/blog/rococo-revamp-becoming-a-community-parachain-testbed/) +for parachain teams in the Polkadot ecosystem. It supports multiple parachains with the +differentiation of long-term connections and recurring short-term connections, to see which +parachains are currently connected and how long they will be connected for +[see here](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/parachains). + +Rococo is an elaborate style of design and the name describes the painstaking effort that has gone +into this project. + +### Build & Launch Rococo Collators + +Collators are similar to validators in the relay chain. These nodes build the blocks that will +eventually be included by the relay chain for a parachain. + +To run a Rococo collator you will need to compile the following binary: + +```bash +cargo build --release --locked --bin polkadot-parachain +``` + +Once the executable is built, launch collators for each parachain (repeat once each for chain +`tick`, `trick`, `track`): + +```bash +./target/release/polkadot-parachain --chain $CHAIN --validator +``` + +You can also build [using a container](./docs/container.md). + +### Parachains + +* [Asset Hub](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-statemint-rpc.polkadot.io#/explorer) +* [Contracts on Rococo](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-contracts-rpc.polkadot.io#/explorer) +* [RILT](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo.kilt.io#/explorer) + +The network uses horizontal message passing (HRMP) to enable communication between parachains and +the relay chain and, in turn, between parachains. This means that every message is sent to the relay +chain, and from the relay chain to its destination parachain. diff --git a/polkadot/README.md b/polkadot/README.md index 59e0cff015d3..dcebcf727754 100644 --- a/polkadot/README.md +++ b/polkadot/README.md @@ -1,13 +1,264 @@ -Dear contributors and users, +# Polkadot -We would like to inform you that we have recently made significant changes to our repository structure. In order to streamline our development process and foster better contributions, we have merged three separate repositories Cumulus, Substrate and Polkadot into a single new repository: [the Polkadot SDK](https://github.com/paritytech/polkadot-sdk). Go ahead and make sure to support us by giving a star ⭐️ to the new repo. +Implementation of a node in Rust based on the Substrate framework. -By consolidating our codebase, we aim to enhance collaboration and provide a more efficient platform for future development. +> **NOTE:** In 2018, we split our implementation of "Polkadot" from its development framework +> "Substrate". See the [Substrate][substrate-repo] repo for git history prior to 2018. -If you currently have an open pull request in any of the merged repositories, we kindly request that you resubmit your PR in the new repository. This will ensure that your contributions are considered within the updated context and enable us to review and merge them more effectively. +[substrate-repo]: https://github.com/paritytech/substrate -We appreciate your understanding and ongoing support throughout this transition. Should you have any questions or require further assistance, please don't hesitate to [reach out to us](https://forum.polkadot.network/t/psa-parity-is-currently-working-on-merging-the-polkadot-stack-repositories-into-one-single-repository/2883). +This repo contains runtimes for the Polkadot, Kusama, and Westend networks. The README provides +information about installing the `polkadot` binary and developing on the codebase. For more +specific guides, like how to be a validator, see the +[Polkadot Wiki](https://wiki.polkadot.network/docs/getting-started). -Best Regards, +## Installation -Parity Technologies \ No newline at end of file +If you just wish to run a Polkadot node without compiling it yourself, you may +either run the latest binary from our +[releases](https://github.com/paritytech/polkadot/releases) page, or install +Polkadot from one of our package repositories. + +Installation from the Debian repository will create a `systemd` +service that can be used to run a Polkadot node. This is disabled by default, +and can be started by running `systemctl start polkadot` on demand (use +`systemctl enable polkadot` to make it auto-start after reboot). By default, it +will run as the `polkadot` user. Command-line flags passed to the binary can +be customized by editing `/etc/default/polkadot`. This file will not be +overwritten on updating polkadot. You may also just run the node directly from +the command-line. + +### Debian-based (Debian, Ubuntu) + +Currently supports Debian 10 (Buster) and Ubuntu 20.04 (Focal), and +derivatives. Run the following commands as the `root` user. + +```bash +# Import the security@parity.io GPG key +gpg --recv-keys --keyserver hkps://keys.mailvelope.com 9D4B2B6EB8F97156D19669A9FF0812D491B96798 +gpg --export 9D4B2B6EB8F97156D19669A9FF0812D491B96798 > /usr/share/keyrings/parity.gpg +# Add the Parity repository and update the package index +echo 'deb [signed-by=/usr/share/keyrings/parity.gpg] https://releases.parity.io/deb release main' > /etc/apt/sources.list.d/parity.list +apt update +# Install the `parity-keyring` package - This will ensure the GPG key +# used by APT remains up-to-date +apt install parity-keyring +# Install polkadot +apt install polkadot + +``` + +## Building + +### Install via Cargo + +Make sure you have the support software installed from the **Build from Source** section +below this section. + +If you want to install Polkadot in your PATH, you can do so with: + +```bash +cargo install --git https://github.com/paritytech/polkadot --tag polkadot --locked +``` + +### Build from Source + +If you'd like to build from source, first install Rust. You may need to add Cargo's bin directory +to your PATH environment variable. Restarting your computer will do this for you automatically. + +```bash +curl https://sh.rustup.rs -sSf | sh +``` + +If you already have Rust installed, make sure you're using the latest version by running: + +```bash +rustup update +``` + +Once done, finish installing the support software: + +```bash +sudo apt install build-essential git clang libclang-dev pkg-config libssl-dev protobuf-compiler +``` + +Build the client by cloning this repository and running the following commands from the root +directory of the repo: + +```bash +git checkout +./scripts/init.sh +cargo build --release +``` + +**Note:** compilation is a memory intensive process. We recommend having 4 GiB of physical RAM or swap available (keep in mind that if a build hits swap it tends to be very slow). + +**Note:** if you want to move the built `polkadot` binary somewhere (e.g. into $PATH) you will also need to move `polkadot-execute-worker` and `polkadot-prepare-worker`. You can let cargo do all this for you by running: + +```sh +cargo install --path . --locked +``` + +#### Build from Source with Docker + +You can also build from source using +[Parity CI docker image](https://github.com/paritytech/scripts/tree/master/dockerfiles/ci-linux): + +```bash +git checkout +docker run --rm -it -w /shellhere/polkadot \ + -v $(pwd):/shellhere/polkadot \ + paritytech/ci-linux:production cargo build --release +sudo chown -R $(id -u):$(id -g) target/ +``` + +If you want to reproduce other steps of CI process you can use the following +[guide](https://github.com/paritytech/scripts#gitlab-ci-for-building-docker-images). + +## Networks + +This repo supports runtimes for Polkadot, Kusama, and Westend. + +### Connect to Polkadot Mainnet + +Connect to the global Polkadot Mainnet network by running: + +```bash +./target/release/polkadot --chain=polkadot +``` + +You can see your node on [telemetry] (set a custom name with `--name "my custom name"`). + +[telemetry]: https://telemetry.polkadot.io/#list/Polkadot + +### Connect to the "Kusama" Canary Network + +Connect to the global Kusama canary network by running: + +```bash +./target/release/polkadot --chain=kusama +``` + +You can see your node on [telemetry] (set a custom name with `--name "my custom name"`). + +[telemetry]: https://telemetry.polkadot.io/#list/Kusama + +### Connect to the Westend Testnet + +Connect to the global Westend testnet by running: + +```bash +./target/release/polkadot --chain=westend +``` + +You can see your node on [telemetry] (set a custom name with `--name "my custom name"`). + +[telemetry]: https://telemetry.polkadot.io/#list/Westend + +### Obtaining DOTs + +If you want to do anything on Polkadot, Kusama, or Westend, then you'll need to get an account and +some DOT, KSM, or WND tokens, respectively. See the +[claims instructions](https://claims.polkadot.network/) for Polkadot if you have DOTs to claim. For +Westend's WND tokens, see the faucet +[instructions](https://wiki.polkadot.network/docs/learn-DOT#getting-westies) on the Wiki. + +## Hacking on Polkadot + +If you'd actually like to hack on Polkadot, you can grab the source code and build it. Ensure you have +Rust and the support software installed. This script will install or update Rust and install the +required dependencies (this may take up to 30 minutes on Mac machines): + +```bash +curl https://getsubstrate.io -sSf | bash -s -- --fast +``` + +Then, grab the Polkadot source code: + +```bash +git clone https://github.com/paritytech/polkadot.git +cd polkadot +``` + +Then build the code. You will need to build in release mode (`--release`) to start a network. Only +use debug mode for development (faster compile times for development and testing). + +```bash +./scripts/init.sh # Install WebAssembly. Update Rust +cargo build # Builds all native code +``` + +You can run the tests if you like: + +```bash +cargo test --workspace --release +``` + +You can start a development chain with: + +```bash +cargo build +cargo run -- --dev +``` + +Detailed logs may be shown by running the node with the following environment variables set: + +```bash +RUST_LOG=debug RUST_BACKTRACE=1 cargo run -- --dev +``` + +### Development + +You can run a simple single-node development "network" on your machine by running: + +```bash +polkadot --dev +``` + +You can muck around by heading to and choose "Local Node" from the +Settings menu. + +### Local Two-node Testnet + +If you want to see the multi-node consensus algorithm in action locally, then you can create a +local testnet. You'll need two terminals open. In one, run: + +```bash +polkadot --chain=polkadot-local --alice -d /tmp/alice +``` + +And in the other, run: + +```bash +polkadot --chain=polkadot-local --bob -d /tmp/bob --port 30334 --bootnodes '/ip4/127.0.0.1/tcp/30333/p2p/ALICE_BOOTNODE_ID_HERE' +``` + +Ensure you replace `ALICE_BOOTNODE_ID_HERE` with the node ID from the output of the first terminal. + +### Monitoring + +[Setup Prometheus and Grafana](https://wiki.polkadot.network/docs/maintain-guides-how-to-monitor-your-node). + +Once you set this up you can take a look at the [Polkadot Grafana dashboards](grafana/README.md) that we currently maintain. + +### Using Docker + +[Using Docker](doc/docker.md) + +### Shell Completion + +[Shell Completion](doc/shell-completion.md) + +## Contributing + +### Contributing Guidelines + +[Contribution Guidelines](CONTRIBUTING.md) + +### Contributor Code of Conduct + +[Code of Conduct](CODE_OF_CONDUCT.md) + +## License + +Polkadot is [GPL 3.0 licensed](LICENSE). diff --git a/substrate/README.md b/substrate/README.md index 59e0cff015d3..b6b5d0ccc9c4 100644 --- a/substrate/README.md +++ b/substrate/README.md @@ -1,13 +1,35 @@ -Dear contributors and users, +# Substrate · [![GitHub license](https://img.shields.io/badge/license-GPL3%2FApache2-blue)](#LICENSE) [![GitLab Status](https://gitlab.parity.io/parity/substrate/badges/master/pipeline.svg)](https://gitlab.parity.io/parity/substrate/pipelines) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](docs/CONTRIBUTING.md) [![Stack Exchange](https://img.shields.io/badge/Substrate-Community%20&%20Support-24CC85?logo=stackexchange)](https://substrate.stackexchange.com/) +

+ +

-We would like to inform you that we have recently made significant changes to our repository structure. In order to streamline our development process and foster better contributions, we have merged three separate repositories Cumulus, Substrate and Polkadot into a single new repository: [the Polkadot SDK](https://github.com/paritytech/polkadot-sdk). Go ahead and make sure to support us by giving a star ⭐️ to the new repo. +Substrate is a next-generation framework for blockchain innovation 🚀. -By consolidating our codebase, we aim to enhance collaboration and provide a more efficient platform for future development. +## Getting Started -If you currently have an open pull request in any of the merged repositories, we kindly request that you resubmit your PR in the new repository. This will ensure that your contributions are considered within the updated context and enable us to review and merge them more effectively. +Head to [docs.substrate.io](https://docs.substrate.io) and follow the [installation](https://docs.substrate.io/install/) instructions. +Then try out one of the [tutorials](https://docs.substrate.io/tutorials/). +Refer to the [Docker instructions](./docker/README.md) to quickly run Substrate, Substrate Node Template, Subkey, or to build a chain spec. -We appreciate your understanding and ongoing support throughout this transition. Should you have any questions or require further assistance, please don't hesitate to [reach out to us](https://forum.polkadot.network/t/psa-parity-is-currently-working-on-merging-the-polkadot-stack-repositories-into-one-single-repository/2883). +## Community & Support -Best Regards, +Join the highly active and supportive community on the [Substrate Stack Exchange](https://substrate.stackexchange.com/) to ask questions about use and problems you run into using this software. +Please do report bugs and [issues here](https://github.com/paritytech/substrate/issues) for anything you suspect requires action in the source. -Parity Technologies \ No newline at end of file +## Contributions & Code of Conduct + +Please follow the contributions guidelines as outlined in [`docs/CONTRIBUTING.md`](docs/CONTRIBUTING.md). +In all communications and contributions, this project follows the [Contributor Covenant Code of Conduct](docs/CODE_OF_CONDUCT.md). + +## Security + +The security policy and procedures can be found in [`docs/SECURITY.md`](docs/SECURITY.md). + +## License + +- Substrate Primitives (`sp-*`), Frame (`frame-*`) and the pallets (`pallets-*`), binaries (`/bin`) and all other utilities are licensed under [Apache 2.0](LICENSE-APACHE2). +- Substrate Client (`/client/*` / `sc-*`) is licensed under [GPL v3.0 with a classpath linking exception](LICENSE-GPL3). + +The reason for the split-licensing is to ensure that for the vast majority of teams using Substrate to create feature-chains, then all changes can be made entirely in Apache2-licensed code, allowing teams full freedom over what and how they release and giving licensing clarity to commercial teams. + +In the interests of the community, we require any deeper improvements made to Substrate's core logic (e.g. Substrate's internal consensus, crypto or database code) to be contributed back so everyone can benefit. From 321ca60d9c80b79fb7a5024b6607e6f439fed46f Mon Sep 17 00:00:00 2001 From: Joyce Siqueira <98593770+the-right-joyce@users.noreply.github.com> Date: Fri, 25 Aug 2023 21:30:20 +0200 Subject: [PATCH 02/14] temporary ReadMe for the Polkadot SDK --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 000000000000..65788b00b6a1 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +Welcome to our new repository! As long anticipated, we have finally merged all three repositories (Cumulus, Polkadot and Substrate) into a single unified entity, marking a significant milestone in our journey. + +To ensure a seamless transition to our new environment, we highly recommend taking a moment to explore our FAQ section. You can find comprehensive information about the merge [here](https://polkadot-public.notion.site/Polkadot-SDK-FAQ-fbc4cecc2c46443fb37b9eeec2f0d85f) + +Should you encounter technical queries concerning the migration, we encourage you to carefully review [our ongoing discussions](https://github.com/paritytech/polkadot-sdk/discussions/categories/migration-to-the-new-repository) and consider opening a new topic if your specific question hasn't been addressed yet. + +For inquiries of a different nature, be it organizational or philosophical, we invite you to engage in the [conversation on our forum](https://forum.polkadot.network/t/psa-parity-is-currently-working-on-merging-the-polkadot-stack-repositories-into-one-single-repository/2883). + +Thanks for your participation! Feel free to show your support for our project by giving this new repository a star ⭐️. Your active involvement matters as we embark on this exciting new phase together. \ No newline at end of file From 9d896191dcf455dd5cf49b444289e397cedc5fad Mon Sep 17 00:00:00 2001 From: Joyce Siqueira <98593770+the-right-joyce@users.noreply.github.com> Date: Sat, 26 Aug 2023 08:25:00 +0200 Subject: [PATCH 03/14] delete welcome readme --- README.md | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 README.md diff --git a/README.md b/README.md deleted file mode 100644 index 65788b00b6a1..000000000000 --- a/README.md +++ /dev/null @@ -1,9 +0,0 @@ -Welcome to our new repository! As long anticipated, we have finally merged all three repositories (Cumulus, Polkadot and Substrate) into a single unified entity, marking a significant milestone in our journey. - -To ensure a seamless transition to our new environment, we highly recommend taking a moment to explore our FAQ section. You can find comprehensive information about the merge [here](https://polkadot-public.notion.site/Polkadot-SDK-FAQ-fbc4cecc2c46443fb37b9eeec2f0d85f) - -Should you encounter technical queries concerning the migration, we encourage you to carefully review [our ongoing discussions](https://github.com/paritytech/polkadot-sdk/discussions/categories/migration-to-the-new-repository) and consider opening a new topic if your specific question hasn't been addressed yet. - -For inquiries of a different nature, be it organizational or philosophical, we invite you to engage in the [conversation on our forum](https://forum.polkadot.network/t/psa-parity-is-currently-working-on-merging-the-polkadot-stack-repositories-into-one-single-repository/2883). - -Thanks for your participation! Feel free to show your support for our project by giving this new repository a star ⭐️. Your active involvement matters as we embark on this exciting new phase together. \ No newline at end of file From 2a41607c4b92c37f83298e9d8fba87fde9ca53d8 Mon Sep 17 00:00:00 2001 From: Joyce Siqueira <98593770+the-right-joyce@users.noreply.github.com> Date: Mon, 28 Aug 2023 12:18:09 +0200 Subject: [PATCH 04/14] update links on substrate readme --- substrate/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/substrate/README.md b/substrate/README.md index b6b5d0ccc9c4..9564f91dbd60 100644 --- a/substrate/README.md +++ b/substrate/README.md @@ -14,16 +14,16 @@ Refer to the [Docker instructions](./docker/README.md) to quickly run Substrate, ## Community & Support Join the highly active and supportive community on the [Substrate Stack Exchange](https://substrate.stackexchange.com/) to ask questions about use and problems you run into using this software. -Please do report bugs and [issues here](https://github.com/paritytech/substrate/issues) for anything you suspect requires action in the source. +Please do report bugs and [issues here](https://github.com/paritytech/polkadot-sdk/issues) for anything you suspect requires action in the source. ## Contributions & Code of Conduct -Please follow the contributions guidelines as outlined in [`docs/CONTRIBUTING.md`](docs/CONTRIBUTING.md). -In all communications and contributions, this project follows the [Contributor Covenant Code of Conduct](docs/CODE_OF_CONDUCT.md). +Please follow the contributions guidelines as outlined in [`docs/CONTRIBUTING.md`](https://github.com/paritytech/polkadot-sdk/blob/master/docs/CONTRIBUTING.md). +In all communications and contributions, this project follows the [Contributor Covenant Code of Conduct](https://github.com/paritytech/polkadot-sdk/blob/master/docs/CODE_OF_CONDUCT.md). ## Security -The security policy and procedures can be found in [`docs/SECURITY.md`](docs/SECURITY.md). +The security policy and procedures can be found in [`docs/SECURITY.md`](https://github.com/paritytech/polkadot-sdk/blob/master/docs/SECURITY.md). ## License From 28f30d27f43da8221af9dc6b2fb30f80b7a1e3ab Mon Sep 17 00:00:00 2001 From: Joyce Siqueira <98593770+the-right-joyce@users.noreply.github.com> Date: Mon, 28 Aug 2023 12:23:06 +0200 Subject: [PATCH 05/14] update links on polkadot readme --- polkadot/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/polkadot/README.md b/polkadot/README.md index dcebcf727754..d5eb22fbd191 100644 --- a/polkadot/README.md +++ b/polkadot/README.md @@ -16,7 +16,7 @@ specific guides, like how to be a validator, see the If you just wish to run a Polkadot node without compiling it yourself, you may either run the latest binary from our -[releases](https://github.com/paritytech/polkadot/releases) page, or install +[releases](https://github.com/paritytech/polkadot-sdk/releases) page, or install Polkadot from one of our package repositories. Installation from the Debian repository will create a `systemd` @@ -58,7 +58,7 @@ below this section. If you want to install Polkadot in your PATH, you can do so with: ```bash -cargo install --git https://github.com/paritytech/polkadot --tag polkadot --locked +cargo install --git https://github.com/paritytech/polkadot-sdk --tag polkadot --locked ``` ### Build from Source @@ -176,7 +176,7 @@ curl https://getsubstrate.io -sSf | bash -s -- --fast Then, grab the Polkadot source code: ```bash -git clone https://github.com/paritytech/polkadot.git +git clone https://github.com/paritytech/polkadot-sdk.git cd polkadot ``` @@ -253,11 +253,11 @@ Once you set this up you can take a look at the [Polkadot Grafana dashboards](gr ### Contributing Guidelines -[Contribution Guidelines](CONTRIBUTING.md) +[Contribution Guidelines](https://github.com/paritytech/polkadot-sdk/blob/master/docs/CONTRIBUTING.md) ### Contributor Code of Conduct -[Code of Conduct](CODE_OF_CONDUCT.md) +[Code of Conduct](https://github.com/paritytech/polkadot-sdk/blob/master/docs/CODE_OF_CONDUCT.md) ## License From 04dc998f7e2372211c6c9d797e3a3890f5452523 Mon Sep 17 00:00:00 2001 From: Joyce Siqueira <98593770+the-right-joyce@users.noreply.github.com> Date: Mon, 28 Aug 2023 12:27:46 +0200 Subject: [PATCH 06/14] update links on cumulus readme --- cumulus/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cumulus/README.md b/cumulus/README.md index 4ceb9ff09107..a319ffe7aeb8 100644 --- a/cumulus/README.md +++ b/cumulus/README.md @@ -25,7 +25,7 @@ beautiful and functional. ### Consensus -[`parachain-consensus`](https://github.com/paritytech/cumulus/blob/master/client/consensus/common/src/parachain_consensus.rs) is a +[`parachain-consensus`](https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/client/consensus/common/src/parachain_consensus.rs) is a [consensus engine](https://docs.substrate.io/v3/advanced/consensus) for Substrate that follows a Polkadot [relay chain](https://wiki.polkadot.network/docs/en/learn-architecture#relay-chain). This will run @@ -145,8 +145,8 @@ zombienet --provider native spawn ./zombienet/examples/small_network.toml ```bash # Clone -git clone https://github.com/paritytech/polkadot -cd polkadot +git clone https://github.com/paritytech/polkadot-sdk +cd polkadot-sdk/polkadot # Compile Polkadot with the real overseer feature cargo build --release --bin polkadot @@ -165,8 +165,8 @@ cargo build --release --bin polkadot ```bash # Clone -git clone https://github.com/paritytech/cumulus -cd cumulus +git clone https://github.com/paritytech/polkadot-sdk +cd polkadot-sdk/cumulus # Compile cargo build --release --bin polkadot-parachain From cdb1e3045c52b0a20cf5fb2ba9af8f40fc8cba45 Mon Sep 17 00:00:00 2001 From: Joyce Siqueira <98593770+the-right-joyce@users.noreply.github.com> Date: Mon, 28 Aug 2023 13:56:02 +0200 Subject: [PATCH 07/14] update overseer feature comment Co-authored-by: Liam Aharon --- cumulus/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cumulus/README.md b/cumulus/README.md index a319ffe7aeb8..cc0eb166e477 100644 --- a/cumulus/README.md +++ b/cumulus/README.md @@ -148,7 +148,7 @@ zombienet --provider native spawn ./zombienet/examples/small_network.toml git clone https://github.com/paritytech/polkadot-sdk cd polkadot-sdk/polkadot -# Compile Polkadot with the real overseer feature +# Compile Polkadot cargo build --release --bin polkadot # Generate a raw chain spec From aa06f27036ab0dbe91460a4736799dd3e1c80f8f Mon Sep 17 00:00:00 2001 From: Joyce Siqueira <98593770+the-right-joyce@users.noreply.github.com> Date: Mon, 28 Aug 2023 13:56:10 +0200 Subject: [PATCH 08/14] Update cumulus/README.md Co-authored-by: Liam Aharon --- cumulus/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/cumulus/README.md b/cumulus/README.md index cc0eb166e477..11210a5fcadc 100644 --- a/cumulus/README.md +++ b/cumulus/README.md @@ -146,7 +146,6 @@ zombienet --provider native spawn ./zombienet/examples/small_network.toml ```bash # Clone git clone https://github.com/paritytech/polkadot-sdk -cd polkadot-sdk/polkadot # Compile Polkadot cargo build --release --bin polkadot From 418d584355324c473be63673b6f290ce62c16bcf Mon Sep 17 00:00:00 2001 From: Joyce Siqueira <98593770+the-right-joyce@users.noreply.github.com> Date: Mon, 28 Aug 2023 13:56:16 +0200 Subject: [PATCH 09/14] Update cumulus/README.md Co-authored-by: Liam Aharon --- cumulus/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/cumulus/README.md b/cumulus/README.md index 11210a5fcadc..160860e5bac5 100644 --- a/cumulus/README.md +++ b/cumulus/README.md @@ -165,7 +165,6 @@ cargo build --release --bin polkadot ```bash # Clone git clone https://github.com/paritytech/polkadot-sdk -cd polkadot-sdk/cumulus # Compile cargo build --release --bin polkadot-parachain From ba760538eb565f2a0807c0a278e949abbf565074 Mon Sep 17 00:00:00 2001 From: Joyce Siqueira <98593770+the-right-joyce@users.noreply.github.com> Date: Mon, 28 Aug 2023 13:56:21 +0200 Subject: [PATCH 10/14] Update polkadot/README.md Co-authored-by: Liam Aharon --- polkadot/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/polkadot/README.md b/polkadot/README.md index d5eb22fbd191..61a393ac35b6 100644 --- a/polkadot/README.md +++ b/polkadot/README.md @@ -197,8 +197,7 @@ cargo test --workspace --release You can start a development chain with: ```bash -cargo build -cargo run -- --dev +cargo run --bin polkadot -- --dev ``` Detailed logs may be shown by running the node with the following environment variables set: From 094f36e82b7659c07b5600f57d4350df77ddb707 Mon Sep 17 00:00:00 2001 From: Joyce Siqueira <98593770+the-right-joyce@users.noreply.github.com> Date: Mon, 28 Aug 2023 13:56:30 +0200 Subject: [PATCH 11/14] Update polkadot/README.md Co-authored-by: Liam Aharon --- polkadot/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polkadot/README.md b/polkadot/README.md index 61a393ac35b6..cf029fe20ad8 100644 --- a/polkadot/README.md +++ b/polkadot/README.md @@ -203,7 +203,7 @@ cargo run --bin polkadot -- --dev Detailed logs may be shown by running the node with the following environment variables set: ```bash -RUST_LOG=debug RUST_BACKTRACE=1 cargo run -- --dev +RUST_LOG=debug RUST_BACKTRACE=1 cargo run --bin polkadot -- --dev ``` ### Development From f14dafbe8b1c20dd87551b36668266830cf3c36d Mon Sep 17 00:00:00 2001 From: Joyce Siqueira <98593770+the-right-joyce@users.noreply.github.com> Date: Mon, 28 Aug 2023 13:56:40 +0200 Subject: [PATCH 12/14] Update polkadot/README.md Co-authored-by: Liam Aharon --- polkadot/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polkadot/README.md b/polkadot/README.md index cf029fe20ad8..e2e2058f179f 100644 --- a/polkadot/README.md +++ b/polkadot/README.md @@ -211,7 +211,7 @@ RUST_LOG=debug RUST_BACKTRACE=1 cargo run --bin polkadot -- --dev You can run a simple single-node development "network" on your machine by running: ```bash -polkadot --dev +cargo run --bin polkadot --release -- --dev ``` You can muck around by heading to and choose "Local Node" from the From a9943feaf2e94eef6833323bd1010ddfad2a1d1f Mon Sep 17 00:00:00 2001 From: Joyce Siqueira <98593770+the-right-joyce@users.noreply.github.com> Date: Mon, 28 Aug 2023 13:57:28 +0200 Subject: [PATCH 13/14] update gitlab links Co-authored-by: Liam Aharon --- substrate/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substrate/README.md b/substrate/README.md index 9564f91dbd60..3f3ee359497c 100644 --- a/substrate/README.md +++ b/substrate/README.md @@ -1,4 +1,4 @@ -# Substrate · [![GitHub license](https://img.shields.io/badge/license-GPL3%2FApache2-blue)](#LICENSE) [![GitLab Status](https://gitlab.parity.io/parity/substrate/badges/master/pipeline.svg)](https://gitlab.parity.io/parity/substrate/pipelines) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](docs/CONTRIBUTING.md) [![Stack Exchange](https://img.shields.io/badge/Substrate-Community%20&%20Support-24CC85?logo=stackexchange)](https://substrate.stackexchange.com/) +# Substrate · [![GitHub license](https://img.shields.io/badge/license-GPL3%2FApache2-blue)](#LICENSE) [![GitLab Status](https://gitlab.parity.io/parity/mirrors/polkadot-sdk/badges/master/pipeline.svg)](https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](docs/CONTRIBUTING.md) [![Stack Exchange](https://img.shields.io/badge/Substrate-Community%20&%20Support-24CC85?logo=stackexchange)](https://substrate.stackexchange.com/)

From 47c0058167b65e0c54789ece7f8c83c8acdd7adb Mon Sep 17 00:00:00 2001 From: Joyce Siqueira <98593770+the-right-joyce@users.noreply.github.com> Date: Tue, 29 Aug 2023 11:45:07 +0200 Subject: [PATCH 14/14] terminal friendly convention --- cumulus/README.md | 111 +++++++++++++++++++++++--------------------- polkadot/README.md | 70 ++++++++++++++-------------- substrate/README.md | 31 ++++++++----- 3 files changed, 114 insertions(+), 98 deletions(-) diff --git a/cumulus/README.md b/cumulus/README.md index 160860e5bac5..419e293a0abd 100644 --- a/cumulus/README.md +++ b/cumulus/README.md @@ -2,18 +2,19 @@ [![Doc](https://img.shields.io/badge/cumulus%20docs-master-brightgreen)](https://paritytech.github.io/cumulus/) -This repository contains both the Cumulus SDK and also specific chains implemented -on top of this SDK. +This repository contains both the Cumulus SDK and also specific chains implemented on top of this +SDK. -If you only want to run a **Polkadot Parachain Node**, check out our [container section](./docs/container.md). +If you only want to run a **Polkadot Parachain Node**, check out our [container +section](./docs/container.md). ## Cumulus SDK A set of tools for writing [Substrate](https://substrate.io/)-based [Polkadot](https://wiki.polkadot.network/en/) [parachains](https://wiki.polkadot.network/docs/en/learn-parachains). Refer to the included -[overview](docs/overview.md) for architectural details, and the -[Connect to a relay chain how-to guide](https://docs.substrate.io/reference/how-to-guides/parachains/connect-to-a-relay-chain/) for a +[overview](docs/overview.md) for architectural details, and the [Connect to a relay chain how-to +guide](https://docs.substrate.io/reference/how-to-guides/parachains/connect-to-a-relay-chain/) for a guided walk-through of using these tools. It's easy to write blockchains using Substrate, and the overhead of writing parachains' @@ -25,12 +26,11 @@ beautiful and functional. ### Consensus -[`parachain-consensus`](https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/client/consensus/common/src/parachain_consensus.rs) is a -[consensus engine](https://docs.substrate.io/v3/advanced/consensus) for Substrate -that follows a Polkadot -[relay chain](https://wiki.polkadot.network/docs/en/learn-architecture#relay-chain). This will run -a Polkadot node internally, and dictate to the client and synchronization algorithms which chain -to follow, +[`parachain-consensus`](https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/client/consensus/common/src/parachain_consensus.rs) +is a [consensus engine](https://docs.substrate.io/v3/advanced/consensus) for Substrate that follows +a Polkadot [relay chain](https://wiki.polkadot.network/docs/en/learn-architecture#relay-chain). This +will run a Polkadot node internally, and dictate to the client and synchronization algorithms which +chain to follow, [finalize](https://wiki.polkadot.network/docs/en/learn-consensus#probabilistic-vs-provable-finality), and treat as best. @@ -39,13 +39,14 @@ and treat as best. A Polkadot [collator](https://wiki.polkadot.network/docs/en/learn-collator) for the parachain is implemented by the `polkadot-parachain` binary (previously called `polkadot-collator`). -You may run `polkadot-parachain` locally after building it or using one of the container option described [here](./docs/container.md). +You may run `polkadot-parachain` locally after building it or using one of the container option +described [here](./docs/container.md). -### Relay Chain Interaction -To operate a parachain node, a connection to the corresponding relay chain is necessary. This can be -achieved in one of three ways: -1. Run a full relay chain node within the parachain node (default) -2. Connect to an external relay chain node via WebSocket RPC +### Relay Chain Interaction +To operate a parachain node, a connection to the corresponding relay +chain is necessary. This can be achieved in one of three ways: +1. Run a full relay chain node within the parachain node (default) +2. Connect to an external relay chain node via WebSocket RPC 3. Run a light client for the relay chain #### In-process Relay Chain Node @@ -65,18 +66,22 @@ polkadot-parachain \ ``` #### External Relay Chain Node -An external relay chain node is connected via WebsSocket RPC by using the `--relay-chain-rpc-urls` -command line argument. This option accepts one or more space-separated WebSocket URLs to a full relay -chain node. By default, only the first URL will be used, with the rest as a backup in case the -connection to the first node is lost. +An external relay chain node is connected via WebsSocket RPC by using the +`--relay-chain-rpc-urls` command line argument. This option accepts one or more +space-separated WebSocket URLs to a full relay chain node. By default, only the +first URL will be used, with the rest as a backup in case the connection to the +first node is lost. -Parachain nodes using this feature won't have to fully sync with the relay chain to work, so in general -they will use fewer system resources. +Parachain nodes using this feature won't have to fully sync with the relay chain +to work, so in general they will use fewer system resources. + +**Note:** At this time, any parachain nodes using this feature will still spawn a +significantly cut-down relay chain node in-process. Even though they lack the +majority of normal Polkadot subsystems, they will still need to connect directly +to the relay chain network. -**Note:** At this time, any parachain nodes using this feature will still spawn a significantly cut-down -relay chain node in-process. Even though they lack the majority of normal Polkadot subsystems, they -will still need to connect directly to the relay chain network. ##### Example command + ```bash polkadot-parachain \ --chain parachain-chainspec.json \ @@ -89,14 +94,18 @@ polkadot-parachain \ ``` #### Relay Chain Light Client -An internal relay chain light client provides a fast and lightweight approach for connecting to the relay chain network. -It provides relay chain notifications and facilitates runtime calls. +An internal relay chain light client provides a fast and lightweight approach +for connecting to the relay chain network. It provides relay chain notifications +and facilitates runtime calls. -To specify which chain the light client should connect to, users need to supply a relay chain chain-spec as part of the relay chain arguments. +To specify which chain the light client should connect to, users need to supply +a relay chain chain-spec as part of the relay chain arguments. + +**Note:** At this time, any parachain nodes using this feature will still spawn +a significantly cut-down relay chain node in-process. Even though they lack the +majority of normal Polkadot subsystems, they will still need to connect directly +to the relay chain network. -**Note:** At this time, any parachain nodes using this feature will still spawn a significantly cut-down -relay chain node in-process. Even though they lack the majority of normal Polkadot subsystems, they -will still need to connect directly to the relay chain network. ##### Example command ```bash @@ -109,18 +118,17 @@ polkadot-parachain \ ``` ## Installation and Setup -Before building Cumulus SDK based nodes / runtimes prepare your environment by following Substrate -[installation instructions](https://docs.substrate.io/main-docs/install/). +Before building Cumulus SDK based nodes / runtimes prepare your environment by +following Substrate [installation instructions](https://docs.substrate.io/main-docs/install/). -To launch a local network, you can use [zombienet](https://github.com/paritytech/zombienet) for -quick setup and experimentation or follow the [manual setup](#manual-setup). +To launch a local network, you can use [zombienet](https://github.com/paritytech/zombienet) +for quick setup and experimentation or follow the [manual setup](#manual-setup). ### Zombienet We use Zombienet to spin up networks for integration tests and local networks. Follow [these installation steps](https://github.com/paritytech/zombienet#requirements-by-provider) -to set it up on your machine. A simple network specification with two relay chain nodes and one collator is -located at [zombienet/examples/small_network.toml](zombienet/examples/small_network.toml). - +to set it up on your machine. A simple network specification with two relay chain +nodes and one collator is located at [zombienet/examples/small_network.toml](zombienet/examples/small_network.toml). #### Which provider should I use? Zombienet offers multiple providers to run networks. Choose the one that best fits your needs: @@ -131,7 +139,6 @@ of the binaries. #### How to run To run the example network, use the following commands: - ```bash # Podman provider zombienet --provider podman spawn ./zombienet/examples/small_network.toml @@ -192,8 +199,8 @@ cargo build --release --bin polkadot-parachain ## Asset Hub 🪙 -This repository also contains the Asset Hub runtimes. Asset Hub is a system parachain providing an -asset store for the Polkadot ecosystem. +This repository also contains the Asset Hub runtimes. Asset Hub is a system parachain +providing an asset store for the Polkadot ecosystem. ### Build & Launch a Node @@ -221,24 +228,24 @@ See [the `contracts-rococo` readme](parachains/runtimes/contracts/contracts-roco See [the `bridge-hubs` readme](parachains/runtimes/bridge-hubs/README.md) for details. ## Rococo 👑 - [Rococo](https://polkadot.js.org/apps/?rpc=wss://rococo-rpc.polkadot.io) is becoming a [Community Parachain Testbed](https://polkadot.network/blog/rococo-revamp-becoming-a-community-parachain-testbed/) for parachain teams in the Polkadot ecosystem. It supports multiple parachains with the -differentiation of long-term connections and recurring short-term connections, to see which -parachains are currently connected and how long they will be connected for +differentiation of long-term connections and recurring short-term connections, to see +which parachains are currently connected and how long they will be connected for [see here](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/parachains). -Rococo is an elaborate style of design and the name describes the painstaking effort that has gone -into this project. +Rococo is an elaborate style of design and the name describes the painstaking effort that +has gone into this project. ### Build & Launch Rococo Collators -Collators are similar to validators in the relay chain. These nodes build the blocks that will -eventually be included by the relay chain for a parachain. +Collators are similar to validators in the relay chain. These nodes build the blocks that +will eventually be included by the relay chain for a parachain. To run a Rococo collator you will need to compile the following binary: + ```bash cargo build --release --locked --bin polkadot-parachain ``` @@ -258,6 +265,6 @@ You can also build [using a container](./docs/container.md). * [Contracts on Rococo](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-contracts-rpc.polkadot.io#/explorer) * [RILT](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo.kilt.io#/explorer) -The network uses horizontal message passing (HRMP) to enable communication between parachains and -the relay chain and, in turn, between parachains. This means that every message is sent to the relay -chain, and from the relay chain to its destination parachain. +The network uses horizontal message passing (HRMP) to enable communication between +parachains and the relay chain and, in turn, between parachains. This means that every +message is sent to the relay chain, and from the relay chain to its destination parachain. diff --git a/polkadot/README.md b/polkadot/README.md index e2e2058f179f..8f0809c9fc7a 100644 --- a/polkadot/README.md +++ b/polkadot/README.md @@ -2,36 +2,33 @@ Implementation of a node in Rust based on the Substrate framework. -> **NOTE:** In 2018, we split our implementation of "Polkadot" from its development framework -> "Substrate". See the [Substrate][substrate-repo] repo for git history prior to 2018. +> **NOTE:** In 2018, we split our implementation of "Polkadot" from its development framework > +"Substrate". See the [Substrate][substrate-repo] repo for git history prior to 2018. [substrate-repo]: https://github.com/paritytech/substrate This repo contains runtimes for the Polkadot, Kusama, and Westend networks. The README provides -information about installing the `polkadot` binary and developing on the codebase. For more -specific guides, like how to be a validator, see the -[Polkadot Wiki](https://wiki.polkadot.network/docs/getting-started). +information about installing the `polkadot` binary and developing on the codebase. For more specific +guides, like how to be a validator, see the [Polkadot +Wiki](https://wiki.polkadot.network/docs/getting-started). ## Installation -If you just wish to run a Polkadot node without compiling it yourself, you may -either run the latest binary from our -[releases](https://github.com/paritytech/polkadot-sdk/releases) page, or install +If you just wish to run a Polkadot node without compiling it yourself, you may either run the latest +binary from our [releases](https://github.com/paritytech/polkadot-sdk/releases) page, or install Polkadot from one of our package repositories. -Installation from the Debian repository will create a `systemd` -service that can be used to run a Polkadot node. This is disabled by default, -and can be started by running `systemctl start polkadot` on demand (use -`systemctl enable polkadot` to make it auto-start after reboot). By default, it -will run as the `polkadot` user. Command-line flags passed to the binary can -be customized by editing `/etc/default/polkadot`. This file will not be -overwritten on updating polkadot. You may also just run the node directly from -the command-line. +Installation from the Debian repository will create a `systemd` service that can be used to run a +Polkadot node. This is disabled by default, and can be started by running `systemctl start polkadot` +on demand (use `systemctl enable polkadot` to make it auto-start after reboot). By default, it will +run as the `polkadot` user. Command-line flags passed to the binary can be customized by editing +`/etc/default/polkadot`. This file will not be overwritten on updating polkadot. You may also just +run the node directly from the command-line. ### Debian-based (Debian, Ubuntu) -Currently supports Debian 10 (Buster) and Ubuntu 20.04 (Focal), and -derivatives. Run the following commands as the `root` user. +Currently supports Debian 10 (Buster) and Ubuntu 20.04 (Focal), and derivatives. Run the following +commands as the `root` user. ```bash # Import the security@parity.io GPG key @@ -52,8 +49,8 @@ apt install polkadot ### Install via Cargo -Make sure you have the support software installed from the **Build from Source** section -below this section. +Make sure you have the support software installed from the **Build from Source** section below this +section. If you want to install Polkadot in your PATH, you can do so with: @@ -63,8 +60,8 @@ cargo install --git https://github.com/paritytech/polkadot-sdk --tag p ### Build from Source -If you'd like to build from source, first install Rust. You may need to add Cargo's bin directory -to your PATH environment variable. Restarting your computer will do this for you automatically. +If you'd like to build from source, first install Rust. You may need to add Cargo's bin directory to +your PATH environment variable. Restarting your computer will do this for you automatically. ```bash curl https://sh.rustup.rs -sSf | sh @@ -91,9 +88,12 @@ git checkout cargo build --release ``` -**Note:** compilation is a memory intensive process. We recommend having 4 GiB of physical RAM or swap available (keep in mind that if a build hits swap it tends to be very slow). +**Note:** compilation is a memory intensive process. We recommend having 4 GiB of physical RAM or +swap available (keep in mind that if a build hits swap it tends to be very slow). -**Note:** if you want to move the built `polkadot` binary somewhere (e.g. into $PATH) you will also need to move `polkadot-execute-worker` and `polkadot-prepare-worker`. You can let cargo do all this for you by running: +**Note:** if you want to move the built `polkadot` binary somewhere (e.g. into $PATH) you will also +need to move `polkadot-execute-worker` and `polkadot-prepare-worker`. You can let cargo do all this +for you by running: ```sh cargo install --path . --locked @@ -101,8 +101,7 @@ cargo install --path . --locked #### Build from Source with Docker -You can also build from source using -[Parity CI docker image](https://github.com/paritytech/scripts/tree/master/dockerfiles/ci-linux): +You can also build from source using [Parity CI docker image](https://github.com/paritytech/scripts/tree/master/dockerfiles/ci-linux): ```bash git checkout @@ -112,7 +111,7 @@ docker run --rm -it -w /shellhere/polkadot \ sudo chown -R $(id -u):$(id -g) target/ ``` -If you want to reproduce other steps of CI process you can use the following +If you want to reproduce other steps of CI process you can use the following [guide](https://github.com/paritytech/scripts#gitlab-ci-for-building-docker-images). ## Networks @@ -158,16 +157,16 @@ You can see your node on [telemetry] (set a custom name with `--name "my custom ### Obtaining DOTs If you want to do anything on Polkadot, Kusama, or Westend, then you'll need to get an account and -some DOT, KSM, or WND tokens, respectively. See the -[claims instructions](https://claims.polkadot.network/) for Polkadot if you have DOTs to claim. For +some DOT, KSM, or WND tokens, respectively. See the [claims +instructions](https://claims.polkadot.network/) for Polkadot if you have DOTs to claim. For Westend's WND tokens, see the faucet [instructions](https://wiki.polkadot.network/docs/learn-DOT#getting-westies) on the Wiki. ## Hacking on Polkadot -If you'd actually like to hack on Polkadot, you can grab the source code and build it. Ensure you have -Rust and the support software installed. This script will install or update Rust and install the -required dependencies (this may take up to 30 minutes on Mac machines): +If you'd actually like to hack on Polkadot, you can grab the source code and build it. Ensure you +have Rust and the support software installed. This script will install or update Rust and install +the required dependencies (this may take up to 30 minutes on Mac machines): ```bash curl https://getsubstrate.io -sSf | bash -s -- --fast @@ -219,8 +218,8 @@ Settings menu. ### Local Two-node Testnet -If you want to see the multi-node consensus algorithm in action locally, then you can create a -local testnet. You'll need two terminals open. In one, run: +If you want to see the multi-node consensus algorithm in action locally, then you can create a local +testnet. You'll need two terminals open. In one, run: ```bash polkadot --chain=polkadot-local --alice -d /tmp/alice @@ -238,7 +237,8 @@ Ensure you replace `ALICE_BOOTNODE_ID_HERE` with the node ID from the output of [Setup Prometheus and Grafana](https://wiki.polkadot.network/docs/maintain-guides-how-to-monitor-your-node). -Once you set this up you can take a look at the [Polkadot Grafana dashboards](grafana/README.md) that we currently maintain. +Once you set this up you can take a look at the [Polkadot Grafana dashboards](grafana/README.md) +that we currently maintain. ### Using Docker diff --git a/substrate/README.md b/substrate/README.md index 3f3ee359497c..6ed64ac82eed 100644 --- a/substrate/README.md +++ b/substrate/README.md @@ -7,29 +7,38 @@ Substrate is a next-generation framework for blockchain innovation 🚀. ## Getting Started -Head to [docs.substrate.io](https://docs.substrate.io) and follow the [installation](https://docs.substrate.io/install/) instructions. -Then try out one of the [tutorials](https://docs.substrate.io/tutorials/). -Refer to the [Docker instructions](./docker/README.md) to quickly run Substrate, Substrate Node Template, Subkey, or to build a chain spec. +Head to [docs.substrate.io](https://docs.substrate.io) and follow the +[installation](https://docs.substrate.io/install/) instructions. Then try out one of the +[tutorials](https://docs.substrate.io/tutorials/). Refer to the [Docker instructions](./docker/README.md) to quickly run Substrate, Substrate Node Template, Subkey, or to build a chain spec. ## Community & Support -Join the highly active and supportive community on the [Substrate Stack Exchange](https://substrate.stackexchange.com/) to ask questions about use and problems you run into using this software. -Please do report bugs and [issues here](https://github.com/paritytech/polkadot-sdk/issues) for anything you suspect requires action in the source. +Join the highly active and supportive community on the +[Substrate Stack Exchange](https://substrate.stackexchange.com/) to ask questions about use and problems you run into using this software. +Please do report bugs and [issues here](https://github.com/paritytech/polkadot-sdk/issues) for anything you suspect requires action in the source. ## Contributions & Code of Conduct -Please follow the contributions guidelines as outlined in [`docs/CONTRIBUTING.md`](https://github.com/paritytech/polkadot-sdk/blob/master/docs/CONTRIBUTING.md). +Please follow the contributions guidelines as outlined in +[`docs/CONTRIBUTING.md`](https://github.com/paritytech/polkadot-sdk/blob/master/docs/CONTRIBUTING.md). In all communications and contributions, this project follows the [Contributor Covenant Code of Conduct](https://github.com/paritytech/polkadot-sdk/blob/master/docs/CODE_OF_CONDUCT.md). ## Security -The security policy and procedures can be found in [`docs/SECURITY.md`](https://github.com/paritytech/polkadot-sdk/blob/master/docs/SECURITY.md). +The security policy and procedures can be found in +[`docs/SECURITY.md`](https://github.com/paritytech/polkadot-sdk/blob/master/docs/SECURITY.md). ## License -- Substrate Primitives (`sp-*`), Frame (`frame-*`) and the pallets (`pallets-*`), binaries (`/bin`) and all other utilities are licensed under [Apache 2.0](LICENSE-APACHE2). -- Substrate Client (`/client/*` / `sc-*`) is licensed under [GPL v3.0 with a classpath linking exception](LICENSE-GPL3). +- Substrate Primitives (`sp-*`), Frame (`frame-*`) and the pallets (`pallets-*`), binaries (`/bin`) +and all other utilities are licensed under [Apache 2.0](LICENSE-APACHE2). - Substrate Client +(`/client/*` / `sc-*`) is licensed under [GPL v3.0 with a classpath linking +exception](LICENSE-GPL3). -The reason for the split-licensing is to ensure that for the vast majority of teams using Substrate to create feature-chains, then all changes can be made entirely in Apache2-licensed code, allowing teams full freedom over what and how they release and giving licensing clarity to commercial teams. +The reason for the split-licensing is to ensure that for the vast majority of teams using Substrate +to create feature-chains, then all changes can be made entirely in Apache2-licensed code, allowing +teams full freedom over what and how they release and giving licensing clarity to commercial teams. -In the interests of the community, we require any deeper improvements made to Substrate's core logic (e.g. Substrate's internal consensus, crypto or database code) to be contributed back so everyone can benefit. +In the interests of the community, we require any deeper improvements made to Substrate's core logic +(e.g. Substrate's internal consensus, crypto or database code) to be contributed back so everyone +can benefit.