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

0 Members and 1 Guest are viewing this topic.

Offline bytemaster

If the network can fall back on peer-to-peer upon root failure. I think this should be fine.

What if the root is compromised and starts sending out transactions in an order which favours it?

Good question and a valid concern.  Let BM explain the rationale.

The idea is that the root node is "real time" and doesn't get an opportunity to buffer and reorder.  Though technically it could.   The witnesses would then decide whether or not they want to coordinate via a central service to provide higher reliability or whether they wish to remain P2P.

Now granted, the relay code was written in one day and still has some issues that need to be resolved.   For example, if the root node goes on a temporary fork then all peers on the relay network get stuck.

JavaScript is easier to write / debug than C++ and more people around here can probably help improve it.

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 lafona

  • Sr. Member
  • ****
  • Posts: 231
    • View Profile
  • BitShares: lafona
Got stuck in same place overnight.

Code: [Select]
  "head_block_num": 123659,
  "head_block_id": "0001e30bae565a49fa6a29f751dadead994fd312",
  "head_block_age": "7 hours old",
  "next_maintenance_time": "7 hours ago",
  "chain_id": "ecbde738ba0b319cb4d266e613b200d010da8b37313c20aec03f9c8e2d9b35e3",
  "participation": "82.81250000000000000",
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
If the network can fall back on peer-to-peer upon root failure. I think this should be fine.

What if the root is compromised and starts sending out transactions in an order which favours it?

Good question and a valid concern.  Let BM explain the rationale.
ID: bitcube
bitcube is a dedicated witness and committe member. Please vote for bitcube.

Offline monsterer

If the network can fall back on peer-to-peer upon root failure. I think this should be fine.

What if the root is compromised and starts sending out transactions in an order which favours it?
My opinions do not represent those of metaexchange unless explicitly stated.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline cube

  • Hero Member
  • *****
  • Posts: 1404
  • Bit by bit, we will get there!
    • View Profile
  • BitShares: bitcube
Why doesn't this change the security model of the network? Who gets to be the root node? What if that node goes down?
I was wondering about this as well
The script is more like a proxy that reduces the load on the witness ... the P2P ports are opened and maintained (proxied to the witness) by the nodeJS script

If the network can fall back on peer-to-peer upon root failure. I think this should be fine.
ID: bitcube
bitcube is a dedicated witness and committe member. Please vote for bitcube.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Why doesn't this change the security model of the network? Who gets to be the root node? What if that node goes down?
I was wondering about this as well
The script is more like a proxy that reduces the load on the witness ... the P2P ports are opened and maintained (proxied to the witness) by the nodeJS script

Offline monsterer

Why doesn't this change the security model of the network? Who gets to be the root node? What if that node goes down?
My opinions do not represent those of metaexchange unless explicitly stated.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline svk

Got synced up to block 123659 but now I'm stuck.
Worker: dev.bitsharesblocks

Offline cube

  • Hero Member
  • *****
  • Posts: 1404
  • Bit by bit, we will get there!
    • View Profile
  • BitShares: bitcube
It's stuck now.

UNABLE TO FIND BLOCK:  123657

Me too
Code: [Select]
info
{
  "head_block_num": 123660,
  "head_block_id": "0001e30c380cf6e155c388b77b0fc05862ce20f9",
  "head_block_age": "32 minutes old",
  "next_maintenance_time": "29 minutes ago",
  "chain_id": "ecbde738ba0b319cb4d266e613b200d010da8b37313c20aec03f9c8e2d9b35e3",
  "participation": "42.18750000000000000",
  "active_witnesses": [

Same result.  Stuck.

Code: [Select]
{
  "head_block_num": 123659,
  "head_block_id": "0001e30bb947c35176dfe5271ccf504682ce0ed7",
  "head_block_age": "3 hours old",
  "next_maintenance_time": "3 hours ago",
  "chain_id": "ecbde738ba0b319cb4d266e613b200d010da8b37313c20aec03f9c8e2d9b35e3",
  "participation": "82.03125000000000000",

ID: bitcube
bitcube is a dedicated witness and committe member. Please vote for bitcube.

Offline toast

  • Hero Member
  • *****
  • Posts: 4001
    • View Profile
  • BitShares: nikolai
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.

Are there docs for how this tree structure is created/maintained?

Also, since when does bytemaster write anything in javascript? =P
Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Offline svk

I'm getting this error while trying to get synced up:

Code: [Select]
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":13876,"head":72389,"max_size":12}\n    th_a  fork_database.cpp:70 _push_block\n\n    {"new_block":{"previous":"00003633640d0136407e06e19c7f2c5bdd69e5d5","timestamp":"2015-09-01T16:58:00","witness":"1.6.11","transaction_merkle_root":"0000000000000000000000000000000000000000","extensions":[],"witness_signature":"1f05778a72f0b9f3933940bb92ba45d0ca102e3b199b66711176f9193028e85cb75588f5307e21ea40e887a54b801958deba5a55e36121641ecd447b071425afb8","transactions":[]}}\n    th_a  db_block.cpp:176 _push_block',
  data:
   { code: 10,
     name: 'assert_exception',
     message: 'Assert Exception',
     stack: [ [Object], [Object] ] } }
!!! GrapheneApi error:  broadcast_block [ { previous: '00003634b03a696314a900b852b58c9f3055411b',
    timestamp: '2015-09-01T16:58:05',
    witness: '1.6.88',
    transaction_merkle_root: '0000000000000000000000000000000000000000',
    extensions: [],
    witness_signature: '200299652ccc50ab1a1ea7f6d3c9dc766481e0942b615d5d5a6fe0810d3f09129c305abf31e0e9db05c61adea40c9836cbb051819e930eab291067e61cb5d101c2',
    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":13877,"head":72389,"max_size":12}\n    th_a  fork_database.cpp:70 _push_block\n\n    {"new_block":{"previous":"00003634b03a696314a900b852b58c9f3055411b","timestamp":"2015-09-01T16:58:05","witness":"1.6.88","transaction_merkle_root":"0000000000000000000000000000000000000000","extensions":[],"witness_signature":"200299652ccc50ab1a1ea7f6d3c9dc766481e0942b615d5d5a6fe0810d3f09129c305abf31e0e9db05c61adea40c9836cbb051819e930eab291067e61cb5d101c2","transactions":[]}}\n    th_a  db_block.cpp:176 _push_block',
  data:
   { code: 10,
     name: 'assert_exception',
     message: 'Assert Exception',
     stack: [ [Object], [Object] ] } }

Strangely I'm seeing this in the witness_node output:

Code: [Select]
712883ms th_a       db_block.cpp:86               push_block           ] new_block.block_num(): 119327 new_block.id(): 0001d21f87bd22853130326091e5efb1faa8e592
712886ms th_a       db_block.cpp:86               push_block           ] new_block.block_num(): 119328 new_block.id(): 0001d2204fff78f7af81b57046e291dcef1fe3aa
712909ms th_a       db_block.cpp:86               push_block           ] new_block.block_num(): 15439 new_block.id(): 00003c4f5b29ca50cd0fa565a8bc75f5cfe868a5
712909ms th_a       db_block.cpp:86               push_block           ] new_block.block_num(): 15440 new_block.id(): 00003c5070ef8259c41a6839bf6be8869e1162d0
712910ms th_a       db_block.cpp:86               push_block           ] new_block.block_num(): 15441 new_block.id(): 00003c5152cfd4c179622e102aa6bd16e500d601
712911ms th_a       db_block.cpp:86               push_block           ] new_block.block_num(): 15442 new_block.id(): 00003c5296d802f94f7f881c6d8a72caeecb1cd5
712912ms th_a       db_block.cpp:86               push_block           ] new_block.block_num(): 15443 new_block.id(): 00003c5391bc89741c6213b5cb84d88bd44e7b23
712912ms th_a       db_block.cpp:86               push_block           ] new_block.block_num(): 15444 new_block.id(): 00003c5423e90c1df272983990a7802b174c1969
712913ms th_a       db_block.cpp:86               push_block           ] new_block.block_num(): 15445 new_block.id(): 00003c5579120007b200eb409f080a2bded5b984
712914ms th_a       db_block.cpp:86               push_block           ] new_block.block_num(): 15446 new_block.id(): 00003c56964d726fd5d3e1b0f0259f33e9f025af
712914ms th_a       db_block.cpp:86               push_block           ] new_block.block_num(): 15447 new_block.id(): 00003c57e1e057bee2284b9c7b0dc7352c20e5ac
712915ms th_a       db_block.cpp:86               push_block           ] new_block.block_num(): 15448 new_block.id(): 00003c58714d00006a6949da7339934cbdcf8d16
712915ms th_a       db_block.cpp:86               push_block           ] new_block.block_num(): 15449 new_block.id(): 00003c59700747724b5fb2f432af204124be9b1e
712916ms th_a       db_block.cpp:86               push_block           ] new_block.block_num(): 15450 new_block.id(): 00003c5a6122e27542e9787b1d4a394dd74ebd73
712917ms th_a       db_block.cpp:86               push_block           ] new_block.block_num(): 15451 new_block.id(): 00003c5b15c482cb6ed742549847a6ee8d355b9e
712918ms th_a       db_block.cpp:86               push_block           ] new_block.block_num(): 15452 new_block.id(): 00003c5c3f23330815f76136305b06b9f2a8d6fe
712918ms th_a       db_block.cpp:86               push_block           ] new_block.block_num(): 15453 new_block.id(): 00003c5d6df2b553f55d1c7f16dcd6fa281109aa
712919ms th_a       db_block.cpp:86               push_block           ] new_block.block_num(): 15454 new_block.id(): 00003c5ecfa9942c7d7ddbc3201e29eed79cf3dc
712922ms th_a       db_block.cpp:86               push_block           ] new_block.block_num(): 119329 new_block.id(): 0001d221110e00f5907bcac85bc30883840d828a
712925ms th_a       db_block.cpp:86               push_block           ] new_block.block_num(): 119330 new_block.id(): 0001d2228dfea95ab84a148f99b532d97c6ac253
712929ms th_a       db_block.cpp:86               push_block           ] new_block.block_num(): 119331 new_block.id(): 0001d22328872cd7f4114498c3b86ab708d0e262
712932ms th_a       db_block.cpp:86               push_block           ] new_block.block_num(): 119332 new_block.id(): 0001d22480b153ae3b5de932e9a0efefd83c6a8e
712936ms th_a       db_block.cpp:86               push_block           ] new_block.block_num(): 119333 new_block.id(): 0001d225daa0b9825becfd3c4ff6ba9cae738903

If I stop the the relay server syncing stops on the witness_node, despite all the errors I'm seeing related to pushing blocks that are too old.
Worker: dev.bitsharesblocks

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Code: [Select]
npm install forever
 ./node_modules/forever/bin/forever start bootstrap.js
to have it restarted automatically on crashes

Offline puppies

  • Hero Member
  • *****
  • Posts: 1659
    • View Profile
  • BitShares: puppies
It's stuck now.

UNABLE TO FIND BLOCK:  123657

Me too
Code: [Select]
info
{
  "head_block_num": 123660,
  "head_block_id": "0001e30c380cf6e155c388b77b0fc05862ce20f9",
  "head_block_age": "32 minutes old",
  "next_maintenance_time": "29 minutes ago",
  "chain_id": "ecbde738ba0b319cb4d266e613b200d010da8b37313c20aec03f9c8e2d9b35e3",
  "participation": "42.18750000000000000",
  "active_witnesses": [
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline clayop

  • Hero Member
  • *****
  • Posts: 2033
    • View Profile
    • Bitshares Korea
  • BitShares: clayop
Got this error with enable-stale-production option

Code: [Select]
!!! GrapheneApi error:  broadcast_transaction [ { ref_block_num: 58120,
    ref_block_prefix: 2588741439,
    expiration: '2015-09-09T04:52:43',
    operations: [ [Object] ],
    extensions: [],
    signatures: [ '1f110b687d6506e797df05dcbb00dda42185c34e630a4dd178829948eb0580a63c6480c22
4f230b2b36950611b130b03f2d5798147149ca7eb8bf1bc75166195aa' ] } ] { code: 1,
  message: '10 assert_exception: Assert Exception\ntrx.ref_block_prefix == tapos_block_summa
ry.block_id._hash[1]: \n    {}\n    th_a  db_block.cpp:518 _apply_transaction\n\n    {"trx":
{"ref_block_num":58120,"ref_block_prefix":2588741439,"expiration":"2015-09-09T04:52:43","ope
rations":[[0,{"fee":{"amount":2000000,"asset_id":"1.3.0"},"from":"1.2.17263","to":"1.2.22310
","amount":{"amount":1,"asset_id":"1.3.0"},"extensions":[]}]],"extensions":[],"signatures":[
"1f110b687d6506e797df05dcbb00dda42185c34e630a4dd178829948eb0580a63c6480c224f230b2b36950611b1
30b03f2d5798147149ca7eb8bf1bc75166195aa"]}}\n    th_a  db_block.cpp:553 _apply_transaction\n
\n    {"trx":{"ref_block_num":58120,"ref_block_prefix":2588741439,"expiration":"2015-09-09T0
4:52:43","operations":[[0,{"fee":{"amount":2000000,"asset_id":"1.3.0"},"from":"1.2.17263","t
o":"1.2.22310","amount":{"amount":1,"asset_id":"1.3.0"},"extensions":[]}]],"extensions":[],"
signatures":["1f110b687d6506e797df05dcbb00dda42185c34e630a4dd178829948eb0580a63c6480c224f230
b2b36950611b130b03f2d5798147149ca7eb8bf1bc75166195aa"]}}\n    th_a  db_block.cpp:195 push_tr
ansaction',
  data:
   { code: 10,
     name: 'assert_exception',
     message: 'Assert Exception',
     stack: [ [Object], [Object], [Object] ] } }
Bitshares Korea - http://www.bitshares.kr
Vote for me and see Korean Bitshares community grows
delegate-clayop

Offline abit

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

UNABLE TO FIND BLOCK:  123657
BitShares committee member: abit
BitShares witness: in.abit