Compare commits

...

3 Commits

Author SHA1 Message Date
james-prysm
5de71c532f Merge branch 'develop' into print-tracked-validators-size 2024-10-21 16:31:10 -05:00
james-prysm
d7c68e8f82 changelog 2024-10-21 15:25:27 -05:00
james-prysm
f11d80456c updating log to print tracked validators size 2024-10-21 15:23:28 -05:00
3 changed files with 11 additions and 2 deletions

View File

@@ -27,6 +27,7 @@ The format is based on Keep a Changelog, and this project adheres to Semantic Ve
- Return false from HasBlock if the block is being synced.
- Cleanup forkchoice on failed insertions.
- Use read only validator for core processing to avoid unnecessary copying.
- Fee Recipient log also prints total tracked validators cache size.
### Deprecated

View File

@@ -47,3 +47,9 @@ func (t *TrackedValidatorsCache) Validating() bool {
defer t.Unlock()
return len(t.trackedValidators) > 0
}
func (t *TrackedValidatorsCache) Size() int {
t.Lock()
defer t.Unlock()
return len(t.trackedValidators)
}

View File

@@ -404,7 +404,7 @@ func (vs *Server) PrepareBeaconProposer(
_ context.Context, request *ethpb.PrepareBeaconProposerRequest,
) (*emptypb.Empty, error) {
var validatorIndices []primitives.ValidatorIndex
beforeCacheSize := vs.TrackedValidatorsCache.Size()
for _, r := range request.Recipients {
recipient := hexutil.Encode(r.FeeRecipient)
if !common.IsHexAddress(recipient) {
@@ -428,7 +428,9 @@ func (vs *Server) PrepareBeaconProposer(
}
if len(validatorIndices) != 0 {
log.WithFields(logrus.Fields{
"validatorCount": len(validatorIndices),
"validatorCount": len(validatorIndices),
"previousTotalTrackedValidators": beforeCacheSize,
"totalTrackedValidators": vs.TrackedValidatorsCache.Size(),
}).Debug("Updated fee recipient addresses for validator indices")
}
return &emptypb.Empty{}, nil