-
Notifications
You must be signed in to change notification settings - Fork 319
fdctl: add get-identity command to retrieve runtime validator identity #5747
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
fdctl: add get-identity command to retrieve runtime validator identity #5747
Conversation
437c8f8
to
e82cb5a
Compare
Wow nice, thanks for the contribution! Very helpful |
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.
Thank you for the contribution!
e82cb5a
to
d291afd
Compare
d291afd
to
a8bedee
Compare
Thanks for the quick review! |
a8bedee
to
ad594b7
Compare
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.
The corrupt read edge case should be prevented
114be1c
to
a87464c
Compare
5ac1257
to
5429b27
Compare
.perm = NULL, /* TODO: This command may require RLIMIT_MLOCK permissions | ||
to mlock(2) the workspace in memory. This should be | ||
addressed in future updates. */ |
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.
Going to test locally what happens if the prlimit for memlock is zero 🤔
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.
$ sudo prlimit --pid=$$ --memlock=0
$ build/native/gcc/bin/fdctl get-identity --config src/app/fdctl/config/default.toml
ERR 07-21 13:32:15.567030 278153 f0 0 src/app/shared/boot/fd_boot.c(45): mlock(0x7ffff7fc0000,4096) (1-EPERM-operation not permitted); unable to lock log file shared lock in memory
Sure enough, it's bad ... I'll fix it in a subsequent PR
5429b27
to
f7dee4c
Compare
Add new fdctl command to query the current runtime identity of a running validator. This command reads the identity from the shred tile's shared memory, which reflects any changes made by set-identity. The implementation uses keyswitch state checking to prevent torn reads during identity updates, ensuring we always get a consistent identity key. Usage: fdctl get-identity Returns the validator's current identity public key in base58 format.
f7dee4c
to
703b6b2
Compare
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.
Looks great, thanks
@mmcgee-jump I’ve updated this as suggested, mind to take another look if it looks good now? 🙏 |
Add
fdctl get-identity
commandProblem
fdctl set-identity
can dynamically change validator identity at runtimesolana catchup
to infer the active identity, which is indirect, slow and unreliable.Solution
Add
fdctl get-identity
to retrieve the current runtime identity from the shredtile.
Usage
Use Cases
Demonstration: