Skip to content
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

feat: presign for validator account #6747

Open
wants to merge 1 commit into
base: unstable
Choose a base branch
from

Conversation

hamdiallam
Copy link

@hamdiallam hamdiallam commented Dec 30, 2024

Issue Addressed

#6746

Proposed Changes

Add a --presign flag to emit the json output to stdout instead of publishing the exit

Additional Info

The validator-manager is also a surface area to support via the http client interface

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@chong-he chong-he added the ready-for-review The code is ready for review label Jan 13, 2025
@chong-he chong-he self-requested a review January 13, 2025 02:46
Copy link
Member

@chong-he chong-he left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR! I have tested it and the feature is working. I have left some comments.

The CI check on formatting failed, also it would be great if you can sign the CLA.

I think it will also be nice to have a note highlighting the feature in the documentation, maybe before this section: https://lighthouse-book.sigmaprime.io/voluntary-exit.html#initiating-a-voluntary-exit

Thanks!

eprintln!(
"Publishing a voluntary exit for validator: {} \n",
keypair.pk

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

let string_output = serde_json::to_string_pretty(&signed_voluntary_exit)
.map_err(|e| format!("Unable to convert to JSON: {}", e))?;

println!("{}", string_output);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While working on #6612 , initially I also printed out the signature. But then I realise it probably isn't much useful in practice - if users want to pre-sign an exit, they probably want the signature saved to a file. So I modified in this commit in that PR:
5a4f928

We can hear from others about this and edit accordingly.

@@ -74,6 +76,15 @@ pub fn cli_app() -> Command {
.action(ArgAction::SetTrue)
.help_heading(FLAG_HEADER)
)
.arg(
Arg::new(PRESIGN)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we want to standardise the flag name to be the same with #6612 , depends on which is preferred. I am happy to change the flag name in #6612 if presign is adopted.

Copy link
Member

@chong-he chong-he Jan 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have changed the flag name in #6612 to --presign as per the comment: #6612 (comment)

So please ignore the above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-review The code is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants