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

fix: bitcoind version breaks some recent psbt tests #4144

Closed
m-schmoock opened this issue Oct 21, 2020 · 12 comments
Closed

fix: bitcoind version breaks some recent psbt tests #4144

m-schmoock opened this issue Oct 21, 2020 · 12 comments

Comments

@m-schmoock
Copy link
Collaborator

Issue and Steps to Reproduce

Running the recently added PSBT tests on a pre 0.20 bitcoind seems to fail. Whereas they work with recent versions of bitcoind (At least they work with 0.20.1 but not 0.19.1)

Affected tests:

tests/test_wallet.py::test_fundpsbt
tests/test_wallet.py::test_utxopsbt
tests/test_wallet.py::test_sign_and_send_psbt

Message:

bitcoin.rpc.JSONRPCError: {'code': -22, 'message': 'TX decode failed PSBT is not sane.: iostream error'}
@darosior
Copy link
Collaborator

Must be due to some fixes in https://bitcoincore.org/en/releases/0.20.0/ or https://bitcoincore.org/en/releases/0.20.1/ to RPC calls used in these tests. AFAICT this does not affect our minimum supported bitcoind version.

@niftynei
Copy link
Collaborator

This is working as intended. See bitcoin/bitcoin#19215

@niftynei
Copy link
Collaborator

niftynei commented Oct 21, 2020

tl;dr: we add both witness-utxo and non-witness-utxo data to PSBTs, which any bitcoind prior to 0.20.1* fails as invalid due to the strictness of the parser contained therein. As mentioned in the linked PR, this makes us compatible with hardware wallets which enforce providing the entire tx for verification.

* might be v0.20.0, not sure when that PR got merged in bitcoind

@niftynei
Copy link
Collaborator

fwiw this is currently a problem for the elementsd integration which is still on v0.18.0. I've notified the maintainers and it should be fixed/updated when they update elementsd to support the latest.

@m-schmoock
Copy link
Collaborator Author

m-schmoock commented Oct 22, 2020

@niftynei we could programatically disable the tests on older bitcoind versions as well...

@niftynei
Copy link
Collaborator

niftynei commented Oct 22, 2020 via email

@m-schmoock
Copy link
Collaborator Author

m-schmoock commented Oct 22, 2020

Okay, then we should update the Readme ;) didn't know that.

https://github.com/ElementsProject/lightning/blob/master/README.md#getting-started

c-lightning only works on Linux and Mac OS, and requires a locally (or remotely) running bitcoind (version 0.16 or above) that is fully caught up with the network you're running on, and relays transactions (ie with blocksonly=0). Pruning (prune=n option in bitcoin.conf) is partially supported, see here for more details.

@m-schmoock
Copy link
Collaborator Author

@niftynei also, we should stop the daemon from running on older versions if thats true.

@darosior
Copy link
Collaborator

darosior commented Oct 22, 2020 via email

@m-schmoock
Copy link
Collaborator Author

Isn't that PSBT stuff for dual funding and such? Thats currently experimental.. so yes, maybe its currently only developers. but that will soon change then I guess..

@darosior
Copy link
Collaborator

darosior commented Oct 22, 2020

Isn't that PSBT stuff for dual funding and such?

iirc it's not required by the specs but eases management

but that will soon change then I guess..

I don't expect us to use more calls to bitcoin-cli (for something else than testing), we finalize the PSBT before broadcasting anyways

@m-schmoock
Copy link
Collaborator Author

Lets give @niftynei the final call to close this issue then :D

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

No branches or pull requests

3 participants