-
Notifications
You must be signed in to change notification settings - Fork 35
Usage on blockchains
On lottery based consensus protocols (like proof-of-work) more than one block can be generated at practically the same time.
When new blocks are received the nodes need to store them and they don't know which will be in the main line.
One way to deal with this is by constantly creating a new branch for each new received block for a given height and selecting the branch with longer height.
This has the disadvantage of performance decrease when the database has many child branches.
With LiteTree we can do this in another way:
Dividing the timeline into 2 regions: the stable and the dynamic regions
When new blocks are received they are processed on new separate branches at the dynamic region.
As the height of the blockchain grows blocks that are in the dynamic region can be moved to the stable region. This is achieved by moving blocks from child branches to the main branch using the forward merge
.
So we end up having a long main branch in the stable region, which increases the read and write performance on the database.