Bitcoin Forum
July 05, 2024, 01:04:11 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Questions about Bitcoin development technology  (Read 109 times)
ywnasdzkd (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 4


View Profile
October 06, 2022, 09:42:02 AM
 #1

Here are some questions about the node deployment of Bitcoin. I hope you can help me. Thanks.

Question 1
-connect=<ip>
       Connect only to the specified node; -noconnect disables automatic connections (the rules for this peer are the same as for -addnode). This option can be specified multiple times to connect to multiple nodes.

The above is a description of Bitcoin connection options. What is the maximum number of times the connection is used?in other words,How many nodes can a node connect at the same time?

Question 2
If I have an IP address of a node, can I obtain the IP addresses of all nodes connected to this node?
NeuroticFish
Legendary
*
Offline Offline

Activity: 3724
Merit: 6446


Looking for campaign manager? Contact icopress!


View Profile
October 06, 2022, 10:09:50 AM
Merited by pooya87 (2), ABCbits (2), hugeblack (2)
 #2

Here are some questions about the node deployment of Bitcoin. I hope you can help me. Thanks.

Question 1
-connect=<ip>
       Connect only to the specified node; -noconnect disables automatic connections (the rules for this peer are the same as for -addnode). This option can be specified multiple times to connect to multiple nodes.

The above is a description of Bitcoin connection options. What is the maximum number of times the connection is used?in other words,How many nodes can a node connect at the same time?

The default number of connections (nodes) Bitcoin Core works with is 125: 10 outbound and 115 inbound.
This number is big - leads to a lot of traffic - and, depending on your internet plan you may want to adjust.
Normally the peer nodes are "harvested" from the network, but you can add with addnode "fallback nodes" you may want to be sure you connect to (see here)
From the way I understand these numbers, I think that the answer to your intended question may be 10.

Question 2
If I have an IP address of a node, can I obtain the IP addresses of all nodes connected to this node?

Nope.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
NotATether
Legendary
*
Offline Offline

Activity: 1652
Merit: 6950


In memory of o_e_l_e_o


View Profile WWW
October 06, 2022, 03:11:38 PM
 #3

In regards to your second question, you can only obtain the IP addresses of nodes connected to your own node, by inspecting peers.dat. Collecting those of other IP addresses requires you to build a custom version of Core that dumps peer gossip output to a JSON file or something similar.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
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!