Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: running on February 20, 2013, 01:47:16 AM



Title: Save any files to namecoin blockchain
Post by: running on February 20, 2013, 01:47:16 AM
I found a way to save any arbitrary files to namecoin blockchain.

I think this can be kind of big.

See: https://github.com/runn1ng/namecoin-files


Title: Re: Save any files to namecoin blockchain
Post by: Simran on February 20, 2013, 01:50:13 AM
Really cool, man! Another way to take an advantage of cryptos!


Title: Re: Save any files to namecoin blockchain
Post by: nethead on February 20, 2013, 02:11:57 AM
sounds good but if ppl start to store files in the blockchain, in a month from now we would need 50tb hdisks just for the nmc blockchain


Title: Re: Save any files to namecoin blockchain
Post by: Monster Tent on February 20, 2013, 03:44:37 AM
It would probably be better to store the files somewhere else but use the blockchain to reference them somehow.

+1 for a distributed pirate bay though  :)

Edit: I wonder if you could use it to store GPG keys instead of on the server at MIT.


Title: Re: Save any files to namecoin blockchain
Post by: Sunny King on February 20, 2013, 04:16:53 AM
lol okay you must be joking right? If this gets popular namecoin would become unusable very quickly.

Time to raise spam fees I think  ;)

Although seriously I have been talking about supporting database usage in ppcoin for a while. Now you just made me think twice about current transaction fee model to regulate the demand on block chain storage.


Title: Re: Save any files to namecoin blockchain
Post by: running on February 20, 2013, 09:08:48 AM
well right now the only things there are my experiments :) so no need to panic


Title: Re: Save any files to namecoin blockchain
Post by: FuzzyBear on February 20, 2013, 09:26:46 AM
Yeah, I am very excited by this so excellent detective work running :)

Yeah sunny, my thoughts were that if it can be done to namecoin then surely it can be done to any coin?? so this poses a potential threat to all currencies right? just as much as someone could 51% attack a chain with enough hashing power... anyone could also now bloat the blockchain with enough power / time and kill anyone with small HDD right and ruin the blockchain for that currency?


Title: Re: Save any files to namecoin blockchain
Post by: crazy_rabbit on February 20, 2013, 09:27:41 AM
Well what if you stored the link to the attachment, and the decryption key, so that the file can be stored, encrypted, somewhere else, and you can find the link via NMC?



Title: Re: Save any files to namecoin blockchain
Post by: crazy_rabbit on February 20, 2013, 11:49:24 AM
Couldn't you then also save Torrent Trackers to Namecoin as well?


Title: Re: Save any files to namecoin blockchain
Post by: nethead on February 20, 2013, 11:52:06 AM
so this poses a potential threat to all currencies right? just as much as someone could 51% attack a chain with enough hashing power... anyone could also now bloat the blockchain with enough power / time and kill anyone with small HDD right and ruin the blockchain for that currency?

oh I hope that it doesnt work on other blockchains  :-[


Title: Re: Save any files to namecoin blockchain
Post by: running on February 20, 2013, 11:57:43 AM
Yeah, I am very excited by this so excellent detective work running :)

Yeah sunny, my thoughts were that if it can be done to namecoin then surely it can be done to any coin?? so this poses a potential threat to all currencies right? just as much as someone could 51% attack a chain with enough hashing power... anyone could also now bloat the blockchain with enough power / time and kill anyone with small HDD right and ruin the blockchain for that currency?

not really, first you cannot sava arbitrary data to bitcoin transactions (in theory you can, but the nodes will not relay it, so you can't). Also, there is some anti-spamming protection in bitcoin client. And lastly, miners can just ignore the requests if the fees are low enough.

Which will probably happen anyway with namecoin if my way of saving files becomes popular. (people in general don't like illegal data on their disks. also it does not scale at all.)

I am thinking of making some simple GUI to this, though. It is still too complicated with the need to run namecoind from bash and so on


Title: Re: Save any files to namecoin blockchain
Post by: DPony13 on February 20, 2013, 12:17:29 PM
NMC paid storage?


Title: Re: Save any files to namecoin blockchain
Post by: Sunny King on February 20, 2013, 05:00:19 PM
Yeah, I am very excited by this so excellent detective work running :)

Yeah sunny, my thoughts were that if it can be done to namecoin then surely it can be done to any coin?? so this poses a potential threat to all currencies right? just as much as someone could 51% attack a chain with enough hashing power... anyone could also now bloat the blockchain with enough power / time and kill anyone with small HDD right and ruin the blockchain for that currency?

It's much easier to do with namecoin via its API of 'name_new', 'name_firstupdate' and 'name_show'. With other coins there is no such api available so it needs to create the data transaction itself, and retrieve it back and parse it via maybe getrawtransaction, and it also needs to track transaction id and possibly embed some data structure to link multiple transactions for a file, or maintain its own persistent index. It's a lot more work but in theory doable.

The only thing preventing a flood of data/spam is the transaction fee and maximum block size. Altcoins are more vulnerable to these issues because the fees are much lower compared to bitcoin right now.

namecoin fee is 0.005 per KB, or 5 coins per MB, 5000 coins per GB. Given the current exchange rate, that's about $200~$300 per GB, not much money to cause real pain for the entire network.

I am not really too worried just kidding. Still most likely ppcoin will eventually support database use like namecoin. And kudos to Running for the excellent work  ;)


Title: Re: Save any files to namecoin blockchain
Post by: midnightmagic on February 20, 2013, 05:35:43 PM
Please do NOT use namecoin as arbitrary storage. This is not its function; you are risking irritating people enough to hardfork. At the moment, namecoin's growth is small and measured. I am fairly sure that the current users are not interested in storing your data.


Title: Re: Save any files to namecoin blockchain
Post by: running on February 20, 2013, 05:45:34 PM
Please do NOT use namecoin as arbitrary storage. This is not its function; you are risking irritating people enough to hardfork. At the moment, namecoin's growth is small and measured. I am fairly sure that the current users are not interested in storing your data.


AFAIK, namecoin can be used as general persistent key/value storage. (It is even encouraged on the wiki - http://dot-bit.org/Use_cases )

If it can be used as such, it can be used to store files, too, if they are encoded correctly.

If miners won't want to accept these transactions they won't. Free market and so on.


Title: Re: Save any files to namecoin blockchain
Post by: Luke-Jr on February 21, 2013, 07:44:55 AM
I think it's time pools shut off NMC support...


Title: Re: Save any files to namecoin blockchain
Post by: smoothie on February 21, 2013, 07:58:57 AM
Someone should upload a trojan horse.

 :D :D :D


Title: Re: Save any files to namecoin blockchain
Post by: phelix on February 21, 2013, 08:29:30 AM
I found a way to save any arbitrary files to namecoin blockchain.

I think this can be kind of big.

See: https://github.com/runn1ng/namecoin-files

this will be much to slow to be practical. links to encrypted torrent files or mega on the other hand...


Title: Re: Save any files to namecoin blockchain
Post by: deepceleron on February 21, 2013, 09:16:17 AM
I think it's time pools shut off NMC support...
That's dumb; there's 3GB of satoshidice crap on my hard drive because pools aren't shutting that off...

Experimenting is fine, but this brings up the point of setting a reasonable fee on Namecoin for name registration again: http://dot-bit.org/forum/viewtopic.php?p=2954#p2954 and for pools to pick up such a new version when it is released.

The cost of a name is about 25 for a USD penny.


Title: Re: Save any files to namecoin blockchain
Post by: 2weiX on February 21, 2013, 09:16:59 AM
I found a way to save any arbitrary files to namecoin blockchain.

I think this can be kind of big.

See: https://github.com/runn1ng/namecoin-files

this will be much to slow to be practical. links to encrypted torrent files or mega on the other hand...


MEGACOIN


Title: Re: Save any files to namecoin blockchain
Post by: gmaxwell on February 21, 2013, 11:53:37 AM
Most of the insertion slowness is probably the recursive IsFromMe / IsConfirmed checks in coin selection for unspent change in coin selection, as IsConfrimed recursively does that along the whole input tree with no-memoization. Commenting out lines 607 to 616 in wallet.cpp and I expect spending unconfirmed coins will become much faster.


Title: Re: Save any files to namecoin blockchain
Post by: jade087 on February 21, 2013, 12:06:15 PM
What an awesome use case! What is the theoretical maximum growth of the NMC blockchain?


Title: Re: Save any files to namecoin blockchain
Post by: running on February 21, 2013, 02:28:05 PM
I still haven't sorted out what to do when some of the file parts expires.

It is possible to look at even expired domains, but I am not sure how.


Title: Re: Save any files to namecoin blockchain
Post by: phelix on February 21, 2013, 03:13:24 PM
I still haven't sorted out what to do when some of the file parts expires.

It is possible to look at even expired domains, but I am not sure how.

One more argument towards storing the actual data in a faster place. Have you ever heard of bittorrent magnet links? The file itself could be encrypted so it would be some kind of do it yourself mega.


Title: Re: Save any files to namecoin blockchain
Post by: running on February 21, 2013, 03:48:09 PM
You need seeders for magnets, though.


Title: Re: Save any files to namecoin blockchain
Post by: phelix on February 21, 2013, 03:51:20 PM
You need seeders for magnets, though.
hmmm....   https://cryptabyte.com/ ?


Title: Re: Save any files to namecoin blockchain
Post by: pat1900 on February 22, 2013, 01:30:46 AM
I still haven't sorted out what to do when some of the file parts expires.

It is possible to look at even expired domains, but I am not sure how.
Use name_history instead of name_show, then fetch the last (i.e. latest) record of the result. If the domain has expired, the number of blocks found since the expiration time simply shows up as a negative number, e.g.

Code:
namecoin name_history d/capitalism

gives you

...
"expires_in : -144"
...


In other words: d/capitalism has expired yesterday.  :'(



Title: Re: Save any files to namecoin blockchain
Post by: phelix on February 23, 2013, 07:49:33 PM
you can see here how you are spamming the chain: http://nx.bit  (http://blockchained.com/namecoin)


Title: Re: Save any files to namecoin blockchain
Post by: running on February 25, 2013, 03:39:31 AM
you can see here how you are spamming the chain: http://nx.bit  (http://blockchained.com/namecoin)

When I look at it, some people dumped 2 nonsensical junk files, me and some other guy wrote something in plaintext and that's about it. So nothing important happened there.


Title: Re: Save any files to namecoin blockchain
Post by: gmaxwell on February 25, 2013, 04:18:16 AM
Namecoin has nothing on bitcoin testnet:

Code:
(bitcoind -testnet getrawtransaction 73e64e38faea386c88a578fd1919bcdba3d0b3af7b6302bf6ee1b423dc4e4333 ; bitcoind -testnet getrawtransaction d85af546147ff78dfb06e9469ddfc84adc3ce00cda54db8d65b7617ff2b7661a) | xxd -r -p | play -tul -


Title: Re: Save any files to namecoin blockchain
Post by: phelix on February 25, 2013, 11:34:56 AM
Namecoin has nothing on bitcoin testnet:

Code:
(bitcoind -testnet getrawtransaction 73e64e38faea386c88a578fd1919bcdba3d0b3af7b6302bf6ee1b423dc4e4333 ; bitcoind -testnet getrawtransaction d85af546147ff78dfb06e9469ddfc84adc3ce00cda54db8d65b7617ff2b7661a) | xxd -r -p | play -tul -

 ???