當前位置:
首頁 > 最新 > INT的追尋:互操作性—區塊鏈的聖杯

INT的追尋:互操作性—區塊鏈的聖杯

Interoperability?—?The Holy Grail of Blockchain

INT』s Quest for the Cup

互操作性—區塊鏈的聖杯

INT對聖杯的追尋

作者簡介:Nicolas Ramsrud,美國波音公司工業工程師,筆名「Graytrain」,是區塊鏈和加密貨幣的忠實擁護者。他致力於將複雜的區塊鏈技術簡單化,以便大眾更好地學習和理解。他對區塊鏈技術深入淺出的解讀,使得他的文章在海外備受好評,且擁有眾多粉絲。

Interoperability is the characteristic of a computer system or network, to interact, exchange and make use of information with an independent, outside system or network.

互操作性是計算機系統或網路的特性,目的是在獨立外部體系或網路中,達到信息的相互影響,交換和利用

For the majority of it』s existence, Bitcoin was thought to be the roots from which everything would be based, the trust layer of the internet, and that all other needed functionality would be built upon it, hundreds of blockchains processing millions of transactions, as layers, all secured by Bitcoin. What has instead happened is an explosion of diversity in the blockchain ecosystem with many projects based on many differing cryptographic structures offering a variety of solutions on their own independent blockchains. Many of these projects come and solve one problem really well but none of them will be able to solve EVERYTHING well enough to be useful. This slow realization has caused the demise of the age of Bitcoin maximalism. The idea of the single chain trust basis of the Internet is dead. The future is full of many chains existing, side by side, and the kings will be the ones that bring the many blockchains, living in isolation, together in interoperable harmony.

對於大多數,比特幣被認為根源於萬物基礎的網路信任層,而其他所有必要的功能都在該基礎上建立。就像層一樣,數百區塊鏈處理百萬交易,都由比特幣擔保。相反發生的是區塊鏈生態系統的多樣性爆發,許多項目基於許多不同的加密結構,在他們自己的獨立區塊鏈上提供各種解決方案。這些項目很多在解決一個問題上做的很好,但是沒有一個擁有較好處理所有問題的水平,往往水平不夠導致缺乏實際運用價值。這種緩慢認識導致了比特幣極繁主義時期的衰退。互聯網的單鏈信任的想法已經消失。在未來將同時存在很多鏈,而這些鏈中的王者必須能確保眾多區塊鏈,獨立存在,和諧互通。

Currently, if we want to move value from one chain to another, we need to use centralized exchanges which are costly, slow and add substantial risk. If you want a transaction to only be processed based on data or transaction finality from another chain, you must manage that process your self. This lack of interoperation is stagnating the progress of the applicability of blockchain and therefore, mass adoption.

當前如果我們想要把一條鏈上的價值轉移到另一條上,我們需要使用中心化的交換,而這往往昂貴,速度慢,同時承擔著巨大的風險。如果你僅僅是想要數據處理上的交易或者從另一條鏈上終結交易,你必須親自管理過程。缺乏互操作性使區塊鏈的適用性停滯不前,因此需要大規模採用。

Because of this rising need, interoperability has been getting more attention in the past few years as blockchain diversity reaches maturity. Networks like Ark and BTCRelay are working to bridge the gap between blockchains, allowing actions in one, to cause effect in an another. Interledger is working to create a seamless payment network regardless of specific cryptocurrency. Polkadot and Cosmos are creating a more generalized framework to become the metachains in an 「Internet of blockchains」 approach. Internet Node Token on the other hand is looking to use this same idea in a much more application specific way in the area of IoT by creating a network of subchains dedicated to certain IoT device types, data types and needed blockchain mechanics, thereby creating a network of interoperable blockchains dedicated to the Internet of Things.

由於需求的上升,隨著區塊鏈差異化達到成熟,近些年互操作性得到了更多關注。例如Ark和BTCRelay等網路正在努力縮小區塊鏈間的距離,即在一個區塊鏈上操作,可以影響到另一個區塊鏈。Interledger在開發能夠包容任何一種特殊加密貨幣的無縫支付網路。Polkadot和Cosmos在建立一種更廣泛體系,想要成為「區塊鏈互聯網」中的元鏈。另一方面Internet Node Token(INT)將相同思路應用在應用程序更加具體的物聯網領域,通過創造子鏈網路,應用在具體的物聯網設備、數據類型以及區塊鏈機制上,從而創造出物聯網領域互聯的區塊鏈網路。

No matter the intended application, cross-chain interoperability is the key to mass adoption and those that can execute it well will become the leaders in blockchain.

不論設計的應用程序或者跨鏈互聯性是廣泛推行的關鍵,只要能夠很好地執行下去就能成為區塊鏈的領導者。

Possible applications

可行的應用

The myriad of possible applications for cross-chain interoperability can be bucketed into five categories.

無數個跨鏈互聯的可行的應用程序可以分成五類。

Portable assets?—?Trust-minimized 1-for-1 backing. Essentially this is transferring a digital asset from one chain to another with the ability to transfer it back to it』s home chain. A two way channel between blockchains. This could be in the form of a government issued cryptocurrency that could be transferred into Ethereum as an e-USD token, traded, used and then transferred back onto the government chain. This requires the locking of the assets on the 「home」 chain which, then, is only releasable by re-locking the assets on the secondary chain which the initial transfer unlocked.

攜帶型資產—一對一最低信任支持。基本上這個是用於從一條鏈上轉移數字資產到另一條鏈上,同時也具有把數字資產轉回原來那條鏈的能力。在區塊鏈之間擁有雙向引導作用。這將以政府發行的加密貨幣的形式出現,而該貨幣可以作為一個e-UDSD代幣轉入以太坊,進行交易,使用,然後再轉移回到政府鏈中。這種形式要求在「原始」鏈上鎖定資產,然後只能通過再次鎖定最初轉移到第二條鏈上的資產解鎖。

Transfer-for-transfer —Trust-minimized trading. Also known as 「atomic swap」, where user A transfers their asset on chain 1 to user B and user B transfers their asset on chain 2 to user A in such a way that guarantees that either both transactions take place or that neither does.

雙方轉移—最小信任交易,也就是眾所周知的「原子互換」。用戶A在鏈1上將他的資產轉移給用戶B,而用戶B在鏈2上將它的資產轉移給用戶A。通過這種方式,保證了要麼兩處交易都進行了,要麼都沒有。

Cross-chain oracles?—?one-way information reading causing action. Simply put, this is an entity or the chain itself having the ability to prove or read that something is true or that some action has taken place in another chain or network. A smart contract in a chain might have a condition that requires a proof of transaction in an outside chain in order for it to be finalized.

跨鏈預言—單方面信息閱讀導致了這種行為。簡單說,就是一個實體或者鏈本身有能力去證明或讀取某事情或發生在另一個鏈或網路中的某些行為的真實性。在鏈上的智能合約可能為了使其完成,從而在有條件的基礎下要求在外鏈的交易證明。

Asset locking?—?trust-minimized escrow. This may be used to lease assets or data upon payment for a given time period. An IoT device may be leased to an entity that wants full use of it』s capabilities for a short period of time, paying for use by the minute. Once that time is up, the contract would release ownership of that asset back to the primary owner.

資產上鎖—信任最小化的第三方。這可能會被應用於既定時間內的資產或數據的租賃。IoT設備可能被一方租借,而借方想要在短時間內使用設備全部功能,支付費用以使用的分鐘計數。一旦時間結束,合約資產的所有權歸還給原主。。

General cross-chain contracts?—?multi-chain dependent smart contracts. This is a large category of applications from atomic swaps that rely on two or more chains to many-chain dependent smart contracts that use a web of data to trigger action. This type of contract would be the application basis layer of the IoT functional network. A smart home would be making decisions and causing actions based on many different IoT s on many different chains. Your car might have it』s own wallet that uses information from the traffic data on a traffic network, time of day, miles per gallon consumption rate and number of people in your car as input to a smart contract that automatically calculates and pays a road tax given those variables.

普遍的跨鏈合約—依賴於智能合約的多鏈。這是個原子互換中有關應用程序的大範疇,依賴於兩個或者兩個以上的鏈到多鏈依賴的智能合約,這些合約使用數據網來觸發行動。這種類型的合約將會成為IoT功能網路中的應用基礎層。一座智能房子做出決定和產生行為的基礎在於各種不同的鏈上的眾多物聯網。你的汽車可能有它自己的錢包,它可以在交通網路上的交通數據里得到信息,當天路程中每加侖汽油消耗速率,在你汽車中的人數,都被計入智能合約,通過提供變化的數據來自動化計算並支付路稅。

Implementation Strategies

There are several strategies that can be taken in order to enable such cross-chain operation, with each one having differing abilities with varying trade-offs.

戰略實行

為了確保跨鏈操作的運行,有數個戰略計劃可以採用,其中每一個都具有不同的權衡能力。

Notaries

The simplest way to facilitate most cross-chain operations is through the use of a notary. In this system, a trusted entity or group is used in order to claim that a given event on a subchain* has taken place or that some claim is true. These may be actively listening and automatically acting based on events on a given chain or passive, issuing signed messages only when prompted.

公證人

促進大多數跨鏈操作的最簡單方法是通過公證人的使用。在這個體系中,讓一個可信任的實體或社區去對子鏈上發生的規定項目提出要求,或者要求其他真實事件。這些將在規定的鏈或被動狀態上的時間的基礎下,進行活躍的監聽和自動化操作,在被提示情況下發布已經審核過的信息。

These can be in the form of multisig wallets or contracts that are released by the notary』s signed message of verification of conditions.The most advanced effort in this space is the Interledger project developed by Ripple. This system can be used to facilitate the exchange of payments between ledgers without the need of exchanges and bank intermediaries (any cryptocurrency or currency backed by a bank -> your bank or currency of choice).

The drawbacks to this system is the requirement for active participation from a trusted and centralized entity.

這可以是以多重簽名的錢包形式,或者是由公證人簽署的條款驗證信息簽署的合同。在這方面上有最先進成就的是Ripple發展的Interledger跨賬本協議。這個協議可以促進總賬之間的付款交換,而不需要與銀行中介進行結算(任何由銀行支持的貨幣或虛擬貨幣->你的銀行或貨幣選擇)此系統的缺點是來自信任的、中心化的實體的活躍參與的需求。

Hash Locking

Relatively simple and limited in their capability, this is one method for achieving atomic swaps. It does this by having both users locking their funds in a smart contract that only releases after the first user provides the key which unlocks both.

哈希鎖定

對於實現原子互換來說,這的確是一種能夠保持在其能力範圍之內並相對簡單的方法。這是通過在智能合約中讓使用雙方將其資產鎖定來實現的。該智能合約僅在首個用戶提供解鎖兩者的密鑰後才生效。

More specifically:

User A locks his asset in a smart contract using a key that User B doesn』t know. Once User B sees User A』s asset locked, they lock their asset to exchange into the contract. User A then reveals the secret key that allows A to claim B』s asset and B to claim A』s asset. Now if User A doesn』t reveal the key in X seconds, the assets are released back to the Users.

具體來說:

用戶A在智能合約中使用密鑰將其資產鎖定,然而用戶B並不知情。。一旦用戶B發現用戶A已將其資產鎖定,雙方就會把資產鎖定入合約中來進行交換。然後用戶A公布了密鑰,此密鑰允許用戶A認領B的資產同時用戶B可認領A的資產。假設用戶A在規定的時間內沒有開放密鑰,那麼資產就會返還給用戶。

This system is what is used by the Lightning Network where a Hashed Time-lock Contract is created between two users allowing bidirectional payments that are not finalized (therefore no network/transaction fees are paid) until the secret key has been released, symbolizing agreement for the payments made.

該系統應用於閃電網路,哈希時間鎖定合約在兩個用戶之間生成,允許此雙向付款保持在未成交的狀態(因此沒有任何網路或交易費用)直至密鑰解禁,象徵著付款協議達成。

They can also be used as a 「bounty claim ticket」 posted on the blockchain that as soon as some transaction takes place with a certain known (preimaged) hash, the contract would release reward, i.e., 「the first to provide this specific data to this address will get 5 Ether.」 In this scenario, you would have to know what it is you want before you set up the contract so you know what hash you are looking for.

該系統還可以用作區塊鏈上發布的「懸賞告示」,一旦某個具備已知哈希值(原像)的交易發生,即可通過合約獲得獎勵。即「第一個提供此地址的具體數據就能獲得5個以太幣。在這種情況下,你必須在設置合同之前知道你到底想要什麼,以便你知道要尋找的是什麼哈希。

These can be written as an application in a network of sufficiently interoperable blockchains, where the smart contract or more appropriate, daemon has contract components on chain A, chain B, etc., and listens for certain preimaged hashes from these chains, therefore triggering events. These can be run on the relay chain much like the salary work reporting mechanism in INT, which upon the reporting of data (on chain A), payment is made (on chain B), where the daemon has control of an address on chain B and authority to sign transactions.

這些可以作為應用程序編寫在具有足夠互操作性的區塊鏈網路中,其中的智能合約,更為合適來說是守護進程,在鏈A鏈和B或者更多的鏈上具備合約的組成部分,同時,從這些鏈中偵聽某些特定預先形成的哈希值,從而觸發事件。這些可以在中繼鏈上運行,更像是INT中的工資報告機制,在數據報告上(在鏈A上),進行支付(在鏈B上),守護進程式控制制著鏈B的地址和簽署交易的權力。

Because hash locks are cryptographically based and open source, they can be run by anyone and does not need to be trusted.

因為哈希鎖是開源加密的,所以能被任何人使用並無需被信任。

Relays

Significantly more difficult to implement, relays are a more direct and wide ranging method of facilitating interoperability that solves the need to rely on trusted third parties to verify outside information by giving the chains themselves the power to do so. In independent chains, this requires independently verifying the block header which contains the transaction important to it』suse.? This effectively** verifies all branches of the Merkle tree within that block without the need to download the entire blockchain for verification [Fig. 1]1. Because this data is cryptographically secured and self verifying, this removes the need for trusted entities.

中繼技術

儘管操作起來十分困難,中繼仍然是一個更直接與寬泛的方法去提高互操作性,通過賦予鏈本身權力去解決依賴信任的第三方驗證外部信息的需要。在獨立鏈中,需要單獨驗證包含重要的使用交易信息的區塊頭。?這有效地**驗證該區塊內默克爾樹的所有分支,而無需為了驗證,下載整個區塊鏈 [圖1]1。 因為此數據具有加密安全性和可以自我驗證,這就不在需要信任的第三方實體。

Fig. 1 The entire dataset doesn』t need to be downloaded to verify the integrity of Transaction 5.

圖1.無需下載整個數據集來驗證交易5的完整性

The drawbacks of this system are that the time between transactions is directly dependent on the block time associated with each chain with the 「worst possible」 scenario time-to-verify for the cross-chain transaction as

2T?+T?

此系統的缺點是交易與交易之間的時間直接依賴於與每條鏈相關聯的區塊時間,而在「最糟糕的可能」情景下,跨鏈交易的驗證時間為2T?+T?

Where T?is the block time for chain A and T? is the block time for chain B (「b」 is not an available subscript, I know…). You can see that transaction verification time quickly balloons in 「long」 block time based chains.

T? 是鏈A的區塊時間,T?是鏈B的區塊時間(「b」不是可用的下標,我知道…)你可以看到交易驗證時間在基於「長」區塊時間的鏈上激增。

In networks that are inherently self-contained, the relevant information and how to read it from the secondary chain would have to be inputted by the user unless there was some sort of established API dictionary for interacting with the network.

In general, these steps for verifying the validity of a subchain state can be standardized into smart contracts to be called by anyone for widespread use. This can itself become a blockchain of smart contracts that can be called to verify events on other chains, basically making it a state chain of unconsumed events as the UTXOs of this blockchain.

在本質上是獨立的網路中,相關信息以及如何從次級鏈讀取它必須由用戶輸入,除非已經建立了某種可與網路進行交互的API字典。

通常情況下,用於驗證子鏈狀態有效性的這些步驟可以被標準化為智能合約,這些智能合約可以供任何人廣泛使用。這本身就可以成為智能合約的一個區塊鏈,藉此來驗證其他鏈上的事件,基本上將其作為該區塊鏈上的UTXO的未完成事件的狀態鏈。

In summary, the three implementation types solve a variety of problems with varying trade offs. Each have their place whether it is in centralized payment processing, simplified and decentralized asset exchange or multi-chain dependent smart contracts.

總結來說,這三種執行類型具備不同的權衡能力解決很多問題。不論是在集中支付處理,簡化、去中心化的資產兌換,還是多鏈基礎上的合約,都佔有一席之地。

Fig. 2 Interoperability Type Table 2

圖2.互操作性項目表 2

INT』s Quest for the Cup

INT對於聖杯的追尋

There is perhaps no other application more in need of holistic interoperability than in the field of IoT. In order for the Internet of Things to truly work as envisioned, everything needs to communicate with everything, decisions need to be made with many contributors and data needs to be widely shared. This ecosystem will need to be a collection of many chain types to accommodate the many needs; data chains, value transfer chains, identity chains, asset ownership chains, privacy-centric chains.

也許沒有任何一個應用領域比物聯網更需要整體的互操作性。為了使IoT真正按照設想工作,物物相聯,決定需要由眾多因素來達成,同時數據需要廣泛共享。這個生態系統需要成為許多鏈類型的集合體,來滿足許多需求;數據鏈,價值轉移鏈,身份鏈,資產所有權鏈,隱私中心鏈。

This is where the real beauty of the INT framework lies. By separating the transaction validation from block formation and constructing one central block chain (the Thearchy chain) of blocks for each subchain, interoperating between subchains becomes greatly simplified [Fig. 2]. There is no out of network interaction that has to take place, no independent transaction confirmation and verification that needs to occur, no trusted entities that need to sign off that an action has taken place. It is all on one chain, available to every subchain in the network.

這就是INT框架真正的美麗之處。通過把交易驗證從區塊構成中分離,構建擁有對應每個子鏈的區塊的中央區塊鏈(眾神鏈),子鏈之間的互操作得以極大簡化[圖2]。不存在必須發生的網路外交互,不需要進行獨立交易確認和驗證,也不需要簽署已發生行為的可信實體。它全部在一條鏈上,可供網路中的每個子鏈使用。

Fig. 2 INT Chain Network Diagram. With the validator/block generator nodes (Supernodes) outside the subchain and hashing all subchain data into one blockchain, cross-chain transactions and smart contracts become greatly simplified.

圖2.INT鏈網路圖。利用子鏈外的驗證器/區塊生成器節點(超級節點)並將所有子鏈數據散列到一個區塊鏈中,跨鏈交易和智能合約變得極為簡化。

Each supernode will maintain a table of subchains, the datasets present on that chain, and how to interact with them. This will make the process automated and trustless. The blockchain and node structure itself becomes the relay mechanism making all interoperation between subchains part of it』s core functionality.

每個超級節點將維護一個子鏈表,數據集展示在該鏈上,那麼他們如何交互呢。這將使該過程自動化且無需信任。區塊鏈和節點結構本身成為中繼機制,這使子鏈間的所有互操作成為其核心功能的一部分。

This relay/node structure opens up a world of possibility only limited by the ability to create a subchain to support it. Subchain smart contracts could easily access data or transactions from any other subchain, they can use data or files from the IPFS DAG operating above the network, they could even use some form of Zero Knowledge Proofs (like zkSNARKs) to hide the sender, receiver, data or action that satisfies the smart contract without the whole network needing the ablity to support ZK proofs.

這種中繼/節點結構為創造子鏈提供了極大的可能,給予本身支持。子鏈智能合約可以輕鬆訪問來自任何其他子鏈的數據或交易,它們可以使用來自網路上運行的IPFS DAG的數據或文件,他們甚至可以使用某種形式的零知識證明(如zkSNARK)來隱藏發送者,接收者,,滿足智能合約的數據或行為,無需整個網路去支持零知識證明。

