Author Topic: Alternative Network Protocol - Testers Wanted  (Read 8444 times)

0 Members and 1 Guest are viewing this topic.

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4664
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
Produced another block and didn't get included in the main chain again.
And again.

No such issue with the old p2p protocol.

What's wrong?
« Last Edit: September 09, 2015, 04:50:59 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
From the logs I can see I generated a block but it seems didn't get included in the main chain.
//Edit: looks like it's because the correct block came later.
Code: [Select]
2015-09-09T04:28:03 th_a:Witness Block Production schedule_production_ ] now.time_since_epoch().count(): 1441772882997063 next_second:
 2015-09-09T04:28:04                      witness.cpp:146
2015-09-09T04:28:04 th_a:Witness Block Production block_production_loo ] Not producing block because slot has not yet arrived
                witness.cpp:182
2015-09-09T04:28:04 th_a:Witness Block Production schedule_production_ ] now.time_since_epoch().count(): 1441772883997067 next_second:
 2015-09-09T04:28:05                      witness.cpp:146
2015-09-09T04:28:05 th_a:Witness Block Production block_production_loo ] Not producing block because it isn't my turn
        witness.cpp:179
2015-09-09T04:28:05 th_a:Witness Block Production schedule_production_ ] now.time_since_epoch().count(): 1441772884997090 next_second:
 2015-09-09T04:28:06                      witness.cpp:146
2015-09-09T04:28:06 th_a:Witness Block Production block_production_loo ] Not producing block because it isn't my turn
        witness.cpp:179
2015-09-09T04:28:06 th_a:Witness Block Production schedule_production_ ] now.time_since_epoch().count(): 1441772885997094 next_second:
 2015-09-09T04:28:07                      witness.cpp:146
2015-09-09T04:28:07 th_a:Witness Block Production block_production_loo ] Not producing block because it isn't my turn
        witness.cpp:179
2015-09-09T04:28:07 th_a:Witness Block Production schedule_production_ ] now.time_since_epoch().count(): 1441772886997099 next_second:
 2015-09-09T04:28:08                      witness.cpp:146
2015-09-09T04:28:08 th_a:Witness Block Production block_production_loo ] Not producing block because it isn't my turn
        witness.cpp:179
2015-09-09T04:28:08 th_a:Witness Block Production schedule_production_ ] now.time_since_epoch().count(): 1441772887997102 next_second:
 2015-09-09T04:28:09                      witness.cpp:146
2015-09-09T04:28:09 th_a:Witness Block Production block_production_loo ] Not producing block because it isn't my turn
        witness.cpp:179
2015-09-09T04:28:09 th_a:Witness Block Production schedule_production_ ] now.time_since_epoch().count(): 1441772888997099 next_second:
 2015-09-09T04:28:10                      witness.cpp:146
2015-09-09T04:28:10 th_a:Witness Block Production           push_block ] new_block.block_num(): 123451 new_block.id(): 0001e23b1e939a70bd340efc1e5c5dcf484f8975                         db_block.cpp:86
2015-09-09T04:28:10 th_a:Witness Block Production block_production_loo ] Generated block #123451 with timestamp 2015-09-09T04:28:10 at
 time 2015-09-09T04:28:10                 witness.cpp:173
2015-09-09T04:28:10 th_a:Witness Block Production schedule_production_ ] now.time_since_epoch().count(): 1441772889998632 next_second:
 2015-09-09T04:28:11                      witness.cpp:146
2015-09-09T04:28:10                th_a:?           push_block ] new_block.block_num(): 123451 new_block.id(): 0001e23b1e939a70bd340ef
c1e5c5dcf484f8975                         db_block.cpp:86
2015-09-09T04:28:11 th_a:Witness Block Production block_production_loo ] Not producing block because slot has not yet arrived
                witness.cpp:182
2015-09-09T04:28:11 th_a:Witness Block Production schedule_production_ ] now.time_since_epoch().count(): 1441772890997069 next_second:
 2015-09-09T04:28:12                      witness.cpp:146
2015-09-09T04:28:12 th_a:Witness Block Production block_production_loo ] Not producing block because slot has not yet arrived
                witness.cpp:182
