<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Navid Kiani Larijani</title>
    <description>The latest articles on Forem by Navid Kiani Larijani (@nkianil).</description>
    <link>https://forem.com/nkianil</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1561650%2F63989f64-69ca-4e5b-bab8-8624cfcd37c9.jpg</url>
      <title>Forem: Navid Kiani Larijani</title>
      <link>https://forem.com/nkianil</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/nkianil"/>
    <language>en</language>
    <item>
      <title>Leveraging Federated Learning for Privacy-Preserving Systems: A Zero-Knowledge Approach</title>
      <dc:creator>Navid Kiani Larijani</dc:creator>
      <pubDate>Thu, 22 Aug 2024 21:49:00 +0000</pubDate>
      <link>https://forem.com/nkianil/leveraging-federated-learning-for-privacy-preserving-systems-a-zero-knowledge-approach-20j3</link>
      <guid>https://forem.com/nkianil/leveraging-federated-learning-for-privacy-preserving-systems-a-zero-knowledge-approach-20j3</guid>
      <description>&lt;p&gt;In today’s data-driven world, privacy and security are paramount. As developers, we strive to build systems that protect user data while still enabling robust machine learning capabilities. Federated learning offers a compelling solution by keeping data decentralized and only sharing model parameters, which aligns with the principles of Zero-Knowledge Proofs (ZKP). This article will explore how you can implement a privacy-preserving system using federated learning and highlight the similarities with ZKP concepts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Federated Learning?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Federated learning is a decentralized machine learning approach where models are trained locally on devices or nodes without sharing the actual data. Instead of sending raw data to a central server, each node computes updates (e.g., gradients or model parameters) that are then aggregated centrally to improve the global model. This method ensures that sensitive information remains on the local device, enhancing privacy and security.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Federated Learning and Zero-Knowledge Proofs: A Comparison&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Zero-Knowledge Proofs allow one party to prove to another that a statement is true without revealing any additional information. Similarly, in federated learning, nodes prove their contribution to the global model by sharing only model updates, without exposing the underlying data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here’s how federated learning aligns with ZKP principles:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;• Local Training (Local Computation in ZKP): Each node performs computations (model training) locally.&lt;br&gt;
• Parameter Aggregation (Proof Generation in ZKP): Nodes send only the computed parameters (proofs) to a central server, without exposing raw data.&lt;br&gt;
• Privacy-Preserving (Zero Knowledge in ZKP): The global model improves based on these updates, ensuring that no data is exposed during the process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Implementing Federated Learning: A Code Walkthrough&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let’s dive into an example of how you might implement federated learning in Rust, focusing on local training and parameter aggregation.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;use std::collections::HashMap;
use std::sync::Arc;
use tokio::sync::RwLock;

#[derive(Clone, Debug)]
struct Model {
    parameters: HashMap&amp;lt;String, f64&amp;gt;,
}

impl Model {
    // Local training function on the client's data
    fn train_locally(&amp;amp;mut self, data: &amp;amp;HashMap&amp;lt;String, f64&amp;gt;) {
        for (key, value) in data {
            let param = self.parameters.entry(key.clone()).or_insert(0.0);
            *param += value;
        }
    }

    // Aggregate parameters from multiple nodes
    fn aggregate(&amp;amp;mut self, updates: Vec&amp;lt;HashMap&amp;lt;String, f64&amp;gt;&amp;gt;) {
        for update in updates {
            for (key, value) in update {
                let param = self.parameters.entry(key).or_insert(0.0);
                *param += value;
            }
        }
    }
}

#[tokio::main]
async fn main() {
    // Simulate local data on two nodes
    let node_1_data = Arc::new(RwLock::new(HashMap::from([
        ("feature1".to_string(), 0.5),
        ("feature2".to_string(), 1.2),
    ])));

    let node_2_data = Arc::new(RwLock::new(HashMap::from([
        ("feature1".to_string(), 0.7),
        ("feature2".to_string(), 1.5),
    ])));

    // Initialize models on both nodes
    let mut model_node_1 = Model { parameters: HashMap::new() };
    let mut model_node_2 = Model { parameters: HashMap::new() };

    // Train models locally
    {
        let data = node_1_data.read().await;
        model_node_1.train_locally(&amp;amp;data);
    }
    {
        let data = node_2_data.read().await;
        model_node_2.train_locally(&amp;amp;data);
    }

    // Aggregate parameters at the central server
    let mut global_model = Model { parameters: HashMap::new() };
    global_model.aggregate(vec![model_node_1.parameters, model_node_2.parameters]);

    println!("Aggregated model parameters: {:?}", global_model.parameters);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Key Concepts in the Code&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Local Training: In the train_locally method, each node trains a model using its local data. This data never leaves the node, ensuring privacy.&lt;/li&gt;
&lt;li&gt;Parameter Aggregation: The aggregate method combines the parameters from multiple nodes to update the global model. This process is analogous to the aggregation of proofs in ZKP, where only the proof is shared, not the underlying data.&lt;/li&gt;
&lt;li&gt;Global Model: The global model is updated based on the aggregated parameters, reflecting the learning from all nodes without compromising individual privacy.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Benefits of Federated Learning&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;• Privacy-Preserving: Users’ data never leaves their devices, significantly reducing the risk of data breaches.&lt;br&gt;
• Scalable: Federated learning can scale across millions of devices, each contributing to the model without centralized data storage.&lt;br&gt;
• Secure: The approach is inherently secure, as the central server only aggregates model parameters, not the actual data.&lt;/p&gt;

&lt;p&gt;By using federated learning, developers can build systems that maintain user privacy while still enabling powerful machine learning capabilities. This approach aligns with the principles of Zero-Knowledge Proofs, ensuring that data remains secure and private throughout the process. As privacy concerns continue to grow, adopting techniques like federated learning will become increasingly essential in modern software development.&lt;/p&gt;

&lt;p&gt;Happy coding! 🎉&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclaimer: The code provided is for educational purposes and may require additional enhancements for production use.&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>SYNNQ DEVNET - WHERE BLOCKCHAIN MEETS AI</title>
      <dc:creator>Navid Kiani Larijani</dc:creator>
      <pubDate>Sat, 17 Aug 2024 05:07:09 +0000</pubDate>
      <link>https://forem.com/nkianil/synnq-devnet-where-blockchain-meets-ai-f7j</link>
      <guid>https://forem.com/nkianil/synnq-devnet-where-blockchain-meets-ai-f7j</guid>
      <description>&lt;p&gt;🚀 Exciting news! SYNNQ has officially launched its DevNet, tailored for developers! Get ready to build, test, and innovate with cutting-edge tools and resources. Join the SYNNQ community today and be part of the future of decentralized development.  &lt;/p&gt;

&lt;p&gt;Visit to access the DevNet:&lt;br&gt;
&lt;a href="https://synnq.io" rel="noopener noreferrer"&gt;https://synnq.io&lt;/a&gt;&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>web3</category>
      <category>ai</category>
    </item>
    <item>
      <title>Next-Generation DLT: Neural Networks, Federated Learning, and DAG Synergy</title>
      <dc:creator>Navid Kiani Larijani</dc:creator>
      <pubDate>Thu, 27 Jun 2024 16:51:07 +0000</pubDate>
      <link>https://forem.com/nkianil/next-generation-dlt-neural-networks-federated-learning-and-dag-synergy-4dpe</link>
      <guid>https://forem.com/nkianil/next-generation-dlt-neural-networks-federated-learning-and-dag-synergy-4dpe</guid>
      <description>&lt;p&gt;As a dedicated advocate for decentralized systems, I’m thrilled by the possibilities of blockchain technology. But let’s face it—current solutions still struggle with security, scalability, and efficiency. It’s time for a breakthrough.&lt;/p&gt;

&lt;p&gt;The traditional blockchain model, despite its innovations, hasn’t fully realized the dream of a decentralized web. We need to push the envelope and redefine what’s possible.&lt;/p&gt;

&lt;p&gt;Introducing SYNNQ! 🚀 By integrating Neural Networks (NN) and Federated Learning within a Directed Acyclic Graph (DAG) structure, SYNNQ addresses these challenges head-on. Here’s how:&lt;/p&gt;

&lt;p&gt;• Unmatched Security: Advanced fraud detection with NN-based validation and federated learning.&lt;/p&gt;

&lt;p&gt;• Incredible Scalability: Up to 1,000,000 transactions per second with lightning-fast confirmation times.&lt;/p&gt;

&lt;p&gt;• Efficient Resource Use: 65% reduction in computational overhead and 40% decrease in bandwidth usage.&lt;/p&gt;

&lt;p&gt;• Rock-Solid Resilience: Maintains efficiency even with 30% of nodes compromised.&lt;/p&gt;

&lt;p&gt;• Decentralized Governance: Fair and transparent reputation-based voting system.&lt;/p&gt;

&lt;p&gt;SYNNQ is not just an upgrade—it’s a revolution. Let’s challenge the status quo and drive the future of decentralized technology together. Join me in powering the next generation of blockchains! 🌟&lt;/p&gt;

&lt;p&gt;For more details and collaboration, read our full whitepaper or contact us at &lt;a href="mailto:dev@synnq.io"&gt;dev@synnq.io&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.academia.edu/121565045/Next_Generation_Blockchain_Neural_Networks_Federated_Learning_and_DAG_Synergy_June_2024?source=swp_share"&gt;https://www.academia.edu/121565045/Next_Generation_Blockchain_Neural_Networks_Federated_Learning_and_DAG_Synergy_June_2024?source=swp_share&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>The Impossible Blockchain Equation: A Challenge to Developers</title>
      <dc:creator>Navid Kiani Larijani</dc:creator>
      <pubDate>Tue, 18 Jun 2024 11:36:43 +0000</pubDate>
      <link>https://forem.com/nkianil/the-impossible-blockchain-equation-a-challenge-to-developers-17og</link>
      <guid>https://forem.com/nkianil/the-impossible-blockchain-equation-a-challenge-to-developers-17og</guid>
      <description>&lt;p&gt;In the fast-paced world of blockchain technology, a new challenge has emerged that could push the boundaries of our technical capabilities. We present to you the "Impossible Blockchain Equation," a complex puzzle designed to test the limits of blockchain development. This isn't just another technical problem; it's an opportunity to explore the fundamental constraints and possibilities of blockchain systems. Can you solve the equation that balances all critical properties of a blockchain without compromising any of them?&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The Challenge&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;We invite you to tackle this unsolvable equation. Can you solve the problem that satisfies all five properties simultaneously without compromising any of them?&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The Impossible Blockchain Equation&lt;/strong&gt;
&lt;/h2&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;D + S + C + P + R = Constant&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Where:&lt;/p&gt;

&lt;p&gt;D = &lt;strong&gt;Decentralization&lt;/strong&gt;: Ensuring control and decision-making are distributed across a wide network of nodes.&lt;br&gt;
S = &lt;strong&gt;Security&lt;/strong&gt;: Maintaining the highest levels of protection against attacks, fraud, and unauthorized access.&lt;br&gt;
C = &lt;strong&gt;Scalability&lt;/strong&gt;: Handling an increasing number of transactions without compromising performance.&lt;br&gt;
P = &lt;strong&gt;Speed&lt;/strong&gt;: Processing and confirming transactions rapidly.&lt;br&gt;
R = &lt;strong&gt;Resilience&lt;/strong&gt;: Recovering from failures, attacks, or disruptions effectively.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why This Matters&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The equation encapsulates the quintessence of the blockchain trilemma, extending it into a more complex and nuanced puzzle. The traditional blockchain trilemma posits that out of decentralization, security, and scalability, a blockchain system can only optimize for two, leaving the third somewhat compromised. Our equation takes this concept further by introducing two additional critical factors: speed and resilience.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Five Properties Explained&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Decentralization (D):&lt;/strong&gt; This property ensures that the power and control over the blockchain network are not concentrated in the hands of a few entities. True decentralization promotes transparency, reduces the risk of censorship, and enhances trust among participants.&lt;/p&gt;

&lt;p&gt;**Security (S): **Security is paramount in any blockchain system. It involves protecting the network against various types of attacks, such as double-spending, 51% attacks, and Sybil attacks. A secure blockchain ensures data integrity and user trust.&lt;/p&gt;

&lt;p&gt;**Scalability (C): **Scalability refers to the network's ability to handle a growing number of transactions. As blockchain adoption increases, the system must scale to accommodate higher transaction volumes without compromising performance or increasing costs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Speed (P):&lt;/strong&gt; Speed is crucial for the usability of blockchain applications. This involves the quick processing and confirmation of transactions, making the system responsive and efficient for users. High speed is essential for applications like micropayments and real-time data transfers.&lt;/p&gt;

&lt;p&gt;**Resilience (R): **Resilience is the system's ability to withstand and recover from failures, attacks, or other disruptions. A resilient blockchain can maintain its operations and data integrity even under adverse conditions, ensuring continuity and reliability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Constant Challenge&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The equation D + S + C + P + R = Constant suggests that increasing one property will inevitably require trade-offs with one or more of the others. For instance, enhancing decentralization might slow down transaction speed, or boosting security could limit scalability. The challenge is to find a balance where none of these properties are significantly compromised, maintaining an optimal state across all five factors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can It Be Solved?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;While some may argue that this equation is inherently unsolvable due to the inherent trade-offs, the quest to balance these properties pushes the boundaries of innovation and creativity in the blockchain space. By attempting to solve this equation, you may discover new architectures, consensus mechanisms, or optimization strategies that could revolutionize the field.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Join the Challenge&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We encourage you to delve into this challenge, explore potential solutions, and share your findings with the community. Whether you're a seasoned blockchain developer, a researcher, or a passionate enthusiast, your insights could pave the way for groundbreaking advancements in blockchain technology.&lt;/p&gt;

&lt;p&gt;Can you crack the Impossible Blockchain Equation? Let's push the limits of what's possible and redefine the future of blockchain together.&lt;/p&gt;

&lt;p&gt;More information here: &lt;a href="https://synnq.io/blog/unsolvable-challenge"&gt;Synnq&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Join us:&lt;/strong&gt; &lt;br&gt;
&lt;a href="https://x.com/SYNNQ_Networks"&gt;X (formely Twitter)&lt;/a&gt;&lt;br&gt;
&lt;a href="https://discord.gg/mUXWm9sAMJ"&gt;Discord&lt;/a&gt;&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>programming</category>
      <category>developers</category>
      <category>devchallenge</category>
    </item>
    <item>
      <title>Proposal - Blockchain Coordination</title>
      <dc:creator>Navid Kiani Larijani</dc:creator>
      <pubDate>Sat, 15 Jun 2024 21:11:41 +0000</pubDate>
      <link>https://forem.com/nkianil/proposal-blockchain-coordination-5793</link>
      <guid>https://forem.com/nkianil/proposal-blockchain-coordination-5793</guid>
      <description>&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DAVE - Consensus model:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Transaction Representation&lt;/strong&gt;&lt;br&gt;
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:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm8d5ll6r646mp40jyihl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm8d5ll6r646mp40jyihl.png" alt="Image description" width="468" height="29"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;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):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq7m013l6xiyc5ccwpg7v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq7m013l6xiyc5ccwpg7v.png" alt="Image description" width="468" height="47"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Transitive Closure and Reduction&lt;/strong&gt;&lt;br&gt;
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:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmu9ub44k71iheh65rhtg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmu9ub44k71iheh65rhtg.png" alt="Transitive Closure and Reduction" width="468" height="32"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Topological Sorting&lt;/strong&gt;&lt;br&gt;
Topological sorting orders the transactions such that for every directed edge (Ti -&amp;gt; Tj), &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp6hx4mtcwxjp589s3ki3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp6hx4mtcwxjp589s3ki3.png" alt="Topological Sorting" width="468" height="47"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Consensus Flags&lt;/strong&gt;&lt;br&gt;
Consensus flags indicate the state of consensus for each transaction:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F82tu4e0e0m8wm0fnun0u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F82tu4e0e0m8wm0fnun0u.png" alt="Consensus Flags" width="437" height="13"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Validator Selection and Cryptographic Operations&lt;/strong&gt;&lt;br&gt;
Validators are selected based on their reputation scores. Validators are sorted, and the top third are selected:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp24iacd6l4fujjf7zf7r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp24iacd6l4fujjf7zf7r.png" alt="Validator Selection and Cryptographic Operations" width="468" height="75"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;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:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4idis73b6snpbvetwqvy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4idis73b6snpbvetwqvy.png" alt="cryptographic operations" width="468" height="301"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Combined Operation&lt;/strong&gt;&lt;br&gt;
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:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9pd143gsnhtnpephn45s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9pd143gsnhtnpephn45s.png" alt="Combined Operation" width="468" height="31"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Based on the number of validator approvals, consensus flags are updated:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzzpfeauisr9e22h7yukh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzzpfeauisr9e22h7yukh.png" alt="validator approvals" width="274" height="67"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The graph state is synchronized with external sources to ensure consistency across the network:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftzekwjuhibjf20fsibl3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftzekwjuhibjf20fsibl3.png" alt="graph state is" width="468" height="29"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Layer Separation and Fee Distribution&lt;/strong&gt;&lt;br&gt;
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.&lt;/p&gt;

&lt;p&gt;Navid Kiani Larijani - June 2024&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>decentralized</category>
      <category>security</category>
      <category>bitcoin</category>
    </item>
  </channel>
</rss>
