Skip to content

Cannot withdraw from cli.js #59

Closed
rayleeafar opened this issue Jul 2, 2020 · 13 comments
Closed

Cannot withdraw from cli.js #59

rayleeafar opened this issue Jul 2, 2020 · 13 comments

Comments

@rayleeafar
Copy link

rayleeafar commented Jul 2, 2020

I build the project with node v11.15.0 on ubuntu 16.04,followed all the instructions.

when I use cli.js to deposit is right well,but when I want to withdraw it ,I got errors:

image

@rstormsf
Copy link
Collaborator

rstormsf commented Jul 2, 2020

@rayleeafar please specify all other details, what r u trying to do and what tornado pool you are trying to use, is it on testnet/mainnet, etc

@rstormsf
Copy link
Collaborator

rstormsf commented Jul 2, 2020

@rayleeafar
Copy link
Author

@rstormsf sorry,just now I mistype and send it with uncompleted msg.

I run it on kovan testnet,I also tried to run a local relayer,but got the same error.

I can withdraw it via tornado.cash website, but can't withdraw it by cli.js.

**ray@vultr:~/tornado-core$ ./cli.js deposit ETH 0.1 --rpc https://kovan.infura.io/v3/e502412b7fb6473987d44da0960b16cf** HTTPS requests insecure by disabling certificate verification. Your note: tornado-eth-0.1-42-0x76004fbe6a1ec5e861e532da95670c083bce0dff2a1cc1ce34f96c22d0ca8f7d5a47dd0f75e26462a7756483877b1a23be2758bb13a6514700a724bebd45 Tornado ETH balance is 19 Sender account ETH balance is 0.6592406157 Submitting deposit transaction Tornado ETH balance is 19.1 Sender account ETH balance is 0.5503791167

use relayer to withdraw:
**ray@vultr:~/tornado-core$ ./cli.js withdraw tornado-eth-0.1-42-0x338f974f2fb7467b2369ac211cb7069cd06903d1f76c838be6597a09e4af2ac415b9f169c535b445d0eb35fb621a46deedc84c22ee0cdde7e25b5c218016 0xe105AF2CcB9fcD73B157a4752baF2fc1a906cE38 --rpc https://kovan.infura.io/v3/e502412b7fb6473987d44da0960b16cf --relayer https://tornado-kovan.poa.network** Relay address: 0xa861c8f22ceEc90b26380407aFfAf30AF6A7296b Getting current state from tornado contract Generating SNARK proof Proof time: 48577.343ms Sending withdraw transaction through relay Internal Relayer Error. Please use a different relayer service Done

