-
-
Notifications
You must be signed in to change notification settings - Fork 266
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 to lodestar-cli #1986
Conversation
Code Climate has analyzed commit 265930d and detected 2 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
…into P0/volexit-cli
was able to successfully perform a voluntary exit for this validator (https://pyrmont.beaconcha.in/validator/b6e9b6ba69fbd330993b8167c2e1daf4dd04eaa6670a21e776ddc4dec3cc2cedd50bd5c3d7a134d91447ad905f1c1cce#attestations) so this PR is ready for review |
packages/lodestar-cli/src/cmds/account/cmds/validator/voluntaryExit.ts
Outdated
Show resolved
Hide resolved
}; | ||
|
||
const state: BeaconState = this.config.types.BeaconState.tree.defaultValue(); | ||
state.fork = (await this.apiClient.beacon.state.getFork("head")) || state.fork; |
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.
you should fetch https://ethereum.github.io/eth2.0-APIs/#/Config/getForkSchedule and pick fork version based on voluntary exit epoch (if you wanna schedule exit in the future you need to use future fork version). I think it's fine to use (fallback) to (this.apiClient.beacon.state.getFork("head")) if nothing is scheduled
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.
working on this api implementation here: #2036
Co-authored-by: Marin Petrunić <mpetrunic@users.noreply.github.com>
…into P0/volexit-cli
solution for #1970
currently testing with an active pyrmont validator to see if/when it proposes a block. after the validator has done this and maybe after it has ran for a good while, i'll perform voluntary exit as a test for this PR
i also added a check for the publish voluntary exit gossip call to check and make sure we have gossip peers in the voluntary exit topic before sending a voluntary exit so it will error if we have no relevant peers. depending on how the team likes the design of this particular case, i may try to apply it to other parts of gossip and try to add some code to track peers by topic