PARSEC: The Release of the Code
At the end of May, we announced the release of the PARSEC Whitepaper and RFC. Standing for the Protocol for Asynchronous Reliable Secure and Efficient Consensus, the new consensus mechanism will power not only the SAFE Network but will also help many other decentralised projects looking to build global, permissionless networks across the world.
The release generated a huge amount of interest online and now, only a few weeks later, we’re delighted to announce that we’re releasing the actual PARSEC code itself . That’s right — as of today, you can check out the world’s first completely decentralised, open source, highly asynchronous Byzantine Fault Tolerant consensus mechanism by visiting our GitHub repo and downloading the code for yourself.
As a reminder, everything is being released under a GPLv3 Licence (with linking exception) so there’s nothing to stop you downloading the code. In fact, we’re actively encouraging you to go and do just that. The more the merrier!
Want to know a little more in terms of an overview of the technical details? Check out the video we released at the time which has a little bit more of the context as well as as the original announcement.
This represents another major Routing milestone complete on the road to the release of Alpha 3. We’ve now moved onto working on the Whitepaper and code that shows PARSEC working within a network of nodes where individual nodes are continually joining and leaving (we call this a Dynamic Network). After that, the Routing team will be detailing how Sharding will work on the Network in a further Whitepaper (plus code), illustrating the workings of Node Ageing (where the Network autonomously and continually rates the trustworthiness of each node) and Secure Message Relay (the method by which one Section is able to trust a message sent by a remote and otherwise unconnected group of nodes on the Network).
But for many people, this level of detail is too technical. After all, what is a consensus mechanism anyway?
Why we need consensus
We’re building software that lets your computer join directly with others around the world, removing the need for servers and centralised authorities. Doing this successful means that you get total ownership of your data, with privacy and security built-in from the ground up. Any time you want to access data, you — and only you — can recover it.
Very different to the internet we all rely on today.
But when you want computers all over the world to connect to each other without a central authority, one of the first challenges you face is how to enforce rules. For example, what’s allowed to happen on the Network — and, importantly, in what order do events get recorded? Ordering is crucial. Just imagine a bank account where the order of transactions gets mixed up. Try to spend money before you’ve received it and you can expect your bank to have an opinion.
So who enforces rules on a decentralised network where, by definition, there is no central authority? In addition, we can expect many thousands of events to take place simultaneously all around the world. How can a Network like this possibly agree on who did what, whether it’s allowed and in what order things happened?
The answer? By using a consensus mechanism. And on the SAFE Network, that consensus mechanism is called PARSEC.
There are many different types of consensus mechanisms today. However, most of these can immediately be discounted for the SAFE Network. For example, any that use leader-based systems — where certain computers nodes are given the power to make decisions on behalf of the network — won’t work for our purposes. These might be fine within a private, permissioned network where you know who the nodes are and you can be confident that they’re going to follow the rules. An example might be a financial network where banks join together to carry out business more efficiently.
But we’re not building a permissioned Network where only certain people can join. And as soon as you open up the gates to the Network for anyone to join, it’s far too easy for those decision makers to be attacked — and for the network to be brought to its knees (for example, DDOS’ing the leader).
As a global decentralised data and communications network, the SAFE Network has to be public and permissionless. But without those gates to entry, the one guarantee faced by any decentralised Network is that there will be nodes out in the wild that are either malicious or are non-responsive (due to technical issues).
So we needed a consensus mechanism: a set of rules that guarantee that the Network can still reach agreement despite these attacks. In other words, it needed to have a property called Byzantine Fault Tolerance (‘BFT’).
Blockchains & Byzantines
Recently we all witnessed a real BFT breakthrough with the creation of Bitcoin. It uses Proof of Work — in other words, you have to spend money to run a computer that cycles through many expensive mathematical operations. Why? Skin in the game. And because it means you end up with a system that slows down the rate at which miners can add one block at a time. This in turn lets a definitive agreed view spread across the Network.
But at the risk of stating the obvious, the challenge is that a blockchain is quite literally a row of blocks chained together. It’s hugely powerful for a range of reasons — but they don’t map to what’s needed on the SAFE Network. After all, Proof of Work is relatively slow, it’s hard to scale because you need the transactions to fit into one block at a time and — crucially — you never end up with a definitive result. It’s worth restating the point. A blockchain can only ever provide you with a probabilistic outcome. History becomes less likely to be altered over time — but it can never be 100% certain. That’s why you’ll hear people talking about waiting for confirmations before accepting large Bitcoin payments — each additional confirmation reduces the chance that their transaction becomes invalid.
Using a blockchain to secure a ledger is hugely powerful — but also comes with significant costs. Some are exploring cheaper methods — for example, put simply Proof of Stake evolves around the concept of the more coins you hold, the more blocks you’re able to mine. No more burning electricity churning through mining calculations.
But still, that is no help to us — because it still uses a blockchain. The SAFE Network is a system upon which the world’s data and communications will live. That translates into billions of transactions occurring around the globe — and this isn’t something that is suited to a blockchain.
The Rise of PARSEC, Gossip & ABFT
So after many long hours, days, months and years, we’ve created something different. The Protocol for Asynchronous Reliable Secure and Efficient Consensus (PARSEC) is a consensus mechanism that is designed to work on a global permissionless distributed Network. It’s capable of handling vast numbers of transactions every second. And we believe it provides the best performance of any asynchronous consensus mechanism in the world — with the maths proofs to back this up, and the absence of any patent or restriction on usage by anyone.
OK, so there’s a few terms there that we should touch upon simply. First, it’s highly Asynchronous — in other words, it’s mathematically guaranteed that this Network will reach consensus even if some transactions are delayed or fail to arrive. As background, Asynchronous Byzantine Fault Tolerance (ABFT) represents the highest level of security that a decentralised network can achieve. If a network achieves ABFT, it means its nodes are guaranteed (mathematically) to reach consensus.
PARSEC also uses a Gossip protocol to spread information across the Network. This is a well-established concept in computing. Think of how a rumour spreads in real life — direct from person to person, around the world. Gossip is actually the most efficient resilient method available when you’re trying to share a message with every single computer on the Network — because it enables news to spread exponentially.
At a high level, what happens is that each computer picks a random node every so often and shares its news. That computer then in turn spreads this across the Network and each computer creates its own ‘gossip graph’ to record what’s happening. And eventually, every node will hold exactly the same gossip graph. If you’d like more technical details about how this actually works, you should check out Pierre’s presentation here.
SAFE > PARSEC
It’s worth making clear at this stage: PARSEC is simply the consensus mechanism within the SAFE Network. If you’re wondering how the Network deals with other issues — for example a Sybil attack (where a bad actor throws up thousands of nodes to attack/disrupt/takeover the Network) or how to actually incentivise people to take part in the first place — the SAFE Network deals with these answers elsewhere.
On SAFE, we have something called Node Ageing — where the Network constantly varies the trust levels of each computers according to their past actions. Step out of line and your powers disappear. We have Dynamic Membership — a way in which nodes are assigned to and re-assigned between different groups on the Network. In other words, there’s no way for a human to choose which group its computer is in (nor to decrypt the data chunks that are stored within that group). That decision is taken autonomously by the Network itself. On top of that, we also have Sharding (in the form of Disjoint Sections) and Safecoin which acts as the incentivisation mechanism to encourage usage of the system
As you can see, the project is vast as you’d expect for something that’s been in development for over a decade. So if you want more info on any of these, start by downloading the SAFE Network Primer and getting stuck into the Forum.
So in a nutshell when we’re talking about PARSEC, we’re really focusing on the consensus layer within the SAFE Network. We feel we’ve made a big step forwards with this mechanism — and we’ve been inspired by others, there’s no doubt about it. But we’ve got something here that’s unique and, we believe truly useful to others who are working on similar projects.
Next Step: Freedom…
One final thing to be aware of. PARSEC is being released under a GPL v3 licence (with linking exception). In other words, this means that everybody has complete freedom to run, study, share and modify our software. Anyone can download and use PARSEC for whatever purpose they like. We’d love to know how you get on. If you do however make updates to the code, you’ll need to make those public so that the entire open source community can benefit from this innovation.
The reason behind this is simple. Open source is in our DNA. We’re building open source, permissionless networks — with no restrictions on usage and a system that we believe provides the best performance of any asynchronous consensus algorithm in the world.
So we’d love to see engagement, comments (good or bad) and collaboration — and we’d encourage other projects out there today that could use the code to get in touch. Please go ahead — download the code, read the White Paper, subscribe to our YouTube channel, join the Forum — and join us on the journey.