accounts.jsonfor the producer names and the user account names that the script uses. If your goal is to build a fully functional EOS blockchain on your local machine by automation, you can run the
bios-boot-tutorial.pyscript directly by following the README.md instructions.
EOS_PUB_DEV_KEYand the private key as
~/biosboot/genesisto start the genesis node by executing
nodeoswith specific parameters that will create the blockchain database, the log file, and the configuration file inside the directory.
genesis.jsonfile in the
~/biosboot/directory and open it in your preferred text editor (demonstrated with nano editor here):
genesis.jsonfile. Replace the
EOS_PUB_DEV_KEYwith the public key you created in 1.2 Create Development Wallet.
genesis_start.shshell script file in the
~/biosboot/genesis/directory and open the file with your preferred editor (demonstrated with nano editor here):
genesis_start.shshell script file.
EOS_PRIV_DEV_KEYwith the public and private key values you generated in step 1.2 Create a development wallet.
genesis_start.shshell script file and then execute the
genesis_start.shscript to start genesis
The Genesis node:
- Bears the name eosio
- Produces blocks
- Listens for HTTP request on 127.0.0.1:8888
- Listens for peer connections requests on 127.0.0.1:9010
- Initiates periodic peer connections to localhost:9011, localhost:9012, and localhost:9013; these nodes are not running yet so ignore if you see any failed connection attempts
- Has the parameter
--contracts-consolewhich prints contracts output to the console; in our case, this information is good for troubleshooting problems
stop.shshell script file in the
~/biosboot/genesis/directory and copy the following stop.sh script to it.
stop.shshell script from the same
nodeosprocess, you will not be able to restart it using the
.genesis_start.shscript created in 1.5 Start the genesis node as once a node runs and produces blocks, the blockchain database initializes and gets populated. Thus,
nodeosis not able to start with the
--genesis-jsonparameter. Therefore, it is recommended to create a new script,
start.shby following the same steps outlined in 1.5 Start a genesis node and copy the below content to the script. Also, assign execution privileges to the script and use this file for any future nodeos restarts after you stopped the process.
"perhaps we need to replay": This error can occur when you restart
nodeosdue to a missing
--hard-replayparameter which replays all the transactions from the genesis node. To overcome this error, add the parameter
Some other parameters that you can use to restart
hard_replay.shshell script which is using the
clean.shand give execution permission to it:
stop.shscript and after that run the
clean.shscript which you'll have to create from below content:
nodeos.logfile with the following command, and use
CTRL+C toexit the listing mode.
eosio.*accounts. You can use different keys for each.
eosio.contracts, create a dedicated directory for
eosio.contracts, clone the
eosio.contractssources and build them. Print the current directory in the terminal and make a note of it. The current directory will be referred to as
eosio.contracts, specifically v1.8.0. Follow the instructions below to build it and remember the path where it is built:
EOSIO_OLD_CONTRACTS_DIRECTORYfrom here onward when needed.
eosio.tokencontract. This contract enables you to create, issue, transfer, and get information about tokens. To set the
eosio.msigcontract enables and simplifies defining and managing permission levels and performing multi-signature actions. To set the
SYScurrency with a maximum value of 10 billion tokens. Then, issue one billion tokens. Replace
SYSwith your specific currency designation.
createaction from the
eosio.tokencontract, authorized by the
eosio.tokenaccount, creates 1B
SYStokens in the
eosioaccount. This effectively creates the maximum supply of tokens, but does not put any tokens into circulation. Tokens not in circulation can be considered to be held in reserve.
issueaction takes 1B
SYStokens out of reserve and puts them into circulation. At the time of issue, the tokens are held within the
eosioaccount. Since the
eosioaccount owns the reserve of uncirculated tokens, its authority is required to do the action.
PREACTIVATE_FEATURE) to be activated and for an updated version of the system contract that makes use of the functionality introduced by that feature to be deployed.
eosio.systemcontract, run the following commands to enable the rest of the features which are highly recommended to be enabled for an EOSIO-based blockchain.
eosioaccount is privileged and can sign blocks. The target is to manage the blockchain by a collection of elected producers, operating under a rule of 2/3 + 1 producers agreeing before a block is final.
eosio.prods. This account represents the group of elected producers. The
eosio.prodsaccount (effectively the producer group) operates using permissions defined by the
eosio.systemcontract, we want to designate
eosio.msigas a privileged account so that it can authorize on behalf of the
eosioaccount. As soon as possible,
eosiowill resign its authority and
eosio.prodswill take over.
eosio.msigas a privileged account:
systemaccount with code zero (needed at initialization time) and
SYStoken with precision 4; precision can range from [0 .. 18]:
eosio.msigare privileged accounts. The other
eosio.*accounts are created but are not privileged.
cleosstakes 8 KB of RAM on account creation, paid by the account creator. In the initial staking, the
eosioaccount is the account creator doing the staking. Tokens staked during the initial token staking process cannot be unstaked and made liquid until after the minimum voting requirements have been met.
bios-boot-tutorial.pythat accompanies this tutorial uses the Python NumPy (numpy) library to generate a Pareto distribution.
accountnum11account. To set up the new producer, execute these steps to create a dedicated folder for it:
nodeos.logfile which is getting written to by the
nodeoscontinuously. You can stop the live stream monitor by pressing CTRL+C keys.
stop.shscript and to restart the node, execute the
start.shscript and not the
genesis_start.sh(this one is used only once in 1.5 Start the genesis node).
clean.shlocated in their corresponding folder.
accountnum11enough tokens earlier. To elect block producers, execute the following command which allows one account to vote for as up to 30 block producers identified by their account name:
eosioaccount can resign, leaving the
eosio.msigaccount as the only privileged account.
eosio.*accounts to null. Use the following command to clear the
eosio.*accounts' owner and active keys:
1.7. Create important system accountsshould be resigned as well by running the following commands:
nodeosstarted (either the genesis node or any of the block producers nodes) by: