Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Hot answers tagged

25 votes
Accepted

Why doesn’t Bitcoin use UDP to do Blockpropagation?

The Bitcoin system doesn't have just one network protocol: Any way of obtaining the blocks is equally valid-- blocks over freenet, over satellite broadcast, over the P2P network, all work just as ...
user avatar
  • 7,449
7 votes
Accepted

Why does the daemon require peers in order to start mining?

I wanted to start mining bitcoin from the genesis block I'm pretty sure regtest will let you do that. why wouldn't the peer just let me mine on my own chain and not broadcast my results to anybody?...
user avatar
  • 28.6k
7 votes

What is a Feeler Connection? When is it used?

A feeler connection is a short-lived outbound connection that only starts up after your node has established the required 8 outbound connections and 2 block-relay-only outbound connections. The ...
user avatar
  • 231
6 votes
Accepted

Testnet peers list (with IP addresses)

Just use a testnet dns seeder. Type this into your terminal: dig A testnet-seed.bitcoin.jonasschnelli.ch or dig A seed.tbtc.petertodd.org for IPv6 dig AAAA testnet-seed.bitcoin.jonasschnelli.ch
user avatar
6 votes
Accepted

How do I still have connections without forwarding port 8333?

When your node is not accepting inbound connections (either because there's NAT in the way or because you passed -listen=0 to Bitcoin) it still makes "outbound connections." These are connections to ...
user avatar
  • 28.6k
6 votes

How to confirm how many peers a node has?

When a node requests one of it's neighbours for a list of it's peers, that node responds with a list of all of it's neighbours. No it doesn't. It responds with list of nodes that its aware of being ...
user avatar
  • 7,449
5 votes

Can an unconfirmed transaction that only Blockchain.info shows be manually re-broadcast?

Old question, but answer might be helpful for someone. To get a raw transaction append: ?format=hex to the transaction URL. For example: https://blockchain.info/tx/...
user avatar
5 votes
Accepted

Stopping Hash field in GetBlocks Message

Node1 announces block B3, using an 'inv' message with B3's gash. Node2 does not know about B3, or its parent B2, but does know the grandparent B1. It sends a getblocks message, starting from B1, but ...
user avatar
5 votes
Accepted

How Do Peers Choose Which Peer To Trust?

either I broke some rule, or the other person did; In this case, how does my client find a trusted peer Your client does not trust any peer. It fully validates the blockchain. In the event of ...
user avatar
  • 60.6k
5 votes

What is a block-relay-only connection? What is it used for?

Block relay connections were added to bitcoin core in v0.19.0.1 in November 2019. Their purpose is to harden the peer-to-peer network against partition attacks. They do this through a clever ...
user avatar
  • 231
4 votes
Accepted

Regtest: One node nullifying other node's balance

You only see the balance of blocks that have at least another 100 on top. This is because coinbase outputs only become spendable after 101 confirmations (the maturity period). After the nodes ...
user avatar
4 votes
Accepted

How are messages exactly sent in bitcoin p2p protocol

I got the answer myself. Sorry! The src/net.cpp has this logic which explains all: void CNode::BeginMessage(const char* pszCommand) EXCLUSIVE_LOCK_FUNCTION(cs_vSend) { ENTER_CRITICAL_SECTION(...
user avatar
  • 105
4 votes
Accepted

What is the difference between inbound and outbound connections?

If your node initiated the connection, it's outbound, otherwise it's inbound. Nodes will send and receive data from both types of connections exactly the same way. maxconnections sets a limit on the ...
user avatar
4 votes

How to confirm how many peers a node has?

It returns some plausible peers, not all of its peers. You have no way of knowing any specific details about them, if they’re sybil, not operational, or not useful. The software tries to work out ...
user avatar
  • 15k
3 votes

Can we make Sybil attacks virtually impossible?

Proof of work is what makes Sybil attacks very difficult. Put simply, you trust the chain with the most proof-of-work on it. This cannot easily be faked (at least without significant mining power). It ...
user avatar
  • 7,619
3 votes

Total amount of nodes and avarage active peer number

Does anyone know where to find a reliable source for finding out a total amount of active bitcoin nodes? http://getaddr.bitnodes.io/ tracks listening peers on IPv4 and IPv6 only. The number is ...
user avatar
  • 15k
3 votes

How to make bitcoind connect to more nodes?

Bitcoind will never make more than 8 outgoing connections. By default, it will allow up to 128 connections (see -maxconnections), but that includes incoming ones. Available connection slots of fully ...
user avatar
3 votes
Accepted

How to make more than 1 nodes of mine connect each other?

You can add them to each other nodes bitcoin config file. If you want to connect to a specific node among others, use addnode=IP:PORT in your config. If you'd like to only connect to your own nodes ...
user avatar
  • 11.3k
3 votes

Can malicious peer hack freshly installed bitcoin-core node

Does freshly installed bitcoin-core node have genesis block included in the installation? Yes. This fresh node contacts some peer for downloading blockchain. Can malicious peer give node wrong ...
user avatar
3 votes

Can cryptocurrencies never be fully decentralized because finding peers is centralized?

... it needs to fetch peers from a centralized source. Not exactly. Once you are connected to the network, you will begin to receive lists of IP addresses and ports of known clients. There is a list ...
user avatar
  • 966
3 votes
Accepted

Bitcoin core: connect to specific peers from file

Within the data directory for your coin (/dir/for/yourcoin/.yourcoin) you will have a configuration file. Within this configuration file, you will want to place the line connect=IP ADDRESS:PORT This ...
user avatar
3 votes

Bitcoin core full node - Should I choose my peers or it's fine to use the hardcoded ones?

The list is just for bootstrapping, no need to manually list peers unless you have others you specifically want to maintain connectivity with.
user avatar
3 votes
Accepted

Transaction propagation criteria vs mempool inclusion cirteria

There are also the 'standardness rules', which are separate from 'validity rules'. So this means a transaction can be either valid and standard, valid but non-standard, or invalid. A node can choose ...
user avatar
  • 17.2k
3 votes

Bitcoin Core stalled peer logic during initial block download

During IBD, there is a "moving window" of 1024 blocks ahead from the current height, from which blocks can be requested from peers for parallel download. When a peer has an open slot for a ...
user avatar
2 votes
Accepted

Bitcoin peer to peer network source code

The source code for Bitcoin can be found at https://github.com/bitcoin/bitcoin. The P2P part is integrated within the core Bitcoin code, and is not available separately.
user avatar
  • 3,411
2 votes
Accepted

How are transactions efficiently distributed to network nodes before inclusion within blocks?

Have a look into the specifications https://en.bitcoin.it/wiki/Protocol_specification Check the "inv" --> "getdata" --> "tx" sequence of transaction distribution
user avatar
  • 6,592
2 votes

Could the BGP attack be used to split the Bitcoin network?

Having control over BGP and being able to split the Internet in two pieces can indeed be used to carry out an attack against some Bitcoin users. It might not even be that economically infeasible as ...
user avatar
  • 1,394
2 votes

bitcoind hub-nodes

It is a list of nodes that blockchain.info considers to be well-reachable. It's nothing authoritative - anyone can run a node, and there is no such concept as a 'hub node' on the network. As to why ...
user avatar
2 votes
Accepted

no IPv6 peers connecting to my node

The issue was that bitcoind was discovering my wrong IPv6 address. (It mistook my link IPv6 address for my public one.) I set --discover=0 and set my IPv4 and IPv6 addresses manually with --externalip....
user avatar
  • 4,307
2 votes
Accepted

How can I get my peer's ban score for my node?

Correct: there's no provision in the P2P network protocol for your peers to tell you what ban score they've computed for you. Since each node connected to you separately computes a ban score using ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible