How to proceed after connecting with hardcoded node?

0 votes

I have made the following changes in the bitcoin source code:

  1. Disabled the DNS seed discovery in order to force bitcoind to fallback to connect to hardcoded nodes.

  2. Changed the default hardcoded nodes to my known 4 addresses, lets say A,B,C and D, which I ensure are always online.

Now, when I run the bitcoind client it connects to one of the addresses, running the same modified version of bitcoind. It gets the peer addresses from the ode that it first connects to by exchanging getaddr and addr messages but I am not sure how it proceeds after that. 

What is a node falls back to connect to hardcoded nodes? is it supposed to connect to only one of the hardcoded nodes or can it connect to multiple nodes?

Then, after getting peer address via the addr message, when will the bitcoind client node start connecting to those peers ?

Aug 27, 2018 in Blockchain by sabby
• 4,350 points

edited Aug 27, 2018 by sabby 54 views

1 answer to this question.

0 votes

I am assuming that by hardcoded nodes you actually mean DNS seeds of nodes. When you run them through the DNS request you'll get a new node on every request. The hardcoded nodes is a backup mechanism if DNS fails. If the node isn't connected to its maximum capacity, it will try connecting to new nodes the second it'll get the addr message. You can find them here: https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp#L181
 

answered Aug 27, 2018 by Perry
• 17,020 points

Related Questions In Blockchain

0 votes
1 answer

How to send Bitcoins with node.js?

This website https://blockr.io/tx/push will successfully do the bitcoin transaction. You ...READ MORE

answered Jul 20, 2018 in Blockchain by Christine
• 15,790 points
461 views
+3 votes
2 answers

How to run ethereumjs using Node.JS

You need to install testrpc globally on ...READ MORE

answered Mar 27, 2018 in Blockchain by ned_crew
• 1,620 points
156 views
0 votes
1 answer
0 votes
1 answer

How to create tokens in smart contracts from node.js?

Any modification to the Ethereum Blockchain will ...READ MORE

answered Jun 26, 2018 in Blockchain by Shashank
• 10,350 points
161 views
0 votes
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured by TLS encryption in hashgraph architecture-hashgraph, ...READ MORE

answered Aug 6, 2018 in Blockchain by ariaholic
• 7,340 points
89 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
169 views
0 votes
1 answer
0 votes
1 answer

How to read a state after writing it into a chaincode?

Data that is 'written' in chaincode is ...READ MORE

answered May 28, 2018 in Blockchain by Perry
• 17,020 points
940 views
0 votes
1 answer

In a non-cryptocurrency implementation of Blockchain, how to successfully mine a node?

Difficulty is a property of the blockchain, ...READ MORE

answered Jul 13, 2018 in Blockchain by Perry
• 17,020 points
50 views