Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Who uses or wants to use PSBTv2 (BIP370)

148 views
Skip to first unread message

Sjors Provoost

unread,
Jan 17, 2025, 4:17:49 AMJan 17
to bitco...@googlegroups.com
Dear list,

It's been a few years since BIP370 was proposed [0]. It's a backwards compatible change to the PSBT standard defined by BIP174 [1]. Its main benefit is the ability to add new inputs and outputs to a transaction.

There's a Bitcoin Core pull request #21283 implements support [2], but has seen very little review so far. Being able to test it against other implementation would aid in review.

So which projects are using PSBTv2 or would very much like to?

So far I've learned that Core Lightning uses it. They convert it back to v0 when interacting with Bitcoin Core, which they find suboptimal [3].

Feel free to answer here on Stack Exchange [4].

Kind regards,

Sjors Provoost

[0] https://github.com/bitcoin/bips/blob/master/bip-0370.mediawiki
[1] https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki
[2] https://github.com/bitcoin/bitcoin/pull/21283
[3] https://github.com/bitcoin/bitcoin/pull/21283#issuecomment-2597171643
[4] https://bitcoin.stackexchange.com/questions/125384/who-uses-or-wants-to-use-psbtv2-bip370
signature.asc

Salvatore Ingala

unread,
Jan 17, 2025, 5:03:34 AMJan 17
to Sjors Provoost, bitco...@googlegroups.com
Hi Sjors,

The Ledger Bitcoin app uses PSBTv2 since version 2.0.0 in 2021 [0], quite possibly the first adopter - although for somewhat unusual reasons.

Working with embedded devices with just a few kb of RAM, even sending the entire PSBT is not generally feasible.
Therefore, the client instead sends a 'merkleized' commitment to the entire PSBT at the beginning of the signing process.
This enables the device to obtain random access to the PSBT by querying the client (who provides the data - and the Merkle proof - on demand).

In PsbtV0, the unsigned transaction is a binary blob, which was a huge headache because the device had to parse it while streaming it (and therefore, no RAM access to the individual transaction fields is possible).
PsbtV2 fixed this by having the transaction already 'parsed' into individual fields.

The companion client libraries of the Ledger Bitcoin app support both versions, and PsbtV0 is converted to PsbtV2 on the fly.
Broader support would certainly be useful.

Best,
Salvatore Ingala

Kalle Rosenbaum

unread,
Jan 17, 2025, 5:03:38 AMJan 17
to Sjors Provoost, bitco...@googlegroups.com
Sjors,

Ledger has a PSBTv2 implementation since a number of years back. It's used for communication between their Ledger Live software and the hardware wallet. https://github.com/LedgerHQ/ledger-live/blob/03b94dae50b1177801c57d9cee14cb5b4752b075/libs/ledgerjs/packages/hw-app-btc/src/newops/psbtv2.ts

/Kalle

--
You received this message because you are subscribed to the Google Groups "Bitcoin Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bitcoindev+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/6FDAD97F-7C5F-474B-9EE6-82092C9073C5%40sprovoost.nl.

Kalle Rosenbaum

unread,
Jan 17, 2025, 7:23:27 AMJan 17
to Salvatore Ingala, Sjors Provoost, bitco...@googlegroups.com
I might have linked to a slightly outdated version of ledger's psbtv2. I haven't been involved lately. The correct one could be https://github.com/LedgerHQ/app-bitcoin-new/blob/53dfd1727ab55182f9e365747b26b862e48b7b8b/bitcoin_client_js/src/lib/psbtv2.ts. Is that right, Salvatore?

/Kalle

--
You received this message because you are subscribed to the Google Groups "Bitcoin Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bitcoindev+...@googlegroups.com.

Salvatore Ingala

unread,
Jan 17, 2025, 8:48:27 AMJan 17
to Kalle Rosenbaum, Sjors Provoost, bitco...@googlegroups.com
Yes, but it is to be noted that all the Psbt implementations in the various Ledger client libraries are bare bones, containing just what's needed for the communication protocol.
They are not general purpose and not otherwise complete (nor planned to become so).

Best,
Salvatore Ingala

Andrew Toth

unread,
Jan 17, 2025, 10:17:52 AMJan 17
to Bitcoin Development Mailing List
BIP375 Sending Silent Payments with PSBTs uses PSBTv2, specifically the PSBT_OUT_SCRIPT field.

For silent payments, the output script is not known at the time of creation, so it's not possible to create an unsigned transaction with an output script as required in v0.
Reply all
Reply to author
Forward
0 new messages