Start keosd and nodeos

Step 1: Boot Node and Wallet

Step 1.1: Start keosd

First let us start keosd:

keosd &

You should see some output in the console that looks like this:

info  2023-03-23T21:08:18.642 keosd     wallet_plugin.cpp:38          plugin_initialize    ] initializing wallet plugin
info  2023-03-23T21:08:18.642 keosd     wallet_api_plugin.cpp:84      plugin_startup       ] starting wallet_api_plugin
info  2023-03-23T21:08:18.642 keosd     http_plugin.cpp:983           add_handler          ] add api url: /v1/wallet/create
info  2023-03-23T21:08:18.642 keosd     http_plugin.cpp:983           add_handler          ] add api url: /v1/wallet/create_key
info  2023-03-23T21:08:18.642 keosd     http_plugin.cpp:983           add_handler          ] add api url: /v1/wallet/get_public_keys
info  2023-03-23T21:08:18.642 keosd     http_plugin.cpp:983           add_handler          ] add api url: /v1/wallet/import_key
info  2023-03-23T21:08:18.642 keosd     http_plugin.cpp:983           add_handler          ] add api url: /v1/wallet/list_keys
info  2023-03-23T21:08:18.642 keosd     http_plugin.cpp:983           add_handler          ] add api url: /v1/wallet/list_wallets
info  2023-03-23T21:08:18.642 keosd     http_plugin.cpp:983           add_handler          ] add api url: /v1/wallet/lock
info  2023-03-23T21:08:18.642 keosd     http_plugin.cpp:983           add_handler          ] add api url: /v1/wallet/lock_all
info  2023-03-23T21:08:18.642 keosd     http_plugin.cpp:983           add_handler          ] add api url: /v1/wallet/open
info  2023-03-23T21:08:18.642 keosd     http_plugin.cpp:983           add_handler          ] add api url: /v1/wallet/remove_key
info  2023-03-23T21:08:18.642 keosd     http_plugin.cpp:983           add_handler          ] add api url: /v1/wallet/set_timeout
info  2023-03-23T21:08:18.642 keosd     http_plugin.cpp:983           add_handler          ] add api url: /v1/wallet/sign_digest
info  2023-03-23T21:08:18.642 keosd     http_plugin.cpp:983           add_handler          ] add api url: /v1/wallet/sign_transaction
info  2023-03-23T21:08:18.642 keosd     http_plugin.cpp:983           add_handler          ] add api url: /v1/wallet/unlock
info  2023-03-23T21:08:18.643 keosd     http_plugin.cpp:983           add_handler          ] add api url: /v1/node/get_supported_apis

Press enter to continue

Troubleshooting

After entering keosd &, you may encounter this message:

warn  2023-03-23T21:06:41.294 keosd     wallet_plugin.cpp:65          plugin_initialize    ] 3120000 wallet_exception: Wallet exception
Failed to lock access to wallet directory; is another keosd running?
    {}
    keosd  wallet_manager.cpp:304 initialize_lock
Failed to initialize

This is because another instance of keosd process might be running in the background. Kill all instances by pkill keosd and rerun keosd &.

Step 1.2: Start nodeos

Set configurations to start nodeos can be read here.

First create new directory to run nodeos.

mkdir nodeos
cd nodeos

Download the latest snapshot from here. Or you can download by command below and replace the [filename] with the latest snapshot.

wget https://v2.vexascan.com/files/download/[filename].bin

Create new bash file.

touch bash.sh
code .

Paste the command below to the bash file, replace the [filename] with snapshot’s filename that downloaded and save it.

if [ ! -d $DATADIR ]; then
  mkdir -p $DATADIR;
fi

nodeos \
--snapshot ./[filename].bin \
--plugin eosio::producer_plugin \
--plugin eosio::producer_api_plugin \
--plugin eosio::chain_plugin \
--plugin eosio::chain_api_plugin \
--plugin eosio::state_history_plugin \
--plugin eosio::http_plugin \
--plugin eosio::history_api_plugin \
--plugin eosio::history_plugin \
--data-dir $DATADIR \
--blocks-dir $DATADIR"/blocks" \
--config-dir $DATADIR \
--http-server-address 0.0.0.0:8888 \
--p2p-listen-endpoint 0.0.0.0:9010 \
--chain-state-db-size-mb 20480 \
--access-control-allow-origin=* \
--access-control-allow-headers 'content-type' \
--contracts-console \
--disable-replay-opts \
--http-validate-host=false \
--verbose-http-errors \
--enable-stale-production \
--p2p-peer-address  explorer.vexanium.com:8091 \
--p2p-peer-address 188.166.233.69:8092 \
--p2p-peer-address 139.180.136.160:9090 \
--p2p-peer-address 167.179.103.141:9090 \
--p2p-peer-address 178.128.217.200:9090 \
--p2p-peer-address 178.128.217.200:9090 \
--p2p-peer-address 45.32.122.5:9095 \
--p2p-peer-address 159.65.142.132:8080 \
--p2p-peer-address 139.180.192.207:8092 \
--p2p-peer-address 209.97.162.124:8091 \
--p2p-peer-address 34.81.37.55:9010 \
>> "nodeos.log" 2>&1 & \
echo $! > $DATADIR"/eosd.pid"

Run the command below.

./bash.sh

These settings accomplish the following:

  • Run Nodeos. This command loads all the basic plugins, set the server address, enable CORS and add some contract debugging and logging.

  • Enable CORS with no restrictions (*) and development logging

DANGER

In the above configuration, CORS is enabled for * for development purposes only, you should never enable CORS for * on a node that is publicly accessible!

Troubleshooting

After starting nodeos, if you see an error message similar to "Database dirty flag set (likely due to unclean shutdown): replay required", try to start nodeos with --replay-blockchain. More details on troubleshooting nodeos can be found here.

Step 2: Check the installation

Step 2.1: Check that Nodeos is Producing Blocks

Run the following command

tail -f nodeos.log

You should see some output in the console that looks like this:

info  2023-05-04T07:58:58.016 nodeos    chain_plugin.cpp:527          operator()           ] Support for builtin protocol feature 'FIX_LINKAUTH_RESTRICTION' (with digest of 'e0fb64b1085cc5538970158d05a009c24e276fb94e1a0bf6a528b48fbc4ff526') is enabled with preactivation required
info  2023-05-04T07:58:58.028 nodeos    chain_plugin.cpp:637          operator()           ] Saved default specification for builtin protocol feature 'FIX_LINKAUTH_RESTRICTION' (with digest of 'e0fb64b1085cc5538970158d05a009c24e276fb94e1a0bf6a528b48fbc4ff526') to: /nodeos/./data/protocol_features/BUILTIN-FIX_LINKAUTH_RESTRICTION.json
info  2023-05-04T07:58:58.029 nodeos    chain_plugin.cpp:527          operator()           ] Support for builtin protocol feature 'REPLACE_DEFERRED' (with digest of 'ef43112c6543b88db2283a2e077278c315ae2c84719a8b25f25cc88565fbea99') is enabled with preactivation required
info  2023-05-04T07:58:58.042 nodeos    chain_plugin.cpp:637          operator()           ] Saved default specification for builtin protocol feature 'REPLACE_DEFERRED' (with digest of 'ef43112c6543b88db2283a2e077278c315ae2c84719a8b25f25cc88565fbea99') to: /nodeos/./data/protocol_features/BUILTIN-REPLACE_DEFERRED.json
info  2023-05-04T07:58:58.043 nodeos    chain_plugin.cpp:527          operator()           ] Support for builtin protocol feature 'NO_DUPLICATE_DEFERRED_ID' (with digest of '4a90c00d55454dc5b059055ca213579c6ea856967712a56017487886a4d4cc0f') is enabled with preactivation required
info  2023-05-04T07:58:58.055 nodeos    chain_plugin.cpp:637          operator()           ] Saved default specification for builtin protocol feature 'NO_DUPLICATE_DEFERRED_ID' (with digest of '4a90c00d55454dc5b059055ca213579c6ea856967712a56017487886a4d4cc0f') to: /nodeos/./data/protocol_features/BUILTIN-NO_DUPLICATE_DEFERRED_ID.json
info  2023-05-04T07:58:58.056 nodeos    chain_plugin.cpp:527          operator()           ] Support for builtin protocol feature 'ONLY_LINK_TO_EXISTING_PERMISSION' (with digest of '1a99a59d87e06e09ec5b028a9cbb7749b4a5ad8819004365d02dc4379a8b7241') is enabled with preactivation required
info  2023-05-04T07:58:58.069 nodeos    chain_plugin.cpp:637          operator()           ] Saved default specification for builtin protocol feature 'ONLY_LINK_TO_EXISTING_PERMISSION' (with digest of '1a99a59d87e06e09ec5b028a9cbb7749b4a5ad8819004365d02dc4379a8b7241') to: /nodeos/./data/protocol_features/BUILTIN-ONLY_LINK_TO_EXISTING_PERMISSION.json
info  2023-05-04T07:58:58.070 nodeos    chain_plugin.cpp:540          operator()           ] Support for builtin protocol feature 'PREACTIVATE_FEATURE' (with digest of '0ec7e080177b2c02b278d5088611686b49d739925a92d9bfcacd7fc6b74053bd') is enabled without activation restrictions
info  2023-05-04T07:58:58.082 nodeos    chain_plugin.cpp:637          operator()           ] Saved default specification for builtin protocol feature 'PREACTIVATE_FEATURE' (with digest of '0ec7e080177b2c02b278d5088611686b49d739925a92d9bfcacd7fc6b74053bd') to: /nodeos/./data/protocol_features/BUILTIN-PREACTIVATE_FEATURE.json

