《Performance Overhead of Atomic Crosschain Transactions》
摘要:
Abstract—Atomic Crosschain Transaction technology allows composable programming across permissioned Ethereum blockchains. It allows for inter-contract and inter-blockchain function calls that are both synchronous and atomic: if one part fails, the whole call graph of function calls is rolled back. This paper analyses the processing overhead of using this technique compared to using multiple standard non-atomic single blockchain transactions. The additional processing is analysed for three scenarios involving multiple blockchains: the Hotel - Train problem, Supply Chain with Provenance, and an Oracle. The technology is shown to reduce the performance of Hyperledger Besu from 375 tps to 39.5 tps if all transactions are instigated on one node, or approaching 65.2 tps if the transactions are instigated on a variety of nodes, for the Hotel-Train scenario. Index Terms—blockchain, ethereum, cross, transaction, atomic, performance
摘要——原子跨鏈交易技術(shù)允許跨許可的以太坊進行可組合編程區(qū)塊鏈。 它允許跨合約和跨區(qū)塊鏈
同步和原子的函數(shù)調(diào)用:如果有部分失敗,函數(shù)調(diào)用的整個調(diào)用圖被滾動背部。 本文分析了使用這個的處理開銷技術(shù)與使用多個標(biāo)準(zhǔn)非原子單區(qū)塊鏈交易。 額外的處理被分析為涉及多個區(qū)塊鏈的三個場景:酒店-火車問題、具有來源的供應(yīng)鏈和 Oracle。 這技術(shù)被證明會降低 Hyperledger 的性能
如果發(fā)起所有交易,Besu 從 375 tps 到 39.5 tps在一個節(jié)點上,或者如果交易是接近 65.2 tps
在各種節(jié)點上煽動,用于酒店-火車場景。索引詞——區(qū)塊鏈、以太坊、交叉、交易、原子、表現(xiàn)
Atomic Crosschain Transactions [1], [2] is an Ethereum permissioned blockchain technology [3], [4] that allows transactions across blockchains that either update state on all blockchains or discarded state updates on all blockchains. These crosschain transactions are nested transactions that consist of an Originating Transaction, Subordinate Transactions and Subordinate Views. Originating and Subordinate
Transactions update the state of the blockchains they run on. Subordinate Views return the result of a function call on one blockchain to another blockchain. The Atomic Crosschain Transactions are able to provide this functionality because they provide cross-blockchain consensus. Providing cross-blockchain consensus does not come for free. BLS Threshold Signatures [5]–[7] are used to prove values across blockchains. Verifying BLS Threshold Signatures uses two costly BLS Pairing operations. Generating
BLS Threshold Signatures involves communications between validator nodes in a blockchain network and verifying the signature prior to publication. Validating information from other blockchains requires signature verifification. Additionally, the Coordination Contract on a Coordination Blockchain, used to coordinate parts of the overall transaction, needs to verify signatures. The contribution of this paper is the first analysis
of the additional processing requirements imposed by using the Atomic Crosschain Transaction technology compared to using separate single blockchain transactions. The Atomic Crosschain Transaction technology can be used to create applications to solve a wide variety of problems
原子跨鏈交易 [1]、[2] 是一種以太坊許可的區(qū)塊鏈技術(shù) [3]、[4],它允許跨區(qū)塊鏈進行交易,這些交易要么更新所有區(qū)塊鏈上的狀態(tài),要么丟棄所有區(qū)塊鏈上的狀態(tài)更新。這些跨鏈交易是由發(fā)起交易、從屬交易和從屬視圖組成的嵌套交易。起源和從屬交易更新它們運行的??區(qū)塊鏈的狀態(tài)。從屬視圖將一個區(qū)塊鏈上的函數(shù)調(diào)用結(jié)果返回到另一個區(qū)塊鏈。原子跨鏈交易能夠提供此功能,因為它們提供跨區(qū)塊鏈共識。提供跨區(qū)塊鏈共識不是免費的。 BLS 閾值簽名 [5]–[7] 用于證明跨區(qū)塊鏈的價值。驗證 BLS 閾值簽名使用兩個昂貴的 BLS 配對操作。生成BLS 閾值簽名涉及區(qū)塊鏈網(wǎng)絡(luò)中驗證器節(jié)點之間的通信以及在發(fā)布之前驗證簽名。驗證來自其他區(qū)塊鏈的信息需要簽名驗證。此外,用于協(xié)調(diào)整個交易部分的協(xié)調(diào)區(qū)塊鏈上的協(xié)調(diào)合約需要驗證簽名。本文的貢獻是第一次分析與使用單獨的單個區(qū)塊鏈交易相比,使用原子跨鏈交易技術(shù)強加的額外處理要求。原子跨鏈交易技術(shù)可用于創(chuàng)建解決各種問題的應(yīng)用程序
Three common example problems involving transactions read ing and updating across multiple blockchains are presented so that the technology can be evaluated. The Hotel Train problem has a travel agency book a hotel room and a train seat. This requires the state of three blockchains to be updated atomically. The Supply Chain Provenance problem allows for selective transparency of supply chain events between a Supply Chain blockchain and a Provenance blockchain. This requires two blockchains to update atomically. The Oracle problem involves using the result of a function call on one blockchain,
for example to read the current price of a commodity, in a function call on another blockchain.
Creating blockchain systems that provide atomic behaviour across multiple blockchains is a complex problem [8]. This is because blockchain networks are distributed systems and cross-blockchain protocols thus operate in a distributed system of distributed systems. To date, Atomic Crosschain Trans
actions is the only protocol that provides a true atomic cross-blockchain function call protocol [9]. Understanding the overhead imposed by a cross blockchain protocol is important as this allows application architects to evaluate whether the additional utility provided by the protocol outweighs the overhead.
This paper is organised as follows: the Background section introduces Ethereum and Atomic Crosschain Transactions. Next three example problems are described in the Scenar ios section. The Experimental Setup section describes how throughput numbers were gathered. The Results section anal yses the overhead of using Atomic Crosschain Transaction technology compared to using separate single blockchain transactions. The affect of Byzantine actors in the fifinal section.
提出了涉及跨多個區(qū)塊鏈讀取和更新事務(wù)的三個常見示例問題以便對技術(shù)進行評估。酒店火車問題有旅行社訂酒店房間和火車座位。這需要更新三個區(qū)塊鏈的狀態(tài)原子地。供應(yīng)鏈來源問題允許供應(yīng)之間供應(yīng)鏈?zhǔn)录倪x擇性透明度鏈?zhǔn)絽^(qū)塊鏈和起源區(qū)塊鏈。這需要兩個區(qū)塊鏈進行原子更新。甲骨文問題涉及在一個區(qū)塊鏈上使用函數(shù)調(diào)用的結(jié)果,例如讀取商品的當(dāng)前價格,在另一個區(qū)塊鏈上的函數(shù)調(diào)用。創(chuàng)建提供原子行為的區(qū)塊鏈系統(tǒng)跨多個區(qū)塊鏈?zhǔn)且粋€復(fù)雜的問題 [8]。這是因為區(qū)塊鏈網(wǎng)絡(luò)是分布式系統(tǒng),跨區(qū)塊鏈協(xié)議因此在分布式系統(tǒng)中運行的分布式系統(tǒng)。迄今為止,原子跨鏈交易是唯一提供真正原子交易的協(xié)議跨區(qū)塊鏈函數(shù)調(diào)用協(xié)議[9]。了解跨區(qū)塊鏈協(xié)議施加的開銷很重要因為這允許應(yīng)用程序架構(gòu)師評估協(xié)議提供的額外效用超過了高架。本文的組織結(jié)構(gòu)如下: 背景部分介紹以太坊和原子跨鏈交易。接下來的三個示例問題在場景 ios 部分中描述。實驗設(shè)置部分描述了如何收集了吞吐量數(shù)字。結(jié)果部分分析了使用原子跨鏈交易的開銷技術(shù)與使用單獨的單個區(qū)塊鏈相比交易。最后一部分拜占庭演員的影響。
A. Ethereum [10] is a blockchain platform that allows users to deploy and execute computer programs known as Smart Contracts.
Smart Contracts are typically written in the Solidity[11] programming language. Source code is compiled into a bytecode representation. The bytecode is deployed to the distributed ledger using a contract creation transaction. Ethereum transactions update the state of the distributed ledger, do not return values, and can emit log information. In addition to contract deployment transactions, transactions are also used to call functions in the Smart Contracts and to transfer Ether, the native coin of Ethereum, between accounts.
“View” function calls can be executed on the Smart Contract code. These View function calls return a value and do not update the state of the Smart Contract. Blocks consist of groups of transactions. Ethereum nodes come to consensus to determine the next block that will become part of the chain of blocks. As such, execution of transactions involves nodes across the network. In contrast, View function calls execute on a single node using the node’s local copy of the distributed ledger. Ethereum MainNet, the most widely used public Ethereum network, uses a Proof of Work (PoW) [10], [12] consensus algorithm. Ethereum 2, due to go live incrementally starting in 2020, will use a Proof of Stake (PoS) [13] consensus algorithm. Ethereum is also deployed in permissioned consor tium networks [4]. In these deployments Proof of Authority (PoA) consensus algorithms such as Istanbul Fault Byzantine Tolerant (IBFT) [14] and Istanbul Fault Byzantine Tolerant version 2 (IBFT2) [15] are used.
以太坊 [10] 是一個區(qū)塊鏈平臺,允許用戶部署和執(zhí)行稱為智能合約的計算機程序。智能合約通常用 Solidity[11] 編程語言編寫。源代碼被編譯成字節(jié)碼表示。字節(jié)碼使用合約創(chuàng)建交易部署到分布式賬本。以太坊交易更新分布式賬本的狀態(tài),不返回值,并且可以發(fā)出日志信息。除了合約部署交易,交易也用于調(diào)用智能合約中的函數(shù)以及在賬戶之間轉(zhuǎn)移以太幣(以太坊的原生代幣)。
“查看”函數(shù)調(diào)用可以在智能合約代碼上行。這執(zhí)些 View 函數(shù)調(diào)用返回一個值并且不會更新智能合約的狀態(tài)。區(qū)塊由交易組組成。以太坊節(jié)點達成共識,以確定將成為區(qū)塊鏈一部分的下一個區(qū)塊。因此,交易的執(zhí)行涉及網(wǎng)絡(luò)上的節(jié)點。相比之下,View 函數(shù)調(diào)用使用分布式賬本的節(jié)點本地副本在單個節(jié)點上執(zhí)行。以太坊主網(wǎng)是使用最廣泛的公共以太坊網(wǎng)絡(luò),它使用工作量證明 (PoW) [10]、[12] 共識算法。以太坊 2 將于 2020 年逐步上線,將使用權(quán)益證明 (PoS) [13] 共識算法。以太坊也部署在許可的聯(lián)盟網(wǎng)絡(luò)中 [4]。在這些部署中,使用了權(quán)威證明 (PoA) 共識算法,例如伊斯坦布爾故障拜占庭容錯 (IBFT) [14] 和伊斯坦布爾故障拜占庭容錯版本 2 (IBFT2) [15]。
B. Atomic Crosschain Transactions
原子跨鏈交易
Atomic Crosschain Transaction technology [1], [2] has been designed to shield application developers from the complexity of crosschain transactions by incorporating the required changes into the Ethereum Client software. The technology has been implemented in a fork of Hyperledger Besu [16],and is available on github.com [17].
原子交叉鏈交易技術(shù) [1]、[2] 旨在通過將所需的更改合并到以太坊客戶端軟件中,使應(yīng)用程序開發(fā)人員免受交叉鏈交易的復(fù)雜性影響。該技術(shù)已在 Hyperledger Besu [16] 的一個分支中實現(xiàn),并可在 github.com [17] 上獲得。
1). Nested Transactions: Atomic Crosschain Transactions are nested Ethereum transactions and views. Figure 1 shows an Externally Owned Account (EOA) calling a function funcA in contract ConA on blockchain Private Blockchain A. This function in turn calls function funcB, that in turn calls
functions funcC and funcD, each on separate blockchains. The transaction submitted by the EOA is called the Originating Transaction. The transactions that the Originating Transaction causes to be submitted are called Subordinate Transactions. Subordinate Views may also be triggered. In Figure 1, a Subordinate View is used to call funcC. This function returns a value to funcB. The EOA user constructs the nested transaction by first creating the signed Subordinate View for Private Blockchain C and the signed Subordinate Transaction for Private Blockchain D. They then create the signed Subordinate Transaction for Private Blockchain B, encapsulating the signed Subordinate Transaction and View. Finally, they sign the Originating Transaction for Private Blockchain A, including the signed Subordinate Transactions and View.
嵌套交易:原子跨鏈交易是嵌套的以太坊交易和視圖。圖 1 顯示了一個外部賬戶(EOA)調(diào)用區(qū)塊鏈私有區(qū)塊鏈 A 上的合約 ConA 中的函數(shù) funcA。該函數(shù)依次調(diào)用函數(shù) funcB,后者又調(diào)用
函數(shù) funcC 和 funcD,每個都在不同的區(qū)塊鏈上。 EOA 提交的交易稱為發(fā)起交易。原始事務(wù)導(dǎo)致提交的事務(wù)稱為從屬事務(wù)。也可以觸發(fā)從屬視圖。在圖 1 中,一個子視圖用于調(diào)用 funcC。此函數(shù)向 funcB 返回一個值。 EOA 用戶通過首先為私有創(chuàng)建簽名的從屬視圖來構(gòu)建嵌套事務(wù)
2). Per-Node Transaction Processing: When the EOA submits the Originating Transaction to a node, the node processes the transaction using the algorithm shown in Listing 1. If the transaction includes any Subordinate Views, they are dispatched and their results are cached (Lines 1 to 3). The function is then executed (Lines 4 to 17). If a Subordinate Transaction function call is encountered, the node checks that
the parameter values passed to the Subordinate Transaction function call match the parameter values in the signed Subordinate Transaction (Lines 6 to 8). If a Subordinate View function call is encountered, the node checks that the parameters passed to the Subordinate View function call match the parameter
values in the signed Subordinate View (Lines 9 and 10). The cached values of the results of the Subordinate View function calls are then returned to the executing code (Line 11). If the execution has completed without error, then each of the signed Subordinate Transactions is submitted to a node on the
appropriate blockchain (Nodes 18 to 20).
每節(jié)點事務(wù)處理:當(dāng) EOA 向節(jié)點提交發(fā)起事務(wù)時,該節(jié)點使用清單 1 中所示的算法處理事務(wù)。如果事務(wù)包括任何從屬視圖,它們將被分派并緩存它們的結(jié)果(第 1 行到3)。然后執(zhí)行該函數(shù)(第 4 到 17 行)。如果遇到從屬事務(wù)函數(shù)調(diào)用,節(jié)點會檢查
傳遞給從屬事務(wù)函數(shù)調(diào)用的參數(shù)值與已簽名的從屬事務(wù)(第 6 行到第 8 行)中的參數(shù)值匹配。如果遇到從屬視圖函數(shù)調(diào)用,節(jié)點會檢查傳遞給從屬視圖函數(shù)調(diào)用的參數(shù)是否與參數(shù)匹配
帶符號的從屬視圖中的值(第 9 行和第 10 行)。子視圖函數(shù)調(diào)用結(jié)果的緩存值然后返回到執(zhí)行代碼(第 11 行)。如果執(zhí)行已完成且沒有錯誤,則將每個已簽名的從屬事務(wù)提交給節(jié)點上的一個節(jié)點。
適當(dāng)?shù)膮^(qū)塊鏈(節(jié)點 18 到 20)。
3). Blockchain Signing and Threshold Signatures: BLS Threshold Signatures [6], [7] combines the ideas of threshold cryptography [18] with Boneh-Lynn-Shacham(BLS) signatures [5], and uses a Pedersen commitment scheme [19] to ensure verififiable secret sharing. The scheme allows any M validator nodes of the total N validator nodes on a blockchain to sign messages in a distributed way such that the private
key shares do not need to be assembled to create a signature. Each validator node creates a signature share by signing the message using their private key share. Any M of the total N signature shares can be combined to create a valid signature. Importantly, the signature contains no information about which
nodes signed, or what the threshold number of signatures (M)needed to create the signature is.
The Atomic Crosschain Transaction system uses BLS Threshold Signatures to prove that information came from a specifific blockchain. For example, in Figure 1, nodes on Private Blockchain B can be certain of results returned by a node on Private Blockchain C for the function call to funcC, as the results are threshold signed by the validator nodes on Private Blockchain C. Similarly, validator nodes on Private Blockchain A can be certain that validator nodes on Private Blockchain B have mined the Subordinate Transaction, locked contract ConB and are holding the updated state as a provisional update
because validator nodes sign a Subordinate Transaction Ready message indicating that the Subordinate Transaction is ready to be committed.
區(qū)塊鏈簽名和閾值簽名:BLS閾值簽名[6]、[7]結(jié)合了閾值密碼學(xué)[18]和Boneh-Lynn-Shacham(BLS)簽名[5]的思想,并使用了Pedersen承諾方案[19]以確保可驗證的秘密共享。該方案允許區(qū)塊鏈上總共 N 個驗證者節(jié)點中的任何 M 個驗證者節(jié)點以分布式方式簽署消息,使得私有
不需要組合密鑰共享來創(chuàng)建簽名。每個驗證器節(jié)點通過使用其私鑰共享對消息進行簽名來創(chuàng)建簽名共享。可以組合總共 N 個簽名份額中的任何 M 個以創(chuàng)建有效簽名。重要的是,簽名不包含關(guān)于哪個
節(jié)點簽名,或創(chuàng)建簽名所需的簽名閾值 (M) 數(shù)是多少。
原子跨鏈交易系統(tǒng)使用 BLS 閾值簽名來證明信息來自特定的區(qū)塊鏈。例如,在圖 1 中,私有區(qū)塊鏈 B 上的節(jié)點可以確定私有區(qū)塊鏈 C 上的節(jié)點為函數(shù)調(diào)用 funcC 返回的結(jié)果,因為結(jié)果是由私有區(qū)塊鏈 C 上的驗證器節(jié)點簽名的閾值。類似地,驗證器私有區(qū)塊鏈 A 上的節(jié)點可以確定私有區(qū)塊鏈 B 上的驗證者節(jié)點已經(jīng)挖掘了從屬交易,鎖定了合約 ConB 并持有更新的狀態(tài)作為臨時更新
因為驗證器節(jié)點簽署了一個從屬事務(wù)就緒消息,表明該從屬事務(wù)已準(zhǔn)備好提交。
4). Multichain Nodes: A Multichain Node is a logical grouping of one or more blockchain validator nodes, where each node is on a different blockchain. The blockchain nodes operate together to allow Crosschain Transactions. The Multichain Node on which the transaction is submitted must have Validator Nodes on all of the blockchains on which the Originating Transaction and Subordinate Transactions and Views take place. Figure 2 shows four enterprises that have validator nodes on Private Blockchain A to Private Blockchain D. An Enterprise 1 EOA can submit Atomic Crosschain Transactions that span
Private Blockchain A to Private Blockchain D as Enterprise 1 has a Multichain Node that
includes validator nodes on each blockchain. However, an Enterprise 4 EOA can only submit Atomic Crosschain Transactions that span Private Blockchain B and Private Blockchain C as Enterprise 4 only has validator nodes on Private Blockchain B and Private Blockchain C.
多鏈節(jié)點:多鏈節(jié)點是一個或多個區(qū)塊鏈驗證器節(jié)點的邏輯分組,其中每個節(jié)點位于不同的區(qū)塊鏈上。區(qū)塊鏈節(jié)點一起運行以允許跨鏈交易。提交交易的多鏈節(jié)點必須在所有發(fā)生原始交易和從屬交易和視圖的區(qū)塊鏈上都有驗證器節(jié)點。圖 2 顯示了在私有區(qū)塊鏈 A 到私有區(qū)塊鏈 D 上擁有驗證器節(jié)點的四家企業(yè)。 企業(yè) 1 EOA 可以提交跨越的原子跨鏈交易
私有區(qū)塊鏈 A 到私有區(qū)塊鏈 D 作為企業(yè) 1 有一個多鏈節(jié)點
包括每個區(qū)塊鏈上的驗證器節(jié)點。但是,企業(yè) 4 EOA 只能提交跨越私有區(qū)塊鏈 B 和私有區(qū)塊鏈 C 的原子跨鏈交易,因為企業(yè) 4 只有私有區(qū)塊鏈 B 和私有區(qū)塊鏈 C 上的驗證器節(jié)點。
5). Crosschain Coordination: Crosschain Coordination
Contracts exist on Coordination Blockchains. They allow validator nodes to determine whether the provisional state updates related to the Originating Transaction and Subordinate Transactions should be committed or discarded. The contract is also used to determine a common time-out for all blockchains, and as a repository of Blockchain Public Keys. When a user creates a Crosschain Transaction, they specify the Coordination Blockchain and Crosschain Coordination Contract to be used for the transaction, and the time-out for the transaction in terms of a block number on the Coordination Blockchain. The validator node that they submit the Originating Transaction to (the Originating Node) works with other validator nodes on the blockchain to sign a Crosschain Transaction Start message. This message is submitted to the Crosschain Coordination Contract to indicate to all nodes on all blockchains that the Crosschain Transaction has commenced. When the Originating Node has received Subordinate Transaction Ready messages for all Subordinate Transactions, it works with other validator nodes to create a Crosschain Trans action Commit message. This message is submitted to the Crosschain Coordination Contract to indicate to all nodes on all blockchains that the Crosschain Transaction has completed and all provisional updates should be committed. If an error is detected, then a Crosschain Transaction Ignore message is created and submitted to the Crosschain Coordination Contract to indicate to all nodes on all blockchains that the Crosschain Transaction has failed and all provisional updates should be discarded. Similarly, if the transaction times-out, all provisional updates will be discarded.
跨鏈協(xié)調(diào):跨鏈協(xié)調(diào)
合約存在于協(xié)調(diào)區(qū)塊鏈上。它們允許驗證器節(jié)點確定是否應(yīng)該提交或丟棄與原始交易和從屬交易相關(guān)的臨時狀態(tài)更新。該合約還用于確定所有區(qū)塊鏈的共同超時,并作為區(qū)塊鏈公鑰的存儲庫。當(dāng)用戶創(chuàng)建跨鏈交易時,他們指定要用于交易的協(xié)調(diào)區(qū)塊鏈和跨鏈協(xié)調(diào)合約,以及根據(jù)協(xié)調(diào)區(qū)塊鏈上的塊號的交易超時。他們提交原始交易的驗證器節(jié)點(原始節(jié)點)與之合作區(qū)塊鏈上的其他驗證器節(jié)點簽署跨鏈交易開始消息。該消息被提交到跨鏈協(xié)調(diào)合約,以向所有區(qū)塊鏈上的所有節(jié)點表明跨鏈交易已經(jīng)開始。當(dāng)始發(fā)節(jié)點收到從屬傳輸所有從屬交易的 action Ready 消息,它與其他驗證器節(jié)點一起創(chuàng)建一個 Crosschain Trans action Commit 消息。這條消息被提交到跨鏈協(xié)調(diào)合約,以向所有區(qū)塊鏈上的所有節(jié)點表明跨鏈交易已經(jīng)完成并且應(yīng)該提交所有臨時更新。如果檢測到錯誤,則創(chuàng)建跨鏈?zhǔn)聞?wù)忽略消息并將其提交給跨鏈協(xié)調(diào)合約,以向所有區(qū)塊鏈上的所有節(jié)點表明跨鏈?zhǔn)聞?wù)已失敗,所有臨時更新都應(yīng)丟棄。同樣,如果事務(wù)超時,所有臨時更新將被丟棄。
6). Contract Locking and Provisional State Updates: When a contract is first deployed it is marked as a Lockable Contract or a Nonlockable Contract. A Nonlockable Contract, the default, is one which can not be locked. When a node attempts to update the state of a contract given an Originating or Subordinate Transaction, it checks whether the contract is Lockable and whether it is locked. The transaction fails if the contract is Nonlockable or if the contract is Lockable but is locked. The act of mining an Originating Transaction or Subordinate Transaction and including it in a blockchain locks a contract.
The contract can be unlocked when the Crosschain Coordination Contract is in the Committed or Ignored state, or when the block number on the Coordination Blockchain is greater than the Transaction Timeout Block Number. The Crosschain Coordination Contract will change from the Started state to the Committed state when a Crosschain Transaction Commit message is submitted to it, and it will change to the Ignored state when a Crosschain Transaction Ignore message is submitted to it. When the Crosschain Coordination Contract indicates that the crosschain transaction has completed, or when the transaction has timed-out, Signalling Transactions are submitted on all blockchains that have locked contracts. The act of mining the Signalling Transaction unlocks all locked contracts. Originating Transactions, Subordinate Transactions, and Subordinate Views contain additional fifields over and above those used in traditional Ethereum transactions [1]. The additional fifields provide cross blockchain context and security
合約鎖定和臨時狀態(tài)更新:當(dāng)合約首次部署時,它被標(biāo)記為可鎖定合約或不可鎖定合約。不可鎖定合約,默認(rèn)情況下,是一個不能被鎖定的合約。當(dāng)節(jié)點嘗試更新給定原始交易或從屬交易的合約狀態(tài)時,它會檢查合約是否可鎖定以及是否已鎖定。如果交易失敗
合同是不可鎖定的,或者合同是可鎖定的但被鎖定。挖掘原始交易或從屬交易并將其包含在區(qū)塊鏈中的行為會鎖定合同。
當(dāng)跨鏈協(xié)調(diào)合約處于 Committed 或 Ignored 狀態(tài),或者協(xié)調(diào)區(qū)塊鏈上的區(qū)塊數(shù)大于交易超時區(qū)塊數(shù)時,可以解鎖合約。跨鏈協(xié)調(diào)合約將從 Started 狀態(tài)變?yōu)?br /> 向其提交跨鏈?zhǔn)聞?wù)提交消息時的 Committed 狀態(tài),當(dāng)向其提交 Crosschain Transaction Ignore 消息時,它將更改為 Ignored 狀態(tài)。
當(dāng)跨鏈協(xié)調(diào)合約指示跨鏈交易已完成或交易超時時,在所有已鎖定合約的區(qū)塊鏈上提交信令交易。挖掘信號交易的行為解鎖所有鎖定的合約。
原始交易、從屬交易和從屬視圖包含額外的字段用于傳統(tǒng)以太坊交易的那些 [1]。額外的 fifield 提供跨區(qū)塊鏈上下文和安全性
III. SCENARIOS
A. Hotel and Train
RouterContract 可以做到并發(fā)
總結(jié)
以上是生活随笔為你收集整理的《Performance Overhead of Atomic Crosschain Transactions》的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 跨链(2)跨链技术“分布式私钥控制”
- 下一篇: 互链网-未来世界的连接方式 (1)央行数