* [bitcoindev] Who uses or wants to use PSBTv2 (BIP370)
@ 2025-01-17 9:16 Sjors Provoost
2025-01-17 9:45 ` Salvatore Ingala
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Sjors Provoost @ 2025-01-17 9:16 UTC (permalink / raw)
To: bitcoindev
[-- Attachment #1: Type: text/plain, Size: 1419 bytes --]
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
--
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+unsubscribe@googlegroups•com.
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/6FDAD97F-7C5F-474B-9EE6-82092C9073C5%40sprovoost.nl.
[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [bitcoindev] Who uses or wants to use PSBTv2 (BIP370)
2025-01-17 9:16 [bitcoindev] Who uses or wants to use PSBTv2 (BIP370) Sjors Provoost
@ 2025-01-17 9:45 ` Salvatore Ingala
2025-01-17 10:38 ` Kalle Rosenbaum
2025-01-17 10:01 ` Kalle Rosenbaum
2025-01-17 14:53 ` [bitcoindev] " Andrew Toth
2 siblings, 1 reply; 6+ messages in thread
From: Salvatore Ingala @ 2025-01-17 9:45 UTC (permalink / raw)
To: Sjors Provoost; +Cc: bitcoindev
[-- Attachment #1: Type: text/plain, Size: 1466 bytes --]
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
[0] https://www.ledger.com/blog/bitcoin-2
--
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+unsubscribe@googlegroups•com.
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/CAMhCMoGONKFok_SuZkic%2BT%3DyoWZs5eeVxtwJL6Ei%3DyysvA8rrg%40mail.gmail.com.
[-- Attachment #2: Type: text/html, Size: 2022 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [bitcoindev] Who uses or wants to use PSBTv2 (BIP370)
2025-01-17 9:16 [bitcoindev] Who uses or wants to use PSBTv2 (BIP370) Sjors Provoost
2025-01-17 9:45 ` Salvatore Ingala
@ 2025-01-17 10:01 ` Kalle Rosenbaum
2025-01-17 14:53 ` [bitcoindev] " Andrew Toth
2 siblings, 0 replies; 6+ messages in thread
From: Kalle Rosenbaum @ 2025-01-17 10:01 UTC (permalink / raw)
To: Sjors Provoost; +Cc: bitcoindev
[-- Attachment #1: Type: text/plain, Size: 2261 bytes --]
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
On Fri, 17 Jan 2025 at 10:17, Sjors Provoost <sjors@sprovoost•nl> wrote:
> 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
>
> --
> 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+unsubscribe@googlegroups•com.
> To view this discussion visit
> https://groups.google.com/d/msgid/bitcoindev/6FDAD97F-7C5F-474B-9EE6-82092C9073C5%40sprovoost.nl
> .
>
--
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+unsubscribe@googlegroups•com.
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/CAPswA9w0YGecAQ4ON43mL_Cj2WL3rcV5seUyyXJ%3D3aVx6zpTzQ%40mail.gmail.com.
[-- Attachment #2: Type: text/html, Size: 3908 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [bitcoindev] Who uses or wants to use PSBTv2 (BIP370)
2025-01-17 9:45 ` Salvatore Ingala
@ 2025-01-17 10:38 ` Kalle Rosenbaum
2025-01-17 13:02 ` Salvatore Ingala
0 siblings, 1 reply; 6+ messages in thread
From: Kalle Rosenbaum @ 2025-01-17 10:38 UTC (permalink / raw)
To: Salvatore Ingala; +Cc: Sjors Provoost, bitcoindev
[-- Attachment #1: Type: text/plain, Size: 2456 bytes --]
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
On Fri, 17 Jan 2025 at 11:03, Salvatore Ingala <salvatore.ingala@gmail•com>
wrote:
> 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
>
> [0] https://www.ledger.com/blog/bitcoin-2
>
> --
> 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+unsubscribe@googlegroups•com.
> To view this discussion visit
> https://groups.google.com/d/msgid/bitcoindev/CAMhCMoGONKFok_SuZkic%2BT%3DyoWZs5eeVxtwJL6Ei%3DyysvA8rrg%40mail.gmail.com
> <https://groups.google.com/d/msgid/bitcoindev/CAMhCMoGONKFok_SuZkic%2BT%3DyoWZs5eeVxtwJL6Ei%3DyysvA8rrg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
--
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+unsubscribe@googlegroups•com.
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/CAPswA9xbtbEfj-QmnAXj1m1R%2BGap-Bd9vs8ed1ueA5gGtD-pYw%40mail.gmail.com.
[-- Attachment #2: Type: text/html, Size: 3571 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [bitcoindev] Who uses or wants to use PSBTv2 (BIP370)
2025-01-17 10:38 ` Kalle Rosenbaum
@ 2025-01-17 13:02 ` Salvatore Ingala
0 siblings, 0 replies; 6+ messages in thread
From: Salvatore Ingala @ 2025-01-17 13:02 UTC (permalink / raw)
To: Kalle Rosenbaum; +Cc: Sjors Provoost, bitcoindev
[-- Attachment #1: Type: text/plain, Size: 2872 bytes --]
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
On Fri, 17 Jan 2025 at 11:38, Kalle Rosenbaum <kalle@rosenbaum•se> wrote:
> 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
>
> On Fri, 17 Jan 2025 at 11:03, Salvatore Ingala <salvatore.ingala@gmail•com>
> wrote:
>
>> 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
>>
>> [0] https://www.ledger.com/blog/bitcoin-2
>>
>> --
>> 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+unsubscribe@googlegroups•com.
>> To view this discussion visit
>> https://groups.google.com/d/msgid/bitcoindev/CAMhCMoGONKFok_SuZkic%2BT%3DyoWZs5eeVxtwJL6Ei%3DyysvA8rrg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/bitcoindev/CAMhCMoGONKFok_SuZkic%2BT%3DyoWZs5eeVxtwJL6Ei%3DyysvA8rrg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>
--
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+unsubscribe@googlegroups•com.
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/CAMhCMoGArSJ1_x2yhqUuedVpBZt1iPwioujJCH2eLVPEy9_QNA%40mail.gmail.com.
[-- Attachment #2: Type: text/html, Size: 4281 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bitcoindev] Re: Who uses or wants to use PSBTv2 (BIP370)
2025-01-17 9:16 [bitcoindev] Who uses or wants to use PSBTv2 (BIP370) Sjors Provoost
2025-01-17 9:45 ` Salvatore Ingala
2025-01-17 10:01 ` Kalle Rosenbaum
@ 2025-01-17 14:53 ` Andrew Toth
2 siblings, 0 replies; 6+ messages in thread
From: Andrew Toth @ 2025-01-17 14:53 UTC (permalink / raw)
To: Bitcoin Development Mailing List
[-- Attachment #1.1: Type: text/plain, Size: 1863 bytes --]
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.
On Friday, January 17, 2025 at 4:17:49 AM UTC-5 Sjors Provoost wrote:
> 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
--
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+unsubscribe@googlegroups•com.
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/30737859-573e-40ea-9619-1d18c2a6b0f4n%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 4053 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-01-17 15:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-17 9:16 [bitcoindev] Who uses or wants to use PSBTv2 (BIP370) Sjors Provoost
2025-01-17 9:45 ` Salvatore Ingala
2025-01-17 10:38 ` Kalle Rosenbaum
2025-01-17 13:02 ` Salvatore Ingala
2025-01-17 10:01 ` Kalle Rosenbaum
2025-01-17 14:53 ` [bitcoindev] " Andrew Toth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox