什么是现时启示?
1 个回答
- 投票数
-
- 2019-02-22
从根本上说,随机数被区块链用来创建随机性,例如为一个周期选择快照.随机数由面包师创建,并且该循环的所有随机数被合并以创建随机种子.烘焙块时,可能需要在下一个循环中显示随机数.此随机数要求是确定的,每32块发生一次.具体来说,如果您烘焙了
blockNumber % 32 == 0
,则需要在下一个循环中宣布它.如果您使用的是tezos二进制文件,则默认情况下,现时值将保存在
~/.tezos-client/nonces
中.在接下来的周期中,贝克二进制文件将自动检测已保存的随机数并将其显示出来.这通常发生在下一个周期的前5个块中.不透露随机数的惩罚是烤块的奖励损失.因此,面包师有动力揭露他们的现时.附带说明一下,我应该提一下,使现成的现成对块状面包师(不是显露者,而是在其块中包含现时操作的面包师)给予1/8 XTZ奖励.在您的方案中,使基础结构在多个节点之间高度可用.您肯定需要考虑如何处理随机数文件,因为您将有一个周期来揭示随机数,否则您将丧失您的集体奖励.
Fundamentally, nonces are used by the blockchain to create randomness, such as choosing the snapshot for a cycle. Nonces are created by bakers and all the nonces for the cycle are combined to create a random seed. When baking blocks, you may be required to reveal a nonce in the next cycle. This nonce requirement is determinstic and happens every 32 blocks. Specifically, if you baked
blockNumber % 32 == 0
, you will be required to announce it the following cycle.If you are using the tezos binaries, the nonce will be saved by default in
~/.tezos-client/nonces
. In the following cycle, the baker binary will automatically detects the saved nonce and reveal it. This usually happens in the first 5 blocks in the next cycle. The penalty for not revealing the nonce is the lost of the rewards for the baked block. Therefore, bakers have incentives to reveal their nonce. As a side note, I should mention that making the nonce reveal has a 1/8 XTZ reward for the block baker (not the revealer but the baker who includes the nonce operation in their block).In your scenario, to make the infrastructure highly available across multiple nodes. You will definitely need to account for how to handle the nonce file(s) as you'll have one cycle to reveal the nonce or you will forfeit your block rewards.
-
注意!感谢您提供一个很好的启发性答案,理想情况下,像nonce数据之类的声音应该在所有节点之间同步(因此,如果面包师移动,它仍然可以显示它们).但是,我很高兴听到没有任何惩罚(除了错过的奖励之外)不会泄露它们.Noted! Thanks for a great and enlightening answer Sounds like the nonce data ideally should be synced between all nodes (so if the baker moves it can still reveal them). However I'm happy to hear there is no penalty (other than missed reward) to not reveal them.
- 1
- 2019-02-24
- asbjornenge
-
如果您使用的是硬件钱包,则随机数确定性地来自硬件设备上的HMAC签名,因此您不会丢失随机数.If you're using a hardware wallet, the nonce is deterministically derived from an HMAC signature on your HW device so you can't lose your nonces.
- 0
- 2019-11-20
- Elliot Cameron
我正在建立具有多个完整节点和一个烘烤服务的HA烘烤基础结构,如果一个服务出现故障,该烘烤服务可以移至另一个节点.我认为除了nonce-revelation以外,我在大多数事情上都有能力.什么是随机数启示?错过一个是什么意思?