Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: luckyknc on June 05, 2016, 12:36:20 PM



Title: Upload download data from blockchain
Post by: luckyknc on June 05, 2016, 12:36:20 PM
I found this http://www.righto.com/2014/02/ascii-bernanke-wikileaks-photographs.html#ref13 article.

It describes some techniques to upload/download data from blockchain, but the scripts referred are not working.
I know the default to upload custom data is op_return but i want to try multisig too.

https://gist.github.com/shirriff/64f48fa09a61b56ffcf9#file-bitcoin-file-downloader-py
https://gist.github.com/shirriff/bfc4df70a02732493a28#file-bitcoin-insertion-tool-py

Anyone know how to modify these to work? they seem deprecated. I am willing to send a tip!


Title: Re: Upload download data from blockchain
Post by: amaclin on June 06, 2016, 09:49:47 AM
https://github.com/petertodd/python-bitcoinlib/blob/master/examples/publish-text.py


Title: Re: Upload download data from blockchain
Post by: luckyknc on June 06, 2016, 11:51:36 AM
That uses op_return...i am searching to modify the above scripts to work with standard output and multisig


Title: Re: Upload download data from blockchain
Post by: luckyknc on June 08, 2016, 07:03:44 PM
Noone? tip inside <-- :)


Title: Re: Upload download data from blockchain
Post by: achow101 on June 08, 2016, 07:25:22 PM
IIRC Bare multisig is not standard, but using OP_RETURN is. Using bare multisig for this will burn Bitcoin.

The basic idea is to break up your data into 65 byte chunks, which are the "public keys" as interpreted by Bitconi's scripting system. Then you just make the output in the multisig format,
Code:
OP_1 <pubkey> <pubkey> ... OP_X OP_CHECKMULTISIG
where OP_X is the number of <pubkeys>. You can only go up to OP_15.


Title: Re: Upload download data from blockchain
Post by: luckyknc on June 09, 2016, 09:17:17 AM
IIRC Bare multisig is not standard, but using OP_RETURN is. Using bare multisig for this will burn Bitcoin.

The basic idea is to break up your data into 65 byte chunks, which are the "public keys" as interpreted by Bitconi's scripting system. Then you just make the output in the multisig format,
Code:
OP_1 <pubkey> <pubkey> ... OP_X OP_CHECKMULTISIG
where OP_X is the number of <pubkeys>. You can only go up to OP_15.

Thanks i know the technical background but i need someone to modify the above scripts to work!


Title: Re: Upload download data from blockchain
Post by: amaclin on June 09, 2016, 09:37:27 AM
Thanks i know the technical background but i need someone to modify the above scripts to work!
Why not to use https://github.com/petertodd/python-bitcoinlib/blob/master/examples/publish-text.py ?
It doesn't use op_return technique


Title: Re: Upload download data from blockchain
Post by: luckyknc on June 09, 2016, 11:22:45 AM
Thanks i know the technical background but i need someone to modify the above scripts to work!
Why not to use https://github.com/petertodd/python-bitcoinlib/blob/master/examples/publish-text.py ?
It doesn't use op_return technique

Oh no? So why its says "@petertodd petertodd Change publish-text.py txouts to be a bare OP_RETURN" ? Also the point is to have the scripts to parse the blockchain for data and to upload.


Title: Re: Upload download data from blockchain
Post by: amaclin on June 09, 2016, 01:33:15 PM
Oh no? So why its says "@petertodd petertodd Change publish-text.py txouts to be a bare OP_RETURN" ?
Because it is not possible to create a transaction without outputs.
Publishing data is not a classic transaction which transfers some value from person A to person B.

Quote
Also the point is to have the scripts to parse the blockchain for data and to upload.
I can create such 'downloader' for @petertodd's 'uploader'
Unfortunately, I prefer programming in C++, not in python.

Also have a look here: https://bitcointalk.org/index.php?topic=1023190.5


Title: Re: Upload download data from blockchain
Post by: luckyknc on June 13, 2016, 07:32:35 AM
Anyone for python?