You are viewing a single comment's thread:

RE: Fun with Python: Terminal Card Shuffle

But wait , it can't right?

This means that for the exact same two blocks, the shuffle and draw will always produce the same result, making it provably fair.

Because the txid is chosen randomly each time?
@thecrazygm

0.00015690 BEE
2 comments

if you use the same sha256 seed that it renders, like the one in the image it will get the same result. In a real use case I would think the tx_id would be static because it would be using the tx of the custom_json it was called in.

You are right though, if you call it with just the block info it would call a new random tx,

For provable purposes, i would log the 3 ids it used and the sha256 to compare against later (which is what the thing I'm playing with now does, adds the actual seed to the database for comparison checks ).

0.00000000 BEE

Originally I had it using the first transaction for the roll. But if 2 people roll at the same they would get the same results, which is why I moved to random TX in block.

0.00000000 BEE