Author Topic: Test Net for Advanced Users  (Read 266154 times)

0 Members and 1 Guest are viewing this topic.

Offline spartako

  • Sr. Member
  • ****
  • Posts: 401
    • View Profile
Code: [Select]
3508896ms th_a       application.cpp:265           startup              ] Detected unclean shutdown. Replaying blockchain...
It takes too much time to replay blockchain.. How to "cleanly" shutdown the witness node?

Question bump.

I use this strategy:
When I am synced, I shutdown with C-c (it should shutdown in a clean way) and I copy the blockchain folder as backup (if it shutdown without errors).
Everytime my blockchain is corrupted, I remove the blockchain folder and I copy with the backup one and restart the witness.
Finally I backup the blockchain folder every day.
wallet_account_set_approval spartako

Offline betax

  • Hero Member
  • *****
  • Posts: 808
    • View Profile
Code: [Select]
3508896ms th_a       application.cpp:265           startup              ] Detected unclean shutdown. Replaying blockchain...
It takes too much time to replay blockchain.. How to "cleanly" shutdown the witness node?

Question bump.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4664
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
Code: [Select]
3508896ms th_a       application.cpp:265           startup              ] Detected unclean shutdown. Replaying blockchain...
It takes too much time to replay blockchain.. How to "cleanly" shutdown the witness node?
« Last Edit: August 24, 2015, 11:01:48 am by abit »
BitShares committee member: abit
BitShares witness: in.abit

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4664
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore

The latter 'connect_to_endpoint' ones seem to be 'bitshares_client' but not 'graphene'.
Code: [Select]
2015-08-24T00:49:39 p2p:message read_loop     on_hello_message ] Received hello message from peer on a different chain: {"user_agent":"bitshares_client","core_protocol_version":106,"inbound_address":"104.255.221.100","inbound_port":1776,"outbound_port":1776,"node_public_key":"02d094583cd49e6c1c86d0bad51064c179885989aeedef46494719bc64261aca7c","signed_shared_secret":"20511eb5127270ca43e2324352c0feee15093f0c6aa0e0cf6dd7ca2b921cdef5664ccb314e6bc9b369dcf78d5532090604f4458d76471eef26175aa979e994eab9","chain_id":"bbf8cbb90532eb555f66602d3bf071609552f852cf9156d4253a33479b70a5e1","user_data":{"bitshares_git_revision_sha":"6bc091e807ba3904ee6793e58d7de3b4309ff4b2","bitshares_git_revision_unix_timestamp":1437477775,"fc_git_revision_sha":"fd4fc4f0cb21fc7b631ee2be827f6aea85e040d6","fc_git_revision_unix_timestamp":1425136084,"platform":"linux","bitness":64,"node_id":"1206c3bec35c9347110ac6ee161c493095f69655cb854dbf6b91b41bf8cc495eab","last_known_block_hash":"c9680afa36aa6061c23919d71a3a221576ecf722","last_known_block_number":1251689,"last_known_block_time":"2015-08-24T00:49:30"}}                     node.cpp:1835
that's pretty funny.

More info:
Code: [Select]
2015-08-24T00:49:39 p2p:message read_loop     on_hello_message ] Received hello message from peer on a different chain: {"user_agent":
"bitshares_client","core_protocol_version":106,"inbound_address":"104.255.221.100","inbound_port":1776,"outbound_port":1776,"node_publ
ic_key":"02d094583cd49e6c1c86d0bad51064c179885989aeedef46494719bc64261aca7c","signed_shared_secret":"20511eb5127270ca43e2324352c0feee1
5093f0c6aa0e0cf6dd7ca2b921cdef5664ccb314e6bc9b369dcf78d5532090604f4458d76471eef26175aa979e994eab9","chain_id":"bbf8cbb90532eb555f66602
d3bf071609552f852cf9156d4253a33479b70a5e1","user_data":{"bitshares_git_revision_sha":"6bc091e807ba3904ee6793e58d7de3b4309ff4b2","bitsh
ares_git_revision_unix_timestamp":1437477775,"fc_git_revision_sha":"fd4fc4f0cb21fc7b631ee2be827f6aea85e040d6","fc_git_revision_unix_ti
mestamp":1425136084,"platform":"linux","bitness":64,"node_id":"1206c3bec35c9347110ac6ee161c493095f69655cb854dbf6b91b41bf8cc495eab","la
st_known_block_hash":"c9680afa36aa6061c23919d71a3a221576ecf722","last_known_block_number":1251689,"last_known_block_time":"2015-08-24T
00:49:30"}}                     node.cpp:1835
2015-08-24T00:49:39 p2p:message read_loop disconnect_from_peer ] Disconnecting from 104.255.221.100:1776 for You are on a different ch
ain from me                       node.cpp:4493
2015-08-24T00:49:39 p2p:message read_loop on_connection_reject ] Received a rejection from 104.255.221.100:1776 in response to my "hello", reason: "You're on a different chain than I am.  I'm on bbf8cbb90532eb555f66602d3bf071609552f852cf9156d4253a33479b70a5e1 and you're on d011922587473757011118587f93afcc314fbaea094fc1055574721b27975083"                     node.cpp:2017

Any idea why my node would not be handshaking if it only had 8 peers?
Don't know.. Maybe a bug.
BitShares committee member: abit
BitShares witness: in.abit

Offline puppies

  • Hero Member
  • *****
  • Posts: 1659
    • View Profile
  • BitShares: puppies

The latter 'connect_to_endpoint' ones seem to be 'bitshares_client' but not 'graphene'.
Code: [Select]
p2p.log.20150822T220000:2015-08-22T22:04:04 p2p:message read_loop disconnect_from_peer ] Disconnecting from 178.62.91.161:2009 for You are on a different chain from me                 node.cpp:4493
that's pretty funny.

Any idea why my node would not be handshaking if it only had 8 peers?
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline spartako

  • Sr. Member
  • ****
  • Posts: 401
    • View Profile
I have found this error in my witness:

Code: [Select]
1249999ms th_a       witness.cpp:243               block_production_loo ] Witness 1.6.4231 production slot has arrived; generating a block now...
1250000ms th_a       witness.cpp:266               block_production_loo ] Got exception while generating block:
10 assert_exception: Assert Exception
_consecutive_production_enabled || db.get_dynamic_global_properties().current_witness != scheduled_witness: Last block was generated by the same witness, this node is probably disconnect
ed from the network so block production has been disabled.  Disable this check with --allow-consecutive option.
    {}
    th_a  witness.cpp:248 block_production_loop

Is it related to p2p problem?
Looks like you're on a fork.. Try restart, if it happen again try restart with --resync-blockchain.

I restarted and it seems working now, thanks!
wallet_account_set_approval spartako

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4664
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
I'm at work and only have access to my vps through my phone.  Corporate vpn blocks port 22.  This is what I've got
Code: [Select]
2015-08-23T21:00:07 p2p:p2p_network_connect_loop display_current_conn ] Currently have 8 of [20/200] connections               $2015-08-23T21:00:07 p2p:p2p_network_connect_loop display_current_conn ]    my id is 9ba089ffa726097f30b96f85510d79f6e4c2a53af47$2015-08-23T21:00:07 p2p:p2p_network_connect_loop display_current_conn ]         active: 178.62.88.151:59148 with 00bdfa3f396cf7$2015-08-23T21:00:07 p2p:p2p_network_connect_loop display_current_conn ]         active: 178.62.88.151:41574 with 5d33f74a83e257$2015-08-23T21:00:07 p2p:p2p_network_connect_loop display_current_conn ]         active: 176.9.234.167:34858 with 86a353604829f9$2015-08-23T21:00:07 p2p:p2p_network_connect_loop display_current_conn ]         active: 104.156.226.183:60715 with 24f8ce11c3bd$2015-08-23T21:00:07 p2p:p2p_network_connect_loop display_current_conn ]         active: 45.115.36.171:57281 with 256a70048ea155$2015-08-23T21:00:07 p2p:p2p_network_connect_loop display_current_conn ]         active: 188.226.252.109:58843 with 7ea834eafbcd$2015-08-23T21:00:07 p2p:p2p_network_connect_loop display_current_conn ]         active: 216.252.204.69:65026 with e8f88c156e162$2015-08-23T21:00:07 p2p:p2p_network_connect_loop display_current_conn ]         active: 128.68.89.226:55445 with 8b9a48d3943899$2015-08-23T21:00:07 p2p:p2p_network_connect_loop  connect_to_endpoint ] node_impl::connect_to_endpoint(178.62.91.161:2009)     $2015-08-23T21:00:07 p2p:p2p_network_connect_loop  connect_to_endpoint ] node_impl::connect_to_endpoint(46.226.109.66:1778)     $2015-08-23T21:00:07 p2p:p2p_network_connect_loop  connect_to_endpoint ] node_impl::connect_to_endpoint(5.189.131.201:2009)     $2015-08-23T21:00:07 p2p:p2p_network_connect_loop  connect_to_endpoint ] node_impl::connect_to_endpoint(46.226.15.26:40706)     $2015-08-23T21:00:07 p2p:p2p_network_connect_loop  connect_to_endpoint ] node_impl::connect_to_endpoint(46.226.12.230:2009)     $2015-08-23T21:00:07 p2p:p2p_network_connect_loop  connect_to_endpoint ] node_impl::connect_to_endpoint(185.25.22.21:2776)      $2015-08-23T21:00:07 p2p:p2p_network_connect_loop  connect_to_endpoint ] node_impl::connect_to_endpoint(69.172.229.183:2883)    $2015-08-23T21:00:07 p2p:p2p_network_connect_loop  connect_to_endpoint ] node_impl::connect_to_endpoint(66.172.11.223:1700)     $
And apparently juicessh saves the output all on one line.  Scroll to the right or quote of its easier.
OK, I've checked them. You have 8 connections, the first 6 are in my seed node list, the last 2 are incoming.

The latter 'connect_to_endpoint' ones seem to be 'bitshares_client' but not 'graphene'.
Code: [Select]
p2p.log.20150822T220000:2015-08-22T22:04:04 p2p:message read_loop disconnect_from_peer ] Disconnecting from 178.62.91.161:2009 for You are on a different chain from me                 node.cpp:4493
BitShares committee member: abit
BitShares witness: in.abit

Offline puppies

  • Hero Member
  • *****
  • Posts: 1659
    • View Profile
  • BitShares: puppies
