A beady-eyed community member in the Telegram recently stumbled upon the publication of this whitepaper detailing the design of a next generation, quantum secure consensus protocol.
All the authors of the paper (David Chaum, the members of development team BitFasioned and Will Carter) are XX Network original team members and the mild concern was that they were placing efforts into some kind of spin-off! It was soon apparent however that this paper in fact describes a potential candidate to supersede the current consensus model within the XX Network. The name Phoenixx has been used internally for several years, although when originally publishing the work, it was dubbed ‘xxBFT’, as per the whitepaper from 2021. This is a continuous work that already has had prototypes developed to prove some elements. Eventually, it could completely replace the system XX uses for consensus.
For the layman, it doesn’t mean from the outside much would change. However, it is good to know that should this protocol come into fruition and is voted in as a (fairly major) change in the blockchain codebase, that the XX Network would be – yet again – way ahead of the curve in delivering hugely scalable and future-proofed technology designed for mass market real-world crypto use. This brings the blockchain side of things up to speed with cMixx which already achieves linear scalability.
Members of BitFashioned went through the potential implementation in detail when asked.
Bernie Cardoso explained:
The name Phoenixx has been used internally since late 2019 when we started working on the prototype of a blockchain using quantum secure WOTS+ signatures for both accounts (transactions) and consensus. The consensus was then named xxBFT, but in this more recent paper we went back to the roots with the Phoenixx name. This prototype was fully done in golang and achieved ~3k TPS with quantum secure transactions for networks ranging from 100 to 1000 nodes.
This prototype was just doing balance transfers between accounts, with no other blockchain functionality. That’s why we decided to pivot and build a custom blockchain on an existing SDK such as Substrate. This gave us the possibility to leverage NPoS to tie in cmix node performance into the economics. It also gave us Governance and other blockchain features that come out of the box with Substrate. On another hand, by going this route, we had to use the standard consensus protocol from Substrate: grandpa+babe. This doesn’t use quantum secure signatures, and neither do transactions, and it also scales quadratically with network size (regardless of the type of signatures used in consensus).
But, we never abandoned the quantum secure track of research. First of all, we used Sleeve since Mainnet launch, to have a quantum secure backup for all accounts. This uses the exact same WOTS+ cryptography that we developed during the phoenixx prototype. This will allow standard Substrate accounts to rollover to quantum secure accounts in the future. We also already have a proof of concept for this future. We partnered with ChainSafe to develop our WOTS+ in rust (the language used by Substrate), and we integrated it into the accounts, so we have demonstrated quantum secure transactions in Substrate.
The path to full quantum security continues from here to using the same WOTS+ signatures in consensus. This will likely impact the performance if grandpa/babe are still used, since these signatures are much more expensive to validate. This is where xxBFT/Phoenixx comes in, as the consensus protocol that scales linearly regardless of the type of cryptography used (other recent protocols like Diem/AptosBFT achieve linear growth by using BLS signatures, which are not quantum secure).
When it comes to the actual integration of a new consensus model, Bernie was kind enough to explain how modern blockchain systems are designed to be able to manipulate different components and keep the mechanics functioning. Therefore, this new consensus could be brought in, in a modular fashion to the existing framework, albeit with a good amount of work. He continued:
Substrate, like most modern blockchain architectures, is quite modular. For the purposes of this answer, we’ll focus on 3 of these logical modules: storage, runtime and consensus.
The storage is akin to a database where all the account + other information is stored. This has balances for all accounts, staking info, democracy referenda, the list of council members, etc etc etc.
The runtime defines the rules for how storage gets modified. For example, the runtime logic for a transfer does: check (read from storage) if sender has enough balance, if it does then subtract the transfer amount from that balance (write to storage) and add to the balance of the receiver (read+write). Typically, storage modifications are only initiated by transactions, which are cryptographically signed by an account (user). Substrate expands on this by allowing storage modifications to be triggered by other events in the runtime logic. This is for example how a new era starts daily without needing any user input. These are called intrinsics in Substrate (because they originate from within the runtime), and that’s why transactions are referred to as extrinsics (because they originate from outside the runtime). One of the best selling points of Substrate is that the actual runtime code that defines all this logic is compiled into WASM and stored directly in storage together with all other blockchain data. This means that the runtime code can be changed on demand via an extrinsic, controlled by Democracy, which allows coin holders to directly vote on new features to be added to the blockchain.
Last but not least, the consensus protocol enables the blockchain to essentially be a distributed database. Users send transactions that will modify the database. If there’s only one single server, these can be executed quite easily. But in a distributed setting, nodes have to agree on the order of transactions, so that the resulting storage state is consistent across the network. In leader based consensus protocols like grandpa/babe or phoenixx, at least one node is chosen as the block producer, that takes transactions, computes the new storage values based on logic defined by the runtime, and includes all this information (not the full storage, just a merkle proof of it) in a block that is sent to the whole network. Then, a new leader will do the same, applying new transactions to the storage state of the previous block, and getting a new storage state and new block. This is why it’s called a blockchain. Finally, the last part of consensus is that the whole network votes on which chain of blocks to commit. When talking about BFT consensus, this refers to a proven limit of 1/3 of the network experiencing Byzantine behaviour in the partial synchrony model. This means that for a network vote to be final it requires 2/3+1 of participants to vote the same way. In Substrate, the consensus protocol is explicitly spilt into 2: BABE is the block production algorithm and GRANDPA is the finality algorithm. This means that in certain conditions it’s possible that a long chain of blocks keeps being produced, but these blocks are not being finalized.
Finally, what all of this means is that it’s technically possible in Substrate to just “swap out” the consensus protocol for a new one. Obviously this is not an easy feat, but it’s possible to achieve. The main friction point is that phoenixx is both a block production and finality algorithm, it’s not separable like BABE/GRANDPA. The second point that could prove more difficult is that BABE is intrinsically synchronous. Blocks are produced in fixed time slots (configured to 6s). Phoenixx is optimistically responsive, which means that new blocks can be produced as soon as the previous block is accepted. This means that under high network load (many transactions), phoenixx would likely be able to achieve higher throughput.
As with all the innovations the XX Network builds, these ideas and the practical implementation are out in the open for any project to consider and use. There is power in working together and trying to break outside the crypto bubble, and XX continues to be at the forefront of that.
- Generation Infinity: XX Network Updates
- Echoexx Releases First Public Alpha – Try it Today!
- David Chaum Speaking at Blockchain Days, Ankara, March 2-3
- Worldcoin & XX Network Collab: Interview with Mário Yaksetig
- XX Network Partners with Worldcoin to Further Enhance User Privacy
- Stunning XX Artwork from 3D Graphics Guru StrobFX
- David Chaum Speaking at BlockShow x BlockDown, May 8-9th
- Initial Alpha of echoexx Released to Mailing List Invitees
- First New XX Grant Awarded for Development of EVM Bridge
- XX Foundation Releases Q1 2024 Roadmap
- XX Network Foundation Announces Rebooted Grants Programme
- A Glimpse of Current XX Network Research
- BIS Publish Project Tourbillon Trial Results
- XX Community AMAs Part 1 – Full Meeting Audio and Transcript
- XX Network Community AMAs, Part 1 Announced
- David Chaum Unveils ‘Better than Money’, Utilising XX’s cMixx+
- ‘cMixx+’ – Enhanced Privacy & Speed in Various Use Cases
- Demo: Private Polkadot Transaction via Proxxy
- Echoexx – Web3 Identities, Comms, Payments and More
- Tourbillon at BIS Conference, November 8th
- David at the Singapore Fintech Festival, November 15-17th, 2023
- Next Level Proxxy: cMixx DEX Proposed for an XRPL Grant
- Phoenixx – The Future of XX Consensus?
- Official Telegram Community Takeover
- Plans for Postage v1.0 Announced
- An Important XX Network Update – Audio & Transcript
- XX Network – State of the Network Update