005 | DEXON | Total Ordering | Programmer Explain

This article is written by Wayne Chiu, Full Stack Javascript Developer Contributor of open source blockchain project (NEO).

This is a special series that will help you discover how DEXON could qualify (or over-qualify) real-business adoption as DApps platform.

In 『004 | DEXON | Overview of DEXON| Programmer Explain』, I have helped you understand the big picture on how DEXON work with many blackboxes.

One of the important component that makes DEXON fast, with「TPS 12,000」 is because of its「Total Ordering Algorithm」which makes running multiple chains in parallel, possible.

Transaction Per Second in action

In order to generate a 「globally-ordered chain」 which contains all the valid blocks that have been produced on the DEXON Network, each node executes the DEXON 「Total Ordering Algorithm」 and gives each blocks a timestamp. As a result, each node will maintain a copy of the globally-ordered data, called DEXON 「compaction chain」.

evolution of total-ordered chain

What makes 「Total Ordering Algorithm」so special is that even if some of the Validation-Nodes are not acting as they should (like unstable internet connection/being a malicious attacker), DEXON will still have a「 globally-ordered chain」.

DEXON network will still run securely with malicious Node/Nodes
Definition of "Run Securely":
a copy of the globally-ordered data is still maintained

Sounds amazing? Let’s dive in!


Goal:
to maintain/ensure the total ordered chain

Input:
blocklattice structure data(multi chains structure with blocks’ acks)

Output:
total-ordered chain

blocklattice structure + total ordering = total-ordered chain

Step 1

To choose a Candidate Block
Qualification as a candidate block
– A block that has not been delivered to total ordering output
– A block that is not acking any other non-delivered blocks

Candidate Blocks

Step 2

After we have candidate blocks, we will use 「Potential Function」 + 「Output Threshold 」for outputting blocks to total-ordered/compaction chain.

Potential Function
Describe the output priority of the Candidate Block
The more acks received by a block, the higher the potential value is.
Once the potential value of a certain block exceeds a specific threshold, the block will be delivered to the compaction chain.

Output Threshold
Ensure the priority of output block cannot be exceeded by other blocks

Animation 1/2
Animation 2/2

Once a block is placed into compaction chain, that block would be shown on 「DEXSCAN


Free to join DEXON social groups
Telegram/Gitter/Github/Reddit


Leave a Reply

Your email address will not be published. Required fields are marked *