ouroboros-network icon indicating copy to clipboard operation
ouroboros-network copied to clipboard

Reduce the requirements for connecting to a local node socket

Open erikd opened this issue 3 years ago • 1 comments

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.

erikd avatar Aug 30 '22 23:08 erikd

Let's discuss this in input-output-hk/cardano-node#4402.

coot avatar Aug 31 '22 06:08 coot