Bitcoin uses TCP for P2P but why is UDP not used? Modern day internet has relatively low packet loss rate so UDP is reliable. Even if some packets are dropped the peers can always request for the blocks. With TCP, the network is rather staticly…
When client A opens a connection to client B, it opens its TCP connection to second client's port 8333. Is this connection solely used for A's queries and B's answers to A's query, or can B also query A using the same connection?
For example, A can…
I'm trying to understand how exactly does the Bitcoin client communicate initially with another client, as I'm making my own client and learning new things about TCP protocol. As I understand, the Bitcoin client uses the standard port (8333) as a…
I`m currently programming some TCP communication in my custom Bitcoin client. I am wondering if it is possible for the official client to communicate with it if they are sitting on the same machine? For example, if I'd send a version message to…
As a personal exercise I want to write a minimal copy of BTCPayServer. I decided to use Electrum server instead of a node to fetch information from the network. My final goal is to be able to track the transactions received by an address, but so far…
I am trying to implement an SPV client in python (for my own learning). I want to start by making a simple TCP connection to a full node, but I either cannot get a response to my version message, or to my verack message if the version message goes…
Background
I was following 402 Payment Required's LN video and everything was good until the moment of the first Initialization of my LN node. I got an error: dial tcp my-external-ip:9735: connect: connection timed out.
I was starting the…
I am using the decred atomic swap, and no matter what port I set the testnet to use, it says connection refused. I backpropagated the dependencies and everything seems to be working properly, what is poassibly causing the block for the tcp…
I'd like to add every valid transaction my node receives to my own database.
At the moment, I'm using getrawmempool every second to find new transactions, and then getting the data for them using getrawtransaction.
However, these bitcoin-cli queries…
If I run bitcoin client for the first time its try to make TCP connection with saved list of IPs and port 8333 -other nodes. If this nodes are behind NAT with IP 192.168.0.XX and public IP from the NAT router with changed from NAT unknown port its…
According to the protocol specification at the Bitcoin wiki, each message header includes the first 4 bytes of sha256(sha256(payload) as a packet checksum. I suppose this checksum is used for packet validation, but I do not see any benefit of this,…
I assume it's TCP, but is there some other software used to send and receive data?
So how would I program a very simple C++ program that sends a test message to a node?
does anyone here knows how to find the addresses from a tx object from the bitcoin protocol documentation on the peer to peer network??
in the document it says that tx message is only consist of version, flag, tx_incount, tx_in, tx_out count ,…
I connected a node A to bitcoin testnet (Port 18333). The node discovery happens and I see couple of connections between my node A and the seed nodes. All of the sending and receiving happens between nodes ONLY via Port 18333 (I checked this in…