IntersectMBO / ouroboros-network

Specifications of network protocols and implementations of components running these protocols which support a family of Ouroboros Consesus protocols; the diffusion layer of the Cardano Node.
https://ouroboros-network.cardano.intersectmbo.org
Apache License 2.0
275 stars 87 forks source link

Reduce the requirements for connecting to a local node socket #3983

Open erikd opened 2 years ago

erikd commented 2 years ago

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.

coot commented 2 years ago

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