Our submission for ETH Singapore 2018
We had planned to implement a simple version of an Ethereum sidechain based on zk-snarks. This sidechain would improve scalability by batching transactions into one snark proof to be validated on-chain. In theory, the performance costs of validating
n transactions via a snark proof would be far lower than performing those
n transactions on-chain. Additionally, the cryptographic security of snark proofs would eliminate the need for challenge mechanisms found in Plasma sidechain designs.
Our plan for the hackathon was to make the sidechain as simple as possible. It was based on barryWhitehat's
roll_up specification and would only perform ETH transfers.
One significant motivation for picking this challenge was that the
snarkjs libraries by iden3 seemed mature and feature-complete enough for this task. In particular,
circomlib came packaged with EdDSA signature validation, a Pederson snark-friendly hash function, and various bit manipulation components.
Ultimately, we did not complete a functioning demo, but implemented the following components:
- off-chain Merkle proof generation and validation, as well as state transition logic
- off-chain database which stores transactions and serves queries from an operator
- a zk-snark circuit that validates signed sidechain transactions
We underestimated the time and effort needed to validate a Merkle proof in a snark circuit, so that piece isn't complete. Nevertheless, we each learned a lot from this exercise and we plan to keep working on this project. We plan to first get this basic implementation running, and then collaborate with others to think about optimisation (both in terms of performance and design).