Coda Code Review Of A Constant Sized Blockchain
The Coda code review here examines a protocol that basically aims to keep cryptocurrency decentralized and inexpensive so that blockchain verification is available to anyone. Here we go, decentralization, scalability, security all in one? They claim a "constant-sized blockchain" so let's look at Coda.
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ā.
What?
ā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.
(Time passes.)
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.
The news moving money, markets, and the world—before your day starts.
Daily. Free. Join 34,000+ readers across crypto, finance, and policy.


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