Stake Pool on Preview using Oracle Cloud

I have setup a stake pool on Oracle cloud using cntools, with this guide

Setup a Stake Pool on Pre-Production or Preview testnets with CNTOOLS - Staking & Delegation / Setup a Stake Pool - Cardano Forum

I have two questions.

One, do I need to update the topology files on the BP and Relay? The files are formatted differently than what I am used to. I did not see any instructions in the document to do so.

Secondly, Oracle Cloud using a private Ip subnet. I can only allow communication on the firewall at the private IP level or so it seems. I have allowed communication between the Relay and BP, but the 6000 port still shows closed when I use a port scanner, scanning the public IP. Do I need to port forward somehow?

I see outgoing connections on both the BP and Relay, but 0 incoming.

1 Like

Hi,

BP and relay should be able to communicate via private IPs;

  • on BP add the Relay private IP
  • on Relay u will need to ise topology updater and to add BP private IP (inside topology updater script) to custom peers

U can check if the port is open with

From BP type telnet Relay_IP 6000
From Relay type telnet BP_IP 6000

U should see connected, in case not then check the firewall settings (on BP allow on port 6000 only the Relay IP and on Relay open port 6000 for any)

For relay u will need a PF like, all traffic from extern with destination Relay IP on port 6000 to be redirected to Relay private IP on port 6000

An example of topology file

{
  "Producers": [
    {
      "addr": "192.168.1.1",
      "port": 6000,
      "valency": 1
    }
  ]
} 

Cheers,

This is what the topology file looks like now. Are you saying to make like your example? That’s what I’m used to, it’s just this one looks a lot different.

image

I have the pf setup, I can connect to port 6000 now, thanks.

1 Like

Hi,

Your topology files are incorrect, checkout here my example for relay in case of p2p is used(what should be a case for preview):

{
	"LocalRoots": {
		"groups": [
			{
				"localRoots": {
					"accessPoints": [
						{
							"address": "bp-host-name/ip",
							"port": 6000
						}
					],
					"advertise": false
				},
				"valency": 1
			}
		]
	},
	"PublicRoots": [
		{
			"publicRoots": {
				"accessPoints": [
					{
						"address": "preview-node.world.dev.cardano.org",
						"port": 30002
					}
				],
				"advertise": false
			}
		}
	],
	"useLedgerAfterSlot": 322000
}

Valency is amount of open connections your relay should have in our case it is 1, because our relay should open just 1 connection toward BP. If you will have more relays, then you will need to add them under accessPoints and increase valency accordingly.

For BP with disabled p2p it should be something like that:

{
    "Producers": [
      {
        "addr": "relay-host-name/ip",
        "port": 6000,
        "valency": 1
      }
    ]
}

What is your ticker or poolID on preview?

1 Like

Thank You! Ticker is BREW

1 Like

Can I ask why you set this? Is there anything specific about not wanting public roots from the ledger before this slot number?

That is mostly was used because it is in default config:

https://book.world.dev.cardano.org/environments/preview/topology.json

2 Likes

It must have something to do with when preview started. Maybe any pool registrations prior to this slot are not valid???

1 Like

I think generally it is not good idea to use too old data from blockchain + as far as preview was re-spun some time ago, maybe we don’t want to have relays before re-spun?

1 Like

That sounds plausible. It would be nice if there was a bit more documentation on P2P configuration.

2 Likes