diff --git a/ouroboros-consensus-protocol/changelog.d/20251202_104021_georgy.lukyanov_enable_kes_agent.md b/ouroboros-consensus-protocol/changelog.d/20251202_104021_georgy.lukyanov_enable_kes_agent.md new file mode 100644 index 0000000000..5128e3ba2b --- /dev/null +++ b/ouroboros-consensus-protocol/changelog.d/20251202_104021_georgy.lukyanov_enable_kes_agent.md @@ -0,0 +1,23 @@ + + + + + +### Breaking + +- Allow `cardano-node` to integrate `kes-agent`: make the `PraosCredentialsAgent` constructor of `PraosCredentialsSource` usable by removing `Void`. diff --git a/ouroboros-consensus-protocol/src/ouroboros-consensus-protocol/Ouroboros/Consensus/Protocol/Praos/Common.hs b/ouroboros-consensus-protocol/src/ouroboros-consensus-protocol/Ouroboros/Consensus/Protocol/Praos/Common.hs index 2c255a6089..eb272cd8a7 100644 --- a/ouroboros-consensus-protocol/src/ouroboros-consensus-protocol/Ouroboros/Consensus/Protocol/Praos/Common.hs +++ b/ouroboros-consensus-protocol/src/ouroboros-consensus-protocol/Ouroboros/Consensus/Protocol/Praos/Common.hs @@ -42,7 +42,6 @@ import qualified Control.Tracer as Tracer import Data.Function (on) import Data.Map.Strict (Map) import Data.Ord (Down (Down)) -import Data.Void import Data.Word (Word64) import GHC.Generics (Generic) import NoThunks.Class @@ -278,7 +277,7 @@ data PraosCredentialsSource c where OCert.OCert c -> KES.UnsoundPureSignKeyKES (KES c) -> PraosCredentialsSource c -- | Connect to a KES agent listening on a service socket at the given path. PraosCredentialsAgent :: - Agent.DSIGN (ACrypto c) ~ DSIGN => Void -> FilePath -> PraosCredentialsSource c + Agent.DSIGN (ACrypto c) ~ DSIGN => FilePath -> PraosCredentialsSource c instance (NoThunks (KES.UnsoundPureSignKeyKES (KES c)), Crypto c) => NoThunks (PraosCredentialsSource c) where wNoThunks ctxt = \case @@ -287,7 +286,7 @@ instance (NoThunks (KES.UnsoundPureSignKeyKES (KES c)), Crypto c) => NoThunks (P [ noThunks ctxt oca , noThunks ctxt k ] - PraosCredentialsAgent _ fp -> noThunks ctxt fp + PraosCredentialsAgent fp -> noThunks ctxt fp showTypeOf _ = "PraosCredentialsSource" @@ -308,7 +307,7 @@ instantiatePraosCredentials maxKESEvolutions _ (PraosCredentialsUnsound ocert sk sk startPeriod maxKESEvolutions -instantiatePraosCredentials maxKESEvolutions tr (PraosCredentialsAgent _ path) = do +instantiatePraosCredentials maxKESEvolutions tr (PraosCredentialsAgent path) = do HotKey.mkDynamicHotKey maxKESEvolutions (Just $ runKESAgentClient tr path)