1

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:

  1. Is this the right location for setting Seed Nodes?

  2. 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

  3. The port numbers are different. Why? For simplicity, can i just stick with the standard 18080 ?

1
  1. Yes.
  2. It is set for you based on flags passed in when launching the daemon. Without the --testnet or --stagenet flags, it defaults to mainnet.
  3. Unique port numbers are used to prevent clashing with other services. A fork using the default monero ports would be very bad practice.
  • thanks for this. By the way, have you come across an up-to-date forking guide? – James Jul 4 '18 at 10:50
  • No. Why would Monero developers write a "guide" on how to fork Monero? – jtgrassie Jul 5 '18 at 1:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.