Development Update #97

The interface is just being done in angular for now. The new angular is much cleaner.

However, npm is dumping the compiled javascript files in the same directory as the type script files, which is ugly and frustrating. I have not found the setting for setting the output directory yet.

Math Update:

I found a simple message passing algorithm that finds all nodes in the network that are not in consensus with the current node, with ~log N messages in the size of the network).

This is VERY important and a major breakthrough for verifying consensus.

A simple gossip protocol works as follows - when a nodes gets a new message, it hashes it and announces the hash of the message to every peer it is connected to - if a piece receives a hash announcement, it checks if it has the data for that hash and if not, it downloads that data from a peer that has announced the hash

This simple protocol guarantees replication of every message across every node on the network

“Gossip with counting” is as follows - a node announces a data item, which has a counter - the data item is re-announced periodically - each node sets a “count” value that it attaches to the data item, the count value is the minimum of the count values of the nodes it is connected to, plus one - the node that announced the message has count 0

If you get a count value of 7, it means the minimum path between you and the announcer is 7 hops.

In this “gossip with counting”, if the nodes are honest, you can do gradient decent - you look at all the nodes you are connected to - you “Decent” by asking the node announcing the lowest count value and then ask him, who his peer with the lowest counter value is - you keep doing this recursively until you reach the sender - if you fail at a certain step, you backtrack with depth first on the next lowest count for the current node, etc - if you see a node whose does not have a node whose announced, count value which is lower than the account value that node has announced, then the node is lying/cheating

It is even better, if the data in the gossip with counting, session is in a public broadcast file like IPFS, so that it has replication and peer-to-peer verification and does not depend on direct communication with the node for verification and replication.

There are several places for these algorithms - there is an algorithm, that can find any node that is not in consensus in the network by starting a “gossip with counting” session - another use is it may be an alternative to mining for consensus.

We previously showed that mining can be eliminated if there was a trusted time stamp authority (a single trusted node, that time stamps blocks). We also showed that consensus is more generally, the problem of assigning a total ordering to the blocks (if there is a split, or two options, the problem of resolving the two choices deterministicly).

You can simulate a shared clock between the nodes as follows - when each node receives a block, it timestamps it (64 bit time) and signs HASH(timestamp+block) - each node stores for each of its connections – the timestamp (and signature) that the node claims to have first received the block – the timestamp the current node, first heard the announcement of the time that the node claimed to have first received the time stamp

IF the clocks are synchronized, then the time another node claims to have first receive the block, will always be less than the time the notification of receipt was time-stamped by its peers.

What happens if someone injects a block 5 minutes later, that did not exist 5 minutes ago and attempts to fork the chain? What operations can your node to show that the block did not exist and should be rejected?

There are more complicated versions - two stage time stamp commit protocols, where you announce a candidate time stamp (or range which narrows each round) - then you must choose a time stamp, that is not less than 30% of the lowests time stamps of the people you are following

Mathematical Representations of Distributed Systems

I finally have a good mathematical model, that is very simple, which has simple algebraic properties that can be reasoned about and which is executable for simulation.

This sounds very boring and would not seem to have any avantages over C or golang, however it simplies - the skycoin blockchain - the consensus algorithm - the meshnet - the exchange - simulating interacting components - unit testing algebraic properties and behaviors of systems of interacting components

Especially for simulation.

For unit testings, I have to - spawn N computers under one universe (a context running a universe) - setup initial state (give them program) - each at the top level, shuffle the order of the packets and choose one packet (length prefixed message to deliver) - run until each computer in the universe is in an idempotent state (until it halts) - serialize state of top level computer to a []char and hash it, also write down how many packets/cycles it took


I need to be able to spawn a whole network, run it and then crunch it down to a few numbers or a graph.

Both Bitcoin and Skycoin and the meshnet are cooperative multi-agent systems. - P2P like bitorrent and Bitcoin is the boring case where every agent is the same, passing same messages - the Skycoin meshnet has to deal with computers, controlling computers and networks of computers engaging in cooperative, competitive and coordinated action to solve optimization tasks across the network and accomplish goal.

The meshnet nodes are not just calling data APIs on each each, but need to communicate in both data and programs.

If you have a metric that you can measure or a goal, and you have multiple programs or methods for accomplishing that goal, the program will be able to evaluate the scripts and choose the best or most effective one. It will also be able to do this at the system level and the system of system of level because the description of the programming language is closed under reification.

No translation bounty

Read about the Skycoin Bounty Program

Discuss this post on telegram

Skycoin Telegram