-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Overview
We should allow for a file containing the signer's private key to be specified via the CLI. If the sequencer is enabled and a file path for the signers key is not specified, then the CLI should error. I believe clap supports conditionally required arguments but please review docs to confirm.
We should introduce SignerArgs struct to capture the file path in this module and implement the mentioned dependency relationship. We can then use the file path to read bytes from the file and subsequently instantiate the signer using PrivateKeySigner::from_slice when instantiating the rollup node manager:
rollup-node/crates/node/src/add_ons/rollup.rs
Lines 214 to 215 in 9b86669
| // Instantiate the signer | |
| let signer = self.config.test.then_some(Signer::spawn(PrivateKeySigner::random())); |
We should still retain support for test mode but we should remove the use of and_then because statements are eagerly evaluated means the Signer will be automatically created and then immediately dropped in some cases. Instead we should use a match or if else block.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status