Is there any way to make my node connect to a specific node I designate?

"Is there any way to make my node connect to a specific node I designate? As for the farm, is there a way to make the farm connect to a specific farm I designate?

Part of my nodes and farms have completed plotting, but a large part has not completed plotting and is constantly retrieving the lost block state. Is there a way to let my farm connect to the farm that has already completed plotting? Perhaps this could speed up the plotting speed of my unfinished farms?"

1 Like

“I have farms located in both Hong Kong and mainland China. The plotting speed in the Hong Kong region is faster, while the ones in the mainland are constantly in a state of retrieving the lost status. CTO said it might be due to bad luck of the farm, not being able to acquire anything. Is there a way to connect my mainland farm to my Hong Kong node?”

I’m not sure what you mean here, does it loose connectivity with the rest of the network? If you can provide some logs with that it might be helpful.

Also plotting speed should depend on the node (unless node goes offine/online, but you want to fix that anyway because your blocks will be late and farming will not earch as many coins as you expect), it depends on connectivity with Subspace networking (DSN) and if firewall doesn’t allow to connect to the rest of the network you will have a hard time participating.

Both Substrate and Subspace networking support reserved peers that can force connectivity between peers. Just don’t use --reserved-only or similar, allow it to connect to the rest of the network or else it’ll not retrieve data.

My farmer was consistently in this state for the past few days. However, today, after I made some drastic changes to the parameters, I found that this situation hardly occurred.

Before this, I was using the official default parameters without any modifications. After that, I changed the parameters as follows:

	./farm farm --reward-address stBCTNw9Rxin4YHz5q3VcnzhjYhSFjmcHDu8Ks5L3dXiNdxaa --listen-on /ip4/ --in-connections 3000 --out-connections 3000 --pending-in-connections 3000 --pending-out-connections 3000 --target-connections 3000 path=/mnt/f1/1,size=1.72TiB path=/mnt/f1/2,size=1.72TiB path=/mnt/f1/3,size=1.72TiB path=/mnt/f1/4,size=1.72TiB 

After I increased certain parameters, which I’m not even sure about their exact purposes, my connection count reached over 2000. However, my farm started plotting normally and didn’t exhibit the issue I saw in the first image.

So, I suspect the issue might be related to the number of connections between the farms? Perhaps the number of connections to my farm is too low, or the quality of the connected farms is not up to par. Therefore, I’m wondering if there’s a feature that allows me to customize and connect to specific farms that I designate?

At the same time, in the situation shown in the first image, not only was there no plotting, but the resource usage was extremely high. The CPU was almost at 100%, and so was the memory. However, when plotting began as seen in the second image, the resource consumption was surprisingly low.

You mentioned that plotting speed depends on the nodes? But my plotting only started after I adjusted the connection count of the farm. So, if I also adjust the connection count of the nodes to 3000, could that possibly enhance the plotting speed?

This will attempt to maintain 3000 active connections to other peers on the network. It is too excessive and should never be necessary. It will consume more RAM and bandwidth than otherwise.

Default number of connecions is sufficient for most purposes, making your farms connect to each other will not necessarily fix things.

As mentioned before you can always add farmers and/or nodes to reserved peers of each other to maintain connectivity.

It doesn’t generally, but if node is not synced, plotting will be paused until node is synced to not waste resources. I’m not sure if that was what you saw though.

It could, if connectivity to most nodes was way too slow, with larget number of them it is possible that there were more of those that have better connectivity with you, but still the number is too high. If it works for you - feel free to use it, though I’d recommend to try something much lower.

How should I manually control the connection?
For example, the IP of Farm 1 is
and the IP of Farm 2 is
How can I connect the farms to each other?

Use --reserved-peers on the farmer the same way you use similar options on the node. Farmer prints its identity and even public addresses right now to the terminal.

--dsn-reserved-peers /ip4/ \
--reserved-nodes /ip4/

I keep getting the following error after adding it using this method:

2023-09-29 05:30:07 [Consensus] Reserved peer 12D3KooWP5HFcZzLSc7cwC6kFVdAWrVg19CAiGuVRermjdFuzsYD disconnected    

You need to add both peers to reserved of each other. Otherwise one of them will periodically disconnect and reconnect again.

I did add it on both sides, but the error is still reported, and the versions are consistent.

Then maybe address is incorrect on one of the nodes, hard to tell.

--dsn-reserved-peers /ip4/ \
--reserved-nodes /ip4/
--dsn-reserved-peers /ip4/ \
--reserved-nodes /ip4/

The error will still be reported:

2023-09-29 06:13:08 [Consensus] Reserved peer 12D3KooWJt4jCX2oTyVBzbxQKHR3rkuwVFpPNKuMoSWGd4h5P3rY disconnected    
2023-09-29 06:12:52 [Consensus] Reserved peer 12D3KooWP5HFcZzLSc7cwC6kFVdAWrVg19CAiGuVRermjdFuzsYD disconnected