Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
coda is a very ambitious constant size blockchain project. yes, constant size regardless of how many transactions. combination of merkle roots and zksnark proofs. while it doesnt add privacy, the constant size blockchain is a very intriguing feature.
The big issue is that coda is in ocaml...
One area to increase reliability is to encapsulate the ocaml into a C callable library (which appears to be possible with ocaml) and then spawn a dedicated thread to avoid IPC issues. I can see where this could allow for more efficient and reliable runtime, though it is quite possible a dual-daemon approach will be acceptable too.
Let us consider the packaging of the ocaml a separate subproblem. Regardless of how it is integrated with the komodo codebase, the same things would need to be done.
The following is what I envision as a model for integrating a coda based chain into the "legacy" chain. it takes inspiration from the zcash model where taddr and zaddr coexist in the same daemon, even if they are really almost totally independent. only the t->z and z->t transactions that share the same currency base makes it the same coin.
So, using a similar idea, given -ac_code=1 parameter, the coda burn protocol is activated. What is needed for this is a way to burn komodo side coins via opreturn and attached coda address and have that exact amount created and validated on the coda side. Conversely, there needs to be a way to burn coda coins with a komodo style destination that makes the coins unspendable on the coda side, but where the komodo side can query the coda daemon to validate it and create coins (exactly once) for each coda burn.
there is a coin import protocol already for the komodo side that can be repurposed for creating a unique utxo, but on the coda side the burn address and away to create coins from a validated burn needs to be added.
other important things would be to be able to tune things like coda mining rewards, network parameters, and whatever chainparams it makes sense to be tunable. The assetchains calculation of p2p port and rpc port maybe can be used to initialize the p2p and rpc port for the coda chain.