Skip to content

Instantly share code, notes, and snippets.

@tvl83
Forked from blockpane/devnet.md
Last active January 6, 2021 01:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tvl83/685d241d97974e18090b4c7893ba825b to your computer and use it in GitHub Desktop.
Save tvl83/685d241d97974e18090b4c7893ba825b to your computer and use it in GitHub Desktop.
FIO Devnet

FIO devnet

  1. I recommend creating a seperate user account for this, only used for running a dev net.
  2. Must be on Ubuntu 18.04
  3. User will require sudo access for part of the install.

Get code

In the user's home directory clone the following four repositories, suggest using the Develop branch for each:

git clone https://github.com/tvl83/fio.devtools.git
git clone https://github.com/tvl83/fio.git
git clone https://github.com/tvl83/fio.cdt.git
git clone https://github.com/tvl83/fio.contracts.git

Build core software

This can take a while, more cores and RAM help.

cd fio
git submodule update --init --recursive
cd scripts
./fio_build.sh # on my 10 core 10GB ram server it took 1h16m
./fio_install.sh # Will require sudo if clang isnt installed (but the build script ran fine....)

Build contracts

cd ~/fio.devtools
./start.sh 2.0
# from the prompts select 1 (Local Startup), then 2 (Update/Build Contracts)

Launch the devnet

This will launch 3 nodes, load contracts, setup a bunch of accounts, and register 3 producers:

./start.sh 2.0
# select 1 (Local Startup), then 1 (Local Blockchain)

see fio.devtools/scripts/launch/02_import_keys.sh for keys

Restarting

The easiest way to restart is to nuke the chain

./start.sh 2.0
# select 1, then select 3 for nuke all, then y to confirm
./start.sh 2.0
# select 1 then 1 again to start the chain from scratch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment