BotTT Ep 1: AIN Blockchain Quick Intro

AI Network Dev Team
AI Network
Published in
3 min readAug 19, 2022

This is the first episode of our ‘Blockchain on the Tea Table’ series. You can download a printer-friendly version.

by Dongil Seo

AIN Blockchain is a brand new blockchain developed to be a general-purpose decentralized backend. Its key features can be summarized as follows:

  • Brand-new blockchain from scratch

It’s not a forked project, but a brand-new design and implementation built from scratch. Currently, an open-source javascript implementation is available (see https://github.com/ainblockchain/ain-blockchain).

  • NoSQL-database-like APIs

For example, by sending a SET request like:

to the blockchain network, users can set a value (“new_value”) on the state path “/apps/test_app/path/to/value”. As you can see, the blockchain states are stored in a tree structure. We provide public blockchain network endpoints, https://testnet-api.ainetwork.ai and https://mainnet-api.ainetwork.ai for users who don’t want to run their own blockchain nodes.

By sending a GET request like:

to the blockchain network, users can get the current value at the path. It provides GET and SET APIs to support users develop dApps (decentralized apps) in a similar fashion that they usually develop centralized apps. For example, a user can claim the state space under /apps by sending a create app request (see Create your own app). For more details, see Developer Reference.

  • Native functions

AIN Blockchain does not rely on smart contracts by design. Instead it supports common backend functionalities by Native Functions. For example, by sending a SET request with a transaction body:

to the blockchain network, the owner of account 0x09A0 can trigger _transfer native function to send 10 AIN, which is the main token of AIN Blockchain, to account 0x08Ae.

  • Event push service

For example, users can subscribe to event push services for state change events on specific paths by registering their own REST API endpoints to receive the events or setting up event streaming channels using Event Handler, which currently supports block finalization, state value change, and transaction state change event types.

  • PoS consensus algorithm

It adopts a PoS consensus algorithm based on Streamlet with the epoch time of 20 secs. The finalization time (aka confirmation time) is ~40 seconds on average.

  • Public blockchain

It’s a public blockchain, so you can run your own validator nodes if you’re interested in (see https://docs.ainetwork.ai/resource-providers/validators). The mainnet is producing blocks since 2022–01–01 00:00 UTC. You can check the network status on AIN Insight (https://insight.ainetwork.ai).

  • SDK support

Currently, SDKs in javascript (ain-js) and python (ain-py) are supported, respectively. They help management of accounts and integration of blockchain APIs and Event Handler APIs. Feel free to visit our developer site https://docs.ainetwork.ai/ain-blockchain/developer-guide for more information (esp. see Quick Start guide page: https://docs.ainetwork.ai/ain-blockchain/developer-guide/getting-started). You can get AIN Token for development purposes from AIN Faucet (https://faucet.ainetwork.ai/).

AIN Blockchain is still a young project and we’re working around-the-clock to improve its flexibility, performance, and security. For further updates, please check the following links:

Printer-friendly version: https://docs.google.com/document/d/1kmI4SAOnsXTh3dpy1Cv6hnNcAlYD8aCDJWQunDAhFXE/edit?usp=sharing&resourcekey=0-Q5ziINYHrCZwAAPHAV3yRg

--

--