bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 4쪽 중 3쪽
wise it needs to wait for such sequencing first.
If the check succeeds, the authority adds the certificate to its
certificate map, along with the effects resulting from its execution,
ie. Ct𝑣[TxDigest]→( TxCert, EffSign); it updates the locks map to
record the certificate Lock𝑣[ObjRef]→ TxCert for all owned input
objects that have locks not set to a certificate. As soon as all objects
in Input(Tx) is inserted in Obj𝑣, then all effects in EffSign are also
materialized by adding their ObjRef and contents to Obj𝑣. Finally
for all created or mutated in EffSign the synchronization map is
updated to map them to Tx.
Remarks. The logic for handling transactions and certificates leads
to a number of important properties:
• Causality & parallelism. The processing conditions for
both transactions and certificates ensure causal execution:
an authority only ‘votes’ by signing a transaction if it has
processed all certificates creating the objects the transaction
depends upon, both owned, shared and read-only. Similarly,
an authority only processes a certificate if all input objects
upon which it depends exist in its local objects map. This
imposes a causal execution order, but also enables transac-
tions not causally dependent on each other to be executed
in parallel on different cores or machines.
• Sign once, and safety. All owned input objects locks in
Lock𝑣[·] are set to the first transaction Tx that passes the
checks using them, and then the first certificate that uses
the object as an input. We call this locking the object to this
transaction, and there is no unlocking within an epoch. As a
result an authority only signs a single transaction per lock,
which is an essential component of consistent broadcast [6],
and thus the safety of Sui.
• Disaster recovery. An authority detecting two contradic-
tory certificates for the same lock, has proof of irrecover-
able Byzantine behaviour – namely proof that the quorum
honest authority assumption does not hold. The two contra-
dictory certificates are a fraud proof [1], that may be shared
with all authorities and replicas to trigger disaster recovery
processes. Authorities may also get other forms of proof of
unrecoverable byzantine behaviour such as >1/3 signatures
on effects (EffSign) that represent an incorrect execution
of a certificate. Or a certificate with input objects that do
not represent the correct outputs of previously processed
certificates. These also can be packaged as a fraud proof
and shared with all authorities and replicas. Note these are
distinct from proofs that a tolerable minority of authorities
(≤ 1/3 by stake) or object owners (any number) is byzan-
tine or equivocating, which can be tolerated without any
service interruption.
• Finality. Authorities return a certificate (TxCert) and the
signed effects (EffSign) for any read requests for an index
in Lock𝑣, Ct𝑣 and Obj𝑣, Sync𝑣. A transaction is considered
final if over a quorum of authorities reports Tx as included
in their Ct𝑣 store. This means that an effects certificate
(EffCert) is a transferable proof of finality. However, a cer-
tificate using an object is also proof that all dependent
certificates in its causal path are also final. Providing a cer-
tificate to any party, that may then submit it to a super
majority of authorities for processing also ensures finality
for the effects of the certificate. Note that finality is later
than fastpay [3] to ensure safety under re-configuration.
However, an authority can apply the effect of a transaction
upon seeing a certificate rather than waiting for a commit.
4.4 Owners, Authorization, and Shared Objects
Transaction validity (see Sect. 4.3) ensures a transaction is autho-
rized to include all specified input objects in a transaction. This
check depends on the nature of the object, as well as the owner
field.
Read-only objects cannot be mutated or deleted, and can be used
in transactions concurrently and by all users. Move modules for
example are read-only. Such objects do have an owner that might
be used as part of the smart contract, but that does not affect au-
thorization to use them. They can be included in any transaction.
Owned objects have an owner field. The owner can be set to
an address representing a public key. In that case, a transaction is
authorized to use the object, and mutate it, if it is signed by that
address. A transaction is signed by a single address, and therefore
can use one or more objects owned by that address. However, a
single transaction cannot use objects owned by more than one
address. The owner of an object, called a child object, can be set to
the ObjID of another object, called the parent object. In that case the
child object may only be used if the parent object is included in the
transaction, and the transaction is authorized to use the object. This
facility may be used by contracts to construct efficient collections
and other complex data structures.
Shared objects are mutable, but do not have a specific owner. They
can instead be included in transactions by different parties, and
do not require any authorization. Instead they perform their own
authorization logic. Such objects, by virtue of having to support
multiple writers while ensuring safety and liveness, do require a
full agreement protocol to be used safely. Therefore they require
additional logic before execution. Authorities process transactions
as specified in Sect. 4.3 for owned objects and read-only objects
to manage their locks. However, authorities do not rely on con-
sistent broadcast to manage the locks of shared objects. Instead,
the creators of transactions that involve shared objects insert the
certificate on the transaction into a high-throughput consensus
system, e.g. [9]. All authorities observe a consistent sequence of
such certificates, and assign the version of shared objects used by
each transaction according to this sequence. Then execution can
proceed and is guaranteed to be consistent across all authorities. Au-
thorities include the version of shared objects used in a transaction
execution within the Effects certificate.
The above rules ensure that execution for transactions involving
read-only and owned objects requires only consistent broadcast
and a single certificate to proceed; and Byzantine agreement is only
required for transactions involving shared objects. Smart contract
authors can therefore design their types and their operations to
optimize transfers and other operations on objects of a single user
to have lower latency, while enjoying the flexibility of using shared
The Sui Smart Contracts Platform
objects to implement logic that needs to be accessed by multiple
users.
4.5 Clients
Full Clients & Replicas.Replicas, also sometimes calledfull clients,
do not validate new transactions, but maintain a consistent copy of
the valid state of the system for the purposes of audit, as well as to
construct transactions or operate services incl. read infrastructures
for light client queries.
Light Clients. Both object references and transactions contain
information that allows the authentication of the full causal chain
of transactions that leading up to their creation or execution. Specif-
ically, an object reference (ObjRef) contains an ObjDigest that is an
authenticator for the full state of the object, including the facility to
get parent(Obj), namely the TxDigest that created the object. Simi-
larly, a TxDigest authenticates a transaction, including the facility
to extract through inputs(Tx) the object references of the input
objects. Therefore the set of objects and certificates form a bipartite
graph that is self-authenticating. Furthermore, effects structures
are also signed, and may be collated into effects certificates that
directly certify the results of transaction executions.
These facilities may be used to support light clients that can per-
form high-integrity reads into the state of Sui, without maintaining
a full replica node. Specifically an authority or full node may pro-
vide a succinct bundle of evidence, comprising a certificate TxCert
on a transaction Tx and the input objects[Obj] corresponding to
inputs(Tx) to convince a light client that a transition can take place
within Sui. A light client may then submit this certificate, or check
whether it has been seen by a quorum or sample of authorities
to ensure finality. Or it may craft a transaction using the objects
resulting from the execution, and observe whether it is successful.
More directly, a service may provide an effects certificate to a
client to convince them of the existence and finality of a transi-
tion within Sui, with no further action or interaction within the
system. If a checkpoint of finalized certificates is available, at an
epoch boundary or otherwise, a bundle of evidence including the
input objects and certificate, alongside a proof of inclusion of the
certificate in the checkpoint is also a proof of finality.
Authorities may use a periodic checkpointing mechanism to
create collective checkpoints of finalized transactions, as well as
the state of Sui over time. A certificate with a quorum of stake
over a checkpoint can be used by light clients to efficiently validate
the recent state of objects and emitted events. A check pointing
mechanism is necessary for committee reconfiguration between
epochs. More frequent checkpoints are useful to light clients, and
may also be used by authorities to compress their internal data
structures as well as synchronize their state with other authorities
more efficiently.
4.6 Bridges
Native support for light clients and shared objects managed by
Byzantine agreement allows Sui to support two-way bridges to
other blockchains [13]. The trust assumption of such bridges reflect
the trust assumptions of Sui and the other blockchain, and do not
have to rely on trusted oracles or hardware if the other blockchain
also supports light clients [7].
Bridges are used to import an asset issued on another blockchain,
to represent it and use it as a wrapped asset within the Sui system.
Eventually, the wrapped asset can be unlocked and transferred
back to a user on the native blockchain. Bridges can also allow
assets issued on Sui to be locked, and used as wrapped assets on
other blockchains. Eventually, the wrapped object on the other
system can be destroyed, and the object on Sui updated to reflect
any changes of state or ownership, and unlocked.
The semantics of bridged assets are of some importance to en-
sure wrapped assets are useful. Fungible assets bridged across
blockchains can provide a richer wrapped representation that al-
lows them to be divisible and transferable when wrapped. Non-
fungible assets are not divisible, but only transferable. They may
also support other operations that mutates their state in a con-
trolled manner when wrapped, which may necessitate custom
smart contract logic to be executed when they are bridged back
and unwrapped. Sui is flexible and allows smart contract authors
to define such experiences, since bridges are just smart contracts
implemented in Move rather than native Sui concepts – and there-
fore can be extended using the composability and safety guarantees
Move provides.
4.7 Committee Reconfiguration
Reconfiguration occurs between epochs when a committee𝐶𝑒 is
replaced by a committee 𝐶𝑒′, where𝑒′ = 𝑒+ 1. Reconfiguration
safety ensures that if a transaction Tx was committed at𝑒 or before,
no conflicting transaction can be committed after𝑒. Liveness en-
sures that if Tx was committed at or before𝑒, then it must also be
committed after𝑒.
We leverage the Sui smart contract system to perform a lot
of the work necessary for reconfiguration. Within Sui a system
smart contract allows users to lock and delegate stake to candidate
authorities. During an epoch, owners of coins are free to delegate
by locking tokens, undelegate by unlocking tokens or change their
delegation to one or more authorities.
Once a quorum of stake for epoch𝑒 vote to end the epoch, author-
ities exchange information to commit to a checkpoint, determine
the next committee, and change the epoch. First, authorities run
a check pointing protocol, with the help of an agreement proto-
col [9], to agree on a certified checkpoint for the end of epoch 𝑒.
The checkpoint contains the union of all transactions, and poten-
tially resulting objects, that have been processed by a quorum of
authorities. As a result if a transaction has been processed by a
quorum of authorities, then at least one honest authorities that
processed it will have its processed transactions included in the
end-of-epoch checkpoint, ensuring the transaction and its effects
are durable across epochs. Furthermore, such a certified checkpoint
guarantees that all transactions are available to honest authorities
of epoch𝑒.
The stake delegation at the end-of-epoch checkpoint is then
used to determine the new set of authorities for epoch𝑒+ 1. Both
a quorum of the old authorities stake and a quorum of the new
authority stake signs the new committee 𝐶𝑒′, and checkpoint at
which the new epoch commences. Once both set of signatures are
and The MystenLabs Team
available the new set of authorities start processing transactions for
the new epoch, and old authorities may delete their epoch signing
keys.
Recovery. It is possible due to client error or client equivocation
for an owned object to become ‘locked’ within an epoch, preventing
any transaction concerning it from being certified (or finalized). For
example, a client signing two different transactions using the same
owned object version, with half of authorities signing each, would
be unable to form a certificate requiring a quorum of signatures
on any of the two certificates. Recovery ensures that once epochs
change such objects are again in a state that allows them to be used
in transactions. Since, no certificate can be formed, the original
object is available at the start of the next epoch to be operated on.
Since transactions contain an epoch number, the old equivocating
transactions will not lock the object again, giving its owner a chance
to use it.
Rewards & cryptoeconomics. Sui has a native token SUI, with
a fixed supply. SUI is used to pay for gas, and is also be used as
delegated stake on authorities within an epoch. The voting power
of authorities within this epoch is a function of this delegated stake.
At the end of the epoch fees collected through all transactions pro-
cessed are distributed to authorities according to their contribution
to the operation of Sui, and in turn they share some of the fees as
rewards to addresses that delegated stake to them. We postpone a
full description of the token economics of Sui to a dedicated paper.
4.8 Authority & Replica Updating
Client-driven. Due to client failures or non-byzantine authority
failures, some authorities may not have processed all certificates. As
a result causally related transactions depending on missing objects
generated by these certificates would be rejected. However, a client
can always update an honest authority to the point where it is able
to process a correct transaction. It may do this using its own store
of past certificates, or using one or more other honest authorities
as a source for past certificates.
Given a certificate𝑐 and a𝐶𝑡𝑣 store that includes𝑐 and its causal
history, a client can update an honest authority 𝑣′ to the point
where𝑐 would also be applied. This involves finding the smallest
set of certificates not in𝑣′ such that when applied the Objects in𝑣′
include all inputs of𝑐. Updating a lagging authority𝐵 using a store
𝐶𝑡𝑣 including the certificate TxCert involves:
• The client maintains a list of certificates to sync, initially
set to contain just TxCert.
• The client considers the last TxCert requiring sync. It ex-
tracts the Tx within the TxCert and derives all its input
objects (using Input(Tx)).
• For each input object it checks whether the Tx that gener-
ated or mutated last (using the Sync𝑣 index on𝐶𝑡𝑣) has a
certificate within𝐵, otherwise its certificate is read from
𝐶𝑡𝑣 and added to the list of certificates to sync.
• If no more certificates can be added to the list (because no
more inputs are missing from𝐵) the certificate list is sorted
in a causal order and submitted to𝐵.
The algorithm above also applies to updating an object to a specific
version to enable a new transaction. In this case the certificate for
the Tx that generated the object version, found in Sync𝑣[ObjRef],
is submitted to the lagging authority. Once it is executed on𝐵 the
object at the correct version will become available to use.
A client performing this operation is called a relayer. There can
be multiple relayers operating independently and concurrently.
They are untrusted in terms of integrity, and their operation is
keyless. Besides clients, authorities can run the relayer logic to
update each other, and replicas operating services can also act as
relayers to update lagging authorities.
Bulk. Authorities provide facilities for a follower to receive updates
when they process a certificate. This allows replicas to maintain
an up-to-date view of an authorty’s state. Furthermore, authori-
ties may use a push-pull gossip network to update each other of
the latest processed transaction in the short term and to reduce
the need for relayers to perform this function. In the longer term
lagging authorities may use periodic state commitments, at epoch
boundaries or more frequently, to ensure they have processed a
complete set of certificates up to certain check points.
5 SCALING AND LATENCY
The Sui system allows scaling though authorities devoting more
resources, namely CPUs, memory, network and storage within a ma-
chine or over multiple machines, to the processing of transactions.
More resources lead to an increased ability to process transactions,
leading to increased fees income to fund these resources. More
resources also results in lower latency, as operations are performed
without waiting for necessary resources to become available.
Throughput. To ensure that more resources result in increased
capacity quasi-linearly, the Sui design aggressively reduces bottle-
necks and points of synchronization requiring global locks within
authorities. Processing transactions is cleanly separated into two
phases, namely (1) ensuring the transaction has exclusive access
to the owned or shared objects at a specific version, and (2) then
subsequently executing the transaction and committing its effects.
Phase (1) requires a transaction acquiring distributed locks at the
granularity of objects. For owned objects this is performed trough a
reliable broadcast primitive, that requires no global synchronization
within the authority, and therefore can be scaled through sharding
the management of locks across multiple machines by ObjID. For
transactions involving shared objects sequencing is required using
a consensus protocol, which does impose a global order on these
transactions and has the potential to be a bottleneck. However,
recent advances on engineering high-throughput consensus pro-
tocols [9] demonstrate that sequential execution is the bottleneck
in state machine replication, not sequencing. In Sui, sequencing
is only used to determine a version for the input shared object,
namely incrementing an object version number and associating
it with the transaction digest, rather than performing sequential
execution.
Phase (2) takes place when the version of all input objects is
known to an authority (and safely agreed across authorities) and
involves execution of the Move transaction and commitment of its
effects. Once the version of input objects is known, execution can
The Sui Smart Contracts Platform
take place completely in parallel. Move virtual machines on mul-
tiple cores or physical machines read the versioned input objects,
execute, and write the resulting objects from and to stores. The
consistency requirements on stores for objects and transactions
(besi프로젝트로 돌아가기