?? ?? 3.8.2 CheckTx 跟DeliverTx相似,但仅用于验证交易事务。
?? ?? 3.8.3 Commit 计算一个加密的提交给当前app的状态,这个提交将放在下一个区块的头部。
?? 3.9 一个app可以创建多个ABCI socket连接,每个连接处理一类消息。这个一个流程https://tendermint.readthedocs.io/en/master/_images/abci.png??
3. tendermint 二进制 安装
?? 3.1 下载Linux 64的版本 https://github.com/tendermint/tendermint/releases 解压缩到~/usr/tendermint
?? 3.2 运行
?? ?? 初始化 ??tendermint init
?? ?? 运行 ??tendermint node --proxy_app=dummy
?? 3.3 tendermint配置分析
?? ?? 在~/.tendermint目录下,有三个json文件,有一个config.toml文件。cmd 下载文件
?? ?? addrbook.json是记录各节点的地址。
?? ?? priv_validator.json是私钥文件。??
?? ?? genesis.json是公钥文件。
?? ?? config.toml是配置信息,包括proxy, ,rpc, p2p等各参数。
4. tendermint源码结构
?? 4.1 README.md 介绍性资料
?? 4.2 Makefile ??go语言使用Makefile
?? ?? 4.2.1 编译tendermint需要安装gox(https://github.com/mitchellh/gox): go get github.com/mitchellh/gox ????
?? ?? 4.2.2 需要ghr https://github.com/tcnksm/ghr#install,安装 go get -u github.com/tcnksm/ghr

?? ?? 4.2.3 需要gometalinter.v2,安装 go get -u gopkg.in/alecthomas/gometalinter.v2
?? ?? 4.2.4 类似,大部分需要的库都以go get的形式安装即可,如果有些包找不到,就到github上搜,搜到后用go get安装
?? 4.3 cobra库是一个命令行操作库,在https://github.com/spf13/cobra这里把demo运行一次就可以理解了,很简单。
??
5 tendermint运行dummy分析
??5.1 运行tendermint node --proxy_app=dummy,出现如下提示
?? ?? I[02-13|04:57:32.545] Executed block ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? module=state height=95 validTxs=0 invalidTxs=0
?? ?? I[02-13|04:57:32.548] Committed state ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??module=state height=95 txs=0 appHash=
?? ?? I[02-13|04:57:33.603] Executed block ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? module=state height=96 validTxs=0 invalidTxs=0
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/ruanjian/article-85575-2.html
说的很客观也诚恳