Proposal - Blockchain Coordination
Tags: blockchain, decentralized, security, bitcoin
Published: 2024-06-15 21:11:41

The productive and peaceable coordination of large groups is a cornerstone of modern civilization. Systems designed to tackle large-scale coordination challenges—from monetary policy to commercial transactions—have traditionally relied on hierarchical, top-down structures to function effectively. Trusting these systems means relying on centralized institutions to ensure adherence to rules and agreements. Consequently, our ability to coordinate on a large scale has been limited by the reliability of these institutions as intermediaries.

The early 21st century witnessed the rise of Bitcoin, the first decentralized system capable of addressing coordination problems at scale without the need for centralized institutions. By embedding trust guarantees in code rather than in individuals or organizations, Bitcoin demonstrated that open-source software protocols with the right game-theoretic and mathematical properties could create networks that challenge, and potentially surpass, their centralized counterparts.

While Bitcoin is becoming a transformative force in the global monetary system and is on track to becoming the world's first credibly neutral, non-sovereign reserve currency, other areas of society are only beginning to realize the potential of decentralized systems. Building on Bitcoin's principles and achievements, projects like this aim to develop open public infrastructure that supports advanced computation and brings us closer to the vision of a decentralized web.

Despite significant progress by various blockchain platforms, challenges in scalability, usability, and incentivization remain. The decentralized web is still more of a promise than a reality, and a breakthrough akin to the “iPhone moment” that ignited the mobile web revolution has yet to occur. This solution tackles these challenges with its fourth-generation blockchain architecture and the DAVE (Directed Acyclic Validation Engine) consensus model. By leveraging a directed acyclic graph structure and parallel processing, it offers high scalability and efficient validation. The system ensures that multiple transactions can be processed concurrently, reducing bottlenecks and improving performance.

A graph-based structure enables high scalability and efficient validation, making it secure against attacks. Validators earn reputation points for successful validations, ensuring reliable validation and trustworthy participants. Additionally, validators can set their own service fee percentages, creating a dynamic and competitive environment that incentivizes high performance. The system leverages batch transactions and sharding to further enhance scalability. Batch transactions allow multiple transactions to be processed together, reducing overhead and improving efficiency. Sharding divides the network into smaller shards, each capable of processing transactions independently, thereby increasing throughput. Parallel processing and asynchronous processing enable multiple transactions to be validated concurrently and reducing latency. This multi-faceted approach ensures a robust, scalable, and efficient system capable of handling a high volume of transactions.

It should be designed with developers in mind, offering robust APIs and SDKs for seamless integration, comprehensive documentation for guidance, and an active community for support and collaboration. This system provides flexible tools that enable developers to leverage the platform’s capabilities without extensive blockchain expertise. Detailed documentation includes practical examples and tutorials to help developers navigate the platform efficiently. An active developer community fosters collaboration and knowledge sharing, enhancing the overall development experience.

A system like this, with the innovative DAVE consensus model and advanced architecture, is poised to revolutionize the blockchain industry. By addressing key challenges and providing a robust platform for a wide range of applications, creating new standards in the blockchain space and lead the way into the future of decentralized technology. 




**DAVE - Consensus model:**

**Transaction Representation**
The system operates by representing each transaction (Ti) as a node within a graph structure. These transactions are stored in a hash map where the key is the transaction ID and the value is the transaction data:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m8d5ll6r646mp40jyihl.png)


Directed edges between transactions indicate dependencies, such that an edge from (Ti) to (Tj) signifies that (Ti) must be processed before (Tj). Outgoing edges are stored in (o_edges) and incoming edges in (i_edges):


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q7m013l6xiyc5ccwpg7v.png)


**Transitive Closure and Reduction**
The transitive closure of the graph provides the set of all reachable nodes from a given node, while transitive reduction minimizes the number of edges while preserving reachability:


![Transitive Closure and Reduction](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mu9ub44k71iheh65rhtg.png)


**Topological Sorting**
Topological sorting orders the transactions such that for every directed edge (Ti -> Tj), 


![Topological Sorting](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p6hx4mtcwxjp589s3ki3.png)


**Consensus Flags**
Consensus flags indicate the state of consensus for each transaction:


![Consensus Flags](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/82tu4e0e0m8wm0fnun0u.png)


**Validator Selection and Cryptographic Operations**
Validators are selected based on their reputation scores. Validators are sorted, and the top third are selected:


![Validator Selection and Cryptographic Operations](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p24iacd6l4fujjf7zf7r.png)


The system also performs cryptographic operations to prove knowledge of a secret (x) without revealing it. The proof consists of (y,r), where (y) is the public value and (r) is the response to the challenge:


![cryptographic operations](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4idis73b6snpbvetwqvy.png)



**Combined Operation**
The combined operation begins with the addition and validation of transactions. Transactions are added to the graph, and validators validate them, updating temporary balances to ensure no double-spending:


![Combined Operation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9pd143gsnhtnpephn45s.png)



Based on the number of validator approvals, consensus flags are updated:



![validator approvals](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zzpfeauisr9e22h7yukh.png)



The graph state is synchronized with external sources to ensure consistency across the network:


![graph state is](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tzekwjuhibjf20fsibl3.png)



The module allows for the addition of transactions and the establishment of dependencies through edges. This forms a graph where each transaction must be processed in a specific order to maintain consistency. Another module selects a subset of validators based on their reputation scores. This selection process ensures that only the most reputable validators participate in the validation process. Validators validate each transaction in the graph. This validation checks for consistency, such as ensuring that transactions do not conflict and that double-spending is prevented. Temporary balances are used during validation to simulate the state changes without committing them until consensus is reached. Based on the validation results, the module updates the consensus flags for each transaction. This flag indicates the level of consensus achieved: PreAcceptance, Acceptance, PreConfirmation, Confirmation, and Finalization. The module synchronizes its state with external transactions, ensuring that all nodes in the network have a consistent view of the transaction history. This is crucial for maintaining the integrity and reliability of the network.


**Layer Separation and Fee Distribution**
In the system, Layer 0 and Layer 1 are separated to enhance efficiency and security. All transaction fees are moved to Layer 1, where the main transaction processing occurs. However, Layer 0, consisting of validators, earns service fees from Layer 1. Validators in Layer 0 validate transactions and provide essential network services, for which they receive a portion of the transaction fees as service fees. This separation ensures a clear distinction between transaction processing and validation tasks, improving the overall system performance and scalability.


Navid Kiani Larijani - June 2024