hiero-ledger / hiero-ledger/hiero-consensus-node
Load private keys from disk using NodeIds instead of `AddressBook`.
- Dominant language
- Java
- Stars
- 406
- Forks
- 226
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 210
Description
**Background**
`CryptoStatic.java` and `EnhancesKeystoreLoader.java` both use the platform `AddressBook` data structure to load the private and public keys from disk. The platform `AddressBook` is being removed. Before we can remove the `AddressBook` we need to disentangle loading the private keys from disk from the Address Book.
Loading of private keys from disk only requires the set of ids.
While we need to support loading public keys into the `AddressBook`, it should be a separate method whose only purpose is to load the public keys into the `AddressBook`.
It may be appropriate to replace both classes with a condensed and simplified utility for loading the private keys from disk.
**Acceptance Criteria**
* There are two distinct methods for loading keys.
* One to load private keys for a given set of node ids.
* One to load public keys into a given AddressBook.
**Dependencies**
Dependent on #12112 which provides the set of node ids to the node.
* This dependency is now satisfied.
Contributor guide
Research direction
Start by reading CryptoStatic.java and EnhancesKeystoreLoader.java, then inspect their callers and the now-satisfied node-id dependency from #12112. Separate the private-key loading path, which accepts node IDs, from the public-key loading path, which accepts an AddressBook. Done means both methods exist with those distinct responsibilities and the affected callers still load the required keys.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- security
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 43/100