Operating as a web within the network, INT proposes to not only have the relay chain pass information between subchains but to enable the nodes in the network to collaborate computationally to make more complex usage of the data within it. This cloud computing network would facilitate machine learning algorithms to make intelligent decisions based on realtime data.

作為一種運行在互聯網之上的網路,INT建議不僅讓中繼鏈在子鏈之間傳遞信息,也要讓網路中的節點能夠進行協作計算,以便在其中進行更複雜的數據使用。該雲計算網路將促進機器學習演算法,基於實時數據做出智能決策。

As I said at the beginning, the future is going to be full of many chains existing, side by side, and the kings will be the ones that bring the many blockchains together in interoperable harmony. Ultimately, this multi-chain framework is the best suited for solving this problem in the space today. The leading projects in metachains (Polkadot, Cosmos), supply chain (Waltonchain) and IoT (INT, IoTeX) are working to take this theoretical framework into real world application.

正如我在開始時所說的那樣,未來將充滿大量鏈的並存,而其中的王者將把許多區塊鏈以互操作的和諧一起存在將多個區塊鏈以可互操作的方式融合在一起。最終,在充滿無限可能的當下,多鏈架構是最合適的解決此問題的方案。元鏈(Polkadot,Cosmos),供應鏈(Waltonchain)和IoT(INT,IoTeX)的領軍項目正在努力將這一理論框架併入現實世界的應用。

*A technical side note: INT and other projects use the term 「subchain」 or 「sidechain」 when referencing these cross-chain actions. This implies a dependent relationship on a parent chain or external validator. This is not necessarily true and these cross-chain actions can be done between two independent and standalone blockchains (or networks) with the existence of a trusted relay or notary. Subchains or sidechains that depend on an external chain or validator are 「pegged sidechains」 where pegged refers to the direct connection between the two and can read data from the chain it is pegged to.

*技術方面的注釋:INT和其他項目在引用這些跨鏈行為時使用術語「子鏈」或「側鏈」。這暗示著父鏈或外部驗證器上的依賴關係。這不一定是真的,這些交叉鏈行為可以在兩個獨立區塊鏈(或網路)間存在,與此同時存在可信中繼或公證。依賴於外部鏈或驗證器的子鏈或側鏈是「楔入式側鏈」,這裡的楔入式是指兩者之間的直接連接,並且可以從與其掛鉤的鏈中讀取數據。

?In PoW systems, this would be verifying that this header is part of a chain that has a sufficiently greater amount of PoW generated for it than that from any competing chain. In PoS systems, this would be verifying that 2/3 of validators』 signatures have signed the header.

?在PoW系統中,這將驗證此標頭是鏈的一部分,其擁有的PoW量遠大於來自任何競爭鏈。在PoS系統中,這將驗證2/3的驗證者簽名是否已簽署標頭。

**Finality in PoW blockchains is not guaranteed. Transaction roll-back only becomes less probable as they get deeper in the block chain. PoS systems don』t run the risk of having competing chains and therefore transaction finality upon block verification/signing is more of a guarantee.

**PoW區塊鏈的不可改變性無法保證。交易回滾只會隨著區塊鏈的深入發展而變得不太可能。PoS系統不存在具有競爭鏈的風險,因此基於區塊驗證和簽名的交易的不可更改性更具保證。

Annotations

注釋

1 This Merkle Diagram was pulled from this article from Hackernoon:

這個默克爾圖從Hackernoon上的這篇文章中引用:

https://hackernoon.com/merkle-trees-181cb4bc30b4

2 This table was taken from, and much of this article was inspired by VitalikButerin』s paper titled Chain Interoperability for R3 Research

這張表格來自VitalikButerin為R3研究所做的標題為鏈的互操作性的論文,於以及本文的大部分受到這篇論文的啟發。


喜歡這篇文章嗎?立刻分享出去讓更多人知道吧!

本站內容充實豐富,博大精深,小編精選每日熱門資訊,隨時更新,點擊「搶先收到最新資訊」瀏覽吧!


請您繼續閱讀更多來自 漫生活次元 的精彩文章:

TAG:漫生活次元 |