深度剖析区块链跨链技术Cosmos(上&下篇)

本文深入剖析区块链项目Cosmos,重点介绍了其核心技术Tendermint的共识机制、设计理念和工作流程,以及Tendermint如何支持Cosmos实现跨链。Tendermint是一个安全、快速的共识引擎,其ABC接口允许用任何语言编写应用。Cosmos通过IBC协议实现跨链通信,但目前仅完成基本功能,跨链的成熟仍需时日。
摘要由CSDN通过智能技术生成

区块链的公链项目越来越多,每个项目都是一个孤立的网络体系,因此区块链项目之间的互联互通能力也是技术发展的大方向。这其中Cosmos项目是其中的优秀代表。本文作者从Cosmos核心技术Tendermint开始,深度剖析Cosmos项目,让大家对跨链技术将一个比较深入的了解。

 

导读

 

2017 年以来,区块链项目出现了井喷式地上升,然而在喜人增长态势的背后,人们也注意到大部分项目都缺乏与其它区块链项目互连互通的能力而成为孤立的网络体系。因此,跨链技术也逐渐进入了大家的视野,本文将为大家解读一个跨链项目 Cosmos,看看它是如何做到让不同区块链的价值网络实现互通的。通过对该项目的解读,让大家对跨链项目有个初步的了解。同时受限于篇幅,我们会分为上下两篇,上篇带大家先了解 Cosmos 的核心技术 Tendermint,下篇会着重介绍 Cosmos。

 

Tendermint 概述

 

提到区块链,大家想必已然不陌生了,不过更多人想到的可能会是众所周知的 Bitcoin 和 Ethereum。的确,两者分别是区块链技术的起源和发展的代表,也是大家广泛传播和深入研究的对象。但是随着 Bitcoin 的不断推进,比特币工作量证明共识机制在速度和扩展性上的不足也逐步展现出来。

 

Cosmos 的开发团队 Tendermint 其实早在 2014 年就开始意识到了其不足,并持续专注于寻求不依赖挖矿等高电力消耗的共识机制,提供快速的交易处理能力,它们的目标是为全世界所有的区块链提供速度、安全和可扩展性。目前,Tendermint 加入了微软 Azure 区块链即服务平台,也成为了以太坊区块链联盟成员之一,同时 Tendermint 也是跨链技术 Cosmos 的核心技术。两者大致的关系如下:

 

 

图中可以轻松看出 Cosmos 就是在 Tendermint 基础上添加一些插件功能来实现的,上篇暂不对 Cosmos 做过多阐述,先来认识一下 Tendermint。

 

Tendermint 是什么

 

首先让我们来看看官方定义:

 

Tendermint is software for securely and consistently replicating an application on many machines. By securely, we mean that Tendermint works even if up to 1/3 of machines fail in arbitrary ways. By consistently, we mean that every non-faulty machine sees the same transaction log and computes the same state. Secure and consistent replication is a fundamental problem in distributed systems; it plays a critical role in the fault tolerance of a broad range of applications, from currencies, to elections, to infrastructure orchestration, and beyond.

 

Tendermint consists of two chief technical components: a blockchain consensus engine and a generic application interface. The consensus engine, called Tendermint Core, ensures that the same transactions are recorded on every machine in the same order. The application interface, called the Application BlockChain Interface (ABCI), enables the transactions to be processed in any programming language. Unlike other blockchain and consensus solutions, which come pre-packaged with built in state machines (like a fancy key-value store, or a quirky scripting language), developers can use Tendermint for BFT state machine replication of applications written in whatever programming language and development environment is right for them.

 

上面的定义有点长,总结下有以下几点:

 

1.Tendermint 是一个能够在不同机器上,安全一致复制应用的软件,其中安全性和一致性也是分布式账本的关键概念。

 

2.Tendermint 具备拜占庭容错能力,是一种拜占庭容错共识算法。

 

3.Tendermint 主要有两部分组成:

 

  • Tendermint Core:区块链共识引擎,负责节点之间数据传输以及拜占庭共识。

  • ABCI:区块链应用程序接口,也是一个协议,支持任何语言的交易处理实现。

 

总体来讲,Tendermint 可以理解为一个模块化的区块链软件框架,支持开发者个性化定制自己的区块链,而又不需要考虑共识以及网络传输的实现。

 

Tendermint 设计原则

 

先简单说说区块链的概念,区块链是一个具备确定性的状态机,可以在不信任的节点之间进行状态复制,包括应用的状态和改变状态的交易。从架构的层面上,区块链可以简单分为三个概念层:

 

  • 网络层(Networking):负责交易和数据传输和同步。

  • 共识算法(Consensus):负责不同的验证节点处理完交易后,保证状态的一致,也就是将交易打包到区块中。

  • 应用程序(Application):交易的真正执行者。

 

大致框架如下:

 

  • 3
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值