-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: exclude starknet signing key from relayer config file #334
Conversation
#[derive(Debug, Clone, Serialize, Deserialize)] | ||
pub struct StarknetWallet { | ||
pub account_address: StarknetAddress, | ||
pub signing_key: Felt, | ||
pub signing_key: SigningKey, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the signing key here should always be Felt
. We should update the config to load the key from a path, and load the key before initializing the chain or wallet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
fn try_from(value: SigningKey) -> Result<Self, Self::Error> { | ||
match value { | ||
SigningKey::File { file } => Ok(std::fs::read_to_string(file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an unexpected side effect, some more with blocking I/O, which would happen every time the field is used, which is not good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I have to do the same way you do it for CosmosChainConfig
Can you please take over this PR since I am off sick?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem, get some rest. I think this is lower priority for now.
@rnbguy I have pushed a commit to properly save and load the wallet files using async I/O. Please test it and see if it works. |
thanks @soareschen ! the changes work on testnet 🙏🏼 we can merge. |
closes #318
included an example relayer config file. after filling out the empty fields, we can relay packets via