Skip to content

Latest commit

 

History

History
218 lines (162 loc) · 6.35 KB

Add_Validator.md

File metadata and controls

218 lines (162 loc) · 6.35 KB

Adding New Validator

Install Rust In Linux

Go to https://docs.substrate.io/install/linux/

Or

1. sudo apt install build-essential
2. sudo apt install --assume-yes git clang curl libssl-dev protobuf-compiler
3. curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
4. source $HOME/.cargo/env
5. rustc --version
6. rustup default stable
7. rustup update
8. rustup update nightly
9. rustup target add wasm32-unknown-unknown --toolchain nightly

Install Rust In Windows

Go to https://docs.substrate.io/install/windows/

Or

1. wsl --install

This command enables the required WSL 2 components that are part of the Windows operating system, downloads the latest Linux kernel, and installs the Ubuntu Linux distribution by default.

For More Info Go to https://learn.microsoft.com/en-us/windows/wsl/setup/environment

1. sudo apt update
2. sudo apt install --assume-yes git clang curl libssl-dev llvm libudev-dev make protobuf-compiler
3. curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
4. source ~/.cargo/env
5. rustc --version
6. rustup default stable
7. rustup update
8. rustup update nightly
9. rustup target add wasm32-unknown-unknown --toolchain nightly

Setup Key Pairs:

Install Subkey

subkey is a tool for generating and managing cryptographic keys used in Substrate and Polkadot networks:

cargo install subkey --force --locked

Setup The Repo

1. git clone --branch chainspec-modified https://github.com/Devolved-AI/Argochain.git
2. cd Argochain
3. cargo build --release

BABE (Block Production)

subkey generate --scheme Sr25519 --password-interactive

Example

Secret phrase:       fog nature review grass dune lunar load pattern blood measure orphan board
  Network ID:        substrate
  Secret seed:       0xdb71292267b812eb5d23c906d923dde25a22883635a79545268897807c05e327
  Public key (hex):  0x3af78e69eb6c75d416bc5a78ce77a9053feef4ecb2cffd5ff91b2dbb9c04525e
  Account ID:        0x3af78e69eb6c75d416bc5a78ce77a9053feef4ecb2cffd5ff91b2dbb9c04525e
  Public key (SS58): 5DQ2B3n7gPtGXbdUHyYSaiWerE63nWbnB6MtsRTZfHW8jBr6
  SS58 Address:      5DQ2B3n7gPtGXbdUHyYSaiWerE63nWbnB6MtsRTZfHW8jBr6

Now Run below command , Replace With your Secret Seed (Do not used the one shown in as Example)

./target/release/argochain key insert --base-path /tmp/node05 \
--chain ./customSpecRaw.json \
--scheme Sr25519 \
--suri <Secret Seed> \
--password-interactive \
--key-type babe

GRANDPA (Finality Gadget)

subkey generate --scheme Ed25519 --password-interactive

Now Run below command , Replace With your Secret Seed (Do not used the one shown in as Example)

./target/release/argochain key insert --base-path /tmp/node05 \
--chain ./customSpecRaw.json \
--scheme Ed25519 \
--suri <Secret Seed> \
--password-interactive \
--key-type gran

IM Online

subkey generate --scheme Sr25519 --password-interactive

Now Run below command , Replace With your Secret Seed (Do not used the one shown in as Example)

./target/release/argochain key insert --base-path /tmp/node05 \
--chain ./customSpecRaw.json \
--scheme Sr25519 \
--suri <Secret Seed> \
--password-interactive \
--key-type imon

Authority Discovery

subkey generate --scheme Sr25519 --password-interactive

Now Run below command , Replace With your Secret Seed (Do not used the one shown in as Example)

./target/release/argochain key insert --base-path /tmp/node05 \
--chain ./customSpecRaw.json \
--scheme Sr25519 \
--suri <Secret Seed> \
--password-interactive \
--key-type audi

Run As Validator:

 nohup ./target/release/argochain \
  --base-path /tmp/<Give path> \
  --chain customSpecRaw.json \
  --port <Give your desired Port Number> \
  --rpc-port <Give your desired Rpc Port Number> \
  --telemetry-url "wss://telemetry.polkadot.io/submit/ 0" \
  --name <Validator Name> 
  --validator \
  --rpc-methods Unsafe \
  --unsafe-rpc-external \
  --rpc-max-connections 15000 \
  --rpc-cors all &

Example

nohup ./target/release/argochain \
--base-path /tmp/node05 \
--chain ./customSpecRaw.json \
--port 30345 \
--rpc-port 9955 \
--name MyNode06 \
--validator \
--rpc-methods Unsafe \
--unsafe-rpc-external \
--rpc-max-connections 15000 \
--rpc-cors all  &

Do Staking

10

> Click on Development and Add new custom Endpoint wss://expotest.devolvedai.com

11

> Click on Save & Switch

image

> Click on Network Section

Screenshot_29

> Then Staking

Screenshot_30

> Then Accounts section

Screenshot_31

> Click on validator

Screenshot_32

> Get Your rotatekeys > Open terminal > Move to Argochain folder then Do this Command

curl -H "Content-Type: application/json" --data '{"jsonrpc":"2.0", "method":"author_rotateKeys", "params":[], "id":1}' http://localhost:9950

Here http://localhost:your rpc port

  1. Example : {"jsonrpc":"2.0","result":"0x53f1c4efcf83e0d80f44d49be724faa18998ec6ebed8b5c79f936af1bc16d31730c9adf49829c42333d6e32fe858b682bcc0dbe8f2ead6be4dd5ac85a400c12d12ec9ae40f71222c087f4eadede7086b5bbb5102676ce64eac8e1daf8499921d04ceb33b8c112517f8052ea2e4e0b7d9a1f291e054c831724ca9dd555fed4f77","id":1}ronnie

Copy the result section and paste it to rotatekeys section

> Click On Bond & Validate

Screenshot_33

Wait for an Era (Approximate 1 hour) for the participation of block validation.