public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Gregory Maxwell <gmaxwell@gmail•com>
To: Wendell <w@grabhive•com>
Cc: Bitcoin Dev <bitcoin-development@lists•sourceforge.net>
Subject: Re: [Bitcoin-development] Endianness (was: Linux packaging letter)
Date: Tue, 23 Jul 2013 21:07:37 -0700	[thread overview]
Message-ID: <CAAS2fgTxJTbOiUE1ueA8HD7fFimTx-QgWD2yLmbH1Y41i_Hp4g@mail.gmail.com> (raw)
In-Reply-To: <10A07C03-7BAF-4312-9D43-827D03034EAE@grabhive.com>

On Tue, Jul 23, 2013 at 8:54 PM, Wendell <w@grabhive•com> wrote:
> Forking for curiosity's sake:
> Is there a substantial barrier to endian independence in the Bitcoin codebase?

Not really. The software was originally written to write out memory
order to and from the wire, which is part of why the protocol is LE
everywhere, so fixing that much is pretty typical endianness fixes.
There is an extra kink in that almost everything Bitcoin sends and
receives is an authenticated data structure— the stuff gets hashed for
authentication.  So that simply swizzling the byte order on
immediately on input isn't enough because sometimes you'll go on to
hash that data and it can't be in memory order for that.

Luke gave an initial crack at it a long time ago:
http://gitorious.org/~Luke-Jr/bitcoin/luke-jr-bitcoin/commits/endian
But it wasn't enough yet.

Seems like its just enough of an undertaking that absent a really good
reason to care about it no real progress in fixing it is happening.



  parent reply	other threads:[~2013-07-24  4:07 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-23 20:01 [Bitcoin-development] Linux packaging letter Mike Hearn
2013-07-23 20:14 ` Gregory Maxwell
2013-07-23 20:32   ` Mike Hearn
2013-07-23 20:50     ` Gregory Maxwell
2013-07-28 18:21       ` John Dillon
2013-07-23 22:02 ` Scott Howard
2013-07-23 22:26   ` Luke-Jr
2013-07-24  3:00     ` Scott Howard
2013-07-24  1:45   ` Douglas Huff
2013-07-24  2:27     ` Scott Howard
2013-07-24  3:54     ` [Bitcoin-development] Endianness (was: Linux packaging letter) Wendell
2013-07-24  4:03       ` Luke-Jr
2013-07-24  4:07       ` Gregory Maxwell [this message]
2013-07-24  4:09         ` Gregory Maxwell
2013-07-23 22:33 ` [Bitcoin-development] Linux packaging letter Pieter Wuille
2013-07-23 23:23 ` Greg Troxel
2013-07-23 23:45   ` Luke-Jr
2013-07-24  0:50   ` Gregory Maxwell
2013-07-24  2:35     ` zooko
2013-07-24  3:19       ` Gregory Maxwell
2013-07-24  8:28         ` Mike Hearn
2013-07-24 13:52           ` Jeff Garzik
2013-07-24 15:32             ` zooko
2013-07-24 19:35               ` Gregory Maxwell
2013-07-24 16:01           ` zooko
2013-07-27  0:45           ` Greg Troxel
2013-07-27  0:43     ` Greg Troxel

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=CAAS2fgTxJTbOiUE1ueA8HD7fFimTx-QgWD2yLmbH1Y41i_Hp4g@mail.gmail.com \
    --to=gmaxwell@gmail$(echo .)com \
    --cc=bitcoin-development@lists$(echo .)sourceforge.net \
    --cc=w@grabhive$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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