fix: make pub_port optional and cmd_port required