You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add ability to blind only value in the PSET output #301
As the title says, it would be nice to allow the conditional blinding of an output where only the value should be blinded
This would help with writing protocols with Simplicity contracts that care only about the asset but are fine with the value being confidential
I would like to understand whether it is Ok to add an opt-in API for explicit, value-only, and asset-and-value outputs. It should preserve the behavior of existing blinding methods and reuse the existing balancing and proof machinery
Yep, concept ACK, though I'm not exactly sure what the API should look like. But we did deliberately design the consensus protocol and PSET so that this should be possible.
4. Opened #302 for the discussion of API
The implementation there is just to prove that the concept works, I would rewrite it after we align on API itslef
Yeah, I think it's fine to just extend the error enum. I could be convinced either way about making a new one, so let's just stick with the simple solution.
Yeah, factoring out the sanity checks is a good idea. Arguably, these checks passing should be an invariant of the type. (But it's hard to enforce invarants of this massive map-of-map-of-maps type, so we don't need to worry about that for now.)
This clone seems like the right choice. Would be pretty complicated to get this "rollback on error" behavior without it.
Activity
apoelstra commentedon Oct 14, 2026
Yep, concept ACK, though I'm not exactly sure what the API should look like. But we did deliberately design the consensus protocol and PSET so that this should be possible.
KyrylR commentedon Oct 20, 2026
Opened #302 for the discussion of API
The implementation there is just to prove that the concept works, I would rewrite it after we align on API itslef
KyrylR commentedon Oct 20, 2026
Above are core API choices
Overall user could provide an empty set and the blinding will happen for both value and asset
If user wants to value only blind, the user would need to explicitly specify so
I was not able to avoid re-implementing the blinding (reusing blind last, or something like that)
Will wait for your feedback
apoelstra commentedon Oct 22, 2026
I would prefer
BlindingModehold a pair of booleansblind_assetandblind_value. All four possibilities are legitimate.KyrylR commentedon Oct 28, 2026
I have updated the https://github.com/ElementsProject/rust-elements/pull/302/changes (sketch PR)
Core questions:
Is it Ok to extended the
PsetBlindErrortype or better to create new one?For refactoring purposes I would move
into
blinding_checksfunctionOverall this is it in regard to my questions, if you notice anything else, pls let me know
apoelstra commentedon Nov 2, 2026
cloneseems like the right choice. Would be pretty complicated to get this "rollback on error" behavior without it.