Giter VIP home page Giter VIP logo

Comments (6)

jin10086 avatar jin10086 commented on May 24, 2024

但是奇怪的是

tapos_block_prefix

这个数不是未来区块的么?

黑客怎么提前拿到的?

from eosdice.

loveblockchain avatar loveblockchain commented on May 24, 2024

謝謝.

原因估計是這樣,
只要黑客拿到當前的區塊hash后,
快速的發送給合約,那麼合約就能算出來 當前區塊的tapos_block_prefix
然後快速的與bocai合約交互(在下一個塊提交成功,則隨機數被破解了)

from eosdice.

wangyilin1987 avatar wangyilin1987 commented on May 24, 2024

@jin10086 你好,我不明白为什么需要延迟两次。这样做的用意是什么呢?延迟开奖不就已经能让tapos_block_prefix无法被预测到吗?@loveblockchain 的解释用获取当前区块的tapos_block_prefix,然后迅速与bocai合約交互,我无法理解这样做能计算出未来的tapos_block_prefix值!
下注和开奖不是同时进行的话,用tapos_block_prefix来做为随机源还是不安全的吗?

from eosdice.

jin10086 avatar jin10086 commented on May 24, 2024

@wangyilin1987
可以看下这篇文章,里面几个引用也一起看看,此地无人生还:区块链随机数的原罪与救赎

from eosdice.

wangyilin1987 avatar wangyilin1987 commented on May 24, 2024

@jin10086 感谢!从引用文章中找到延迟两次的原因了。

from eosdice.

JayJay1024 avatar JayJay1024 commented on May 24, 2024

@wangyilin1987
可以看下这篇文章,里面几个引用也一起看看,此地无人生还:区块链随机数的原罪与救赎

如果使用两次defer开奖,随机种子除了tapos_block_numtapos_block_prefix没有其他可控因子,黑客怎么攻击会呢?我看最近有个游戏就被攻击了,但没披露细节。

from eosdice.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.