public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Ian Kroozbi <kroozbi@gmail.com>
To: bitcoin-dev@lists.linuxfoundation.org
Subject: [bitcoin-dev] PSBT_GLOBAL_XPUB: Version bytes in xpub
Date: Fri, 15 Nov 2019 16:29:01 -0600	[thread overview]
Message-ID: <CALwkCwwGAwRE4vTPJJObr7q1GqS+d9==DBJc+yRZ+chC+_59SA@mail.gmail.com> (raw)

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

What’s the rational for including the version bytes in the xpub in the
GLOBAL_XPUB field? This was briefly touched upon in an earlier email from
Stepan, but I don’t think it was every fully addressed.

I am not sure if we need the whole xpub or keeping chain_code and
> public_key is enough, but I would suggest to keep other data
> just in case. For example, keeping prefix that defines if the key is used
> for testnet or mainnet may be useful.
>

The version bytes seem to be superfluous data considering the transaction
format and the rest of the PSBT key-values are network agnostic. If we
wanted to attach network data to the PSBT then I think that would be better
served by using a new key.

There is also a potential issue where we could have conflicting versions on
different xpubs in the PSBT. If we remove the version bytes then we can
eliminate this possibility.

I haven’t formed an opinion on whether or not the other data outside of the
public key and chain code should be included, but I think it would be good
to discuss any rational for either including it or omitting it.

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

             reply	other threads:[~2019-11-15 22:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-15 22:29 Ian Kroozbi [this message]
2019-11-16  4:54 ` [bitcoin-dev] PSBT_GLOBAL_XPUB: Version bytes in xpub Andrew Chow

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='CALwkCwwGAwRE4vTPJJObr7q1GqS+d9==DBJc+yRZ+chC+_59SA@mail.gmail.com' \
    --to=kroozbi@gmail.com \
    --cc=bitcoin-dev@lists.linuxfoundation.org \
    /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