巴比伦块奖励计算
2 个回答
- 投票数
-
- 2019-10-28
巴比伦中使用的确切公式可以在这里找到:
https://gitlab.com/tezos/tezos/blob/mainnet/src/proto_005_PsBabyM1/lib_protocol/baking.ml#L190
这涉及到:
(((1600000000 *(8 + 2 *e/32))/10)/(1 +p)
但是请注意,这些是整数除法,因此,在您的示例中:
8 + 2 * 26/32=8 + 52/32=8 + 1 =9
16000万微升* 9=144000万微升
144000万微升/10=14400 000微升=14.4ꜩ
编辑:此反馈来自Tezos开发人员TG组.您可以查看此电子表格,以更好地理解块奖励的计算: https://files.fm/u/hb5eazkk
The exact formula used in Babylon can be found here:
https://gitlab.com/tezos/tezos/blob/mainnet/src/proto_005_PsBabyM1/lib_protocol/baking.ml#L190
This comes to:
((16 000 000 * (8 + 2 * e / 32)) / 10) / (1 + p)
But note that these are integer divisions, hence, in your example:
8 + 2 * 26 / 32 = 8 + 52 / 32 = 8 + 1 = 9
16 000 000 μꜩ * 9 = 144 000 000 μꜩ
144 000 000 μꜩ / 10 = 14 400 000 μꜩ = 14.4 ꜩ
Edit: This feedback is from the Tezos developers TG group. You can view this spreadsheet to better understand the calculation of block rewards: https://files.fm/u/hb5eazkk
-
- 2019-10-28
这是巴比伦中的错误,是由于在错误的位置使用整数除法引起的,并将在下一个建议中修复.
现在,您可以使用以下公式计算奖励:
公式为:((16 000 000 * (8 + floor(2 * e / 32))) / 10) / (1 + p)
更多信息: https://twitter.com/iguerDUNE/status/1184095825296871425This is a bug in babylon caused by using an integer division in a wrong place and will be fixed in the next proposal.
For now you can use the following formula to calculate the rewards :
The formula is :((16 000 000 * (8 + floor(2 * e / 32))) / 10) / (1 + p)
More info : https://twitter.com/iguerDUNE/status/1184095825296871425-
谢谢!您能提供资料吗?上下文?实施等?Thanks! Could you please provide sources ? Context ? Implementation etc ?
- 0
- 2019-10-28
- Ezy
-
这实际上是巴比伦的一个错误.应该没有下限函数,但是他们使用了整数除法导致了这种现象. 这将在下一个建议中解决.This is actually a bug in babylon. there should not be the floor function, but they used an integer division which has caused this behavior. This will be fixed in the next proposal.
- 0
- 2019-10-28
- FiFtHeLeMeNt
-
是的,因此,如果您可以根据实际情况回答问题,并提供更多信息,链接等,以便每个人都可以理解,那将是很好的Yes so it would be great if you could contextualize the answer, and provide more infos, links etc so that everyone can understand
- 0
- 2019-10-28
- Ezy
-
我提供了更多信息:)I provided more info :)
- 0
- 2019-10-28
- FiFtHeLeMeNt
-
嗨,这不是官方信息.您是否可以参考官方文档或实现?Hi this is not official info. Would it be possible you refer to official doc or implementation maybe ?
- 0
- 2019-10-28
- Ezy
在巴比伦的块奖励计算中似乎存在错误.
例如,在方框664451中,有26个背书.因此奖励应为
16 * (0.8 + 0.2 * 26 / 32) = 15.4 XTZ
(源).但是面包师得到了14.4 XTZ.有人可以解释奖励的实际计算方式,为什么预期金额与实际奖励之间存在差异?