Pendulum Docs
  • Learn
    • Welcome to Pendulum
    • Our Journey
    • Litepaper
    • Tokenomics
      • Token Utility
      • Unlocking Vesting Tokens
    • Roadmap
    • Grants Received
  • Build
    • Introduction
    • Network Parameters
    • Build Environment
      • Local relay chain setup
      • Local Pendulum chain setup
      • Pre-Configured Pendulum
        • Install
        • Configure
        • Launch
        • Sub-commands
          • export-genesis
          • generate-specs
          • generate-docker
      • Foucoco (testnet)
      • Troubleshooting
    • Developing dApps
      • ink!
    • Node Operators
      • Collators
        • Collators List
        • Set up Collator
          • Hardware Requirements
          • Ubuntu Installation
          • Docker Installation
          • Keys Management
          • Become a Collator
          • Node upgrade instructions
      • Spacewalk Vaults
    • Integrations
      • Indexers
      • Oracles
      • Wallets
    • Spacewalk (Stellar bridge)
      • User
        • Spacewalk Step-by-step guide
          • Asset Redemption Post-Vault Liquidation
      • Operating a Vault client
        • Getting Started
          • Testing it locally
            • Building pallets and testchain
            • Creating test accounts
            • Testing the vault client
        • Usage
          • Issue assets
          • Redeem assets
        • Collateral and Liquidation
          • Recovering a vault after liquidation
        • Fees, Costs and Incentives
        • Vault rewards
          • Claiming Vault rewards
        • Troubleshooting
          • Generating metadata
    • Forex AMM
      • Architecture
      • Swap User Guide
      • LP User Guide
        • Swap Pools
        • Backstop Pool
        • Cross Interaction
      • Coverage Ratio and Slippage
      • Deployment Parameters
      • Security and Audits
    • Technical FAQ
    • Status reports
      • 22-10-11 Foucoco stopped after runtime upgrade
  • Community
    • Crowdloan
      • Sign T&Cs for rewards
    • Staking
      • Choosing a Collator to Stake with for $PEN Staking Rewards
      • Delegation
      • Rewards
      • Further Operations on Delegators
    • Testnet Faucet
    • On chain identity guide
    • Cross-chain transfer KSM
    • Using Ledger
    • Governance
    • PEN and AMPE Wallets
    • Add PEN/DOT Liquidity to StellaSwap
    • Pendulum Grant Program
    • Amplitude Grants Program
    • Ambassador Program
    • Ambassador Bounties
  • Resources
    • FAQ
    • Links
      • Website
      • Github
      • Social Media
    • Audits
Powered by GitBook
On this page
  • Prerequisites
  • Running the relay chain validators

Was this helpful?

Edit on GitHub
  1. Build
  2. Build Environment

Local relay chain setup

PreviousBuild EnvironmentNextLocal Pendulum chain setup

Last updated 2 years ago

Was this helpful?

Prerequisites

First, clone the :

git clone https://github.com/paritytech/polkadot.git

Then, download the raw raw-local-chainspec.json chain-spec file and put it in the root of the cloned polkadot repository.

At the time of writing this, the Pendulum parachain is using Polkadot dependencies of version v0.9.29. So for compatibility purposes, you need to check out the respective branch before building the node.

# Checkout correct branch
git checkout release-v0.9.29
# Build polkadot node
cargo build --release

Running the relay chain validators

From inside the cloned polkadot repository (after building the node):

Run relay-chain validator 1

./target/release/polkadot \
--alice \
--validator \
--base-path /tmp/relay/alice \
--chain ./raw-local-chainspec.json \
--port 30333 \
--ws-port 9944

If you ran this validator before and you would like to start afresh from genesis, then you would need to remove the folder /tmp/relay first (and similarly for the following validator and collator nodes in this tutorial).

Check the logs for the node identity of Alice (see line 4) and copy it to your clipboard

...
⏱ Loaded block-time = 6s from block 0x7035c844a493bb0324763d592fa3dec2ca68ee0d88ad0513e322e02a209e625e
👶 Creating empty BABE epoch changes on what appears to be first startup.
🏷 Local node identity is: 12D3KooWMXKd3SybDBuDC8zLbSxzjy7dSNz9gvumFbkxoUEJY4H3 # COPY THIS ID
📦 Highest known block at #0Run relay-chain validator 2
...

Run relay-chain validator 2 (with copied node ID)

./target/release/polkadot \
--bob \
--validator \
--base-path /tmp/relay/bob \
--chain ./raw-local-chainspec.json \
--bootnodes /ip4/127.0.0.1/tcp/30333/p2p/<Alice_NODE_ID> \ # REPLACE ME WITH COPIED ID
--port 30334 \
--ws-port 9945
polkadot repository
here