Bitcoin Forum

Bitcoin => Project Development => Topic started by: Elwar on August 22, 2016, 07:56:00 PM



Title: Concept: OP_RETURN with torrent file to an HTML file = hostless website
Post by: Elwar on August 22, 2016, 07:56:00 PM
I have been mulling something over and would like to get some input.

I would like to make a serverless webpage using the blockchain + bittorrent.

Let's assume I have a web site with an HTML, some css and a few images compressed into a .zip file of 1Mb.

I then create a .torrent of that zip file, which includes a hash of the file's parts, and start seeding the file. Assume the .torrent file is 200 bytes in size.

I then create a Bitcoin transaction from address 1WEBaj42k2j23lk23nk23jlk2n1kj to any address.

I pay the transaction fee and include an OP_RETURN with 80 bytes from the .torrent with a preceding number like 1/3.
Then I send another transaction from the same address with another 80 bytes with a preceeding number 2/3, etc.

So now there is a series of OP_RETURNs from address 1WEBaj42k2j23lk23nk23jlk2n1kj that can be referenced from any Bitcoin node that tracks OP_RETURNs.

Now I create a browser extension that accepts btctp:/1WEBaj42k2j23lk23nk23jlk2n1kj as an input which then goes to that address and gets its last series of OP_RETURNs.

It puts together the .torrent file and connects as a bittorrent client to download the .zip file. The extension then extracts the contents of the .zip file and displays the web page.

This would prevent DDoS attacks. It would prevent hacks of your server. It would allow people behind censoring firewalls like China to get information and allow anyone to post simple content without the need for a hosting service.

And you are paying the miners in transaction fees. You pay the miners for larger .torrents so they are compensated and you pay for any updates you make, all via transaction fees.

Thoughts?


Title: Re: Concept: OP_RETURN with torrent file to an HTML file = hostless website
Post by: HostFat on August 23, 2016, 02:17:57 AM
Maybe this can help: https://webtorrent.io
So the user will be able to download the website without installing anything.


Title: Re: Concept: OP_RETURN with torrent file to an HTML file = hostless website
Post by: Elwar on August 23, 2016, 07:48:20 AM
Maybe this can help: https://webtorrent.io
So the user will be able to download the website without installing anything.

Interesting. A javascript bittorrent client. I'd still need the extension to go to the blockchain and get the OP_RETURN.


Title: Re: Concept: OP_RETURN with torrent file to an HTML file = hostless website
Post by: HostFat on August 23, 2016, 12:43:42 PM
I'd still need the extension to go to the blockchain and get the OP_RETURN.
Maybe not :)
https://github.com/bcoin-org/bcoin
https://github.com/yoursnetwork/yours-bitcoin


Title: Re: Concept: OP_RETURN with torrent file to an HTML file = hostless website
Post by: countryfree on August 23, 2016, 11:11:20 PM
I don't think you could make a normal website this way. By "normal website", I mean something which downloads and shows up fast in the browser, something which is easy to update for the webmaster, and something optimized for search engines.
Maybe it could eventually become an alternative to a Tor hidden service?


Title: Re: Concept: OP_RETURN with torrent file to an HTML file = hostless website
Post by: Kewde on August 23, 2016, 11:22:31 PM
Use magnet links, not torrent files.
> Smaller


Title: Re: Concept: OP_RETURN with torrent file to an HTML file = hostless website
Post by: RoseMann on August 23, 2016, 11:30:44 PM
I have been mulling something over and would like to get some input.

I would like to make a serverless webpage using the blockchain + bittorrent.

Let's assume I have a web site with an HTML, some css and a few images compressed into a .zip file of 1Mb.

I then create a .torrent of that zip file, which includes a hash of the file's parts, and start seeding the file. Assume the .torrent file is 200 bytes in size.

I then create a Bitcoin transaction from address 1WEBaj42k2j23lk23nk23jlk2n1kj to any address.

I pay the transaction fee and include an OP_RETURN with 80 bytes from the .torrent with a preceding number like 1/3.
Then I send another transaction from the same address with another 80 bytes with a preceeding number 2/3, etc.

So now there is a series of OP_RETURNs from address 1WEBaj42k2j23lk23nk23jlk2n1kj that can be referenced from any Bitcoin node that tracks OP_RETURNs.

Now I create a browser extension that accepts btctp:/1WEBaj42k2j23lk23nk23jlk2n1kj as an input which then goes to that address and gets its last series of OP_RETURNs.

It puts together the .torrent file and connects as a bittorrent client to download the .zip file. The extension then extracts the contents of the .zip file and displays the web page.

This would prevent DDoS attacks. It would prevent hacks of your server. It would allow people behind censoring firewalls like China to get information and allow anyone to post simple content without the need for a hosting service.

And you are paying the miners in transaction fees. You pay the miners for larger .torrents so they are compensated and you pay for any updates you make, all via transaction fees.

Thoughts?

Could u not store the 200 bytes as part of the message field using a smart currency like Bitshares or NXT? and then rather then using a bitcoin address you use a bitshares or nxt address for the browser extension?

Prefix the message with something since u can't include a special op code


Title: Re: Concept: OP_RETURN with torrent file to an HTML file = hostless website
Post by: Elwar on August 24, 2016, 12:24:26 PM
I have been mulling something over and would like to get some input.

I would like to make a serverless webpage using the blockchain + bittorrent.

Let's assume I have a web site with an HTML, some css and a few images compressed into a .zip file of 1Mb.

I then create a .torrent of that zip file, which includes a hash of the file's parts, and start seeding the file. Assume the .torrent file is 200 bytes in size.

I then create a Bitcoin transaction from address 1WEBaj42k2j23lk23nk23jlk2n1kj to any address.

I pay the transaction fee and include an OP_RETURN with 80 bytes from the .torrent with a preceding number like 1/3.
Then I send another transaction from the same address with another 80 bytes with a preceeding number 2/3, etc.

So now there is a series of OP_RETURNs from address 1WEBaj42k2j23lk23nk23jlk2n1kj that can be referenced from any Bitcoin node that tracks OP_RETURNs.

Now I create a browser extension that accepts btctp:/1WEBaj42k2j23lk23nk23jlk2n1kj as an input which then goes to that address and gets its last series of OP_RETURNs.

It puts together the .torrent file and connects as a bittorrent client to download the .zip file. The extension then extracts the contents of the .zip file and displays the web page.

This would prevent DDoS attacks. It would prevent hacks of your server. It would allow people behind censoring firewalls like China to get information and allow anyone to post simple content without the need for a hosting service.

And you are paying the miners in transaction fees. You pay the miners for larger .torrents so they are compensated and you pay for any updates you make, all via transaction fees.

Thoughts?

Could u not store the 200 bytes as part of the message field using a smart currency like Bitshares or NXT? and then rather then using a bitcoin address you use a bitshares or nxt address for the browser extension?

Prefix the message with something since u can't include a special op code

I may as well use Onecoin.

Bitcoin is the most secure ledger in the world. Having the highest security in the world for a site would be a good thing to have.


Title: Re: Concept: OP_RETURN with torrent file to an HTML file = hostless website
Post by: mocacinno on August 24, 2016, 12:27:35 PM
An interesting idear, how would you handle website updates? You would need to make a new version of the page and create another 3 transactions using OP_RETURN to point to the updated version i guess...

Also, the concept will probably only work as long as enough people keep on seeding the page. Offcourse, it's really small so i guess most people won't mind doing this (if the page itself is usefull)


Title: Re: Concept: OP_RETURN with torrent file to an HTML file = hostless website
Post by: Elwar on August 24, 2016, 12:40:55 PM
An interesting idear, how would you handle website updates? You would need to make a new version of the page and create another 3 transactions using OP_RETURN to point to the updated version i guess...

Also, the concept will probably only work as long as enough people keep on seeding the page. Offcourse, it's really small so i guess most people won't mind doing this (if the page itself is usefull)

Like I said, you take the latest OP_RETURN from the address. So every time you update your page you just send the transactions again.

Hillary has stated that she wants to take down certain websites that are critical of her when elected. This may become something necessary sooner rather than later.