Questions tagged [p2p]

Peer-to-peer (p2p) network protocols are used to transmit messages between network nodes of identical status in the network. In a p2p network, all participants look the same to each other.

Filter by
Sorted by
Tagged with
1 vote
0 answers
45 views

Max amount of peers connections on LND

I'm trying to connect to a long list of peers. I'm running a LND(0.17.0) node. My list has almost 1k peers and I can only connect to 6 of them. Is my node limiting the max connections? If so, is it ...
polespinasa's user avatar
2 votes
1 answer
106 views

Is there a way to download blocks from scratch without downloading block headers first?

I would like to know if there's a way to download a blockchain without knowing block headers. This could be achieved by asking NEXT_BLOCK_HASH from the genesis block. But is this even possible ?
Loopite's user avatar
  • 301
4 votes
1 answer
223 views

BIP324 encrypted packet structure

I recently saw the BIP 324 proposal. It shows us there can be some privacy enhancement by using ECDH secrets and encryption algorithms such as ChaCha20 and AEAD-ChaCha20-Poly1305. The proposal ...
Loopite's user avatar
  • 301
1 vote
3 answers
125 views

What protocol do bitcoin nodes use to talk to each other?

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?
apchrkey's user avatar
1 vote
1 answer
124 views

What do the files in bitcoin/src/rpc/ do?

I know that RPC stands for Remote Procedure Call. Does Bitcoin Core do RPCs with other nodes on the network?
Eoin McQuinn's user avatar
6 votes
1 answer
259 views

Is FIBRE still in use in 2023?

I have read Can someone please explain FIBRE to me like I'm 5 and why is it useful? then https://bitcoinfibre.org/ and https://github.com/bitcoinfibre/bitcoinfibre. But I still do not understand, ...
WebOrCode's user avatar
  • 333
5 votes
2 answers
131 views

How would an adversary increase the required fee to replace a transaction by up to 500 times?

In the ephemeral anchors draft BIP (also discussed here) it states that without V3 transactions an adversary can increase the required fees to replace a transaction as much as 500 times. That sounds a ...
Michael Folkson's user avatar
3 votes
0 answers
95 views

No answer to my `getdata` message

I am trying to fetch blocks using P2P messages but at block 501500 I never received any block message. Here how I do it : I am connecting to a node version/verack happens smoothly. I instantly answer ...
rllola's user avatar
  • 151
1 vote
2 answers
82 views

Request tx messages from other peers?

I'm trying to request tx messages from known peers but it doesn't appear as though this is supported with bitcoin-cli. Is there a way to do this?
bitcoinluvr6969's user avatar
1 vote
1 answer
67 views

Is the nVersion=3 policy proposal introducing additional policy rules and going against the policy principle to only relax policy rules?

In the PR review club on "nVersion=3 and Package RBF" (February 22nd 2023) glozow stated: But in policy we want to strictly loosen rules. Otherwise we could accidentally censor transaction ...
Michael Folkson's user avatar
3 votes
1 answer
94 views

What is an ephemeral anchor and what problems do they address?

What is an ephemeral anchor and what problem(s) would their introduction address? What is their relation to anchor outputs in Lightning? Are ephemeral anchors a prerequisite for eltoo? V3 and package ...
Michael Folkson's user avatar
0 votes
1 answer
98 views

What issues would changing the default policy in Core to mempoolfullrbf=1 resolve and which of the current policy proposals would be simplified?

What issues would changing the default mempool policy in Core to mempoolfullrbf=1 resolve and which of the current policy proposals (e.g. BIP125 replacement, V3 Policy, package RBF, discussed here) ...
Michael Folkson's user avatar
1 vote
1 answer
167 views

What and where are the current status of the BIP 125 replacement, the V3 Policy proposal, package RBF etc?

Whenever I try to review P2P and mempool (default) policy proposals I end up going round in circles around this maze of docs, mailing list posts and pull requests. Some of them are outdated, some ...
Michael Folkson's user avatar
1 vote
1 answer
94 views

Low number from getconnectioncount

I have been running my bitcoin node for about 24 hours now and I'm hovering at 54 active connections. However, I thought that I would be at 125. Why is it that I'm not exceeding this number? ...
bitcoinluvr6969's user avatar
3 votes
1 answer
119 views

ThreadOpenConnections and break versus continue: why the one versus the other?

In the inner loop of ThreadOpenConnections() in net.cpp sometimes there is a break to the outer loop and sometimes a continue. This is my understanding of the decision between break and continue in ...
codo's user avatar
  • 31
2 votes
1 answer
64 views

Bitcoin P2P network: unable to receive the full block data (witness stripped off)

I wrote a small script to play with the bitcoin P2P network. The script advertises itself as (NODE_NETWORK | NODE_WITNESS), and connects to a full node running on the LAN. Everything seems to work ...
Simon L's user avatar
  • 111
