hiero-ledger / hiero-ledger/hiero-consensus-node
Refactor CryptoStatic.initNodeSecurity
- Dominant language
- Java
- Stars
- 406
- Forks
- 226
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 210
Description
There's a `EventRecoveryWorkflow` in the hedera-services code that calls the `CryptoStatic.initNodeSecurity` method, and it does so mainly to load the private keys for the node. However, the `initNodeSecurity` performs a lot of other actions that are not strictly required by the recovery workflow.
Per @lpetrovic05 :
> `initNodeSecurity` should be split into multiple methods:
> * load the private key used for signing
> * load the public keys
> * copy the public keys into the AB
>
> `initNodeSecurity` can remain as is, and call into these 3 methods. Then recovery would not call `initNodeSecurity` , but only the first method
Contributor guide
Research direction
Start by reading CryptoStatic.initNodeSecurity and its call from EventRecoveryWorkflow. Separate the private-key loading, public-key loading, and AB public-key copying responsibilities, keep initNodeSecurity composing them, and update recovery to use only the private-key loading method.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, security
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100