Tech inside

Overview of technical details, possibilities and functions of ExtraChain distributed technology
More info

ExConsensus

ExC consensus is an advanced consensus algorithm aimed to connect and unite Proof-of-Stake ideology with high speed, integrity and portability of Directed Acyclic Graph data structure.

ExC consensus is based on block data checks and aimed to form consistent and stable block chain between two genesis blocks.

Each produced transaction transfers to network neighbors (“verifiers”) and goes through verification process made by them.

Transaction Verification Algorithm (TVA):

  • 1
    Proof-of-Existence of sender and receiver
    • 1.1
      Check if address exists in local Actor DB (should be done for sender and receiver);
    • 1.2
      Check digital signature of transaction (done for sender) via EdDSA algorithm;
    • 1.3
      Check sender status (user or smart contract);

If at least one step fails, transaction will be denied.

  • 2
    Proof-of-Existence of entities:
    • 2.1
      Sender and receiver balances (in blockchain);
    • 2.2
      Edited directories and files (in ExDFS);
  • 3
    Proof-of-Allowance:
    • 3.1
      Sender and receiver balances are >= 0 after transaction (in blockchain);
    • 3.2
      Edited or created file is in ownership of sender or sender is marked as editor for the file (in ExDFS);

If at least one step fails, transaction will be denied.

TVA Scheme

Each verifier put its ID and signature in the block.

Block is distributed by verifiers via network.

twork neighbors of verifiers check created blocks and approve their consistence. They become “approvers”.

Block Prove Algorithm

  • 1
    Check digital signature of block via EdDSA algorithm;
  • 2
    Check hash link to previous block;
    • 2.1
      If hash link points to local last block – proceed;
    • 2.2
      If hash link points to other block – stop Block Prove and start Block Merge;
  • 3
    If block with same number is already in local blockchain, stop Block Prove and start Block Merge;
  • 4
    If received block is new, check each transaction in block via TVA;
  • 5
    If TVA check is successful – add approver signature and distribute approved block.

Block needs to be approved by at least 2 approvers to become “mature”.

BPA Scheme

Block Merge Algorithm

If BMA is started, then one or more blocks in local blockchain can be corrupted or incomplete. Also, new block can have malicious data. Thus, approver must make deep scan of block data.

  • 1
    Compare received and old block data.
    • 1.1
      If data hash is different – compare block data and detect new transactions;
    • 1.2
      If there are no new transactions:
      • 1.2.1
        And previous block hash is same – drop received block.
      • 1.2.2
        And previous block hash is different – stop BMA and start BPA;
  • 2
    Check detected transactions with TVA. If transactions pass TVA, new block with added transactions is produced and distributed.

Block Merge example

BMA scheme

State Snapshot Algorithm (SSA) aka “Genesis Algorithm”:

State Snapshot Algorithm produces Genesis Blocks each 100 blocks. Genesis Blocks hold Actors’ balances data and serves as state backup and foothold for devices in “Fast Blockchain” mode.

Genesis block production algorithm:

  • 1
    Find last Genesis Block and load IDs and balances;
  • 2
    Collect all new balances and make all changes from last Genesis Block to current block;
  • 3
    Merge collected data with loaded data;
  • 4
    Distribute new Genesis Block;

If device receives new Genesis Block, then BPA starts, but only for previous and new Genesis Block.

SSA scheme

Distributed File System

Distributed File System (ExDFS) is shared data storage and serves as an main support module for ExtraChain DAO Framework.

Distributed File System can be used in various ways. It can:

  • 1
    Hold user data of DAO-project
  • 2
    Distribute files between users
  • 3
    Authorize access to files
  • 4
    Differentiate access rights for users

One of main ExDFS elements is Historical Chain. Historical chain is a data structure that holds all changes made in particular file, including creation and removal.

Historical chains are used to:

  • 1
    Contain data changes
  • 2
    Organize data changes
  • 3
    Order changes in a non-time-based way
  • 4
    Secure data changes (changes are non-removable)
  • 5
    Proof of Existence (file can be retrieved on each state of change)

All these possibilities create stable and protected distributed file storage that can hold any amount of files without corrupted links, order and state errors.

ExDFS is protected by cryptographic methods of ExtraChain and allows to build secured and anonymized decentralized apps, without any need in localized data storage.