Bitcoin Forum
May 17, 2024, 12:45:50 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin wallet  (Read 174 times)
Gdns8476 (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 1


View Profile
March 07, 2021, 04:32:02 PM
 #1

Hi, how the wallet knows IP & port of available node?
BrewMaster
Legendary
*
Offline Offline

Activity: 2114
Merit: 1292


There is trouble abrewing


View Profile
March 07, 2021, 04:34:06 PM
Last edit: March 07, 2021, 04:44:44 PM by BrewMaster
 #2

bitcoin nodes start by first connecting to a set of hard coded seeders that have a list of bitcoin node's IP addresses. then it will get and construct a list of its own from any node that it connects to so that in the future it can choose one from that list for future connections.

There is a FOMO brewing...
NotATether
Legendary
*
Offline Offline

Activity: 1610
Merit: 6746


bitcoincleanup.com / bitmixlist.org


View Profile WWW
March 08, 2021, 06:15:05 PM
 #3

When you start Bitcoin Core, it reads a file on disk called peers.dat which contain the IP addresses of all peers that is has ever connected to. It will start with 10 outgoing connections to peers and at least 10 incoming connections which grows over time as more nodes are discovered, and added to the peers.dat file appropriately.

You can also use the -addnode option on the command line or the addnode directive in the bitcoin.conf configuration file to manually add nodes that you want it to keep a connection to in addition to the discovered peers and the ones contained in peers.dat.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
ranochigo
Legendary
*
Offline Offline

Activity: 2968
Merit: 4193



View Profile
March 09, 2021, 01:36:17 AM
 #4

When you start Bitcoin Core, it reads a file on disk called peers.dat which contain the IP addresses of all peers that is has ever connected to. It will start with 10 outgoing connections to peers and at least 10 incoming connections which grows over time as more nodes are discovered, and added to the peers.dat file appropriately.
There isn't a requirement to maintain incoming connections nor can the node decide whether other nodes should connect to it. Outgoing connections is capped at 10 but can be lower as well. Incoming connection doesn't change with the discovery of other nodes but the knowledge of your node by others. 2 of the peers are reserved as block-relay only nodes which is read from anchors.dat.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


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