Skip to content

Implement Keystore spec for BLS12-381 secret keys#596

Closed
pawanjay176 wants to merge 220 commits intosigp:masterfrom
pawanjay176:deposit-params
Closed

Implement Keystore spec for BLS12-381 secret keys#596
pawanjay176 wants to merge 220 commits intosigp:masterfrom
pawanjay176:deposit-params

Conversation

@pawanjay176
Copy link
Copy Markdown
Member

@pawanjay176 pawanjay176 commented Nov 6, 2019

Proposed Changes

Implement the Keystore standard eip-2335 for BLS12-381 secret keys.

Account paths eip-2334 is not implemented as we don't have/need key-trees currently. Can add it in a future PR.

Todo

  • Decide on folder structure for storing keys.

…ixes

* Fix update_cache function
* Move fetch_eth1_data to impl block
* Fix deposit tests
* Add `run` function for running update_cache and subscribe_deposit_logs tasks
* Add logging
@pawanjay176 pawanjay176 added the ready-for-review The code is ready for review label Nov 8, 2019
@pawanjay176
Copy link
Copy Markdown
Member Author

pawanjay176 commented Nov 8, 2019

Folder structure used currently:

.lighthouse/
  - validators/
    - <uuid>/
      - "voting"-<UTC creation time>-<uuid>
      - "withdrawal"-<UTC creation time>-<uuid>
      - validator-history-<uuid>.sqlite
      - lockfile

Note: Voting and withdrawal keystores have the same uuid to ensure correspondence for later withdrawals.

@pawanjay176 pawanjay176 changed the title [WIP] Implement Keystore spec for BLS12-381 secret keys Implement Keystore spec for BLS12-381 secret keys Nov 19, 2019
@pawanjay176 pawanjay176 changed the base branch from eth1 to master November 23, 2019 13:32
@paulhauner paulhauner added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Nov 25, 2019
@paulhauner
Copy link
Copy Markdown
Member

Could you please merge in master when you get a chance? :)

@pawanjay176
Copy link
Copy Markdown
Member Author

@paulhauner Merged master.

I'm not sure yet how to handle the Keystore in ValidatorDirectory.
One option is to add voting_keystore and withdrawal_keystore in the ValidatorDirectory struct as Option<Keystore> and convert the Keystore to a Keypair when required.

@paulhauner paulhauner added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Nov 29, 2019
@paulhauner paulhauner self-assigned this Nov 29, 2019
@paulhauner paulhauner added this to the v0.2.0 milestone Dec 15, 2019
@AgeManning
Copy link
Copy Markdown
Member

I'm working towards v0.2.0. I can take this over. Are we still blocked on deciding folder structure?
@paulhauner @pawanjay176

@pawanjay176
Copy link
Copy Markdown
Member Author

Folder structure we have in the PR now is:

.lighthouse/
 - validators/
   - <uuid>/
     - "voting"-<UTC creation time>-<uuid>
     - "withdrawal"-<UTC creation time>-<uuid>
     - ...

The only difference in the folder structure compared to the testnet would be having the uuid as the folder name instead of the public key.

@pawanjay176
Copy link
Copy Markdown
Member Author

pawanjay176 commented Jan 7, 2020

@AgeManning created a new PR to maintain a clean commit history. This one got messed up with my old eth1 branch.

@paulhauner paulhauner mentioned this pull request Apr 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review The code is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants