ChorusOne / eth-staking-smith

Ethereum 2.0 deposit CLI / library
Apache License 2.0
19 stars 6 forks source link

Refactor deposit: remove unnecessary decrypt #12

Closed mksh closed 1 year ago

mksh commented 2 years ago

Similar to keystore refactor, change deposit to not to do keystore decrypt but use pregenerated VotingKeyMaterial.

This brings generation time to 5s

 time ./target/debug/eth-staking-smith existing-mnemonic --chain mainnet --keystore_password test --mnemonic "entire habit bottom mention spoil clown finger wheat motion fox axis mechanic country make garment bar blind stadium sugar water scissors canyon often ketchup" --num_validators 1 --withdrawal_address "0100000000000000000000000000000000000000000000000000000000000001"
...
./target/debug/eth-staking-smith existing-mnemonic --chain mainnet  test    1  5,02s user 0,02s system 99% cpu 5,058 total
jenpaff commented 1 year ago

@mksh do you want me to rebase & merge this?

mksh commented 1 year ago

Rebased & Merged.

Added possibility to not export keystores (in case if keystore_password is not passed), which put generation time into LESS THAN TWO SECONDS :)