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

Validator fails to start when hex literal value is passed to externalSignerPublicKeys #3817

Closed
dadepo opened this issue Mar 1, 2022 · 1 comment · Fixed by #4405
Closed
Labels
good first issue Issues that are suitable for first-time contributors. prio-low This is nice to have. scope-ux Issues for CLI UX or general consumer UX.

Comments

@dadepo
Copy link
Contributor

dadepo commented Mar 1, 2022

Describe the bug

When an hex literal value (prefixed with 0x) is supplied as the value of externalSignerPublicKeys, then the application fails to start. It throws the following error:

 ✖ YError: item.split is not a function at Object.runValidation [as _runValidation]

The reason is that yargs parses the hex literal string to numeric value, which causes the logic in the coerce function here to throw an exception

Expected behavior

Validator should start, even if literal hex value (with the 0x prefix) is supplied as value to the externalSignerPublicKeys flag

Steps to Reproduce

  1. Set the public key with literal hex. Eg: externalSignerPublicKeys: "0x97b1b00d3c1888b5715c2c88bf1df7b0ad715388079de211bdc153697b69b868c671af3b2d86c5cdfbade48d03888ab4"
  2. Run the validator
  3. See error

Desktop (please complete the following information):

  • OS: ALL
  • Version: v0.35.0-beta.0/master/+2/de66f0bd (git)
@dadepo dadepo added the good first issue Issues that are suitable for first-time contributors. label Mar 1, 2022
@dapplion
Copy link
Contributor

dapplion commented Mar 2, 2022

From yargs/yargs-parser#132 seems there is a way to prevent parsing strings

@philknows philknows added the prio-low This is nice to have. label Mar 18, 2022
@dapplion dapplion added the scope-ux Issues for CLI UX or general consumer UX. label May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Issues that are suitable for first-time contributors. prio-low This is nice to have. scope-ux Issues for CLI UX or general consumer UX.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants