当前位置:主页 > 贷款 > 正文

INT对圣杯的追寻:互操作性—区块链的圣杯

来源:未知作者:欢2018-07-16 09:29:32

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.

互操作性是计算机系统或网络的特性,目的是在独立外部体系或网络中,达到信息的相互影响,交换和利用

QQ图片20180716092910.png

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.

QQ图片20180716092914.png

由于需求的上升,随着区块链差异化达到成熟,近些年互操作性得到了更多关注。例如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 un

QQ图片20180716092916.png

便携式资产—一对一最低信任支持。基本上这个是用于从一条链上转移数字资产到另一条链上,同时也具有把数字资产转回原来那条链的能力。在区块链之间拥有双向引导作用。这将以政府发行的加密货币的形式出现,而该货币可以作为一个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]¹. Because this data is cryptographically secured and self verifying, this removes the need for trusted entities.

中继技术

尽管操作起来十分困难,中继仍然是一个更直接与宽泛的方法去提高互操作性,通过赋予链本身权力去解决依赖信任的第三方验证外部信息的需要。在独立链中,需要单独验证包含重要的使用交易信息的区块头。†这有效地**验证该区块内默克尔树的所有分支,而无需为了验证,下载整个区块链 [图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.互操作性项目表 ²

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

注释

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

这个默克尔图从Hackernoon上的这篇文章中引用:

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

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

这张表格来自VitalikButerin为R3研究所做的标题为链的互操作性的论文,于以及本文的大部分受到这篇论文的启发。


[责任编辑:admin]