1. 引言
相关代码见:
$ dune exe src/app/cli/src/mina.exe -- advanced vrf
Commands for vrf evaluations
mina.exe advanced vrf SUBCOMMAND
=== subcommands ===
batch-check-witness Check a batch of vrf evaluation witnesses read on
stdin. Outputs the verified vrf evaluations (or no vrf
output if the witness is invalid), and whether the vrf
output satisfies the threshold values if given. The
threshold should be included in the JSON for each vrf
as the 'vrfThreshold' field, of format
{delegatedStake: 1000, totalStake: 1000000000}. The
threshold is not checked against a ledger; this should
be done manually to confirm whether threshold_met in
the output corresponds to an actual won block.
batch-generate-witness Generate a batch of vrf evaluation witnesses from
{"globalSlot": _, "epochSeed": _, "delegatorIndex": _}
JSON message objects read on stdin
generate-witness Generate a vrf evaluation witness. This may be used to
calculate whether a given private key will win a given
slot (by checking threshold_met = true in the JSON
output), or to generate a witness that a 3rd party can
use to verify a vrf evaluation.
help explain a given subcommand (perhaps recursively)
missing subcommand for command mina.exe advanced vrf
参考资料
[1] 2021年7月博客 Evaluating a Mina staking pool’s performance [2] ZKValidator – Block Producer Analysis [3] Mina术语表
附录 1
Mina系列博客有:
附录2. Mina中的常见术语
- Transition:等同于block区块。
- Transition Frontier:为本地data store中包含的网络中的最新
k
k
k个区块。为rose tree-type数据结构,该tree中的每个节点可能有多个children,即分叉。该tree中的每个节点都可称为breadcrumb。
- Root (of Transition Frontier):The root of the transition frontier is the block k blocks from the best tip. The root is obtained from peers during bootstrap. Once a new best tip is seen, the root is moved, so only k blocks are persisted. The root is the point where the block has been finalized due to consensus.【即固化点】
- breadcrumb:为Transition Frontier的一个节点。每个breadcrumb中包含了:
- external transition:也是a block,由另一产块者生成的区块。
- staged ledger
- pending coinbase
- best tip:当前已知的具有最高chain strength的最新区块。
- chain strength:由于Mina中没有full history available,新加入的节点无法sync from genesis by applying all prior transitions。为了帮助节点判断最强链,a minimum chain density is stored for a sliding window of time。为此,诚实的节点会选择具有higher minimum density或chain strength的链。
- archive node:Mina节点默认是succinct的,即意味着不需要维护关于网络、区块或交易的历史信息。archive node会存储历史chain data to a persistent data source so it can later be retrieved。
- full node:Mina中每个节点都是全节点,都可receive and verify zk-SNARKs。
- delegating:质押mina要求节点在线,某些节点可将其mina委托给运行质押服务的其它节点,该过程称为委托质押,通常服务提供商或质押池运营商会收取一定的费用来运行该服务,一旦委托人被选中为产块者,该费用将从中扣除。
- Epoch:Mina主网每个epoch对应7140个slot,每个slot约3分钟。
- Kademlia:为A distributed hash table (DHT) for decentralized peer-to-peer networks. Mina uses Kademlia for peer discovery so that nodes can find neighbor nodes to share information about the network state.
- nonce:为交易中的一个递增值,用于防止交易重放。Transactions are always included in blocks in the sequential order of the nonce.
- snarked ledger:为仅包含具有关联proof的ledger。一旦有proof从scan state中释放,就会更新snarked ledger。该proof可证明由之前的产块者添加到该tree的所有交易的真实性。
- staged ledger:为当前的account state,包含了a pending accounts ledger以及a pending queue of un-SNARKed transactions known as the scan state。
- staking ledger:用于决定某slot产块者的ledger,赢得该slot的概率与质押的金额呈正比。当前epoch的stake distribution为上上epoch(当前epoch-2)的最后一个区块的snarked ledger。
- staking pool:由staking pool owner运行的委托资金池。其它节点可选择将资金委托给质押池,从而避免一直在线。
- time-locked account:是指账号具有一定数量的非既得利益token,直到满足某特定条件(如区块数)后才能使用。
|