-
Notifications
You must be signed in to change notification settings - Fork 1k
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
validator REST: attestation v2 #14633
Conversation
return nil, errors.Wrap(err, "failed to get attestation data") | ||
} | ||
|
||
signature, err := hexutil.Decode(jsonAttestation.Signature) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we be checking for lengths?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we can add this in a future PR, but I would not do it here
|
||
aggregatedAttestation, err := convertAttestationToProto(attData) | ||
var aggregateAttestationResponse structs.AggregateAttestationResponse | ||
err := c.jsonRestHandler.Get(ctx, endpoint, &aggregateAttestationResponse) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think i need to add a header to this too for eth consensus version https://ethereum.github.io/beacon-APIs/?urls.primaryName=dev#/Validator/getAggregatedAttestationV2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing fallback for submitSignedAggregateSelectionProof
attElectra, ok := attestation.(*ethpb.AttestationElectra) | ||
if !ok { | ||
return errors.New("attestation is not electra") | ||
} | ||
if len(attElectra.CommitteeBits) == 0 { | ||
return errors.New("attestation committee bits can't be nil") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can just call attestation.CommitteeBitsVal()
What type of PR is this?
Feature
What does this PR do? Why is it needed?
added the use of the following endpoints for validator rest mode to support the Electra hardfork
/eth/v2/beacon/pool/attestations
POST/eth/v2/validator/aggregate_and_proofs
POST/eth/v2/validator/aggregate_attestation
GETTested via e2e :
bazel test //testing/endtoend:go_minimal_scenario_test --test_output=streamed --test_timeout=10000 --test_filter=TestEndToEnd_MinimalConfig_ValidatorRESTApi --flaky_test_attempts=1
Which issues(s) does this PR fix?
Fixes #
Other notes for review
Acknowledgements