There is no Monero Forking guide so started by using the original CryptoNote documentation (https://cryptonotestarter.org/inner.html). This refers to the following reference for registering Seed Nodes but it is out of date:
src/CryptoNoteConfig.h
Add IP addresses of your seed nodes.
Example:
const std::initializer_list<const char*> SEED_NODES = {
"111.11.11.11:17236",
"222.22.22.22:17236",
};
I am trying to find out where in the Monero codebase I register the IP Addresses of Seed Nodes. Searching within the Monero Source files, I have found the following:
src/p2p/net_node.h line 226
std::set<std::string> get_seed_nodes(cryptonote::network_type nettype) const;
src/p2p/net_node.inl line 367:
template<class t_payload_net_handler>
std::set<std::string> node_server<t_payload_net_handler>::get_seed_nodes(cryptonote::network_type nettype) const
{
std::set<std::string> full_addrs;
if (nettype == cryptonote::TESTNET)
{
full_addrs.insert("212.83.175.67:28080");
full_addrs.insert("5.9.100.248:28080");
full_addrs.insert("163.172.182.165:28080");
full_addrs.insert("195.154.123.123:28080");
full_addrs.insert("212.83.172.165:28080");
}
else if (nettype == cryptonote::STAGENET)
{
full_addrs.insert("162.210.173.150:38080");
full_addrs.insert("162.210.173.151:38080");
}
else
{
full_addrs.insert("107.152.130.98:18080");
full_addrs.insert("212.83.175.67:18080");
full_addrs.insert("5.9.100.248:18080");
full_addrs.insert("163.172.182.165:18080");
full_addrs.insert("161.67.132.39:18080");
full_addrs.insert("198.74.231.92:18080");
full_addrs.insert("195.154.123.123:18080");
full_addrs.insert("212.83.172.165:18080");
}
return full_addrs;
}
My Questions:
Is this the right location for setting Seed Nodes?
Assuming it is the right location for setting Seed Nodes, how do I set the *nettype * variable which the above switch statement relies upon? What is best practice for using nettype
The port numbers are different. Why? For simplicity, can i just stick with the standard 18080 ?