ouroboros-network
ouroboros-network copied to clipboard
Reduce the requirements for connecting to a local node socket
Related to https://github.com/input-output-hk/cardano-node/issues/4402
In order for a cardano-api user to connect to a local node socket, the user currently has to fill this struct (defined in the API):
data LocalNodeConnectInfo mode =
LocalNodeConnectInfo {
localConsensusModeParams :: ConsensusModeParams mode,
localNodeNetworkId :: NetworkId,
localNodeSocketPath :: FilePath
}
However, once a user has defined the node socket path, the other two seem totally redundant, because the node we are connecting to already knows these values and the client can't make the node change them.
The proposed solution is that the client should only need to specify the node socket path, connect to it, and then be able to query the node for anything else it needs.
Let's discuss this in input-output-hk/cardano-node#4402.