Save any (small) file to namecoin blockchain

Forum rules
Warning !
Avoid using binary softwares from untrusted users.
Prefer compiling it yourself and verify sources.
Post Reply
kbilek
Posts: 3
Joined: Wed Feb 20, 2013 4:11 pm
os: linux

Save any (small) file to namecoin blockchain

Post by kbilek »

Hey there,

I did a small-ish perl script (for linux) that allows you to save any kind of file into blockchain.

However, it is not very efficient for bigger files, since for example 2MB file will create a 5000 name_new and name_firstupdate operations, which will for some reason force namecoind to eat about 20-30 GB of disk space and 3GB of RAM (and takes about 2 days). But it works.

It is ideal for smaller files (few kB).

(you will probably hate me for this. oh well.)

https://github.com/runn1ng/namecoin-files/
Last edited by kbilek on Wed Feb 20, 2013 4:20 pm, edited 1 time in total.

kbilek
Posts: 3
Joined: Wed Feb 20, 2013 4:11 pm
os: linux

Re: Save any (small) file to namecoin blockchain

Post by kbilek »

if you saw the thousands of seemingly nonsensical name_firstupdate operations lately - yeah, it was me uploading the JPG.

moa
Posts: 255
Joined: Mon May 23, 2011 6:13 am

Re: Save any (small) file to namecoin blockchain

Post by moa »

Do you have any positive contributions or any dev. work planned to help namecoin in a positive way?

E.g. a fix for namecoin to stop ugly malware hacks like your first effort.

It is fine to point out security issues, if you are prepared to help fix the issue, otherwise ...

kbilek
Posts: 3
Joined: Wed Feb 20, 2013 4:11 pm
os: linux

Re: Save any (small) file to namecoin blockchain

Post by kbilek »

I am sorry if you see it as ugly malware attack. I thought malware attacks are hidden, while this is pretty open. (It is not masquerading as anything else, you can clearly recognize the domains, etc.) You are encouraging using namecoin as a general key/value pair storage on the wiki....

The easy way is for miners to being able to set different miniml fees for different namespaces (meaning "d/" or "fb/" and "fp/") so the market can gradually decide what is OK to accept and at what rate. Yes, it's not obvious with name_new, but the name_new doesn't store any information anyway, so it is not that dangerous. And again, the miners could set high minimal fees for name_new in general.

Maybe they already can set it up that way, I am not sure, I didn't try to run namecoind as miner.

I am a very bad C++ programmer so I can't help with namecoin development, sorry.

agorism1
Posts: 3
Joined: Sun Oct 13, 2013 5:26 pm
os: linux

Re: Save any (small) file to namecoin blockchain

Post by agorism1 »

This is awesome!
I am working on writing something similar in python, but with the ability to update saved memory without re-writing everything.

phelix
Posts: 1634
Joined: Thu Aug 18, 2011 6:59 am

Re: Save any (small) file to namecoin blockchain

Post by phelix »

agorism1 wrote:This is awesome!
I am working on writing something similar in python, but with the ability to update saved memory without re-writing everything.
It would be much better to only store a link and a hash. You will not get very far with files and it is painfully slow and somewhat expensive anyway.
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

domob
Posts: 1129
Joined: Mon Jun 24, 2013 11:27 am
Contact:

Re: Save any (small) file to namecoin blockchain

Post by domob »

phelix wrote:
agorism1 wrote:This is awesome!
I am working on writing something similar in python, but with the ability to update saved memory without re-writing everything.
It would be much better to only store a link and a hash. You will not get very far with files and it is painfully slow and somewhat expensive anyway.
I fully agree here. While it may be interesting from a coding point of view to implement a "file system" based on Namecoin, I don't think it is either beneficial to Namecoin itself or even useful for any practical purpose. Storing a hash/pointer and then distributing the file in some other way seems like a much better solution. Are there actual problems where you believe this is necessary, or is it mainly out of curiosity?
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

Post Reply