12

Do you require 3 static IPs to run a stake pool?

  • 1 for each relay (x2)
  • 1 for a block producing node

Or, can I do 1 static IP, and have all these hostnames point to it:

  • relay1.domain.com
  • relay2.domain.com
  • bpn.domain.com

I've read that it is not recommended to use a Dynamic DNS provider service as there is some downtime between when your IP address changes and when it is updated by the DDNS provider.

I'm assuming that you can specify hostnames in place of IP addresses because someone did mention that DDNS can work, but isn't recommended.*

I am debating running this on hardware at home vs GCP, so any advice will be greatly appreciated. TIA

3 Answers 3

3

Do you require 3 static IPs to run a stake pool?

It depends. All your nodes needs a static addresses to talk to each other; this can be IP or dns. If going the IP route, it is best that the block producer IP is local and not public. The relay nodes will need to have public IP addresses.

  • 1 public for each relay (2 public static IPs all together)
  • for a block producing node (one private static IP)

Now if reserving static IP is tricky, then you can also get away with just domain name resolutions if you use a dns service that propagates ip changes quickly. What you don't want is for your nodes to be cut out from the network while is creating a block.

I'm assuming that you can specify hostnames in place of IP addresses because someone did mention that DDNS can work, but isn't recommended.*

DDNS can work but isn't recommended since those service are often very slow or buggy when it comes to updating dns records. Also, I think DDNS will be more problematic if the upcoming P2P and gossip protocols has any kind of caching layer.

3
  • Can you explain why you need 2 public static IPs for each relay? Also, the block-producer IP must be public, otherwise how the relays can see it?
    – Enzo
    Commented Jun 16, 2021 at 20:50
  • You need 2 altogether, 1 for each; I updated my answer. Your block producer should talk to your relay via a private or local network. Since your block-producer has sensitive information, you don't want the out getting in while still allowing all the things already in to talk to each other. Commented Jun 22, 2021 at 22:56
  • It's not a requirement to have static public IPs for each relay - you can easily share a single IP address and have them on different ports (assuming you have the ability to forward these on, for ex. using NAT). Commented Jun 23, 2021 at 7:16
2

You need to ensure that if your pool creates a block, that this is properly propagated to the rest of the network. So, your pool needs to be connected to the Cardano network at this specific time.

When your IP changes and the DDNS updates this record, it take take up to 5 minutes or more to propagate this DNS change to the rest of the internet. Your peers will probably detect that your IP is down and will try to reconnect.

So, to answer your question: it depends. Can you ensure the change of IP is made in a way that does not break your connection to the network or that it does so not when your block creation is scheduled?

I would say, it is possible, but not sure if it is worth to put in the effort. Can you buy a static IP from your ISP?

1
  • Thanks Marek! My question was more to the number of static IPs required for this endeavor - i.e. do all 3 machines (2 relays + 1 block producing node) require 1 static IP each? I will edit my question so this is clearer :)
    – Edwin Chua
    Commented May 31, 2021 at 13:40
1

You do not need a static public IP address for each node. You can easily run multiple relays on a single public IP address using different ports (eg. behind NAT/port forwarding).

Eg.

1.2.3.4 port 3001 -> relay 1
1.2.3.4 port 3002 -> relay 2

You could then point all of the hostnames to that IP but you must use the port numbers when connecting/listing them on-chain. Unlike with HTTP where multiple hostnames can run on a single IP/port (using the HOST header), that's not the case here.

Of course to do this, you'd need to be able to forward the ports from the device with that IP so this may depend on your exact setup (but a home router likely can do this with its port forwarding - I did exactly this with my first testnet pool, having two relays running at home).

Your relays/producer will still need some static internal IP address/hostname that they can connect to each other on (since they will need to be listed in each others topology files).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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