hiero-ledger / hiero-ledger/hiero-consensus-node

Load private keys from disk using NodeIds instead of `AddressBook`.

Open
#16,402 0 comments 0 reactions 0 assignees View on GitHub
Platform
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.