1 vote
1 answer
32 views

listchannels returns no results from CLN

CLN 0.12.1 My node has been running for hours now. But it doesn't seem to be aware of the network. This is what I get when I try to run listchannels. $ lightning-cli listchannels { "channels&...
Zephyrus's user avatar
  • 658
2 votes
1 answer
133 views

Why does the bitcoin client send transaction's txid and wtxid in 'inv' process?

I'm reading the source code of Bitcoin Core, and I found that in the inv process, nodes will relay both txid and wtxid to other peer nodes. I have the following questions: Why does the node send ...
noob's user avatar
  • 97
1 vote
0 answers
26 views

BIP-330 test cases

Are there any test cases for BIP-330 "Transaction announcements reconciliation"? More specifically, I need some test cases for the serialization/deserialization of the new p2p messages, ...
Davidson Souza's user avatar
0 votes
1 answer
69 views

Collisions when adding an address entry to the new table

What does the bitcoin protocol do to handle collisions when adding addresses to the new table?
Vinay Shetty's user avatar
3 votes
1 answer
258 views

Is it bad practice to run full node with all Bitcoin P2P protocol optional services enabled?

I am running my full node /Satoshi:23.0.0/ with all optional services enabled. These are: NETWORK, BLOOM, WITNESS, COMPACT_FILTERS, and NETWORK_LIMITED. My bitcoin.conf file contains following entries:...
deyw's user avatar
  • 478
3 votes
2 answers
390 views

Is it possible to set RBF as always-on in bitcoind?

I can't seem to find any cli commands for this. Is it even possible? Or does RBF need to be opted into on a per transaction basis? I would just like every transaction sent by my node to be RBF enabled....
Aaron's user avatar
  • 33
1 vote
2 answers
104 views

Details regarding bitcoin addr messages

What is the frequency of the addr messages in bitcoin? And are the contents of the addr messages from the new or the tried table or both?
Vinay Shetty's user avatar
0 votes
0 answers
99 views

Sending addr messages to nodes

I came across this resource that can be potentially used to send messages to nodes. How would I go about sending addr messages to nodes? Is there a built in utility that I could use(bitcoin-cli) or do ...
Vinay Shetty's user avatar
1 vote
2 answers
272 views

What is an inv message?

I was reviewing the PR #25720. This is part of description for the PR: However, if an INV for a block is received before our headers chain is caught up, we'll then start to sync headers from each ...
Amir reza Riahi's user avatar
3 votes
1 answer
169 views

DNS Seeds for TORv3

Does querying the DNS Seeds via TOR return .onion addresses? If not, then if my node is a TOR only node, does it always get the .onion addresses to connect to, from the hard-coded list? Additionally, ...
Vinay Shetty's user avatar
5 votes
2 answers
854 views

How does bitcoin prevent DDoS amplification via the `addr` p2p message type?

If I am not mistaken the mainline bitcoind will accept unsolicited addr messages, and upon receiving this message - the struct is deserialized, and then verify each address from the unsolicited ...
Rook's user avatar
  • 333
4 votes
1 answer
348 views

What is the different between CompactSize and VarInt encoding?

Pieter Wuille's definition of CompactSize encoding seems to match Greg Walker's definition of VarInt encoding, yet the BitcoinWiki claims that CompactSize is not to be confused with VarInt. What, if ...
drogos86's user avatar
  • 117
1 vote
0 answers
79 views

Drastic decrease in peers

Been running a standalone node on the same hardware for some years now. I run this node simply as a supportive node, unlocked bandwidth to facilitate people bootstrapping the blockchain. No settings ...
Mike's user avatar
  • 464
8 votes
1 answer
774 views

What is the difference between blocksonly and block-relay-only in Bitcoin Core?

The terms blocksonly and block-relay-only that are used in Bitcoin Core are very similar. What is the difference between them?
Lightlike's user avatar
  • 591
1 vote
1 answer
76 views

How does a node get information from the TxID?

If I'm right, segwit TxIDs are composed of the SHA^2(256) hash of the non-segwit data of a transaction. But, how does another node use the TxID to obtain information about the transaction such as the ...
Jamo's user avatar
  • 157
3 votes
1 answer
138 views

Does running a node benefit the network?

There is a 10-year old question asking this. The sole answer to that question at the time was essentially a yes, and I've seen people say that running a node makes the network more "secure" ...
Vojtěch Strnad's user avatar
7 votes
1 answer
399 views

What is the maximum, realistic P2P message payload size?

In Bitcoin Core, MAX_SIZE defines the maximum valid P2P message payload size to be 32MB. Is it realistic that a peer sends a message payload close to 32MB? What is the maximum, but still realistic ...
0xb10c's user avatar
  • 1,390
1 vote
0 answers
93 views

Programmatically determining a full node in a peer-to-peer network

So I've found relatively few resources explaining the intricacies of the Bitcoin P2P network internal functionality. Right now, I'm writing a similar sort of peer-to-peer network, in another language ...
John Doe's user avatar
1 vote
1 answer
116 views

If we allow zero fee transactions within new policy rules for package relay why not also allow zero satoshi outputs?

In the proposed package relay the requirement that a transaction must meet the minimum relay fee rate is relaxed (the fee rate can be zero by the new policy rules) as long as the package in its ...
Michael Folkson's user avatar
0 votes
1 answer
82 views

How do bitcoin nodes rollback state when a higher POW chain is introduced

Let's say the current chain consensus has a total POW of X... this is agreed upon by all 10k+ BTC nodes. A new "magic" node joins and it has mined a chain (privately) with total POW = 2*X. ...
user491880's user avatar
0 votes
1 answer
75 views

What's the specification for Compact Size service messages?

I'm trying to understand the structure of the service and network bytes for compact sizes. what's specification for compressing the bytes for example in addrv2 message encoding? thanks.
Chiru's user avatar
  • 141
3 votes
1 answer
190 views

Can "Block" Message send multiple blocks?

Can multiple blocks be sent in a single block message in response to the GetBlocks message, or will a new Block message have to be sent for every block? Thanks.
Chiru's user avatar
  • 141
2 votes
2 answers
114 views

What resources are needed to implement an Eclipse attack?

I have read this paper of Eclipse attack. And I want to konw that what resources are needed to implement an Eclipse attack? IP addresses and investing attack time are needed, and is there anything ...
A-qiu's user avatar
  • 21
0 votes
1 answer
58 views

Maximum number of outbound connections in 2009

Maximum number of outbound full relay connections is 8 and 2 block-only excluding manual connections (8) right now Maximum number of outbound full relay connections What was maximum number of outbound ...
user avatar
2 votes
1 answer
140 views

How does using DNS seeds to find initial peers compare to using seednode?

How does using DNS seeds to find initial peers compare to using -seednode? This was asked by prayank on IRC and has been paraphrased. A related question is here.
Michael Folkson's user avatar
2 votes
0 answers
126 views

Version message C++

I learn bitcoin and I am trying to send a version message and get response, respectevily, by using C++. I can not find any examples or articles how to do it in C++. I'm forming request and send it by ...
Mephistopheles's user avatar
1 vote
1 answer
517 views

Bind to local IP address and use it in addpeeraddress

Bind local IP (Node 1) bitcoind -regtest=1 -port=18333 -bind=192.168.150.110 Logs: 2021-09-01T13:14:16Z Bound to 192.168.150.110:18333 2021-09-01T13:14:16Z Bound to 127.0.0.1:18445 Trying to add it ...
user avatar
1 vote
2 answers
96 views

What would happen to Bitcoin if GPS/Galileo timing ceased to be available?

According to this web site, the timing from a system like GPS is essential to "financial networks [which] rely on precision timing for synchronization and operational efficiency." Is the ...
brethvoice's user avatar
5 votes
1 answer
391 views

Is the `mempool` message reliable?

According to https://github.com/bitcoin/bitcoin/blob/master/src/net_processing.cpp#L3775-L3801, it seems like the mempool message is only responded to in certain cases. Can someone help understand how ...
cloudhead's user avatar
  • 189
0 votes
0 answers
40 views

Can transactions be held for a long time without being processed?

I am learning a little bit about the bitcoin technology and I have some basic questions about its p2p and transaction processing. First imagine that a bitcoin transaction has included a fee (maybe a ...
Ivan's user avatar
  • 101
3 votes
1 answer
100 views

Is it possible to check which nodes banned my node?

I can ban peers with setban and check banned peers with listbanned in Bitcoin Core. Can I check which peers banned me?
user avatar
1 vote
1 answer
143 views

Is Bitcoins' peer-to-peer network unstructured or structured?

I can't find information about if the p2p network of Bitcoin is unstructured (the nodes are not organized in any specific way), or if it is structured (the nodes do have a way to interact with each ...
Julia's user avatar
  • 11
2 votes
1 answer
178 views

What happens if a peer doesn't respond to "getheaders" or "getdata" on time?

Suppose a node receives the same "inv" message from many peers. Will the node send "getheaders" requests to all the peers or only one of them? Does the node keep a timer for ...
satya's user avatar
  • 171
1 vote
0 answers
42 views

Pseudocode for Bitcoin's P2P block propagation

I am going through Bitcoin's block propagation method at https://developer.bitcoin.org/devguide/p2p_network.html Are you aware of any pseudocode available on how blocks are propagated during the ...
satya's user avatar
  • 171