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

General Upgrade and BLS-to-ETH1 fixes #37

Closed
wants to merge 25 commits into from
Closed

Conversation

mxmar
Copy link

@mxmar mxmar commented Nov 2, 2023

This PR should solve BLS-to-ETH1 CLI issues and possibly upgrade core with upstream repo.

ClickUp: https://app.clickup.com/t/2645698/DEV-5491

@mxmar mxmar added bug Something isn't working enhancement New feature or request labels Nov 2, 2023
@mxmar mxmar self-assigned this Nov 2, 2023
@mxmar mxmar requested review from richtera, kalote and Wolmin November 2, 2023 10:44
@Hugoo
Copy link

Hugoo commented Nov 2, 2023

Task linked: DEV-5491 BLS to ETH1 Withdrawal Conversion

mxmar added 5 commits November 2, 2023 14:43
…fixes

# Conflicts:
#	.circleci/config.yml
#	setup.py
#	staking_deposit/settings.py
Signed-off-by: mxmar <[email protected]>
@mxmar
Copy link
Author

mxmar commented Nov 3, 2023

Tested with flags (non-interactive mode):

./lukso-key-gen --language=english generate-bls-to-execution-change \
--chain=lukso \
--mnemonic="sister protect peanut hill ready work profit fit wish want small inflict flip member tail between sick setup bright duck morning sell paper worry" \
--bls_withdrawal_credentials_list="0x00bd0b5a34de5fb17df08410b5e615dda87caf4fb72d0aac91ce5e52fc6aa8de,0x00a75d83f169fa6923f3dd78386d9608fab710d8f7fcf71ba9985893675d5382" \
--validator_start_index=0 \
--validator_indices="50000, 50001" \
--execution_address="0x3434343434343434343434343434343434343434";

And tested without flags (interactive mode):

./lukso-key-gen generate-bls-to-execution-change                                                                                                                                                                                                               ✔  1006  14:22:38

***Using the tool on an offline and secure device is highly recommended to keep your mnemonic safe.***

Please choose your language ['1. العربية', '2. ελληνικά', '3. English', '4. Français', '5. Bahasa melayu', '6. Italiano', '7. 日本語', '8. 한국어', '9. Português do Brasil', '10. român', '11. Türkçe', '12. 简体中文']:  [English]: 
Please choose the (mainnet or testnet) network/chain name ['lukso', 'lukso-testnet', 'lukso-devnet', 'mainnet', 'goerli', 'sepolia', 'zhejiang', 'holesky']:  [lukso]: 
Please enter your mnemonic separated by spaces (" "). Note: you only need to enter the first 4 letters of each word if you'd prefer.: stay depend ignore lady access will dress idea hybrid tube original riot between plate ethics ecology green response hollow famous salute they warrior little
Please enter the index position for the keys to start generating withdrawal credentials in ERC-2334 format. [0]: 9
Please enter a list of the validator index number(s) of your validator(s) as identified on the beacon chain. Split multiple items with whitespaces or commas.: 9,10,11
Please enter a list of the old BLS withdrawal credentials of your validator(s). Split multiple items with whitespaces or commas. The withdrawal credentials are in hexadecimal encoded form.: 0x00abfc563b1f859d24c91dde59b95621579792b00633b69b262d74ad1e9da3a4,0x005868054574857e54be722f367c54fbb068c50676f6abeae990146da390f0fe,0x00f0dbf34b73ba855f786a5303764ada2d2512c1ce00d52adb65408274e04448

[Error] The given input is not in hexadecimal encoded form.

Please enter a list of the old BLS withdrawal credentials of your validator(s). Split multiple items with whitespaces or commas. The withdrawal credentials are in hexadecimal encoded form.: 0x00abfc563b1f859d24c91dde59b95621579792b00633b69b262d74ad1e9da3a4,0x005868054574857e54be722f367c54fbb068c50676f6abeae990146da390f0fe,0x00f0dbf34b73ba855f786a5303764ada2d2512c1ce00d52adb65408274e04448
Please enter the 20-byte execution address for the new withdrawal credentials. Note that you CANNOT change it once you have set it on chain.: 0x3DAeE8Cd2E3C18dAfE13332DE33972AC5cF558f3

**[Warning] you are setting an Eth1 address as your withdrawal address. Please ensure that you have control over this address.**

Repeat your execution address for confirmation.: 0x3DAeE8Cd2E3C18dAfE13332DE33972AC5cF558f3

**[Warning] you are setting an Eth1 address as your withdrawal address. Please ensure that you have control over this address.**


[Error] The given Eth1 address is not in checksum form.
Please enter the 20-byte execution address for the new withdrawal credentials. Note that you CANNOT change it once you have set it on chain.: 0x3DAeE8Cd2E3C18dAfE13332DE33972AC5cF558f3

**[Warning] you are setting an Eth1 address as your withdrawal address. Please ensure that you have control over this address.**

Repeat your execution address for confirmation.: 0x3DAeE8Cd2E3C18dAfE13332DE33972AC5cF558f3

**[Warning] you are setting an Eth1 address as your withdrawal address. Please ensure that you have control over this address.**

Creating your keys:		  [####################################]  3/3
Creating your SignedBLSToExecutionChange:	  [####################################]  3/3
Verifying your BLSToExecutionChange file:	  [####################################]  3/3

Success!
Your SignedBLSToExecutionChange JSON file can be found at: /home/macht/Downloads/linux-v2.7.0-37.zip(1)/lukso-key-gen-cli-v2.7.0-37-linux/bls_to_execution_changes


Press any key.
  • Multi inputs are working
  • LUKSO Mainnet is the default network now (lukso)
  • Build was able to generate valid json message and beacon node was able to receive it
  • 🔴 [ ] In interactive mode we still have [Error] messages for the first time when you pass BLS withdrawals or ETH1 address
  • 🔴 [ ] There is still no solution for maximum number of the keys to change (or validator indicates). This is just a string input. It's able to collect a single key or multiple. Input length is probably limited to terminal and OS config. Linux example: https://github.com/torvalds/linux/blob/v5.11/drivers/tty/n_tty.c#L1681

mxmar added 2 commits November 3, 2023 15:42
Signed-off-by: mxmar <[email protected]>
Signed-off-by: mxmar <[email protected]>
Copy link

@richtera richtera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm there are some more places the version stuff got affected

Signed-off-by: mxmar <[email protected]>
@mxmar mxmar requested a review from richtera November 7, 2023 09:23
Copy link

@richtera richtera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NICE!

@mxmar
Copy link
Author

mxmar commented Mar 14, 2024

I'm closing due to @richtera upgrades and fixes in #38 and #40

@mxmar mxmar closed this Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

5 participants