Set up a Full Node · Polkadot Wiki (2024)

If you're building dApps or products on a Substrate-based chain like Polkadot, Kusama, or a customSubstrate implementation, you want the ability to run a node-as-a-back-end. After all, relying onyour infrastructure is always better than a third-party-hosted one in this brave new decentralizedworld.

This guide will show you how to connect to Polkadot network, but thesame process applies to any other Substrate-based chain. First, let'sclarify the term full node.

Types of Nodes

A blockchain's growth comes from a genesis block, extrinsics, and events.

When a validator seals block 1, it takes the blockchain's state at block 0. It then applies allpending changes on top of it and emits the events resulting from these changes. Later, the chain’sstate at block one is used the same way to build the chain’s state at block 2, and so on. Oncetwo-thirds of the validators agree on a specific block being valid, it is finalized.

An archive node keeps all the past blocks and their states. An archive node makes it convenientto query the past state of the chain at any point in time. Finding out what an account's balance ata particular block was or which extrinsics resulted in a specific state change are fast operationswhen using an archive node. However, an archive node takes up a lot of disk space - around Kusama's12 millionth block, this was around 660 GB.

tip

On the Paranodes or Stakeworldwebsites, you can find lists of the database sizes of Polkadot and Kusama nodes.

Archive nodes are used by utilities that need past information - like block explorers, councilscanners, discussion platforms like Polkassembly, and others. They needto be able to look at past on-chain data.

A full node prunes historical states: all finalized blocks' states older than a configurablenumber except the genesis block's state. This is 256 blocks from the last finalized one by default.A pruned node this way requires much less space than an archive node.

A full node could eventually rebuild every block's state without additional information and becomean archive node. This still needs to be implemented at the time of writing. If you need to queryhistorical blocks' states past what you pruned, you must purge your database and resync your node,starting in archive mode. Alternatively, you can use a backup or snapshot of a trusted source toavoid needing to sync from genesis with the network and only need the states of blocks past thatsnapshot.

Full nodes allow you to read the current state of the chain and to submit and validate extrinsicsdirectly on the network without relying on a centralized infrastructure provider.

Another type of node is a light node. A light node has only the runtime and the current statebut does not store past blocks and so cannot read historical data without requesting it from a nodethat has it. Light nodes are useful for resource-restricted devices. An interesting use-case oflight nodes is a browser extension, which is a node in its own right, running the runtime in WASMformat, as well as a full or light node that is completely encapsulated in WASM and can beintegrated into web apps: https://github.com/paritytech/smoldot#wasm-light-node.

Substrate Connect

Substrate Connect provides a way to interact withsubstrate-based blockchains in the browser without using an RPC server. It is a light node that runsentirely in Javascript. Substrate Connect uses asmoldot WASM light client to securely connect to theblockchain network without relying on specific 3rd parties. Substrate Connect is available on Chromeand Firefox as a browser extension.

Setup Instructions

This is not recommended if you're a validator. Please see thesecure validator setup if you are running validator.

default chain

Use the --chain flag if you follow the setup instructions to setup a Kusama node. For example:

./target/release/polkadot --name "Your Node's Name" --chain kusama
  • macOS
  • Windows
  • Linux (standalone)
  • Linux (package)
  • Install Homebrew within the terminal by running:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  • Then, run:

    brew install openssl cmake llvm protobuf
  • Install Rust by running:

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  • After Rust is installed, update and add the nightly version:

    # Ensure the current shell has cargo
    source ~/.cargo/env

    # Update the Rust toolchain
    rustup default stable
    rustup update

    # Add the nightly and WebAssembly targets:
    rustup update nightly
    rustup target add wasm32-unknown-unknown --toolchain nightly
  • Verify your installation by running the following:

    rustup show

    # You should see output similar to:

    active toolchain
    ----------------

    stable-aarch64-apple-darwin (default)
    rustc 1.68.1 (8460ca823 2023-03-20)
    rustup +nightly show

    # You should see output similar to:

    installed targets for active toolchain
    --------------------------------------

    aarch64-apple-darwin
    wasm32-unknown-unknown

    active toolchain
    ----------------

    nightly-aarch64-apple-darwin (overridden by +toolchain on the command line)
    rustc 1.71.0-nightly (9ecda8de8 2023-04-30)
  • Once Rust is configured, run the following command to clone and build the Polkadot code:

    git clone https://github.com/paritytech/polkadot-sdk polkadot-sdk
    cd polkadot-sdk
    ./scripts/init.sh
    cargo build --release
  • Start your node:

    ./target/release/polkadot --name "Your Node's Name"
  • Find your node on Telemetry

Get Substrate

Follow instructions as outlined here - note that Windowsusers will have their work cut out for them. It's better to use a virtual machine instead.

Test if the installation was successful by running cargo --version.

λ cargo --version
cargo 1.41.0 (626f0f40e 2019-12-03)

Clone and Build

The paritytech/polkadot repo'smaster branch contains the latest Polkadot code.

git clone https://github.com/paritytech/polkadot-sdk polkadot-sdk
cd polkadot-sdk
./scripts/init.sh
cargo build --release

Alternatively, if you wish to use a specific release, you can check out a specific tag (v0.8.3 inthe example below):

git clone https://github.com/paritytech/polkadot-sdk polkadot-sdk
cd polkadot-sdk
git checkout tags/polkadot-v1.9.0
./scripts/init.sh
cargo build --release

Run

The built binary will be in the target/release folder, called polkadot.

Polkadot:

./target/release/polkadot --name "Your Node's Name"

Use the --help flag to determine which flags you can use when running the node. For example, ifconnecting to your node remotely, you'll probably want to use --rpc-externaland --rpc-cors all.

The syncing process will take a while, depending on your capacity, processing power, disk speed andRAM. On a \$10 DigitalOcean droplet, the process can complete in some 36 hours.

Congratulations, you're now syncing with Polkadot. Keep in mind that the process is identical whenusing any other Substrate chain.

Running an Archive Node

When running as a simple sync node (above), only the state of the past 256 blocks will be kept. Itdefaults to archive mode when validating. To support the full state, use the--pruning flag:

Polkadot:

./target/release/polkadot --name "My node's name" --pruning archive

It is possible to almost quadruple synchronization speed by using an additional flag:--wasm-execution Compiled. Note that this uses much more CPU and RAM, so it should be turned offafter the node syncs.

Using Docker

Finally, you can use Docker to run your node in a container. Doing this is more advanced, so it'sbest left up to those already familiar with docker or who have completed the other set-upinstructions in this guide. Be aware that when you run polkadot in docker, the process only listenson localhost by default. If you would like to connect to your node's services (rpc, and prometheus)you need to ensure that you run you node with the --rpc-external, and --prometheus-externalcommands.

docker run -p 9944:9944 -p 9615:9615 parity/polkadot:v0.9.13 --name "calling_home_from_a_docker_container" --rpc-external --prometheus-external
Set up a Full Node · Polkadot Wiki (2024)

FAQs

How to set up a Polkadot node? ›

  1. Install WSL.
  2. Install Ubuntu (same webpage).
  3. Determine the latest version of the Polkadot binary.
  4. Then, run the following: sudo chmod +x polkadot.
  5. Start your node: ./polkadot --name "Your Node's Name"
  6. Find your node on Telemetry.
Apr 8, 2024

What is the minimum requirement for substrate node? ›

Substrate can almost only utilize one core. So we give it two cores just leave a little room for redundancy. 4 Gb is nearly the minimum ram requirement for one clients. For smaller testnet, 2 Gb could be sufficient, but for larger chains like Kusama, 4 Gb is required.

What is grandpa in Polkadot? ›

GRANDPA (GHOST-based Recursive ANcestor Deriving Prefix Agreement) is the finality gadget that is implemented for the Polkadot Relay Chain. The Polkadot Host uses the GRANDPA Finality protocol to finalize blocks. Finality is obtained by consecutive rounds of voting by the validator nodes.

What language is Polkadot written in? ›

Polkadot smart contracts are self-executing contracts with predetermined rules and conditions. These contracts are typically written in the Rust programming language using the Substrate framework, purpose-built for developing parachains and custom blockchains within the Polkadot ecosystem.

How much can you make staking polkadots? ›

This means that, on average, stakers of Polkadot are earning about 9.27% if they hold an asset for 365 days. 24 hours ago the reward rate for Polkadot was 9.27%. 30 days ago, the reward rate for Polkadot was 9.44%. Today, the staking ratio, or the percentage of eligible tokens currently being staked, is 54.26%.

What do you need to run a node? ›

Running a node with hardware involves using a dedicated computer or server to host the node. The hardware requirements, more often, depend on the network and the size of the blockchain. It requires sufficient processing power, memory, and storage to store and validate the network's data.

What are node requirements? ›

Full Node Requirements ​
  • A stable Internet connection. The longer you stay online, the better your rewards. ...
  • At least 10Mbps of bandwidth both up and down. ...
  • No data cap imposed by your ISP. ...
  • Stable electricity. ...
  • A computer with sufficient specs.

