libwally-core blessed branch (PSETs and other fixes)#3827
Merged
rustyrussell merged 8 commits intoElementsProject:masterfrom Jul 13, 2020
Merged
libwally-core blessed branch (PSETs and other fixes)#3827rustyrussell merged 8 commits intoElementsProject:masterfrom
rustyrussell merged 8 commits intoElementsProject:masterfrom
Conversation
Closed
we're moving over to elements!
and then use it to print out things
We don't preserve detailed asset information at the moment, so provide a way to convert from a sat to an amount_asset struct. We also need a way to convert from an 'amount_asset' to a 'value' for elements, which for explicit (i.e. non-blinded) asssets is a 0x01 prefix plus the big-endian encoded value.
PSETs have a bit different requirements. The witness_utxo needs the asset tag + values, and these should also be added to the PSET struct separately as well. To do this, we create a new 'init' method for elements inputs, which takes care of the elements specific things.
The amount we expect back, post change, is different for an elements tx
They don't contain addresses
no idea why the fees are different here now post pset, but lo and behold they are...
1aeb9ff to
94318f9
Compare
rustyrussell
approved these changes
Jul 13, 2020
Contributor
rustyrussell
left a comment
There was a problem hiding this comment.
Ack 94318f9
Minor leak fix can be done later...
|
|
||
| /* FIXME: persist blinded values */ | ||
| if (asset->value == 0) | ||
| return NULL; |
Contributor
There was a problem hiding this comment.
Leak? Try return tal_free(val)?
Contributor
|
Rebased #3825 on this and it worked. Nice! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR forks away libwally-core to use a branch that contains working PSETs and the ability to init transactions with no outputs (as needed by #3825).
libwally-core branch can be found here: https://github.com/niftynei/libwally-core/tree/nifty/blessed-branch; the full patchset is probably best viewed in this draft PR however: ElementsProject/libwally-core#208
Closes #3784