-
Notifications
You must be signed in to change notification settings - Fork 810
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
Add selections
API endpoints to support DVT middleware
#7016
base: unstable
Are you sure you want to change the base?
Conversation
common/eth2/src/lib.rs
Outdated
pub async fn post_validator_beacon_committee_selections( | ||
&self, | ||
selections: &[BeaconCommitteeSelection], | ||
) -> Result<GenericResponse<Vec<SelectionProof>>, Error> { |
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.
This line is saying that we expect a Vec<SelectionProof>
as the response. A SelectionProof
is just a standalone signature. But the middleware will actually return a Vec
of objects like this:
{
"data": [
{
"validator_index": "1",
"slot": "1",
"selection_proof": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
}
]
}
These objects are BeaconCommitteeSelection
s, so we need to change the type here to Vec<BeaconCommitteeSelection>
.
Issue Addressed
Proposed Changes
beacon_committee_selections
endpointsync_committee_selections
endpointAdditional Info
Thank you @michaelsproul and @macladson for the help and guidance