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

[Delegations prereq 6] Use a verify.DB for delegation in client #196

Merged
merged 4 commits into from
Mar 7, 2022

Conversation

ethan-lowman-dd
Copy link
Contributor

@ethan-lowman-dd ethan-lowman-dd commented Dec 10, 2021

Splitting up #175

This PR removes the type verify.DelegationsVerifier in favor of using a verify.DB directly to store sets of keys. This simplifies the types, since a DelegationsVerifier just wrapped a DB without adding significant functionality, and allows us to use the same type (a verify.DB) to hold keys for the top level targets role as for delegated targets roles.

@coveralls
Copy link

coveralls commented Dec 10, 2021

Pull Request Test Coverage Report for Build 1918163160

  • 28 of 30 (93.33%) changed or added relevant lines in 3 files are covered.
  • 89 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.2%) to 70.223%

Changes Missing Coverage Covered Lines Changed/Added Lines %
client/delegations.go 9 11 81.82%
Files with Coverage Reduction New Missed Lines %
client/client.go 89 80.62%
Totals Coverage Status
Change from base Build 1758586329: 0.2%
Covered Lines: 2172
Relevant Lines: 3093

💛 - Coveralls

mnm678
mnm678 previously approved these changes Dec 13, 2021
@hosseinsia
Copy link
Contributor

Would you please add some description to this PR?

client/delegations.go Outdated Show resolved Hide resolved
client/delegations.go Show resolved Hide resolved
client/delegations.go Outdated Show resolved Hide resolved
Base automatically changed from ethan.lowman/delegations-prereq-5 to ethan.lowman/delegations-prereq-3 January 7, 2022 16:10
@ethan-lowman-dd ethan-lowman-dd force-pushed the ethan.lowman/delegations-prereq-3 branch from 6649d88 to 372d80d Compare January 7, 2022 17:02
@ethan-lowman-dd ethan-lowman-dd changed the base branch from ethan.lowman/delegations-prereq-3 to ethan.lowman/delegations-prereq-5 January 7, 2022 17:02
@ethan-lowman-dd ethan-lowman-dd force-pushed the ethan.lowman/delegations-prereq-5 branch from ab8cfcc to 8662774 Compare January 7, 2022 17:17
@ethan-lowman-dd ethan-lowman-dd force-pushed the ethan.lowman/delegations-prereq-6 branch from 3a7542d to 48783d0 Compare January 7, 2022 17:17
@ethan-lowman-dd ethan-lowman-dd force-pushed the ethan.lowman/delegations-prereq-5 branch from 8662774 to ed8955d Compare January 11, 2022 16:49
@ethan-lowman-dd ethan-lowman-dd force-pushed the ethan.lowman/delegations-prereq-6 branch 2 times, most recently from a39931e to bc74300 Compare January 11, 2022 17:07
@ethan-lowman-dd ethan-lowman-dd marked this pull request as draft January 11, 2022 17:10
Base automatically changed from ethan.lowman/delegations-prereq-5 to master January 11, 2022 17:35
@ethan-lowman-dd ethan-lowman-dd force-pushed the ethan.lowman/delegations-prereq-6 branch 3 times, most recently from 3cef410 to b627120 Compare January 18, 2022 16:48
@ethan-lowman-dd ethan-lowman-dd changed the base branch from master to ethan.lowman/delegations-prereq-8 January 18, 2022 16:48
@ethan-lowman-dd ethan-lowman-dd force-pushed the ethan.lowman/delegations-prereq-6 branch 2 times, most recently from 2e447bc to d1fae69 Compare January 19, 2022 15:37
Base automatically changed from ethan.lowman/delegations-prereq-8 to master January 21, 2022 20:30
@ethan-lowman-dd ethan-lowman-dd force-pushed the ethan.lowman/delegations-prereq-6 branch from d1fae69 to 071ef19 Compare January 28, 2022 22:42
@ethan-lowman-dd ethan-lowman-dd force-pushed the ethan.lowman/delegations-prereq-6 branch from 071ef19 to 3716bf3 Compare January 28, 2022 22:45
…sociated keys. Make NewDelegationsIterator return an error if the passed DB is missing the top level targets role
@ethan-lowman-dd ethan-lowman-dd marked this pull request as ready for review February 28, 2022 19:25
hosseinsia
hosseinsia previously approved these changes Mar 1, 2022
Copy link
Contributor

@hosseinsia hosseinsia left a comment

Choose a reason for hiding this comment

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

LGTM. -- I do not want to be a blocker for this PR if someone needs it. However, I believe this should be made more readable.

client/delegations.go Show resolved Hide resolved
client/delegations.go Outdated Show resolved Hide resolved
Copy link
Contributor

@hosseinsia hosseinsia left a comment

Choose a reason for hiding this comment

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

LGTM

@ethan-lowman-dd
Copy link
Contributor Author

@asraa This has two stamps now -- did you want to take another look before I merge?

Copy link
Contributor

@asraa asraa left a comment

Choose a reason for hiding this comment

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

Let's ship it!

@ethan-lowman-dd ethan-lowman-dd merged commit 314eed4 into master Mar 7, 2022
@ethan-lowman-dd ethan-lowman-dd deleted the ethan.lowman/delegations-prereq-6 branch March 7, 2022 18: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.

5 participants