After "Bios Boot Sequence", cannot start a user node connected to the network
@rbw3821
I've followed the instruction of Tutorial Bios Boot Sequence (https://github.com/EOSIO/eos/wiki/Tutorial-Bios-Boot-Sequence) for executing the script bios-boot-tutorial.py to deploy a network of block producer nodes on a single host.
After that, I continue starting another user node (i.e. not producing block) to get connected to the above network. Although I've used exactly the config.ini and genesis.json from one of the above block producer nodes with some modification such as not specifying the producer-name and the private-key and adapting the http-server-address because I want this user node not to produce blocks (simply make connection to the network).
However, I always get the following error:
0|script_c | 230589ms thread-0 http_plugin.cpp:285 plugin_startup ] start listening for http requests
0|script_c | 230590ms thread-0 net_plugin.cpp:2822 plugin_startup ] starting listener, max clients is 25
0|script_c | 230590ms thread-0 producer_plugin.cpp:161 plugin_startup ] producer plugin: plugin_startup() begin
0|script_c | 230590ms thread-0 producer_plugin.cpp:175 plugin_startup ] No producers configured! Please add producer IDs and private keys to configuration.
0|script_c | 230590ms thread-0 producer_plugin.cpp:176 plugin_startup ] producer plugin: plugin_startup() end
So, if we can deploy a nice network of block producers, but impossible to get a user node connected to it, then the network is no longer meaningful??
Can you paste your node config.ini please ?
@maxb14 My used config.ini
# the endpoint upon which to listen for incoming connections (eosio::bnet_plugin)
bnet-endpoint = 0.0.0.0:4321
# the number of threads to use to process network messages (eosio::bnet_plugin)
# bnet-threads =
# remote endpoint of other node to connect to; Use multiple bnet-connect options as needed to compose a network (eosio::bnet_plugin)
# bnet-connect =
# this peer will request no pending transactions from other nodes (eosio::bnet_plugin)
bnet-no-trx = false
# the location of the blocks directory (absolute path or relative to application data dir) (eosio::chain_plugin)
blocks-dir = "blocks"
# Pairs of [BLOCK_NUM,BLOCK_ID] that should be enforced as checkpoints. (eosio::chain_plugin)
# checkpoint =
# Override default WASM runtime (eosio::chain_plugin)
# wasm-runtime =
# Maximum size (in MB) of the chain state database (eosio::chain_plugin)
chain-state-db-size-mb = 1024
# Maximum size (in MB) of the reversible blocks database (eosio::chain_plugin)
reversible-blocks-db-size-mb = 340
# print contract's output to console (eosio::chain_plugin)
contracts-console = false
# Track actions which match receiver:action:actor. Actor may be blank to include all. Receiver and Action may not be blank. (eosio::history_plugin)
# filter-on =
# The local IP and port to listen for incoming http connections; set blank to disable. (eosio::http_plugin)
http-server-address = 127.0.0.1:8877
# The local IP and port to listen for incoming https connections; leave blank to disable. (eosio::http_plugin)
# https-server-address =
# Filename with the certificate chain to present on https connections. PEM format. Required for https. (eosio::http_plugin)
# https-certificate-chain-file =
# Filename with https private key in PEM format. Required for https (eosio::http_plugin)
# https-private-key-file =
# Specify the Access-Control-Allow-Origin to be returned on each request. (eosio::http_plugin)
# access-control-allow-origin =
# Specify the Access-Control-Allow-Headers to be returned on each request. (eosio::http_plugin)
# access-control-allow-headers =
# Specify if Access-Control-Allow-Credentials: true should be returned on each request. (eosio::http_plugin)
access-control-allow-credentials = false
# The actual host:port used to listen for incoming p2p connections. (eosio::net_plugin)
p2p-listen-endpoint = 0.0.0.0:9976
# An externally accessible host:port for identifying this node. Defaults to p2p-listen-endpoint. (eosio::net_plugin)
# p2p-server-address =
# The public endpoint of a peer node to connect to. Use multiple p2p-peer-address options as needed to compose a network. (eosio::net_plugin)
# p2p-peer-address =
# The name supplied to identify this node amongst the peers. (eosio::net_plugin)
agent-name = "EOS Trung"
# Can be 'any' or 'producers' or 'specified' or 'none'. If 'specified', peer-key must be specified at least once. If only 'producers', peer-key is not required. 'producers' and 'specified' may be combined. (eosio::net_plugin)
allowed-connection = any
# Optional public key of peer allowed to connect. May be used multiple times. (eosio::net_plugin)
# peer-key =
# Tuple of [PublicKey, WIF private key] (may specify multiple times) (eosio::net_plugin)
# peer-private-key =
# Maximum number of clients from which connections are accepted, use 0 for no limit (eosio::net_plugin)
max-clients = 25
# number of seconds to wait before cleaning up dead connections (eosio::net_plugin)
connection-cleanup-period = 30
# True to require exact match of peer network version. (eosio::net_plugin)
network-version-match = 0
# number of blocks to retrieve in a chunk from any individual peer during synchronization (eosio::net_plugin)
sync-fetch-span = 100
# maximum sizes of transaction or block messages that are sent without first sending a notice (eosio::net_plugin)
max-implicit-request = 1500
# Enable block production, even if the chain is stale. (eosio::producer_plugin)
enable-stale-production = false
# Start this node in a state where production is paused (eosio::producer_plugin)
pause-on-startup = false
# Limits the maximum time (in milliseconds) that is allowed a pushed transaction's code to execute before being considered invalid (eosio::producer_plugin)
max-transaction-time = 30
# Limits the maximum age (in seconds) of the DPOS Irreversible Block for a chain this node will produce blocks on (eosio::producer_plugin)
max-irreversible-block-age = 1800
# Percent of producers (0-100) that must be participating in order to produce blocks (eosio::producer_plugin)
required-participation = 33
# ID of producer controlled by this node (e.g. inita; may specify multiple times) (eosio::producer_plugin)
# producer-name =
# Tuple of [public key, WIF private key] (may specify multiple times) (eosio::producer_plugin)
# private-key = ["EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV","5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"]
# Lag in number of blocks from the head block when selecting the reference block for transactions (-1 means Last Irreversible Block) (eosio::txn_test_gen_plugin)
txn-reference-block-lag = 0
# The path of the wallet files (absolute path or relative to application data dir) (eosio::wallet_plugin)
wallet-dir = "."
# Timeout for unlocked wallet in seconds (default 900 (15 minutes)). Wallets will automatically lock after specified number of seconds of inactivity. Activity is defined as any wallet command e.g. list-wallets. (eosio::wallet_plugin)
unlock-timeout = 900
# eosio key that will be imported automatically when a wallet is created. (eosio::wallet_plugin)
# eosio-key =
# Plugin(s) to enable, may be specified multiple times
# plugin = eosio::http_plugin
# plugin = eosio::chain_api_plugin
plugin = eosio::mongo_db_plugin
mongodb-uri = mongodb://localhost:27017/EOStest
My used genesis.json:
{
"initial_timestamp": "2018-03-02T12:00:00.000",
"initial_key": "EOS8Znrtgwt8TfpmbVpTKvA2oB8Nqey625CLN8bCN3TEbgx86Dsvr",
"initial_configuration": {
"max_block_net_usage": 1048576,
"target_block_net_usage_pct": 1000,
"max_transaction_net_usage": 524288,
"base_per_transaction_net_usage": 12,
"net_usage_leeway": 500,
"context_free_discount_net_usage_num": 20,
"context_free_discount_net_usage_den": 100,
"max_block_cpu_usage": 100000,
"target_block_cpu_usage_pct": 500,
"max_transaction_cpu_usage": 50000,
"min_transaction_cpu_usage": 100,
"max_transaction_lifetime": 3600,
"deferred_trx_expiration_window": 600,
"max_transaction_delay": 3888000,
"max_inline_action_size": 4096,
"max_inline_action_depth": 4,
"max_authority_depth": 6
},
"initial_chain_id": "0000000000000000000000000000000000000000000000000000000000000000"
}
set producer-name for eosio and initial private key! after that, deploy the eosio.bios contract and change the producer (cf: abi : setprods)
@maxb14 I'm very grateful for your consulting. However, I don't understand much your suggestion.
I've deployed a network of block producers. After that, I just want to start some user node that gets connected to the network and is not producing any block. So, we must not specify any "producer-name", right? Otherwise, it will not be a user node!
This is like in reality, people starts their user nodes simply get connected to some deployed network.
Look forward to your further suggestion.
ok set your all network producers like that:
p2p-peer-address = xxxx:xx p2p-peer-address = xxxx:xx ....
save and relaunch the node (make sure that your other producers works) If your node dosen't start, set unknown producer-name in your config file
keep me informed
@maxb14
I've tried out as you suggested by assigning the producer-name with some name and specifying the private-key.
Greatly that the nodeos can be started but it also gets crashed immediately with the below error:
*******************************
* *
* ------ NEW CHAIN ------ *
* - Welcome to EOSIO! - *
* ----------------------- *
* *
*******************************
Your genesis seems to have an old timestamp
Please consider using the --genesis-timestamp option to give your genesis a recent timestamp
2659936ms thread-0 producer_plugin.cpp:176 plugin_startup ] producer plugin: plugin_startup() end
2659937ms thread-0 net_plugin.cpp:1126 process_next_message ] e.to_detail_string(): 8 out_of_range_exception: Out of Range
read datastream of length 0 over by 2
{"method":"read","len":0,"over":2}
thread-0 datastream.cpp:6 throw_datastream_range_error
error unpacking int16_t
{"type":"int16_t"}
thread-0 raw.hpp:601 unpack
Error unpacking field network_version
{"field":"network_version"}
thread-0 raw.hpp:360 operator()
error unpacking eosio::handshake_message
{"type":"eosio::handshake_message"}
thread-0 raw.hpp:601 unpack
I still don't understand why we must specify the producer-name while I just want to start a user node (not producing blocks).
use this command : nodeos --delete-all-blocks and tell me whats happend
@maxb14
Got another error
std::exception::what: unrecognised option '--delete-all-blocks'
My nodeos version:
nodeos -v
362101953
git pull the latest version of eos and rebuild with ./eosio_build.sh, don't forget to build dependencies in build/ folder with make install
A number of changes have been made the past couple of days. Documentation lags the code changes, so check back for updates.
Btw, having the producer name set and the producer plugin specified does not mean that you will be a producer. If you run the tutorial script, you could end up with around 31 instances of nodeos running. Not all of those will be producers, only those who have been voted in.
@maxb14
@rbw3821
I've updated to the commit cd21f12e539452ff405729a4bf8bde0391172264 of the master branch.
So, my current nodeos version is: 3441553710
After having executed the python script bios-boot-tutorial.py to deploy a network of block producers on my local machine, I run the below command to view the list of nodeos together with the exact execution cmd:
ps aux | grep nodeos
So, the output is for example:
trungtt 6215 1.2 0.4 1608860 68704 ? Sl 16:35 0:14 ../../build/programs/nodeos/nodeos --max-irreversible-block-age 9999999 --contracts-console --genesis-json /home/trungtt/Work/reference/dyver/eos/tutorials/bios-boot-tutorial/genesis.json --blocks-dir /home/trungtt/Work/reference/dyver/eos/tutorials/bios-boot-tutorial/nodes/10-producer111j/blocks --config-dir /home/trungtt/Work/reference/dyver/eos/tutorials/bios-boot-tutorial/nodes/10-producer111j --data-dir /home/trungtt/Work/reference/dyver/eos/tutorials/bios-boot-tutorial/nodes/10-producer111j --chain-state-db-size-mb 1024 --http-server-address 127.0.0.1:8010 --p2p-listen-endpoint 0.0.0.0:9010 --max-clients 20 --p2p-max-nodes-per-host 20 --enable-stale-production --producer-name producer111j --private-key ["EOS6iBVEaRDS3mofUJpa8bjD94vohHrsSqqez1wcsWjhPpeNArfBF","5Hw5iBC7oGfR3FTwgDzHuzk4JAv24SiXq9iBbyPMb8JmKBHzjVX"] --plugin eosio::http_plugin --plugin eosio::chain_api_plugin --plugin eosio::producer_plugin --p2p-peer-address localhost:9000 --p2p-peer-address localhost:9001 --p2p-peer-address localhost:9002 --p2p-peer-address localhost:9003 --p2p-peer-address localhost:9004 --p2p-peer-address localhost:9005 --p2p-peer-address localhost:9006 --p2p-peer-address localhost:9007 --p2p-peer-address localhost:9008 --p2p-peer-address localhost:9009
Then, I use exactly the command line with some adaptation for port and producer name. Then, I can start a nodes connected to the network.