Bitcoin Forum
December 08, 2016, 04:24:08 AM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: What is the longest possible Bitcoin address? Are they all the same length?  (Read 4244 times)
gigabytecoin
Sr. Member
****
Offline Offline

Activity: 280


View Profile
June 29, 2011, 01:37:11 AM
 #1

I am working on creating a mysql database and don't want to waste any extra storage space.

So what should I make an entry for a bitcoin address?

CHAR X length? (is the address consistently one length?)

Or VARCHAR X length? (does the address change in length from user to user?)
1481171048
Hero Member
*
Offline Offline

Posts: 1481171048

View Profile Personal Message (Offline)

Ignore
1481171048
Reply with quote  #2

1481171048
Report to moderator
1481171048
Hero Member
*
Offline Offline

Posts: 1481171048

View Profile Personal Message (Offline)

Ignore
1481171048
Reply with quote  #2

1481171048
Report to moderator
1481171048
Hero Member
*
Offline Offline

Posts: 1481171048

View Profile Personal Message (Offline)

Ignore
1481171048
Reply with quote  #2

1481171048
Report to moderator
The Bitcoin network protocol was designed to be extremely flexible. It can be used to create timed transactions, escrow transactions, multi-signature transactions, etc. The current features of the client only hint at what will be possible in the future.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481171048
Hero Member
*
Offline Offline

Posts: 1481171048

View Profile Personal Message (Offline)

Ignore
1481171048
Reply with quote  #2

1481171048
Report to moderator
1481171048
Hero Member
*
Offline Offline

Posts: 1481171048

View Profile Personal Message (Offline)

Ignore
1481171048
Reply with quote  #2

1481171048
Report to moderator
EricJ2190
Full Member
***
Offline Offline

Activity: 134


View Profile
June 29, 2011, 01:46:19 AM
 #2

From the Wiki:
Quote
Addresses can contain all alphanumeric characters except 0, O, I, and l. Normal addresses currently always start with 1, though this might change in a future version. Testnet addresses usually start with m or n. Mainline addresses can be 25-34 characters in length, and testnet addresses can be 26-34 characters in length. Most addresses are 33 or 34 characters long, though.

You'll probably want to store them in a VARCHAR. Although, if you really want to save space, you can Base58 decode them and store them in binary without the checksum using only 20 bytes.
gigabytecoin
Sr. Member
****
Offline Offline

Activity: 280


View Profile
June 29, 2011, 01:56:57 AM
 #3

From the Wiki:
Quote
Addresses can contain all alphanumeric characters except 0, O, I, and l. Normal addresses currently always start with 1, though this might change in a future version. Testnet addresses usually start with m or n. Mainline addresses can be 25-34 characters in length, and testnet addresses can be 26-34 characters in length. Most addresses are 33 or 34 characters long, though.

You'll probably want to store them in a VARCHAR. Although, if you really want to save space, you can Base58 decode them and store them in binary without the checksum using only 20 bytes.

Hehe, thank you for the suggestions.

Thankfully my OCD isn't THAT out of whack Wink

Take care,
estenity
Full Member
***
Offline Offline

Activity: 212


View Profile
August 11, 2016, 07:46:22 PM
 #4

is it possible to transform an address with 33 characters to the same with 34 characters ? if yes, what is the modification ?

DannyHamilton
Legendary
*
Offline Offline

Activity: 1638



View Profile
August 11, 2016, 08:49:25 PM
 #5

is it possible to transform an address with 33 characters to the same with 34 characters?

Yes.

if yes, what is the modification ?

You can either add a space character at the beginning of the address, or (if you prefer) you can add a space character at the end of the address.

Why would you want to do this though?

The quality of posts has dropped to such a low level that all users who are participating in a paid signature campaign are added to my ignore list. If you'd like a copy of the list to improve your browsing experience, you can find it here: https://bitcointalk.org/index.php?topic=973843.0 (Updated 2016-1-4)
estenity
Full Member
***
Offline Offline

Activity: 212


View Profile
August 11, 2016, 10:11:21 PM
 #6

because an internet site asks me to use a 34-character format.

thank you for response.

DannyHamilton
Legendary
*
Offline Offline

Activity: 1638



View Profile
August 11, 2016, 10:19:37 PM
 #7

because an internet site asks me to use a 34-character format.

thank you for response.

If the website is stripping off the whitespace, and isn't aware that bitcoin addresses aren't all 34 characters, then I'd avoid that website.  They clearly don't understand what they are doing well enough to do it properly and you are likely to have lots of problems in the future with things they don't do well.

The quality of posts has dropped to such a low level that all users who are participating in a paid signature campaign are added to my ignore list. If you'd like a copy of the list to improve your browsing experience, you can find it here: https://bitcointalk.org/index.php?topic=973843.0 (Updated 2016-1-4)
cr1776
Legendary
*
Offline Offline

Activity: 1372


View Profile
August 11, 2016, 11:04:01 PM
 #8

because an internet site asks me to use a 34-character format.

thank you for response.

If the website is stripping off the whitespace, and isn't aware that bitcoin addresses aren't all 34 characters, then I'd avoid that website.  They clearly don't understand what they are doing well enough to do it properly and you are likely to have lots of problems in the future with things they don't do well.

Danny is correct.  If they don't have something that basic down, you should avoid them.

HOWEVER, if you absolutely have to use them, you can generate some new addresses and look for one that matches the 34 characters they are looking for.
estenity
Full Member
***
Offline Offline

Activity: 212


View Profile
August 11, 2016, 11:04:30 PM
 #9

because an internet site asks me to use a 34-character format.

thank you for response.

If the website is stripping off the whitespace, and isn't aware that bitcoin addresses aren't all 34 characters, then I'd avoid that website.  They clearly don't understand what they are doing well enough to do it properly and you are likely to have lots of problems in the future with things they don't do well.

correct. thank you very much indeed.

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!