The best way to understand the future might be to study the past. A year ago I hardly knew anything about EOS. Today I have it compiled on my laptop and much of my time is trying to understand C++, WebAssembly etc. skills that I see myself needing for developing my own dApps. I know what ECAF is, philosophize daily about the implementation of Universal Resource Inheritance (URI) and it’s social implications, I’ve chatted with and answered dozens of questions from strangers on /r/eos and /r/eosdev and I’ve sat through hours upon hours of EOS related podcasts… What crazy rabbit hole this journey has been. As a computer scientist who was involved with Bitcoin before most people, very few alt-coins, ICOs or whatever have actually intrigued me. I was looking into alternate use cases of blockchain technology, when I stumbled upon Steem / Steemit and began to read the white paper. This is what eventually led me to EOS, taking part in the early token sale and becoming part of the genesis snapshot as the network was launched. I would like to share with you some of my early writings from way back when EOS was not even around. This as a precursor to any future writings on EOS.
Delegated Proof of Stake (DPoS)
“DPOS implements a layer of technological democracy to offset the negative effects of centralization.”
A little terminology:
Block producers are known as Witnesses in the Steemit community.
The term delegate is the more formal and dev oriented way of referring to witnesses.
DPoS process as divided into two parts
1. A group of (21 or more) block producers (delegates/witnesses) is elected, with more waiting in line, each competing to provide the best service.
- Election happens on https://steemit.com/~witnesses where community members can cast their vote.
- Elected block producers take turn in the creation of blocks, collecting together all transactions on the network and signing them.
- The election process ensures the authority of stakeholders and the removal of bad actors.
- Every round shuffles the active witnesses.
2. Production is scheduled
- Blocks producers can only produce blocks within allocated time slots.
The Steem blockchain with block producers meeting their allocated time slot for creation.
Seeing as each elected block producer is given only a certain time period in which to produce blocks, it is possible that some will miss their scheduled time slot. Such errors will get noticed by the voting community members and affect their likelihood to vote for said block producer.
The Steem blockchain with block producers missing their allocated time slot for creation.
Whilst I looked in the white paper and couldn’t find a proper description of what happens in the scenario of a block producer missing the allocated time slot, the EOS documentation describes this same consensus algorithm and says the following:
“If a producer misses a block and has not produced any block within the last 24 hours they are removed from consideration until they notify the blockchain of their intention to start producing blocks again. This ensures the network operates smoothly by minimizing the number of blocks missed by not scheduling those who are proven to be unreliable.”
I suspect that further inquiry into the actual witness program, setting up the required server software etc. will lead to more details on how different events are handled across the network. Such would be a matter of comparing the consensus rules used on the Bitcoin network with ones used on Steem, as I had initially hoped to do. Unfortunately, there is seemingly no documentation available on this subject. I’ve explored steem.io, steemit.com, developer portals, API documentation and the several branches of the GitHub. One branch even states the following:
‘Code is Documentation. Rather than attempt to describe the rules of the blockchain, it is up to each individual to inspect the code to understand the consensus rules.’
(steem: A social media platform where everyone gets paid to post, July 4, 2016/2017)
DPoS follows the same principle of ‘longest valid chain wins’ as PoW, allowing for up to 1/3 of malicious nodes (compared with 49% in Bitcoin ‘Nakamoto consensus’) and thus relying on 2/3 of nodes in the network being the honest majority.
Example of a malicious minority attempting a fork.
Original chain remains the longest, as the other cannot keep up with the majority due to production happening according to schedule.
As is the case with PoW, the Delegated Proof of Stake (DPoS) algorithm also allows for temporary forks in the chain, with an eventual return of consensus amongst nodes. Under normal circumstances the block producers will cooperate, but should a witness get caught in the process of simultaneously producing blocks on two separate chains, such activity will be noticed and the witness will likely get voted out of the witness program. Removal of malicious witnesses can also be automated, as the double-block production becomes cryptographically evident.
Delegated Proof of Stake (DPoS) can in the simplest sense be understood as PoS, but with the exception that the voting process can be outsourced to a delegate, such that individual users entrust others to vote on their behalf. Voting for a witness means you trust this individual will maintain the network on your behalf.
For a more in-depth explanation of other potential scenarios regarding the Steem blockchain and forks, have a look at DPOS Consensus Algorithm – The Missing White Paper, which details further.
The intention here is not to give a comprehensive description of all possible blockchain events relating to a DPoS consensus, but rather to reiterate that with different decentralized applications we often see different blockchain implementations. The foundational blockchain purposely construed with modifications as deemed necessary by developers, in order to better address the problem at hand. A meaningful question becomes:
Why DPoS over PoW when developing a social media platform?
Forementioned article by Dan Larimer credits DPoS with the following characteristics:
- Robust under natural network disruption
- Secure in case of malicious minority
- Functions even with the majority of producers failing
A note on witnesses:
Perhaps best seen as an elected consortium of high standing community members, entrusted by other users with the task of honestly maintaining the public ledger. Becoming a witness not only requires that you run an actual server to validate signatures and timestamp transactions, but you must also be seen as part of the community. You must be a trustworthy individual, whose reputation allows for engaging in this critical activity. People with hardware are standing in line to be elected as witnesses, which means that though a running server is a requirement, it comes second to attaining status. Status within any community, whether off or online is a fragile thing. Whilst it may take years to build one’s reputation, it can take split seconds to diminish how one is perceived in the eyes of others, through single bad actions. Following from this premise, witnesses are held to a high regard and closely scrutinized by other community members.
In the light of the Steemit community depending on user-contributed content, the selection process of trustworthy, perhaps somewhat ‘elite’ members of the community is given high importance.
”Ultimately DPOS gains significant security from the algorithms chosen to select the block producers and verify that the nodes are of high quality and unique individuals.”
The DPoS consensus algorithm is inherently more community-oriented than the PoW algorithm, requiring the actual involvement of people in a continuous “governmental” process, trying to find the most capable and trustworthy community representatives.
In PoW consensus, anyone with a CPU / GPU / ASIC (insert method of computation) can join the network and begin mining. In theory PoW schemes have a low barrier to entry, as was originally envisioned by Nakamoto. Today, however, Bitcoin mining necessitates investing in expensive equipment, as CPUs simply cannot compete with ASICs. The emergence of ASICs has led to mining centralization, which in turn has led to the development of ASIC resistant cryptocurrencies.
In PoS consensus, anyone with capital can invest it in the network, gain ownership and thus influence. In DPoS, besides putting up capital, one must still be elected by the community and be seen as a trustworthy stakeholder before gaining influence on the public record. There is a degree of trust involved, this inclusion of intermediaries ironically a form of centralization and precisely what the original PoW implementation by Nakamoto was attempting to eradicate. DPoS might be viewed as a more balanced approach or an in-between two worlds attempt at decentralized consensus. It would appear that they are attempting to create a community first, an economy second.
Mitigating mining centralization
While the original PoW algorithm ensuring consensus in the bitcoin network was summed up by Nakamoto as one-CPU-one-vote , the Steem blockchain operates on a concept of one-STEEM per vote. In Bitcoin, the “voting power” of a miner or mining pool is directly proportional with the combined amount of hashing power. As mining power gets consolidated (some mining pools becoming much larger than others) it leads to few individuals (the pool operators) having more power than other users. This, in turn, becomes a trust issue.
In DPoS consensus systems, active witnesses also gain more power than non-witness users, but only the same amount as the other 20+ witnesses and never more. The users are in charge of electing witnesses. As such it becomes difficult for witnesses to pool together in the same way as under a PoW scheme. (The Daily Decrypt, 2016)
STEEM, the general purpose cryptocurrency of the network, is thus a key governmental component that allows for organizing the human work and distribution of tokens between community members.
It is noteworthy that voting is seen by some in the cryptocurrency world as a corruptible process. The Bitcoin Core software (which basically denotes the rules for the bitcoin network and thus sets the consensus standard) emphasizes an objective, math-based formula for distinguishing between valid and invalid blocks etc. The original implementation (Bitcoin Core) sees consensus as something that must be trustless/free of subjective whims. As something that that arises out of strict rule following.
There have been arguments on the DPOS consensus leading to the network becoming more centralized, as it requires Witnesses to run dedicated servers for block production. This poses the obvious question as to whether or not the transparent state of active Witnesses, could pose a threat as obvious targets in terms of DDoS attacks?
This question has been raised by Vitalik Buterin, co-founder of Ethereum, who is a prominent figure within the cryptocurrency community. With Dan Larimer, the inventor of DPoS and co-founder of Steem and Steemit responding to his critiques in the following way:
‘His basic argument is that there are fewer full nodes and that they are easily identified and can be shut down by governments. He goes on to say that achieving scalability by having larger nodes makes the system more centralized. This of course demands a comparison, “more centralized than what”.’
Larimer then goes on to showcase how only two mining pools (f2pool and ethpool) are controlling more than 51% of the Ethereum network, making it even more centralized than Bitcoins network:
Dominant mining pools on the Bitcoin network. Sourced from https://blockchain.info/pools
The above graph shows how the mining activity on the Bitcoin network is currently divided up into separate groups, with just three of them accounting for more than 51%. Should the people in charge of these groups maliciously conspire together against the remaining network, they would have the power to do so. They could outpace everyone else in terms of computing power and interfere with the process of block creation, prevent confirmations etc.
The argument for why DPoS is less centralized is simple. With 21 equally influential block producers, that is vastly more than the dominant mining pools on both Ethereum and Bitcoin put together. Further taking into account that these are democratically elected, time-swapped, with more than a hundred other potential witnesses competing against them and the witnesses often disclosing their actual identities in order to acquire the needed trust… DPoS is obviously not to be criticised for centralization in comparison to PoW and PoS.
Thank you for reading some of my year old writings. I have been involved with cryptocurrencies since early 2010 and I am still trying to wrap my head around many things, whether related to the technical or human aspect; the most fascinating stuff is often the interplay of the two. Let me know if you want further writings from the past… I have more… maybe bribe me with some of those TRYBE tokens… I hear they’re all the rage these days.