概述

greenfield-cometBFT 合并了 cometBFT 官方 的 v0.37.2 分支,当前 mechain 使用的也是 v0.37.2 版本。mechain-cosmos-sdk 使用的是 v0.37.1 版本。

根据 greenfield-cometBFT 官方文档 描述

We implement several key features based on the CometBFT fork:

  • Vote Pool. Vote pool is used to collect votes from different validators for off-chain consensus. Currently, it is mainly used for cross chain and data availability challenge in Greenfield blockchain.
  • RANDAO. RANDAO is introduced for on-chain randomness. Overall, the idea is very similar to the RANDAO in Ethereum beacon chain, you can refer to here for more information. It has some limitations, please use it with caution.
  • vote pool 定义在 votepool 对应的代码实现是在 votepool,在 node 启动的时候通过 node 注册为 reactor。
  • RANDAO 分别定义在 proto/tendermint/state/types.proto 与 proto/tendermint/types/types.proto 中。RANDAO 是一个用于生成随机数的机制,是“可验证的随机函数”(Verifiable Random Function, VRF)的一个变体,旨在为区块链提供去中心化和安全的随机性源。greenfield 在 state 和 header 中添加了该字段,在 validateBlock 时对 randao 进行检查。