Bitcoin Forum
June 17, 2024, 11:34:09 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Is block-chain compressed?  (Read 1127 times)
auzaar (OP)
Full Member
***
Offline Offline

Activity: 151
Merit: 100



View Profile
April 10, 2013, 05:44:42 AM
 #1

Is block-chain currently compressed in someway while storing, it may not be possible if data is almost random but I think because all the transaction are between limited address out of a HUGE set, at-least that part can be compressed
Killdozer
Full Member
***
Offline Offline

Activity: 203
Merit: 100



View Profile
April 10, 2013, 01:28:01 PM
 #2

Quote
because all the transaction are between limited address out of a HUGE set, at-least that part can be compressed
Do you know how compression works? If not, try to put some bitcoin addresses into a file (in binary form of course) and compress them with zip or whatever, then check results.

kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1025



View Profile
April 10, 2013, 01:57:03 PM
 #3

bzip2 actually gets around 25-35% compression on the files, at a huge time and CPU cost.

While parts of the data are pathological, other parts are very regular.  You might be able to get somewhat better results by writing a hybrid compressor that skips over the parts that we already know are random.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
phathash
Member
**
Offline Offline

Activity: 75
Merit: 10


View Profile
April 11, 2013, 03:18:38 AM
 #4

Humans read base58 bitcoin addresses (20bytes) as ASCII numerical representations. Saving these into notepad is going to result in 34 bytes and will be compressible given a large enough sample. The block chain is a binary beast and is very efficient. Addresses are saved as 20bytes. If you can compress this (regardless of set size)  we are all in trouble.

All other data consists of arbitrary data (ie output values) and indistinguishable (hopefully) random data (cryptographic hashes and signatures).

I suppose if someone embedded structure into the block chain, ie through output values or non-working addresses (no private pair) you could somewhat compress it.
auzaar (OP)
Full Member
***
Offline Offline

Activity: 151
Merit: 100



View Profile
April 11, 2013, 06:15:25 AM
 #5

Quote
because all the transaction are between limited address out of a HUGE set, at-least that part can be compressed
Do you know how compression works? If not, try to put some bitcoin addresses into a file (in binary form of course) and compress them with zip or whatever, then check results.
I think you don't understand compression, I already indicated bit-coin addresses and part of signed transactions being random, what I was talking about the address occurring multiple times in block chain.

e.g. a very sketchy compression of a simplest blockchain

14x999VDuEd48ykqYrg8K6a1kto45a3BHf => 1HQ3Go3ggs8pFnXuHVHRytPCq5fGG8Hbhx
1C8ToSDT9dwxy7uXmU5AXpx1oXbV84GwpN => 1HQ3Go3ggs8pFnXuHVHRytPCq5fGG8Hbhx
1MZqmDHxyW4htFaZFsQ5q78i9nL3r99BtW =>1C8ToSDT9dwxy7uXmU5AXpx1oXbV84GwpN

can be compressed to
a=14x999VDuEd48ykqYrg8K6a1kto45a3BHf
b=1HQ3Go3ggs8pFnXuHVHRytPCq5fGG8Hbhx
c=1MZqmDHxyW4htFaZFsQ5q78i9nL3r99BtW
d=1C8ToSDT9dwxy7uXmU5AXpx1oXbV84GwpN
a=>b
d=>b
c=>d
wumpus
Hero Member
*****
Offline Offline

Activity: 812
Merit: 1022

No Maps for These Territories


View Profile
April 11, 2013, 06:20:11 AM
 #6

Please do a search instead of creating new topics. This has been analyzed in detail by very smart people already. Yes, some % of compression is possible.

Bitcoin Core developer [PGP] Warning: For most, coin loss is a larger risk than coin theft. A disk can die any time. Regularly back up your wallet through FileBackup Wallet to an external storage or the (encrypted!) cloud. Use a separate offline wallet for storing larger amounts.
auzaar (OP)
Full Member
***
Offline Offline

Activity: 151
Merit: 100



View Profile
April 11, 2013, 06:39:31 AM
 #7

Please do a search instead of creating new topics. This has been analyzed in detail by very smart people already. Yes, some % of compression is possible.
Dear Sir, I did search before posting but could not find any relevant page in first few search results, so will you be kind enough to point me to those threads which you were referring to.
phathash
Member
**
Offline Offline

Activity: 75
Merit: 10


View Profile
April 11, 2013, 07:55:07 AM
 #8

Quote
I already indicated bit-coin addresses and part of signed transactions being random, what I was talking about the address occurring multiple times in block chain.

This would require some sort of local index of addresses. This would be bloat. Further, how big would you make the index field size? 4 bytes? This was once considered enough for packet-switched networks.. and looked what happened there!

Satoshi intended for addresses to be only be used once. Future address generation could far exceed addresses used in other protocols (ie IPv6 = 16 bytes). 

Mr Smith is correct. Great minds have already thought of such things for us already. In fact, somewhere along the way someone already figured a way to compress public keys to half their original size. No harm in us mere mortals trying to understand however.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!