Replies: 2 comments 9 replies
-
We really need to engage with light wallet users and developers in order to understand exactly what's the need. I wonder if providing the UTxO is really that important, perhaps they would rather want a certified history of their wallet's transactions (and then compute the UTxO themselves because it's trivial)? But apart from that, this is a great writeup covering the core technical issues at stake with this feature. |
Beta Was this translation helpful? Give feedback.
-
(Apologies for jumping in, I randomly noticed this discussion in my Github notifications.) I have a question: How much resources does the Mithril client use when verifying the certificate chain? I'm asking because there is a fundamental trade-off between trust and speed. Light wallets can be fast because they trust a third party (here: Lace backend) to provide accurate information. A wallet that does not want to trust a third party will have to invest resources into verification. For example, one option is to trust a local For comparison, at the time of this writing, a |
Beta Was this translation helpful? Give feedback.
-
This discussion is a first draft of the design we have imagined for light wallet implementation of Mithril.
We are expecting contributions and feedback in order to create the best possible use-case.
Why
The Mithril team is attempting to define how light wallet users could benefit from Mithril certification.
Today, light wallet users rely on third party providers to retrieve these information, and they must trust them.
Can the Mithril protocol be used as a trustless provider for these UTxO information?
The problem we are trying to solve can be summarized with the question:
What
Assumptions
We are assuming that the users are interacting with the blockchain in the following manner:
Note: For ease of presentation, we will focus on the usage by Lace.
The current Trusted setup
How it works
Currently, Lace is interacting with a remote backend to retrieve the wallet balances, as explained below:
This is an example request that is sent by Lace to the backend:
This is the response from the backend:
This is the wallet balance displayed in Lace:
Summarized flow
Security guarantees
There is no proof that the UTxO are genuine, i.e. the wallet user must trust the backend provider.
The proposed Trustless setup
How it would work
Coarse-grained level
Lace would interact as before with its backend to retrieve non certified UTxOs. It would then interact with a a Mithril client running in the browser (e.g. as WASM), as follows:
Fine-grained level
Under the hood, the Mithril client verifies the cryptographic proofs and the associated Mithril certificates that it retrieves from a Mithril aggregator:
This is an example request that would be sent by Mithril client to the Mithril aggregator:
This is an example of the response that would be sent by the Mithril aggregator:
The response includes a new entry for each address with the information needed to verify the validity of the UTxO retrieved:
The validity of the UTxO is given by the following information:
In order to verify these information, Lace would need to verify it with a light Mithril client running in the browser (in WASM) as an intermediary step before displaying the wallet balance (this would be repeated for each address UTxO returned by the backend):
This is the way the wallet balance could be displayed in Lace:
Summarized flow
Detailed flow
Security guarantees
This setup would provide a cryptographic proof that the UTxO are genuine. This means that the security provided is equivalent to the security of the Mithril protocol, i.e. the wallet user does not need to trust the backend provider.
Notes
(1): The delay before a UTxO can be certified depends greatly of the finality of the Cardano chain itself (i.e.
2160
blocks or~12
hours). However, we think that we could probably shrink this delay by leveraging the properties of the Mithril protocol itself. Our research team is actively investigating this subject.(2): The best option would be to rely on a Sparse Merkle Tree that would provide proofs of membership and proofs of non membership. A proof of non membership would be used in case no UTxO is associated to the address.
(3): For more information about the Mithril protocol, please refer to this document https://mithril.network/doc/mithril/mithril-protocol/protocol.
(4): The Mithril client communicates with a Mithril aggregator to retrieve a certificate chain, and makes sure that is is valid. For more information about the certificate chain, please refer to this document https://mithril.network/doc/mithril/mithril-protocol/certificates.
Beta Was this translation helpful? Give feedback.
All reactions