Bitcoin Forum
May 06, 2024, 06:03:16 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: What is the default inbound and outbound connection timeout?  (Read 78 times)
NotATether (OP)
Legendary
*
Offline Offline

Activity: 1596
Merit: 6728


bitcoincleanup.com / bitmixlist.org


View Profile WWW
November 24, 2020, 01:50:16 PM
 #1

By now, my full node has about 90 incoming connections and 10 outgoing connections. The server I host my node on had a firewall issue recently that caused all network packets to be dropped, a problem I fixed in a few minutes without rebooting or otherwise exiting Core. My peers have stayed largely the same and it doesn't look like any disconnected from a timeout.

So, I would like to know what is the default timeout for inbound connections and outbound connections before the other peer closes the connection. In other words, how much time I have to fix network connectivity issues before I begin to lose most of my peers. I assume these two can have different values?

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
1714975396
Hero Member
*
Offline Offline

Posts: 1714975396

View Profile Personal Message (Offline)

Ignore
1714975396
Reply with quote  #2

1714975396
Report to moderator
1714975396
Hero Member
*
Offline Offline

Posts: 1714975396

View Profile Personal Message (Offline)

Ignore
1714975396
Reply with quote  #2

1714975396
Report to moderator
Even in the event that an attacker gains more than 50% of the network's computational power, only transactions sent by the attacker could be reversed or double-spent. The network would not be destroyed.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714975396
Hero Member
*
Offline Offline

Posts: 1714975396

View Profile Personal Message (Offline)

Ignore
1714975396
Reply with quote  #2

1714975396
Report to moderator
1714975396
Hero Member
*
Offline Offline

Posts: 1714975396

View Profile Personal Message (Offline)

Ignore
1714975396
Reply with quote  #2

1714975396
Report to moderator
ranochigo
Legendary
*
Offline Offline

Activity: 2954
Merit: 4166


View Profile
November 24, 2020, 02:04:46 PM
 #2

So, I would like to know what is the default timeout for inbound connections and outbound connections before the other peer closes the connection. In other words, how much time I have to fix network connectivity issues before I begin to lose most of my peers. I assume these two can have different values?
Bitcoin Core has two flags, -peertimeout[1] and -timeout[2]. Both of which are configurable by the user. The latter meaning the timeout when connecting to peers while the former means the time for which it waits when a peer is unresponsive before disconnecting.

I don't think Bitcoin Core removes the nodes from peers.dat unless they misbehave right? If so, then your peers will reconnect when they restart anyways so no worries there.

You can find the relevant codes here:
[1] https://github.com/bitcoin/bitcoin/blob/1b75f2542d154ba6f9f75bc2c9d7a0ca54de784c/src/net.h#L85
[2] https://github.com/bitcoin/bitcoin/blob/1ae46dce60a187740ec78b5a3cee8baad0fa539d/src/netbase.h#L23

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


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


View Profile
November 24, 2020, 02:05:27 PM
 #3

From what I know the peers.dat file contains 1000 peers (by default) that your node can connect to. I dont think such time exists I think you might just drop in the rankings of some nodes (if they're favouring faster ping speeds first) but you won't be completely removed from the peers.dat until the node receives peers that are more favourable than you - and once your dropped if your connection is fast enough and you're fully synced your address will probably be propagated again quite fast.
ABCbits
Legendary
*
Offline Offline

Activity: 2870
Merit: 7464


Crypto Swap Exchange


View Profile
November 25, 2020, 09:31:50 AM
Merited by ranochigo (1)
 #4

OP, if you need default parameter of Bitcoin Core, you can check https://jlopp.github.io/bitcoin-core-config-generator/ which shows default parameter with short explanation for each group with.

I don't think Bitcoin Core removes the nodes from peers.dat unless they misbehave right? If so, then your peers will reconnect when they restart anyways so no worries there.

I agree, i doubt sending few incomplete transaction/block is enough to get you banned. But even if OP node is banned, usually it's temporary (default is 86400 sec/1 day) and will be added to peers.dat after short time.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
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!