Author

Topic: How do I find the information of the Bitcoin protocol version (Read 115 times)

legendary
Activity: 3472
Merit: 10611
I want to broadcast Bitcoin transactions using python's socket library.
If that's all you want to do, you need not concern yourself with the protocol version. Majority of these versions are defining stuff that concerns a full node not what you want to do.

The process you're looking for is like it's always been:
1. Open socket and connect to the peer using its IP address and port
2. Perform handshare (Send version, receive version and verack, send verack)
3. Push your tx in a tx message

The three message types and their structures on explained in the link you shared.
https://developer.bitcoin.org/reference/p2p_networking.html#version
https://developer.bitcoin.org/reference/p2p_networking.html#verack
https://developer.bitcoin.org/reference/p2p_networking.html#tx

FWIW protocol version 70016 introduced wtxid-based relay and nodes that have that version support this feature.
hero member
Activity: 714
Merit: 1010
Crypto Swap Exchange
Sorry, if my post is sort of off-topic when you ask such a specific question. I'm no Python coder but there should be some already existing libraries and modules to do that. Do you have specific needs to use the socket lib?

A non-extensive search gave me some hits that look promissing (I had a quick look into each search result, but not more than that):

https://medium.com/coinmonks/how-to-make-a-bitcoin-transaction-with-python-450d7d3db864 --- seems incomplete
https://github.com/slush0/sendtx
https://bitcoinlib.readthedocs.io/en/latest/ --- you need a Bitcoin node, preferably local
A from-scratch tour of Bitcoin in Python --- maybe worth looking into how tx are actually send out
...

There's certainly more to find. I don't see this as my duty, improve your searching skills. Have a look at this thread as another find, I'm pretty confident there're more sources in this forum, too:
Make a bitcoin transaction with python?
newbie
Activity: 4
Merit: 1
Hello

I want to broadcast Bitcoin transactions using python's socket library.Now I can sign a transaction. But when sock is used to link other nodes, it is not known what information should be transmitted.The node I am linking to is protocol version 70016.I tried to find information on bitcoin.org.

This is the site I was looking for:
https://developer.bitcoin.org/reference/p2p_networking.html#protocol-versions

But it doesn't show how protocol 70016 works.I want to know which website I should visit for the 70016 version of the Bitcoin protocol.
Jump to: