1

In the Bitcoin network, when a miner discovers a new block, he needs to broadcast it to other nodes. Does the node only broadcast to outbound connections or does it broadcast to inbound connections as well? I hope to get the result according to the source code and it would be great if the answer would point out the file of the corresponding code.

1

All peers are treated equally when relaying chain-extending blocks (as James C. stated in a comment on another answer). The node will announce the block to all of its peers and since that block was just found, all of the peers should request the new block.

Many miners will also announce new blocks on Fast Internet Bitcoin Relay Engine (FIBRE) in addition. Any new block on FIBRE will be immediately broadcast to all participants in a compressed format based on compact blocks (BIP152).

| improve this answer | |
0

The number of peers connected to your node is configurable. You can increase it from 8. Your node will broadcast to the connected peers, who, in turn, will broadcast to their connected peers.

| improve this answer | |
  • For each node, up to 8 nodes can be actively connected and 117 foreign connections can be accepted. So is the broadcast block broadcast to 125 nodes or just to the actively established nodes? – and zhao Nov 25 '18 at 12:54
  • 1
    You can configure inbound, outbound and permanent connections for your node. I am not sure what 117 refers to, inbound? Outbound connections are also foreign as their addresses are discovered on the network(not permanent). In any case, you can set the limits there. All connections are treated equally in respect to broadcasting, propagating of chain-extending blocks. – James C. Nov 30 '18 at 7:58
  • This is no longer true. Blocks are no longer sent unsolicited. – David Schwartz Aug 25 at 8:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.