I'm at work and only have access to my vps through my phone.  Corporate vpn blocks port 22.  This is what I've got
Code: [Select]
2015-08-23T21:00:07 p2p:p2p_network_connect_loop display_current_conn ] Currently have 8 of [20/200] connections               $2015-08-23T21:00:07 p2p:p2p_network_connect_loop display_current_conn ]    my id is 9ba089ffa726097f30b96f85510d79f6e4c2a53af47$2015-08-23T21:00:07 p2p:p2p_network_connect_loop display_current_conn ]         active: 178.62.88.151:59148 with 00bdfa3f396cf7$2015-08-23T21:00:07 p2p:p2p_network_connect_loop display_current_conn ]         active: 178.62.88.151:41574 with 5d33f74a83e257$2015-08-23T21:00:07 p2p:p2p_network_connect_loop display_current_conn ]         active: 176.9.234.167:34858 with 86a353604829f9$2015-08-23T21:00:07 p2p:p2p_network_connect_loop display_current_conn ]         active: 104.156.226.183:60715 with 24f8ce11c3bd$2015-08-23T21:00:07 p2p:p2p_network_connect_loop display_current_conn ]         active: 45.115.36.171:57281 with 256a70048ea155$2015-08-23T21:00:07 p2p:p2p_network_connect_loop display_current_conn ]         active: 188.226.252.109:58843 with 7ea834eafbcd$2015-08-23T21:00:07 p2p:p2p_network_connect_loop display_current_conn ]         active: 216.252.204.69:65026 with e8f88c156e162$2015-08-23T21:00:07 p2p:p2p_network_connect_loop display_current_conn ]         active: 128.68.89.226:55445 with 8b9a48d3943899$2015-08-23T21:00:07 p2p:p2p_network_connect_loop  connect_to_endpoint ] node_impl::connect_to_endpoint(178.62.91.161:2009)     $2015-08-23T21:00:07 p2p:p2p_network_connect_loop  connect_to_endpoint ] node_impl::connect_to_endpoint(46.226.109.66:1778)     $2015-08-23T21:00:07 p2p:p2p_network_connect_loop  connect_to_endpoint ] node_impl::connect_to_endpoint(5.189.131.201:2009)     $2015-08-23T21:00:07 p2p:p2p_network_connect_loop  connect_to_endpoint ] node_impl::connect_to_endpoint(46.226.15.26:40706)     $2015-08-23T21:00:07 p2p:p2p_network_connect_loop  connect_to_endpoint ] node_impl::connect_to_endpoint(46.226.12.230:2009)     $2015-08-23T21:00:07 p2p:p2p_network_connect_loop  connect_to_endpoint ] node_impl::connect_to_endpoint(185.25.22.21:2776)      $2015-08-23T21:00:07 p2p:p2p_network_connect_loop  connect_to_endpoint ] node_impl::connect_to_endpoint(69.172.229.183:2883)    $2015-08-23T21:00:07 p2p:p2p_network_connect_loop  connect_to_endpoint ] node_impl::connect_to_endpoint(66.172.11.223:1700)     $
And apparently juicessh saves the output all on one line.  Scroll to the right or quote of its easier.
« Last Edit: August 23, 2015, 09:52:48 pm by puppies »
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4664
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
At present I'm using these seed nodes, but I don't know which ones are started with fixed ports.
Code: [Select]
-s "104.236.51.238:1776" -s "176.221.43.130:33323" -s "45.55.6.216:1776" -s "114.92.254.159:62015" -s 104.156.226.183:60715 -s 104.156.226.183:40479 -s 104.236.255.53:52995 -s 176.9.234.167:34858 -s 176.9.234.167:57727 -s 178.62.88.151:59148 -s 178.62.88.151:41574 -s 188.226.252.109:58843 -s 45.115.36.171:57281 -s 45.55.6.216:37308
BitShares committee member: abit
BitShares witness: in.abit

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4664
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
45.55.6.216:1776 is still up
Code: [Select]
}
unlocked >>> info
info
{
  "head_block_num": 245425,
  "head_block_id": "0003beb1a638ed50d318117d014424d44c2b2360",
  "head_block_age": "0 second old",
  "next_maintenance_time": "5 minutes in the future",
  "chain_id": "d011922587473757011118587f93afcc314fbaea094fc1055574721b27975083",
  "active_witnesses":

Yes, the port is open, but it doesn't response with a handshake message when connected.
Code: [Select]
2015-08-23T21:27:10 p2p:terminate_inactive_connections_loop terminate_inactive_c ] Forcibly disconnecting from handshaking peer 45.55.6.216:1776 due to inactivity of at least 5 seconds                        node.cpp:1270
2015-08-23T21:27:10   p2p:connect_to_task           connect_to ] fatal: error connecting to peer 45.55.6.216:1776: 0 exception: unspecified

Can you check p2p.log and see if there is any successful incoming connection?
Code: [Select]
grep inbound p2p.log|grep active

By check p2p.log we can also found what seed nodes we're connected with:
Code: [Select]
grep onbound p2p.log|grep active
« Last Edit: August 23, 2015, 09:54:55 pm by abit »
BitShares committee member: abit
BitShares witness: in.abit

Offline puppies

  • Hero Member
  • *****
  • Posts: 1659
    • View Profile
  • BitShares: puppies
45.55.6.216:1776 is still up
Code: [Select]
}
unlocked >>> info
info
{
  "head_block_num": 245425,
  "head_block_id": "0003beb1a638ed50d318117d014424d44c2b2360",
  "head_block_age": "0 second old",
  "next_maintenance_time": "5 minutes in the future",
  "chain_id": "d011922587473757011118587f93afcc314fbaea094fc1055574721b27975083",
  "active_witnesses":
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4664
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
Quote
-s "104.236.51.238:1776" -s "176.221.43.130:33323" -s "45.55.6.216:1776" -s "114.92.254.159:62015"
It seems that the seed nodes are all dead. If anyone know any good node please post here. Thanks.

//EDIT:
To become a seed node, add "--p2p-endpoint" parameter when launching witness_node, and remember to configure firewall/NAT to allow incoming connection, since witness_node doesn't enable uPNP by default.
Code: [Select]
./witness_node --p2p-endpoint "0.0.0.0:A_FIXED_PORT" --rpc-endpoint "127.0.0.1:8090"  --genesis-json aug-20-test-genesis.json -d test_net_1 -s "104.236.51.238:1776" -s "176.221.43.130:33323" -s "45.55.6.216:1776" -s "114.92.254.159:62015" 

Note it's better to use a new node but not your block-producing node for seed node.
« Last Edit: August 23, 2015, 09:04:25 pm by abit »
BitShares committee member: abit
BitShares witness: in.abit

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4664
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
I have found this error in my witness:

Code: [Select]
1249999ms th_a       witness.cpp:243               block_production_loo ] Witness 1.6.4231 production slot has arrived; generating a block now...
1250000ms th_a       witness.cpp:266               block_production_loo ] Got exception while generating block:
10 assert_exception: Assert Exception
_consecutive_production_enabled || db.get_dynamic_global_properties().current_witness != scheduled_witness: Last block was generated by the same witness, this node is probably disconnect
ed from the network so block production has been disabled.  Disable this check with --allow-consecutive option.
    {}
    th_a  witness.cpp:248 block_production_loop

Is it related to p2p problem?
Looks like you're on a fork.. Try restart, if it happen again try restart with --resync-blockchain.
BitShares committee member: abit
BitShares witness: in.abit

Offline betax

  • Hero Member
  • *****
  • Posts: 808
    • View Profile
@betax: could you put your tutorial into the github wiki please? If not, may I do it for you?

It's here: https://github.com/cryptonomex/graphene/wiki/How-to-setup-your-witness-for-test-net-(Ubuntu-14.04)

Please feel free to correct anything.
« Last Edit: August 23, 2015, 08:35:09 pm by betax »
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline betax

  • Hero Member
  • *****
  • Posts: 808
    • View Profile
14. Restart with parameters to start block producing (block producing needs your witness id and private keys) Current node abit's for test 1
Code: [Select]
./witness_node --rpc-endpoint "127.0.0.1:8090"  --genesis-json aug-14-test-genesis.json -d test_net_1 -s 114.92.254.159:62015  --witness-id '"1.6.5156"' --private-key '["GPH6JhL..your.signing.key..bc5mWyCvERV3coy","5K..your.secret..a"]'15. See your witness producing blocks and
you can Ctrl A Ctrl D to detach from screen.
Thanks for sharing, but don't use my node(at least not only use my node), it breaks now and then.
And the genesis file in step 14 should be aug-20-test-genesis.json.

Here is a list of nodes I'm using (still breaks sometimes):
Code: [Select]
./witness_node --rpc-endpoint "127.0.0.1:8090"  --genesis-json  aug-20-test-genesis.json -d test_net_1 -s "104.236.51.238:1776" -s "176.221.43.130:33323" -s "45.55.6.216:1776" -s "114.92.254.159:62015"

Thanks ill add more nodes and correct it now..
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads