Alternative Network Protocol - Testers Wanted

Started by bytemaster, September 08, 2015, 09:55:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ag

#44
I started doing some asynchronous programming in node and learning javascript this last year. this code is an abomination. I understood none of it. But will give BM some slack, I am just a novice. I have started reading ES6... so maybe I like Promises... I'll see about 'class'. A networking protocol in javascript intrigues me so I am going to try and understand it.

clayop

@bytemaster please let us know when the node is back, so we can keep testing.
Bitshares Korea - [url="http://www.bitshares.kr"]http://www.bitshares.kr[/url]
Vote for me and see Korean Bitshares community grows
delegate-clayop

clayop

Bitshares Korea - [url="http://www.bitshares.kr"]http://www.bitshares.kr[/url]
Vote for me and see Korean Bitshares community grows
delegate-clayop

betax

Quote from: bytemaster on September 09, 2015, 02:03:01 PM
Quote from: jcalfee1 on September 09, 2015, 01:49:41 PM
Quote from: toast on September 09, 2015, 07:26:51 AM
Are there docs for how this tree structure is created/maintained?

Also, since when does bytemaster write anything in javascript? =P

Good question ...  Docs or even just a hint on how that might look.

Bytemaster took probably a week to learn JavaScript and basically another week to get a good overview of our entire web architecture.  This was his contribution as a result, called the chain.js.  It has since been renamed to the ChainStore.js.

Lets just say that for all of the great things about C++, I have found I can develop faster in JavaScript and have come to appreciate the garbage collection and memory management.    Though it is annoying not having type checking to catch simple errors like the one James identified above :)   

I also like having one codebase rather than two :)

You could check TypeScript.
http://www.typescriptlang.org/

Node.js example
https://github.com/Microsoft/TypeScriptSamples/tree/master/imageboard
[url="https://metaexchange.info"]https://metaexchange.info[/url] | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

bytemaster

For the latest updates checkout my blog: [url="http://bytemaster.bitshares.org"]http://bytemaster.bitshares.org[/url]
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.

abit

Quote from: clayop on September 10, 2015, 02:17:24 AM
Is it working now? I cannot sync using this thing.
Not working for me.. I switched to the original p2p protocol.
BitShares committee member: abit
BitShares witness: in.abit

clayop

Is it working now? I cannot sync using this thing.
Bitshares Korea - [url="http://www.bitshares.kr"]http://www.bitshares.kr[/url]
Vote for me and see Korean Bitshares community grows
delegate-clayop

Thom

Wackou and I will be getting together on mumble tomorrow at 3PM CDT to discuss additional nodes on the backbone approach he has described here: http://digitalgaia.io/backbone.html.

BM, have you read Wackou's info about his backbone approach and DDOS protection scheme via backbone node proxies? It directly addresses the issue of security and more importantly for graphene connection latency.

I can't help but feel there is major overlap / reinvention of our plans from this thread.

If I am misunderstanding the intent of this thread I apologize, as I have not been able to stay in touch as well as usual due to personal issues.

Injustice anywhere is a threat to justice everywhere - MLK |  Verbaltech2 Witness Reports: [url="https://bitsharestalk.org/index.php/topic,23902.0.html"]https://bitsharestalk.org/index.php/topic,23902.0.html[/url]

monsterer

Quote from: jcalfee1 on September 09, 2015, 02:21:07 PM
Could you have independent 3rd party services publish a merkle root hash for each new block?  The entire chain you get from any independent central service has to hash all the way up to the root.  I may be over-simplifying it, but that could validate everything...

Why not just through away all the clients completely and have a plain, centralised bitshares service? I don't see the point of p2p at all when you're talking about using centralised validation service.
My opinions do not represent those of metaexchange unless explicitly stated.
[url="https://metaexchange.info"]https://metaexchange.info[/url] | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

clayop

Same here

Quote from: cube on September 09, 2015, 07:27:43 AM
Same result.  Stuck.


{
  "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",


Bitshares Korea - [url="http://www.bitshares.kr"]http://www.bitshares.kr[/url]
Vote for me and see Korean Bitshares community grows
delegate-clayop

jamesc

Quote from: monsterer on September 09, 2015, 12:53:22 PM
Quote from: bytemaster on September 09, 2015, 12:40:04 PM
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.

And how do they know the central service has not been compromised? How can they tell the difference between a poor network connection and a compromised service?

Could you have independent 3rd party services publish a merkle root hash for each new block?  The entire chain you get from any independent central service has to hash all the way up to the root.  I may be over-simplifying it, but that could validate everything...

bytemaster

Quote from: jcalfee1 on September 09, 2015, 01:49:41 PM
Quote from: toast on September 09, 2015, 07:26:51 AM
Are there docs for how this tree structure is created/maintained?

Also, since when does bytemaster write anything in javascript? =P

Good question ...  Docs or even just a hint on how that might look.

Bytemaster took probably a week to learn JavaScript and basically another week to get a good overview of our entire web architecture.  This was his contribution as a result, called the chain.js.  It has since been renamed to the ChainStore.js.

Lets just say that for all of the great things about C++, I have found I can develop faster in JavaScript and have come to appreciate the garbage collection and memory management.    Though it is annoying not having type checking to catch simple errors like the one James identified above :)   

I also like having one codebase rather than two :)
For the latest updates checkout my blog: [url="http://bytemaster.bitshares.org"]http://bytemaster.bitshares.org[/url]
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.

jamesc

#32
Quote from: toast on September 09, 2015, 07:26:51 AM
Are there docs for how this tree structure is created/maintained?

Also, since when does bytemaster write anything in javascript? =P

Good question ...  Docs or even just a hint on how that might look.

Bytemaster took probably a week to learn JavaScript and basically another week to get a good overview of our entire web architecture.  This was his contribution as a result, called the chain.js.  It has since been renamed to the ChainStore.js.

jamesc

Quote from: bytemaster on September 09, 2015, 12:40:04 PM
JavaScript is easier to write / debug than C++ and more people around here can probably help improve it.

Looks like a message parameter to "this.isKnownTransaction()" was left out here:

   isKnownTransaction( message ) {
      return this.known_trxsa.has(message) || this.known_trxsb.has(message)
   }

   addKnownTransaction( message ) {
      if( !this.isKnownTransaction() )
      {
         this.known_trxsa.add(message)
         return true;
      }
      return false
   }


This would prevent transactions from being sent from the client to the upstream 'root' node.  I created an issue in github...

I see the web socket keeps a list of its clients.  I guess this means every client holds another client list just like the root node?

monsterer

Quote from: bytemaster on September 09, 2015, 12:40:04 PM
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.

And how do they know the central service has not been compromised? How can they tell the difference between a poor network connection and a compromised service?
My opinions do not represent those of metaexchange unless explicitly stated.
[url="https://metaexchange.info"]https://metaexchange.info[/url] | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads