Introduction
This month, on September 19th, the Iron Age Testnet was publicly launched. The purpose of this month’s Developer Roundup is to provide the Quai community with an update on the status of Testnet – why syncing stopped working, the issues that have been discovered, and how they are being resolved.
Testnet Issues
Nodes being unable to sync to the tip of the chain was caused by issues with broadcasting efficiency, request efficiency, and
Broadcast Efficiency Issues
- Block broadcasts for syncing were re-propagating.
When a node syncs, it requests blocks from peers. These peers were sending the blocks that each node requested too many times, causing peers to drop each other.
- Blocks outside of reorg range were re-propagating.
The go-quai client only reorgs back to a certain range, to protect against attacks that force the client to re-validate the blockchain over and over. Blocks that were further back than this reorg range were still being propagated by peers, flooding the network with data that could not be used.
- Unnecessary fetches for pending ETXs were over-propagating.
Nodes are continually asking for pending ETXs that we already have, which causes them to spam their peers. Each of their peers also respond to each spam request by asking all of their peers for the same thing, which causes an exponential increase in the amount of messaging within the network, and also causes peers to drop each other.
Request Efficiency Issues
- Added a new current entropy parameter to peers instead of assuming everyone is synced.
Previously, your node would assume every one of your peers is fully synced – thus, nodes had no preference between peers when attempting to find new data. Now, nodes advertise their current entropy so that other nodes are able to know if they are likely to have the block(s) they are looking for.
- Only ask peers for blocks if their current entropy parameter indicates they are likely to be able to respond.
The previously-mentioned current entropy parameter is now used by nodes to determine which peers to ask for the needed blocks. Nodes will not query peers if they are not likely to have the needed blocks.
Sync Target Determination Issues
- Non-well connected mined shards will allow divergent choices.
When a node is started, it would previously pick the Zone chain with the most entropy reduction to sync to. However, by only observing the entropy reduction of Zones, nodes would occasionally choose to sync to a Zone that did not properly reconnect into the canonical Prime as part of the larger network. By changing the sync target from the Zone chain with the most entropy reduction to the Prime chain with the most entropy reduction, it is ensured that nodes will not sync to Zone chains that have diverged from the canonical network.
- Fundamentally changed syncing, closed a sub-51% attack vulnerability, improved bandwidth usage by 100x, consolidated all syncing logic into core
As previously mentioned, nodes would previously use Zones as a sync target – this created a vulnerability where a miner with less than 51% of hashpower could selfishly mine a Zone to diverge from the main network, and cause syncing nodes to sync to a state that would never converge back with the canonical state. Also, the client would attempt to download blocks from all block broadcasters, but not all block broadcasters would necessarily have all the blocks you needed between where your node is at and the tip of the chain. Now, the download logic has been completely changed to only download from peers who claim to have appended the blocks that your node is looking for. This drastically reduced the bandwidth requirements of a node, and allowed all syncing logic to be consolidated into core.
Join us to build a better blockchain.
Quai Network is an open-source Proof-of-Entropy-Minima blockchain network utilizing the capabilities of merged mining to increase throughput and security. Users of Quai Network will enjoy fast transaction times without compromising decentralization and security. Miners will have competitive mining opportunities across the many blockchains within the network.
Capable of thousands of transactions per second, the Quai Network is a new solution to scalability that is soon to be ready for mainnet release.
Terms & Conditions / Disclaimer
The entirety of the Quai Genesis grants program, including the content of this article, is subject to the Terms and Conditions outlined here.
Opinions, ideas, and statements shared in this update are delivered with numerous assumptions, risks, and uncertainties which are subject to change over time. There are multiple risk factors, including those related to blockchain, cryptographic systems, and technologies generally, as well Quai’s business, operations and results of operations, that could cause actual results or developments anticipated not to be realized or, even if substantially realized, to fail to achieve any or all of the benefits that could be expected therefrom. We reserve the right to unilaterally, completely, or partially change plans, expectations, and intentions stated herein at any time and for any reason, in our sole and absolute discretion, and we undertake no obligation to update publicly or revise any forward-looking statement, whether as a result of new information, future developments, or otherwise. ACCORDINGLY, WE RECOMMEND THAT YOU DO NOT RELY ON, AND DO NOT MAKE ANY FINANCIAL DECISION OR INVESTMENT BASED ON, THE STATEMENTS CONTAINED IN THIS UPDATE OR ANY OF OUR UPDATES/ARTICLES — INCLUDING BUT NOT LIMITED TO ANY SELLING OR TRADING OF QUAI TOKENS, ETHER, OR ANY OTHER CRYPTOGRAPHIC OR BLOCKCHAIN TOKEN, OR THE SECURITIES OF ANY COMPANY.
The views, opinions, and statements made in this update are those of an individual author and not those of any institution, University, or legal entity operating within the jurisdiction of The United States or beyond. There is no association between these views, opinions, and statements and any for-profit or non-profit entity, particularly with Universities, Foundations, and other Agencies located within the United States. Any perception of such an association is purely accidental, and will be rectified immediately if brought to our attention by the reader.