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

Require the caller of checkLeaderValue to provide bounds. #2776

Merged
merged 1 commit into from May 11, 2022

Conversation

nc6
Copy link
Contributor

@nc6 nc6 commented May 10, 2022

The input to checkLeaderValue is now not guaranteed to be the output
of a VRF evaluation. Consequently, we require the input to explicitly
specify its bounds.

We only provide one way to construct a 'BoundedNatural', which will
throw an error if the bound is violated. This is most appropriate for
our use case, since we "know" the bounds statically, and a violation
indicates a programmer error.

The input to `checkLeaderValue` is now not guaranteed to be the output
of a VRF evaluation. Consequently, we require the input to explicitly
specify its bounds.

We only provide one way to construct a 'BoundedNatural', which will
throw an error if the bound is violated. This is most appropriate for
our use case, since we "know" the bounds statically, and a violation
indicates a programmer error.
@nc6 nc6 requested a review from JaredCorduan May 10, 2022 14:02
Copy link
Contributor

@JaredCorduan JaredCorduan left a comment

Choose a reason for hiding this comment

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

Looks great to me, thanks @nc6 !

@nc6 nc6 merged commit 7a014a1 into master May 11, 2022
@iohk-bors iohk-bors bot deleted the nc/leaderBounds branch May 11, 2022 09:02
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.

None yet

2 participants