-
Notifications
You must be signed in to change notification settings - Fork 97
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
Issue Description
In case of a configuration such as this one:
[[parachains.collators]]
name = "collator1"
command = "./some-collator"
rpc_port = 6969
The RPC port value will be ignored, and instead a random one will be used.
I assume it's due to this code:
if (nodeSetup.substrateCliArgsVersion === SubstrateCliArgsVersion.V0) {
portFlags["--rpc-port"] = (nodeSetup.rpcPort || RPC_HTTP_PORT).toString();
portFlags["--ws-port"] = (nodeSetup.wsPort || RPC_WS_PORT).toString();
} else {
// use ws port as default
const portToUse = nodeSetup.wsPort
? nodeSetup.wsPort
: nodeSetup.rpcPort || RPC_HTTP_PORT;
portFlags["--rpc-port"] = portToUse.toString();
}
wsPort will always be defined, since in case it's omitted, a random one will be generated at that point.
It's also a bit confusing to specify ws_port in the config file - both WS & HTTP are RPC ports.
Maybe it would be better to use rpc_port and stop using the ws_port?
Steps to reproduce the issue
Just specify rpc_port in the config file, as explained in the issue description.
Describe the results you received
Random RPC port was used.
Describe the results you expected
The one I specified to be used.
Zombienet version
1.3.63
Provider
Native
Provider version
## For binaries
polkadot 0.9.43-a2b62fb872bUpstream Latest Release
Yes
Additional environment details
None
Additional information
No response
Screenshots
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers