Skip to content

revert Invalid withdraw proof error #63

Open
koseoyoung opened this issue Oct 5, 2020 · 3 comments
Open

revert Invalid withdraw proof error #63

koseoyoung opened this issue Oct 5, 2020 · 3 comments

Comments

@koseoyoung
Copy link

koseoyoung commented Oct 5, 2020

Hi, I've been trying to run ./cli.js test this command after setting up ganache and contract deployment. (followed all instructions)
However, I kept having execution revert error. Do you have any idea why?

The node version is v11.15.0

Start performing ETH deposit-withdraw test
Your note: tornado-eth-0.1-1337-0xad6cde8d27dce687045de2664045a286d94f58358c2068f550e27c32c4943ff134b2825b8436cb9d3ac888fcdfed5f44f328ff6365a2c2e5d334c2c61067
Tornado ETH balance is 0
Sender account ETH balance is 99.7440541
Submitting deposit transaction
Tornado ETH balance is 0.1
Sender account ETH balance is 99.62427308
Getting current state from tornado contract
Generating SNARK proof
Proof time: 15864.924ms
Submitting withdraw transaction
Error: Error: Returned error: VM Exception while processing transaction: revert Invalid withdraw proof
    at Object.ErrorResponse (/Users/seoyoungko/github/tornado-core/node_modules/web3-core-helpers/src/errors.js:29:16)
    at /Users/seoyoungko/github/tornado-core/node_modules/web3-core-requestmanager/src/index.js:140:36
    at XMLHttpRequest.request.onreadystatechange (/Users/seoyoungko/github/tornado-core/node_modules/web3-providers-http/src/index.js:102:13)
    at XMLHttpRequestEventTarget.dispatchEvent (/Users/seoyoungko/github/tornado-core/node_modules/xhr2-cookies/dist/xml-http-request-event-target.js:34:22)
    at XMLHttpRequest._setReadyState (/Users/seoyoungko/github/tornado-core/node_modules/xhr2-cookies/dist/xml-http-request.js:208:14)
    at XMLHttpRequest._onHttpResponseEnd (/Users/seoyoungko/github/tornado-core/node_modules/xhr2-cookies/dist/xml-http-request.js:318:14)
    at IncomingMessage.<anonymous> (/Users/seoyoungko/github/tornado-core/node_modules/xhr2-cookies/dist/xml-http-request.js:289:61)
    at IncomingMessage.emit (events.js:198:15)
    at endReadableNT (_stream_readable.js:1139:12)
    at processTicksAndRejections (internal/process/task_queues.js:81:17)
@talhamalik883
Copy link

yup, there is some error in cli code. I have checked the logs also over tornado.cash when you provide note and withdrawal address. It generate a log over console that is different from the one in cli. That is basically the root attribute in input object. I had also change that and instead of simple root value i have added its hex but still transaction got reverted.

Conclusion: Code deployed over tornado.cash is different from cli over github

@fuyundian
Copy link

上部署的代码与在github上的cli不同

Did you find the same CLI generated?

@themandalore
Copy link

themandalore commented Jun 20, 2022

For those not able to get it to work, here's a repo that updated the hash function to poseidon and then got all the tests to work: https://github.com/ChihChengLiang/poseidon-tornado.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants