mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-11 20:20:05 +00:00
7067c84c69
* include validator client stream * Update validator/client/validator_attest.go * gazelle * rem extraneous logs * fixing tests * resolve most tests * gaz * add lock * ivan feedback * pass tests for update protect * gaz * duties gaz * no need for canonical head slot * fix ctx leak * fmt * add in feature flag * add streaming subpackage * add polling/streaming separation * able to build * fix duplicate package names * fix polling * imports * confirm it works * fixed up comment * go lint comments * gaz * build * Update validator/client/streaming/service_test.go Co-authored-by: terence tsao <terence@prysmaticlabs.com> * tidy * fmt * add stream duties to e2e * add stream duties to e2e flags Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com>
38 lines
1.1 KiB
Go
38 lines
1.1 KiB
Go
package streaming
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
|
|
"github.com/sirupsen/logrus"
|
|
|
|
"github.com/prysmaticlabs/prysm/shared/bytesutil"
|
|
)
|
|
|
|
type attSubmitted struct {
|
|
data *ethpb.AttestationData
|
|
attesterIndices []uint64
|
|
aggregatorIndices []uint64
|
|
}
|
|
|
|
func (v *validator) LogAttestationsSubmitted() {
|
|
v.attLogsLock.Lock()
|
|
defer v.attLogsLock.Unlock()
|
|
|
|
for _, attLog := range v.attLogs {
|
|
log.WithFields(logrus.Fields{
|
|
"Slot": attLog.data.Slot,
|
|
"CommitteeIndex": attLog.data.CommitteeIndex,
|
|
"BeaconBlockRoot": fmt.Sprintf("%#x", bytesutil.Trunc(attLog.data.BeaconBlockRoot)),
|
|
"SourceEpoch": attLog.data.Source.Epoch,
|
|
"SourceRoot": fmt.Sprintf("%#x", bytesutil.Trunc(attLog.data.Source.Root)),
|
|
"TargetEpoch": attLog.data.Target.Epoch,
|
|
"TargetRoot": fmt.Sprintf("%#x", bytesutil.Trunc(attLog.data.Target.Root)),
|
|
"AttesterIndices": attLog.attesterIndices,
|
|
"AggregatorIndices": attLog.aggregatorIndices,
|
|
}).Info("Submitted new attestations")
|
|
}
|
|
|
|
v.attLogs = make(map[[32]byte]*attSubmitted)
|
|
}
|