bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 6쪽 중 5쪽
, then finality is a point in time where it is
safe for Bob to give the product to Alice. The time to finality is actually as short as the consensus time for
a single shard. Once consensus has been reached on that initial transaction, it is certain that Alpha will
send a message to Beta, and that Beta will process it, and that Bob’s account will receive the transfer. So
finality is as fast as consensus.
If a transfer is from one source account to two destination accounts, finality is still just as fast. As soon
as the initial transaction reaches consensus, it will be known whether it had sufficient funds and whether
the two messages will be sent.
However, if a single transaction is to transfer from two source accounts to one destination account, and
the source accounts are in different shards, then finality will be slower. Because it will have to involve
another type of message: a “hold,” which is later followed by a “release.”
For example, suppose a transaction is created to transfer 2 coins from Alice in Alpha shard and 3 coins
from Bob in Beta shard, with the 5 coins being transferred to Gina in Gamma shard. This is intended to be
atomic so that nothing will happen unless Alice and Bob both have sufficient funds for the transfer.
To achieve this, the transaction must be signed by both Alice and Bob, and must be submitted to the
Alpha shard. When it reaches consensus, it causes a “hold” to be put on 2 coins in Alice’s account.
This means that 2 coin’s worth of the account is temporarily frozen. While it is frozen, Alice is still free
to receive funds and to transfer out funds, but can’t do any transfer that would decrease her balance
to less than 2 coins.
APPENDICES
49
At the same time that Alpha puts a hold on 2 coins for Alice, it also sends a message to Beta requesting a
hold of 3 coins for Bob. This message does not need to be signed by Bob, because it is coming from Alpha,
and Alpha has already checked that Bob had signed the transaction.
When the message is received and reaches consensus, Beta will attempt to put a hold on Bob’s account
for 3 coins. If he has sufficient funds, it succeeds. If he has less than 3 coins, then it fails, and no hold is put
on him at all. Beta then sends back to Alpha a message saying whether the hold was successful.
When Alpha receives a reply that the hold was successful, Alpha then decrements Alice’s account by 2
coins (which also removes the hold), sends a message to Beta saying to decrement Bob’s account by 3
coins (removing his hold) and sends a message to Gamma to increment Gina’s account by 5 coins.
On the other hand, if Beta’s message said the hold failed because Bob did not have sufficient coins, then
Alpha simply released the hold on Alice’s account and considers the entire transaction to have failed.
None of the three balances change.
Note that when this all started with Alpha processing the initial transaction, it was possible for Alpha to
calculate how many messages would be involved in the entire process, 4 messages in this example. Alpha
will therefore check that the transaction included authorization of a service fee that included the fee for
the service of sending those 4 messages. Hedera then automatically makes payments to the nodes that
created each of the message transactions that were handled (and not ignored as duplicates). This acts
as incentive for nodes to do the work of sending messages to other shards, receiving confirmations of
receipt from them, and creating the transactions that contain those messages and confirmations.
APPENDICES
50
Appendix 3: Consensus Service
APPENDICES
3
Abstract
The Consensus Service proof-of-concept use case is providing custom Hyperledger Fabric networks
with decentralized consensus on the validity and order of blockchain transactions without the need
to configure a RAFT 1 or Kafka 2 ordering service. Additional use cases include, but are not limited to,
financial markets, matching engines (like those used in Uber or AirBnb), or supply chain negotiations
(e.g., several competing factories bidding on parts from several competing parts suppliers).
The Hedera Consensus Service synchronizes the fair order of messages for distributed
systems without relying on a centralized clock.
1 “Configuring and Operating a RAFT Ordering Service,”
https://hyperledger-fabric.readthedocs.io/en/release-1.4/raft_configuration.html
2 “Bringing up a Kafka Ordering Service,”
https://hyperledger-fabric.readthedocs.io/en/release-1.4/kafka.html
ON A DISTRIBUTED LEDGER, THE ENTIRE
NETWORK RECORDS AND VALIDATES
EACH TRANSACTION.
51APPENDICES
4
Introduction
The Hedera Consensus Service is the first Distributed Ledger Technology (DLT) network service to
provide solely the validity and order of events and transparency into the history of events over time
without requiring a persistent history of transactions. A s a result, the Hedera Consensus Service
provides the benefits of a fast, fair , and secure consensus at a lower cost than any other public
distributed le dger network.
Whether in financial services, I oT, or supply chain - the timing and order of events dictates everything
from financial transactions to meaningful asset provenance. The applications must execute logic
based on events which occur at a specific time, in a specific orde r. In many cases the users of
these applications need to look back in time to the history of that order for everything from audit
to reconciliation.
Today, these applications rely on moderation, matching, and ordering performed by single entities.
This makes them prone to network outage 3, at risk of collusion by a small number of parties 4, and
subject to the cost model of centralized infrastructure providers 5. Even private distributed ledger
networks rely on nodes operated by one or few parties to provide consensus to the rest of the
network 6. Each approach poses economic risk due to cost and operational risk due to unintentional
outage or intentional manipulation of a service.
In the distributed ledger space, protocols aim to solve this problem through the provision
of two features:
1 Decentralized consensus on the validity and order of events.
2 Transparency into the history of events over time.
The first value relies on the existence of nodes to come to agreement on the time an event occurred,
ultimately producing a consensus order for events over time. Distributed ledgers such as R3’s Corda,
Hyperledger Fabric, or enterprise version of Ethereum either deploy known and trusted nodes
operated by institutions, trust a single party to provide the order, or rely on slow and expensive public
ledgers like Bitcoin or Ethereum to select a block producer through proof of work 7. Applications
can be forced to wait minutes or even hours for confirmation on finality of a transaction. There
is a market need for distributed and fast consensus without the need to centralize the consensus
process.
3Gps Error Caused ‘12 Hours Of Problems’ For Companies
Chris Baraniuk - https://www.bbc.com/news/technology-35491962
4Corrupt Governance? What We Know About Recent Eos Scandal
Stephen O’Neal - https://cointelegraph.com/news/corrupt-governance-what-we-know-about-recent-eos-scandal
5Cloud Pub/sub | Google Cloud
https://cloud.google.com/pubsub/
6The Ordering Service¶
https://hyperledger-fabric.readthedocs.io/en/release-1.4/orderer/ordering_service.html and Notaries¶
7“Recent studies hint that the performance of PoW based blockchains cannot be enhanced
without impacting their security” - https://eprint.iacr.org/2016/555.pdf
52APPENDICES
5
8Bitcoin Blockchain Size 2010-2019 | Statistic
https://www.statista.com/statistics/647523/worldwide-bitcoin-blockchain-size/
The second value is the ability of any individual or entity to independently verify whether and when
an event occurred. This is most frequently used to track account balances of tokens, or to verify the
provenance of an asset. Traditional blockchains rely on storage of all events across all members of the
network. This model allows for simple querying of account balances but limits performance to 10-20
tps and means the ledger will continue to grow (bitcoin alone is over 200 GB as of the writing of
this paper). 8
Hedera provides a unique solution to deliver optimized performance of decentralized consensus
without the need to persist a history of transactions over time through the provision of the Hedera
Consensus Service. The Hedera Consensus Service will use the Hedera public network and underlying
hashgraph consensus algorithm for fast, fair, and secure consensus while offloading the validation
and storage requirements for distinct applications to computers using the Mirror Network.
53APPENDICES
6
Hedera Governance
and the Path to Decentralization
The Hedera public network is built from the ground up to deliver decentralized services at a scale
needed for enterprise and consumer applications. This includes full decentralization of network
operations, high performance, and guaranteed finality.
Decentralization
The Hedera public network will be governed by a Council o f 39 term-limited, multi-industry and
multi-geo large enterprises t o ensure the stability and growth of the network. They act as the initial
node operators before node operation becomes public long term. This ensures that the network itse lf
and services it provides are not prone to collusion or ma nipulation at the desire of a small group of
entities or miners. This acts as a multi-cloud/multi-da ta center service with inherent disaster recovery
and high availability that can be used by any application. The Hedera Consensus Service provides
transaction ordering on a decentralized network rather than relying on a single cloud provider or
small group of private node operators.
Performance
Throughput continues to bottleneck the majority of decentralized public networks today. Hashgraph
enables faster consensus with 100% finality and without the need to elect leaders, trust a small
subset of nodes, or in any way compromise the security of the network. The Hedera Consensus
Service will extend this benefit for any transaction type submitted by an application. Consensus
occurs in a matter of seconds while processing tens to hundreds of thousands of transactions per
second. This level of performance is required for any scaled consumer or enterprise application.
Finality
HEDERA C ONSENSUS SERVICE
DECENTRALIZATION PERFORMANCE FINALITY
54APPENDICES
7
Finally, the order that is created by the mainnet is final and verifiable. Consensus timestamps on
the Hedera mainnet are 100% final once they are created due to its Asynchronous Byzantine fault
Tolerance (ABFT) nature. This means that the timestamp of a given transaction is final and cannot
change. Any client application can query the network for the record (created automatically by the
nodes to capture key information about the transaction being added to consensus) and optionally
ask for a corresponding state proof (a cryptographically secure and persistent assertion from
the network as to the accuracy of the record) to confirm that timestamp. Additionally, Consensus
Service transactions will be stored on mirror nodes running additional software. Users can run mirror
nodes themselves, query a mirror node for state proofs, or validate records between multiple mirror
nodes to verify the complete order without needing to trust a single node operator.
6
Hedera Governance
and the Path to Decentralization
The Hedera public network is built from the ground up to deliver decentralized services at a scale
needed for enterprise and consumer applications. This includes full decentralization of network
operations, high performance, and guaranteed finality.
Decentralization
The Hedera public network will be governed by a Council o f 39 term-limited, multi-industry and
multi-geo large enterprises t o ensure the stability and growth of the network. They act as the initial
node operators before node operation becomes public long term. This ensures that the network itse lf
and services it provides are not prone to collusion or ma nipulation at the desire of a small group of
entities or miners. This acts as a multi-cloud/multi-da ta center service with inherent disaster recovery
and high availability that can be used by any application. The Hedera Consensus Service provides
transaction ordering on a decentralized network rather than relying on a single cloud provider or
small group of private node operators.
Performance
Throughput continues to bottleneck the majority of decentralized public networks today. Hashgraph
enables faster consensus with 100% finality and without the need to elect leaders, trust a small
subset of nodes, or in any way compromise the security of the network. The Hedera Consensus
Service will extend this benefit for any transaction type submitted by an application. Consensus
occurs in a matter of seconds while processing tens to hundreds of thousands of transactions per
second. This level of performance is required for any scaled consumer or enterprise application.
Finality
HEDERA C ONSENSUS SERVICE
DECENTRALIZATION PERFORMANCE FINALITY
55APPENDICES
8
The Fair Order of Transactions
Hashgraph’s primary function is to calculate a fair order of transactions in a decentralized
environment. One of the major differentiators is the degree to which individuals or small groups are
prevented from manipula ting the order, ensuring fairness. 9
The Hedera public ledger uses the hashgraph consensus a lgorithm and its HBAR cryptocurrency to
initially provide three services: Cryptocurrency, Smart Contract, and File Service. Hashgraph uses
gossip about gossip and virtual voting in order to bring the network to consensus on the timestamp
of any event with efficiency of bandwidth usage without centralizing around any entity or group of
entities. Hbars are the network coin, which enable any holder of the coin to pay for utility provided by
the network, and also ensures security of the network through the process of staking (tying influence
within virtual voting to the amount of coin held).
Gossip between the Hedera nodes takes place at the same speed regardless of which node submitted
the transaction and cannot be increased by paying more for a given transaction. This differs from
other public network models, which allow applications to pa y more for their transactions to be
processed first. Similarly, because there is no conce pt of leaders in the consensus, no small subset of
nodes can collude to unduly influence the consensus order in their own favor .
Transactions are propagated to the network and come to final consensus in a matter of seconds. If
an application is worried about a single node holding back from sending the transaction to the rest of
the network then they can submit to multiple nodes. In this scenario only the first transaction to reach
consensus would be kept and the others would be ignored .
Hedera’s Other Services
Hedera built three initial services to expose the value of decentralization to any application builder:
1 Cryptocurrency: access a low cost and fast method of transferring value between
accounts without relying on intermediaries. The Cryptocurrency Service can be used
for payment applications, data purchases, and many other use cases relying on
fast value transfer.
2 Smart Contracts: execute code deterministically without needing to trust an
application operator. Build fair markets, issue tokens, and program business logic in
Solidity and deploy it on Hedera to benefit from trusted security and fair ordering.
3 File Service: store data across the network for any node or user to access or
store obfuscated data to benefit from a consensus timestamp of the state of data
at a point in time. Create decentralized registries, records, and other public data
on the File Service.
9https://www.hedera.com/whitepaper
56APPENDICES
9
These services enable large enterprises, independent developers, and consumers to build or use
applications across industries and geographies. They are consumable through SDKs in common
programming languages and are intended to support applications of any type.
Extending to the Consensus Service
The Consensus Service relies on another feature to pro pagate the full history of transactions and its
results to many participants: the mirror network. Messages ord ered by the Consensus Service w ill be
received by the mirror nodes. Developers can choose to implement additional software on e ach
mirror node. A mirror node could store all the messages for certain topics (identifiers used to
associate a message with a specific application or network). It could store all messages (strings of
bytes representing a given transaction). Or it could even store the records of all transactions that
reached consensus on the ledge r. If everything is stored, it can form something that resembles a
traditional blockchain, even though the Hedera ledger never keeps that history.
The Hedera mirror network (mirrornet) is a parallel network dedicated to propagating the state of
the Hedera main network (mainnet). This propagation is accomp lished without adding unnecessary
strain to the mainnet. And while anyone will be able to host a mainnet node in the future, mirror nodes
allow businesses to extend the functionality of Hedera without a serious impact on the mainnet.
The mirrornet is a set of nodes that maintain all of the same requirements and most of the
functionality of the mainnet. The primary difference in functionality is that mirror nodes do not
participate in consensus. They receive information from the mainnet, but do not send information
to it. Mirror nodes continue to gossip with other mirror nodes, and will calculate consensus and v erify
signatures, but they have no effect on the mainnet. Therefore they have no ability to submit
transactions for consensus and no voting powe r. Mirror nodes can be thought of as read-only nodes in
that transactions cannot be submitted to a mirror node via the Hedera API. Mirror nodes operators
Hedera extends these network services with a fourth service, which brings the fairness
provided by the hashgraph consensus algorithm to the Hedera Consensus Service.
This service receives messages, and assigns them consensus timestamps and a
consensus order.
MIRROR
NODES
101010
010101
101010
101010
010101
101010
101010
010101
101010
57APPENDICES
10
are free to develop additional APIs for providing new kinds of services that they develop. The beta
version of the mirror nodes was completed in May 2019 wi th greater latency (e.g., a minute), but t he
full mirror nodes will have a latency of seconds.
Mirror nodes operated by individuals or private networks leveraging the Consensus Service will be
able to filter and receive events and records for transactions that have a specified topic. They will
then be able to store the full history of events rel evant to their application.
58APPENDICES
11
HEDERA NETWORK
HEDERA HASHGRAPH
CRYPTOCURRENCY
SERVICE
SMART CONTRACT
SERVICE
FILE
SERVICE
CONSENSUS
SERVICE
HEDERA SDK
Architecture
This section will describe the architecture of the Consensus Service on the Hedera public network
along with an overview of how the Consensus Service can enable interoperability with and between
any Hyperledge r Fabric based network.
Hedera Consensus Service Architecture
The Hedera Consensus Service is the fourth core service provided by Hedera. Like the other services,
the Consensus Service will be exposed via a diverse number of SDKs in common programming
languages, as well as the Hedera API (HAPI) using protobufs. This allows applications to access the
network services using both the SDK abstractions as well as the lower level APIs.
The client application would submit a message (a string of bytes) and give it a topic (an ID numb er)프로젝트로 돌아가기