BitShares Forum
Main => Technical Support => Topic started by: tytus on June 08, 2016, 11:47:59 am
-
Is there a recent howto for setting up a local witness / client ?
I have downloaded the code from github
I have compiled the code
I have added the rpc-endpoint to witness_node_data_dir/config.ini
The witness does not seem to connect to the network at all :-(
Without this the cli_wallet does not see any blocks.
-
this is the witness stdout:
3469330ms th_a witness.cpp:89 plugin_initialize ] witness plugin: plugin_initialize() begin
3469332ms th_a witness.cpp:99 plugin_initialize ] key_id_to_wif_pair: ["BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV","5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"]
3469333ms th_a witness.cpp:117 plugin_initialize ] witness plugin: plugin_initialize() end
3469334ms th_a object_database.cpp:94 open ] Opening object database from /home/pi/git/adshares/witness_node_data_dir/blockchain ...
3539671ms th_a object_database.cpp:100 open ] Done opening object database.
3539695ms th_a thread.cpp:95 thread ] name:ntp tid:3063298880
3539697ms ntp ntp.cpp:202 read_loop ] exiting ntp read_loop
3539698ms th_a thread.cpp:95 thread ] name:p2p tid:3046513472
3539772ms th_a application.cpp:178 reset_p2p_node ] Adding seed node 83.221.132.47:1776
3539830ms th_a application.cpp:178 reset_p2p_node ] Adding seed node 188.40.91.213:1776
3539967ms th_a application.cpp:178 reset_p2p_node ] Adding seed node 114.92.252.136:62015
3540067ms th_a application.cpp:178 reset_p2p_node ] Adding seed node 71.197.2.119:1776
3540153ms th_a application.cpp:178 reset_p2p_node ] Adding seed node 45.32.186.90:1776
3540271ms th_a application.cpp:178 reset_p2p_node ] Adding seed node 45.32.247.234:1776
3540469ms th_a application.cpp:178 reset_p2p_node ] Adding seed node 82.211.31.175:1776
3540610ms th_a application.cpp:178 reset_p2p_node ] Adding seed node 159.203.15.153:1776
3540677ms th_a application.cpp:178 reset_p2p_node ] Adding seed node 188.166.188.206:1776
3541056ms th_a application.cpp:178 reset_p2p_node ] Adding seed node 107.170.245.89:1777
3541057ms th_a application.cpp:178 reset_p2p_node ] Adding seed node 54.85.252.77:39705
3541058ms th_a application.cpp:178 reset_p2p_node ] Adding seed node 104.236.144.84:1777
3541059ms th_a application.cpp:178 reset_p2p_node ] Adding seed node 40.127.190.171:1777
3541060ms th_a application.cpp:178 reset_p2p_node ] Adding seed node 185.25.22.21:1776
3541061ms th_a application.cpp:178 reset_p2p_node ] Adding seed node 212.47.249.84:50696
3541062ms th_a application.cpp:178 reset_p2p_node ] Adding seed node 104.168.154.160:50696
3541063ms th_a application.cpp:178 reset_p2p_node ] Adding seed node 128.199.143.47:2015
3541065ms th_a application.cpp:189 reset_p2p_node ] Configured p2p node to listen on 0.0.0.0:42898
3541075ms th_a application.cpp:241 reset_websocket_serv ] Configured websocket rpc to listen on 127.0.0.1:8090
3541076ms th_a witness.cpp:122 plugin_startup ] witness plugin: plugin_startup() begin
3541076ms th_a witness.cpp:139 plugin_startup ] No witnesses configured! Please add witness IDs and private keys to configuration.
3541076ms th_a witness.cpp:140 plugin_startup ] witness plugin: plugin_startup() end
3541076ms th_a main.cpp:179 main ] Started witness node on a chain with 0 blocks.
3541076ms th_a main.cpp:180 main ] Chain ID is 4018d7844c78f6a6c41c6a552b898022310fc5dec06da467ee7905a8dad512c8
after that it does nothing. Do I need to specify something else ? Adding a wittness ID does not change anything. I have no private key so I can not add it.
-
You sure you want to start a node and not just use the wallet:
bitshares.org/wallet?
-
I am sure I want to have a command line access.
I want to use and assess bts as a crypto currency for my possible applications (as an underlying payment system).
I don't want to just speculate with BTS.
If there is just one point of entry (2 web wallet sites / 4 web-socket nodes), relying on BTS as a crypto currency platform is risky.
-
Integration guide:
http://docs.bitshares.eu/integration/
cli-wallet:
http://docs.bitshares.eu/integration/apps/cliwallet.html
-
This is what I did
1. create a full node based on this: http://docs.bitshares.eu/integration/apps/node.html
2. modified almost nothing in config.ini (rpc-endpoint = 127.0.0.1:8090 ; logger.p2p: level=info)
I get this from the node:
...
3098782ms th_a main.cpp:179 main ] Started witness node on a chain with 0 blocks.
3098782ms th_a main.cpp:180 main ] Chain ID is 4018d7844c78f6a6c41c6a552b898022310fc5dec06da467ee7905a8dad512c8
...
I get this in the wallet:
locked >>> get_dynamic_global_properties
{
"id": "2.1.0",
"head_block_number": 0,
"head_block_id": "0000000000000000000000000000000000000000",
"time": "2015-10-13T13:00:00",
"current_witness": "1.6.0",
"next_maintenance_time": "1970-01-01T00:00:00",
"last_budget_time": "1970-01-01T00:00:00",
"witness_budget": 0,
"accounts_registered_this_interval": 91589,
"recently_missed_count": 0,
"current_aslot": 0,
"recent_slots_filled": "340282366920938463463374607431768211455",
"dynamic_flags": 0,
"last_irreversible_block_num": 0
}
Is this correct ?
-
locked >>> info
info
{
"head_block_num": 0,
"head_block_id": "0000000000000000000000000000000000000000",
"head_block_age": "34 weeks old",
"next_maintenance_time": "46 years ago",
"chain_id": "4018d7844c78f6a6c41c6a552b898022310fc5dec06da467ee7905a8dad512c8",
"participation": "100.00000000000000000",
"active_witnesses": [
"1.6.1",
"1.6.2",
"1.6.3",
"1.6.4",
"1.6.5",
"1.6.6",
"1.6.7",
"1.6.8",
"1.6.9",
"1.6.10",
"1.6.11"
],
"active_committee_members": []
}
so the witness is not synced :-(
-
You need to wait for the witness node to catch a node and start downloading the blockchain .. give it some time
-
some lines from the log (max 200 characters per line)
basic_ios::clear: iostream error:
{"id":{"item_type":1001,"item_hash":"00000001b656820f72f6b28cda811778632d4998"},"what":"basic_ios::clear: iostream error"}
th_a application.cpp:496 has_item message_oriented_connection.cpp:188
2016-06-08T19:16:14 p2p:message read_loop read_loop ] disconnected 13 NSt8ios_base7failureB5cxx11E: basic_ios::clear: iostream error
basic_ios::clear: iostream error:
{"id":{"item_type":1001,"item_hash":"00000001b656820f72f6b28cda811778632d4998"},"what":"basic_ios::clear: iostream error"}
th_a application.cpp:496 has_item message_oriented_connection.cpp:205
2016-06-08T19:16:14 p2p:message read_loop on_connection_closed ] Remote peer 54.165.171.191:50961 closed their connection to us node.cpp:2960
2016-06-08T19:16:14 p2p:delayed_peer_deletion_task destroy_connection ] in destroy_connection() for message_oriented_connection.cpp:286
2016-06-08T19:16:14 p2p:delayed_peer_deletion_task destroy_connection ] Exception thrown while canceling message_oriented_connection's read_loop, ignoring: {"code":0,"name":"exception","message":"un
2016-06-08T19:16:14 p2p:delayed_peer_deletion_task destroy_connection ] in destroy_connection() for message_oriented_connection.cpp:286
2016-06-08T19:16:14 p2p:delayed_peer_deletion_task destroy_connection ] Exception thrown while canceling message_oriented_connection's read_loop, ignoring: {"code":0,"name":"exception","message":"un
2016-06-08T19:16:14 p2p:accept_loop accept_loop ] accepted inbound connection from 203.40.59.176:8090 node.cpp:4178
2016-06-08T19:16:14 p2p:accept_connection_task accept_connection ] established inbound connection from 203.40.59.176:8090, sending hello peer_connection.cpp:213
2016-06-08T19:16:14 p2p:dump_node_status_task dump_node_status ] ----------------- PEER STATUS UPDATE -------------------- node.cpp:4657
2016-06-08T19:16:14 p2p:dump_node_status_task dump_node_status ] number of peers: 0 active, 1, 0 closing. attempting to maintain 20 - 200 peers node.cpp:4660
2016-06-08T19:16:14 p2p:dump_node_status_task dump_node_status ] handshaking peer 203.40.59.176:8090 in state ours(just_connected) theirs(connection_accepted) node.cpp:4675
2016-06-08T19:16:14 p2p:dump_node_status_task dump_node_status ] --------- MEMORY USAGE ------------ node.cpp:4678
2016-06-08T19:16:14 p2p:dump_node_status_task dump_node_status ] node._active_sync_requests size: 0 node.cpp:4679
2016-06-08T19:16:14 p2p:dump_node_status_task dump_node_status ] node._received_sync_items size: 0 node.cpp:4680
2016-06-08T19:16:14 p2p:dump_node_status_task dump_node_status ] node._new_received_sync_items size: 0 node.cpp:4681
2016-06-08T19:16:14 p2p:dump_node_status_task dump_node_status ] node._items_to_fetch size: 0 node.cpp:4682
2016-06-08T19:16:14 p2p:dump_node_status_task dump_node_status ] node._new_inventory size: 0 node.cpp:4683
2016-06-08T19:16:14 p2p:dump_node_status_task dump_node_status ] node._message_cache size: 0 node.cpp:4684
2016-06-08T19:16:14 p2p:dump_node_status_task dump_node_status ] --------- END MEMORY USAGE ------------ node.cpp:4694
2016-06-08T19:16:14 p2p:connect_to_task connect_to ] established outbound connection to 45.32.186.90:1776 peer_connection.cpp:256
2016-06-08T19:16:14 p2p:connect_to_task connect_to ] established outbound connection to 163.158.192.167:9090 peer_connection.cpp:256
2016-06-08T19:16:14 p2p:connect_to_task connect_to ] established outbound connection to 82.211.31.175:1776 peer_connection.cpp:256
2016-06-08T19:16:14 p2p:accept_loop accept_loop ] accepted inbound connection from 24.219.217.87:50921 node.cpp:4178
2016-06-08T19:16:14 p2p:connect_to_task connect_to ] established outbound connection to 84.200.17.129:1776 peer_connection.cpp:256
2016-06-08T19:16:14 p2p:connect_to_task connect_to ] established outbound connection to 81.89.101.133:1776 peer_connection.cpp:256
2016-06-08T19:16:14 p2p:accept_connection_task accept_connection ] established inbound connection from 24.219.217.87:50921, sending hello peer_connection.cpp:213
2016-06-08T19:16:14 p2p:connect_to_task connect_to ] established outbound connection to 212.47.249.84:50696 peer_connection.cpp:256
2016-06-08T19:16:14 p2p:connect_to_task connect_to ] established outbound connection to 95.142.162.215:1779 peer_connection.cpp:256
2016-06-08T19:16:14 p2p:message read_loop on_connection_reject ] Received a rejection from 84.200.17.129:1776 in response to my "hello", reason: "I'm already connected to you" node.cpp:2123
2016-06-08T19:16:15 p2p:message read_loop on_fetch_blockchain_ ] reply_message: {"total_remaining_item_count":0,"item_type":1001,"item_hashes_available":[]} fetch_blockchain_item_ids_message_received.
2016-06-08T19:16:15 p2p:message read_loop on_fetch_blockchain_ ] reply_message: {"total_remaining_item_count":0,"item_type":1001,"item_hashes_available":[]} fetch_blockchain_item_ids_message_received.
2016-06-08T19:16:15 p2p:connect_to_task connect_to ] established outbound connection to 159.203.15.153:1776 peer_connection.cpp:256
2016-06-08T19:16:15 p2p:message read_loop on_fetch_blockchain_ ] reply_message: {"total_remaining_item_count":0,"item_type":1001,"item_hashes_available":[]} fetch_blockchain_item_ids_message_received.
2016-06-08T19:16:15 p2p:message read_loop on_closing_connectio ] Peer 84.200.17.129:1776 is disconnecting us because: You rejected my connection request (hello message) so I'm disconnecting node.cpp
2016-06-08T19:16:15 p2p:message read_loop read_loop ] disconnected 0 exception: unspecified
Bad file descriptor
{"message":"Bad file descriptor"}
asio asio.cpp:38 operator()
{"len":16}
p2p stcp_socket.cpp:117 readsome message_oriented_connection.cpp:205
2016-06-08T19:16:15 p2p:message read_loop on_connection_closed ] Remote peer 84.200.17.129:1776 closed their connection to us node.cpp:2960
2016-06-08T19:16:15 p2p:delayed_peer_deletion_task destroy_connection ] in destroy_connection() for message_oriented_connection.cpp:286
2016-06-08T19:16:15 p2p:delayed_peer_deletion_task destroy_connection ] Exception thrown while canceling message_oriented_connection's read_loop, ignoring: {"code":0,"name":"exception","message":"un
2016-06-08T19:16:15 p2p:delayed_peer_deletion_task destroy_connection ] in destroy_connection() for message_oriented_connection.cpp:286
2016-06-08T19:16:15 p2p:delayed_peer_deletion_task destroy_connection ] Exception thrown while canceling message_oriented_connection's read_loop, ignoring: {"code":0,"name":"exception","message":"un
2016-06-08T19:16:15 p2p:message read_loop read_loop ] message transmission failed 13 NSt8ios_base7failureB5cxx11E: basic_ios::clear: iostream error
basic_ios::clear: iostream error:
{"id":{"item_type":1001,"item_hash":"00000001b656820f72f6b28cda811778632d4998"},"what":"basic_ios::clear: iostream error"}
th_a application.cpp:496 has_item message_oriented_connection.cpp:188
-
Still no luck after 20 hours.
locked >>> info
info
{
"head_block_num": 0,
"head_block_id": "0000000000000000000000000000000000000000",
"head_block_age": "34 weeks old",
"next_maintenance_time": "46 years ago",
"chain_id": "4018d7844c78f6a6c41c6a552b898022310fc5dec06da467ee7905a8dad512c8",
"participation": "100.00000000000000000",
"active_witnesses": [
"1.6.1",
"1.6.2",
"1.6.3",
"1.6.4",
"1.6.5",
"1.6.6",
"1.6.7",
"1.6.8",
"1.6.9",
"1.6.10",
"1.6.11"
],
"active_committee_members": []
}
logs of the node are as usual:
tail -f witness_node_data_dir/logs/p2p/p2p.log
...
2016-06-09T13:07:41 p2p:message read_loop on_fetch_blockchain_ ] reply_message: {"total_remaining_item_count":0,"item_type":1001,"item_hashes_available":[]} fetch_blockchain_item_ids_message_received.blockchain_synopsis: ["00689267cb7dcaf3352006b949859d1a3cfc52be","00689272fab9f50ba5bdfbef287535468872cdcd","0068927859a7c474e91c2582fbc12685ab885c74","0068927b76ba37d1c5b280c41201f2a3255f72ef","0068927cde0963c8bc358f4868048df9177ee4ab"] node.cpp:2267
2016-06-09T13:07:41 p2p:message read_loop read_loop ] message transmission failed 13 NSt8ios_base7failureB5cxx11E: basic_ios::clear: iostream error
basic_ios::clear: iostream error:
{"id":{"item_type":1001,"item_hash":"00000001b656820f72f6b28cda811778632d4998"},"what":"basic_ios::clear: iostream error"}
th_a application.cpp:496 has_item message_oriented_connection.cpp:188
2016-06-09T13:07:41 p2p:message read_loop read_loop ] disconnected 13 NSt8ios_base7failureB5cxx11E: basic_ios::clear: iostream error
basic_ios::clear: iostream error:
{"id":{"item_type":1001,"item_hash":"00000001b656820f72f6b28cda811778632d4998"},"what":"basic_ios::clear: iostream error"}
th_a application.cpp:496 has_item message_oriented_connection.cpp:205
2016-06-09T13:07:41 p2p:message read_loop on_connection_closed ] Remote peer 192.99.4.226:1776 closed their connection to us node.cpp:2960
2016-06-09T13:07:41 p2p:delayed_peer_deletion_task destroy_connection ] in destroy_connection() for message_oriented_connection.cpp:286
2016-06-09T13:07:41 p2p:delayed_peer_deletion_task destroy_connection ] Exception thrown while canceling message_oriented_connection's read_loop, ignoring: {"code":0,"name":"exception","message":"unspecified","stack":[{"context":{"level":"warn","file":"message_oriented_connection.cpp","line":207,"method":"read_loop","hostname":"","thread_name":"p2p","timestamp":"2016-06-09T13:07:41"},"format":"disconnected: ${e}","data":{"e":"13 NSt8ios_base7failureB5cxx11E: basic_ios::clear: iostream error\nbasic_ios::clear: iostream error: \n {\"id\":{\"item_type\":1001,\"item_hash\":\"00000001b656820f72f6b28cda811778632d4998\"},\"what\":\"basic_ios::clear: iostream error\"}\n th_a application.cpp:496 has_item"}}]} message_oriented_connection.cpp:299
2016-06-09T13:07:41 p2p:delayed_peer_deletion_task destroy_connection ] in destroy_connection() for message_oriented_connection.cpp:286
2016-06-09T13:07:41 p2p:delayed_peer_deletion_task destroy_connection ] Exception thrown while canceling message_oriented_connection's read_loop, ignoring: {"code":0,"name":"exception","message":"unspecified","stack":[{"context":{"level":"warn","file":"message_oriented_connection.cpp","line":207,"method":"read_loop","hostname":"","thread_name":"p2p","timestamp":"2016-06-09T13:07:41"},"format":"disconnected: ${e}","data":{"e":"13 NSt8ios_base7failureB5cxx11E: basic_ios::clear: iostream error\nbasic_ios::clear: iostream error: \n {\"id\":{\"item_type\":1001,\"item_hash\":\"00000001b656820f72f6b28cda811778632d4998\"},\"what\":\"basic_ios::clear: iostream error\"}\n th_a application.cpp:496 has_item"}}]} message_oriented_connection.cpp:299
2016-06-09T13:07:41 p2p:message read_loop read_loop ] message transmission failed 13 NSt8ios_base7failureB5cxx11E: basic_ios::clear: iostream error
basic_ios::clear: iostream error:
{"id":{"item_type":1001,"item_hash":"00000001b656820f72f6b28cda811778632d4998"},"what":"basic_ios::clear: iostream error"}
th_a application.cpp:496 has_item message_oriented_connection.cpp:188
2016-06-09T13:07:41 p2p:message read_loop read_loop ] disconnected 13 NSt8ios_base7failureB5cxx11E: basic_ios::clear: iostream error
basic_ios::clear: iostream error:
{"id":{"item_type":1001,"item_hash":"00000001b656820f72f6b28cda811778632d4998"},"what":"basic_ios::clear: iostream error"}
th_a application.cpp:496 has_item message_oriented_connection.cpp:205
2016-06-09T13:07:41 p2p:message read_loop on_connection_closed ] Remote peer 188.40.91.213:53549 closed their connection to us node.cpp:2960
2016-06-09T13:07:41 p2p:delayed_peer_deletion_task destroy_connection ] in destroy_connection() for message_oriented_connection.cpp:286
2016-06-09T13:07:41 p2p:delayed_peer_deletion_task destroy_connection ] Exception thrown while canceling message_oriented_connection's read_loop, ignoring: {"code":0,"name":"exception","message":"unspecified","stack":[{"context":{"level":"warn","file":"message_oriented_connection.cpp","line":207,"method":"read_loop","hostname":"","thread_name":"p2p","timestamp":"2016-06-09T13:07:41"},"format":"disconnected: ${e}","data":{"e":"13 NSt8ios_base7failureB5cxx11E: basic_ios::clear: iostream error\nbasic_ios::clear: iostream error: \n {\"id\":{\"item_type\":1001,\"item_hash\":\"00000001b656820f72f6b28cda811778632d4998\"},\"what\":\"basic_ios::clear: iostream error\"}\n th_a application.cpp:496 has_item"}}]} message_oriented_connection.cpp:299
2016-06-09T13:07:41 p2p:delayed_peer_deletion_task destroy_connection ] in destroy_connection() for message_oriented_connection.cpp:286
2016-06-09T13:07:41 p2p:delayed_peer_deletion_task destroy_connection ] Exception thrown while canceling message_oriented_connection's read_loop, ignoring: {"code":0,"name":"exception","message":"unspecified","stack":[{"context":{"level":"warn","file":"message_oriented_connection.cpp","line":207,"method":"read_loop","hostname":"","thread_name":"p2p","timestamp":"2016-06-09T13:07:41"},"format":"disconnected: ${e}","data":{"e":"13 NSt8ios_base7failureB5cxx11E: basic_ios::clear: iostream error\nbasic_ios::clear: iostream error: \n {\"id\":{\"item_type\":1001,\"item_hash\":\"00000001b656820f72f6b28cda811778632d4998\"},\"what\":\"basic_ios::clear: iostream error\"}\n th_a application.cpp:496 has_item"}}]} message_oriented_connection.cpp:299
^C
-
try to start with
--seed-node seeds.bitshares.eu:1776
-
I did something else. I found on a different thread the resync command line option:
./programs/witness_node/witness_node –replay-blockchain --resync-blockchain
Now the node dose something
locked >>> info
{
"head_block_num": 7137,
"head_block_id": "00001be1d189f50a1ac522172e75204cb13f9227",
"head_block_age": "34 weeks old",
"next_maintenance_time": "34 weeks ago",
"chain_id": "4018d7844c78f6a6c41c6a552b898022310fc5dec06da467ee7905a8dad512c8",
"participation": "87.50000000000000000",
"active_witnesses": [
"1.6.1",
"1.6.2",
"1.6.3",
"1.6.4",
"1.6.5",
"1.6.6",
"1.6.7",
"1.6.8",
"1.6.9",
"1.6.10",
"1.6.11",
"1.6.12",
"1.6.13",
"1.6.14",
"1.6.15",
"1.6.16",
"1.6.17",
"1.6.18",
"1.6.19",
"1.6.20",
"1.6.21",
"1.6.22",
"1.6.23",
"1.6.24",
"1.6.25",
"1.6.26",
"1.6.27"
],
"active_committee_members": [
"1.5.0",
"1.5.1",
"1.5.2",
"1.5.3",
"1.5.4",
"1.5.5",
"1.5.6",
"1.5.7",
"1.5.8",
"1.5.9",
"1.5.10"
]
}
THANKS !!!