3.5.2 Transaction Processing

3.5.2.1 Processing Overview

Transaction processing is a vital aspect of the DGT blockchain network, ensuring the accurate and secure execution of transactions within a decentralized environment. Transactions serve as messages exchanged between network nodes, carrying instructions and data that need to be validated and added to the blockchain. This overview provides a concise understanding of the key stages involved in transaction processing within the DGT blockchain. The process begins with the reception of transactions by participating nodes, where they undergo validation to ensure attributes like signatures and timestamps are valid. Consensus mechanisms are then employed to determine the order in which transactions should be processed, ensuring a consistent sequence across the network. Validated transactions are executed, resulting in updates to the blockchain's state by modifying relevant data structures and account balances. Once processed, transactions are included in blocks, which are stored on the blockchain and undergo verification for integrity and acceptance by the network. Confirmed blocks solidify the transactions' permanence on the blockchain, establishing an immutable record of transactional activities.

3.5.2.2 Validation Process

Validation is a crucial part of transaction processing within the DGT blockchain network. It ensures the integrity and accuracy of transactions before they are included in the blockchain. In the context of transaction processing, validation involves two distinct but related aspects: verification and validation itself. Verification refers to the process of checking the correctness and authenticity of transaction attributes, while validation involves assessing the compliance of a transaction with network rules and executing transaction-specific logic.

Verification is the initial step in the validation process, where transaction attributes such as signatures, timestamps, and data integrity are examined. This step aims to ensure that the transaction is genuine and has not been tampered with during transmission. Verification is typically performed at both the network level and the node level to maintain the security and authenticity of transactions.

Validation goes beyond verification by assessing the compliance of a transaction with network-specific rules and executing transaction-specific logic. It involves ensuring that the transaction adheres to the required format, follows the predefined business logic, and does not violate any constraints or rules set by the blockchain network. Validation ensures that the transaction is both structurally and functionally correct, making it suitable for further processing. In the DGT blockchain network, validation occurs on both the network level and the node level. At the network level, validation is the responsibility of the consensus mechanism, which collectively verifies the validity and order of transactions across the network. The consensus mechanism ensures that transactions meet the criteria for inclusion in the blockchain, maintaining the integrity and agreement of the distributed ledger.

At the node level, the Transaction Processor component and the Journal play a significant role in transaction validation. The Transaction Processor executes transaction-specific logic and performs checks to validate transactions within the context of a specific transaction family. The Journal component, which stores and manages the blockchain's data, collaborates with other components to validate transactions and participate in the consensus process, such as the Byzantine Fault Tolerance (BFT) mechanism, by creating votes for the acceptance of transactions.

Within the DGT blockchain network, a DGT Node represents a virtual supercomputer that encompasses multiple connected components with virtual networking capabilities. Each component within the DGT Node has its own Internal API, facilitating seamless communication and data exchange between them:

  • External Node API: This component handles incoming transactions from external clients and forwards them to the appropriate internal components for further processing.

  • Transaction Processors: These components are responsible for executing and validating transactions within the DGT Node. They receive transactions from the External Node API via the Internal API and perform transaction-specific operations based on the associated transaction family logic.

  • Journal: The Journal component stores and manages the transactional and state data within the DGT blockchain. It receives validated transactions from the Transaction Processors via the Internal API, updates the blockchain's state, and communicates with other components for consensus, block formation, and managing forks.

  • Messaging System: This component enables communication between nodes within the DGT blockchain network. It allows for the exchange of messages containing transactions, blocks, and network-related information among nodes. The Messaging System utilizes the Internal API to send and receive messages securely and reliably.

  • Pluggable Consensus Components: These components implement the consensus algorithm within the DGT Node. They interact with other components, such as the Journal and Transaction Processors, via the Internal API to reach a consensus on the validity and order of transactions.

In the DGT blockchain network, validation occurs on both the network level and the node level. At the network level, validation is the responsibility of the consensus mechanism, which collectively verifies the validity and order of transactions across the network. The consensus mechanism ensures that transactions meet the criteria for inclusion in the blockchain, maintaining the integrity and agreement of the distributed ledger.

The transaction originates from a client and is sent to the DGT blockchain network via the External Node API. The External Node API acts as the entry point, allowing external clients to interact with the network by submitting transactions, querying the blockchain state, and accessing other blockchain functionalities.

Transaction Path from Client to Broadcasting to Other Nodes:

  • A client initiates a transaction and sends it to the DGT blockchain network via the External Node API of a DGT Node.

  • The External Node API receives the transaction and forwards it to the appropriate internal components, such as the Transaction Processors, using the Internal API.

  • The Transaction Processors validate and execute the transaction based on the associated transaction family logic, generating the desired state changes. They communicate the results back to the Journal via the Internal API.

  • The Journal updates the blockchain's state based on the transaction's execution and broadcasts the validated and processed transaction to other nodes within the network using the Messaging System and the Internal API.

  • Other nodes in the network receive the transaction through their respective Journal components via the Messaging System and the Internal API. They validate the transaction and incorporate it into their local copies of the blockchain, ensuring the transaction becomes part of the shared ledger across the DGT blockchain network.

The validation process occurs within each individual node as part of its internal checks. The BFT vote, on the other hand, is a mechanism specifically related to achieving consensus among nodes in the network. Consensus, in a broader sense, encompasses the entire mechanism used by the blockchain network to agree on the order and validity of transactions. The validation process on Network Level

  • Transaction Submission:

    • The client submits a transaction to the DGT blockchain network through the External Node API.

    • The transaction is received by the primary node, which acts as the entry point to the network

  • Validation by Primary Node:

    • The primary node validates the transaction by verifying its attributes, such as signatures, timestamps, and compliance with network rules

    • If the transaction passes validation, it proceeds to the next step. Otherwise, it is rejected

  • Broadcasting to Other Nodes:

    • The primary node broadcasts the validated transaction to other nodes in the network using the Messaging System and Internal API.

    • Each receiving node, upon receiving the transaction, performs its own validation process.

  • Validation by Receiving Nodes:

    • Each receiving node independently validates the transaction by performing attribute verification, executing transaction-specific logic, and checking for any conflicts or rule violations.

    • If the transaction passes validation on a receiving node, it moves to the next step. Otherwise, it is rejected on that particular node.

  • BFT Vote (Byzantine Fault Tolerance):

    • In a BFT consensus algorithm, nodes engage in a voting process to achieve consensus on the acceptance of a transaction.

    • Upon successful validation, each receiving node casts a vote in favor of including the transaction in the blockchain.

    • Nodes communicate their votes to each other through the Internal API.

  • Vote Collection and Consensus:

    • The votes from the receiving nodes are collected and analyzed to determine consensus.

    • Consensus is reached when a certain threshold of nodes, typically a two-thirds majority, agrees to include the transaction.

    • Once consensus is achieved, the transaction is considered accepted for inclusion in the blockchain.

3.5.2.3 Transaction Processor

The Transaction Processor in DGT is a crucial component responsible for receiving, validating, executing, and processing transactions within the blockchain network. It ensures the correct execution and inclusion of transactions in the blockchain, contributing to the overall integrity and security of the DGT network.

  • Transaction Submission and Reception: The Transaction Processor receives transactions submitted to the DGT blockchain network. It acts as the entry point for incoming transactions, ensuring their proper reception and handling. Transactions can be submitted to the Transaction Processor through various means, such as API calls or other communication channels.

  • Transaction Validation: Upon receiving transactions, the Transaction Processor performs validation checks to ensure their correctness and compliance with network rules. It verifies attributes such as signatures, nonces, and timestamps to authenticate the transactions. Additionally, the Transaction Processor may apply additional validation rules specific to the transaction families being used within the DGT blockchain.

  • Transaction Execution: Validated transactions are then executed by the Transaction Processor. It processes the transactions according to the predefined logic specified by the associated transaction family. This includes modifying the blockchain state, updating data structures, and performing any necessary computations or actions specified by the transaction.

  • Consensus and Block Inclusion: After executing a transaction, the Transaction Processor participates in the consensus mechanism of the DGT blockchain network to determine the order in which transactions should be included in blocks. It collaborates with other nodes to reach a consensus on the transaction ordering, ensuring a consistent view of the blockchain across the network.

  • State Update and Block Formation: Once transactions are ordered, the Transaction Processor updates the blockchain's state to reflect the changes made by the executed transactions. It modifies the relevant data structures and account balances accordingly. The Transaction Processor then collaborates with other nodes to create blocks, which package a group of validated transactions for storage on the blockchain.

  • Transaction Acknowledgment and Response: As the Transaction Processor handles transactions, it generates acknowledgments and responses to provide feedback to the transaction initiators. These acknowledgments indicate the success or failure of the transaction execution and can include additional information or metadata related to the transaction processing.

3.5.2.4 Journal Component

The Journal component in DGT plays a crucial role in securely storing, organizing, and managing the transactional and state data of the blockchain. It ensures the consistency, integrity, and security of the blockchain's history and actively participates in transaction validation, execution, consensus, and fork management:

  • Storage of Transactional and State Data: The Journal component in DGT acts as a storage layer, responsible for securely storing and organizing the transactional and state data of the blockchain. It maintains a chronological record of validated transactions, ensuring the immutability and integrity of the blockchain's history. Additionally, the Journal component stores the current state of the blockchain, reflecting the latest values of assets, identities, or other relevant data.

  • Consensus and Fork Management: The Journal component in DGT supports consensus algorithms and manages potential forks within the blockchain network. It tracks the accepted chain of blocks and assists in maintaining the blockchain's canonical history. In the case of forks, where multiple chains compete for acceptance, the Journal component aids in conflict resolution and determining the valid chain based on consensus rules.

  • Transaction Validation and Execution: Within the DGT blockchain network, the Journal component ensures the validation and execution of transactions. It verifies the authenticity, integrity, and compliance of incoming transactions, checks for potential conflicts or rule violations, and executes the transactions to update the blockchain's state. The Journal component guarantees the ordered processing of transactions, ensuring the integrity and consistency of the blockchain's data.

  • Merkle Tree Structure: The Journal component in DGT utilizes a Merkle tree data structure to efficiently organize and verify the integrity of the blockchain's data. The Merkle tree enables rapid and secure verification of transactional and state data by generating hash values for each level of the tree. This structure ensures that any modification to a transaction or block would be detectable, as it would require updating all subsequent hash values.

  • Access Control and Security: The Journal component in DGT incorporates access control mechanisms to ensure the security and privacy of the blockchain's data. It enforces permissions and authentication, allowing authorized entities to read and write data to the blockchain while preventing unauthorized access or tampering. The Journal component contributes to the overall security posture of the DGT blockchain network.

Last updated