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
  3. Blockchain Database

Rules and Owners

Rule configs are used to determine the validity of transactions before they are executed. Rule configs are also used to control which users are able to make certain types of transactions. Rule values are javascript boolean statements which will be invoked whenever a user tries to write data to the blockchain-database via a transaction. These statements will evaluate to either true or false depending on - the user, the current state of the blockchain database, and the current time - to name just a couple of examples. Common rule config use cases are:

  • Enforcing the terms of an agreed contract between peers on the AI Network

  • Ensuring automatic payment to relevant peers once the terms of a contract have been fulfilled and all relevant transactions to that contract have been added to the blockchain

  • Determining who has permission to build and validate a block at any given height of the blockchain

  • Enforcing punishments for validator peers who attempt to compromise the integrity of the blockchain

To control write permissions on rule configs, we use owner configs. Owner configs are also used to control the write permissions on the owner configs themselves.

PreviousPredefined StructuresNextRule Configs

Last updated 5 years ago

Was this helpful?