Bitcoin Forum
December 10, 2016, 12:59:20 PM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: [RFC] Short Block and Address Reference  (Read 918 times)
da2ce7
Legendary
*
Offline Offline

Activity: 1218


Live and Let Live


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

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.

Format:

2 xxxx Yyyy

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

xxxx
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.

Yyyy
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.
1481374760
Hero Member
*
Offline Offline

Posts: 1481374760

View Profile Personal Message (Offline)

Ignore
1481374760
Reply with quote  #2

1481374760
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481374760
Hero Member
*
Offline Offline

Posts: 1481374760

View Profile Personal Message (Offline)

Ignore
1481374760
Reply with quote  #2

1481374760
Report to moderator
1481374760
Hero Member
*
Offline Offline

Posts: 1481374760

View Profile Personal Message (Offline)

Ignore
1481374760
Reply with quote  #2

1481374760
Report to moderator
1481374760
Hero Member
*
Offline Offline

Posts: 1481374760

View Profile Personal Message (Offline)

Ignore
1481374760
Reply with quote  #2

1481374760
Report to moderator
theymos
Administrator
Legendary
*
expert
Offline Offline

Activity: 2506


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

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

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652


Chief Scientist


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

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
Legendary
*
qt
Offline Offline

Activity: 1036


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

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]
  Print  
 
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!