withdraw without relayer:
``ray@vultr:~/tornado-core$ ./cli.js withdraw tornado-eth-0.1-42-0x338f974f2fb7467b2369ac211cb7069cd06903d1f76c838be6597a09e4af2ac415b9f169c535b445d0eb35fb621a46deedc84c22ee0cdde7e25b5c218016 0xe105AF2CcB9fcD73B157a4752baF2fc1a906cE38 --rpc https://kovan.infura.io/v3/e502412b7fb6473987d44da0960b16cf`
Getting current state from tornado contract
Generating SNARK proof
Proof time: 49503.221ms
Submitting withdraw transaction
View transaction on etherscan https://kovan.etherscan.io/tx/0xe59f73a376f8f48c44d48ef631489f1af52c445a5d50d9754f847f9e28cdd7ba
Error: Error: Transaction has been reverted by the EVM:
{
"blockHash": "0x6312e43bd1f467bbe3a7867e5a8165e0b157bf7a3df5829df497cc475cccd0ef",
"blockNumber": 19371208,
"contractAddress": null,
"cumulativeGasUsed": 381766,
"from": "0xe105af2ccb9fcd73b157a4752baf2fc1a906ce38",
"gasUsed": 289444,
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"root": null,
"status": false,
"to": "0x8b3f5393ba08c24cc7ff5a66a832562aab7bc95f",
"transactionHash": "0xe59f73a376f8f48c44d48ef631489f1af52c445a5d50d9754f847f9e28cdd7ba",
"transactionIndex": 1,
"events": {}
}
at /home/ray/tornado-core/node_modules/web3-core-method/src/index.js:412:37
at processTicksAndRejections (internal/process/task_queues.js:86:5)`

@rayleeafar
Copy link
Author

@rstormsf I also used tornado-cli, but the problem also exists

@rstormsf
Copy link
Collaborator

rstormsf commented Jul 2, 2020

@rayleeafar make sure you run npm run download

@rayleeafar
Copy link
Author

@rstormsf ok,tks! I can't run it with tornado-core either,but fortunately the tornoda-cli withdraw successfuly this time. I'll closed it and recheck the error. tks again!

@ytrezq
Copy link

ytrezq commented Sep 23, 2020

@rayleeafar as per #38 may you share your binary installation please since you succeed at installing it?

I just want cli.js too.

@poma
Copy link
Collaborator

poma commented Sep 23, 2020 via email

@ytrezq
Copy link

ytrezq commented Sep 23, 2020

@poma that s not the difficult part, but then I end up with all that dependency hell that I can t solve myself or paying 400€ a third party experiencing the same difficulties to run npm install.

@poma
Copy link
Collaborator

poma commented Sep 23, 2020

Not sure what your problem is, the build is perfectly reproducible. Just ran docker and npm install, took 1 minute

/tmp$ docker run --rm -ti node:11 bash
root@718ed4305dc9:/# git clone https://github.com/tornadocash/tornado-core
Cloning into 'tornado-core'...
remote: Enumerating objects: 72, done.
remote: Counting objects: 100% (72/72), done.
remote: Compressing objects: 100% (52/52), done.
remote: Total 1682 (delta 34), reused 43 (delta 18), pack-reused 1610
Receiving objects: 100% (1682/1682), 1.10 MiB | 0 bytes/s, done.
Resolving deltas: 100% (1116/1116), done.
root@718ed4305dc9:/# cd tornado-core/
root@718ed4305dc9:/tornado-core# npm i

> [email protected] preinstall /tornado-core/node_modules/scrypt
> node node-scrypt-preinstall.js


> [email protected] install /tornado-core/node_modules/ganache-cli/node_modules/keccak
> npm run rebuild || echo "Keccak bindings compilation fail. Pure JS implementation will be used."


> [email protected] rebuild /tornado-core/node_modules/ganache-cli/node_modules/keccak
> node-gyp rebuild

make: Entering directory '/tornado-core/node_modules/ganache-cli/node_modules/keccak/build'
  CXX(target) Release/obj.target/keccak/src/addon.o

...

> [email protected] postinstall /tornado-core/node_modules/truffle
> node ./scripts/postinstall.js

- Fetching solc version list from solc-bin. Attempt #1
- Downloading compiler. Attempt #1
npm WARN [email protected] No repository field.

added 1029 packages from 989 contributors and audited 1032 packages in 83.397s
found 3522 vulnerabilities (399 low, 5 moderate, 3118 high)
  run `npm audit fix` to fix them, or `npm audit` for details
root@718ed4305dc9:/tornado-core#

@koseoyoung
Copy link

plz use https://github.com/tornadocash/tornado-cli

Hi, can you tell me why tornado-core/cli.js does not work, but tornado-cli/cli.js is working? I could not find a difference in source code. Thank you !

@poma
Copy link
Collaborator

poma commented Oct 14, 2020

@koseoyoung Verify that the snark keys are identical

@koseoyoung
Copy link

koseoyoung commented Oct 14, 2020

@koseoyoung Verify that the snark keys are identical

Can you more elaborate on this? which one is verifying that the snark keys are identical?
Or do you mean that I should verify whether the snark keys are identical?

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

5 participants