Documentation ¶
Index ¶
- type Attestation
- type AttestationsService
- type AttesterSlashing
- type AttesterSlashingsService
- type BeaconCommittee
- type BeaconCommitteeService
- type Block
- type BlocksService
- type MetadataService
- type ProposerDuty
- type ProposerDutyService
- type ProposerSlashing
- type ProposerSlashingsService
- type Service
- type Validator
- type ValidatorBalance
- type ValidatorsService
- type VoluntaryExit
- type VoluntaryExitsService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attestation ¶
type Attestation struct { InclusionSlot uint64 InclusionBlockRoot []byte InclusionIndex uint64 Slot uint64 CommitteeIndex uint64 AggregationBits []byte BeaconBlockRoot []byte SourceEpoch uint64 SourceRoot []byte TargetEpoch uint64 TargetRoot []byte }
Attestation holds information about an attestation included by a block.
type AttestationsService ¶
type AttestationsService interface { // SetAttestation sets an attestation. SetAttestation(ctx context.Context, attestation *Attestation) error }
AttestationsService defines the attestations service.
type AttesterSlashing ¶
type AttesterSlashing struct { InclusionSlot uint64 InclusionBlockRoot []byte InclusionIndex uint64 Attestation1Indices []uint64 Attestation1Slot uint64 Attestation1CommitteeIndex uint64 Attestation1BeaconBlockRoot []byte Attestation1SourceEpoch uint64 Attestation1SourceRoot []byte Attestation1TargetEpoch uint64 Attestation1TargetRoot []byte Attestation1Signature []byte Attestation2Indices []uint64 Attestation2Slot uint64 Attestation2CommitteeIndex uint64 Attestation2BeaconBlockRoot []byte Attestation2SourceEpoch uint64 Attestation2SourceRoot []byte Attestation2TargetEpoch uint64 Attestation2TargetRoot []byte Attestation2Signature []byte }
AttesterSlashing holds information about an attester slashing included by a block.
type AttesterSlashingsService ¶
type AttesterSlashingsService interface { // SetAttesterSlashing sets an attester slashing. SetAttesterSlashing(ctx context.Context, attesterSlashing *AttesterSlashing) error }
AttesterSlashingsService defines the attester slashings service.
type BeaconCommittee ¶
BeaconCommittee holds information for beacon committees.
type BeaconCommitteeService ¶
type BeaconCommitteeService interface { // SetBeaconComittee sets a beacon committee. SetBeaconCommittee(ctx context.Context, beaconCommittee *BeaconCommittee) error }
BeaconCommitteeService defines the beacon committee service.
type Block ¶
type Block struct { Slot uint64 ProposerIndex uint64 Root []byte Graffiti []byte RANDAOReveal []byte BodyRoot []byte ParentRoot []byte StateRoot []byte ETH1BlockHash []byte ETH1DepositCount uint64 ETH1DepositRoot []byte }
Block holds information about a block.
type BlocksService ¶
type BlocksService interface { // SetBlock sets a block. SetBlock(ctx context.Context, block *Block) error }
BlocksService defines the blocks service.
type MetadataService ¶
type MetadataService interface { // SetMetadata sets a metadata key to a JSON value. SetMetadata(ctx context.Context, key string, value []byte) error // GetMetadata obtains the JSON value from a metadata key. GetMetadata(ctx context.Context, key string) ([]byte, error) }
MetadataService defines the metadata service.
type ProposerDuty ¶
ProposerDuty holds information for proposer duties.
type ProposerDutyService ¶
type ProposerDutyService interface { // SetProposerDuty sets a proposer duty. SetProposerDuty(ctx context.Context, proposerDuty *ProposerDuty) error }
ProposerDutyService defines the proposer duty service.
type ProposerSlashing ¶
type ProposerSlashing struct { InclusionSlot uint64 InclusionBlockRoot []byte InclusionIndex uint64 Header1Slot uint64 Header1ProposerIndex uint64 Header1ParentRoot []byte Header1StateRoot []byte Header1BodyRoot []byte Header1Signature []byte Header2Slot uint64 Header2ProposerIndex uint64 Header2ParentRoot []byte Header2StateRoot []byte Header2BodyRoot []byte Header2Signature []byte }
ProposerSlashing holds information about a proposer slashing included by a block.
type ProposerSlashingsService ¶
type ProposerSlashingsService interface { // SetProposerSlashing sets an proposer slashing. SetProposerSlashing(ctx context.Context, proposerSlashing *ProposerSlashing) error }
ProposerSlashingsService defines the proposer slashings service.
type Service ¶
type Service interface { BeaconCommitteeService ProposerDutyService BlocksService AttestationsService VoluntaryExitsService AttesterSlashingsService ProposerSlashingsService ValidatorsService MetadataService // BeginTx begins a transaction. BeginTx(ctx context.Context) (context.Context, context.CancelFunc, error) // CommitTx commits a transaction. CommitTx(ctx context.Context) error }
Service defines the chain database service.
type Validator ¶
type Validator struct { PublicKey []byte Index uint64 EffectiveBalance uint64 Slashed bool ActivationEligibilityEpoch uint64 ActivationEpoch uint64 ExitEpoch uint64 WithdrawableEpoch uint64 }
Validator holds information about a validator.
type ValidatorBalance ¶
ValidatorBalance holds information about a validator's balance at a given epoch.
type ValidatorsService ¶
type ValidatorsService interface { // SetValidator sets a validator. SetValidator(ctx context.Context, validator *Validator) error // SetValidatorBalance sets a validator balance. SetValidatorBalance(ctx context.Context, validatorBalance *ValidatorBalance) error }
ValidatorsService defines the validators service.
type VoluntaryExit ¶
type VoluntaryExit struct { InclusionSlot uint64 InclusionBlockRoot []byte InclusionIndex uint64 ValidatorIndex uint64 Epoch uint64 }
VoluntaryExit holds information about a voluntary exit included in a block.
type VoluntaryExitsService ¶
type VoluntaryExitsService interface { // SetVoluntaryExit sets a voluntary exit. SetVoluntaryExit(ctx context.Context, voluntaryExit *VoluntaryExit) error }
VoluntaryExitsService defines the voluntary exits service.