nebulasio / wiki

This repository is out of date, please check the new wiki:
http://wiki.nebulas.io/en/latest/
GNU General Public License v3.0
421 stars 154 forks source link

合约里使用random的话,如何在不同节点取得共识? #214

Closed hx4111 closed 6 years ago

hx4111 commented 6 years ago

如题: 在应用市场看到了开火车卡牌游戏,合约源码里随机函数使用random。请问random的结果如何在不同节点取得共识的?

bibibong commented 6 years ago

随机数借助VRF(verifiable random function)生成,可以被不同节点共识。 @hx4111 可以去了解下VRF

hx4111 commented 6 years ago

收到,谢谢。我去学习一下。