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

[enhancement] validator_start_index should allow taking in a sequence of int like how validator_indices behaves #345

Open
yzhuang opened this issue Mar 23, 2023 · 0 comments

Comments

@yzhuang
Copy link

yzhuang commented Mar 23, 2023

The current code looks like this:
https://github.com/ethereum/staking-deposit-cli/blob/master/staking_deposit/cli/generate_bls_to_execution_change.py#L135

@click.pass_context
def generate_bls_to_execution_change(
        ctx: click.Context,
        bls_to_execution_changes_folder: str,
        chain: str,
        mnemonic: str,
        mnemonic_password: str,
        validator_start_index: int,
        validator_indices: Sequence[int],
        bls_withdrawal_credentials_list: Sequence[bytes],
        execution_address: HexAddress,
        devnet_chain_setting: str,
        **kwargs: Any):

Consider this command:

./deposit --language=english generate-bls-to-execution-change \
...
--validator_start_index=0 \
--validator_indices="50000, 50001"

validator 50000 will use start index 0, and 50001 will use start index 1. However, this assumption is not always true.

It would be nice to allow users to do:

./deposit --language=english generate-bls-to-execution-change \
...
--validator_start_index=0,3 \
--validator_indices="50000, 50009"

Or the below since some users reuse withdraw credentials for multiple deposits:

./deposit --language=english generate-bls-to-execution-change \
...
--validator_start_index=0,0 \
--validator_indices="50000, 50009"
@yzhuang yzhuang changed the title [enhancement] validator_start_index should take in a sequence of int instead of a single int [enhancement] validator_start_index should allow taking in a sequence of int like how validator_indices behaves Mar 23, 2023
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

No branches or pull requests

1 participant