AI Network
  • What is AI Network
  • AIN Blockchain
    • Architecture
      • Design Principles
      • Event-driven Architectures
      • Blockchain Database
        • States
          • State Types
          • Operations
          • Predefined Structures
        • Rules and Owners
          • Rule Configs
          • Owner Configs
        • Functions
          • Built-in Functions
      • Instant Execution, and Eventual Consistency
      • Network ID and Chain ID
      • Transactions
        • Structure
        • Nonce
        • Read Concern
        • Propagation
      • Block Structure
      • Account and Keys
      • Consensus
      • Scalability
      • Apps
    • Developer Guide
      • Quick Start
      • AI Network Products
        • AI Network Worker
        • AI Network Insight
        • Testnet Server Node
        • Ainize Trigger
          • Project user
          • Project deployer
          • Why do we have to use Ainize Trigger?
      • Token Bridge
      • Trouble Shooting
    • Developer Reference
      • Blockchain API
        • JSON RPC API
        • Node Client API
      • Blockchain SDK
        • ain-js
        • ain-py
      • Validators
    • Staking
  • AIN DAO
    • What is AIN DAO
      • Runo (Run Your Node)
      • GPU Sponsorship Program
    • Onboarding & Participation
    • Governance
    • Tokenomics
      • AI Network Tokenomics
      • AINFT Tokenomics
  • AI Agents
    • AINFT
    • AINFT Factory
    • AINFT Projects
      • 🍳MiniEggs
      • 🦈Baby Shark
      • 🛸Soul Fiction
      • 🎻NFT Classics Society
    • Developer Reference
      • Ainft-Js
      • AINFT tutorial
        • Create AINFT object and Mint
        • Transfer AINFT
        • Set metadata of AINFT
        • Search and Retrieve AINFT
  • AIN Wallet
    • What is AIN Wallet?
    • AIN Wallet API
  • PROPOSAL DOCUMENTS
    • AIN Improvement Memos (AIMs)
    • AIN Improvement Proposals (AIPs)
Powered by GitBook
On this page

Was this helpful?

  1. AIN Blockchain
  2. Architecture

Blockchain Database

Ethereum is a global singleton state machine, transactions trigger a change of state or cause a contract to execute in the EVM. The contract execution part is the heavy part which requires both virtual machine and storage structure. The smart contract transaction can be divided into three functionalities: changing state, defining rules for changing state, and defining actions when changing state. While Ethereum handles all three functionalities through blockchain transactions, AIN network aims to provide this functionality through states, rules, and triggers.

Transactions in AI Network trigger a change of state or defines the rules for changing state. The difference is it does not contain the code and the node does not need extra storage or memory for running the code on-chain. Rules are a small amount of the expression to dictate which transactions are valid and accepted for the specified subset of the state. In this regard, rules provide integrity to data written to the blockchain, ensuring invalid transactions are not allowed. Finally, triggers are off-chain workers which may generate additional transactions in response to transactions that have already been processed by the blockchain.

AI Network's state manipulation module is often refer to as blockchain database as it's very similar to traditional NOSQL database in the ways they read and write data.

PreviousEvent-driven ArchitecturesNextStates

Last updated 5 years ago

Was this helpful?