LearnBitcoin

Bitcoin Dev Archive 2011

When parsing base58 data, accept [0O] as o, and [l|!] as 1

2 messages, 12 Aug 2011. Started by Luke Dashjr.

Luke Dashjr (2)

Permalink Original thread on gnusha.org

Luke Dashjr permalink original

http://tinyurl.com/3gpvrhm

git fetch git://gitorious.org/~Luke-Jr/bitcoin/luke-jr-bitcoin.git \ base58_liberal_parsing && git merge FETCH_HEAD

This simple modification allows base58 inputs to use zero and uppercase 'O' in place of lowercase 'O', as well as lowercase 'L', bar/pipe, and exclamation point in place of one. This allows more tolerance when inputting addresses or other data by manual typing, and gives a bit more variety to vanity addresses.

Luke Dashjr in reply to Luke Dashjr permalink original

On Friday, August 12, 2011 12:35:27 PM Gavin Andresen wrote:

Quoted text (2 lines)
> pszDecode58 is not a pointer to a zero-terminated string; it should be
> pnDecode58.

Updated variable name in branch...

Quoted text (4 lines)
> I'm torn between "meh, whatever" and "this will just cause people
> headaches when they wonder why vanity addresses don't work in
> blockexplorer because theymos decides not to bother changing his
> code..."

Perhaps the vanity use would need to be introduced only after the community has accepted these as alternative legitimate representations. Even without that, I think gracefully handling the typos would be sensible.