Skip to main content

Elastos Mainchain Docking

Setup Tools

Data synchronization and storage

Use the node’s RPC interface to synchronize blocks and transactions, then save all the received information. This process requires dealing with temporary fork blocks - if the blocks acquired by the height can't be connected with the local stored best chain, the highest local block should be regained until they're connected. The original block with the same height will be discarded.


To prevent the issue of temporary forking, it's recommended that more than 16 confirmations be considered as available transactions. Coin Withdraw. The exchange maintains the UTXO set of every address to generate the currency transaction. The withdrawal transaction can be generated by the transaction utility.

ELA Locking Transaction Recognition


The UTXO lock is similar to CLTV of Bitcoin (Check Lock Time Verify), which is a more flexible timing lock that locks one or more outputs during a transaction. The UTXO Lock adds a field to the output structure of the transaction. The OutputLock and LockTime are used in combination to only lock UTXO but not the transaction itself.

  1. After the sender creates a transaction, UTXO will be locked by setting OutputLock to a certain height in the future - this means that UTXO can be spent only after the height of the block reaches the OutputLock limit.

  2. When the recipient creates a transaction that costs UTXO (which includes OutputLock) the LockTime will need to be set to a higher value than OutputLock to spend the UTXO. This forces the recipient to create a transaction with a transaction lock in order to spend the UTXO locked by the UTXO lock, which limits the time spending the UTXO.

Verification of the UTXO Lock

  1. To determine whether all inputs referred to UTXO, which includes the UTXO LOCK, (OutputLock>0). If there are no references, return true;

  2. Judge whether the sequence that referred to the UTXO Lock's input is equal to 0xfffffffe; if it's not equal, return to false;

  3. Determine whether the TimeLock of the transaction is greater than the value of all UTXO OutputLock; if it's not greater, return false;

  4. Return true after passing validation.