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

Elements PSBT / test fixup #4033

Merged
merged 10 commits into from
Sep 10, 2020

Conversation

niftynei
Copy link
Collaborator

@niftynei niftynei commented Sep 9, 2020

We should be using the elements tx_output, which includes the value + asset info required by the PSBT's sighash signing algorithm.

This fixes that, plus adds back in some 'nice to have' extra PSET info (value + assset fields) for PSBTs constructed by utxopsbt / fundpsbt.

Finally, we allow the test_sign_and_send test to run on travis!

Edit: there were some other elements failures, those should be fixed now.

@niftynei niftynei added this to the v0.9.1 milestone Sep 9, 2020
bitcoin/psbt.c Outdated Show resolved Hide resolved
Elements requires the witness utxo to include the asset and value info,
in order for the signing hash to be constructed correctly

Changelog-Fixed: elementsd: PSBTs include correct witness_utxo struct for elements transactions
Not strictly necessary as technically this info is included in the
witness_utxo, but nice to have
Now that we're using an 'elements' witness_utxo and issue 3998 has been
resolved, this should work as expected.
We're moving away from bitcoin_tx, slowly
This will update the fee output if it exists, rather than unilaterally
adding a new one.

Also, if the fee output already exists, we should make sure that it
doesn't interfere with the outnums of the other outputs
In the case that you've got more than one fee output already on a
psbt, we consolidate them into a single fee output (the first)
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 6cf66e6

@rustyrussell rustyrussell merged commit 165d039 into ElementsProject:master Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants