User avatar
arnoudk
Bronze Bitcoiner
Bronze Bitcoiner
Posts: 631
Joined: Wed Oct 21, 2015 4:04 am
Location: Belize

Playing with the raw bitcoin protocol

Thu Apr 14, 2016 10:34 am

I'm having a blast programming a tiny little node that connects to the bitcoin network, using nothing other than sockets. I'm not using any RPC calls, or libraries, I am following the bitcoin peer to peer protocol language.

Why? To learn, because it is fun, and because I can.

It's of course not a full node, and it will never be. But it is nice to be able to interact with the network 'the hard way', especially now that it works.

So far, it connects to any number of nodes, listens for new transactions, retrieves them, and prints the full raw transaction code on my screen. Tomorrow I'll filter the transactions to the output addresses that I am interested in.

It got me thinking though.

What could I do with this kind of real time access to the raw bitcoin data?

Some thoughts.

I could send people in countries with restrictive internet (or government) policies an email (let's say once an hour) with the last 6 blocks attached - gzipped. (Quite easy).

I could upload each block to a binaries newsgroup. (A little harder, but still quite doable).

I could set up an email address to "listen" for raw transactions, and submit every single one that gets sent to the address to the bitcoin network (Quite easy, but I'll need to figure out something to prevent being abused for sending transaction spam).

I could make every block (gzipped) available through a website, away from the bitcoin client. You could synchronize everything by simply requesting all blocks in sequence and pushing them into your local bitcoin node... all without needing a working peer to peer (although, my server would be a lot less reliable than a global peer to peer network - this would enable a bridge into a network that has a restrictive firewall for example!)

Why these ideas? Because I like the concept that bitcoin is hard to shut down as long as you have any type of communication at your disposal. Of course, you can already interact using http and https, but how can we expand on that?

What are your ideas? How can we make bitcoin independent of the peer to peer network?

Thanks
Excited about the potential of Bitcoin Cash in the beautiful country of Belize.
Developer of the RegisterDocuments.com Document Registration Service (using the Bitcoin Cash blockchain).

User avatar
bitkilo
Platinum Bitcoiner
Platinum Bitcoiner
Posts: 3210
Joined: Sat Sep 26, 2015 4:08 am

Donate BTC of your choice to 1DJcTrvdGsmKr7LdriVizkVmkcXWoG12nt

Re: Playing with the raw bitcoin protocol

Thu Apr 14, 2016 11:27 am

Sounds like a cool little devise you have built there, wish i had the know how so i could do this myself.
As for using the raw data for something maybe you could tweak it a little to look for problems like the reused r problem in output signatures.

i don't know if that is even possible with what you have built, just an idea.
Please help Ross and his family during this hard time by donating to the https://freeross.org/ fund. Play at the best provably fair Bitcoin games site here: games.bitcoin.com Need a fantastic Bitcoin wallet Pick up some great Bitcoin.com swag here

User avatar
arnoudk
Bronze Bitcoiner
Bronze Bitcoiner
Posts: 631
Joined: Wed Oct 21, 2015 4:04 am
Location: Belize

Re: Playing with the raw bitcoin protocol

Thu Apr 14, 2016 9:57 pm

Sounds like a cool little devise you have built there, wish i had the know how so i could do this myself.
As for using the raw data for something maybe you could tweak it a little to look for problems like the reused r problem in output signatures.

i don't know if that is even possible with what you have built, just an idea.
Interesting thought. Right now, I am not checking any signatures ;) (but I get the information from bitcoin nodes I run and thus trust, and they would not forward invalid transactions). But the signature data is certainly in the transaction, and I have the raw transaction data. It's a deep dive into the cryptography used.

I'm brainstorming along the lines of making bitcoin medium-independent. Right now, it runs on the p2p network, but what if we could make it run on anything? There is no reason why it needs to be peer to peer only. p2p is a strong foundation, but could be shut down (at least partially) through DDoS attacks.

What I've come up with :
Newsgroup gateway
Send a packet of all transactions received in the last minute to a public binaries newsgroup. Anyone who has access to newsgroups could get this information. Newsgroup systems have capacity that makes bitcoin look like a newborn.
Monitor this newsgroup, pick up any transactions that others send to it, and relay it to the other mediums (peer to peer, email, dns).

Email gateway
Send someone (by subscription) an email with either each block, or perhaps filtered to one or more of their addresses only the transactions that relate to their account. (The raw bitcoin transactions).
Listen to an incoming address, and when a transaction is emailed, relay it to the other mediums (peer to peer, newsgroup, dns)

DNS
It should be possible to set up a DNS record for each block in the bitcoin blockchain, where you can query the DNS server to find the blockhash of each block in the bitcoin blockchain.
You could - in theory - even submit the entire block using DNS but I am sure that would get someone somewhere very mad ;)
Excited about the potential of Bitcoin Cash in the beautiful country of Belize.
Developer of the RegisterDocuments.com Document Registration Service (using the Bitcoin Cash blockchain).

User avatar
Vaultoro
AMA
AMA
Posts: 75
Joined: Fri Nov 13, 2015 9:06 pm
Contact: Website Facebook Twitter Telegram

Re: Playing with the raw bitcoin protocol

Sat Apr 16, 2016 10:29 pm

I love all your ideas!

You know, this is why I love bitcoin. permisionless money protocol.

Try getting access to the Raw Visa data stream LOL

Or try building something on the western union system without getting in touch with them first LOL

Keep up the great work.
Joshua Scigala
CEO Vaultoro.com
The Real-time Bitcoin Gold Exchange and API
Combining the historical security of gold with the speed and transparency of the bitcoin blockchain

Return to “Bitcoin Discussion”

Who is online

Users browsing this forum: Semrush [Bot] and 1 guest