-
Notifications
You must be signed in to change notification settings - Fork 25
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
Adapt KES usage to new, non-pure, interface #558
Comments
I'll discuss with Vitor first to assess priority. We should have someone assess the scope of work for this. Nick or Duncan likely needed but with other team member perhaps leading this as much as possible. |
The use of KES keys is isolated within the block forging logic, which is relatively small and self-contained---much more so than UTxO HD. Moreover, that code is already (entirely?) monadified. Upon inspecting the My due diligence notes: The Consensus Layer receives a
Each
The KES keys are maintain by those methods; the key is part of the functions' closures. The functions in this interface are all already in Though the node passes the
The code uses the name
Ultimately, the hotkey is created from a "initial signing key", which the node supplies when it calls these helper functions we provide. (EG look for The only KES function I see being used in a pure context is |
Based on the above, I think "a few days" is at least a possibility. I'd be able to establish a lot more certainty if there's simply a There could be plenty I'm underestimating. EG I see new crypto types in the upstream PRs. I think those are ultimately backwards compatible with the crypto used through the implementation now, right? So I'm currently estimating that's not going to require much integration work (just changing a name, really). (IE we can use this new crypto type constructor for all the old eras?) |
Great, thanks a lot for the estimates @nfrisby . After a discussion with @lehins, we've come to the conclusion of slightly changing the memory allocator, which may slightly affect the interface of KES. The non-pure interface will remain there, but we might need to pass around a context. @tdammers and @lehins will be working on it IntersectMBO/cardano-base#336. Once we have that ready, we can provide with a branch in cardano-base. |
Little update from my end: I have now integrated @lehins' pooled allocator, and I chose to do it in such a way that the KES API does not require any further changes. |
We are changing the way the KES keys are handled, to increase the guarantees that the key is not copied to disk and safely deleted by mlocking the secret data. These changes have modified the KES interface, which use to expose pure functions, to a non-pure interface.
The changes are being performed in IntersectMBO/cardano-base#255 and IntersectMBO/cardano-base#317.
To be able to work on this, the PRs mentioned above need to be merged.
The text was updated successfully, but these errors were encountered: