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

EIP-7549: Aggregation gRPC metods #14115

Merged
merged 5 commits into from
Jul 1, 2024
Merged

EIP-7549: Aggregation gRPC metods #14115

merged 5 commits into from
Jul 1, 2024

Conversation

rkapka
Copy link
Contributor

@rkapka rkapka commented Jun 17, 2024

What type of PR is this?

Feature

What does this PR do? Why is it needed?

Implements the following Electra gRPC functions:

  • SubmitAggregateSelectionProofElectra
  • SubmitSignedAggregateSelectionProofElectra

@rkapka rkapka requested a review from a team as a code owner June 17, 2024 15:33
@rkapka rkapka force-pushed the eip-7549-aggregate-rpc branch 2 times, most recently from 67456af to f194f6f Compare June 17, 2024 16:12
@rkapka rkapka added Ready For Review A pull request ready for code review API Api related tasks Electra electra hardfork labels Jun 17, 2024
Comment on lines 291 to 308
var fields logrus.Fields
if agg.Version() >= version.Electra {
fields = logrus.Fields{
"slot": data.Slot,
"committeeCount": att.CommitteeBitsVal().Count(),
"committeeIndices": att.CommitteeBitsVal().BitIndices(),
"validatorIndex": attAndProof.GetAggregatorIndex(),
"aggregatedCount": att.GetAggregationBits().Count(),
}
} else {
fields = logrus.Fields{
"slot": data.Slot,
"committeeIndex": data.CommitteeIndex,
"validatorIndex": attAndProof.GetAggregatorIndex(),
"aggregatedCount": att.GetAggregationBits().Count(),
}
}
log.WithFields(fields).Debug("Broadcasting aggregated attestation and proof")
Copy link
Member

@prestonvanloon prestonvanloon Jun 17, 2024

Choose a reason for hiding this comment

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

Consider wrapping this whole thing in a statement to see if debug logging is even enabled.

if log.GetLevel() >= logrus.DebugLevel {
  var fields logrus.Fields
  ...
  log.WithFields(fields).Debug(...)
}

We should probably start doing this around debug logging to avoid unnecessary computation around field metadata

@rkapka rkapka added Blocked Blocked by research or external factors and removed Ready For Review A pull request ready for code review labels Jun 18, 2024
@rkapka rkapka added Ready For Review A pull request ready for code review and removed Blocked Blocked by research or external factors labels Jun 27, 2024
@rkapka rkapka added this pull request to the merge queue Jul 1, 2024
Merged via the queue into develop with commit 2e6f1de Jul 1, 2024
17 checks passed
@rkapka rkapka deleted the eip-7549-aggregate-rpc branch July 1, 2024 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Api related tasks Electra electra hardfork Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants