Configure and Run Your Node
Replay from a snapshot, blocks.log, or V1 History archive
Optional
This step is optional to save time when syncing a node. If it is skipped, the node will sync from genesis and can take several days.
To save time on startup, your node may be bootstrapped with a snapshot of data from a running node. Refer to Nodeos Replay for instructions on replaying from a snapshot, blocks.log, or V1 History archive.
Confirm nodeos P2P nodes
Edit the settings for nodeos:
sudo vi /etc/fio/nodeos/config.ini
P2P nodes are updated more frequently than the .deb package, if there are a large number of P2P nodes that are unreachable, it's possible to get a list of healthy nodes from the FIO Mainnet Health page..
History configuration
Warning
Configuring history without the
history-index-state-db-size-mb
andhistory-state-db-size-mb
settings nodes may stop with the warning: Database has reached an unsafe level of usage, shutting down to avoid corrupting the database. Please increase the value set for chain-state-db-size-mb and restart the process!
Large history indexes
The
history-per-account
setting will truncate the number of actions stored for an account. Given the number of potential internal-actions called in each trace, it may be desirable to decrease this number if the history indexes become too large. Otherwise, keeping it at the max is recommended.
Light/V1 History
Optional
If the light-history (v1 history) feature is needed, make sure the following parameters are set in your
config.ini
plugin = eosio::history_plugin
plugin = eosio::history_api_plugin
filter-on = *
filter-out = eosio:onblock:
history-per-account = 9223372036854775807
history-index-state-db-size-mb = 1000000
history-state-db-size-mb = 4000000
State History
Optional
If the state-history feature is needed, make sure the following parameters are set in your
config.ini
plugin = eosio::state_history_plugin
state-history-dir = state-history
trace-history = true
echo chain-state-history = true
echo state-history-endpoint = 0.0.0.0:8080
Run nodeos
Warning
If state history (not v1 history) was configured, fio nodeos must be started with the
--disable-replay-opts
parameter.
- If FIO installed using packages: modify file
/usr/local/bin/fio-nodeos-run
exec /usr/local/bin/fio-nodeos --data-dir /var/lib/fio/data --config-dir /etc/fio/nodeos --genesis-json /etc/fio/nodeos/genesis.json --disable-replay-opts
- if FIO installed from source; add parameter to command-line
./nodeos --config-dir ~/fio/3.5/bin --genesis-json ./genesis.json --disable-replay-opts
Installed from packages
Enable nodeos daemon at runtime, and start:
sudo systemctl enable fio-nodeos
sudo systemctl start fio-nodeos
Block processing including synchronization will show in the logs:
tail -f /var/log/fio/nodeos.log
Installed from source
cd ~/fio/3.5/bin/
./nodeos --config-dir ~/fio/3.5/bin --genesis-json ./genesis.json
Validate your node
First, query /get_info against your node and confirm the chain_id
as well as the server_version_string
show the correct values.
Chain ID: 21dcae42c0182200e93f954a074011f9048a7624c6fe81d3c9541a614a88bd1c
Using clio:
/usr/local/bin/clio -u http://localhost:8888 get info
Using curl:
curl -s -X GET 'http://localhost:8888/v1/chain/get_info' | jq '.chain_id'
Next, confirm some of the other FIO API getter calls.
If you are running a V1 History node, confirm access to past transactions through get_actions
:
curl --request POST \
--url http://localhost:8888/v1/history/get_actions \
--data '{"account_name": "o3vozszmxmto"}'
There is also an advanced FIO table browsing tool called Cryptonym that is useful for testing. You can download Cryptonym from the Blockpane repository.
Enable fio-wallet
Optional
Enabling the fio-wallet is only necessary if you are using fio-wallet to manage your user's keys.
Most users won't need to run the fio-wallet service, as a system-controlled daemon running under apparmor confinement, but may opt to run it as a dynamically launched daemon when using clio wallet
commands.
To enable fio-wallet
daemon at boot time, running under the fio
account, and to start the daemon:
sudo systemctl enable fio-wallet
sudo systemctl start fio-wallet
When running under systemctl, the wallet files will be located in /var/lib/fio/fio-wallet/fio-wallet
(the location can be changed in /var/lib/fio/fio-wallet/config.ini
. Note that when starting via systemctl apparmor will confine the daemon, possibly causing problems with file permissions.)
Some users might rely on fio-wallet to store a large number of keys. Although this is not recommended, some specific settings might be necessary when launching a node:
max-body-size=(2048x2048)
http-max-bytes-in-flight-mb=5000
When dynamically launched via clio commands the wallet will default to $HOME/fio-wallet
For more information refer to the fio-wallet overview.
Updated 2 days ago