Bitcoin Forum
November 13, 2024, 06:29:10 PM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Question about inbound and outbound connections on bitcoin core  (Read 130 times)
alexrossi (OP)
Legendary
*
Offline Offline

Activity: 3892
Merit: 1745


Join the world-leading crypto sportsbook NOW!


View Profile
March 04, 2022, 03:47:14 PM
 #1

I have a question about a technical aspect on bitcoin core:

I've understood that when syncing, core only connect to outbound peers to get the blocks. Then, after the initial sync, if the firewall allows it, it start to get inbound connections (nodes that connect to the open 8333 port)

What is not clear to me is the block fetching after a full sync: will my node, even after syncing, only fetch new blocks from the 8-10 outbound connections, or it'll be able to get the blocks from every node connected? I assume for ex. that mempool transactions can be broadcasted by every node (inbound and outbound), but i'm not sure about new blocks.

  ▄▄███████▄███████▄▄▄
 █████████████
▀▀▀▀▀▀████▄▄
███████████████
       ▀▀███▄
███████████████
          ▀███
 █████████████
             ███
███████████▀▀               ███
███                         ███
███                         ███
 ███                       ███
  ███▄                   ▄███
   ▀███▄▄             ▄▄███▀
     ▀▀████▄▄▄▄▄▄▄▄▄████▀▀
         ▀▀▀███████▀▀▀
░░░████▄▄▄▄
░▄▄░
▄▄███████▄▀█████▄▄
██▄████▌▐█▌█████▄██
████▀▄▄▄▌███░▄▄▄▀████
██████▄▄▄█▄▄▄██████
█░███████░▐█▌░███████░█
▀▀██▀░██░▐█▌░██░▀██▀▀
▄▄▄░█▀░█░██░▐█▌░██░█░▀█░▄▄▄
██▀░░░░▀██░▐█▌░██▀░░░░▀██
▀██
█████▄███▀▀██▀▀███▄███████▀
▀███████████████████████▀
▀▀▀▀███████████▀▀▀▀
█████████████LEADING CRYPTO SPORTSBOOK & CASINO█████████████
MULTI
CURRENCY
1500+
CASINO GAMES
CRYPTO EXCLUSIVE
CLUBHOUSE
FAST & SECURE
PAYMENTS
.
..PLAY NOW!..
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
March 04, 2022, 03:56:31 PM
 #2

Core will continue to do node discovery periodically while it's running to see if other nodes have longer chains and favours the ones that do have the longest chains and lowest ping/latency.

Nodes send a list of nodes they've connected to to other nodes to enable all nodes to do their own peer discovery (up to 1000 addresses for nodes can be sent to others but a much lower number will actually be used as you'll connect to many nodes from that list and get their peer discovery lists too).
alexrossi (OP)
Legendary
*
Offline Offline

Activity: 3892
Merit: 1745


Join the world-leading crypto sportsbook NOW!


View Profile
March 04, 2022, 07:12:01 PM
 #3

Core will continue to do node discovery periodically while it's running to see if other nodes have longer chains and favours the ones that do have the longest chains and lowest ping/latency.

Nodes send a list of nodes they've connected to to other nodes to enable all nodes to do their own peer discovery (up to 1000 addresses for nodes can be sent to others but a much lower number will actually be used as you'll connect to many nodes from that list and get their peer discovery lists too).

Ok, so basically after a full sync, core ignore if a connection is inbound and outbound... when it receive a new block "alert" it gets the block as fast as it can, correct?


I'm asking this because only fetching new blocks from outbound nodes would greatly impact the speed of a fast propagation (let's say that I have the usual 10 outbound + 90 inbound, there is higher probability that one of the 90 will be faster to give a new block than the first 10).

  ▄▄███████▄███████▄▄▄
 █████████████
▀▀▀▀▀▀████▄▄
███████████████
       ▀▀███▄
███████████████
          ▀███
 █████████████
             ███
███████████▀▀               ███
███                         ███
███                         ███
 ███                       ███
  ███▄                   ▄███
   ▀███▄▄             ▄▄███▀
     ▀▀████▄▄▄▄▄▄▄▄▄████▀▀
         ▀▀▀███████▀▀▀
░░░████▄▄▄▄
░▄▄░
▄▄███████▄▀█████▄▄
██▄████▌▐█▌█████▄██
████▀▄▄▄▌███░▄▄▄▀████
██████▄▄▄█▄▄▄██████
█░███████░▐█▌░███████░█
▀▀██▀░██░▐█▌░██░▀██▀▀
▄▄▄░█▀░█░██░▐█▌░██░█░▀█░▄▄▄
██▀░░░░▀██░▐█▌░██▀░░░░▀██
▀██
█████▄███▀▀██▀▀███▄███████▀
▀███████████████████████▀
▀▀▀▀███████████▀▀▀▀
█████████████LEADING CRYPTO SPORTSBOOK & CASINO█████████████
MULTI
CURRENCY
1500+
CASINO GAMES
CRYPTO EXCLUSIVE
CLUBHOUSE
FAST & SECURE
PAYMENTS
.
..PLAY NOW!..
odolvlobo
Legendary
*
Offline Offline

Activity: 4494
Merit: 3417



View Profile
March 06, 2022, 08:14:28 AM
Merited by ABCbits (2), Foxpup (1), alexrossi (1)
 #4

The only difference between inbound and outbound nodes is who initiates the connection. There is no distinction regarding information flow.

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
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!