<
 
 
 
 
×
>
hide You are viewing an archived web page, collected at the request of Ethereum Foundation using Archive-It. This page was captured on 10:24:52 Jun 06, 2021 , and is part of the Community collection. The information on this web page may be out of date. See All versions of this archived page. Loading media information

Blind Auction: Reveal&gt;&gt;&gt;How to successfully fill data fields

PokerPlayerPokerPlayer Member Posts: 52
edited March 2016 in Solidity
http://solidity.readthedocs.org/en/latest/solidity-by-example.html#id2

Not confident in how to "blind" a secret and reveal it.

Using http://emn178.github.io/online-tools/keccak_256.html for the hash. I'm putting '1' 'false' and random 32 bytes '11010011 00100010 00100000 11000000 11101010 00011111 01010010 00010101 00011100 11010110 10001010 00010011 01110110 00001101 01101110 00101100 10010101 11101110 10111100 01101100 00000111 11110011 00110000 11010000 00110011 10101001 01001000 10001110 00010110 00111100 00100110 01101001' in the hash function

Do I separate them with a comma?

No comma: 33b89b39e82f5e40c4fae965c0cefb1d205a86d5ef3136c9b591bbc6815b647c
Comma separation: 33b89b39e82f5e40c4fae965c0cefb1d205a86d5ef3136c9b591bbc6815b647c

/// Place a blinded bid with `_blindedBid` = sha3(value,
/// fake, secret).
/// The sent ether is only refunded if the bid is correctly
/// revealed in the revealing phase. The bid is valid if the
/// ether sent together with the bid is at least "value" and
/// "fake" is not true. Setting "fake" to true and sending
/// not the exact amount are ways to hide the real bid but
/// still make the required deposit. The same address can
/// place multiple bids.
function bid(bytes32 _blindedBid)


Now when I try to reveal I enter:

values - uint256[]: 1
 fake - bool[]: false
secret - bytes32[]: 11010011 00100010 00100000 11000000 11101010 00011111 01010010 00010101 00011100 11010110 10001010 00010011 01110110 00001101 01101110 00101100 10010101 11101110 10111100 01101100 00000111 11110011 00110000 11010000 00110011 10101001 01001000 10001110 00010110 00111100 00100110 01101001
send ETHER: 1

/// Reveal your blinded bids. You will get a refund for all
/// correctly blinded invalid bids and for all bids except for
/// the totally highest.
function reveal(uint[] _values, bool[] _fake,
bytes32[] _secret)


But I am getting: "Data can't be executed, so it will use all provided gas" error.

Any thoughts?

Comments

  • PokerPlayerPokerPlayer Member Posts: 52
    Ok since the entry fields are arrays I needed [] around the entries. Still now bytes32 isn't working. I changed it to uint and it seems to work so I guess I'm still not understanding the nature of the data?
Sign In or Register to comment.