public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
* [bitcoindev] Announcing Bitcoin BOSD: Standardized Withdrawal Output Specification for L2s
@ 2025-02-15 11:37 Jose Storopoli
  2025-02-16  8:50 ` Martin Habovštiak
  2025-02-19  2:29 ` David A. Harding
  0 siblings, 2 replies; 3+ messages in thread
From: Jose Storopoli @ 2025-02-15 11:37 UTC (permalink / raw)
  To: Bitcoin Development Mailing List


[-- Attachment #1.1: Type: text/plain, Size: 3199 bytes --]


Dear Bitcoin Dev Community, 

I am excited to introduce Bitcoin BOSD (Bitcoin Output Script Descriptor), 
a new specification and open source Rust implementation to simplify 
relay-safe (standardness-guarantee) on-chain withdrawals for Bitcoin Layer 
2 solutions.

Key Features:
- Standardness-by-construction for withdrawal outputs 
- Eliminates ad-hoc standardness rule implementations in L2s 
- Compact representation

Problem Solved:
L2 operators currently risk being unable to process withdrawals if users 
request non-standard transactions (e.g., oversized OP_RETURN). BOSD ensures 
outputs are correct-by-construction according to Bitcoin network's 
standardness rules, abstracting away complex validation logic.

Available on crates.io <https://crates.io/crates/bitcoin-bosd>

Get Involved:
Detailed Specification and Motivation/Rationale: SPECIFICATION.md 
<https://github.com/alpenlabs/bitcoin-bosd/blob/main/SPECIFICATION.md>
Repository: github.com/alpenlabs/bitcoin-bosd
Feedback welcome via GitHub Issues and Discussion; or the mailing list. 

This work emerged from practical challenges faced by myself and Trey Del 
Bonis (GitHub @delbonis) at Alpen Labs, while building validation logic for 
processing L2 withdrawals on-chain for Strata: a Bitcoin-native BitVM-based 
bridge to a ZK-rollup. We believe standardization in this domain will 
benefit the entire ecosystem by reducing fragmentation and improving 
interoperability.
The specification is has a CC0 public domain license, and the Rust 
implementation is MIT/Apache-2.0 double licensed.

The structure of a BOSD consists of:

- 1-byte tag representing a type ID.
- Arbitrary-length cryptographic payload (although practically bounded to 
like
  80 bytes).

Here's a table for the supported outputs. Also note that we can trivially 
extend it by adding more prefixes using the type it byte.

```
| Type | Payload Length(s) | Payload Interpretation | Spend Type    | 
Mainnet Address Prefix |
| ---- | ----------------- | ---------------------- | ------------- | 
---------------------- |
| 0    | ..=80             | `OP_RETURN` payload    | (N/A)         | (N/A) 
                 |
| 1    | 20                | pubkey hash            | P2PKH         | 
`1...`                 |
| 2    | 20                | script hash            | P2SH          | 
`3...`                 |
| 3    | 20, 32            | SegWit v0 hash         | P2WPKH, P2WSH | 
`bc1q...`              |
| 4    | 32                | SegWit v1 public key   | P2TR          | 
`bc1p...`              |
```

Since we strived for compact representation both in-memory and also 
over-the-wire, BOSD does not support checksums or any native error 
correction.

PS: Technically Strata is not a defect L2, since it is a 1-of-N 
trust-minimized bridge, and not a fully trustless bridge.

-- 
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/94ac8f66-1627-4526-bb34-095361a30fb4n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 3975 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [bitcoindev] Announcing Bitcoin BOSD: Standardized Withdrawal Output Specification for L2s
  2025-02-15 11:37 [bitcoindev] Announcing Bitcoin BOSD: Standardized Withdrawal Output Specification for L2s Jose Storopoli
@ 2025-02-16  8:50 ` Martin Habovštiak
  2025-02-19  2:29 ` David A. Harding
  1 sibling, 0 replies; 3+ messages in thread
From: Martin Habovštiak @ 2025-02-16  8:50 UTC (permalink / raw)
  To: Jose Storopoli; +Cc: Bitcoin Development Mailing List

[-- Attachment #1: Type: text/plain, Size: 4324 bytes --]

Hi,

good idea and a nice crate! You'll hear from me soon regarding the Rust
side on your issue tracker.

Maybe you should reconsider the name. It's too similar to BSOD and myabe
you haerd taht if fisrt and lsat lteter in a wrod are the smae yuor brian
can dcedoe tehm anwyay. :)

Good luck!

Martin

Dňa so 15. 2. 2025, 13:02 Jose Storopoli <jose@storopoli•io> napísal(a):

>
> Dear Bitcoin Dev Community,
>
> I am excited to introduce Bitcoin BOSD (Bitcoin Output Script Descriptor),
> a new specification and open source Rust implementation to simplify
> relay-safe (standardness-guarantee) on-chain withdrawals for Bitcoin Layer
> 2 solutions.
>
> Key Features:
> - Standardness-by-construction for withdrawal outputs
> - Eliminates ad-hoc standardness rule implementations in L2s
> - Compact representation
>
> Problem Solved:
> L2 operators currently risk being unable to process withdrawals if users
> request non-standard transactions (e.g., oversized OP_RETURN). BOSD ensures
> outputs are correct-by-construction according to Bitcoin network's
> standardness rules, abstracting away complex validation logic.
>
> Available on crates.io <https://crates.io/crates/bitcoin-bosd>
>
> Get Involved:
> Detailed Specification and Motivation/Rationale: SPECIFICATION.md
> <https://github.com/alpenlabs/bitcoin-bosd/blob/main/SPECIFICATION.md>
> Repository: github.com/alpenlabs/bitcoin-bosd
> Feedback welcome via GitHub Issues and Discussion; or the mailing list.
>
> This work emerged from practical challenges faced by myself and Trey Del
> Bonis (GitHub @delbonis) at Alpen Labs, while building validation logic for
> processing L2 withdrawals on-chain for Strata: a Bitcoin-native BitVM-based
> bridge to a ZK-rollup. We believe standardization in this domain will
> benefit the entire ecosystem by reducing fragmentation and improving
> interoperability.
> The specification is has a CC0 public domain license, and the Rust
> implementation is MIT/Apache-2.0 double licensed.
>
> The structure of a BOSD consists of:
>
> - 1-byte tag representing a type ID.
> - Arbitrary-length cryptographic payload (although practically bounded to
> like
>   80 bytes).
>
> Here's a table for the supported outputs. Also note that we can trivially
> extend it by adding more prefixes using the type it byte.
>
> ```
> | Type | Payload Length(s) | Payload Interpretation | Spend Type    |
> Mainnet Address Prefix |
> | ---- | ----------------- | ---------------------- | ------------- |
> ---------------------- |
> | 0    | ..=80             | `OP_RETURN` payload    | (N/A)         |
> (N/A)                  |
> | 1    | 20                | pubkey hash            | P2PKH         |
> `1...`                 |
> | 2    | 20                | script hash            | P2SH          |
> `3...`                 |
> | 3    | 20, 32            | SegWit v0 hash         | P2WPKH, P2WSH |
> `bc1q...`              |
> | 4    | 32                | SegWit v1 public key   | P2TR          |
> `bc1p...`              |
> ```
>
> Since we strived for compact representation both in-memory and also
> over-the-wire, BOSD does not support checksums or any native error
> correction.
>
> PS: Technically Strata is not a defect L2, since it is a 1-of-N
> trust-minimized bridge, and not a fully trustless bridge.
>
> --
> 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/94ac8f66-1627-4526-bb34-095361a30fb4n%40googlegroups.com
> <https://groups.google.com/d/msgid/bitcoindev/94ac8f66-1627-4526-bb34-095361a30fb4n%40googlegroups.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/CALkkCJZWoChE_njE876zB57ptc6BdTRUb%3DRqXU-uJ8bKEy_exg%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 5592 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [bitcoindev] Announcing Bitcoin BOSD: Standardized Withdrawal Output Specification for L2s
  2025-02-15 11:37 [bitcoindev] Announcing Bitcoin BOSD: Standardized Withdrawal Output Specification for L2s Jose Storopoli
  2025-02-16  8:50 ` Martin Habovštiak
@ 2025-02-19  2:29 ` David A. Harding
  1 sibling, 0 replies; 3+ messages in thread
From: David A. Harding @ 2025-02-19  2:29 UTC (permalink / raw)
  To: Jose Storopoli; +Cc: Bitcoin Development Mailing List

On 2025-02-15 01:37, Jose Storopoli wrote:
> Dear Bitcoin Dev Community,
> 
> I am excited to introduce Bitcoin BOSD (Bitcoin Output Script
> Descriptor), a new specification and open source Rust implementation
> to simplify relay-safe (standardness-guarantee) on-chain withdrawals
> for Bitcoin Layer 2 solutions.
> 
> Key Features:
> - Standardness-by-construction for withdrawal outputs
> - Eliminates ad-hoc standardness rule implementations in L2s
> - Compact representation

It's unclear to me why you don't simply implement your selected 
standardness rules on top of a BIP385 raw() output script descriptor 
(with the normal BIP380 checksum)?  That gives you an efficient 
representation, compatibility with other software, a compact checksum, 
and local policy.

For the later point, policy being local, there exists software[1] that I 
believe has a moderate userbase (including possibly some miner support) 
that implements less restrictive standard transaction rules than Bitcoin 
Core, specifically allowing OP_RETURN outputs of more than 83 bytes 
cumulative.[2]  If a user of your software runs that node and believes 
his transactions will relay to a compatible miner, what options does he 
have of circumventing BOSD type 0's limit of 80 push bytes if one of his 
users wants to send him such a data carrier output?  He can propose a 
type 5, but you'll probably reject that because >80 bytes will be 
non-standard for other users.  You can create an extension numeric 
range, but then you'll have to centrally coordinate number assignment 
for every random proposal.  Instead, I think it makes more sense to not 
use versioning at all and just perform local verification on raw() 
descriptors; that way users of your software can modify one line of code 
on their side to accept >80 bytes and everyone else can use the default 
tests.

In addition to the above technical criticism, I find the BOSD name 
extremely conflationary with the longstanding use of "output script 
descriptors", or "descriptors" for short, to refer to the language that 
originated in 2018 from Bitcoin Core developers for describing output 
scripts.[3]  I think it would be helpful to everyone for your proposal 
to use a more distinct name.

Thanks,

-Dave

[1] https://github.com/petertodd/bitcoin/tree/libre-relay-v28.1
[2] 
https://github.com/bitcoin/bitcoin/commit/d67f4634e5395fbdf4383d7adcdfc92c0cca7fc9
[3] https://bitcoinops.org/en/topics/output-script-descriptors/

-- 
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/3d4f98e0886f03337b44f0e4152d1f33%40dtrt.org.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-02-23 20:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-15 11:37 [bitcoindev] Announcing Bitcoin BOSD: Standardized Withdrawal Output Specification for L2s Jose Storopoli
2025-02-16  8:50 ` Martin Habovštiak
2025-02-19  2:29 ` David A. Harding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox