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

numerical pruning value fail to parse #4828

Closed
2 tasks done
alindima opened this issue Jun 19, 2024 · 2 comments · Fixed by #4836
Closed
2 tasks done

numerical pruning value fail to parse #4828

alindima opened this issue Jun 19, 2024 · 2 comments · Fixed by #4836
Labels
I2-bug The node fails to follow expected behavior. I10-unconfirmed Issue might be valid, but it's not yet known.

Comments

@alindima
Copy link
Contributor

Is there an existing issue?

  • I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • This is not a support question.

Description of bug

When passing a numerical value to --state-pruning or --blocks-pruning (like 1000) to polkadot-parachain built from master, it fails with:

error: invalid value '1000' for '--blocks-pruning <PRUNING_MODE>'
[possible values: archive, archive-canonical, <NUMBER>]

Seems to have been broken by: #4810

I added some debug logs here:

fn from_str(input: &str) -> Result<Self, Self::Err> {
and this function is never called

Steps to reproduce

build polkadot-parachain from latest master
run polkadot-parachain --blocks-pruning 1000

@alindima alindima added I2-bug The node fails to follow expected behavior. I10-unconfirmed Issue might be valid, but it's not yet known. labels Jun 19, 2024
@alindima
Copy link
Contributor Author

CC @bkchr

@bkchr
Copy link
Member

bkchr commented Jun 19, 2024

Ahh 🙈🙈👀 fixing it.

github-merge-queue bot pushed a commit that referenced this issue Jun 19, 2024
`ValueEnum` is apparently not using the `from_str`...

Closes: #4828
TarekkMA pushed a commit to moonbeam-foundation/polkadot-sdk that referenced this issue Aug 2, 2024
`ValueEnum` is apparently not using the `from_str`...

Closes: paritytech#4828
sfffaaa pushed a commit to peaqnetwork/polkadot-sdk that referenced this issue Dec 27, 2024
`ValueEnum` is apparently not using the `from_str`...

Closes: paritytech#4828
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I2-bug The node fails to follow expected behavior. I10-unconfirmed Issue might be valid, but it's not yet known.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants