Bitcoin Forum
May 08, 2024, 09:02:39 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How do I find the information of the Bitcoin protocol version  (Read 90 times)
myfy (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 1


View Profile
April 26, 2024, 01:44:08 PM
Last edit: April 26, 2024, 01:55:42 PM by myfy
 #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.
1715202159
Hero Member
*
Offline Offline

Posts: 1715202159

View Profile Personal Message (Offline)

Ignore
1715202159
Reply with quote  #2

1715202159
Report to moderator
TalkImg was created especially for hosting images on bitcointalk.org: try it next time you want to post an image
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715202159
Hero Member
*
Offline Offline

Posts: 1715202159

View Profile Personal Message (Offline)

Ignore
1715202159
Reply with quote  #2

1715202159
Report to moderator
1715202159
Hero Member
*
Offline Offline

Posts: 1715202159

View Profile Personal Message (Offline)

Ignore
1715202159
Reply with quote  #2

1715202159
Report to moderator
Cricktor
Hero Member
*****
Offline Offline

Activity: 756
Merit: 1118


Crypto Swap Exchange


View Profile
April 27, 2024, 09:44:02 PM
Last edit: April 27, 2024, 10:56:35 PM by Cricktor
Merited by hugeblack (2), ABCbits (1)
 #2

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?

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10555



View Profile
April 28, 2024, 04:51:55 AM
Merited by ABCbits (3), hugeblack (2)
 #3

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.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!