Add --jwt-secret-path to lcli mock-el#8864
Merged
mergify[bot] merged 5 commits intosigp:unstablefrom Feb 20, 2026
Merged
Conversation
macladson
approved these changes
Feb 19, 2026
Member
macladson
left a comment
There was a problem hiding this comment.
LGTM!
Just wondering if jwt-secret-path and jwt-output-path should be mutually exclusive? Seems strange to write a output file when you are already providing an input file. Might be slightly tidier UX?
Member
|
Agree with Mac. I think the 2 flags should conflict. I don't see why we would want to read from a file and write to a different file either. |
dapplion
reviewed
Feb 20, 2026
lcli/src/mock_el.rs
Outdated
| .map_err(|e| format!("Invalid hex in JWT secret file: {}", e))?; | ||
| JwtKey::from_slice(&secret_bytes) | ||
| .map_err(|e| format!("Invalid JWT secret length (expected 32 bytes): {}", e))? | ||
| } else { |
Collaborator
There was a problem hiding this comment.
Is it more clear to do here else if let Some(jwt_path) = jwt_output_path {
and then error in the final else?
Merge Queue StatusRule:
This pull request spent 32 minutes 31 seconds in the queue, including 30 minutes 22 seconds running CI. Required conditions to merge
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Allow
lcli mock-elto read a pre-shared JWT secret from a file via--jwt-secret-path, instead of always using the hardcodedDEFAULT_JWT_SECRET. This enables external tools (e.g. kurtosis ethereum-package) to provide their own JWT secret.The two flags are mutually exclusive:
--jwt-output-path--jwt-secret-pathThe new flag accepts a hex-encoded secret file (with or without
0xprefix).Additional Info
No breaking changes — existing usage with only
--jwt-output-pathis unchanged.