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

Add voluntary exit via validator manager #6612

Open
wants to merge 62 commits into
base: unstable
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
537c9c8
Exit validator
chong-he Nov 26, 2024
f6d6663
minor fix
chong-he Nov 28, 2024
30c9c8e
Revert "minor fix"
chong-he Nov 28, 2024
36a85e0
Test
chong-he Nov 29, 2024
3c7548c
Spec for vc
chong-he Nov 29, 2024
b40b1b1
Ensure time and genesis validators root match
michaelsproul Dec 3, 2024
036473f
Merge branch 'unstable' into vm-voluntary-exit
chong-he Dec 10, 2024
6f11781
Remove types
chong-he Dec 11, 2024
585498d
make cli
chong-he Dec 11, 2024
4f6426f
Cargo.lock
chong-he Dec 11, 2024
d4bc9f6
Merge branch 'vm-voluntary-exit' of https://github.com/chong-he/light…
chong-he Dec 11, 2024
d9c423d
Add exit multiple validators
chong-he Dec 11, 2024
0301d55
Add "all" to exit all validators
chong-he Dec 12, 2024
63b9a08
check if beacon node is syncing
chong-he Dec 13, 2024
b2b6442
Add validator status after exit
chong-he Dec 16, 2024
28fec0a
For testing
chong-he Dec 16, 2024
04f85e2
Display signature only when the flag is used
chong-he Dec 16, 2024
0f268d7
Merge branch 'vm-voluntary-exit' of https://github.com/chong-he/light…
chong-he Dec 16, 2024
e5d16ec
Fix signature flag
chong-he Dec 16, 2024
93e47b2
Fix signature flag
chong-he Dec 16, 2024
375f8a2
signature flag
chong-he Dec 17, 2024
d7421b0
Add test to lighthouse/tests
chong-he Dec 17, 2024
19f9fe0
Merge branch 'unstable' into vm-voluntary-exit
chong-he Dec 17, 2024
6bf8d58
Update test to compile
chong-he Dec 17, 2024
e4a99d8
simplify
chong-he Dec 17, 2024
48d1a02
Add exit multiple validators
chong-he Dec 17, 2024
8556f85
reduce diff
chong-he Dec 17, 2024
ba45cc5
Add delete all validators
chong-he Dec 17, 2024
97bddf8
update validator data
chong-he Dec 17, 2024
84a70a9
Improve UX
chong-he Dec 17, 2024
2789436
Merge branch 'unstable' into vm-voluntary-exit
chong-he Dec 17, 2024
b417e92
Improve UX sleep only once
chong-he Dec 18, 2024
45932ed
cli
chong-he Dec 18, 2024
f00a347
make cli
chong-he Dec 18, 2024
8d4b6a4
update validator data
chong-he Dec 18, 2024
871692a
remove loop
chong-he Dec 18, 2024
872daed
Add exit status
chong-he Dec 18, 2024
a5f4d2d
Minor fix
chong-he Dec 18, 2024
f8f94b9
Add doc
chong-he Dec 18, 2024
f935b9f
mdlint
chong-he Dec 18, 2024
d1d6442
Update lighthouse/tests
chong-he Dec 18, 2024
02f09d5
Simplify by remove print in test
chong-he Dec 18, 2024
2ee5498
remove debug
chong-he Dec 18, 2024
584c682
Merge branch 'unstable' into vm-voluntary-exit
chong-he Dec 19, 2024
47419b3
Add dependency
chong-he Dec 19, 2024
5a4f928
save exit message to a file
chong-he Dec 19, 2024
6cdc908
Add merge messages to one file
chong-he Dec 20, 2024
2b0163f
fmt
chong-he Dec 20, 2024
6a70f4e
Update doc
chong-he Dec 20, 2024
d327c59
Add more assert in test
chong-he Jan 6, 2025
6fb971e
Merge branch 'unstable' into vm-voluntary-exit
chong-he Jan 6, 2025
2f6ebe1
Merge branch 'unstable' into vm-voluntary-exit
chong-he Jan 22, 2025
419eda7
Remove --merge flag
chong-he Jan 22, 2025
b579d40
revise
chong-he Jan 22, 2025
2407965
Move check status to list_validator
chong-he Jan 23, 2025
6f41a19
Fix test
chong-he Jan 23, 2025
2c96cad
Update doc
chong-he Jan 23, 2025
4fb9f53
mdlint
chong-he Jan 23, 2025
683259d
udpate doc and flags
chong-he Jan 24, 2025
681feeb
Add presign in wordlist.txt
chong-he Jan 24, 2025
929335a
Add cli test
chong-he Jan 25, 2025
49e30fd
rename a bit
chong-he Jan 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update validator data
  • Loading branch information
chong-he committed Dec 18, 2024
commit 8d4b6a4bc18f65cbd6a5a23a4171822ff48d4fbc
32 changes: 16 additions & 16 deletions validator_manager/src/exit_validators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,28 +255,28 @@ async fn run<E: EthSpec>(config: ExitConfig) -> Result<(), String> {
);
}

// Check validator status after publishing voluntary exit
let updated_validator_data = beacon_node
.get_beacon_states_validator_id(
StateId::Head,
&ValidatorId::PublicKey(validator_to_exit),
)
.await
.map_err(|e| format!("Failed to get updated validator details: {:?}", e))?
.ok_or_else(|| {
format!(
"Validator {} is not present in the beacon state",
validator_to_exit
)
})?
.data;

if first_sleep {
sleep(Duration::from_secs(spec.seconds_per_slot)).await;
first_sleep = false;
}

loop {
// Check validator status after publishing voluntary exit
let updated_validator_data = beacon_node
.get_beacon_states_validator_id(
StateId::Head,
&ValidatorId::PublicKey(validator_to_exit),
)
.await
.map_err(|e| format!("Failed to get updated validator details: {:?}", e))?
.ok_or_else(|| {
format!(
"Validator {} is not present in the beacon state",
validator_to_exit
)
})?
.data;

if validator_data.status == ValidatorStatus::ActiveOngoing
&& updated_validator_data.status == ValidatorStatus::ActiveOngoing
// The case where the beacon node has not yet published the voluntary exit
Expand Down
Loading