Blockchain Finality
Finality is the guarantee that past transactions can never change.Blockchain is already immutable, so what does it mean?
Finality is a problem for LOTTERY BASED CONSENSUS algorithms.Examples
are; Proof-of-Work, Proof-of-Stake, Proof of Elapsed Time etc.
It means samples with MINING concept.Past transactions may change because of CHAIN FORKS and LONGEST-CHAIN SELECTION
Randomly 2 miners can succeed at the same time. If such
issue occurs, there may occur
separate chains and it is called FORKING
Solution to chain fork is the
longest chain, but if your past
transaction was at shorter chain, it will be lost and
past transaction list will be different.
So, we can not guarantee that past transaction will stay there
forever, so we mention here
about PROBABILISTIC FINALITY.
(If your past transaction is not there, it means that transaction is not FINAL, that transaction can not be thought as totally committed.)
But if we
use VOTING BASED CONSENSUS, there
is always one unique chain.There is never
forking and Finality is immediate.
So it is safer to use voting based
consensus. Such algorithm samples are ones that do not include MINING.
Examples are Paxos,Raft,Kafka,Zookeeper,PBFT,RBFT,SBFT
etc.
For example
at bitcoin, a transaction
is considered FINAL after 6
blocks from itself.
It means, if a transaction still exists and
there is no forking for 6 more transaction
period, it is considered that it will be so small ignorable
probability that it will be lost after
a later chain fork. This 6-block
number is calculated due to ECDF algorithm.
(ECDF = Emprical
Cumulative Distribution Function) ECDF analysis must be done due
to block number and average
transaction latency time.
Such ECDF analysis
at bitcoin is shown below.
It showed that a transaction submitted at block X can be found at block X+2 with %50 chance, in block X+5 with %90 chance, in block X+7 with %99 chance.
X+7 results tells waiting 6-later blocks after that
block itself. But waiting for finality
also decreases performance.
Feel
free to communicate
by bulent.yucesoy@gmail.com