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

core/validatorapi: add verification functions to validatorapi #953

Merged
merged 2 commits into from
Aug 10, 2022

Conversation

dB2510
Copy link
Contributor

@dB2510 dB2510 commented Aug 10, 2022

Adds verification functions for each duty in eth2util/signing and use them in validatorapi.

category: refactor
ticket: #217

@codecov
Copy link

codecov bot commented Aug 10, 2022

Codecov Report

Merging #953 (a8db5f5) into main (36be0ad) will increase coverage by 0.06%.
The diff coverage is 54.71%.

@@            Coverage Diff             @@
##             main     #953      +/-   ##
==========================================
+ Coverage   54.20%   54.26%   +0.06%     
==========================================
  Files         116      116              
  Lines       12675    12681       +6     
==========================================
+ Hits         6870     6881      +11     
+ Misses       4808     4800       -8     
- Partials      997     1000       +3     
Impacted Files Coverage Δ
eth2util/signing/signing.go 46.25% <45.83%> (-3.41%) ⬇️
core/validatorapi/validatorapi.go 53.71% <73.52%> (+2.37%) ⬆️
core/qbft/qbft.go 72.10% <0.00%> (+0.42%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

// To avoid pointer vs non-pointer issues, always get value if pointer is provided.
if reflect.TypeOf(eth2SignedType).Kind() == reflect.Pointer {
eth2SignedType = reflect.ValueOf(eth2SignedType).Elem().Interface()
func VerifyAttestation(ctx context.Context, eth2Cl Eth2Provider, pubkey *bls_sig.PublicKey, att eth2p0.Attestation) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think all these eth2 types should be pointers, since that is how goeth2 users them, always as pointers.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure

@dB2510 dB2510 added the merge when ready Indicates bulldozer bot may merge when all checks pass label Aug 10, 2022
@obol-bulldozer obol-bulldozer bot merged commit e55f167 into main Aug 10, 2022
@obol-bulldozer obol-bulldozer bot deleted the dhruv/verifyvapi branch August 10, 2022 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge when ready Indicates bulldozer bot may merge when all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants