Coda Code Review Of A Constant Sized Blockchain
Yes I know that Coda Code Review sounds like I’m discussing the merits of a popular soda. But actually it’s the project that has the fizz. The Coda protocol basically aims to keep cryptocurrency decentralized and inexpensive so that blockchain verification is available to anyone. So here we go, decentralization, scalability, security all in one?
Website claims it’s the “First cryptocurrency protocol with a constant-sized blockchain.” Constant-sized blockchain. “Coda compresses the entire blockchain into a tiny snapshot the size of a few tweets”.
“Coda uses recursive composition of zk-SNARKs to compress the whole blockchain down to the size of a few tweets. No one needs to store or download transaction history in order to verify the blockchain.”
zk-SNARK, Zero Knowledge proofs.
Proving something without the verifier having any knowledge of what you have. So, private/public keys are exactly that. If I give you an encrypted message, I give you the unencrypted message, and my public key, you can see that the signed message was signed by the public key’s corresponding private key, thus proving the private key, even though you didn’t need to know anything.
Coda is attempting to recursively apply zk-SNARK’s to the blockchain to continuously reduce it until a fixed size is reached. To unwind this, you would need each previous proof until the full blockchain is unwound, alternatively each account would need its own proof of balance to prove its state, but this would be time sensitive, since I could use the same proof for 2 different people. Lots of questions, let’s head over to the whitepaper.
I do not recommend trying to read the whitepaper. I still have the exact same questions. I’ll give this another try later, let’s jump into code.
Just snarky for now. OCaml… This is going to be painful.
Snarky was built by Izaak Meckler, I see it has even reached a few zcash mailing lists. Curious if it was based off of the paper by Jens Groth and Mary Maller.
This code was definitely not meant for third parties to consume, but it’s good.
The examples are fantastic.
The library is well designed and works well. Izaak definitely knows his zk-SNARKS.
Coda Code Review Conclusion
Really good code, great library, definitely know their snarks, at the same time I’m struggling to visualize the idea, perhaps with a list of proofs that are reversible, and block number based balance proofs this could work, but the idea of a fixed size is giving me pause.
I think there is definitely something here, but I’m not sure what yet. Definitely one to watch closely.
Disclaimer: Crypto Briefing code reviews are performed by auditing what is on display in the master branch of the repo’s made available. This was performed as an educational review and any comments in the article are the opinion of the writer. It is normal for code to change rapidly, hence we timestamp our code reviews so that they present a snapshot at a moment in time. Information contained herein should not be used as any comment or advice on the project as a whole.
Coda Code Review Timestamp: May 25th, 2018 at 11:19 GMT
Source: Read Full Article