-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CPS-???? | Lack of Concise Transaction Inclusion Proofs #964
base: master
Are you sure you want to change the base?
CPS-???? | Lack of Concise Transaction Inclusion Proofs #964
Conversation
Hey @aslesarenko Thanks for this proposal, I really enjoyed reading it. One high level scoping comment to add; Is using merkle trees within block header the only solution to this problem? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
coming up for introduction (not detailed review) at biweekly CIP meeting in a half-hour's time - @aslesarenko you are welcome to attend: https://hackmd.io/@cip-editors/104
Co-authored-by: Robert Phair <rphair@cosd.com>
@Ryun1, yes, this is the essence of what it will enable once implemented. And such proofs in turn will enable lots of use cases. @rphair, just got to this message, too late for the meeting. BTW, I couldn't find the info on how to attend it (is it a scheduled Meets call?). |
@aslesarenko you can subscribe for notifications & scheduling here (https://lu.ma/cardano-cip) and follow this Discord invitation (https://discord.gg/J8sGdCuKhs) ... see CIP Wiki > Key links & resources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At today's CIP meeting we didn't have the opportunity to resolve the issue about "scope" in the last couple substantial comments above: since the content defines the problem (as per a CPS) but its title suggests a particular solution (as per a CIP solving that CPS).
I made the suggestion that only the title itself might be overly specific, and that the rest of the document roundly covers a number of solutions and should itself be considered a valid CPS already.
Rather than mark this Unconfirmed
(as sounding too specific for a CPS) or Confirmed
with the current title (perhaps requiring you to produce a CIP implementing the favoured solution), therefore I suggested:
- to retitle this PR & document with a more general title that covers all the implied solutions
- to leave this marked
Triage
to ensure we settle the scope & title questions no later than the next CIP meeting: where it will also be on the agenda & which you @aslesarenko are now subscribed to attend.
Ergo has this (Merkle-root of transactions in block header), see here. This is incredibly useful for interoperability (especially the Bitcoin / Cardano BitVMX zero-knowledge bridge work), L2s (Midgard) and even state channels (Hydra). By having this on Cardano L1, it would allow Midgard instances to see / prove events that happened in other (whitelisted / known) Midgard instances via the Cardano L1 block information. This is an incredibly power feature that would allow us to design applications that are able to read, consume and react to events across the Cardano L1 (and all Cardano based L2s). Even more so, this allows us to easily create dApps that are interoperable with other dApps on the L1 across multiple transactions, (ie. An insurance protocol that automatically reinforces users' collateral positions if they are at risk of liquidations or pays out an insurance claims if a token (ie. stablecoin) drops in value by X% over Y period of time). Please, please, please can we make this happen. |
Following from @aslesarenko's introduction at tonight's CIP meeting and #964 (review) plus @Crypto2099's specific recommendations, we've agreed to give this a number pending the assignment of a more general title that doesn't overtly favour the "Merkle Root" specifically as the solution for the identified interoperability problem. @aslesarenko we look forward to confirming a new title (maybe something simpler like "transaction inclusion proofs in block header") and then we can assign a number and change it to |
@rphair, abstracting from a concrete implementation the following key points nevertheless should be reflected in the title:
So, here are the variants, which don't assume any specific implementation approach:
|
Thanks @aslesarenko for considering the naming issue. The editors brainstormed — also considering the typical / maximum CIP world length you can observe here — and came up with (courtesy of @Ryun1):
This has the advantage of immediately getting the human reader's attention if they have encountered or considered this problem: whether coming from Cardano or elsewhere. |
@rphair I read "Block Inclusion Proofs" as "proofs that block is included somewhere" or "proofs about blocks", where as problem is to have "proofs about transactions" or "proof that transaction is included". So, how about "Lack of Concise Transaction Inclusion Proofs"? |
@aslesarenko that's the same thing I was thinking. Yes, let's use the latter 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this higly overlaps with CPS-0019
|
||
## Problem | ||
|
||
Cardano headers do not expose a merkle root hash of all transactions included in a block. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This problem statement already poses a solution, namely the addition of a data structure like a merkle tree to each block.
I think what you are trying to abstract to is twofold:
- The desire to proof if a block is onchain
- Given a block and such a proof, easily extract data from it to prove usefull statements.
A usefull statement that you suggest is getting transactions, but this is just an example.
How much of this aligns with this CPS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addition of a data structure like a merkle tree to each block
Nope, I only propose to add tree root hash to block header, the tree itself is not stored as it is not necessary.
The tree root hash is different from a simple hash because it enables partial authentication of block content (with per transaction granularity, but other data can also be supported).
In particular, having a full block it is possible to create a compact proof containing individual transaction + merkle path to the root hash. This path is the key, because it is compact and can be verified against what is stored in the header.
How much of this aligns with #942 CPS?
If implemented, this proposal will simplify implementation of both light clients for Cardano + many L2 dApps on top of Cardano.
Co-authored-by: Thomas Vellekoop <107037423+perturbing@users.noreply.github.com>
Minotaur, a sub-project of Partner Chains, utilizes light clients to follow state changes on integrated blockchains through a trust-minimized state bridge.
Previously, we implemented a proof of concept for Ethereum, using its existing features to enable this design. Our goal was to replicate a similar approach for Cardano using Mithril. However, both Cardano and Mithril currently lack certain features necessary for achieving parity with the Ethereum implementation.
This CPS describes the missing component on the Cardano side.
(rendered proposal)