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):
-
1Proof-of-Existence of sender and receiver
-
1.1Check if address exists in local Actor DB (should be done for sender and receiver);
-
1.2Check digital signature of transaction (done for sender) via EdDSA algorithm;
-
1.3Check sender status (user or smart contract);
-
If at least one step fails, transaction will be denied.
-
2Proof-of-Existence of entities:
-
2.1Sender and receiver balances (in blockchain);
-
2.2Edited directories and files (in ExDFS);
-
-
3Proof-of-Allowance:
-
3.1Sender and receiver balances are >= 0 after transaction (in blockchain);
-
3.2Edited 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
-
1Check digital signature of block via EdDSA algorithm;
-
2Check hash link to previous block;
-
2.1If hash link points to local last block – proceed;
-
2.2If hash link points to other block – stop Block Prove and start Block Merge;
-
-
3If block with same number is already in local blockchain, stop Block Prove and start Block Merge;
-
4If received block is new, check each transaction in block via TVA;
-
5If 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.
-
1Compare received and old block data.
-
1.1If data hash is different – compare block data and detect new transactions;
-
1.2If there are no new transactions:
-
1.2.1And previous block hash is same – drop received block.
-
1.2.2And previous block hash is different – stop BMA and start BPA;
-
-
-
2Check 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:
-
1Find last Genesis Block and load IDs and balances;
-
2Collect all new balances and make all changes from last Genesis Block to current block;
-
3Merge collected data with loaded data;
-
4Distribute 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:
-
1Hold user data of DAO-project
-
2Distribute files between users
-
3Authorize access to files
-
4Differentiate 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:
-
1Contain data changes
-
2Organize data changes
-
3Order changes in a non-time-based way
-
4Secure data changes (changes are non-removable)
-
5Proof 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.