Bitcoin Forum
May 03, 2024, 07:04:44 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Hawk: Ethereum-style smart contracts combined with Zerocash-style privacy?  (Read 768 times)
voltairine (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
March 14, 2017, 06:19:04 PM
 #1

If you're anything like me, back in 2013 when Zerocash and Ethereum were first announced, you wondered whether it was possible to combine the two ideas. Well, a year or two ago, some researchers came out with a preprint on Hawk, which is a protocol that does exactly that.

I contacted the authors of the paper, and they said they hoped to open-source (most of) their implementation of Hawk some time this semester. This, of course, means someone could theoretically work on this implementation within a couple months and turn it into an altcoin suitable for actual release. Additionally, this kind of altcoin sounds like exactly the kind of thing that the Bolt Network (similar to LN, but it provides privacy) could be implemented on.

What do y'all think of this idea? How many people are interested in it? Do you think it could potentially compete with the likes of Zcash and Ethereum?

(Also, anyone interested in actually implementing this, please contact me! I also want to get in on that.)
The forum was founded in 2009 by Satoshi and Sirius. It replaced a SourceForge forum.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714719884
Hero Member
*
Offline Offline

Posts: 1714719884

View Profile Personal Message (Offline)

Ignore
1714719884
Reply with quote  #2

1714719884
Report to moderator
TheByzantineGeneral
Newbie
*
Offline Offline

Activity: 33
Merit: 0


View Profile
March 14, 2017, 06:46:37 PM
 #2

There seems to be some synchronicity in thought currents with
the most recent being ZETH: https://bitcointalk.org/index.php?topic=1802128.0

Prior to this a more official integration within the ZCash and ETH ecosystem with
Project Alechmy: https://z.cash/blog/project-alchemy.html

Care to explain any differences in Hawk and Project Alchemy??

voltairine (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
March 14, 2017, 07:14:21 PM
 #3

There seems to be some synchronicity in thought currents with
the most recent being ZETH: https://bitcointalk.org/index.php?topic=1802128.0

Prior to this a more official integration within the ZCash and ETH ecosystem with
Project Alechmy: https://z.cash/blog/project-alchemy.html

Care to explain any differences in Hawk and Project Alchemy??



Certainly. Project Alchemy and ZETH are both decentralized exchanges meant to allow easy exchange between ETH and ZEC, but neither of them is an altcoin meant to combine both currencies in one blockchain. What this essentially amounts to is: you can have privacy in your transactions, or you can have smart contracts, and it's easier to switch between the two...but you can't have both simultaneously.

Hawk, OTOH, would be an altcoin that actually allows you to have private smart contracts. Theoretically, if ETH incorporates SNARKs into its protocol, it could have private smart contracts as well...but I don't know how far down the road that is. Besides, the Hawk protocol also has mechanisms to make private smart contracts less cumbersome than they would be in ETH.
TheByzantineGeneral
Newbie
*
Offline Offline

Activity: 33
Merit: 0


View Profile
March 14, 2017, 07:53:54 PM
 #4

ETH incorporating a SNARK verifier opcode seems to be quite likely,

July 2016:baby ZoE or ZeroCash over Ethereum
https://z.cash/blog/zksnarks-in-ethereum.html
https://github.com/zcash/babyzoe
"In our work this week, we extended the Ethereum contract language to efficiently support verification of zkSNARK proofs. Specifically, we added a snarkverify precompile (like an opcode) to a fork of Parity which uses libsnark to verify generic proofs."


Jan 2017: ZCash integration into Ethereum Blockchain
https://blog.ethereum.org/2017/01/19/update-integrating-zcash-ethereum/

Feb 2017
https://medium.com/@VitalikButerin/zk-snarks-under-the-hood-b33151a013f6

I believe the issue being of the Zcash private transactions are quite expensive in gas
in the context of executing on EVM. You mentioned
Quote
Besides, the Hawk protocol also has mechanisms to make private smart contracts less cumbersome than they would be in ETH.
Could the following fix or alleviate any of such issues?
Hawk seems to have a decentralized manager who receives inputs from the Users and produces the snark proof? correct?

voltairine (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
March 14, 2017, 10:39:44 PM
 #5

ETH incorporating a SNARK verifier opcode seems to be quite likely,

July 2016:baby ZoE or ZeroCash over Ethereum
https://z.cash/blog/zksnarks-in-ethereum.html
https://github.com/zcash/babyzoe
"In our work this week, we extended the Ethereum contract language to efficiently support verification of zkSNARK proofs. Specifically, we added a snarkverify precompile (like an opcode) to a fork of Parity which uses libsnark to verify generic proofs."


Jan 2017: ZCash integration into Ethereum Blockchain
https://blog.ethereum.org/2017/01/19/update-integrating-zcash-ethereum/

Feb 2017
https://medium.com/@VitalikButerin/zk-snarks-under-the-hood-b33151a013f6

I believe the issue being of the Zcash private transactions are quite expensive in gas
in the context of executing on EVM. You mentioned
Quote
Besides, the Hawk protocol also has mechanisms to make private smart contracts less cumbersome than they would be in ETH.
Could the following fix or alleviate any of such issues?
Hawk seems to have a decentralized manager who receives inputs from the Users and produces the snark proof? correct?



Yes, each private contract in Hawk has a manager that runs the contract on private inputs and produces the proofs. When I noted that smart contracts are less cumbersome in Hawk, what I was referring to was the fact that Hawk provides an automated mechanism to coordinate between manager, users, and the network. However, Hawk does fix the issue you brought up as well.

As you hinted, the ETH developers don't intend to put a SNARK verification opcode into its VM due to cost, but rather to use precompiled contracts. This limits the ability to use private contracts significantly. In the Hawk paper and in a follow-up paper, they describe some optimizations that are used to make it feasible to implement it as an opcode; so, indeed, Hawk does put SNARK verification straight into the EVM. Actually, IMO there are even more optimizations that can be made, which Hawk doesn't even incorporate yet. For example, CredaCash uses a Diophantine subsum hash function instead of SHA2, and the result is that a proof in CredaCash can be generated in about three seconds. (To put that into perspective, a Zcash proof takes two minutes to generate.)

I should also mention that ZoE has a problem right now, which is that a new trusted setup must be conducted for every new smart contract that's created. Actually, Hawk also has this problem, but it can be fixed. A virtual machine called vnTinyRAM can be compiled into the language of SNARKs, so that a setup phase only need be conducted once. To make running proofs on vnTinyRAM code more efficient, a compiler called Geppetto can be used to compile certain aspects of the code before generating the vnTinyRAM code. The setup still only needs to be conducted once, but (at least in theory) creating proofs should be much less expensive than the naive method.

Finally, there's another problem in simply putting SNARKs into Ethereum, but it's quite a bit more subtle. Essentially, zerocash gives you ledger indistinguishability, which means an adversary cannot deanonymize transactions by simply looking at the blockchain. However, the proofs used in Hawk have a much better security property, called Universal Composability (UC): an adversary cannot deanonymize transactions, even if they can execute arbitrary code while they're interacting with the protocol. Ledger indistinguishability simply isn't a good enough security property for a smart contracts platform, simply because smart contracts are designed to allow you to execute arbitrary code while interacting with the protocol. Therefore, unless ZoE incorporates this, their security might no longer be sufficient when applied to smart contracts.

I do hope all these points are legible. SNARKs are still a little abstract for me, but I'm learning.
adaptivedev
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
September 14, 2017, 05:13:34 AM
 #6

What's the status now, especially on releasing the source-code? I tried to contact the team.
voltairine (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
October 22, 2017, 07:45:12 PM
 #7

What's the status now, especially on releasing the source-code? I tried to contact the team.

I recently contacted them as well, plus one of my friends has, all with no response.

I would recommend contacting the lead author of the paper, Ahmed Kosba. I emailed him about Hawk several months ago; he's the one who told me they were hoping to release at least part of the source by the end of last semester (so far, they haven't). I bet he will respond if you email him; let me know how it goes if you do.

~ Bolt
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!