Skip to content

Conversation

@niftynei
Copy link
Collaborator

@niftynei niftynei commented Jul 10, 2020

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

@niftynei niftynei requested a review from cdecker as a code owner July 10, 2020 23:51
@niftynei niftynei mentioned this pull request Jul 10, 2020
niftynei added 8 commits July 12, 2020 17:39
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...
@niftynei niftynei force-pushed the nifty/blessed-branch branch from 1aeb9ff to 94318f9 Compare July 12, 2020 22:39
Copy link
Contributor

@rustyrussell rustyrussell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack 94318f9

Minor leak fix can be done later...


/* FIXME: persist blinded values */
if (asset->value == 0)
return NULL;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leak? Try return tal_free(val)?

@rustyrussell
Copy link
Contributor

Rebased #3825 on this and it worked. Nice!

@rustyrussell rustyrussell merged commit ccb7871 into ElementsProject:master Jul 13, 2020
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 this pull request may close these issues.

2 participants