Citrea 백서

Citrea

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 6쪽 중 2쪽

re guaranteed to be delivered after a delay with a known upper bound δ. We assume there are authenticated commu- nication channels between all parties of the protocol; in Section 8 we will discuss how to optimize communication. Cryptographic Assumptions. We consider hash functions modeled as random oracles and digi- tal signature schemes having Existential Unforgeability under Chosen Message Attack (EUF-CMA) security. Ledger Model. The ledger is the total order of transaction output by a Proof-of-Work consensus protocol that is run in the dynamic population model, i.e., the dynamic difficulty model. We consider a secure ledger, i.e., a ledger that is safe and live . Safety and liveness are defined as follows: 5 Definition 1 (Safety). A distributed ledger protocol is safe if it fulfills the following properties: Self-consistency For any correct party P and any rounds r1≤r2, it holds that LPr1⪯L Pr2. View-consistency For any correct partiesP1,P 2 and any round r, it holds that either LP1r ⪯L P2r or LP2r ⪯L P1r . Definition 2 (Liveness). A distributed ledger protocol is live with liveness parameter u if all trans- actions written by any correct party at round r, appear in the ledgers of all correct parties by round r +u. Clementine Model and Parties. Clementine is designed as an on-chain multi-party protocol executed by mutually distrusted participants: Operators, Watchtowers, Challengers, Signers, and users. Operators, Watchtowers, and Signers are known, fixed sets of parties ( permissioned set). Although these sets comprise a well-known number of identified parties, they can evolve over time under certain circumstances: we discuss this in the adversarial model and in Section 8. Anyone can be a Challenger or user of the protocol (permissionless set). We assume that Operators, Watchtowers, and Challengers run a full node of Bitcoin. Operators are assumed to run a full node of the Citrea rollup and both Operators and Challengers are required to have an account (key pair) in Citrea. The protocol involves two ledgers, which are assumed to be safe and live. More specifically, the protocol involves Bitcoin and Citrea. Adversarial Model. The protocol is executed in the presence of a single, overarching, rushing adversary, who can dynamically corrupt parties. 7 The adversary is constrained in the following ways: it controls strictly less than 50% of the total hashrate of Bitcoin. We assume existential honesty for Operators, Watchtowers, Challengers, and Signers, i.e., at any time, there is at least one honest Operator, one honest Watchtower, one honest Challenger, and one honest Signer. We observe that the existential honesty is a realistic assumption, since parties are economically motivated to follow the protocol. While the Signers’ existential honesty is required for safety of the bridge, for the bridge liveness during the peg in (i.e., when a user transfers funds from Bitcoin to Citrea) we need all Signers to sign. In practice, this does not hinder liveness, which is eventually achieved: if a peg in request does not go through within a certain time, the Signers that withhold are removed from the committee after a timelock. The timelock gives time to the users to withdraw their funds from the bridge and protect them in case the adversary is controlling the n-of-n of the Signer committee. Bridge. A bridge protocol operates on top of two ledger protocols, e.g., LA andLB. A bridge aims to condition the execution of a transaction in LB on the execution of another transaction on LA. In a bidirectional bridge, LA andLB are interchangeable. For a formal definition and an extensive discussion of bridges and their properties, we refer to [31,34]. 5 Clementine: Protocol Description Our goal is to design a bridge protocol that allows users to peg out of the Citrea rollup in a trust- minimized way. Towards this, we rely on the following components: the Citrea rollup, the Bitcoin ledger, a Bitcoin light client, a BitVM instance, and a distributed protocol that is run by the entities that maintain the bridge. As mentioned in Section 3 and Section 4, we assume a Bitcoin ledger that is safe and live, and we assume the Citrea rollup is correctly operating over Bitcoin. The format and specification on the transactions introduced in the following will be given in Section 6. 7A single, overarching adversary is an adversary that can spawn nodes that are acting on her behalf. A rushing adversary is an adversary that, in any given round, gets to see all honest parties’ messages before deciding her strategy [22]. The treatment in which the adversary is considered to be a single party with an overarching goal in mind gives the adversary more power than an adversary who is fighting against another [35]. 6 5.1 Simplified Protocol Description As a first step, for simplicity reasons, we will treat the light client as a black box, assuming that it exists and that it is secure. We also consider the BitVM program as a black box. We will expand on these two components in later subsections: this allows us to introduce the complex Clementine protocol one step at a time. Pegging In. Consider a user, say Alice, that wants to peg in, i.e., move funds from Bitcoin to the Citrea rollup. Alice posts a Deposit transaction on Bitcoin that has an output holding the coins she wants to tranfer, e.g., 10 BTC, and that can be spent by Alice herself aftert1 blocks, or by a transaction that reveals Alice’s address on Citrea. This last spending condition is a covenant: In practice, to emulate covenants, Alice must share her Citrea address (along with the corresponding Tapscript) with the Signers, so that they can pre-sign a MoveToVaulttransaction. The MoveToVaulttransaction moves the user’s funds to a new UTXO, making them redeemable in thepeg out phase by the Operator; indeed, when pegging out a user, the Operator fronts the money to the user and, only after the correct execution has been checked by the bridge, it can be reimbursed with the money the user has locked during the peg in. The MoveToVaulttransaction, when posted, reveals the user’s address on Citrea, where Citrea runs a Bitcoin light client. Anyone, including Alice herself, can send a valid proof to the light client that proves the MoveToVaulttransaction is on Bitcoin; this triggers a Mint transaction on Citrea which mints 10 cBTC. For user experience, the Operator takes care of relaying this proof. Pegging Out. Now consider Alice that wants to peg out, i.e., move her 10 BTC out of Citrea and back to Bitcoin. Alice posts a Burn transaction in Citrea, burning her 10 cBTC and she waits for the rollup to checkpoint the new state onto Bitcoin that finalizes her transaction. The Burn transaction specifies an incomplete Payout transaction, which will be completed by the Operator when fronting the money to the user. Then, Alice waits for the rollup to checkpoint the new state onto Bitcoin, finalizing the Burn transaction. Upon seeing a Burn transaction on Citrea, the Operator posts the Payout transaction on Bitcoin but first, it completes it by adding, e.g., one input in which it fronts the 10 BTC to Alice. The Operator is now at loss of 10 BTC and it needs to have those coins reimbursed. To initiate the reimbursement, the Operator posts aKickOff transaction on Bitcoin. TheKickOff transaction allows the Clementine protocol to decide if the Operator has the right or not to get reimbursed - recall, an Operator is an untrusted party and, therefore, it can act maliciously. The KickOff transaction is fundamental in our construction, as it includes: (i) outputs that are part of the light client logic, (ii) an auxiliary output that, in the form of an OP RETURN, identifies the Payout transaction the Operator wants a reimburse for, (iii) an output called finalizer connector that, depending on which transaction spends it, it gives information on whether the Operator has the right to get reimbursed and (iv) a covenant output that connects the KickOff to the Reimburse transaction in question. Let us consider the light client as a black box: we will describe how it works in the next subsection. Let us focus on the output (iii). In theoptimistic case, the Operator is honest and its reimbursement request is legit: the NoChallenge transaction spends the finalizer connector and the Operator gets 10 BTC back by posting the Reimburse transaction. The pessimistic case, the Operator is adversarial and tries to unfairly extract money from the bridge: To explore this case, we need to first understand how a light client can be emulated in Bitcoin. Figure 1 depicts the transactions involved in the peg in and peg out phases. In this and the following figures, the blue arrow represent a pending path that needs to be pre-signed by covenant Signing committee, whereas orange arrows come out from an output that is spendable by the Operator. 5.2 The Light Client The restrictions imposed by the Bitcoin scripting language prevent from implementing a light client in a programmatic way. Nonetheless, there are ways to securely emulate a light client protocol in Bitcoin. Before diving into the technical part, we highlight that we design an optimistic light client whose goal is to prove that: (1) Alice has burnt 10 cBTC in Citrea (recall that Citrea checkpoints its state into 7 In Out Deposit σA vB CheckCovenant∧ DATA(citrea addr) ∨ CheckSig(pkA )∧ OP CSV(t1 blocks) In Out MoveToVault Covenant vB CheckCovenant In Out KickOff i,j WinCom(bhi,j ),σO .. . Reimburse Link Connector ϵB CheckCovenant . . . In Out Roundi+1 σO .. . Reimburse Connector ϵB CheckSig(pkO ) . . . In Out Reimbursei,j Covenant Covenant σO vB CheckSig(pkO ) In Out Payout (v−f )BσB CheckSig(pkB ) σO 0B OP RETURN(operator id) Fig. 1: Deposit, Payout, MoveToVaultand Reimburse transactions. Bitcoin) and the Burn transaction specifies an incomplete Payout transaction, and (2) the Operator has published on Bitcoin a complete Payout transaction that gives Alice 10 BTC. The light client comprises two sets of parties: Watchtowers and Challengers. Watchtowers provide the light client with the necessary data to identify the canonical chain, while Challengers look after the security of the bridge. We introduce the notion of payoff round: payoff rounds are discrete moments in time in which the Operator batches together reimbursement requests. For simplicity, for now, we consider a single Watchtower, a single Challenger, and a single reimbursement. From Section 5.1, we recall that the KickOff transaction includes outputs that serve to the light client logic. These outputs can be divided into two sets: an output that allows the Watchtower to provide a commitment (i.e., total accumulated work) to the canonical chain, and some outputs for the zkSNARK verifier. Let us focus on the first set: when the Operator publishes theKickOff transaction, it reveals a Winternitz commitment to the tip of the chain. If before the timeout expires no Challenger has posted a Challenge transaction (optimistic case), the Challenger legitimizes the Operator’s right to get reimbursed; after the timeout, the Operator posts the NoChallenge transaction and, in the next payoff round it posts the Reimburse transaction, finally getting the money back. Should the Challenger disagree with the Operator’s commitment (pessimistic case), it posts a Challenge transaction on-chain, initiating the challenge phase . The Watchtower reacts within a (rather long) timeout by posting the WatchtowerChallengetransaction that spends from the desig- nated KickOff transaction output, and reveals a different commitment to the chain. This commitment is done as a ZK proof, theproving the existence of a chain with a certain amount of total work that does not contain the blockhash signed by Operator as the unlocking Witness of the KickOff trans- action. While this prevents any private mining attacks that can be performed by Watchtower prior to the commitment of this blockhash, since the Watchtower had a significant amount of time to provide a different commitment, we give the Operator the chance to counteract by posting the BlockHash transaction and revealing a fresh commitment to the chain. The protocol now has two different commitments to the Bitcoin chain, one revealed by the Oper- ator and one by the Watchtower. Here is where the light client comes into play: On input different commitments to the state of the chain, the light client outputs the correct one. After identifying the canonical chain, any statement about the chain can be proven. We use the BitVM protocol to encode on-chain a zkSNARK verifier for the bridge, which includes proving statements about an off-chain execution of a light client. The bridge program is locally run by the Operator and the Challengers 8 and it outputs a proof that verifies the following: (i) The Operator has committed to a chain that has more Proof-of-Work compared to the one of the Watchtower’s chain; (ii) Operator’s chain contains the blockhash signed by Operator as the unlocking Witness of the KickOff transaction; (iii) This block- hash is from a block that contains the Payout transaction; (iv) Alice burned 10 cBTC on Citrea and Payout transaction is created from its endpoint; The protocol is ultimately designed to allow multiple Watchtowers to participate, and it is crucial that the client program receives on input all the commit- ments disclosed by these Watchtowers. No commitment should be omitted or censored. On a high-level, this is achieved by asking the Operator to post the OperatorChallengeACK transaction, acknowl- edging the challenge of the Watchtower. If the Operator does not post theOperatorChallengeACK transaction, the Challenger can post the OperatorChallengeNACK transaction, burning the final- izer connector and taking away the Operator’s collateral and its possibility to ever facilitate a pegout again. After running the light client off-chain, the Operator posts the Assert transaction8 which reveals the output of the program and the output of some pre-defined intermediary steps; if the Operator does not post the Assert transaction, the Challenger posts the AssertTimeout after a timeout, spending the finalizer connector and taking the Operator’s collateral. The Challenger runs the BitVM program as well and, if its local output differs from the one revealed by the Operator, it posts the Disprove transaction pinpointing the step of the program that has a different output. The Disprove transac- tion runs the questioned computational step on-chain and, if the outcome highlights the Operator’s incorrect execution, the Challenger takes the Operator’s collateral. If the Challenge transaction is posted and no Watchtower posts the WatchtowerChallenge transaction, the Operator can post the WatchtowerChallengeTimeout, preventing Watchtowers to post a late commitment. If the Challenge transaction is posted and no Challenger posts a Disprove transaction, after some time the Operator posts the DisproveTimeout transaction. In this way, the Operator spends the kickoff finalizer connector, finalizing the kickoff transaction and enabling himself to post the Reimburse transaction. After the challenge phase is over, the Operator can get a reimbursement in the next payoff round by posting the Reimburse transaction. The light client is, therefore, optimistic: if the Operator is honest, no light client program is run. If the Operator tries to cheat, the correct execution is enforced via the intervention of Watchtowers and Challengers. Figure 2 depicts the KickOff transaction and all transactions spending its outputs. 5.3 Payoff Rounds and Multiple Reimbursement Requests In the previous subsections, for the sake of simplicity, we have only dealt with a single payout and, in turn, a single reimbursement request. In the real world, the Operator must be able to deal with many, different peg outs. For different peg out requests, the Operator needs to post a dedicated KickOff transaction, each spending an output of what we call Roundi transaction. We introduce the notion of payoff round, a mechanism that allows the Operator to minimize the collateral and reuse it over time. Payoff rounds divide the time into consecutive time windows in which the Operator handles a bunch of peg out requests. The duration of these rounds can vary, and it is decided by the Operator; for instance, when all the outputs of a Roundi transaction are consumed, the Operator can move to the next round to get its money back – recall, an Operator fronts the money to a user in a round and it gets reimbursed in the next round. Alternatively, when no peg out requests appear for some time, the Operator might want to move to the next round to get the money back without waiting for all the outputs of the Roundi transaction to be consumed. The duration of a round also depends on the load of the bridge: if the number of peg out requests is high, then rounds do not last long. A Roundi transaction takes on input the Operator’s collateral and it has different output types. One of its outputs is the burn connector, which holds the collateral. The Operator can safely spend the burn connector and reuse the collateral in the next round only after all KickOff transactions for that round have been finalized so that the collateral can be reused in the next round: specifically, 8Due to practical limitations of Bitcoin, this transaction is broken down into many “mini-assert” transactions. 9 In Out KickOff i,j WinCom(bhi,j ),σO Challenge Connector ϵB CheckCovenant ∨ CheckSig(pkO )∧ OP CSV(t5 blocks) Finalizer Connector ϵB CheckCovenant Reimburse Link Connector ϵB CheckCovenant Disprove Connector ϵB CheckCovenant∧ OP CSV(t8 blocks) ∨ BridgeDisproveScript0,..., BridgeDisproveScript100ns , ClementineDisproveScript0,..., ClementineDisproveScriptm Latest Blockhash Connector ϵB CheckCovenant∧ OP CSV(t7 blocks) ∨ CheckWintSig(lbhi,j ) Assert Connector ϵB CheckCovenant∧ OP CSV(t6 blocks) ∨ CheckWintSig(zi,j,0,..., zi,j,100 ) . . . Assert Connector ϵB CheckCovenant∧ OP CSV(t6 blocks) ∨ CheckWintSig(zi,j,100(ns−1)+1,..., zi,j,100ns ) Watchtower Challenge Connector ϵB CheckCovenant∧ OP CSV(t3 blocks) ∨ CheckSig(pkW1 ) Acknowledge Connector ϵB CheckCovenant∧ OP CSV(t4 blocks) ∨ CheckCovenant∧ OP CSV(t3 blocks) ∨ H(si,j,1 ) . . . Watchtower Challenge Connector ϵB CheckCovenant∧ OP CSV(t3 blocks) ∨ CheckSig(pkWm ) Acknowledge Connector ϵB CheckCovenant∧ OP CSV(t4 blocks) ∨ CheckCovenant∧ OP CSV(t3 blocks) ∨ H(si,j,m ) 0B OP RETURN(move txid, operator idx) In Out NoChallengei,j σO Covenant ϵB ⋆ In Out Challengei,j cBCovenant(SINGLE|ANYONE) CheckSig(pkO ) σC 0B OP RETURN(evm addr) In Out DisproveTimeouti,j Covenant Covenant ϵB ⋆ In Out Disprovei,j,h DisproveWitnessh σO dB ⋆ In Out BlockHashTimeouti,j Covenant Covenant σO ϵB ⋆ In Out BlockHashi,j WinCom(lbhi,j ) ϵB ⋆ In Out AssertTimeouti,j,l Covenant Covenant σO dB ⋆ In Out Asserti,j,l WinCom(zi,j,l,..., zi,j,100·l ) ϵB ⋆ In Out WatchtowerChallengei,j,k σWk σWk ϵB DATA(cp[: 32bytes]) ϵB DATA(cp[32bytes : 64bytes]) 0B OP RETURN(cp[64bytes : 144bytes]) In Out WatchtowerChallengeTimeouti,j,k Covenant Covenant ϵB ⋆ In Out OperatorChallengeACKi,j,k si,j,k ϵB ⋆ In Out OperatorChallengeNACKi,j,k Covenant Covenant σO dB ⋆ In Out KickoffNotFinalizedi,j Covenant σO dB ⊥ In Out Reimbursei,j Covenant Covenant σO vB CheckSig(pkO ) Fig. 2: KickOff transaction graph. 10 after all KickOff transactions of the round are finalized, the Operator spends the burn connector by posting the ReadyToReimburse transaction, locking the collateral into an output. This output is then spent by the next Roundi transaction, transferring the collateral from one round to the next. Then, a Roundi transaction has a set of outputs called kickoff connectors spendable by the Operator by posting a KickOff transaction and revealing a Winternitz commitment to the chain. Finally, the last set of outputs of a Roundi transaction are the reimburse connectors, which are used as inputs to the Re
프로젝트로 돌아가기