Home > Blockchain >  Wisdom Chain account model of document repository
Wisdom Chain account model of document repository

Time:10-30

In the current block chain in the world, there are two main way of record keeping, UTXO mode (UnspentTransactionOutput) and the Account, bitcoins USES is UTXO model, Ethereum/EOS USES is Account model, same WisdomChian also used the Account model, today I will detail why WisdomChian also used the Account model,

Before UTXO model and account balance model in detail, we have to first introduce them both, and even the most important thing in all application Block chain concept and data structure, namely Block (Block), chain Block is controlled by a growing list of length, which contains a lot of records, or Block,

Above the block chain network, the solid line blocks were included in the main chain, all the dotted line blocks are solitary block (OrphanBlock), they are not the main links, in each block in the chain network can only have a main chain, which is the longest chain effectively, is also the current block chain all nodes in the network consensus,

COINS designed is point-to-point electronic cash system, in the currency of the world, every deal is a deal before consumption generated UTXO, then generate new UTXO, the amount of an Account is belong to this address all of the not UTXO set, and the etheric workshop aims to establish a more general agreement, the agreement to support the Turing complete programming language, users can write intelligent contract on this agreement, create all kinds of the application of decentralization, therefore the etheric fang introduced Account model,

Turing complete means that you can be able to use the language Turing machine can do all the things, can solve the problem of all can be calculated, but Turing complete means that there are potential risks,


UTXO model
UTXO model, the change in the trading just represents a collection UTXO, and is the concept of accounts and balances on UTXO set higher abstraction, account balance and the concept of exist only in the wallet, let's look at some examples to understand the differences,

First of all, the currency UTXO cannot be part of the cost, if a user wants to spend 0.5 COINS, yet he UTXO one currency in the collection, he must be in 0.5 COINS to others at the same time sent to his own 0.5 COINS to change, if he does not send to yourself, then he shall pay 0.5 COINS to miners,


Second, the currency itself does not store account balances, users only need to use the private key to sign these UTXO can spend COINS, digital wallets to make the currency block chain looks like a user account balances, and other functions, the fact is not the case,

Visual wallet how to work in the currency

COINS UTXO system running well, partly because of the digital wallets can help carry out most of the work related to trade, including but not limited to:
A) processing UTXO
B) storage keys
C) set transaction cost
D) provide change address
E) polymerization UTXO (display available, to be determined and the total balance)

Trading in UTXO model similar to the notes, and each account by calculating the purse (wallet address) in all the notes (UTXO) and to show how much money it has, when we want to spend money, need to use contains enough cost of one or more UTXO and may receive the change (new UTXO), each UTXO spend only once, because it is a UTXO cost will be deleted from the UTXO pools,

To sum up, we know:
The currency block chain are not stored account balance
Coin purse held secret key
If included in the deal, will spend the whole UTXO (in some cases, the change in the form of new UTXO exist)

Wisdom Chain

WisdomChain adopted the same Account as the ETH deal structure, is different from the etheric fang, etheric fang has two distinct data; Permanent and temporary data and permanent data example is the trading, trading has been fully confirmed will be recorded in transactiontrie, will never change, examples of temporary data is specific balance on the account address of Ethernet fang, the balance of the account address is stored in the statetrie and whenever this particular account trading when the change will be changed, in the etheric fang, permanent data (such as mining) and temporary data (e.g., the account balance) is stored in separate, using trie data structure to manage the data of the etheric fang,

And WisdomChain when trading, the node will be in a virtual machine according to the current state of information and transaction content calculated after state information, stored in the local state information related to hash values at the same time be issued together with the transaction, when trading is miners packaged into blocks, the rest of the nodes to save data on Merkletrees, ensure its node and other nodes in the network state information,

Therefore WisdomChain records like Banks, similar to use ATM/debit card, bank to track each debit amount, when we need to spend money, the bank will check the record to make sure before to confirm whether we have enough balance,

WisdomChain, of course, in the use of the trading Account structure, is inevitable for the Account transaction structure itself, it is no dependencies between trading Account model, need to solve the problem of replay attacks (ReplayAttacks), 2 it is to realize the network/thunder, lightning Plasma, etc., the user need more complex Proof Proof mechanism of Proof, substring to state transition to the main chain require more complex agreement,



Twitter: Wisdom_Chain
Weibo: WisdomChain
Facebook: WisdomChain
Medium: Wisdom_Chain

community discussion
Technical discussion group of Discord: https://discord.gg/HnwcNS6
User discussion group Telegram: WisdomPublicChain

related resources
WIsdom of Chain and Chain document repository: https://docs.wisdchain.com/#/
Wisdom Chain's official website: https://wisdchain.io/
Wisdom Chain technology BBS: http://tech.wisdchain.io/
Wisdom Chain open source code library: https://github.com/WisedomChainGroup
Wisdom Chain blocks in a browser: https://scan.wisdchain.com
  • Related