Skip to content
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

Modelling confidential vs explicit transaction outputs #67

Closed
thomaseizinger opened this issue Dec 13, 2020 · 2 comments
Closed

Modelling confidential vs explicit transaction outputs #67

thomaseizinger opened this issue Dec 13, 2020 · 2 comments

Comments

@thomaseizinger
Copy link
Contributor

As mentioned here, this is a dedicated issue for discussing our attempt at re-modelling confidential and explicit transactions.

We assumed that a TxOut can either confidential or explicit - i.e. both the asset and the value are either confidential or explicit - but this turned out to not be true.

To be honest, I don't fully understand what a "pre-asset" confidential transaction is? Can I read up on this somewhere to get an overview of what the usecases are and what they look like on-chain?

@thomaseizinger
Copy link
Contributor Author

After having worked with the model in our fork for a while, the most useful APIs turned out to be the conversion functions into_explicit and into_confidential on TxOut: https://github.com/comit-network/waves/blob/b4a4dfa746784429f4711e72928f156bc191702d/elements-fun/src/transaction.rs#L709-L735

For these APIs to exist, we would not necessarily have had to do all the re-modelling that we did so I am thinking of contributing such functions back to rust-elements so we don't have to maintain our fork :)

That should combine the best of both worlds:

  • being able to parse all kinds of combinations of explicit vs confidential information
  • having better support from the type system in deal with fully explicit vs fully confidential TxOuts

@thomaseizinger
Copy link
Contributor Author

Resolved in #78 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant