Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Current »

Video of the afternoon session:

Participants

Goals

  • Set up a CasperLabs Network with Highway.

  • Stop a node and restart it. Observe node catching up.

  • Restart with different round exponents. See the effect on DAG.

  • Observe effects - CLarity.

  • Shutdown the network.

  • We will record the session.

Pre-Requisites

  1. Clone the repository on your machine

git clone https://github.com/CasperLabs/CasperLabs.git

2. Install the latest dev packages from https://repo.casperlabs.io/casperlabs/repo/dev/

# Remove old versions of casperlabs engine, client and node
sudo apt remove casperlabs-client casperlabs-engine-grpc-server casperlabs-node
# Get latest versions of engine, client and node and install the same
curl -O https://repo.casperlabs.io/casperlabs/repo/testing/casperlabs-client_0.14.0_all.deb
curl -O https://repo.casperlabs.io/casperlabs/repo/testing/casperlabs-engine-grpc-server_0.14.0_amd64.deb
curl -O https://repo.casperlabs.io/casperlabs/repo/testing/casperlabs-node_0.14.0_all.deb
sudo apt install ./casperlabs-client_0.14.0_all.deb ./casperlabs-node_0.14.0_all.deb ./casperlabs-engine-grpc-server_0.14.0_amd64.deb
# cross check if all have the same version
casperlabs-node --version 

3. Set environmental variables for running Highway

# Export Highway environmental variables
export CL_HIGHWAY_ENABLED=true
export CL_CHAINSPEC_HIGHWAY_BOOKING_DURATION=8minutes
export CL_CHAINSPEC_HIGHWAY_ENTROPY_DURATION=1minute
export CL_CHAINSPEC_HIGHWAY_ERA_DURATION=5minutes
export CL_CHAINSPEC_HIGHWAY_VOTING_PERIOD_DURATION=1minute
# We will provide the Genesis Era Start time
export CL_CHAINSPEC_HIGHWAY_GENESIS_ERA_START=

4. Clean up any leftover state from old runs

cd ~/.casperlabs
rm sqlite.db
rm -r global_state

5. Create keys and accounts.csv file

casperlabs-client keygen .

mkdir -p chainspec/genesis/
cd chainspec/genesis/
# Grab your validator-id
cat ../../validator-id
# Create account.csv file. You would need validator ids from all the validators joining the network
vi accounts.csv
# Populate the accounts.csv file in the following format: 
# Share the accounts.csv file with all validators and check if it is escatly same
md5sum accounts.csv # Should be same for everyone

6. Start the engine and node

nohup casperlabs-engine-grpc-server ~/.casperlabs/.casper-node.sock &
# -s flag for the bootstrap node only. -b flag for other nodes
casperlabs-node run --server-data-dir ~/.casperlabs -b "casperlabs://aa15ddd44c446a3a813194623d209ba1d40dfc59@3.16.135.188?protocol=40400&discovery=40404" --tls-certificate ~/.casperlabs/node.certificate.pem --tls-key ~/.casperlabs/node.key.pem --casper-validator-private-key-path ~/.casperlabs/validator-private.pem

Prerequisites

Instructions

mkdir /tmp/keys
casperlabs-client keygen /tmp/keys

You should see the following output:

Keys successfully created in directory: /tmp/keys

If you build from source, you will need to add the build directories to your PATH, for example:

export PATH="<path-to-CasperLabs-repo>/node/target/universal/stage/bin:$PATH"
export PATH="<path-to-CasperLabs-repo>/execution-engine/target/release:$PATH"

7. Observe the network on Explorer

Software Version (GitHash)

Docker tag: dev

What you need to know:

  • To simplify the process, we are deploying from the faucet account (we can skip funding an account to pay for the deployment)

Step by Step Plan

Title

Description

Notes

Outcome:

Action items

For Help - go to Discord: https://discord.gg/mpZ9AYD

Decisions

  • No labels