Skip to content

Conversation

@matthias-wright
Copy link
Collaborator

This makes sure that a validator shuts down after being removed from the committee. This also adds a binary that does a e2e test to verify correct behavior.

Changes:

  • Adds withdrawal credential for the genesis nodes
  • If a validator is removed from the committee (voluntarily or involuntarily), the finalizer will detect it and trigger a coordinated shutdown
  • Added a CancellationToken to the application, finalizer, and syncer workers. The workers will await the token in the tokio select loops, and they will also trigger the a cancellation if their Drop implementation.
  • Adds a binary for testing the withdrawal and exit flow
    • The binary creates a network of 4 nodes (with reth instances).
    • It will send a withdrawal transaction on behalf of the 4th node that will withdraw the entire stake
    • It will check the balance on reth for the withdrawal credentials (eth address) of node 4 before and after submitting the withdrawal request
    • It will make sure that node 4 was removed from the consensus state

The binary can be executed as follows:

cargo run --release --features prom,e2e --bin withdraw-and-exit -- --log-dir /tmp/rethlogs

@matthias-wright matthias-wright merged commit c3102c5 into main Nov 18, 2025
4 checks passed
@matthias-wright matthias-wright deleted the m/withdrawal-and-offboard branch November 18, 2025 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants