Skip to content

Architecture

The architecture of the Xian blockchain is designed with modularity, scalability, and security at its core, leveraging a combination of industry-leading technologies and innovative solutions to create a robust platform for decentralized applications (dApps) and smart contracts. This section will outline the key components of Xian's architecture, illustrating how these elements work together to provide a seamless and efficient blockchain ecosystem.

High-Level Overview

Xian's blockchain architecture is built upon several foundational layers, each serving a distinct purpose within the ecosystem:

  • Consensus Layer: Utilizes CometBFT for fast and secure transaction validation, ensuring instant finality and high throughput.
  • Networking Layer: Facilitates communication between nodes in the Xian network, allowing for efficient dissemination of transactions and blocks.
  • Application Layer: Hosted by the Application Blockchain Interface (ABCI), this layer is where the blockchain’s state and the logic of smart contracts reside, enabling the development and execution of decentralized applications in a variety of programming languages, notably through Contracting for smart contracts.

Detailed Component Interaction

  1. Transaction Flow:

    • Users interact with the Xian blockchain by submitting transactions through client applications. These transactions are always smart contract executions.
    • Transactions are first broadcast to a node and the gossip protocol takes care of every node picking it up.
    • Validators use the CometBFT consensus engine to agree on the validity and order of transactions, ensuring that all nodes maintain a consistent state.
  2. Smart Contract Execution:

    • When a transaction involves a smart contract, it is executed within the Application Layer, specifically within the sandboxed environment provided by Contracting.
    • The execution of smart contracts can read from and write to the blockchain's state, allowing for complex interactions and state changes based on the logic defined in the contract.
  3. Blockchain State Management:

    • The ABCI facilitates the communication between the consensus layer and the application layer, allowing the blockchain state to be updated securely and efficiently after each block is finalized.
    • The state includes all storages, smart contract code, and the results of smart contract executions, ensuring that the entire network agrees on the current state of the blockchain.
  4. Governance and Upgrades:

    • Governance actions, such as voting for validators or proposing changes to the network parameters, are facilitated through transactions and smart contracts.

Security and Scalability

  • Security: Xian employs multiple layers of security measures, including the sandboxing of smart contracts, cryptographic verification of transactions, and the secure consensus mechanism provided by CometBFT.
  • Scalability: The use of CometBFT consensus, along with the efficient design of the ABCI and Contracting, ensures that the Xian blockchain can scale to handle a high volume of transactions without compromising on speed or security