Let the nodeos run until the output looks like this and blocks become synchronized.

info  2023-05-04T08:13:32.253 net-1     net_plugin.cpp:1717           operator()           ] requesting range 231504310 to 231504409, from bp-dejave2:9090 - 60245f9
info  2023-05-04T08:13:33.047 net-0     net_plugin.cpp:1717           operator()           ] requesting range 231504410 to 231504509, from ubuntu-tukargulingbp:9090 - 37af369
info  2023-05-04T08:13:33.880 net-1     net_plugin.cpp:1717           operator()           ] requesting range 231504510 to 231504609, from vultr.guest:9095 - 441ecee
info  2023-05-04T08:13:34.822 net-1     net_plugin.cpp:1717           operator()           ] requesting range 231504610 to 231504709, from mainnet-node-01:8080 - 46085be
info  2023-05-04T08:13:35.463 net-0     net_plugin.cpp:1717           operator()           ] requesting range 231504710 to 231504809, from vps-vexascan:8092 - 7224d49
info  2023-05-04T08:13:36.745 net-1     net_plugin.cpp:1717           operator()           ] requesting range 231504810 to 231504909, from bp-bnkri:9090 - 2b55aa2
info  2023-05-04T08:13:38.236 net-1     net_plugin.cpp:1717           operator()           ] requesting range 231504910 to 231505009, from bp-dejave2:9090 - 60245f9
info  2023-05-04T08:13:39.221 nodeos    producer_plugin.cpp:421       on_incoming_block    ] Received block e9492f536a6d4266... #231505000 @ 2023-05-03T12:47:24.500 signed by ekasepbanjar [trxs: 28, lib: 231504674, conf: 0, latency: 69974721 ms]

Press ctrl + c to close the log

WARNING

If you want to stop nodeos, run command pkill nodeos .

After this, before you start nodeos, remove the line of --snapshot configuration from the bash file. Then you can rerun nodeos.

Step 2.2: Check the Wallet

Open the shell and run the cleos command to list available wallets. We will talk more about wallets in the future. For now, we need to validate the installation and see that the command line client cleos is working as intended.

cleos wallet list

You should see a response with an empty list of wallets:

Wallets:
[]

From this point forward, you'll be executing commands from your local system (Linux or Mac).

Step 2.3: Check Nodeos endpoints

This will check that the RPC API is working correctly, pick one.

  • Check the get_info endpoint provided by the chain_api_plugin in your browser: http://localhost:8888/v1/chain/get_info

  • Check the same thing, but in the console on your host machine

curl http://localhost:8888/v1/chain/get_info

What's Next?

Create Test Accounts: Learn how to create test accounts in the VEXANIUM blockchain along with troubleshooting steps.

Last updated