Skip to content

[Signer] Signing keys configuration #146

@frisitano

Description

@frisitano

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:

// 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

No labels
No labels

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions