Implementing the dropbox example

zoezoe Member Posts: 3

I'm interested in the dropbox example and I tried to see how it's like in the blockchain.
I modified the dropbox.cll example a little (pretty much must fill in the merkle root)
I also wrote a python helper to build the merkle tree for me and solve the challenge if given the previous block hack

here's my code:

Since all the cll simulator I found doesn't support SHA3, I can't really test this with a simulator.
I am running Alethzero with network turned off so that things won't be out of control

Anyway this is what I did:

run and get the merkle root and depth; use the output(depth and root) to fill out the blanks in dropbox.cll
copy and paste dropbox.cll to create a contract with the transact panel in Alethzero
mine one block; then turn off mining
copy the hash of latest block and paste that in the buildMerkle helper
run and copy the output(the data part) as the data of transaction and send that to the contract account
mine another block

In the new mined block, I only see transaction from me to the contract account and didn't see anything else.
To make sure that it's not because I failed the challenge, I add an else statement for failing the challenge and reward sender 1 kwei
tried that; no luck...

I feel like what it should work but I can't see the rewarding transaction in the blockchian.
I'm wondering if anyone could tell me what I did wrong; any help would be appreciated.


Sign In or Register to comment.