2015-09-09T04:28:12 th_a:Witness Block Production schedule_production_ ] now.time_since_epoch().count(): 1441772891997068 next_second:
 2015-09-09T04:28:13                      witness.cpp:146
2015-09-09T04:28:13 th_a:Witness Block Production block_production_loo ] Not producing block because slot has not yet arrived
                witness.cpp:182
2015-09-09T04:28:13 th_a:Witness Block Production schedule_production_ ] now.time_since_epoch().count(): 1441772892997044 next_second:
 2015-09-09T04:28:14                      witness.cpp:146
2015-09-09T04:28:14 th_a:Witness Block Production block_production_loo ] Not producing block because slot has not yet arrived
                witness.cpp:182
2015-09-09T04:28:14 th_a:Witness Block Production schedule_production_ ] now.time_since_epoch().count(): 1441772893997052 next_second:
 2015-09-09T04:28:15                      witness.cpp:146
2015-09-09T04:28:15 th_a:Witness Block Production block_production_loo ] Not producing block because it isn't my turn
        witness.cpp:179
2015-09-09T04:28:15 th_a:Witness Block Production schedule_production_ ] now.time_since_epoch().count(): 1441772894997099 next_second:
 2015-09-09T04:28:16                      witness.cpp:146
2015-09-09T04:28:15                th_a:?           push_block ] new_block.block_num(): 123451 new_block.id(): 0001e23b7b7768510491e30c156fe168e9bcc160                         db_block.cpp:86


Code: [Select]
get_block 123451
{
  "previous": "0001e23aefb943aced06ea1055b06b4520f09751",
  "timestamp": "2015-09-09T04:28:15",
  "witness": "1.6.65",
  "transaction_merkle_root": "0000000000000000000000000000000000000000",
  "extensions": [],
  "witness_signature": "1f4eef9dda295a5eeaf0f3f2feb11f00ee65cbbb8e507002d6fcd12527cb23a1142049714b5a9ebdd24fc59fca4c3008c857a3fd90197bb8ea5dae39ff170f5eaa",
  "transactions": [],
  "block_id": "0001e23b7b7768510491e30c156fe168e9bcc160",
  "signing_key": "GPH7eYmrY2wJq8fn8gRSN3eXWSgMoyZYFPYRD6F5uhwNuwzDuFCYE"
}
« Last Edit: September 09, 2015, 04:36:58 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
There are errors with "cd ../relay;npm install", but it can run.

Logs are crazy scrolling, lots of "Assertion Exception: failed to push a block that is too old" or so, but it's catching up.

OK, I'm in sync now.
BitShares committee member: abit
BitShares witness: in.abit

Offline puppies

  • Hero Member
  • *****
  • Posts: 1659
    • View Profile
  • BitShares: puppies
Looks like I'm in sync, but I'm not producing blocks.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline lafona

  • Sr. Member
  • ****
  • Posts: 231
    • View Profile
  • BitShares: lafona
not sure if this helps but I ran
Code: [Select]
nodejs bootstrap.js from the
Code: [Select]
/graphene-ui/relay directory
BTS Witnesses: delegate-1.lafona     Witness Thread: https://bitsharestalk.org/index.php/topic,21569.msg280911/topicseen.html#msg280911
MUSE Witness: lafona

Offline cube

  • Hero Member
  • *****
  • Posts: 1404
  • Bit by bit, we will get there!
    • View Profile
  • BitShares: bitcube
which version should use for graphene?
I have got the error message from nodejs
Code: [Select]
!!! GrapheneApi error:  broadcast_block [ { previous: '0001d8b2649ef6740ee31c74fd40e0e226b2e799',
    timestamp: '2015-09-08T23:57:00',
    witness: '1.6.76',
    transaction_merkle_root: '0000000000000000000000000000000000000000',
    extensions: [],
    witness_signature: '1f1c2b31337dd65c646b972c47546a5a89d638c7ce9d03e993a713654af15a31be68bcd628cc4ffa72e86b9b09910d7c0c5c4b08e993c7d4d9391752b6300de6a5',
    transactions: [] } ] { code: 1,
  message: '10 assert_exception: Assert Exception\nitr != _by_name.end(): no method with name \'broadcast_block\'\n    {"name":"broadcast_block","api":[["broadcast_transaction",0],["broadcast_transaction_with_callback",1]]}\n    th_a  api_connection.hpp:84 call',
  data:
   { code: 10,
     name: 'assert_exception',
     message: 'Assert Exception',
     stack: [ [Object] ] } }
on UpstreamBlock error:  { code: 1,
  message: '10 assert_exception: Assert Exception\nitr != _by_name.end(): no method with name \'broadcast_block\'\n    {"name":"broadcast_block","api":[["broadcast_transaction",0],["broadcast_transaction_with_callback",1]]}\n    th_a  api_connection.hpp:84 call',
  data:
   { code: 10,
     name: 'assert_exception',
     message: 'Assert Exception',
     stack: [ [Object] ] } }

nodejs connected but I am getting the same errors.
ID: bitcube
bitcube is a dedicated witness and committe member. Please vote for bitcube.

Offline lafona

  • Sr. Member
  • ****
  • Posts: 231
    • View Profile
  • BitShares: lafona
My witness is up and producing blocks using the jscript method. I was getting this error message for a while, but it has stopped now that the blocks have caught up.
Also I think I built from commit a748883fed08a73afaec647e2e8827d07ca3c163 (still learning git, used "git show" in graphene directory)

Code: [Select]
!!! GrapheneApi error:  broadcast_block [ { previous: '0001d8a6de1024e6b4a7105304cd54fc1504c300',
    timestamp: '2015-09-08T23:55:35',
    witness: '1.6.51',
    transaction_merkle_root: '0000000000000000000000000000000000000000',
    extensions: [],
    witness_signature: '1f427c6e912ce2fcd712baf356e37fe1bc5f6b09736fcb500bda3d73450d4119ad442af6b640182618da8095a0a6cdb12aa7e5f42ab029c0ca7e00f8910336318c',
    transactions: [] } ] { code: 1,
  message: '10 assert_exception: Assert Exception\nitem->num > std::max<int64_t>( 0, int64_t(_head->num) - (_max_size) ): attempting to push a block that is too old\n    {"item->num":120999,"head":121012,"max_size":13}\n    th_a  fork_database.cpp:70 _push_block\n\n    {"new_block":{"previous":"0001d8a6de1024e6b4a7105304cd54fc1504c300","timestamp":"2015-09-08T23:55:35","witness":"1.6.51","transaction_merkle_root":"0000000000000000000000000000000000000000","extensions":[],"witness_signature":"1f427c6e912ce2fcd712baf356e37fe1bc5f6b09736fcb500bda3d73450d4119ad442af6b640182618da8095a0a6cdb12aa7e5f42ab029c0ca7e00f8910336318c","transactions":[]}}\n    th_a  db_block.cpp:176 _push_block',
  data:
   { code: 10,
     name: 'assert_exception',
     message: 'Assert Exception',
     stack: [ [Object], [Object] ] } }
on UpstreamBlock error:  { code: 1,
  message: '10 assert_exception: Assert Exception\nitem->num > std::max<int64_t>( 0, int64_t(_head->num) - (_max_size) ): attempting to push a block that is too old\n    {"item->num":120999,"head":121012,"max_size":13}\n    th_a  fork_database.cpp:70 _push_block\n\n    {"new_block":{"previous":"0001d8a6de1024e6b4a7105304cd54fc1504c300","timestamp":"2015-09-08T23:55:35","witness":"1.6.51","transaction_merkle_root":"0000000000000000000000000000000000000000","extensions":[],"witness_signature":"1f427c6e912ce2fcd712baf356e37fe1bc5f6b09736fcb500bda3d73450d4119ad442af6b640182618da8095a0a6cdb12aa7e5f42ab029c0ca7e00f8910336318c","transactions":[]}}\n    th_a  db_block.cpp:176 _push_block',
  data:
   { code: 10,
     name: 'assert_exception',
     message: 'Assert Exception',
     stack: [ [Object], [Object] ] } }
« Last Edit: September 09, 2015, 12:13:24 am by lafona »
BTS Witnesses: delegate-1.lafona     Witness Thread: https://bitsharestalk.org/index.php/topic,21569.msg280911/topicseen.html#msg280911
MUSE Witness: lafona

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
which version should use for graphene?
I have got the error message from nodejs
Code: [Select]
!!! GrapheneApi error:  broadcast_block [ { previous: '0001d8b2649ef6740ee31c74fd40e0e226b2e799',
    timestamp: '2015-09-08T23:57:00',
    witness: '1.6.76',
    transaction_merkle_root: '0000000000000000000000000000000000000000',
    extensions: [],
    witness_signature: '1f1c2b31337dd65c646b972c47546a5a89d638c7ce9d03e993a713654af15a31be68bcd628cc4ffa72e86b9b09910d7c0c5c4b08e993c7d4d9391752b6300de6a5',
    transactions: [] } ] { code: 1,
  message: '10 assert_exception: Assert Exception\nitr != _by_name.end(): no method with name \'broadcast_block\'\n    {"name":"broadcast_block","api":[["broadcast_transaction",0],["broadcast_transaction_with_callback",1]]}\n    th_a  api_connection.hpp:84 call',
  data:
   { code: 10,
     name: 'assert_exception',
     message: 'Assert Exception',
     stack: [ [Object] ] } }
on UpstreamBlock error:  { code: 1,
  message: '10 assert_exception: Assert Exception\nitr != _by_name.end(): no method with name \'broadcast_block\'\n    {"name":"broadcast_block","api":[["broadcast_transaction",0],["broadcast_transaction_with_callback",1]]}\n    th_a  api_connection.hpp:84 call',
  data:
   { code: 10,
     name: 'assert_exception',
     message: 'Assert Exception',
     stack: [ [Object] ] } }

Offline puppies

  • Hero Member
  • *****
  • Posts: 1659
    • View Profile
  • BitShares: puppies
It seemed to take longer to sync the blockchain running the new protocol.  I'll have to time it when I get home from work.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline clayop

  • Hero Member
  • *****
  • Posts: 2033
    • View Profile
    • Bitshares Korea
  • BitShares: clayop
So witnesses can run this protocol in addition to the block producing node?
Bitshares Korea - http://www.bitshares.kr
Vote for me and see Korean Bitshares community grows
delegate-clayop

Offline puppies

  • Hero Member
  • *****
  • Posts: 1659
    • View Profile
  • BitShares: puppies
I just got it to connect.  Syncing now. 
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline bytemaster

It looks like several of you have connected and synced via this method.   Feedback appreciated.
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

The idea behind this protocol is to establish a hierarchical communication tree where new transactions and blocks flow up to the root node and are then broadcast down through all the peers in the same order.   

Under this approach there should be no forks and a block is only missed if a leaf witness is unable to get their block propagated to the root of the tree and down to the next witness within the block interval.  In this event then a witness will miss their turn but the network should go on.

Additionally, all witnesses should produce blocks with transactions in the exact same order.   Any witness that reorders transactions from the order in which they reached the root node will be very obvious.   
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

Would like to introduce a new network protocol that should help keep witnesses in sync even during high traffic periods.   It is implemented entirely in JavaScript using Node.js

First step is to set up a witness node like normal, only without giving it any P2P seed nodes. 

Code: [Select]
./witness_node --rpc-endpoint "0.0.0.0:8090"  --genesis-json aug-31-testnet-genesis.json
Checkout this repository:
https://github.com/cryptonomex/graphene-ui

Code: [Select]
cd dl; npm install
cd ../relay; npm install
./nodejs ./bootstrap.js config.js


Edit config.js to look like:

Code: [Select]
module.exports = {
  api_host: 'localhost',
  api_port: 8090,
  upstream : 'ws://104.236.51.238:1778',
  listen_port: 1779
}

The code is relatively simple and could probably be easily improved upon by any members on this forum who would like to take a stab at it. 

I would like to see all witnesses on the test network use this code to connect rather than the P2P code we currently have. 

There are known bugs in the Javascript code, but hopefully there are MANY more people around who are able to fix them and it is much easier to understand what is happening.

Thanks!
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.