Open akorchyn opened 5 months ago
@olenaboosty please review and add some labels
eth-light also trying to process empty file and should trow error instead. We need more logs around key processing on startup, as such as permissions check log, detailed report on why key can't be processed and Alice used instead ( invalid format - reason, empty file, invalid permissions, can't access, filder path doesn't exist ), if path found in config and if path is not accessable.
Way to reproduce the issue:
Create eth-relay.key
Add passphrase
Add empty line or empty space in the end
Run binary
How to fix:
awk '{ printf "%s", $0 }' eth-relay.key > eth-relay.tmp && mv eth-relay.tmp eth-relay.key
chmod 0600 eth-relay.key
@Liquid369 do you have a PR for that? I think we have discussion about this?
Correct, I have a fork setup and just trying to make sure it integrated well into the ggxnode repo. Currently we have a function to meet all SURI formatting, so that it would not process the endlines, excessive spaces, and will not take empty keys. We have invalid formatting logs added, ones to let user know the key used for funding. Will add for path not existing and permissions missed those.
Apologies for the delay pull request is opened https://github.com/ggxchain/pallet-eth2-light-client/pull/15
Description
Eth light client (webb) should correctly parse seed phrase. Currently, it doesn't accept endlines and accepts empty file.
Alternatively, it might be a good decision to get the key from the keychain directly to avoid extra layer of security management.