SDBS #20 | Stealth qPoS Certified Nodes

Stealth
stealthsend
Published in
5 min readAug 17, 2019

QPoS certified nodes promote a core, highly connected subnetwork that improves communication among StealthNodes

In today’s SDBS post I describe qPoS certified nodes and how they will promote a core, highly connected sub-network that should improve communication among StealthNodes, the block validators of the Stealth qPoS network.

The Stealth qPoS network has been in private testnet since we released the working proof-of-concept to GitHub in May. It works very well so far, but early on in testnet, I realized that the network remodeling code inherited from Bitcoin caused massive network stability issues for my small testnet of three to four nodes. This network instability led to completely fractured networks, which resulted in irresolvable consensus problems, where different fragments forked onto different chains, and the forks couldn’t heal. I described these phenomena in SDBS #16.

Although the Stealth mainnet consists of dozens of nodes, I wanted to see if I could find a technological approach to healing these forks. So, instead of disabling network remodeling, I left it in to see what problems it could cause. I came up with two complementary technologies that deal with the issues that arose. The first technology is chain power, described in SDBS #16, which helps individual nodes decide whether they are part of a minority network fragment. A minority network fragment is one that has less than 51% of the extant StealthNode staking weight.

In addition to chain power, I also designed a network clock that uses an asynchronous timekeeping mechanism, similar to a Lamport clock. In the Stealth qPoS asynchronous network clock, time is measured relative to network events that carry time information. In qPoS, these network events are the blocks that eventually go into the blockchain. I described the qPoS asynchronous clock in SDBS #17, and showed it in action in SDBS #18.

This qPoS asynchronous clock is much different from typical cryptocurrency timekeeping, which comes in two varieties. In the first variety, network nodes are responsible for keeping their internal clocks highly synchronized using a standard network timekeeping protocol, such as NTP. The second variety uses network polling, and is found in Bitcoin and practically all its derivatives. In Bitcoin, each node asks its peers what time they think it is and then sets its own clock to be as consistent as possible with its peers.

Since I developed chain power fork resolution and the qPoS asynchronous clock, I have spent several months ironing out dozens of small protocol improvements that keep the network robust to the harshest fragmentation conditions to which I can subject it. My reasoning is that the harsh conditions of the qPoS private testnet will allow me to more quickly identify and fix even the most obscure and infrequent consensus bugs. So far I have fixed numerous bugs, and am still finding more as I run the testnet. With more reasonable network connectivity, typical of most cryptocurrencies, many of these bugs would never be found until they popped up at a bad time on mainnet.

When qPoS moves to mainnet, with its dozens or even hundreds of nodes and highly refined consensus protocol, network remodeling will no longer cause network fragmentation. Indeed the network remodeling protocol is battle tested in Bitcoin and hundreds if not thousands of its derivatives. Instead, the remodeling protocol will improve the connectivity of individual nodes, making the network connections more evenly distributed and the network itself more robust.

Because the qPoS network is intended to be high performance, I wanted to go one step further than simply relying on the larger network to improve robustness. To this end I designed a mechanism whereby certified nodes could have a special status and eventually attain higher network connectivity than non-certified nodes. To keep the certification process as decentralized as the qPoS protocol itself, certified nodes are published by StealthNodes, which sign blocks blocks for the qPoS protocol. Each StealthNode will be able to publish a single certified node. The certified nodes are intended to comprise a highly stable core network that carries most if not all of the qPoS stake weight of the Stealth network.

Certified nodes will have only one property related to their status, and that is any node can choose to exclude a certified node from its network remodeling algorithm. In other words, all network nodes will be able to recognize certified nodes because they are published in the blockchain, and can choose to never voluntarily drop a connection to a certified node. The effect of this single addition to the network remodeling algorithm is that certified nodes become more highly connected than non-certified nodes, and certified nodes will all be much more highly connected to each other. In terms of topology, the network should not lose its decentralized properties, but should gain, superposed on the decentralized network, a core network of highly connected certified nodes.

It is important to remember that network remodeling is a voluntary restructuring of the network, where nodes typically randomly disconnect and reconnect to peers, with an eventual flattening of the distribution of connections. This allows new nodes to integrate into the network, soon obtaining the same network connectivity of older nodes. The existence of certified nodes simply means that this remodeling process is voluntarily biased for a select subset of the network, creating a slightly different network topology that should have a minimal impact on the overall distribution of connections.

Figure 1: Comparison of network topologies of a hypothetical network of 19 nodes, where 6 of the 19 are converted to certified nodes to which other nodes don’t voluntarily drop connections. The same network is depicted in both the left and right panels. The average connectivity of nodes is the same in both versions of this network, although the distribution of connections differs between the two versions. The left panel shows the network with no certified nodes. The right panel shows the network with six certified nodes. The distribution of connections in the left panel is slightly flatter than the right, where six connections (green lines) move from the full network to certified nodes (orange circles). Unchanged connections are yellow lines.

Figure 1 shows how the network topology will change for a small network of 19 nodes, where a significant fraction of the network converts to certified nodes. This example is exceptional in that a large fraction (one third) of the nodes are certified. Even so, the network topology retains much of its distributed properties. We expect the fraction of certified nodes in the Stealth qPoS network to be 10% or smaller, and the average connectivity to be much higher, resulting in marginal changes to the distributed properties of the Stealth network upon the introduction of certified nodes.

In next week’s SDBS post, I will describe additions to the qPoS implementation that enable node certification.

— — — — — — —

Hondo

— — — — — — —

Website / Telegram / Slack / Medium / Twitter / Reddit

--

--

Stealth
stealthsend

World’s first private high performance blockchain protocol