Skip to content

Commit 2a42438

Browse files
authored
kes-agent: allow using the PraosCredentialsAgent constructor (#1791)
This enables `cardano-node` to use `kes-agent`.
2 parents 69ce27b + 481ee7f commit 2a42438

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!--
2+
A new scriv changelog fragment.
3+
4+
Uncomment the section that is right (remove the HTML comment wrapper).
5+
For top level release notes, leave all the headers commented out.
6+
-->
7+
8+
<!--
9+
### Patch
10+
11+
- A bullet item for the Patch category.
12+
13+
-->
14+
<!--
15+
### Non-Breaking
16+
17+
- A bullet item for the Non-Breaking category.
18+
19+
-->
20+
21+
### Breaking
22+
23+
- Allow `cardano-node` to integrate `kes-agent`: make the `PraosCredentialsAgent` constructor of `PraosCredentialsSource` usable by removing `Void`.

ouroboros-consensus-protocol/src/ouroboros-consensus-protocol/Ouroboros/Consensus/Protocol/Praos/Common.hs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ import qualified Control.Tracer as Tracer
4242
import Data.Function (on)
4343
import Data.Map.Strict (Map)
4444
import Data.Ord (Down (Down))
45-
import Data.Void
4645
import Data.Word (Word64)
4746
import GHC.Generics (Generic)
4847
import NoThunks.Class
@@ -278,7 +277,7 @@ data PraosCredentialsSource c where
278277
OCert.OCert c -> KES.UnsoundPureSignKeyKES (KES c) -> PraosCredentialsSource c
279278
-- | Connect to a KES agent listening on a service socket at the given path.
280279
PraosCredentialsAgent ::
281-
Agent.DSIGN (ACrypto c) ~ DSIGN => Void -> FilePath -> PraosCredentialsSource c
280+
Agent.DSIGN (ACrypto c) ~ DSIGN => FilePath -> PraosCredentialsSource c
282281

283282
instance (NoThunks (KES.UnsoundPureSignKeyKES (KES c)), Crypto c) => NoThunks (PraosCredentialsSource c) where
284283
wNoThunks ctxt = \case
@@ -287,7 +286,7 @@ instance (NoThunks (KES.UnsoundPureSignKeyKES (KES c)), Crypto c) => NoThunks (P
287286
[ noThunks ctxt oca
288287
, noThunks ctxt k
289288
]
290-
PraosCredentialsAgent _ fp -> noThunks ctxt fp
289+
PraosCredentialsAgent fp -> noThunks ctxt fp
291290

292291
showTypeOf _ = "PraosCredentialsSource"
293292

@@ -308,7 +307,7 @@ instantiatePraosCredentials maxKESEvolutions _ (PraosCredentialsUnsound ocert sk
308307
sk
309308
startPeriod
310309
maxKESEvolutions
311-
instantiatePraosCredentials maxKESEvolutions tr (PraosCredentialsAgent _ path) = do
310+
instantiatePraosCredentials maxKESEvolutions tr (PraosCredentialsAgent path) = do
312311
HotKey.mkDynamicHotKey
313312
maxKESEvolutions
314313
(Just $ runKESAgentClient tr path)

0 commit comments

Comments
 (0)