bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 4쪽 중 3쪽
GHOSTDAG supports a very large
throughput, and does not suffer from a security-scalability tradeoff.
That said, in GHOSTDAG there is still a tradeoff between a
large safety margin and fast convergence of the protocol. A gross
overestimation of Dmax – resulting an increase in k – would
significantly increase the waiting time for transaction settlement.
Thus, Dmax should be set to a reasonable level. In Section 5 we
discuss how this tradeoff can be restricted to visible conflicts only,
and how applications such as payments can enjoy much faster
confirmation times.
A note on the effective throughput. To increase the number of
transactions included in the DAG per second, the protocol designer
can increase the block rateλ or/and the block size b (which in turn
affects Dmax = Dmax(b)). However, if honest miners include in
their blocks the very same transactions, this would not contribute to
the number of unique transactions included in the DAG, per second.
There are two approaches to fix this. The first is to observe that
honest and rational miners are actually incentivized to randomize
over the transactions available to them in order to avoid “collision”
and to thereby maximize their own profit; see more on this in [12].
The second approach is to shard the transaction space and allow
the block to contain transactions from one shard only, in a way
that guarantees that parallel blocks will not collide on the same
shard, with high probability. This technique was used in some of the
works mentioned in Section 7, under “Parallel Nakamoto Chains”.
Both techniques can be deployed in GHOSTDAG. Consequently,
increasing the block rate or block size does indeed lead to a linear
increase in the effective throughput.
5 CONFIRMATION TIMES
As in Nakamoto Consensus, the waiting time for transaction
confirmation depends on the assumed attacker size α, and on
the allowed error ϵ. The security analysis given in Appendix A
shows that within constant expected time the chain of the honest
network enters into a block race with any hypothetical or actual
attacker chain. It is implied that the waiting time for the ordering
between a given block B and other blocks becomes robust at a rate
ofO
log α
1−α
(1/ϵ)
. This analysis was asymptotic, and we leave the
task of tightening the analysis and improving the constants (hidden
in theO) for future work.
Still, we observe that in the case of payments, transactions of
honest users can be confirmed much faster. Indeed, an honest user
will not publish a conflicting transaction, and her transaction will
therefore be commutative with all other published transactions.
Of course, the payee does not know a priori who of the payers is
honest, and will thus wait until the block containing the transaction
is guaranteed (w.h.p.) to precede any new block that might be
published by the attacker. Blocks that are published in the interim
will not contain a conflicting transaction, in the case of an honest
payer, and will therefore not delay acceptance.
Formally, we argue that GHOSTDAG enjoys the following
property: Given a published block b, the probability that a newly
added block in anticone(b) will be accepted as a blue block decays
exponentially:
Proposition 6. If blocks b and c were published at times t and t + r ,
respectively, and c∈ anticone(b), then the probability that c will ever
be considered blue isO(e−C·r) for some positive constant C.
Proof. Lemma 9 implies that the number of adversary blocks
that are in the blue set of an honest node and not in past(B) grows
linearly with r. LetBr = f uture(B)∩ past(Br) where Br is the
honest tip of the node just before r. Then for any N and for any
sufficiently large r it holds that|Br|≤ N + k. All blocks inBr are
in anticone(C), for any C∈ anticone(B) that was discovered after
t + r: indeed, if B′∈B r satisfies B′ < C then B′ < B, and if C < B′
then it was discovered before t + r. Therefore, if Br remains the
honest tip at time t + r, then C is not in the blue set of the honest
node, as it has at least|Br| > k blue blocks in its anticone.
Let B′ be a block such that C∈ BlueSet(B′), then |BlueSet(B′)∩
Br|≤ k, or otherwise C cannot be inside BlueSet(B′). This proves
that for the honest node to consider C blue, a block B′ has to win
a block-race with Br – up to 3k blocks which it can freeload –
which started a time t the latest and lasted up to t + r at least. The
probability of winning such a block-race is inO(e−C·r). □
In fact, following a similar analysis to that developed in [17, 18],
the probability of C becoming blue is
∞Õ
m=0
m + N + k− 1
m
·αm·( 1−α′)N +k· α1−α′max(N−m,0)
where 1−α′ =(1−α)·( 1−δ) as derived in Lemma 9. This implies,
practically, that a merchant who received a payment in a block B,
listens to the blockDAG and sees no conflicting payment in any
block in B’s anticone, can accept the payment when the latter term
becomes smaller than ϵ (- the error probability allowed by the
merchant).
For example, if the block creation rate is set toλ = 1 block per
second, and the assumed upper bound on the network’s round trip
time (2· D) is 7 seconds, then k can safely be set to 16. Assuming an
attacker withα≤ 0.25, and an allowed error ofϵ = 0.1% (the values
of these parameters must be assumed in Nakamoto Consensus as
well), the waiting time for transaction confirmation would be in
the order of 45 seconds. Note that if the actual network delay is
smaller than the 7 seconds bound – say, below 4 seconds, as in
Bitcoin’s Relay Network [1] – then the waiting time will remain the
same. This demonstrates that GHOSTDAG is not responsive to the
actual network delay. For comparison, under the same conditions,
SPECTRE’s waiting time would be in the order of 21 seconds. This is
due to SPECTRE not assuming any upper bound within the protocol,
which enables it to be responsive.
6 IMPLEMENTATION: THE KASPA
NETWORK
Kaspa is a cryptocurrency which operates over an open
source implementation of the GHOSTDAG protocol [ 2]. This
implementation includes an entire range of tools useful to monitor,
PHANTOM GHOSTDAG
A Scalable Generalization of Nakamoto ConsensusNovember 10, 2021 , ,
Figure 4: A histogram of the elapsed waiting time
for a first confirmation of 458,557 transactions. The
horizontal axis is confirmation time in seconds, the
vertical axis is the number of transaction (note that the
vertical axis is log scaled).
test and analyze the network. Among these tools are a block
explorer [4], a graph inspector [3] and a performance dashboard
[5] which monitors quantities of interest such as the global hash
rate, transaction throughput and combinatorial properties of the
DAG such as width and tip count.
The Kaspa implementation also includes features not discussed
in the current work such as difficulty adjustment and algorithmic
solution for efficient computation of all required quantities such as
the blue anticone.
Unlike simple proof of concept simulations, the Kaspa network
provides evidence of the feasibility of GHOSTDAG in real world
situations where the global hashrate fluctuates, the network miners
are organically spread11, nodes are required to synchronize and
verify blocks reasonably fast, and the network has been running
for extended periods of time.
At its current state, the fully operational network easily handles
a throughput of 40 transactions per second, where the average
waiting time for a single confirmation is of the order of seconds. We
stress that a throughput of 40 transaction per second is larger than
the highest throughput ever witnessed on both the Ethereum and
Bitcoin networks, whose confirmation times are longer by orders
of magnitude.
We emphasize that the nodes running on the Kaspa network
are fully operational, and furnish all services required for a real
world cryptocurrency. The performance data of the network should
not be compared against considerably simplified proof of concept
simulations.
We tested the confirmation times of the network by generating
a total of 458,557 transactions and measuring how long before each
transaction got a first confirmation. The results are summarized in
fig. 4 and table 1.
11at the time of writing, at least 30% of the Kaspa mining is carried out by parties other
than the original developers
Table 1: Percentage of transaction approved within given
periods of time of the transactions described in fig. 4.
All transactions were eventually confirmed. The largest
observed first confirmation time is 746 second.
Wait time 1s 2s 3s 4s 5s 10s
Approval
rate 5.3% 27.8% 43.6% 53.1% 59.3% 70,4%
Wait time 30s 1m 2m 5m 10m
Approval
rate 80.7% 86.4% 92.2% 99.5% 99.9%
7 RELATED WORK
Many suggestions to improve the scalability of permissionless
blockchains have been proposed in recent years. These proposals
fall into two main categories, on-chain scaling and off-chain scaling.
On-chain scaling. The protocols in this category may differ, e.g.,
in how fast blocks are created, how blocks are organized in the
ledger (a chain, a tree, a DAG, etc.), which transactions in the
ledger are considered valid, and more. PHANTOM belongs to this
line of works. Previous works in this family of protocols includes
GHOST [19], where a main chain of blocks is chosen according
to a greedy algorithm and not through the longest chain rule;
Inclusive [12], where any chain-selection rule is extended to an
ordered DAG and transactions off the main chain are added in a
consistent manner; Bitcoin NG [ 7], where the ledger consists of
slow key blocks (containing no transactions) and fast microblocks
that contain transactions. The sole purpose of key blocks in Bitcoin
NG is to define the miner that is eligible to create microblocks in
that epoch and confirm thus transactions at a high rate.
GHOST is still susceptible to some attacks, one of which was
described in [11]. The DAG in Inclusive adds throughput but not
security to the main chain, hence suffers from the same limitations
as the underlying main chain selection rule. Key blocks in Bitcoin
NG are still generated slowly, thus confirmation times remain high.
Our work is most similar to the SPECTRE protocol [ 18].
SPECTRE enjoys both high throughput and fast confirmation
times. It uses the structure of the DAG as representing an abstract
vote regarding the order between each pair of blocks. One caveat
of SPECTRE is that the output of this pairwise ordering may
not be extendable to a total order, due to possible Condorcet
cycles. Another related caveat is that SPECTRE does not guarantee
convergence of the ordering between two blocks that were
published in time proximity to one another. This weak liveness
property is showed to suffice for the use case of payments, where
conflicts in two such blocks can only harm a malicious user
that published a double spend. PHANTOM solves these issues
and provides a linear ordering over the blocks of the DAG. As
such, PHANTOM can support consensus regarding any general
computation, including general Smart Contracts, which SPECTRE
cannot handle. Indeed, in order for a computation or contract to
be processed correctly and consistently, the full order of events
in the ledger is usually required, and particularly the order of
, , Yonatan Sompolinsky, Shai Wyborski, and Aviv Zohar
inputs to the contract. 12 PHANTOM’s linear ordering does not
come without cost—confirmation times are mush slower than those
in SPECTRE. In Section 5 we discuss the confirmation times in
PHANTOM compared to those of SPECTRE, when the user does
not publish a visible double spend.
Parallel Nakamoto Chains. Another line of work attempts to
avoid the scalability-security tradeoff imposed by the longest chain
rule by dividing the ledger into k separate Nakamoto chains [6, 8,
20]. The basic technique behind these protocols is to assign a block
to one of the chains only after it was successfully mined, using the
proof-of-work randomness represented in (the hash of) its header.
This randomness ensures that an attacker cannot choose which
chain to concentrate its attack on. One way to view these protocols
and compare them against PHANTOM (and GHOSTDAG) is that
Nakamoto Consensus operates under the assumption thatD·λ≪ 1,
PHANTOM under the assumption that D·λ≪ k, and these parallel
chain protocols under D·λ/k≪ 1; indeed, by dividing the protocol
into k separate chains, each chain is mined at a rate ofλ/k, and this
inequality ensures that each chain enjoys a negligible orphan rate
similarly to Nakamoto Consensus.
Protocols in this paradigm must specify the order over blocks in
the ledger of parallel chains. The performance of these protocols
depends on their respective ordering rules, and we differ the task
of rigorously comparing them to GHOSTDAG to the full version of
this paper.
An attack on a previous variant. The work in [ 13]
presents a DAG-based protocol Conflux, which is identical
to Inclusive-GHOST [ 12, 19]. In the appendix section of [ 13]
there appears an attack on a previous version of PHANTOM. In
that version, the greedy algorithm inherited the blue set S of the
maximal tip, and added blocks to S as long as their anticone in
S was of size k or less. The fact that the greedy algorithm – in
contrast to vanilla PHANTOM– did not attempt at enforcing the
k-cluster property on the chosen set of blue blocks was shown
in [13] to be exploitable. The greedy algorithm presented in this
updated version of the paper, GHOSTDAG, does enforce the
k-cluster property; we utilize this fact to prove its correctness. We
thank the authors of [13] for highlighting this subtlety.
Off-chain scaling. Our work is orthogonal and complementary
to off-chain scaling solutions, and can enhance their operation
by orders-of-magnitude. For instance, when the DAG is used
to serve channel-settlement transactions of Bitcoin’s Lightning
Network [16], it allows for a much cheaper access (due to larger
supply of blocks and capacity) and much faster processing than if
the LN were operating over a chain.
8 DISCUSSION
In this work we have introduced the PHANTOM paradigm, which
generalizes over Nakamoto’s chain into a DAG, and which imposes
no a priori constraint over the system’s throughput, thus avoiding
the scalability-security tradeoff imposed by Nakamoto Consensus.
We described a greedy algorithm, GHOSTDAG, which is more
practical to implement, and proved its security rigorously. There
are still several open research questions regarding GHOSTDAG: a
12Contracts that do not require such a strict ordering can indeed be served under
SPECTRE as well.
tight analysis of its confirmation times, a comparison between it
and other greedy algorithms that approximate PHANTOM, and a
security analysis of the original PHANTOM protocol which wasn’t
provided in this work.
A GHOSTDAG SCALABILITY PROOF
We present a proof that the GHOSTDAG order converges, and that
an attacker (with less than 50% of the global hashrate) is unable to
cause reorgs. We restate the theorem from Section 3:
Theorem 4 (GHOSTDAG scales) Given a block creation rate λ > 0,
δ > 0, and Dmax > 0, if Dmax is equal to or greater than the
network’s propagation delay diameter D, then the security threshold of
GHOSTDAG, parameterized withk(Dmax ,λ,δ), is at least 12·(1−δ).
Assumptions and notations. We first remind the reader that the
topology of the DAG is regarded in our context in reverse to the
usual convention, namely, if there is a path from a blockB to a block
C we say thatC is a parent of B, whereas most literature concerning
DAGs would say that B is a parent (or predecessor) of C. In our
context blocks always point to older blocks, so this anti-convention
is biologically justified whereas the conventional terminology is
misleading.
We assume a worst case byzantine attacker which suffers no
internal delays or delays from or to honest nodes, and which
deviates from the mining protocol arbitrarily (see definition). Still,
regardless of any attacker intervention in the network, she cannot
cause messages between honest nodes to take longer than Dmax to
propagate. In the sequel, to avoid clutter, we useD instead of Dmax
to denote the bound on the network delay (note that in previous
sections D was used to denote the actual delay).
When discussing the honest network, we fix an arbitrary honest
node u∈ honest and assume its point of view, whereby terms such
as the honest chain should be interpreted from u’s point of view.
To that effect, by the honest (attacker) tips at time t we mean all
immediate parents of the virtual block of the honest (attacker) node
at time t, by the honest (attacker) chain we mean the selected chain
of the virtual block, and by the honest (attacker) blue set we mean
the blue set of the virtual block of the honest (attacker) node.
The attacker does not follow the consensus rules and in particular
may create a block which points at blocks which are not tips, and
withhold any blocks they create. Hence, we separate between the
time a block was created (by the attacker) and by the time it was
discovered (by the arbitrary honest node u).
The honest score wH(t) is defined as the score of the virtual block
of the honest node at time t. The advantage of a block B is defined
as adv(B) = score(B)− wH(t), where t is the time B was created.
The attacker advantage adv(t) is the maximum of adv(B) over all
attacker tips at time t. For a given block B, we define the relative
advantage advB(t) to be the maximum of adv(B) over all attacker
tips at time t such that B is not in their selected chain (or−∞ if
there are none). We say that B convinced the honest node at time t
if it was discovered before t− 2D and was in the selected chain at
time t.
We use B→ C to denote that C is an immediate parent of B
and B ⇒ C to indicate that it is a selected parent. We use C < B
to denote that C∈ past(B) and C <⋆ B to denote at C is in the
PHANTOM GHOSTDAG
A Scalable Generalization of Nakamoto ConsensusNovember 10, 2021 , ,
selected chain of B. We use C≤ B and C≤⋆ B to denote the same,
with the possibility that B = C.
We define many constants throughout the proof with the proviso
that they only depend "on system parameters", by which we mean
that they only depend onλ, D and k (and not on t, on the particular
DAG structure of any node, etc.).
Proof Structure. Due to the definition of security threshold in
Definition 3, Theorem 4 reduces to the following proposition.
Proposition 7 (GHOSTDAG security). For any t, r , the probability
that the ordering of two blocks published before time t will change
after time t + r isO(e−cr), where c depends only on the system
parameters.
In terms of Section 3, Proposition 7 states that Risku(B, t, r)
decays exponentially fast, at a rate which does not depend on u
or t. This implies that Risk(B, t, r) decays at the same rate, and in
particular that the GHOSTDAG ordering rule(1−α)-converges.
The correctness of this Proposition 7 follows from the following
proposition:
Proposition 8. Assume that B convinced the network at time t, then
advB(t) is bound from above by a Markovian process on Z which goes
to−∞ exponentially fast.13.
The following two lemmas, which are of independent interest,
are part of the proof of Proposition 8. The first lemma states that
the growth rate of the blue score of the public chain is 1−α, up to
a factor arbitrarily close to 1:
Lemma 9. The expected value of wH(t + r)− wH(t) is at least
(1−α)(1−δ) rλ.
The next lemma states that the attacker’s advantage can be
capped with high probability:
Lemma 10. The advantage adv(t) is upper bounded by a stochastic
process which admits a stationary distribution with an exponentially
decaying tail.
Blue set growth. In this section we discuss the non monotonicity
of the chain weight and prove Lemma 9.
In Nakamoto Consensus the longest chain is chosen, and it is
therefore impossible for an adversary to reduce the length of the
longest chain by publishing blocks. Stated otherwise, the score of
a Bitcoin node increases monotonically. In GHOSTDAG this no
longer holds. Indeed, there are cases where by learning프로젝트로 돌아가기