现在如何运作?
3 个回答
- 投票数
-
- 2019-03-11
假设所有Tezos节点都已同步,否则与1分钟时隙的共识将不起作用.当然,可以延迟一些,但超过几秒钟可能会阻止面包师烘烤.
现在是应该烘焙包含事务的块的时间.因此,面包师知道最后一个块的时间,他知道自己的时间,因此他可以计算出应该烘烤该块的时间.然后,它将利用这段时间执行交易.
There is an assumption that all Tezos nodes are synchronized, otherwise the consensus with 1-minute slots would not work. Of course, some delay is ok, but more than a few seconds might prevent a baker from baking.
NOW is the time at which the block, containing the transaction, should be baked. So, the baker knows the last block time, he knows his slot, so he can compute the time at which he should bake the block. It then uses that time to execute the transactions.
-
- 2019-03-11
面包师选择NOW的值.我知道这两个约束:
协议要求时间戳至少是烘焙师应该烘焙的最小时间戳(在上一个块的时间戳之后有一些延迟):baking.ml .
shell还将忽略相对于系统时钟而言未来时间戳太远(超过15秒)的块: distributed_db.ml .
The baker chooses the value of NOW. I am aware of these two constraints:
The protocol enforces that the timestamp is at least the minimal timestamp at which the baker was supposed to bake (some delay after the previous block's timestamp): baking.ml.
The shell will also ignore a block whose timestamp is too far in the future (more than 15s) relative to the system clock: distributed_db.ml.
-
- 2019-03-11
节点的时间同步只是图片的一部分:面包师出于自身原因始终可以处于脱机状态,网络可能会停滞,许多其他事务可能会竞争以被面包师选择,等等,因此人们需要非常谨慎并留出足够的时间来发生事件.
我想说,几分钟甚至几个小时今天还不够. 一天足够吗?我倾向于这样想,但我不确定.
Nodes time being synchronized is only part of the picture: bakers can always be offline for their own reasons, the network can be stalled, many other transactions could be competing to get selected by bakers, etc. so people need to be very cautious and give plenty of time for an event to occur.
I would say that a few minutes or even hours is not enough today. Is one day enough ? I would tend to think so but I'm not even certain.
-
如果我正在尝试构建一些可以在较小范围内达到里程碑的东西.有点好奇那些里程碑有多接近.If I'm experimenting with building something that can hit milestones during smaller ranges. Kind of curious how close those milestones can be.
- 0
- 2019-03-11
- Rob
-
理解了,但让我们都记得以太坊上的Fomo3d https://medium.com/coinmonks/how-the-winner-got-fomo3d-prize-a-detailed-explanation-b30a69b7813f,然后再要求快速完成里程碑.Understood but let's all remember Fomo3d https://medium.com/coinmonks/how-the-winner-got-fomo3d-prize-a-detailed-explanation-b30a69b7813f on Ethereum before requiring milestones too fast.
- 2
- 2019-03-11
- FFF
说合同有一个基于
NOW
的条件.是NOW
UTC,并且在添加到链中之前,每个节点都对此进行了验证吗?假设您要确保在1小时内调用一个函数,是否可以强制执行?例如:
这应该检查它大于现在-15分钟且小于现在+ 45分钟,两者都是正确的,以便它可以执行事务.
了解网络如何在整个网络的阻塞时间内达成共识也很重要?