Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: amaclin on April 13, 2015, 09:55:17 AM



Title: Storing large data in blockchain
Post by: amaclin on April 13, 2015, 09:55:17 AM
Just wondering who is creating these transactions:

https://blockchain.info/tx/db195e4bfcfb3cc6d47f8d6231cb59e543c31e01d196d557457bca0fa5c1aba0  ... 20402 bytes
https://blockchain.info/tx/24560b7fbd172ff0e95dc8cc0af88a332e3be016a7f2aa35e432fd8beac3ed46  ... 63433 bytes
https://blockchain.info/tx/ce8c8d8154546bdbe28ff10dc4044a63cf11758839362c94dc6b9a99d55af3e5 ... 56905 bytes
and so on.

These transactions store some text data in blockchain with P2SH technique.
It is not too difficult to create a tool to get data as a plain text from these transactions (but I do not have interest to do it)
You can download them as binary and view in hex editor. You will see something like:

Code:
0000000140: 20 20 20 20 20 20 20 20 │ 00 49 00 59 6F 75 6E 67           I Young
0000000150: 20 41 6D 65 72 69 63 61 │ 6E 73 20 77 68 6F 20 6C   Americans who l
0000000160: 65 61 76 65 20 74 68 65 │ 69 72 20 67 72 65 61 74  eave their great
0000000170: 20 62 69 67 20 68 6F 6D │ 6F 67 65 6E 65 6F 75 73   big homogeneous
0000000180: 20 63 6F 75 6E 74 72 79 │ 20 61 6E 64 20 76 69 73   country and vis
0000000190: 69 74 00 45 00 73 6F 6D │ 65 20 6F 74 68 65 72 20  it E some other
00000001A0: 70 61 72 74 20 6F 66 20 │ 74 68 65 20 77 6F 72 6C  part of the worl
00000001B0: 64 20 74 79 70 69 63 61 │ 6C 6C 79 20 67 6F 20 74  d typically go t
00000001C0: 68 72 6F 75 67 68 20 73 │ 65 76 65 72 61 6C 20 73  hrough several s
00000001D0: 74 61 67 65 73 20 6F 66 │ 00 45 00 63 75 6C 74 75  tages of E cultu
00000001E0: 72 65 20 73 68 6F 63 6B │ 3A 20 66 69 72 73 74 2C  re shock: first,
00000001F0: 20 64 75 6D 62 20 77 69 │ 64 65 2D 65 79 65 64 20   dumb wide-eyed
0000000200: 61 73 74 6F 6E 69 73 68 │ 6D 65 6E 74 2E 20 54 68  astonishment. Th
0000000210: 65 6E 20 61 20 74 65 6E │ 74 61 74 69 76 65 00 44  en a tentative D
0000000220: 00 65 6E 67 61 67 65 6D │ 65 6E 74 20 77 69 74 68   engagement with
0000000230: 20 74 68 65 20 6E 65 77 │ 20 63 6F 75 6E 74 72 79   the new country
0000000240: 27 73 20 6D 61 6E 6E 65 │ 72 73 2C 20 63 75 69 73  's manners, cuis
0000000250: 69 6E 65 2C 20 70 75 62 │ 6C 69 63 20 74 72 61 6E  ine, public tran
0000000260: 73 69 74 00 46 00 73 79 │ 73 74 65 6D 73 20 61 6E  sit F systems an
0000000270: 64 20 74 6F 69 6C 65 74 │ 73 2C 20 6C 65 61 64 69  d toilets, leadi
0000000280: 6E 67 20 74 6F 20 61 20 │ 62 72 69 65 66 20 70 65  ng to a brief pe
0000000290: 72 69 6F 64 20 6F 66 20 │ 66 61 74 75 6F 75 73 20  riod of fatuous
00000002A0: 63 6F 6E 66 69 64 65 6E │ 63 65 00 4A 00 74 68 61  confidence J tha
00000002B0: 74 20 74 68 65 79 20 61 │ 72 65 20 69 6E 73 74 61  t they are insta
00000002C0: 6E 74 20 65 78 70 65 72 │ 74 73 20 6F 6E 20 74 68  nt experts on th
00000002D0: 65 20 6E 65 77 20 63 6F │ 75 6E 74 72 79 2E 20 41  e new country. A
00000002E0: 73 20 74 68 65 20 76 69 │ 73 69 74 20 77 65 61 72  s the visit wear
00000002F0: 73 20 6F 6E 2C 00 47 00 │ 68 6F 6D 65 73 69 63 6B  s on, G homesick
0000000300: 6E 65 73 73 20 62 65 67 │ 69 6E 73 20 74 6F 20 73  ness begins to s
0000000310: 65 74 20 69 6E 2C 20 61 │ 6E 64 20 74 68 65 20 74  et in, and the t
0000000320: 72 61 76 65 6C 65 72 20 │ 62 65 67 69 6E 73 20 74  raveler begins t
0000000330: 6F 20 61 70 70 72 65 63 │ 69 61 74 65 2C 00 49 00  o appreciate, I


I am just wondering - what a nice blockchain flooding for very small cost :)




Title: Re: Storing large data in blockchain
Post by: trout on April 13, 2015, 11:46:45 AM
link to the P2SH techinque?
the data is basically in plain text?


Title: Re: Storing large data in blockchain
Post by: amaclin on April 13, 2015, 12:00:55 PM
link to the P2SH techinque?
BIP-16

Quote
the data is basically in plain text?
I see someone storing plain texts.
Of course it is possible to store any content.


Title: Re: Storing large data in blockchain
Post by: Mikestang on April 13, 2015, 05:48:10 PM
I wish this stuff didn't happen in the blockchain, the thing is bloated enough.


Title: Re: Storing large data in blockchain
Post by: amaclin on April 13, 2015, 06:46:58 PM
I wish this stuff didn't happen in the blockchain, the thing is bloated enough.
You may wish anything. But this is consensus code for accepting such things  ;D


Title: Re: Storing large data in blockchain
Post by: dexX7 on April 14, 2015, 10:31:55 PM
It is not too difficult to create a tool to get data as a plain text from these transactions (but I do not have interest to do it)

Speaking of tools ... http://bitcoinstrings.com/blk00251.txt ;)


Title: Re: Storing large data in blockchain
Post by: Peter Todd on April 15, 2015, 01:44:54 AM
It is not too difficult to create a tool to get data as a plain text from these transactions (but I do not have interest to do it)

Speaking of tools ... http://bitcoinstrings.com/blk00251.txt ;)

Also here: https://github.com/petertodd/python-bitcoinlib/blob/master/examples/publish-text.py


Title: Re: Storing large data in blockchain
Post by: amaclin on April 15, 2015, 04:09:31 AM
Also here: https://github.com/petertodd/python-bitcoinlib/blob/master/examples/publish-text.py

Pushing texts to blockchain is some kind of vandalism imho


Title: Re: Storing large data in blockchain
Post by: trout on April 15, 2015, 12:06:16 PM
this is ugly.
I mean, obviously there will always be ways to embed data into the blockchain;
but if one has to split them between a long chain of transcations, and also encode them somehow inside,
 then the information (and effort)  needed to extract the data is non-neglible, so one can ignore it.

But the possibility of  pushing large chuncks of plain text in a single transaction
looks like a bug to me.

Is it possible to make this kind of things non-standard, without compromising the
expressive power of the script? Like, the way those SASSAMA/ Bernanke ASCII pictures
were put was somehow "outlawed" later on.


Title: Re: Storing large data in blockchain
Post by: amaclin on April 15, 2015, 12:44:46 PM
But the possibility of  pushing large chuncks of plain text in a single transaction
looks like a bug to me.
It is a feature, not a bug :)
If we disallow this feature (we can not, but hypothetically), somebody would create a tool which posts large data chunks as several small (chained or parallel) transactions.


Title: Re: Storing large data in blockchain
Post by: trout on April 15, 2015, 01:46:05 PM
But the possibility of  pushing large chuncks of plain text in a single transaction
looks like a bug to me.
It is a feature, not a bug :)
If we disallow this feature (we can not, but hypothetically), somebody would create a tool which posts large data chunks as several small (chained or parallel) transactions.
Like I said, if it requires a specialized tool to get it out, then it can be ignored.

I mean, the blockchain probably contains your username already: there's an A at some place, M at some other, etc.
I can publish a tool that finds  it in the blockchain, but the tool would be longer than the piece of data in question (your username).


large chunks of plaintext, on the other hand, is a different matter.

why are you saying it cannot be disallowed?


Title: Re: Storing large data in blockchain
Post by: amaclin on April 15, 2015, 01:48:57 PM
why are you saying it cannot be disallowed?
Because this is consensus code. It is too hard to change it, isn't it?


Title: Re: Storing large data in blockchain
Post by: trout on April 15, 2015, 02:15:45 PM
why are you saying it cannot be disallowed?
Because this is consensus code. It is too hard to change it, isn't it?

I suppose it depends on how significant  the change. is Whether any
used or potentially useful cases are affected.

If the change is mostly techincal then nobody will care.
Look at BIP 66 voting that is going on now.  Nobody seems to care very much.


Title: Re: Storing large data in blockchain
Post by: amaclin on April 15, 2015, 02:29:52 PM
Look at BIP 66 voting that is going on now.  Nobody seems to care very much.
There is only one thing everyone cares. Profit of investments calculated in fiat currency.
So, you are right: nobody cares of the size of blockchain and the number of utxo and malleability and so on while bitcoin gains profits.


Title: Re: Storing large data in blockchain
Post by: hhanh00 on April 15, 2015, 02:42:06 PM
* The guy who sent the transaction paid the fees for it. Actually, well above the minimum fee required.
* Why should his data be rejected and not color coins, stealth addresses, or any other non bitcoin data? Do we start judging what should be and shouldn't be allowed?
* The data can be pruned since it's part of the sigscript.


Title: Re: Storing large data in blockchain
Post by: amaclin on April 15, 2015, 02:51:07 PM
* The guy who sent the transaction paid the fees for it. Actually, well above the minimum fee required.
He paid for it only to a miner who find block.
I am not sure that keeping ( 100 kilobyte ) x ( several thousands fullnodes ) x ( unknown time ) costs less than a couple of dollars.

Quote
* Why should his data be rejected and not color coins, stealth addresses, or any other non bitcoin data?
Because the majority can do anything.

Quote
Do we start judging what should be and shouldn't be allowed?
Have we stopped doing it?

Quote
* The data can be pruned since it's part of the sigscript.


Title: Re: Storing large data in blockchain
Post by: hhanh00 on April 15, 2015, 03:17:58 PM
Quote
* Why should his data be rejected and not color coins, stealth addresses, or any other non bitcoin data?
Because the majority can do anything.

Quote
Do we start judging what should be and shouldn't be allowed?
Have we stopped doing it?

I'm glad the majority does not agree with you.


Title: Re: Storing large data in blockchain
Post by: amaclin on April 15, 2015, 03:23:24 PM
I'm glad the majority does not agree with you.
Majority of whom does not agree with which proposal?
I am just asking questions and reading opinions.


Title: Re: Storing large data in blockchain
Post by: tyz on April 15, 2015, 07:54:37 PM
Does this mean that Bitcoin is pretty vulnerable against vandalism? What happens if someone is pushing giga bytes of text into the blockchain? Does text pushing to the blockchain cost more than a normal transaction?

Also here: https://github.com/petertodd/python-bitcoinlib/blob/master/examples/publish-text.py

Pushing texts to blockchain is some kind of vandalism imho


Title: Re: Storing large data in blockchain
Post by: samson on April 15, 2015, 08:14:04 PM
* The guy who sent the transaction paid the fees for it. Actually, well above the minimum fee required.
He paid for it only to a miner who find block.
I am not sure that keeping ( 100 kilobyte ) x ( several thousands fullnodes ) x ( unknown time ) costs less than a couple of dollars.

I can assure you that it does


Title: Re: Storing large data in blockchain
Post by: dexX7 on April 18, 2015, 02:08:43 AM
Does this mean that Bitcoin is pretty vulnerable against vandalism? What happens if someone is pushing giga bytes of text into the blockchain? Does text pushing to the blockchain cost more than a normal transaction?

Publishing 1 GB of data, assuming a standard fee of 0.0001 BTC/1000 byte transaction size, roughly costs 170 BTC, if the data is embedded via P2SH, as done here (https://blockchain.info/tx/24560b7fbd172ff0e95dc8cc0af88a332e3be016a7f2aa35e432fd8beac3ed46).


Title: Re: Storing large data in blockchain
Post by: spin on April 21, 2015, 03:39:56 PM
Source of the data: http://steve-parker.org/articles/others/stephenson/osshock.shtml

Quote
Young Americans who leave their great big homogeneous country and visit some other part of the world typically go through several stages of culture shock: first, dumb wide-eyed astonishment. Then a tentative engagement with the new country's manners, cuisine, public transit systems and toilets, leading to a brief period of fatuous confidence that they are instant experts on the new country. As the visit wears on, homesickness begins to set in, and the traveler begins to appreciate, for the first time, how much he or she took for granted at home. At the same time it begins to seem obvious that many of one's own cultures and traditions are essentially arbitrary, and could have been different; driving on the right side of the road, for example. When the traveler returns home and takes stock of the experience, he or she may have learned a good deal more about America than about the country they went to visit.

For the same reasons, Linux is worth trying...