Skip to content

Proposal For a New Consensus Mechanism

October 22, 2017

I enjoyed reading the original bitcoin whitepaper because it is simple, effective, and pure. It doesn’t read like a sales pitch nor does it make unrealistic promises. It is a clever integration of existing engineering concepts which achieves a truly decentralized ledger. It is the pioneer of cryptocurrency and it actually works.

I dare not claim to improve upon the original design of Satoshi Nakamoto. I do, however, have a humble proposal which may (or may not) be accepted as a way to address a common blockchain problem which would not have been obvious without the widespread popularity and success of bitcoin.

Consensus

In order to be decentralized, each node must agree to accept/reject a block. This discernment must be fair and based on common rules. It must also act as a barrier to entry to prevent the chain from getting spammed by greedy miners and/or bad blocks. Like Bitcoin, most blockchains use a “Proof of Work” (PoW) mining system to achieve this. PoW introduces a NP-complete problem which must be solved per block. A SHA256 hash is calculated in brute force with an incrementing nonce until a pattern is matched.

I cooked up a quick PoW mining example in Bash:

difficulty=1
transaction="our:transaction:foo:bar"

nonce=0
found=false
while [ $found != true ];
do
    zeros=""
    for i in `seq 1 $difficulty`;
    do
        zeros+="0";
    done
    hash=`echo -n "$transaction:$nonce" | sha256sum`;
    if [[ $hash == "$zeros"* ]]; then
        found=true;
        echo "difficulty : $difficulty";
        echo "hash : $hash";
        echo "nonce : $nonce";
    fi
    ((nonce++));
done

Running this script would yield:

difficulty : 1
hash : 0236ee83c3893ebab14ba7a8f0ebd827d3afa93b6e091c601f16a6c1b8d15271 –
nonce : 7

real 0m0.156s
user 0m0.004s
sys 0m0.004s

The hash difficulty increases depending on the network’s hash rate (determined by the speed at which new blocks get introduced)

difficulty : 2
hash : 0054dcb36285441e18b1541ecf457d3d77dc965677374ccac1fa15d51e9b269a –
nonce : 59

real 0m0.255s
user 0m0.016s
sys 0m0.016s

difficulty : 3
hash : 000f514f5b86ca80ef9c50e4e62ee38492c939cf7761456f9133bd1216c44bfd –
nonce : 1751

real 0m7.113s
user 0m0.232s
sys 0m0.652s

The idea is beautiful. The mechanism is brilliant.

The Premise

– The blockchain lives on nodes (we’ll assume nodes are also miners)
– As the number of nodes increase, the strength of the blockchain increases
– Nodes are incentivized through block rewards (coins)

The Pain

Proof of Work mining is essentially a race to find a nonce that yields the correct hash pattern. There are no guarantees, and the likelihood that you’d be able to compete with large mining operations is very low. There is a clear advantage for those who a) have capital to invest in such operations and b) have access to free or inexpensive electricity. Mining pools aren’t really a workaround because a mining pool is still an operation orchestrated by a single entity with “mercenary” computational resources.

Though it’s a very small sample, please note the time to execute the above bash script at each difficulty.

This would not be a problem if the probability of being rewarded grew linear to your hash rate. However, this is not the case. One’s probability grows exponentially as their ability to compute hashes grows. Slower computers have the best chance when the correct nonce is very low. The likelihood of a low nonce decreases as the hash rate increases. The network rewards a miner, not for being fast, but for being faster than the rest of the network. This leaves the network susceptible to 51% attacks and it discourages common folks from mining.

In essence, the system designed around decentralization can be gamed to be centralized again. There is a valid argument that the reward of hijacking a cryptocurrency network is not worth the cost. While this is true, would cost truly be a hindrance to banks, governments, or other powers that may feel threatened by the existence of such a network?

Proof of Stake is another system that was introduced as an alternative to PoW. One must stake coins to be included in the pool of potential forgers that can be selected to forge the next block. The more coins you have staked, the higher your chances. This reduces the environmental footprint and allows coin holders to earn dividends. Imagine a raffle, but after each draw, the winning raffle tickets are placed back into the pool of potential winners. Once again this system rewards the bigger spenders (stakers) exponentially. Removing the raffle ticket for the next drawing would make the probability more linear.

The Goals

– Larger network
– Linear relationship between block rewards and capital investment
– Linear relationship between block rewards and uptime
– Zero slope relationship between block rewards and hash rate
– Reward uptime rather than hashing power
– No centralization
– No censorship

Proof of Collaboration

We finally arrive at my proposed solution. I call it “Proof of Collaboration” and this is how it would operate:

Decentralized node registry:
1) New node registers by creating a special “node registry” type transaction on the blockchain. The transaction would include IP address and public key.
2) Once the block containing the node registry transaction has reached finality, existing nodes on the chain acknowledge the new node.
3) If a node is reported to be offline by other nodes, it is unregistered in a similar fashion on the chain.
4) Nodes are acknowledged in ascending order by the registration’s block id. The greatest advantage goes to the longest living nodes which are guaranteed to partake in

Collaborative Mining:
1) Once a node has enough transactions to mine (forge, or whatever you wish to call it) a block, it attempts to hash it once (with the starting nonce, 0).
2) If the block pattern does not fit, it signs it and passes it forward to another node. The “package” is passed synchronously so it is not dropped in transit.
3) The next node increments the nonce, hashes it, checks the block pattern, signs it, and repeats step 2.
4) If the block pattern fits the chain, it broadcasts the block to all nodes.
5) Block rewards are divided among contributing nodes.

– Hash difficulty does not need to increase due to the nature of this system
– It may increase in proportion to the block height vs average nonce
– Increasing difficulty may be helpful in rewarding younger nodes
– Increasing difficulty may also insure that old nodes are not overly rewarded
– Each block will involve a varying number of nodes, thus varying reward amounts
– Registry transactions should cost a small fee in coins so that nodes don’t register and go offline without being penalized
– Network stability is more important than computational power
– Cost/reward is linearly correlated and encourages more users to contribute to the network

Conclusion and Feedback

This is only a first draft of my proposal. I would love the community’s feedback, criticism, or any input that may inspire an iteration (or a rejection) to this workflow. The goal here is to achieve a stronger decentralized network that is less susceptible to attackers.

Should this concept be tested and accepted by the crypto assets community, I shall apply it to my upcoming blockchain which is currently in development.

Stay tuned…

Advertisements

From → Hacks, Other, Politics

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: