BlockDAG, an evolution from blockchain, introduces a multi-predecessor concept in distributed ledger technology. This section delves into its mechanics, contrasting it with blockchain’s limitations and elucidating the sophisticated approaches it employs for scalability and speed.
UTXO, or Unspent Transaction Output, is the fundamental unit of account in the Kaspa blockchain. UTXOs represent the quantity of Kaspa received by an address that hasn’t yet been spent. In this system, UTXOs are generated when a new block is mined, rewarding coins to the miner. For transactions, UTXOs are spent; when you transfer Kaspa, you’re utilizing UTXOs from your wallet. An important feature of UTXOs is that they cannot be partially spent; to send 100 Kaspa, you must use a UTXO worth at least that amount, with any excess returned as change. Additionally, UTXOs are crucial for tracking Kaspa ownership, as the blockchain maintains a record of all UTXOs, each linked to a specific address.
The UTXO model boasts several benefits over account-based models, enhancing the Kaspa blockchain in various ways:
In summary, while UTXOs are a powerful and efficient mechanism for tracking digital asset ownership and offer key benefits in terms of security, privacy, and scalability for the Kaspa blockchain, they also introduce complexities and challenges related to system operation and efficiency.
The PHANTOM protocol presents itself as a substantial improvement over the traditional blockchain in terms of transaction throughput and scalability. Unlike blockchain, which relies on a sequential chain of blocks, PHANTOM structures the ledger as a Directed Acyclic Graph (DAG) as we saw in the previous paragraph, where each block can reference multiple predecessors. This structural shift facilitates a larger transaction volume and resolves the limitations imposed by blockchain’s need for sequential block validation.
To maintain order within this more complex structure, PHANTOM utilizes a greedy algorithm to construct what is referred to as a k-cluster—a subset of the DAG where blocks are closely interconnected, indicating they were mined by honest nodes. This process involves identifying the tips of the DAG, which are blocks that have not been referenced by newer blocks, and then selecting the largest k-cluster among them to represent the honest portion of the network. The protocol then extends this set by including any blocks that have a small enough anticone, which is the set of blocks that do not reference each other.
The ordering of transactions within the blockDAG is pivotal. PHANTOM proposes a method that begins with traversing the k-cluster in a topological manner, adding blocks iteratively to create a fully ordered list. This list respects the hierarchy inherent in the DAG’s structure and defers the placement of blocks outside the k-cluster, effectively penalizing them and thus protecting the integrity of the network from blocks that may have been mined with malicious intent.
Another way to define a DAG is a graph that has a topological order, meaning it can be arranged in a sequence where each node comes before any node it points to. A practical example reported by Kaspa: “Two excellent analogies to this notion are the order in which one takes courses in college, or gets dressed in the morning.”
PHANTOM’s scalability is a key feature, proven to be secure regardless of the network’s throughput capabilities. It stands in contrast to Bitcoin, where the security threshold weakens as the block creation rate increases. PHANTOM, on the other hand, maintains its security threshold even with increased block creation rates, provided that the network’s propagation delay diameter is known and accounted for through the parameter k. This quality is critical to PHANTOM’s ability to support larger blocks or faster rates without compromising security.
The PHANTOM protocol also addresses the issue of orphan blocks—blocks that are valid but not part of the main chain—by including all blocks in the ledger. This inclusion is instrumental in maximizing the use of computational power within the network. The largest k-cluster likely represents the honest chain because the honest nodes, assumed to possess the majority of the network’s computational power, will have their blocks well-represented within it. This approach ensures that even as the DAG grows in complexity, the integrity and order of transactions are preserved, and the network remains secure against various attack vectors.
In practical applications, PHANTOM’s design enables a ledger that can handle a high volume of transactions efficiently, making it an attractive foundation for cryptocurrencies and other distributed ledger applications seeking to overcome the constraints of traditional blockchain technology. The PHANTOM protocol not only provides a way to order transactions within a DAG but also demonstrates, through its scalability and security properties, the potential to support a new generation of high-throughput ledger systems.
The GHOSTDAG protocol, which stands as a refined iteration of the PHANTOM protocol, embodies the next step in the evolution of distributed ledger technology. GHOSTDAG’s primary contribution to the field is its novel approach to ordering transactions within a blockDAG structure, a system that enables the simultaneous creation of multiple blocks, unlike the linear progression seen in traditional blockchains.
GHOSTDAG leverages a greedy algorithm, which sidesteps the computational intractability of the optimization problem faced by its predecessor, PHANTOM. This algorithm allows GHOSTDAG to rapidly and efficiently construct a k-cluster, a subset of the blockDAG that comprises blocks deemed to have been mined by honest nodes—labelled as ‘Blue’. This is achieved by inheriting the Blue set from the best tip, or the most recent block with the largest Blue set in its past, and then adding new blocks that maintain the k-cluster property.
The GHOSTDAG algorithm initiates with the genesis block, the first block of the chain, and recursively computes the Blue sets of each tip, effectively creating a chain of these sets that extends back to the genesis block. Blocks not included in the Blue set are considered ‘Red’ and are treated with suspicion, as they are likely to have been created by non-cooperating nodes. The ordering of blocks in GHOSTDAG is a delicate process that first orders the Blue blocks according to a topological sort and then positions the Red blocks in a manner that penalizes them without excluding them from the ledger.
This protocol’s brilliance lies not just in its ability to efficiently order transactions but also in its scalability. GHOSTDAG can accommodate an increased block creation rate without compromising the security of the ledger. It does so by ensuring that the order of transactions is agreed upon and immutable over time, as long as the majority of the computational power is controlled by honest nodes.
In practical terms, GHOSTDAG’s approach to block ordering and its inherent scalability translates to a distributed ledger that is significantly more efficient than traditional blockchain. This is particularly evident in networks like Kaspa, where the ability to handle a high volume of transactions without sacrificing speed or security is paramount.
A blockDAG structure enables blocks to reference multiple predecessors, which significantly increases throughput by allowing many blocks to be created in parallel. However, this also introduces the challenge of ordering these blocks and their transactions, which is precisely the challenge GHOSTDAG addresses. With its efficient algorithm and scalability, GHOSTDAG is positioned to be a critical component in the next wave of distributed ledger technologies, often referred to as blockchain 3.0, which seeks to resolve the trilemma of achieving speed, security, and scalability without compromise.
In conclusion, GHOSTDAG represents a profound leap forward in the design of distributed ledgers, offering solutions to the critical issues of speed and scalability while maintaining the integrity and security of the network. As technology matures and is adopted in more applications, it could very well redefine the architecture of distributed ledger technology for the foreseeable future.
The evolution from GHOST to DAG KNIGHT in the Kaspa ecosystem represents a significant advancement in the field of consensus protocols within distributed ledger technologies. The seminal work that began with the GHOST protocol laid the foundation for a series of innovative changes, leading up to the creation of DAG KNIGHT. This evolution showcases a commitment to improving transaction throughput and network security while navigating the complexities inherent to decentralized systems.
The GHOST protocol, introduced in 2013 by Dr. Yonatan Sompolinsky and Aviv Zohar, addressed the critical issue of block creation rates in relation to network security. It introduced the concept of the “greedy heaviest observed subtree” to optimize the main chain selection in a block tree. This change allowed for higher block creation rates and larger block sizes without the fear of 51% attacks, a prevalent concern in proof-of-work cryptocurrencies.
In the subsequent years, this work gave rise to the PHANTOM protocol, which generalized the longest chain rule of Nakamoto Consensus (NC) to select the largest, sufficiently connected subset of blocks. PHANTOM introduced an optimization problem that aimed at selecting the maximum k-cluster sub-DAG, with k representing an upper bound on the network’s latency.
The DAG KNIGHT protocol, however, takes a step further by removing the necessity of assuming an a priori latency bound, thereby addressing one of the limitations of PHANTOM and previous protocols. DAG KNIGHT operates under the assumption of no upper bound on network latency, making it the first permissionless parameterless consensus protocol secure against attackers with less than 50% of the computational power.
Parameterlessness has crucial implications for the network’s performance. Unlike parameterized protocols that are typically constrained by their hardcoded latency parameters, DAG KNIGHT allows the network to converge according to its actual conditions. It adjusts to real-time adversarial latency, enabling transaction confirmations to occur within seconds under normal internet conditions, a significant improvement over its predecessors.
DAG KNIGHT’s model assumes a Byzantine setup, meaning the attacker can deviate arbitrarily from the protocol’s rules, but the system is secured under the assumption that the attacker controls less than 50% of the computational power. It ensures the network remains secure under arbitrarily high throughput configurations, constrained only by the capacity of nodes’ hardware and the network’s backbone.
DAG KNIGHT’s optimization paradigm reflects a dual min-max problem, where it searches for the minimal k such that the largest k-cluster covers at least 50% of the DAG. This nuanced approach tolerates just enough latency and disconnectivity among the selected set of blocks, balancing safety and liveness.
The protocol’s self-stabilizing nature allows it to recover from past failures once the conditions are met, ensuring safe confirmation of transactions post-recovery. DAG KNIGHT is responsive, not in the sense of current observable latency but in the weaker sense of the maximum latency that an adversary may cause.
Overall, DAG KNIGHT’s consensus protocol represents a mature evolution in the Kaspa ecosystem, offering a more adaptive, secure, and efficient system that stands as a testament to the progressive nature of blockchain technology research and development.
BlockDAG, an evolution from blockchain, introduces a multi-predecessor concept in distributed ledger technology. This section delves into its mechanics, contrasting it with blockchain’s limitations and elucidating the sophisticated approaches it employs for scalability and speed.
UTXO, or Unspent Transaction Output, is the fundamental unit of account in the Kaspa blockchain. UTXOs represent the quantity of Kaspa received by an address that hasn’t yet been spent. In this system, UTXOs are generated when a new block is mined, rewarding coins to the miner. For transactions, UTXOs are spent; when you transfer Kaspa, you’re utilizing UTXOs from your wallet. An important feature of UTXOs is that they cannot be partially spent; to send 100 Kaspa, you must use a UTXO worth at least that amount, with any excess returned as change. Additionally, UTXOs are crucial for tracking Kaspa ownership, as the blockchain maintains a record of all UTXOs, each linked to a specific address.
The UTXO model boasts several benefits over account-based models, enhancing the Kaspa blockchain in various ways:
In summary, while UTXOs are a powerful and efficient mechanism for tracking digital asset ownership and offer key benefits in terms of security, privacy, and scalability for the Kaspa blockchain, they also introduce complexities and challenges related to system operation and efficiency.
The PHANTOM protocol presents itself as a substantial improvement over the traditional blockchain in terms of transaction throughput and scalability. Unlike blockchain, which relies on a sequential chain of blocks, PHANTOM structures the ledger as a Directed Acyclic Graph (DAG) as we saw in the previous paragraph, where each block can reference multiple predecessors. This structural shift facilitates a larger transaction volume and resolves the limitations imposed by blockchain’s need for sequential block validation.
To maintain order within this more complex structure, PHANTOM utilizes a greedy algorithm to construct what is referred to as a k-cluster—a subset of the DAG where blocks are closely interconnected, indicating they were mined by honest nodes. This process involves identifying the tips of the DAG, which are blocks that have not been referenced by newer blocks, and then selecting the largest k-cluster among them to represent the honest portion of the network. The protocol then extends this set by including any blocks that have a small enough anticone, which is the set of blocks that do not reference each other.
The ordering of transactions within the blockDAG is pivotal. PHANTOM proposes a method that begins with traversing the k-cluster in a topological manner, adding blocks iteratively to create a fully ordered list. This list respects the hierarchy inherent in the DAG’s structure and defers the placement of blocks outside the k-cluster, effectively penalizing them and thus protecting the integrity of the network from blocks that may have been mined with malicious intent.
Another way to define a DAG is a graph that has a topological order, meaning it can be arranged in a sequence where each node comes before any node it points to. A practical example reported by Kaspa: “Two excellent analogies to this notion are the order in which one takes courses in college, or gets dressed in the morning.”
PHANTOM’s scalability is a key feature, proven to be secure regardless of the network’s throughput capabilities. It stands in contrast to Bitcoin, where the security threshold weakens as the block creation rate increases. PHANTOM, on the other hand, maintains its security threshold even with increased block creation rates, provided that the network’s propagation delay diameter is known and accounted for through the parameter k. This quality is critical to PHANTOM’s ability to support larger blocks or faster rates without compromising security.
The PHANTOM protocol also addresses the issue of orphan blocks—blocks that are valid but not part of the main chain—by including all blocks in the ledger. This inclusion is instrumental in maximizing the use of computational power within the network. The largest k-cluster likely represents the honest chain because the honest nodes, assumed to possess the majority of the network’s computational power, will have their blocks well-represented within it. This approach ensures that even as the DAG grows in complexity, the integrity and order of transactions are preserved, and the network remains secure against various attack vectors.
In practical applications, PHANTOM’s design enables a ledger that can handle a high volume of transactions efficiently, making it an attractive foundation for cryptocurrencies and other distributed ledger applications seeking to overcome the constraints of traditional blockchain technology. The PHANTOM protocol not only provides a way to order transactions within a DAG but also demonstrates, through its scalability and security properties, the potential to support a new generation of high-throughput ledger systems.
The GHOSTDAG protocol, which stands as a refined iteration of the PHANTOM protocol, embodies the next step in the evolution of distributed ledger technology. GHOSTDAG’s primary contribution to the field is its novel approach to ordering transactions within a blockDAG structure, a system that enables the simultaneous creation of multiple blocks, unlike the linear progression seen in traditional blockchains.
GHOSTDAG leverages a greedy algorithm, which sidesteps the computational intractability of the optimization problem faced by its predecessor, PHANTOM. This algorithm allows GHOSTDAG to rapidly and efficiently construct a k-cluster, a subset of the blockDAG that comprises blocks deemed to have been mined by honest nodes—labelled as ‘Blue’. This is achieved by inheriting the Blue set from the best tip, or the most recent block with the largest Blue set in its past, and then adding new blocks that maintain the k-cluster property.
The GHOSTDAG algorithm initiates with the genesis block, the first block of the chain, and recursively computes the Blue sets of each tip, effectively creating a chain of these sets that extends back to the genesis block. Blocks not included in the Blue set are considered ‘Red’ and are treated with suspicion, as they are likely to have been created by non-cooperating nodes. The ordering of blocks in GHOSTDAG is a delicate process that first orders the Blue blocks according to a topological sort and then positions the Red blocks in a manner that penalizes them without excluding them from the ledger.
This protocol’s brilliance lies not just in its ability to efficiently order transactions but also in its scalability. GHOSTDAG can accommodate an increased block creation rate without compromising the security of the ledger. It does so by ensuring that the order of transactions is agreed upon and immutable over time, as long as the majority of the computational power is controlled by honest nodes.
In practical terms, GHOSTDAG’s approach to block ordering and its inherent scalability translates to a distributed ledger that is significantly more efficient than traditional blockchain. This is particularly evident in networks like Kaspa, where the ability to handle a high volume of transactions without sacrificing speed or security is paramount.
A blockDAG structure enables blocks to reference multiple predecessors, which significantly increases throughput by allowing many blocks to be created in parallel. However, this also introduces the challenge of ordering these blocks and their transactions, which is precisely the challenge GHOSTDAG addresses. With its efficient algorithm and scalability, GHOSTDAG is positioned to be a critical component in the next wave of distributed ledger technologies, often referred to as blockchain 3.0, which seeks to resolve the trilemma of achieving speed, security, and scalability without compromise.
In conclusion, GHOSTDAG represents a profound leap forward in the design of distributed ledgers, offering solutions to the critical issues of speed and scalability while maintaining the integrity and security of the network. As technology matures and is adopted in more applications, it could very well redefine the architecture of distributed ledger technology for the foreseeable future.
The evolution from GHOST to DAG KNIGHT in the Kaspa ecosystem represents a significant advancement in the field of consensus protocols within distributed ledger technologies. The seminal work that began with the GHOST protocol laid the foundation for a series of innovative changes, leading up to the creation of DAG KNIGHT. This evolution showcases a commitment to improving transaction throughput and network security while navigating the complexities inherent to decentralized systems.
The GHOST protocol, introduced in 2013 by Dr. Yonatan Sompolinsky and Aviv Zohar, addressed the critical issue of block creation rates in relation to network security. It introduced the concept of the “greedy heaviest observed subtree” to optimize the main chain selection in a block tree. This change allowed for higher block creation rates and larger block sizes without the fear of 51% attacks, a prevalent concern in proof-of-work cryptocurrencies.
In the subsequent years, this work gave rise to the PHANTOM protocol, which generalized the longest chain rule of Nakamoto Consensus (NC) to select the largest, sufficiently connected subset of blocks. PHANTOM introduced an optimization problem that aimed at selecting the maximum k-cluster sub-DAG, with k representing an upper bound on the network’s latency.
The DAG KNIGHT protocol, however, takes a step further by removing the necessity of assuming an a priori latency bound, thereby addressing one of the limitations of PHANTOM and previous protocols. DAG KNIGHT operates under the assumption of no upper bound on network latency, making it the first permissionless parameterless consensus protocol secure against attackers with less than 50% of the computational power.
Parameterlessness has crucial implications for the network’s performance. Unlike parameterized protocols that are typically constrained by their hardcoded latency parameters, DAG KNIGHT allows the network to converge according to its actual conditions. It adjusts to real-time adversarial latency, enabling transaction confirmations to occur within seconds under normal internet conditions, a significant improvement over its predecessors.
DAG KNIGHT’s model assumes a Byzantine setup, meaning the attacker can deviate arbitrarily from the protocol’s rules, but the system is secured under the assumption that the attacker controls less than 50% of the computational power. It ensures the network remains secure under arbitrarily high throughput configurations, constrained only by the capacity of nodes’ hardware and the network’s backbone.
DAG KNIGHT’s optimization paradigm reflects a dual min-max problem, where it searches for the minimal k such that the largest k-cluster covers at least 50% of the DAG. This nuanced approach tolerates just enough latency and disconnectivity among the selected set of blocks, balancing safety and liveness.
The protocol’s self-stabilizing nature allows it to recover from past failures once the conditions are met, ensuring safe confirmation of transactions post-recovery. DAG KNIGHT is responsive, not in the sense of current observable latency but in the weaker sense of the maximum latency that an adversary may cause.
Overall, DAG KNIGHT’s consensus protocol represents a mature evolution in the Kaspa ecosystem, offering a more adaptive, secure, and efficient system that stands as a testament to the progressive nature of blockchain technology research and development.