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

Error: no such option: --non_interactive #422

Open
n0price opened this issue Oct 25, 2024 · 2 comments
Open

Error: no such option: --non_interactive #422

n0price opened this issue Oct 25, 2024 · 2 comments

Comments

@n0price
Copy link

n0price commented Oct 25, 2024

I would like to generate the seed phrase non interactively, but I get the error Error: no such option: --non_interactive, as well the --mnemonic_language seems to not work tried English, english, 3 but still asking interactively for the language

cmd

docker run -it --rm -v ./app:/app/ ethereum/staking-deposit-cli new-mnemonic --mnemonic_language=english --chain holesky --execution_address 0x18E83a5a2c47a85103fffffffffffff --folder=/app/validator_keys --non_interactive

@Karrenbelt
Copy link

First off, you didn't specify which version of the tool you're using, please include that.

There are several issues with your command i think.

  1. Order matters: staking-deposit-cli [OPTIONS] COMMAND [ARGS]. You need to provide both options, thus: staking-deposit-cli --language English --non_interactive new-mnemonic and then the args.
  2. The execution_address you provide is of an incorrect format. While it is valid hexadecimal, it's of the incorrect length; it should be 42 characters (including the 0x prefix).
  3. Not providing --num_validators. This should be a positive integer greater than 0.
  4. Not providing --keystore_password. This must be of at least length 8.

I ran this as a test:
staking-deposit-cli-v2.7.0 --language English --non_interactive new-mnemonic --mnemonic_language english --chain mainnet --eth1_withdrawal_address 0x0000000000000000000000000000000000000000 --folder ./tmp/derp --num_validators 1 --keystore_password aaaaaaaa

However, in testing, even with --non_interactive, the tool still requires confirmation of the mnemonic by typing it back. I don't have time to dig deeper and figure out if this is intentional or can be avoided somehow. You could perhaps automate it with a tool like expect, but that seems not entirely ideal either. Alternatively, you could use Trezor's python-mnemonic. If you pass the mnemonic it generates (first save the mnemonic to a file, read it back in from the file to ensure you have it saved) you can then use it to generate the keystore and deposit data using the existing-mnemonic command. I've tested this and got that working.

godspeed ser 🫡

@n0price
Copy link
Author

n0price commented Nov 5, 2024

Thanks, number 2 is in purpose to not share the address :-)

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

3 participants
@Karrenbelt @n0price and others