What are the system requirements for node? ›

Minimum Node Platform Requirements
  • CPU: X86/X64 compatible (Intel Xeon or AMD EPYC); 24 cores/48 threads meeting or exceeding the following benchmarks: ...
  • Network Connectivity: Sustained 1Gb/s internet bandwidth via a single 1-Gigabit / 10-Gigabit Ethernet interface.
Feb 21, 2024

Why is Polkadot worth more than Cardano? ›

While Polkadot enables multiple blockchains to be connected to a single mainnet, Cardano has a two-layer infrastructure. Polkadot's main advantages over Cardano are low (or no) transaction fees and high transaction speeds, while Cardano's main advantages over Polkadot are sustainability and limitless scalability.

What is beefy Polkadot? ›

BEEFY allows participants of the remote network to verify finality proofs created by Polkadot's Relay Chain validators. In other words: clients in the Ethereum network should be able to verify that the Polkadot network is at a specific state.

Who is behind Polkadot? ›

Gavin Wood is a computer scientist and tech entrepreneur renowned for creating the Polkadot network and mastermind behind the Web3 Foundation. He has also played pivotal roles as the co-founder and former Chief Technology Officer of the Ethereum network.

Is Polkadot finite? ›

The end product of blockchains is Blockspace. Applications need to access Polkadot's blockspace, and the entry points to blockspace are the cores. Thus, applications will need to reserve some time on cores or Coretime to gain the right to access Polkadot's secure blockspace and interoperability for a finite period.

What is Polkadot proof of? ›

The Polkadot blockchain network leverages a special Proof-of-Stake (PoS) subcategory called Nominated Proof of Stake (NPoS). NPoS selects sets of validators by allowing nominators to choose the best validators based on past performance.

What blockchain is Polkadot built on? ›

The Polkadot network has a primary blockchain named the "relay chain" and many user-created parallel chains called "parachains". The relay chain acts as the governance layer of the network, while parachains are auctioned, enabling users to create and operate their own blockchains that use Polkadot's infrastructure.

How do I set up a crypto node? ›

To run a node, you can download the Bitcoin Core software and let it copy the entire blockchain from other nodes, and then your node will be ready to verify each block itself. To set up a new node, you need to go through the IBD (Initial block download) that enables node synchronization to the network on the first run.

How to set up a validator node? ›

Managing Proof of Liquidity
  1. 1) Initialize Your Node.
  2. 2) Set Recommended Validator Settings (Optional)
  3. 3) Start Your Node.
  4. 4) Register Your Validator on the Network.
  5. 5) Confirm Your Validator Status.

How do you become a validator in Polkadot? ›

To start a validator instance on Polkadot, the minimum bond required is 0 DOT. But to enter the active validator set and be eligible to earn rewards, your validator node should be nominated by a minimum number of DOT tokens.

Top Articles
How to Get a Bachelors Degree by Age 20 With Zero Debt
How to Pay Off Debt Fast with a Low Income
Katie Pavlich Bikini Photos
Gamevault Agent
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Free Atm For Emerald Card Near Me
Craigslist Mexico Cancun
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Doby's Funeral Home Obituaries
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Select Truck Greensboro
Things To Do In Atlanta Tomorrow Night
Non Sequitur
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Craigslist In Flagstaff
Shasta County Most Wanted 2022
Energy Healing Conference Utah
Testberichte zu E-Bikes & Fahrrädern von PROPHETE.
Aaa Saugus Ma Appointment
Geometry Review Quiz 5 Answer Key
Walgreens Alma School And Dynamite
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Pixel Combat Unblocked
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Rogold Extension
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Where Can I Cash A Huntington National Bank Check
Facebook Marketplace Marrero La
Nobodyhome.tv Reddit
Topos De Bolos Engraçados
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hampton In And Suites Near Me
Stoughton Commuter Rail Schedule
Bedbathandbeyond Flemington Nj
Free Carnival-themed Google Slides & PowerPoint templates
Otter Bustr
Selly Medaline
Latest Posts
Article information

Author: Aron Pacocha

Last Updated:

Views: 6639

Rating: 4.8 / 5 (48 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Aron Pacocha

Birthday: 1999-08-12

Address: 3808 Moen Corner, Gorczanyport, FL 67364-2074

Phone: +393457723392

Job: Retail Consultant

Hobby: Jewelry making, Cooking, Gaming, Reading, Juggling, Cabaret, Origami

Introduction: My name is Aron Pacocha, I am a happy, tasty, innocent, proud, talented, courageous, magnificent person who loves writing and wants to share my knowledge and understanding with you.