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

Optimize SubmitAggregateSelectionProof VC action #13711

Merged
merged 9 commits into from
Mar 19, 2024

Conversation

rkapka
Copy link
Contributor

@rkapka rkapka commented Mar 8, 2024

What type of PR is this?

Other

What does this PR do? Why is it needed?

There is no need to make some requests to the beacon node inside SubmitAggregateSelectionProof when we already have the data available in the duty. We just need to pass this extra data to the function.

This reduces the whole action from a few hundred ms to a few ms.

@rkapka rkapka added API Api related tasks Validator Client labels Mar 8, 2024
@rkapka rkapka requested a review from a team as a code owner March 8, 2024 17:08
@rkapka rkapka force-pushed the optimize-SubmitAggregateSelectionProof branch from ba6ac41 to eef89b3 Compare March 8, 2024 18:45
Copy link
Contributor

@saolyn saolyn left a comment

Choose a reason for hiding this comment

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

The changes themselves look good to me. You seem to be having an issue with MockValidatorClient

# Conflicts:
#	validator/client/beacon-api/beacon_api_validator_client.go
#	validator/client/grpc-api/grpc_validator_client.go
Copy link
Contributor

@saolyn saolyn left a comment

Choose a reason for hiding this comment

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

LGTM

)

func (c *beaconApiValidatorClient) submitAggregateSelectionProof(ctx context.Context, in *ethpb.AggregateSelectionRequest) (*ethpb.AggregateSelectionResponse, error) {
func (c *beaconApiValidatorClient) submitAggregateSelectionProof(
Copy link
Contributor

Choose a reason for hiding this comment

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

Just had a look at deep source, seems there is somewhere where these are both pointer and recover, might be worth another look

@rkapka rkapka added this pull request to the merge queue Mar 19, 2024
Merged via the queue into develop with commit b692722 Mar 19, 2024
16 of 17 checks passed
@rkapka rkapka deleted the optimize-SubmitAggregateSelectionProof branch March 19, 2024 14:30
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Api related tasks Validator Client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants