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

feat(sidecar): configurable ValidatorIndex #101

Merged
merged 14 commits into from
Jul 3, 2024

Conversation

namn-grg
Copy link
Contributor

@namn-grg namn-grg commented Jul 1, 2024

This PR adds CLI option to pass validator_index as comma-separated values i.e. --validator-index "1,2,3,4"

fixes #57

@namn-grg namn-grg marked this pull request as ready for review July 2, 2024 07:21
@namn-grg namn-grg requested a review from merklefruit July 2, 2024 07:22
Copy link
Collaborator

@merklefruit merklefruit left a comment

Choose a reason for hiding this comment

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

Looks good! Left a few nits. Just one note: have you been able to test the CLI option?
I don't think that --validator-index 1, 3, 4 would work because of the spaces after each comma, but I'm not sure.

Also, it would be nice to support specifying an array with the [2,5] notation specified in the issue. One way to do this could be to check if the flag value starts with [ in the parse_validator_indexes function, but maybe there are other ways too

bolt-sidecar/bin/sidecar.rs Outdated Show resolved Hide resolved
bolt-sidecar/bin/sidecar.rs Outdated Show resolved Hide resolved
bolt-sidecar/src/config.rs Outdated Show resolved Hide resolved
bolt-sidecar/src/config.rs Outdated Show resolved Hide resolved
@namn-grg namn-grg requested a review from merklefruit July 2, 2024 15:12
@namn-grg
Copy link
Contributor Author

namn-grg commented Jul 2, 2024

Looks good! Left a few nits. Just one note: have you been able to test the CLI option? I don't think that --validator-index 1, 3, 4 would work because of the spaces after each comma, but I'm not sure.

Also, it would be nice to support specifying an array with the [2,5] notation specified in the issue. One way to do this could be to check if the flag value starts with [ in the parse_validator_indexes function, but maybe there are other ways too

@merklefruit as discussed since the brackets are an issue, I have changed it to be compatible with quotation marks i.e. --validator-index "1,2,3,4"

@namn-grg namn-grg requested a review from thedevbirb July 2, 2024 15:18
namn-grg and others added 2 commits July 2, 2024 23:46
Co-authored-by: nicolas <48695862+merklefruit@users.noreply.github.com>
Copy link
Collaborator

@merklefruit merklefruit left a comment

Choose a reason for hiding this comment

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

Great job with this one :)

Copy link
Contributor

@mempirate mempirate left a comment

Choose a reason for hiding this comment

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

Looking good, small nit and updated some stuff as well

bolt-sidecar/src/state/consensus.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@thedevbirb thedevbirb left a comment

Choose a reason for hiding this comment

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

Last nit, great job!

bolt-sidecar/src/config.rs Outdated Show resolved Hide resolved
@merklefruit merklefruit merged commit b4f57cb into feat/sidecar/builder-api Jul 3, 2024
@merklefruit merklefruit deleted the feat/sidecar/validator-index branch July 3, 2024 13:37
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

Successfully merging this pull request may close these issues.

4 participants