ggxchain / ggxnode

Apache License 2.0
6 stars 5 forks source link

Eth-light client secret file #250

Open akorchyn opened 5 months ago

akorchyn commented 5 months ago

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.

akorchyn commented 5 months ago

@olenaboosty please review and add some labels

matsuro-hadouken commented 5 months ago

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:

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
olenaboosty commented 5 months ago

@Liquid369 do you have a PR for that? I think we have discussion about this?

Liquid369 commented 5 months ago

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.

Liquid369 commented 4 months ago

Apologies for the delay pull request is opened https://github.com/ggxchain/pallet-eth2-light-client/pull/15