rooch-network / rooch

VApp Container with Move Language
https://rooch.network
Apache License 2.0
128 stars 54 forks source link

Error when serialize and deserialize FileBasedKeystore #184

Closed pause125 closed 7 months ago

pause125 commented 11 months ago

I was trying to write test for FileBasedKeystore's serialize and deserialize, but found the implementation just serialize and deserialize the FileBasedKeystore.path field with FileBasedKeystore.keys ignored.

Is this designed or just missing the implementation for FileBasedKeystore.keys?

jolestar commented 11 months ago

It could be for security and not auto-serialize the keys. @wow-sven

pause125 commented 11 months ago

It could be for security and not auto-serialize the keys. @wow-sven

If not serialize the keys and restructure them from the path when deserialize, the serialization and deserialization for FileBasedKeystore will be fallible as the path is variable.

We shoud make sure the serialization string should not be transfered to other environments as the path may not exist of with wrong value in other enviroments.

jolestar commented 11 months ago

I think we should not transfer the FileBasedKeystore

wow-sven commented 11 months ago

I think we should not transfer the FileBasedKeystore

yes,

wow-sven commented 11 months ago

It could be for security and not auto-serialize the keys. @wow-sven

If not serialize the keys and restructure them from the path when deserialize, the serialization and deserialization for FileBasedKeystore will be fallible as the path is variable.

We shoud make sure the serialization string should not be transfered to other environments as the path may not exist of with wrong value in other enviroments.

we only need to recover from the path, and the path can be modified by the user, but it is not currently exposed by the CLI.

wow-sven commented 11 months ago

It could be for security and not auto-serialize the keys. @wow-sven

yes

jolestar commented 10 months ago

Is this issue resolved?