Bitcoin Forum
October 25, 2016, 08:35:19 AM *
News: Latest stable version of Bitcoin Core: 0.13.0  [Torrent].
   Home   Help Search Donate Login Register  
Pages: [1]
Author Topic: [RFC] Short Block and Address Reference  (Read 902 times)
Offline Offline

Activity: 1217

Live and Let Live

View Profile
March 21, 2011, 01:00:29 AM

This is a draft specification for a short bitcoin block and bitcoin address lookup system.

This system will allow the reference of any of the addresses in the block chain with 100% accuracy.


2 xxxx Yyyy

Prefix: '2'
This is to signify that it is NOT a bitcoin address, as bitcoin addresses start with a '1'

Base 58 encoded block number.  such as 1112  (for Block #1) or 1zzz (for Block #195111).  4 characters should last us for at least 150years.

the start of the bitcoin address, until it is the only address that fits, with the '1' removed.
for the bitcoin address: 12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX (picked randomly from the block explorer) it would be '2' as no other address in that particular block starts with '12'
for example the address on block 1 will would have the code: 211122

Address 1NA4tpWBG4RZGeTj9RjaUhDQd6QsrCz4Si  would be 21Zz8N

This would be much easier to quote over the phone or write or type by hand!

Edit!  I hope I have the maths right now!

One off NP-Hard.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
Offline Offline

Activity: 2450

View Profile
March 21, 2011, 01:16:06 AM

The block at a certain number can change, which might cause you to point to the wrong address.

Gavin Andresen
Offline Offline

Activity: 1652

Chief Scientist

View Profile WWW
March 21, 2011, 01:19:21 AM

Neat idea!

As theymos says, this will only work 100% reliably for addresses buried "deep enough" in the block chain that the likelihood of a block-chain-re-org is vanishingly small.

How often do you get the chance to work on a potentially world-changing project?
Pieter Wuille
Offline Offline

Activity: 1036

View Profile WWW
March 21, 2011, 01:24:48 AM

I believe this is a useful idea, but I would define it on the level below the base58 encoding.

So, an address currently is a base58-transformed sequence of bytes:
  • A version byte (0)
  • The pubkey hash (160 bit, 20 bytes)
  • A 32-bit (4 byte) checksum

It's not that hard to define a similar format for shortened addresses, but I would suggest not requiring lookup code to parse full blocks when looking for an address - they could become quite big in the future. Rather, what about this:

A base58-transformation of:
  • A version byte (1)
  • A BER-encoded block number
  • A BER-encoded tx number
  • A BER-encoded txout number
  • A 8-bit (1 byte) checksum
(BER encoding: in every byte, bits 0-6 contain data, bit 7 signifies if another data byte follows, like UTF-8 for unicode)

Up to block number 2113663, and as long as less than 128 transactions and less than 128 outputs per txout are used, this results in 7 bytes, or 10 base58-encoded characters. An alternative (if it's meant for typing over, instead of automated handling), would be to use base36 (case-insensitive alphanumeric) resulting in 11 characters.

aka sipa, core dev team

Tips and donations: 1KwDYMJMS4xq3ZEWYfdBRwYG2fHwhZsipa
Pages: [1]
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!