public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: "David A. Harding" <dave@dtrt.org>
To: Jeremy <jlrubin@mit.edu>,
	Bitcoin Protocol Discussion
	<bitcoin-dev@lists.linuxfoundation.org>
Subject: Re: [bitcoin-dev] [Pre-BIP] Motivating Address type for OP_RETURN
Date: Fri, 23 Apr 2021 08:15:50 -1000	[thread overview]
Message-ID: <20210423181550.xri2ravlwfe3vpc6@ganymede> (raw)
In-Reply-To: <CAD5xwhj7jXSrdbfFJTYw-UzGgZTF0kz-Vr61juF0gJGLf2EKqQ@mail.gmail.com>

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

On Tue, Apr 20, 2021 at 08:46:07AM -0700, Jeremy via bitcoin-dev wrote:
> Script is technically "too wide" a type as what I really want is to
> only return coins with known output types.

I don't understand this concern.  If script is too wide a type, then
OP_RETURN being a scriptPubKey of arbitrary length up to almost a
million bytes is also going to be too wide, right?

> 1) Should it be human readable & checksummed or encoded?

It should absolutely not be human readable in the sense of being
meaningful to humans.  We've seen in the past that tools and sites that
display OP_RETURN data as ASCII encourage people to put text in the
block chain that is offensive and illegal.  This puts people running
nodes at risk of social and legal intervention.  Bitcoin's
premissionless nature means we can't stop people from creating such
problems, but we can lower the risk by having our tools default to
meaningless representations of OP_RETURN data.

The best advice I've seen is to display OP_RETURN data in hex.  It's
still possible to say things like "dead beef" with that, but significant
abuse is hard.  This will, of course, make even 80 byte OP_RETURN
"addresses" very long.

> 2) Should it have a fixed length of max 40-80 bytes or should we support
> arbitrary length strings?

If it doesn't support the fell range, somebody's just going to complain
later and there will have to be a v2 address.

> 3) Should it be possible (i.e., from core) to pay into such an OP_RETURN or
> should we categorize OP_RETURNS as a non-payable address type (and just use
> it for parsing blockdata)

I don't think including arbitrary data in the block chain is something
that's currently useful for typical end users, and applications that
want to use OP_RETURN with Bitcoin Core can already call
create(psbt|rawtransaction) with the `data` field, so I'd be mildly
opposed in including such a feature in Bitcoin Core's wallet.  If at
least a few other wallets add the feature to pay OP_RETURN "addresses"
and it seems popular, then I'm wrong and so I would probably then change
my position.

Regarding "parsing block data", I don't think there's any need to change
Bitcoin Core's current representation of OP_RETURN outputs (which is
just showing the hex-encoded script in RPC output).  For any program
needing OP_RETURN output, hex format is going to be a the next best
thing to getting it in raw binary.  Any other address format is going to
be equal or more work.

Additionally, as mentioned in the other thread about OP_RETURN this
week, increasing transaction fees should increasingly push uses of
OP_RETURN off the network or into more efficient constructions, so it
doesn't seem warranted to me to spend a lot of time trying to optimize
how we use it when we'll be using it less and less over time.

-Dave

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-04-23 18:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-20 15:46 [bitcoin-dev] [Pre-BIP] Motivating Address type for OP_RETURN Jeremy
2021-04-23 18:15 ` David A. Harding [this message]
2021-04-24 20:05   ` Jeremy
2021-04-24 21:59     ` David A. Harding
2021-04-24 22:29       ` Jeremy
2021-04-24 23:37       ` Zac Greenwood
2021-04-25  0:25         ` Jeremy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210423181550.xri2ravlwfe3vpc6@ganymede \
    --to=dave@dtrt.org \
    --cc=bitcoin-dev@lists.linuxfoundation.org \
    --cc=jlrubin@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox