-
Notifications
You must be signed in to change notification settings - Fork 344
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 ability to generate a signed exit transaction #355
Add ability to generate a signed exit transaction #355
Conversation
Love this! It worked when I tried it out. |
This is also related to #316 . |
When calling the
This could be improved by interactively asking for the various needed values similar to the current behavior when you call the |
When entering the wrong keystore password, I get this traceback. The error should be catched and a proper error message should be displayed instead.
|
It would be nice to be able to use the mnemonic + index in addition to keystore + password to sign the exit and be able to create that exit file. This would make this process more flexible. |
My initial tests confirm that this PR generate valid exit signatures that can be broadcasted to perform a voluntary exit. |
mismatched password
@remyroy With error handling it looks like most instances do a full exception raise which would provide the stack trace such as if you provide more/less validator indices than credentials when doing a BLS change. I have absorbed the error and I do think it looks better, just wanted to make a note. With mnemonic support, this is going to be a bit of work but I see where you are going with adding support for it and it makes sense. Going to start working on that. Thanks for taking a look! |
I've implemented the ability to create exit transactions with a mnemonic. |
I recently discovered that, unlike BLS changes, voluntary exits are not expected to be an array but individual signatures: https://ethereum.github.io/beacon-APIs/#/Beacon/submitPoolVoluntaryExit The only modification this is going to make is the need to generate separate files in the case of the mnemonic instead of a single array output |
Hi! Thank you so much for making this PR! My reasons for not providing this feature were
(1) was a stronger pain. However, I may have overlooked the requirements of non-technical users that you highlighted. I’d love to give this PR a thorough review and attempt to include it. |
One potential Deneb spec change of locking VoluntaryExit domain on capella: ethereum/consensus-specs#3288. It would fix the |
Yeah the hardcoded fork version is pretty horrendous, I agree. I am trying to optimize for usability and the difficulty I had trying to figure out the current fork version was enough for me to know that non-technical users it would be impossible unless instructions hardcoded their own fork version which is pretty much the same problem just distributed. I wouldn't be opposed to adding the parameter as an optional override but I would not recommend removing the hardcoded value in favor of it. |
@hwwhww with ethereum/consensus-specs#3288 being merged my guess is we would like to update this request to account for that change and then hold off until deneb to land it? (On second though, due to the backwards compatibility of the change we wouldn't need to wait) |
I am trying to use the code to generate the exits. It generates a file and I am broadcasted it to beacon chain network. But the validator is not getting exited. How can I verify that the exits that are generated are correct?
|
@RohitAudit 👋 When you used this tool, did you generate the signature by using your mnemonic or validator keystore? I'll test today to see if I can figure out what happened but please let me know if you discover anything. |
I used the validator keystore for signature generation. Let me try with ethdo and will inform you on the finding |
Yes! We can pin the fork version to |
I created an exit message using this feature with a keystore and then created an exit message using latest ethdo with the corresponding mnemonic. The messages and signatures were identical. Very curious what you find. |
Great to hear. I'll spend some time today to look through the code to see what I can cleanup given that change. |
I did generate and compared the files and they are identical. I think the problem is with my depositing it to the beacon chain. |
@hwwhww Did a pass on updating the code and fixing unit tests. Successful build would lead me to believe this should be ready to go for review. The way I tested was using ethdo to validate message and signatures match up. |
Following up on this. Please let me know if there is more needed. |
Hello @hwwhww, is there any chance of merging this? We would like to use this to generate pre-signed exit messages to ensure the safety of our decentralized operator group. Using |
@CarlBeek should I be pinging you instead? Looks like you're the one who has been maintaining the project recently |
Closing this as I've been notified this isn't going to be landed because:
Glad this was helpful for some. 🎉 |
This is a work in progress as I am looking for preliminary feedback on implementation and guidance on improvementsI feel this PR is in a usable state. The last improvement I am unsure of how to achieve is improving the file prompt experience.
As discussed here, with the launch of beaconchain's broadcasting tool it is now very easy for users to broadcast messages without the need for a node.
After helping dozens of individuals with the BLS change, I am now fielding questions on how to exit a validator. Telling the user to read the guides for their client or providing them ethdo commands can prove difficult for non-technical users especially if they don't have a running node.
Though there is little difference between ethdo and this cli to a non-technical user, my ultimate goal is to integrate this feature with wagyu-key-gen to provide an easy interface for users to make this modification. That tool is a wrapper of staking-deposit-cli making this change a prerequisite.
Implementation decisions
In order to sign a voluntary exit, there are a number of requirements:
VoluntaryExit
SignedVoluntaryExit
Example usage:
./deposit.sh exit-transaction-keystore --keystore keystore-m_***.json --chain zhejiang --keystore_password 12341234 --validator_index 4620 --epoch 1234
Example file output:
I also fixed a very minor parameter/readme discrepancy with
mnemonic_password
as mentioned here