Last active
July 21, 2022 08:16
-
-
Save secretshardul/28911628b901a96aed491a48821078d9 to your computer and use it in GitHub Desktop.
shardnet validator setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install build dependencies and Rust | |
sudo apt install clang build-essential make | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh | |
# clone latest version of Nearcore | |
git clone https://github.com/near/nearcore | |
cd nearcore | |
git fetch origin --tags | |
git checkout 8448ad1eb | |
# Compile binary- it is generated in target/release/neard | |
cargo build -p neard --release --features shardnet | |
# Init working directory- generates config.json and node_key.json; downloads genesis.json | |
./target/release/neard --home ~/.near init --chain-id shardnet --download-genesis | |
# Folder structure in ~/.near | |
# - config.json: consensus details | |
# - genesis.json: genesis file | |
# - node_key.json: Contains the node's public-private keypair and account_id. | |
# - data: for blockchain state | |
# Fetch the correct config.json for Shardnet | |
rm ~/.near/config.json | |
wget -O ~/.near/config.json \ | |
https://s3-us-west-1.amazonaws.com/build.nearprotocol.com/nearcore-deploy/shardnet/config.json | |
# Fetch genesis.json | |
wget -O ~/.near/genesis.json \ | |
https://s3-us-west-1.amazonaws.com/build.nearprotocol.com/nearcore-deploy/shardnet/genesis.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment