Tendermint基于Python的ABCI服务器
mt-abci的Python项目详细描述
用python为tendermint构建区块链应用程序
版本
支架:ABCI v0.15.0和Tendermint v0.26.0
安装
需要python>;=3.6.5
pip install abci或python setup.py install
生成protobuf
如果你是在这个代码基础上开发的,你只需要处理protobuf的东西,而不是创建应用程序。 如果您只想创建应用程序,请跳到Getting Started
关于protobuf的说明。您将注意到另外两个目录:github和protobuf。 githubdir是由abci使用的protobuf生成的代码。它添加了适当的python 路径(通过初始化)并保留Tendermint用于各种 protobuf文件分布在它们的代码库中。protobuf目录是 源.proto文件。
要生成protobuf文件:
- 安装protoc,使其作为终端的命令可用
- 运行genproto.py脚本
开始
- 扩展baseapplication类
- 实现TenderMint ABCI回调-请参见https://github.com/tendermint/abci
- 运行它
请参阅examples目录下的示例应用程序counter.py应用程序 这里:https://github.com/davebryson/py-abci/blob/master/examples/counter.py