-
Notifications
You must be signed in to change notification settings - Fork 33
KES agent integration #1487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KES agent integration #1487
Conversation
ouroboros-consensus-cardano/src/shelley/Ouroboros/Consensus/Shelley/Node/TPraos.hs
Outdated
Show resolved
Hide resolved
...os-consensus-diffusion/src/ouroboros-consensus-diffusion/Ouroboros/Consensus/Node/Tracers.hs
Show resolved
Hide resolved
...-protocol/src/ouroboros-consensus-protocol/Ouroboros/Consensus/Protocol/Praos/AgentClient.hs
Outdated
Show resolved
Hide resolved
...ensus-protocol/src/ouroboros-consensus-protocol/Ouroboros/Consensus/Protocol/Praos/Common.hs
Outdated
Show resolved
Hide resolved
...consensus/src/ouroboros-consensus/Ouroboros/Consensus/MiniProtocol/ChainSync/Client/State.hs
Outdated
Show resolved
Hide resolved
a10939e to
1cf35e6
Compare
ouroboros-consensus-cardano/src/unstable-shelley-testlib/Test/Consensus/Shelley/MockCrypto.hs
Outdated
Show resolved
Hide resolved
ceb0550 to
4ca03a3
Compare
108bfcb to
833650d
Compare
833650d to
4828699
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changelog needs to be fixed, rest looks good.
| vrfKey <- genKeyVRF <$> genSeed (seedSizeVRF (Proxy @(VRF c))) | ||
| kesKey <- unsoundPureGenKeyKES <$> genSeed (seedSizeKES (Proxy @(KES c))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the extra spaces?
| specifies how to obtain the actual credentials (OpCert and KES SignKey). For | ||
| now, the only supported method is passing an OpCert and an | ||
| UnsoundPureSignKeyKES, presumably loaded from disk | ||
| (`PraosCredentialsUnsound`); future iterations will add support for | ||
| connecting to a KES agent. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| specifies how to obtain the actual credentials (OpCert and KES SignKey). For | |
| now, the only supported method is passing an OpCert and an | |
| UnsoundPureSignKeyKES, presumably loaded from disk | |
| (`PraosCredentialsUnsound`); future iterations will add support for | |
| connecting to a KES agent. | |
| specifies how to obtain the actual credentials (OpCert and KES SignKey). | |
| Two methods are supported: | |
| - Directly passing an OpCert and an UnsoundPureSignKeyKES, presumably loaded | |
| from disk (`PraosCredentialsUnsound`) | |
| - Passing a socket address to a KES Agent from which OpCerts and (sound) | |
| SignKeyKES can be obtained (`PraosCredentialsAgent`) |
ouroboros-consensus-cardano/src/shelley/Ouroboros/Consensus/Shelley/Node/TPraos.hs
Outdated
Show resolved
Hide resolved
4208ea1 to
3228821
Compare
6c5adc4 to
3228821
Compare
|
This PR has been superceded by #1620 |
This PR supercedes #1487 includes the following squashed commit messages: - Update to use newest cardano-crypto-class with unsound pure KES implementation - Use mlocked KES - Add KES agent connectivity - Rebase cleanup - Handle drop-key messages from KES Agent - Provide KESAgentClientTrace to BlockForging - Revert change to MockCrypto and require DSIGN only when running the KES agent - Bump kes-agent SRP to remove SerDoc dependency # Description Please include a meaningful description of the PR and link the relevant issues this PR might resolve. Also note that: - New code should be properly tested (even if it does not add new features). - The fix for a regression should include a test that reproduces said regression.
This changes Consensus such that mlocked KES keys are used internally.
This is important groundwork for supporting KES agents in the future. In this form, the code will still load KES keys from disk, which is unsound, but the internal machinery is ready to also accept KES keys from other sources, and once loaded, KES keys will be handled appropriately (kept in mlocked RAM at all times, securely erased when expired).
This also involves a restructuring of the
HotKeydata structure, which now manages not only a KES SignKey, but also the corresponding OpCert. This is necessary for two reasons:Supersedes #1284.
Issue #558.
This adds KES Agent connectivity to consensus.
To use a KES Agent to source KES SignKeys and OpCerts, the
praosCredentialsSourcein thePraosCanBeLeaderdata structure can now be pointed to a domain socket address where it will look for a KES Agent.Also covers #1077.