LOCUS CHAIN TECH SERIES 2: LEDGER STRUCTURE

LOCUS CHAIN FOUNDATION
6 min readMay 3, 2022

--

DEFINITION: Ledger & Account

‘Ledger’ in Locus Chain

Locus Chain is a distributed data storing system in which the participators can freely add data. The sum of the saved data on Locus Chain is called the ledger. In a narrow sense, ledger is the sum of data blocks (transactions) that are intentionally added by the participators. In a broad sense, ledger refers to all stored information required for Locus Chain’s normal operation including the information generated during the consensus process.

‘Account’ in Locus Chain

An account is an actor that can actively add data on Locus Chain’s ledger. An account is defined by its Secret Key/Public Key pair. Each Account could be uniquely identified by its Address, which is calculated from the public key. Account addresses are the preferred way of referring accounts in the Locus Chain system. Besides, an account uses its secret key to sign the operations performed on the Locus Chain system. For example, when an account issues a transaction to add some block of data to the ledger, the block must be signed with the account’s secret key to prove its legit ownership.

LOCUS CHAIN’s LEDGER STRUCTURE

Transaction and Account-Wise-Transaction-Chain (AWTC)

The AWTC, Account-Wise-Transaction-Chain, is a central data structure for Locus Chain’s highcapacity, distributed transaction processing. AWTC is a Directed-Acyclic-Graph (DAG) based data structure composed of multiple transaction chains, each for an account. Each account has its dedicated chain. A new transaction issued by an account is primarily added to the account’s chain.

Why AWTC is the Answer to High Scalability?

Typical linear ledgers have only one spot for a new block to be connected to the previous block, which may become a bottleneck for high-speed data processing.

Typical linear ledgers have to wait until the previous block is complete.

In contrast, AWTC’s DAG-based structure has multiple parallel data insertion points at any time, and there is virtually no limit of transactions added at a time. Also, collisions do not occur because a new transaction is appended to its own single fixed point on the AWTC graph and settled immediately if the issuer account is not malicious. This characteristic fundamentally resolves the transaction processing delay issue of conventional blockchains.

Locus Chain’s AWTC structure is a parallel structure. Each account can generate a transaction to their chains.
Therefore, Locus Chain does not slow the trnasaction processing time.

How to Generate ‘Transaction’

A Transaction (Tx) is a unit of data added to the ledger. When an account wants to add information to Locus Chain’s ledger, the account issues a transaction containing the information. Each transaction is issued solely by a single account. The issuer account signs the transaction with its secret key.

How to Identify ‘Transaction’

There are two ways to identify a transaction; hash value and index number. A Transaction Hash Value is a calculated result of a ① cryptographic hash value of a transaction’s entire data. A hash value is suitable for pointing to an arbitrary transaction in the ledger.

A Transaction Index Number is a unique, sequentially increasing id number for transactions of a specific account. The first transaction of the account’s AWTC is a Tx with index number 0(zero). Each consequent transaction has an index number increased by one from the previous transaction. By this, a transaction could be identified by the account address and index number.

The index number clearly specifies the order of transactions of an account. A set of transactions of an account, with its order preserved, is called a Transaction Chain. An account cannot delete or modify the previously issued transactions. The account can only ‘extend’ the chain by issuing a new transaction. Each account has only one transaction chain, and Locus Chain’s ledger is equivalent to the sum of all account’s transaction chains. An account cannot manipulate another account’s chain. However, the account may issue a transaction regarding requests to other accounts to its Transaction Chain. Such transaction acts as a message from an issuer account to other destination accounts. When a message transaction is propagated and reaches the destination accounts, then the destination accounts may issue transactions referencing the message transaction.

Transaction Example

If A Wants to transfer 10 coins to B, their chains is like this.

Let us see an example. Assume that account A wants to transfer some coins to account B. First, ① account A generates a transaction like {A: -10 from self, +10 to B}, adds to A’s chain, then broadcasts it over the network. At this point, A’s coin is reduced by 10, but B’s coin is not changed. When B observes the A’s transaction, then ③ B completes the transfer by issuing a transaction like {B: +10 received from A} referencing the A’s transaction. Now the B’s coin is increased by 10, and the transfer completes. The first transaction (0th transaction) of each account means the new creation of the account. 0th transaction always occurs as a coin-receiving transaction from another account. All accounts except for the genesis system accounts are derived from other accounts. In summary, AWTC is a fundamental basis for Locus Chain’s high-capacity transaction processing.

Network, Nodes, and Shards

Machines in Locus Chain communicate over the Internet. Each computer that participates in Locus Chain is called as a Locus Chain node (or just a node). Each node could communicate with other nodes, mainly transmits and receives data using Peer-to-Peer (P2P) style gossip network. The Locus Chain network is the total sum of nodes that carry out the communication for Locus Chain. In the case of Bitcoin and Ethereum that use PoW and Nakamoto consensus, massive computing power is required to run a node. However, Locus Chain has been designed to run not only on household PCs but also on low speculation devices such as mobile devices.

AWTC is an important technological element for Locus Chain’s High-capacity.

A Shard refers to a portion of Locus Chain’s network that divided into an adequately sized group of nodes. A node can only participate in one shard at a time. A node may communicate with any nodes in any shards, but it must prioritize communication with nodes in the participating shard.

From the view of ledger management, each shard manages a portion of the entire AWTC account chains. In practice, each shard manages Transaction Chains that are managed by all nodes in the shard. A node may access the entire ledger data, but the node should sync and duplicate AWTC account chains of the participating shard in a priority. The consensus algorithm also runs in the per-shard basis since each shard manages a different subset of whole ledger data.

>> Next time, we will see, in this ledger structure, how we perform BFT consensus algorithm. Stay tune for this!

--

--