github.com/prysmaticlabs/prysm@v1.4.4/beacon-chain/core/feed/operation/events.go (about)

     1  // Package operation contains types for block operation-specific events fired
     2  // during the runtime of a beacon node such as attestations, voluntary
     3  // exits, and slashings.
     4  package operation
     5  
     6  import (
     7  	ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
     8  )
     9  
    10  const (
    11  	// UnaggregatedAttReceived is sent after an unaggregated attestation object has been received
    12  	// from the outside world. (eg. in RPC or sync)
    13  	UnaggregatedAttReceived = iota + 1
    14  
    15  	// AggregatedAttReceived is sent after an aggregated attestation object has been received
    16  	// from the outside world. (eg. in sync)
    17  	AggregatedAttReceived
    18  
    19  	// ExitReceived is sent after an voluntary exit object has been received from the outside world (eg in RPC or sync)
    20  	ExitReceived
    21  )
    22  
    23  // UnAggregatedAttReceivedData is the data sent with UnaggregatedAttReceived events.
    24  type UnAggregatedAttReceivedData struct {
    25  	// Attestation is the unaggregated attestation object.
    26  	Attestation *ethpb.Attestation
    27  }
    28  
    29  // AggregatedAttReceivedData is the data sent with AggregatedAttReceived events.
    30  type AggregatedAttReceivedData struct {
    31  	// Attestation is the aggregated attestation object.
    32  	Attestation *ethpb.AggregateAttestationAndProof
    33  }
    34  
    35  // ExitReceivedData is the data sent with ExitReceived events.
    36  type ExitReceivedData struct {
    37  	// Exit is the voluntary exit object.
    38  	Exit *ethpb.SignedVoluntaryExit
    39  }