ABCI++

简介

ABCI++ 是 ABCI(Application Blockchain Interface,应用区块链接口)的一次重大演进。 与其前身一样,ABCI++ 是 CometBFT(一个状态机复制引擎)与实际被复制的状态机(即应用程序)之间的接口。 该 API 由一组方法组成,每个方法都对应一个 Request 和 Response 消息类型。 这些方法始终由 CometBFT 发起。应用程序负责实现处理所有 ABCI++ 方法的逻辑。 因此,CometBFT 总是发送 Request* 消息,并接收作为返回结果的 Response* 消息。 所有 ABCI++ 消息和方法都定义在 protocol buffers 中。 这使得 CometBFT 能够与使用多种编程语言编写的应用程序协同运行。 本规范分为以下几个部分:
  • 概览与基本概念 - 用于理解本规范其他部分所需的接口概览与概念。
  • 方法 - 所有 ABCI++ 方法和消息类型的完整细节。
  • 对应用程序的要求 - 为确保 CometBFT 的活性等性质而对应用程序逻辑提出的形式化要求。这些要求定义了 CometBFT 对应用程序的期望;第二部分则讨论 ABCI 应用状态管理及相关主题。
  • CometBFT 的预期行为 - 规定 CometBFT 可能如何调用不同的 ABCI++ 方法。这部分说明了应用程序应当对 CometBFT 有何预期。
  • 示例场景 - 通过具体场景说明,为什么应用程序需要考虑规范所规定的 CometBFT 各种行为。
  • 客户端与服务端 - 面向希望实现自有 ABCI 应用服务端的读者。

ABCI++

Introduction

ABCI++ is a major evolution of ABCI (Application Blockchain Interface). Like its predecessor, ABCI++ is the interface between CometBFT (a state-machine replication engine) and the actual state machine being replicated (i.e., the Application). The API consists of a set of methods, each with a corresponding Request and Response message type. The methods are always initiated by CometBFT. The Application implements its logic for handling all ABCI++ methods. Thus, CometBFT always sends the Request* messages and receives the Response* messages in return. All ABCI++ messages and methods are defined in protocol buffers. This allows CometBFT to run with applications written in many programming languages. This specification is split as follows:
  • Overview and basic concepts - interface’s overview and concepts needed to understand other parts of this specification.
  • Methods - complete details on all ABCI++ methods and message types.
  • Requirements for the Application - formal requirements on the Application’s logic to ensure CometBFT properties such as liveness. These requirements define what CometBFT expects from the Application; second part on managing ABCI application state and related topics.
  • CometBFT’s expected behavior - specification of how the different ABCI++ methods may be called by CometBFT. This explains what the Application is to expect from CometBFT.
  • Example scenarios - specific scenarios showing why the Application needs to account for any CometBFT’s behaviour prescribed by the specification.
  • Client and Server - for those looking to implement their own ABCI application servers.