bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 4쪽 중 1쪽
XinFin Network-XDC Consensus Algorithm
White Paper (Updated)
Updated on May 4th, 2021
(edited for grammar, readability, consistency)
XinFin (XDC) Hybrid Blockchain R&D Team
XinFin Hybrid Blockchain Network
Email: info@XinFin.org
ABSTRACT
INTRODUCTION
Context
XinFin’s Efficient and Secured Protocol
Transaction In-Efficiency
Confirmation Times
Fork Generation
High Energy Consumption
Anonymous Network Node
Structure of The Paper.
II. XINFIN NETWORK Masternode DESIGN
A. The XinFin Network architecture
B. Stakeholders.
Coin Holders, Masternodes
Reward Mechanism
Slashing Mechanism
C. XinFin Network Consensus Protocol
Motivation for XinFin’s Double Validation
Double Validation Process
Single Validation
Double Validation (DV)
Randomization for Block Verifiers for Double Validation
Random Matrix and Smart Contract
Step 1: Random Numbers Generation and Commitment Phase
Step 2: Recovery Phase
Step 3: Assembled Matrix and Computation Phase
Finality Analysis
D. Consensus Protocol: Formalization
Basic Concepts & Protocol Description
Time, Slots, Epoch
III. SECURITY ANALYSIS
Nothing-at-stake
Long-range attack
Censorship Attack
Relay Attack
Safety and Liveness
DDOS Attack
Spam Attack
IV. RELATED WORK
V. CONCLUSION AND PERSPECTIVES
Perspectives
VI. Updated Note as on 17th March, 2021
Endnotes:
Figures List:
ABSTRACT
In
this
paper,
we
present
an
overview
of
the
architectural
design
of
XinFin
Network's
consensus
algorithm.
XinFin
Network
is
a
public
EVM
(Ethereum
Virtual
Machine)-compatible
blockchain
with
the
following
advantages:
low
transaction
fees
(near
zero),
low
energy
consumption,
efficient
confirmation
time,
double
validation,
and
randomization
for
security
guarantees.
In
particular,
we
propose
XinFin’s
Delegated
Proof
of
Stake
(XDPoS)
consensus,
a
Proof-of-Stake
(XDPoS)-based
blockchain
protocol
with
rigorous
security
guarantees
and
fast
finality.
We
also
present
a
novel
reward
mechanism
-
demonstrating
that,
with
this
mechanism,
the
blockchain
has
a
low
probability
of
forks
and
fast
confirmation
times.
Additionally,
the
contributions
and
benefits
of
masternodes
are
fair
and
equitable,
in
the
sense
that
the
probability
distribution
function
is
uniform,
eventually.
As
we
go
into
details,
explaining
the
motivation
and
double
validation
process
as
well
as
the
finality
checkpoint
of
the
protocol,
we
also
present
the
formalization
of
the
XinFin
model
in
a
mathematical
manner,
demonstrating
the
soundness
of
the
XinFin
model
and
protocol.
Lastly,
we
conduct
a
security
analysis
to
examine
the
protocol’s
ability
to
resist
different
attacks.
Comparing
the
XinFin
Network
with
several
existing
blockchains,
we
explain
why
XinFin Network’s consensus algorithm offers a more
secure protocol.
I.
INTRODUCTION
A.
Context
Today, many companies use blockchain to drive greater
veracity and transparency across
their digital information ecosystems. And, they are
boosting awareness of the blockchain
industry and its accompanying infrastructure in a
variety of sectors—ranging from
consumer-packaged goods (CPG) to cloud computing and
storage, and from infrastructure
to public policy.
Building upon these developments, blockchain has surpassed
initial forecasts based on its
promise within the banking and cryptocurrency arenas.
Worth noting: Funding to
blockchain-based companies, despite dipping from 2018’s
highs, more than doubled in 2020
as compared to 2017.
1
Moreover, forecasts predict
that annual spending on blockchain
solutions will exceed $16B in 2023—thanks to the increased
adoption of blockchain-based
ecosystems.
To add, 2020 has branded its mark in history as a
year of crypto institutionalization, with
large multinationals (e.g., JPMorgan, PayPal, DBS)
starting to offer crypto-based services.
While blockchain was invented in 2008 by Satoshi Nakomoto,
developments in blockchain
ecosystems, today, have a striking semblance to the
early years of the internet. During the
inception years pioneers, dreamers, and early adopters
came together to build the internet
space we experience today.
In the blockchain space, many pioneers, dreamers,
and early adopters have introduced
ground-breaking projects. XinFin is among these novel
organizations. The XinFin Network is
a pioneer in today’s establishment of blockchain ecosystem
architecture. Leveraging the
power of cryptographic tokens, XinFin interconnects
an ecosystem of applications via a
1 CB Insights. “58 Big Industries Blockchain Could Disrupt.” CB Insights Research.
unique blockchain infrastructure that allows fast, frictionless and secure payment, and
ensures reliable storage of value.
Powered by XDC Protocol, XinFin’s XDPoS Hybrid Network
is a highly interoperable
blockchain network supporting global trade and finance.
Thanks to the XDPoS’
interoperability, the network permits digitization,
tokenization, and swift settlement of trade
transactions, increasing efficiency and reducing reliance
on complex foreign exchange
infrastructures. Operating as a blockchain agnostic
middleware, the XinFin Network ensures
flexibility in liquidity management by connecting
MSME originators and decentralized liquidity
pools.
Recently, XinFin received recognition from the World
Trade Organization (WTO) for its hybrid
protocol that supports permissionless ledgers for
public verification and permissioned
ledgers for restricted data sharing.
2
B.
XinFin’s Efficient and Secured Protocol
Satoshi Nakamoto’s blockchain protocol attempted to
achieve consensus within a
permissionless setting—that is, anyone can join or
leave the protocol execution without
seeking permission from a centralized or distributed
authority. Additionally, the protocol’s
instructions weren’t dependent on the players’ identities,
presenting a game-changing
protocol architecture. Later, Ethereum and the Ethereum
Virtual Machine (EVM), which were
released in July 2015, proposed notable enhancements
compared to the Bitcoin protocol.
The Ethereum protocol introduced the smart contract
functionality.
Whilst Bitcoin and Ethereum are game-changing technologies,
they present a myriad of
issues, especially with transaction processing performance.
That said, to create an efficient
and secured consensus protocol for the XinFin Network,
the novel network tackles the
following bottlenecks of classic blockchains.
●
Transaction In-Efficiency
Consortium blockchains, employed by leading cryptocurrencies
like Bitcoin and
Ethereum, experience a blockchain scaling problem.
More specifically, they don’t
scale well to handle large transaction volumes. Put
into context: the fixed block size
in the Bitcoin blockchain and gas prices in Ethereum
cap their transactions per
second (TPS) to 7 and 15, respectively. This small
throughput severely hinders the
wide-spread adoption of such cryptocurrencies.
●
Confirmation Times
Network latency—the time required to generate an additional
block of transaction in a
chain or the time it takes for a transaction to appear
on a blockchain—is a major
issue of concern. For instance, Bitcoin’s 10-minute
block-time is significantly longer
than the average network latency. To add, Bitcoin
blocks require 5 subsequent blocks
to ensure confirmation. Thus, it takes close to an
hour for transactions to receive
confirmation. On the other hand, Ethereum, which has
lower latency, has a relatively
2 Ganne Emmanuelle, and Deepesh Patel. “Blockchain & DLT In Trade: Where Do We Stand?” Trade Finance Global
high block-time, around 13 minutes. These long confirmation times hinder the wide
scale adoption of these classic blockchains in many
smart contract applications.
●
Fork Generation
Fork generation—whether hard or a soft fork—is time-consuming,
creates potential
vulnerabilities, and consumes significant computational
energy. In regards to
vulnerabilities, fork generation exposes blockchain
networks to costly attacks like
Peer-to-Peer Network-based, Smart Contract-based,
Consensus & Ledger-based,
and Wallet-based attacks. In the past, Ethereum Classic,
Bitcoin gold, Feathercoin,
Vertcoin, Grin, and Verge blockchain networks suffered
51% attacks. (A 51% attack
refers to an attack on Proof-of-Work (PoW) blockchain
where attackers gain control
of 51% or more of a networks’ hash rate). Given the
vulnerabilities therein,
private/permissioned blockchains are usually very
resistant to possible forks of their
blockchain.
●
High Energy Consumption
With classic blockchain networks, the Proof-of-Work
(POW) consensus mechanism
requires mining (computational power) to do proof-of-work
computations. These
transactions consume alarmingly large amounts of energy.
To clarify, the current
annual estimated energy consumption of Bitcoin mining
activities is 87.17
terawatt-hours (
TWh)
3
while the energy consumption
of Ethereum is 29.41 TWh.
4
Put
into further perspective, as of 2017, Bitcoin mining
activities consumed energy levels
equivalent to Denmark’s energy consumption. With projections
indicating that energy
consumption in Bitcoin mining will soar by the year
2022, the POW consensus
remains unsustainable.
●
Anonymous Network Node
A transaction hash is a unique string of code that’s
given to transactions that have
been verified and added to a blockchain. With blockchain
nodes playing an important
part in transaction hashing, the anonymity of nodes—which
store copies of the
distributed ledger and maintain the reliability of
the stored data—poses a problem.
With governments seeking control of sensitive transactions,
lack of government
control, lack of regulatory authority, and maintaining
pseudo-anonymity is a
challenge. Notably, anonymous transactions may lead
to misuse of blockchain
technology, undermining government and regulatory
activities.
Motivated by the above-mentioned challenges, the XinFin
Network proposes a consensus
protocol that focuses on the following key strategies:
●
Double Validation to strengthen security and reduce
likelihood of forks.
●
Randomization to guarantee fairness and prevent handshaking
attacks.
●
Fast confirmation time and efficient checkpoints for
finality or rebase.
●
Self-KYC layer while setting up Network Node.
To start dealing with these problems, this whitepaper
presents an overview of the
architectural design of XinFin Network’s masternodes.
In particular, the paper proposes
XinFin Delegated Proof of Stake (XDPoS) consensus,
a Proof-of-Stake (PoS)-based
blockchain protocol with rigorous security guarantees
and fast finality. The white paper also
4
Digiconomist “Ethereum Energy Consumption Index (Beta).”
3
Digiconomist “Bitcoin Energy Consumption Index.”
presents a novel reward mechanism and demonstrates that with the POS mechanism, the
blockchain can provide efficient confirmation times,
and a low probability of forks.
Additionally, the contributions and benefits of masternodes are equitable, in regards to the
eventual uniformity of the probability distribution
function.
C.
Structure of The Paper.
Section II-A
Goes over the architectural design of
the XinFin Network’s masternodes,
framework, and background protocols that help mass
readers (e.g., investors, traders,
participants) absent the technical education to understand
the network’s masternodes.
Section II-B
presents the XinFin masternode stakeholder
policy, masternode committee,
and reward and slashing mechanism.
Section II-C
explains the motivation and double validation
process as well as the finality
checkpoint of the protocol.
Section II-D
presents the formalization of XinFin
Network’s architecture in a mathematical
model to show the soundness of the model and the protocol.
Section III
discusses the security analysis and the
systems resistance to potential attacks.
Section IV
discusses and compares the XinFin Network
with several existing blockchains.
Section V
concludes the paper.
II. XINFIN NETWORK Masternode DESIGN
A. The XinFin Network Architecture
The XinFin Network consensus protocol or XinFin Delegated
Proof of Stake (XDPOS)
Consensus shown in Fig. 1 below, regulates the consistent
production and maintenance of
masternodes in the XinFin Blockchain.
Masternode Parameters
Suggested parameter values from requirements:
MIN_STAKE
: 10000000 XDC
VALIDATOR_REWARD
: NOS_masternode / TOTAL_REWARD
REWARDS_TRANSFER
: Every next block of epoch
VALIDATOR_SET_SIZE
: 108
WITHDRAWAL_PERIOD
: Set of Epoch (1 Epoch == 900
Blocks)
(Worth noting, there’s a proposal to increase the
VALIDATOR_SET size to 144 after
approval from the governance committee.)
Each XinFin masternode is a full node that holds XDC.
For coin-holders to operate a
masternode, 8 (eight) key requirements must be satisfied.
These include:
●
More than 10,000,000 XDC held by the new masternode
holder, helping them
perform random delegated proof of stake consensus,
seamlessly.
●
A suitable wallet to store XDC tokens. Preferably
in hardware form.
●
A dedicated and stable hardware environment.
●
A dedicated Static Public IP address.
●
100% network uptime by IDC network.
●
A minimum of tier 3+ IDC environment.
●
Virtual Private Server (VPS). Though optional, this
option is highly recommended.
●
When using cloud-based services like Amazon EC2 M3,
large virtual machine (VM)
sizes are appropriate. Similar configurations are
applicable for the Microsoft Azure
Cloud network users.
Given that the XinFin masternode is a full node, it
stores a copy of the blockchain, produces
blocks and keeps the chain consistent. These nodes
are controlled by consortium members
and come with a number of caveats. As previously noted,
full nodes must purchase (and
hold) a fixed equity of XDC (more than 10,000,000)
to be able to host the full XDC protocol.
This design introduces the advantage that no Full
Node or groups of Full Nodes have control
over the network. For node holders to possess more
than 51% hashing power, a full node
must acquire more and more XDC. With increased demand,
XDC prices rise, making it
financially impossible for a Full Node cartel to control
the XinFin Network.
The XinFin Network also employs Double Validation
complemented with a Randomization
mechanism to prevent unscrupulous characters from
gaining control of the network. With
these techniques, the network reduces the probability
of having invalid blocks in the
blockchain, ultimately reducing its effectiveness.
These enhancements and the components
of the XinFin Network are explained in subsequent
sections.
B. Stakeholders.
Coin Holders, Masternodes
Coin-holders are as simple as the name suggests: users
who join the network and who own
and transfer the required amount of XDC. It's worth
noting that the XinFin Network doesn’t
have miners as is with Proof-of-Work-based blockchain
systems like Bitcoin and Ethereum.
The XinFin Network employs a Proof-of-Stake (PoS)-based
protocol.
On the XDPoS, only masternodes can produce and validate
blocks. Once coin holders
deposit 10 million XDC to the Smart Contract, they
are listed as masternode candidates in
the DApp. Masternodes that work consistently within
the system creating and verifying
blocks are incentivized with XDC. XinFin Network engineers
take responsibility for designing
this fair, explicit, automated, and accountable reward
mechanism.
Fig. 1. XinFin Network Architecture
Since 108 masternodes are the maximum number in the
masternode committee,
masternode holders must deposit 10 million XDC to
be considered for positions in the
masternode committee. The amount (10,000,000 XDC)
is locked in a smart contract. In the
event that a masternode is demoted or intentionally
resigns from the masternode, the
candidate’s deposits are locked for 30 days and can
be accessed thereafter.
Reward Mechanism
For each iteration of 900 blocks (called an epoch),
a checkpoint block is created, which
implements only reward works. The checkpoint block
is referred to as the block signer.
Tasked with storing all block signatures, block signers
count the number of signatures sent to
the block signer smart contract during the epoch.
Rewards are based on the number of
signatures linked to a masternode in an epoch.
In addition, block creators are selected in a circular
and sequential order, allowing each
masternode holder an equal opportunity to create and
sign a block. In XDPoS's current
implementation, failure of a masternode to create
a block causes a 10-second delay before
the next masternode in the sequence takes its turn
to create the next block.
Further, there is a reward-sharing ratio among coin-holders
and masternodes that have been
elected via the support of coin-holders. Specifically,
each epoch consists of 900 blocks,
which receive a 250 XDC reward in the first 2 (two)
years. The 250 XDC reward is divided
among masternodes based on the number of signatures
associated with the node in each
epoch. Thereafter, masternode rewards are divided
into three portions, namely:
●
Infrastructure Reward:
This reward comprises the
first portion of 40%. The reward
goes to the masternode.
●
Staking Reward:
This reward accounts for 50% of the
reward. The reward is shared
proportionately amongst the pool of voters for a specific
masternode. Token stake is
the criteria used to share the reward amongst voters.
●
Foundation Reward:
The foundation reward accounts
for the last 10%. This reward
is channelled into a special account that’s controlled
by the masternode foundation.
The foundation is initially run by the XinFin Network
founding company.
Worth noting, coin-holders that un-vote prior to the
check-out block don’t receive any
rewards in the staking reward portion.
Slashing Mechanism
Slashing is an inbuilt mechanism for proof of stake
blockchain protocols that seeks to
discourage validator misbehaviour. Slashing incentivises
node security, availability, and
network participation.
On the XDPoS, underperforming masternodes dramatically
decrease the performance
capabilities of the entire network and cause instabilities.
In XinFin’s Hybrid Network, failure
by a masternode to create a block causes a 10 second
delay. If a masternode has several
turns (say
M
times) to produce a block within an epoch,
the masternode causes more delays
(that is
M*10 sec
). To mitigate the aforementioned
problem, adoption of the slashing
mechanism is key. XinFin’s slashing mechanism entails
as follows:
First, if a masternode fails to create a block during
an epoch, the masternode is slashed for
the 4 (four) subsequent epochs. Second, if more than
one masternodes underperform,
several changes occur in the treatment of the masternodes
list for the next epoch. To
specify, a masternode that’s considered to have underperformed
within the past 4 epochs is
considered as “kicked-out” and it loses the right
to create blocks. At such times, the number
of masternodes taxed with creating blocks falls below
108. At the same time, active
masternodes do not wait the 10 seconds for the underperforming
masternodes.
Once kicked out of XinFin’s masternode list, underperforming
masternodes can still verify
and sign blocks. This caveat is used to enable underperforming
masternodes to notify other
masternodes of their liveness. Nonetheless, underperforming
masternodes don't receive
rewards for verifying and signing off blocks after
being slashed out.
To make the slashing process more effective, the XinFin
Network employs both off-chain and
on-chain slashing mechanisms. With the off-chain slashing,
detection of misbehaviour is
easier to implement, and it can be used for crafty
characters. Within the contract is a
reportBenign
method (part of the Validator Set Contract)
which only Validators can call,
pass a message and a block-number. Slashing is executed
if more than 2/3 of the Validators
agree on the misbehaviour. Misbehaviours might include:
validators consistently propagating
blocks late or validators being offline for more than
24 hours. The slashing can be executed
on portion of the stake—say 4%.
For the on-chain slashing, the process occurs when
a validator signs-off two blocks with the
same step—a condition known as equivocation. Once
a validator node enters the wrong
KYC detail, the contract includes a
r프로젝트로 돌아가기