Consensys / anonymous-zether

A private payment system for Ethereum-based blockchains, with no trusted setup.
Other
295 stars 73 forks source link

Can I deploy the contracts to Ethereum e.g. Ropsten? #6

Closed jakeonchain closed 5 years ago

jakeonchain commented 5 years ago

I am able to deploy the Utils.sol but can't deploy https://github.com/jpmorganchase/anonymous-zether/blob/master/packages/protocol/contracts/ZetherVerifier.sol and getting {"code":-32000,"message":"exceeds block gas limit"} even I put 30 ethers as the gas fee. Any idea? Thanks

benediamond commented 5 years ago

hey @jakeonchain, thanks for reaching out.

I'm guessing that ZetherVerifier deployment cost alone is exceeding the block gas limit in Ropsten, which appears to be around 4.7 million. I'm not sure, it could even exceed the block gas limit on the mainnet (around 8 million).

It is of course possible to break up the work of deployment into multiple steps, essentially by gutting the loop in the constructor and then calling extendBase multiple times.

Even if you get this deployed, actually doing transfers on Ropsten / the mainnet will be unfeasible with current gas costs (see section 3 of this note). These will come down by an order of magnitude by Istanbul, via EIP 1108. Until that point, unfortunately, Anonymous Zether should be viewed primarily as a consortium / private-net solution. If you want to test this, I'd suggest setting up a testnet with your friends and a custom block gas limit.

jakeonchain commented 5 years ago

@benediamond thanks, we will try and see

benediamond commented 4 years ago

@jakeonchain as a belated update to this, as of 0c5b14ff1aed5e3ce5fb0b21fec85a5672301fb7 it should now be possible to deploy this on testnets, I believe. also, if the testnet implements Istanbul, then transfers will also be possible. you can give it a shot if you'd like.