Author Topic: Dry Run 5: The Final Countdown  (Read 54023 times)

0 Members and 1 Guest are viewing this topic.

Offline BTSdac

  • Hero Member
  • *****
  • Posts: 1219
    • View Profile
  • BitShares: K1
We do not disconnect nodes that are on a fork at the moment.  So you cannot use the connection count as an indicator of your fork status.
I dont konw if you reply to me ,
Code: [Select]
  "blockchain_head_block_num": 2633,
  "blockchain_head_block_time": "20140625T062930",
  "blockchain_head_block_time_rel": "28 minutes old",
  "blockchain_confirmation_requirement": 303,
  "blockchain_average_delegate_participation": 44.888888888888886,
  "network_num_connections": 45,
  "ntp_time": "20140625T065726.868608",
  "ntp_error_seconds": -0.014512000000000001,
  "wallet_unlocked_seconds_remaining": 0,
  "wallet_next_block_production_time": null,
  "wallet_seconds_until_next_block_production": null,
  "wallet_local_time": "20140625T065726",
  "blockchain_random_seed": "736362e9df6cd562307b713aae1eb75c3d11b88d",
  "blockchain_shares": 199999351280463,
  "network_num_connections_max": 200,
  "network_protocol_version": 103,
  "wallet_open": true,
  "wallet_unlocked_until": "20140624T023103",
  "wallet_version": 100

Code: [Select]
{
  "bitshares_toolkit_revision": "5c7b143f810a60f168dcae3dbdb3099aa3dde1a0",
  "bitshares_toolkit_revision_age": "32 hours ago",
  "fc_revision": "3de924b33647a9a547b772a58415835f021f92b3",
  "fc_revision_age": "83 hours ago",
  "compile_date": "compiled on Jun 23 2014 at 20:33:28"
it is obviously  that I am on a fork chain , but it seems that the clent did`t do any effort to back to main chain .
"network_num_connections": 45
and I have 45 connections,  it is close to max num of connections  50, I don`t konw if it  weaken the ability of client to find new node that on the main chain

« Last Edit: June 25, 2014, 07:06:10 am by BTSdac »
github.com :pureland
BTS2.0 API :ws://139.196.37.179:8091
BTS2.0 API 数据源ws://139.196.37.179:8091

Offline bytemaster

I am doing some spam testing. why I get negative delegate votes?  ???

see from the block explorer,like block #2972

Code: [Select]
NET DELEGATE VOTES
bts101:  -0.1 XTS
bts102:  -0.1 XTS
bts103:  1 XTS


This is very curious.... looks like a TRX fee amount.   
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline bytemaster

Code: [Select]
HEIGHT    TIME                          TXN COUNT      SIGNING DELEGATE                                                 SIZE   
--------------------------------------------------------------------------------------------------------------------------------
2976      2014-06-25T06:43:30           38             vikram11                                                         11548   
2975      2014-06-25T06:39:00           19             init95                                                           4761   
2974      2014-06-25T06:38:30           167            init79                                                           40430   
2973      2014-06-25T06:38:00           235            init51                                                           56818   
2972      2014-06-25T06:37:30           113            init92                                                           27511   
2971      2014-06-25T06:37:00           466            init81                                                           112489 
2970      2014-06-25T06:36:30           310            immortal                                                         74989   
2969      2014-06-25T06:35:00           190            init52                                                           46074   
2968      2014-06-25T06:34:30           722            init54                                                           174862 
2967      2014-06-25T06:34:00           870            init76                                                           209853 
2966      2014-06-25T06:33:00           868            init58                                                           209664 
2965      2014-06-25T06:32:00           0              vikram6                                                          182     
2964      2014-06-25T06:31:30           2              init84                                                           856     
2963      2014-06-25T06:31:00           481            init100                                                          117256 
2962      2014-06-25T06:30:30           0              bts102                                                           182     
2961      2014-06-25T06:29:00           465            init77                                                           113400 
2960      2014-06-25T06:28:00           226            init45                                                           55326   
2959      2014-06-25T06:27:30           368            init66                                                           90929   
2958      2014-06-25T06:27:00           0              vikram10                                                         182     
2957      2014-06-25T06:25:30           2              init49                                                           664 

Looking good.. that is some serious stress testing... transaction rates north of Bitcoins 7 trx per second...
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline laow

  • Full Member
  • ***
  • Posts: 155
    • View Profile
I have updated to the latest code, and  doing some spam testing. why I get negative delegate votes?  ???

see from the block explorer,like block #2972

Code: [Select]
NET DELEGATE VOTES
bts101:  -0.1 XTS
bts102:  -0.1 XTS
bts103:  1 XTS

« Last Edit: June 25, 2014, 06:52:33 am by bts101 »
BTS acount: laow

Offline bytemaster

We do not disconnect nodes that are on a fork at the moment.  So you cannot use the connection count as an indicator of your fork status.
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
I just noticed a block with a timestamp almost 30 seconds in the future... very curious.
Wasnt me, at least not intentionally. My server's time is synchronized via ntp.

Offline BTSdac

  • Hero Member
  • *****
  • Posts: 1219
    • View Profile
  • BitShares: K1
@bytemaster ;@toast
5轮测试后,看起来之前一直没有真正找到分岔的原因,真正定位到问题上。建议:
1.在测试版中,可以所有的代理接点连接到一个固定的接点,当代理接点生成一个块的时候,将生成的需要的LOG信息按顺序发送到这个固定的接点,这样在这个固定的接点上就可以很清楚了解什么时间,某个代表,导致了分岔,有一个整体的了解,配合代理接点更详细的LOG信息,真正定位问题点。
2.从已经开发的POS币上借鉴阻止分岔的好的设计方法。
3.如果在实际运行中发生了分岔,如何处理。

Each case of fork has been different. We have fixed all previous ones and discover new ones when we do more serious stress testing. Existing POS systems are too different for us to learn from them. Suggestion to have centralized server doesn't help because central server is just like a delegate - if server works then delegate works, if delegate doesn't then server wouldn't.
Dear BM and Toast
     I notice chain always have fork problem , I am not a programer,cannot been able to read C++ code. but can you explain some thing , maybe some question I ask are foolish.
1.how to judge which chain is the longer/main chain ?  chain honored by delegates have more voting/stake?
   
2.I think Dpos is a complicated algorithm, it many regulation,if all clients are honest,  which delegate have more chance to create block 
    (1).have more stake ?
    (2).have more voting ?
    (3).have network with more high speed ?
    (4).honest one ?
3.according to timestamp of block, does each client have the ability to judge if block itself received is the newest one  or very close to the newest ?  does client can judge if itself in a main chain or fork chain?
4.if a client/delegate doubt/find itself is in a fork chain , what itself can do now ?   inquiry from P2P network continually to find the main chain, or there is a seed node every clent/delegate can connect to check if itself is in main chain  if it doubt itself is in fork chain ?
5.if there are two chains in the P2P network.  and one client/delegate received two chains both , how to compare the two chains and select the longer one then broadcast longer one to P2P network again ,then make it much longer/longest.


Br
BTSDac

1) Longer simply means more blocks.
2) Each delegate in top 101 (elected by stake-vote) has a chance to produce a block once per round.
3) The client decides it is on the main chain if the most recent block has the most recent expected timestamp and it is the longest known chain. A client can know for sure it is on the main chain if more than half of the last round of delegates signed blocks on the chain it is currently on.
4) Just keep asking peers if they know a longer chain, just like bitcoin
5) Again, simply which chain is longer.


Our forking problems now are a result of two issues: long block production time and problems with transactions it thinks are duplicates when switching back to the main fork.
Code: [Select]
--- there are now 45 active connections to the p2p network
--- there are now 46 active connections to the p2p network
--- there are now 47 active connections to the p2p network
roy (unlocked) >>> info
{
  "blockchain_head_block_num": 2633,
  "blockchain_head_block_time": "20140625T062930",
  "blockchain_head_block_time_rel": "8 minutes old",
  "blockchain_confirmation_requirement": 303,
  "blockchain_average_delegate_participation": 45.701357466063349,
  "network_num_connections": 47,
  "ntp_time": "20140625T063707.294604",
  "ntp_error_seconds": -0.014511,
  "wallet_unlocked_seconds_remaining": 0,
  "wallet_next_block_production_time": null,
  "wallet_seconds_until_next_block_production": null,
  "wallet_local_time": "20140625T063707",
  "blockchain_random_seed": "736362e9df6cd562307b713aae1eb75c3d11b88d",
  "blockchain_shares": 199999351280463,
  "network_num_connections_max": 200,
  "network_protocol_version": 103,
  "wallet_open": true,
  "wallet_unlocked_until": "20140624T023103",
  "wallet_version": 100

I think I am on a fork chain now ,but it seems that the client didn`t realize it , you can see this client have 46 p2p active connection,
if the client realize itself is in fork chain ,why he don`t ignore these 46 p2p active connection ,becasue these node all at the fork chain,   
github.com :pureland
BTS2.0 API :ws://139.196.37.179:8091
BTS2.0 API 数据源ws://139.196.37.179:8091

Offline bytemaster

I just noticed a block with a timestamp almost 30 seconds in the future... very curious. 
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline bytemaster

I've noticed that the CPU usages skyrockets during stress tests.
I'll increase the dedicated cores and see what happens.

The code is mostly single threaded right now..  we have a steady test running at 1 trx every 5 seconds that should run until fees eat up the funds. 

It appears that the stress test is causing some forking, likely because many delegates haven't updated to the very latest. 

Forks don't bother me too much as long as they resolve themselves in a timely manner.... it appears that is the case now.
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
I've noticed that the CPU usages skyrockets during stress tests.
I'll increase the dedicated cores and see what happens.

EDIT: I still have a lot of pending transactions...
« Last Edit: June 25, 2014, 06:29:14 am by emski »

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
well that is odd
Code: [Select]
emski (unlocked) >>> info
{
  "blockchain_head_block_num": 2948,
  "blockchain_head_block_time": "20140625T061600",
  "blockchain_head_block_time_rel": "53 seconds old",
  "blockchain_confirmation_requirement": 303,
  "blockchain_average_delegate_participation": 58.550724637681157,
  "network_num_connections": 31,
  "ntp_time": "20140625T061653.296005",
  "ntp_error_seconds": 0.001075,
  "wallet_unlocked_seconds_remaining": 999998940,
  "wallet_next_block_production_time": "20140625T061900",
  "wallet_seconds_until_next_block_production": 127,
  "wallet_local_time": "20140625T061653",
  "blockchain_random_seed": "b0f162d7132eff5f36b57b5302fd9836386540b6",
  "blockchain_shares": 199999115209829,
  "network_num_connections_max": 200,
  "network_protocol_version": 103,
  "wallet_open": true,
  "wallet_unlocked_until": "19100126T011737",
  "wallet_version": 100
}
emski (unlocked) >>> blockchain_list_forks
[
  1842,
  2577,
  2631,
  2938,
  2940,
  2943
]
--- there are now 30 active connections to the p2p network
emski (unlocked) >>> pure virtual method called
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >'
  what():  receive_from: Resource temporarily unavailable
Aborted (core dumped)


Offline bytemaster

Is someone doing some spam testing?
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
I have made some updates to the client that appear to have reduced forks significantly.   TITAN transactions are relatively expensive to scan, if you have a wallet with even one account in it, then scanning a block with 1000 trxs could take several seconds.  If you have 100 accounts, it could take minutes. 

For this reason I have disabled the wallet scanning for wallets that have enabled delegates.   I do not recommend using your delegate account as a receiving account in the same wallet. 

We will be making optimizations in the future that will multi-thread this step and move it out of the critical path of block validation.
this make sense

来自我的 HUAWEI P7-L00 上的 Tapatalk


Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
after my stress test:
Code: [Select]
emski (unlocked) >>> info
{
  "blockchain_head_block_num": 2941,
  "blockchain_head_block_time": "20140625T060600",
  "blockchain_head_block_time_rel": "45 seconds old",
  "blockchain_confirmation_requirement": 303,
  "blockchain_average_delegate_participation": 58.720930232558139,
  "network_num_connections": 32,
  "ntp_time": "20140625T060645.437978",
  "ntp_error_seconds": 0.001075,
  "wallet_unlocked_seconds_remaining": 999999548,
  "wallet_next_block_production_time": "20140625T061000",
  "wallet_seconds_until_next_block_production": 195,
  "wallet_local_time": "20140625T060645",
  "blockchain_random_seed": "1cf580c025e9d7d048da0307920d80b6d256c3e8",
  "blockchain_shares": 199999133938247,
  "network_num_connections_max": 200,
  "network_protocol_version": 103,
  "wallet_open": true,
  "wallet_unlocked_until": "19100126T011737",
  "wallet_version": 100
}
--- in sync with p2p network
emski (unlocked) >>> blockchain_list_forks
[
  1842,
  2577,
  2631,
  2938,
  2940
]
--- there are now 33 active connections to the p2p network
--- in sync with p2p network
emski (unlocked) >>> about
{
  "bitshares_toolkit_revision": "c0a8c268cd65dd7a7e4a7af0ef6f5c6c1ef763f8",
  "bitshares_toolkit_revision_age": "32 minutes ago",
  "fc_revision": "87a93940d046cc6715b67d9380dd280c27bdd867",
  "fc_revision_age": "10 hours ago",
  "compile_date": "compiled on Jun 25 2014 at 08:57:10"
}
The client seems to be responsive now.