256b on the blockchain
category: general [glöplog]
I have a small fetish for distributed storage and recently came to think about that some of the smaller demoscene productions could fit inside a Namecoin id/-field (max 520 bytes).
In this example I have inserted Circus by Depth into the Namecoin blockchain in a id/ named after the pouët prodnumber (57280). We can now retrieve the prod with this super-simple python script (assuming that the Namecoin software is running on our computer):
This should give us a file in the current directory called circus, 256 bytes in size, that you can run in an Amiga emulator or transfer to vintage plastic & silicone.
Thank you for your time, over and out.
P.S. Works on my machine ;-)
In this example I have inserted Circus by Depth into the Namecoin blockchain in a id/ named after the pouët prodnumber (57280). We can now retrieve the prod with this super-simple python script (assuming that the Namecoin software is running on our computer):
Code:
#!/usr/bin/python3
# proof-of-concept retrieval of 256b prods from the Namecoin blockchain.
import base64
import json
import os
output = os.popen('namecoin-cli name_show "id/57280"').read()
jstring = json.loads(output)['value']
filename = json.loads(jstring)['name']
mybase64 = json.loads(jstring)['base64']
mybase64 = str.encode(mybase64)
mybin = base64.decodebytes(mybase64)
myfile = open(filename, 'wb')
myfile.write(mybin)
myfile.close()
This should give us a file in the current directory called circus, 256 bytes in size, that you can run in an Amiga emulator or transfer to vintage plastic & silicone.
Thank you for your time, over and out.
P.S. Works on my machine ;-)
Finally ! Someone found a use for the blockchain !
next step : bitcoin miner hidden in 256b prod
when can we start mining 256byte intros?
Hey, stop it! Kids in Africa could have eaten those prods!
Quote:
next step : bitcoin miner hidden in 256b prod
Code:
namecoin-cli name_show "id/miner"
...or link: https://namecha.in/name/id/miner
Look for "value". Granted, not a prod, but only took 35 bytes. ;)
Am I the only one worried that the script alone is 446 bytes?
well, how big is the browser you use to download 256b intros?
PulkoMandy wrote:
I'm not a size coder, I'm just a fan :)
Quote:
Am I the only one worried that the script alone is 446 bytes?
I'm not a size coder, I'm just a fan :)
hmmm... how big is the BIOS you use to run your 256b intros ?
256b of what?
Quote:
256b of what?
Any 256b of course. For the example, click the prod link.
secret hint: almost all 256b use more than 256b vidmem!
Cleaned up the scripts for usage by common men and women.
https://gitlab.com/el-topo/nmc256b
I also inserted https://www.pouet.net/prod.php?which=65455
https://gitlab.com/el-topo/nmc256b
I also inserted https://www.pouet.net/prod.php?which=65455
Quote:
Indeed! Best usecase ever!Finally ! Someone found a use for the blockchain !
Quote:
when can we start mining 256byte intros?
http://www.pouet.net/prod.php?which=59302