public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Peter Todd <pete@petertodd.org>
To: Mark Friedenbach <mark@monetize.io>,
	bitcoin-development@lists.sourceforge.net
Subject: Re: [Bitcoin-development] BIP proposal: Authenticated prefix trees
Date: Fri, 20 Dec 2013 07:47:10 -0500	[thread overview]
Message-ID: <20131220124710.GB21148@savin> (raw)
In-Reply-To: <52B425BA.6060304@monetize.io>

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

On Fri, Dec 20, 2013 at 03:10:50AM -0800, Mark Friedenbach wrote:
> On 12/20/2013 02:48 AM, Peter Todd wrote:
> > On Thu, Dec 19, 2013 at 05:47:52PM -0800, Mark Friedenbach wrote:
> >> This BIP describes the authenticated prefix tree and its many 
> >> variations in terms of its serialized representation. Additional
> >> BIPs describe the application of authenticated prefix trees to
> >> such applications as committed indices, document time-stamping,
> >> and merged mining.
> > 
> > Could you expand more on how prefix trees could be used for 
> > time-stamping and merged mining?
> 
> The root hash of a prefix tree is placed in the coinbase at a location
> standardized by convention.

Right, last txout in an OP_RETURN like we discussed.

> For document time-stamping, the key can be
> the hash of the document.

Don't you mean the value is the hash of the document and the key is
irrelevant?

> For merged mining, the key is the hash of
> the genesis block of the altchain, and the value is the hash of the
> aux-pow (for p2pool, the share hash).

What's the advantage over the direction-based system I proposed before?
Seems to me the code required to validate the proof is significantly
more complex in your scheme.

http://www.mail-archive.com/bitcoin-development@lists.sourceforge.net/msg03149.html

> In the system I have in mind this adds 43 bytes to the coinbase
> transaction,

By 43 bytes you mean the whole op_return txout right?

> >>>>> dict = AuthTree() dict['Curie'] = VARINT(1898) 
> >>>>> dict('Einstein') = VARINT(1905) dict['Fleming'] =
> >>>>> VARINT(1928) dict['中本'] = VARINT(2009)
> > 
> > I'd be inclined to leave the unicode out of the code examples as
> > many editors and shells still don't copy-and-paste it nicely. Using
> > it in BIP documents themselves is fine and often has advantages re:
> > typesetting, but using it in crypto examples like this just makes
> > it harder to reproduce the results by hand unnecessarily.
> 
> Thanks for the feedback, I rather agree. When I was creating that
> example for some reason I wanted the right branch of the root node to
> be used, which is difficult when only 7-bit ASCII keys are used. But I
> don't think the illustrative point I had in mind ended up being
> particularly relevant, so I'll rework it.

That example is python, so I'd suggest just using escape sequences
myself. You probably also should include the "b" prefix to make the
strings explicitly binary for py3 compatibility, ie dict[b'\xbe\xef']

-- 
'peter'[:-1]@petertodd.org
000000000000000216e3750a9ad9584395352d728a3c543844eab3bfc9ce1073

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 685 bytes --]

  parent reply	other threads:[~2013-12-20 12:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-20  1:47 [Bitcoin-development] BIP proposal: Authenticated prefix trees Mark Friedenbach
2013-12-20  6:48 ` Jeremy Spilman
2013-12-20 11:21   ` Mark Friedenbach
2013-12-20 13:17     ` Peter Todd
2013-12-20 18:41       ` Mark Friedenbach
2013-12-20 10:48 ` Peter Todd
     [not found]   ` <52B425BA.6060304@monetize.io>
2013-12-20 12:47     ` Peter Todd [this message]
2013-12-20 19:48 ` Gregory Maxwell
2013-12-20 22:04   ` Mark Friedenbach
2014-01-05 18:43 ` Thomas Voegtlin
2014-01-06 18:13   ` Peter Todd
2014-01-07  0:21     ` Mark Friedenbach
2014-01-07  6:31       ` Thomas Voegtlin
2014-01-08  1:04         ` Mark Friedenbach

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=20131220124710.GB21148@savin \
    --to=pete@petertodd.org \
    --cc=bitcoin-development@lists.sourceforge.net \
    --cc=mark@monetize.io \
    /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