Technical Description of the IZZZIO Blockchain Platform

IZZZIO Blockchain Platform version 1.2.0. LLC “Izio” (IZZZIO), Moscow, 2024

This is a translation of the Russian original. If the versions differ, the Russian version prevails.

Contents

    1. Introduction

    This document contains the technical description of the “IZZZIO Blockchain Platform version 1.2.0” software package.

    2. Name and purpose of the software

    The IZZZIO Blockchain Platform version 1.2.0 (hereinafter the IZZZIO blockchain platform, the IZZZIO Platform, the System, the Software) is a software package designed for storing, transferring and processing any data, and also for automating business processes through the use of distributed ledger technology.

    3. Characteristics of the software

    The IZZZIO Platform is built on distributed ledger technology. Using the platform ensures the consistency and availability of data, as well as resistance to malicious modification of data (injection of false data).

    3.1 Architecture of the IZZZIO blockchain platform

    The main mechanism for storing information in the IZZZIO blockchain platform is to store it as a directed chain of data blocks with the following properties:

    • each subsequent block is cryptographically linked to the previous block;
    • the distributed ledger chain cannot have branches.

    Network participants exchange information by generating new blocks and adding them to the end of the chain, or by obtaining information from previously generated blocks that are stored. Each participant has its own asymmetric key pair, the public key of which serves as the participant’s identifier (address) in the system.

    Information in the System is processed in a network, which is a set of nodes interacting with each other.

    Each network node stores a complete copy of all blocks of the chain. Distributed storage of blocks, combined with the chain properties described above, ensures the consistency and availability of data and resistance to malicious modification of data (injection of false data).

    Participants access the network using third-party client applications that interact with the external API of the network node (see clause 3.9).

    The IZZZIO platform distribution includes:

    Components developed by LLC “Izio”
    Distributed ledger node software
    Pluggable basic cryptography module SHA256 + ECDSA-SHA2
    Pluggable module for establishing encrypted connections using the Diffie–Hellman protocol

    Additional pluggable modules not included in the distribution:

    Components developed by LLC “Izio”
    Pluggable cryptography module based on bitcore-lib
    Pluggable GOST cryptography module based on the WebCrypto GOST Library
    Pluggable GOST cryptography module based on CryptoPro CSP 4.0
    Pluggable GOST cryptography module based on VipNet CSP 4.2

    When generating a block, a participant places data in the block – a transaction (a block contains exactly one transaction).

    A data block contains the following information:

    • hash of the current block;
    • hash of the previous block;
    • sequence number of the block;
    • date and time when block generation started (UTC);
    • date and time when block generation ended (UTC);
    • block data (one transaction).

    Block data is represented and stored in JSON format. To store block data on the node, the Software uses the LevelDB key-value store, with the block sequence number as the key.

    Because network nodes work simultaneously on generating new blocks to add to the chain, conflicts arise when data is synchronised between nodes. A set of mathematical rules, the consensus algorithm, is used to determine the validity of a block (block verification) and to resolve conflicts.

    A detailed description of the consensus algorithms is given in clause 3.6.

    The IZZZIO Platform supports the creation of Turing-complete smart contracts.

    A smart contract is program code placed in a block of the chain and intended for processing information (generating, controlling, providing it) in a uniform (synchronous) manner on all network nodes A detailed description of smart contracts is given in clause 2.6.

    The body of a transaction contains a string identifier of the transaction type, the transaction data (see below), and an electronic signature of the full body of the transaction generated using the private key of the participant who created the transaction.

    The IZZZIO blockchain platform recognises the following transaction type identifiers:

    • EcmaContractDeployBlock – a transaction containing smart contract code (deployment of a smart contract in the distributed ledger);
    • EcmaContractCallBlock – a transaction calling a smart contract method (execution of a smart contract method with the given arguments);
    • other identifiers – a data transaction (a participant writing arbitrary user information to the distributed ledger).

    The block diagram of a network node is shown in Figure 1.

    Fig. 1 Block diagram of a network node. The diagram consists of the following blocks: “User key pairs and certificates (account storage)”, “CIPF (cryptographic information protection facility)”, “Block generator”, “Block storage”, “Synchronisation module (interaction with other nodes)”, “Block processor”, “Smart contract execution environment”, “Contract state DB”, “Event DB”, “Node external API (interaction with client programs)”. Arrows show the links: account storage – CIPF – block generator; block generator – block storage; block storage – synchronisation module; block storage – block processor – smart contract execution environment – contract state DB and event DB; contract state DB and event DB – node external API; node external API – block generator.

    The source code of the IZZZIO blockchain platform distributed ledger node software is written in the JavaScript programming language.

    3.2 Software and hardware platform requirements

    The IZZZIO blockchain platform distributed ledger node software runs on a computer of the x86 or x86_64 hardware platform running one of the following operating systems:

    • Windows 7/8/8.1/ 10 (x86, x64);
    • Windows Server 2008 R2/2012/2012 R2 (x64);
    • CentOS 6/7 (x86, x64);
    • Standard OS of the AIS of the Federal Bailiff Service of Russia (GosLinux) (x86, x64);
    • Red OS (x86, x64);
    • Fedora 19/20 (x86, x64);
    • Mandriva Enterprise Server 5, Business Server 1 (x86, x64);
    • Oracle Linux 6/7 (x86, x64);
    • OpenSUSE 13.2, Leap 42 (x86, x64);
    • SUSE Linux Enterprise Server 11SP4/12, Desktop 12 (x86, x64);
    • Red Hat Enterprise Linux 6/7 (x86, x64);
    • Ubuntu 14.04/14.10 (x86, x64);
    • Linux Mint 15/16/17 (x86, x64);
    • Debian 8 (x86, x64);
    • Astra Linux Special Edition (x86-64)
    • ALT Linux 7 (x86, x64);
    • ROSA 2011, Enterprise Desktop X.1 (Marathon), Enterprise Linux Server (x86, x64);
    • ROSA KHROM/COBALT/NICKEL (x86, x64);
    • FreeBSD 9, pfSense 2.x (x86, x64);
    • Mac OS X (Darwin) version 10.6 or later.

    The distributed ledger node software requires the Node.js JavaScript interpreter, version 8 or 10.

    The following libraries (and the Node.js modules for accessing them) are used for data storage:

    • LevelDB – a key-value store;
    • sqlite3 – an embedded relational database management system.

    Minimum hardware requirements for the computer running the distributed ledger node software:

    • Central processor – clock speed 1.5 GHz;
    • RAM – 512 MB.
    • Free hard disk space: 1 GB for the software components, plus additional space for the data being processed (block chain storage, smart contract local data, event log).

    3.3 Configuration of the IZZZIO blockchain platform version 1.2.0

    The platform offers users a large number of configurable options. Nodes are configured by creating a config.json file in the directory from which the IZZZIO node is started, or by explicitly specifying the path to the configuration file with the --config launch parameter. The configuration file is in JSON format.

    Possible configuration file parameters in the System:

    ParameterDescription
    p2pPort: 6013,p2p port
    httpServer: 'localhost',Binding address for the RPC/API and the interface
    rpcPassword: '',Password for connecting to the RPC/API and the interface (HTTP Basic Auth)
    initialPeers: []Array listing the initial nodes
    allowMultipleConnectionsFromIp: true,Allow multiple p2p connections from one address. Recommended values: False if there are many loops in the network, True if a proxy is used for connecting
    maxPeers: 80,Maximum number of p2p connections
    upnp: {
      enabled: true,
      token: 'iz3node'
    }
    Configuration of automatic node discovery via DNS query
    Enable automatic discovery of nodes in the network
    Token by which the node will search for other nodes
    networkPassword: '',Network access “password”. Used to create private networks
    blockAcceptCount: 20,Number of blocks confirming a transaction (LC)
    hearbeatInterval: 10000,Internal node timer. Affects the rate of connection retries, saving states to disk, etc.
    peerExchangeInterval: 5000,Frequency of peer list exchange
    maxBlockSend: 600,Maximum number of blocks sent. Must be greater than blockQualityCheck (LC)
    blockQualityCheck: 100,Number of “extra” blocks requested to check the validity of the chain (LC)
    limitedConfidenceBlockZone: 288,“Confidence” zone (LC). The chain before this zone cannot be changed. Must be greater than blockQualityCheck
    generateEmptyBlockDelay: 300 * 1000,Frequency of creating empty blocks when the network is idle. false to disable
    blockHashFilter: {
      blockEndls: []
    }
    Filter of valid blocks for LCPoA: 4 characters at the end of the block. The hash matching the Genesis Block must fall into it
    genesisTiemstamp: 1492004951 * 1000,Timestamp of block 0 of the network in milliseconds
    lcpoaVariantTime: 1,Number of milliseconds required to generate one block hash (LCPoA)
    validators: []Additional consensus plugins. IMPORTANT: blocks are passed to the consensus plugins in the same order in which they are listed in this parameter.
    emptyBlockInterval: 10000,Interval for checking whether an empty block needs to be issued
    maxTransactionAtempts: 5,How many attempts to add a block are made before deciding to cancel adding the block to the network
    checkExternalConnectionData: false,Check external data for conformity (with the configuration of other nodes)
    enableMessaging: false,Allow use of the message bus (required for some consensus algorithms)
    recieverAddress: '123',Intra-network address of the network node. Used in the message bus and in the StarWave protocol
    messagingMaxTTL: 3,Maximum limit of message hops
    maximumInputSize: 2 * 1024 * 1024,Maximum volume of data processed from external nodes. Not more than 15 MB is recommended
    allowMultipleSocketsOnBus: false,Allow sockets with different addresses to connect to one node address
    walletFile: './wallet.json',Wallet file address
    workDir: '.',Working directory
    blocksDB: 'blocks',How to store the block DB: false to store in RAM, mem://blocks.json to store in RAM and write to permanent storage on unload. A string to store on disk
    blocksSavingInterval: 300000,Block saving interval. false to disable autosave, or a number of milliseconds
    appEntry: false,Entry point to the DApp “application”. False if not required
    startMessage: false,Message displayed when the node starts
    ecmaContract: {
    enabled: true,
    allowDebugMessages: false,
    contractInstanceCacheLifetime: 10000,
    }
    Configuration of EcmaContracts smart contracts
    The contract processing system is enabled
    Allows smart contracts to output messages (used for debugging)
    Lifetime of a contract virtual machine instance
    masterContract: 5The master contract in the system. Must support resource management methods
    hashFunction: 'SHA256',Function used to calculate the hash. Registered by plugins
    signFunction: '',Function for calculating the digital signature and generating passwords (empty by default), options: 'GOST' 'GOST256' 'NEWRSA'
    keyLength: 2048,Key length (passed to some of the plugins)
    plugins: []Array listing the plugins to be loaded (except consensus plugins)

    3.4 Interaction of network nodes with each other

    The mechanism by which a network node discovers other nodes (peers) is defined in the configuration parameters of the block. The System supports 2 mechanisms:

    • An explicitly specified list of network addresses to connect to;
    • Discovery of other nodes using the standard DNS Service Discovery mechanism. With this mechanism, nodes register themselves (as a service with a certain fixed identifier on a DNS server), and the list of other nodes can be requested from the DNS server as a list of registered services with the given identifier).

    Once connected, nodes interact with each other using the WebSocket protocol (the TCP/IP protocol is used at the lower transport level).

    At the first stage, the node name is transmitted, the compatibility of the nodes’ configuration parameters is checked (active modules, block verification conditions, consensus algorithm), and the network password is checked for a match (the password is also set in the node configuration parameters block and is not transmitted in clear text).

    Then, during operation, the nodes interact in order to synchronise the chain of blocks.

    3.5. Creation of new blocks in the network

    A new block is created by the LCPoA and DLCPoA modules (see clause 3.6):

    1. The block data that needs to be added to the chain of blocks is passed to the module
    2. startTimestamp, the block generation start time, is added to the block data

    All further actions are performed iteratively until a correct hash is found:

    1. The block timestamp is set to the current time on the device in milliseconds (GMT+0 adjusted for clock lag)
    2. A hash sum is generated from all the block data
    3. The hash sum is checked against the specified filters. If the check succeeds, block generation ends and the block is added to the chain.

    3.6 Consensus algorithms

    The IZZZIO Platform supports two main consensus algorithms (filters): Limited Confidence Proof of Activity (LCPoA) and Dynamic LCPoA (DLCPoA).

    3.6.1 LCPoA

    LCPoA (Limited Confidence Proof-of-Activity; in Russian, “proof of activity with limited confidence”) is a hybrid blockchain network consensus algorithm consisting of two technical elements:

    • Proof-of-Activity (in Russian, “proof of activity”) – a principle based on solving a problem similar to that of the Proof-of-Work principle, but with reduced difficulty (solving the block generation problem usually takes from fractions of a second to several minutes). Increasing the computational cost of generating a block reduces the probability of conflicts and makes it harder for an intruder to generate a chain of blocks in order to carry out a false data injection attack.
    • Limited Confidence (in Russian, “limitation of confidence”) – a system for automatically creating “checkpoints” in the blockchain network, achieved by introducing a hard threshold on the ability to overwrite blocks. During synchronisation, the node software can overwrite no more than limtedConfidenceBlockZone (a node configuration parameter) of the most recent blocks saved in storage. If a larger number of blocks diverge, automatic synchronisation is not performed. The nodes remain out of sync, and the conflict is analysed and the validity of the data is checked by the network/node administrators.

    Limited Confidence
    Limited Confidence is a mechanism for creating checkpoints in the network that limits the ability to overwrite blockchain network blocks beyond a set limit from the last block. For example:

    Situation 1

    In the network settings of the example, the LC number is set to 10
    Client1 – holds a chain of blocks from 0 to block 30
    Client2 – holds a chain of blocks from 0 to 34, and in this client block 29 differs from the corresponding block of Client1

    In this situation, Client1 will download the part of Client2’s chain from block 29 to block 34, i.e. block 29 will be replaced and the chains of both clients will become identical.

    Situation 2

    In the network settings of the example, the LC number is set to 10
    Client – holds a chain of blocks from 0 to block 30
    Attacker – has recreated the chain of blocks from 1 to 31, replacing all transactions in the network

    In this situation, the Attacker will offer to synchronise the chain from block 1 to block 31, but the minimum block from which synchronisation is possible is: 31 - 10 = 21
    In this case, synchronisation with the attacker’s chain will not be performed.

    A smaller LC number reduces the chance of the chain being overwritten; a LARGER number reduces the chance of non-synchronisable (dead-end) chains appearing.

    Proof of Activity
    A modification of Proof of Work with reduced difficulty is used as the block generation algorithm. Its special feature is the use of the Unix timestamp as the nonce, as well as additional checks and restrictions:

    • The GMT+0 time zone is used as the common time
    • Information about the block generation start time must be written to the block
    • The block nonce is written to the block timestamp

    The following parameters are checked:

    • The block hash matches the filter of allowed hashes
    • The block generation start time is not later than the current network time and not later than the block timestamp
    • The timestamp is not later than the current network time and not earlier than the block generation start time
    • The timestamp and the block generation start time are not earlier than the timestamp of the previous block

    A tolerance of no more than 60 seconds is allowed for each check.
    It is also possible to use classic PoW or other algorithms together with the LC mechanism.

    For the LCPoA algorithm, a restriction on the value of the block hash function (a string filter applied to the hexadecimal representation of the hash function value) is set in the node configuration parameters.

    3.6.2 DLCPoA

    DLCPoA (Dynamic Limited Confidence Proof-of-Activity; in Russian, “dynamic proof of activity with limited confidence”) is a consensus algorithm that makes it possible to regulate the speed of the network.

    The DLCPoA algorithm is a variant of the LCPoA algorithm (a modified version) with dynamic control of block generation difficulty. When DLCPoA is used, instead of a fixed filter the node configuration parameters specify a target block generation rate for the network, and the filter parameters are calculated automatically.

    To generate the hash of a new block in the network, a suitable hash must be found whose validity is determined by certain filters. In the LCPoA algorithm the filters are set in the configuration, whereas in DLCPoA the filters are calculated automatically using a formula based on the network speed. If the speed is close to the target, the filter becomes harder; if it is far from the target, the filter becomes easier, down to zero difficulty, when any hash is acceptable.

    Formula determining the network difficulty:

    abs(log10(1000 - interval in ms between blocks) / (1000/target network speed)

    Formula determining the choice of hash:

    hashSigma* <= round(allowed number of hash variants - (allowed number of hash variants * difficulty)

    *hashSigma: the last 6 or more characters of the hash in hexadecimal representation, i.e. 6 bytes

    Dynamic configuration of the algorithm’s difficulty makes it possible to prevent attacks on network speed and to keep the network operational under any load.

    3.6.3 Proof-of-Authority

    The PoA algorithm uses an array of pre-generated public keys as confirmation that a block is correct. The list of keys is issued to the network within the first 5 blocks. All subsequent transactions must be signed with one of the issued keys in order to pass this consensus algorithm successfully.

    3.7 Smart contracts

    The IZZZIO blockchain network is based on the use of a system of smart contracts – algorithms designed to work with data in the system.

    Main features:

    • JavaScript ES6. Support has been added for working with pseudo-random numbers (Math.random) and with date and time (Date)
    • Events
    • Interaction with other contracts in the network
    • Support for big number objects (BigNumber) for safe floating-point calculations
    • Built-in iterable and non-iterable data structures: KeyValue, BlockchainArraySafe, BlockchainArray, TokenRegister, BlockchainMap

    A smart contract is program code placed in a block of the chain and intended for processing information (generating, controlling, providing it) in a uniform (synchronous) manner on all network nodes.

    Smart contract methods are operations on system objects.

    A system object is an entity in digital space that has a certain state and behaviour, certain properties (attributes) and operations on them (methods).

    EcmaContracts implements the environment for managing and executing smart contracts.

    Smart contracts are executed in EcmaContracts, a special isolated execution environment that uses the open-source V8 JavaScript engine to create a virtualised environment (Isolated VM, see clause 3.7.3) for executing contract code. This makes it possible to fully isolate arbitrary contract code both from the system and from other contracts, and to control the availability of resources (RAM, CPU time, call limits) for each virtual machine entity.

    EcmaContracts implements a principle of managing the state of contract entities under which only information about calls to smart contract methods and their arguments is saved to the blockchain. The results of smart contract execution are stored locally on the user’s node and loaded at the next call of the contract. All nodes in the network simultaneously replay every transaction of the chain from the very first block to the last existing one, which leads to full synchronisation of contract states on each node.

    Thus, EcmaContracts controls the state, the running virtual machine entities and resource consumption, and provides the contract execution environment with the methods and objects needed for operation. Interaction with such objects makes it possible to implement powerful and functional decentralised systems

    The following modifications have been made to the standard JavaScript library:

    • Functions returning the current date and time return the generation end time of the block containing the call.
    • The random number generator is initialised using deterministic data determined by the block containing the call.
    • The ability to run other smart contracts has been added
    • Support for working with big number objects (BigNumber type) has been added.
    • Iterable and non-iterable objects that write and read data in the smart contract local data storage have been added.
    • Support for writing data to the event log.

    A LevelDB store (separate from the chain block data store) is used as the local data storage for smart contracts.

    An sqlite3 database is used to store the event log. Data from the event log can be obtained using the external API of the network node (see clause 3.9).

    The smart contract module processes 2 types of transactions:

    • EcmaContractDeployBlock – a transaction containing smart contract code (deployment of a smart contract in the distributed ledger); it contains:
      • the sender’s key (address);
      • a value for initialising the random number generator, mixed into the standard value;
      • the contract source code;
      • the hash function value for the contract code;
      • additional information – arbitrary data passed by the user and available to the smart contract code during execution through the execution environment API.
    • EcmaContractCallBlock – a block calling a smart contract method (execution of a smart contract method with the given arguments); it contains:
      • the contract address – the sequence number of the EcmaContractDeployBlock block containing the contract code;
      • a value for initialising the random number generator, mixed into the standard value;
      • the method name;
      • an array with the values of the call arguments;
      • additional information – arbitrary data passed by the user and available to the smart contract code during execution through the execution environment API.

    A smart contract can have 2 service methods:

    • init() – executed automatically each time the execution environment is initialised to execute any other called method of this smart contract, including the deploy() method;
    • deploy() – executed automatically when an EcmaContractDeployBlock is processed (deployment of the smart contract in the distributed ledger).

    System resources allocated to a smart contract for execution (amount of RAM, CPU time, number of smart contract calls per minute) are determined by the Master contract.

    Master contract – a smart contract that has a defined set of interface methods used to control the behaviour of the System.

    The number of the block containing the Master contract is set in the network node configuration parameters and must be the same for all network nodes.

    3.7.1 Smart contract code execution algorithm

    Smart contract code is executed according to the following algorithm:

    • The execution environment verifies the electronic signature of the transactions containing the call and the smart contract code;
    • The virtual environment is started, the previous state of the contract is loaded into it, and the random number generator is initialised;
    • The init() method is executed;
    • The called method is executed.

    If the contract executes without errors, the smart contract local data storage and the event log data storage are updated.

    If smart contract execution ends with an error, the local storages are not changed, and records of the errors are written to the log files of the distributed ledger node software. In this case, if the cause of the errors is external to the smart contract code and data, the state of the node’s local storages will become out of sync.

    3.7.2 Operation of smart contracts in the network

    During synchronisation, each node sequentially replays all actions with contracts from the chain of blocks and saves the changed states locally. As a result, the local states on each node are fully synchronised, which makes it possible to execute code in a decentralised and reliable way and ensures that the result is deterministic.

    3.7.3 Virtual environment (Isolated VM)

    Contract code is run in Isolated VM, a special isolated environment based on the V8 JavaScript engine.

    Each isolated environment has access to a limited amount of resources (CPU time, RAM, number of calls) and to limited functionality:

    1. Contracts cannot use system methods or execution environment methods directly
    2. Data can be saved between runs only using the built-in KeyValue type and its derivatives BlockchainArraySafe, BlockchainArray, TokenRegister, BlockchainMap
    3. Methods for asynchronous code execution, Promise, setTimeout, setInterval and nextTick are not available to contracts
    4. Contract code runs fully synchronously
    5. Exceeding the permitted resources immediately terminates contract execution with an error
    6. The date methods have been replaced. The time of the current block is used as the current date
    7. The random number method has been replaced. Random number generation depends on the current state of the contract
    8. A constructor cannot be used in contract code. The init and deploy methods are used instead of a constructor
    9. All contracts must inherit from the Contract class or its derivatives

    Contracts also have access to additional functions:

    1. The built-in BigNumber type for safe work with big numbers
    2. The TokensRegister class implementing token (coin) functionality
    3. The TokenContract contract implementing token (coin) functionality
    4. ContractConnector – a class for interacting with other contracts in the system
    5. TokenContractConnector – a class for interacting with other contracts in the system, inherited from ContractConnector
    6. SellerContractConnector – a class for interacting with seller contracts
    7. Require – an alternative way to interact with other contracts in the system
    8. BlockchainArray – a data type similar to an array (Array) that uses a KeyValue object to store data between runs
    9. BlockchainMap – a data type implementing a Map representation that uses a KeyValue object to store data between runs
    10. TypedKeyValue – an analogue of KeyValue that preserves the original value types
    11. Event – a class for generating events
    12. assert – a built-in class that makes it possible to check critical elements

    3.8 Tokens

    A token is a digital asset circulating in a distributed network. In the IZZZIO blockchain platform, tokens are implemented on the basis of smart contracts. The standard library of the smart contract execution environment includes objects that implement work with tokens. These tokens can be used directly, and they can also be used to create smart contracts with extended functionality that implement token functionality.

    3.9 External API of the distributed ledger node

    The distributed ledger node software provides an external application programming interface (API). The external API can be used to connect third-party client applications to the network node.

    The external API has a REST architecture; HTTP is used as the transport protocol, and data is represented in JSON.

    The external API of the node contains calls with the following functionality:

    • obtaining information about the distributed ledger node: the list of active node functions, configuration parameters, software version;
    • obtaining information about other network nodes;
    • obtaining information from the event log;
    • obtaining information about distributed ledger blocks;
    • obtaining information about smart contracts and the results of their execution;
    • creating new transactions/blocks.
    ← Documents