dbtypes

package
v1.12.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2024 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssignedBlob

type AssignedBlob struct {
	Root       []byte `db:"root"`
	Commitment []byte `db:"commitment"`
	Slot       uint64 `db:"slot"`
	Blob       *Blob  `db:"blob"`
}

type AssignedSlot

type AssignedSlot struct {
	Slot     uint64 `db:"slot"`
	Proposer uint64 `db:"proposer"`
	Block    *Slot  `db:"block"`
}

type Blob

type Blob struct {
	Commitment []byte  `db:"commitment"`
	Proof      []byte  `db:"proof"`
	Size       uint32  `db:"size"`
	Blob       *[]byte `db:"blob"`
}

type BlobAssignment

type BlobAssignment struct {
	Root       []byte `db:"root"`
	Commitment []byte `db:"commitment"`
	Slot       uint64 `db:"slot"`
}

type BlockFilter

type BlockFilter struct {
	Graffiti      string
	ExtraData     string
	ProposerIndex *uint64
	ProposerName  string
	WithOrphaned  uint8
	WithMissing   uint8
}

type BlockHead added in v1.11.0

type BlockHead struct {
	Slot       uint64 `db:"slot"`
	Root       []byte `db:"root"`
	ParentRoot []byte `db:"parent_root"`
	ForkId     uint64 `db:"fork_id"`
}

type BlockStatus

type BlockStatus struct {
	Root   []byte     `db:"root"`
	Status SlotStatus `db:"status"`
}

type ConsolidationRequest added in v1.11.0

type ConsolidationRequest struct {
	SlotNumber    uint64  `db:"slot_number"`
	SlotRoot      []byte  `db:"slot_root"`
	SlotIndex     uint64  `db:"slot_index"`
	Orphaned      bool    `db:"orphaned"`
	ForkId        uint64  `db:"fork_id"`
	SourceAddress []byte  `db:"source_address"`
	SourceIndex   *uint64 `db:"source_index"`
	SourcePubkey  []byte  `db:"source_pubkey"`
	TargetIndex   *uint64 `db:"target_index"`
	TargetPubkey  []byte  `db:"target_pubkey"`
	TxHash        []byte  `db:"tx_hash"`
	BlockNumber   uint64  `db:"block_number"`
}

type ConsolidationRequestFilter added in v1.12.0

type ConsolidationRequestFilter struct {
	MinSlot          uint64
	MaxSlot          uint64
	SourceAddress    []byte
	MinSrcIndex      uint64
	MaxSrcIndex      uint64
	SrcValidatorName string
	MinTgtIndex      uint64
	MaxTgtIndex      uint64
	TgtValidatorName string
	WithOrphaned     uint8
}

type ConsolidationRequestTx added in v1.12.1

type ConsolidationRequestTx struct {
	BlockNumber   uint64  `db:"block_number"`
	BlockIndex    uint64  `db:"block_index"`
	BlockTime     uint64  `db:"block_time"`
	BlockRoot     []byte  `db:"block_root"`
	ForkId        uint64  `db:"fork_id"`
	SourceAddress []byte  `db:"source_address"`
	SourcePubkey  []byte  `db:"source_pubkey"`
	SourceIndex   *uint64 `db:"source_index"`
	TargetPubkey  []byte  `db:"target_pubkey"`
	TargetIndex   *uint64 `db:"target_index"`
	TxHash        []byte  `db:"tx_hash"`
	TxSender      []byte  `db:"tx_sender"`
	TxTarget      []byte  `db:"tx_target"`
	DequeueBlock  uint64  `db:"dequeue_block"`
}

type ConsolidationRequestTxFilter added in v1.12.1

type ConsolidationRequestTxFilter struct {
	MinDequeue       uint64
	MaxDequeue       uint64
	SourceAddress    []byte
	MinSrcIndex      uint64
	MaxSrcIndex      uint64
	SrcValidatorName string
	MinTgtIndex      uint64
	MaxTgtIndex      uint64
	TgtValidatorName string
	WithOrphaned     uint8
}

type DBEngineType

type DBEngineType int
const (
	DBEngineAny    DBEngineType = 0
	DBEngineSqlite DBEngineType = 1
	DBEnginePgsql  DBEngineType = 2
)

type Deposit

type Deposit struct {
	Index                 *uint64 `db:"deposit_index"`
	SlotNumber            uint64  `db:"slot_number"`
	SlotIndex             uint64  `db:"slot_index"`
	SlotRoot              []byte  `db:"slot_root"`
	Orphaned              bool    `db:"orphaned"`
	PublicKey             []byte  `db:"publickey"`
	WithdrawalCredentials []byte  `db:"withdrawalcredentials"`
	Amount                uint64  `db:"amount"`
	ForkId                uint64  `db:"fork_id"`
}

type DepositFilter

type DepositFilter struct {
	MinIndex      uint64
	MaxIndex      uint64
	PublicKey     []byte
	ValidatorName string
	MinAmount     uint64
	MaxAmount     uint64
	WithOrphaned  uint8
}

type DepositIndexerState

type DepositIndexerState struct {
	FinalBlock   uint64 `json:"final_block"`
	HeadBlock    uint64 `json:"head_block"`
	DepositIndex uint64 `json:"deposit_index"`
}

type DepositTx

type DepositTx struct {
	Index                 uint64 `db:"deposit_index"`
	BlockNumber           uint64 `db:"block_number"`
	BlockTime             uint64 `db:"block_time"`
	BlockRoot             []byte `db:"block_root"`
	PublicKey             []byte `db:"publickey"`
	WithdrawalCredentials []byte `db:"withdrawalcredentials"`
	Amount                uint64 `db:"amount"`
	Signature             []byte `db:"signature"`
	ValidSignature        bool   `db:"valid_signature"`
	Orphaned              bool   `db:"orphaned"`
	TxHash                []byte `db:"tx_hash"`
	TxSender              []byte `db:"tx_sender"`
	TxTarget              []byte `db:"tx_target"`
	ForkId                uint64 `db:"fork_id"`
}

type DepositTxFilter

type DepositTxFilter struct {
	Address       []byte
	TargetAddress []byte
	PublicKey     []byte
	PublicKeys    [][]byte
	ValidatorName string
	MinAmount     uint64
	MaxAmount     uint64
	WithOrphaned  uint8
	WithValid     uint8
}

type Epoch

type Epoch struct {
	Epoch                 uint64  `db:"epoch"`
	ValidatorCount        uint64  `db:"validator_count"`
	ValidatorBalance      uint64  `db:"validator_balance"`
	Eligible              uint64  `db:"eligible"`
	VotedTarget           uint64  `db:"voted_target"`
	VotedHead             uint64  `db:"voted_head"`
	VotedTotal            uint64  `db:"voted_total"`
	BlockCount            uint16  `db:"block_count"`
	OrphanedCount         uint16  `db:"orphaned_count"`
	AttestationCount      uint64  `db:"attestation_count"`
	DepositCount          uint64  `db:"deposit_count"`
	ExitCount             uint64  `db:"exit_count"`
	WithdrawCount         uint64  `db:"withdraw_count"`
	WithdrawAmount        uint64  `db:"withdraw_amount"`
	AttesterSlashingCount uint64  `db:"attester_slashing_count"`
	ProposerSlashingCount uint64  `db:"proposer_slashing_count"`
	BLSChangeCount        uint64  `db:"bls_change_count"`
	EthTransactionCount   uint64  `db:"eth_transaction_count"`
	SyncParticipation     float32 `db:"sync_participation"`
}

type ExplorerState

type ExplorerState struct {
	Key   string `db:"key"`
	Value string `db:"value"`
}

type Fork added in v1.11.0

type Fork struct {
	ForkId     uint64 `db:"fork_id"`
	BaseSlot   uint64 `db:"base_slot"`
	BaseRoot   []byte `db:"base_root"`
	LeafSlot   uint64 `db:"leaf_slot"`
	LeafRoot   []byte `db:"leaf_root"`
	ParentFork uint64 `db:"parent_fork"`
}

type IndexerForkState added in v1.11.0

type IndexerForkState struct {
	ForkId    uint64 `json:"fork_id"`
	Finalized uint64 `json:"finalized"`
}

type IndexerPruneState added in v1.11.0

type IndexerPruneState struct {
	Epoch uint64 `json:"epoch"`
}

type IndexerSyncState

type IndexerSyncState struct {
	Epoch uint64 `json:"epoch"`
}

type MevBlock

type MevBlock struct {
	SlotNumber     uint64 `db:"slot_number"`
	BlockHash      []byte `db:"block_hash"`
	BlockNumber    uint64 `db:"block_number"`
	BuilderPubkey  []byte `db:"builder_pubkey"`
	ProposerIndex  uint64 `db:"proposer_index"`
	Proposed       uint8  `db:"proposed"`
	SeenbyRelays   uint64 `db:"seenby_relays"`
	FeeRecipient   []byte `db:"fee_recipient"`
	TxCount        uint64 `db:"tx_count"`
	GasUsed        uint64 `db:"gas_used"`
	BlockValue     []byte `db:"block_value"`
	BlockValueGwei uint64 `db:"block_value_gwei"`
}

type MevBlockFilter

type MevBlockFilter struct {
	MinSlot       uint64
	MaxSlot       uint64
	MinIndex      uint64
	MaxIndex      uint64
	ProposerName  string
	BuilderPubkey []byte
	Proposed      []uint8
	MevRelay      []uint8
}

type OrphanedBlock

type OrphanedBlock struct {
	Root      []byte `db:"root"`
	HeaderVer uint64 `db:"header_ver"`
	HeaderSSZ []byte `db:"header_ssz"`
	BlockVer  uint64 `db:"block_ver"`
	BlockSSZ  []byte `db:"block_ssz"`
}

type SearchAheadEpochsResult

type SearchAheadEpochsResult []struct {
	Epoch uint64 `db:"epoch"`
}

type SearchAheadExecBlocksResult

type SearchAheadExecBlocksResult []struct {
	Slot       uint64     `db:"slot"`
	Root       []byte     `db:"root"`
	ExecHash   []byte     `db:"eth_block_hash"`
	ExecNumber uint64     `db:"eth_block_number"`
	Status     SlotStatus `db:"status"`
}

type SearchAheadGraffitiResult

type SearchAheadGraffitiResult []struct {
	Graffiti string `db:"graffiti"`
	Count    uint64 `db:"count"`
}

type SearchAheadSlotsResult

type SearchAheadSlotsResult []struct {
	Slot   uint64     `db:"slot"`
	Root   []byte     `db:"root"`
	Status SlotStatus `db:"status"`
}

type SearchAheadValidatorNameResult

type SearchAheadValidatorNameResult []struct {
	Name  string `db:"name"`
	Count uint64 `db:"count"`
}

type SearchBlockResult

type SearchBlockResult struct {
	Slot   uint64     `db:"slot"`
	Root   []byte     `db:"root"`
	Status SlotStatus `db:"status"`
}

type SearchGraffitiResult

type SearchGraffitiResult struct {
	Graffiti string `db:"graffiti"`
}

type SearchNameResult

type SearchNameResult struct {
	Name string `db:"name"`
}

type Slashing

type Slashing struct {
	SlotNumber     uint64         `db:"slot_number"`
	SlotIndex      uint64         `db:"slot_index"`
	SlotRoot       []byte         `db:"slot_root"`
	Orphaned       bool           `db:"orphaned"`
	ValidatorIndex uint64         `db:"validator"`
	SlasherIndex   uint64         `db:"slasher"`
	Reason         SlashingReason `db:"reason"`
	ForkId         uint64         `db:"fork_id"`
}

type SlashingFilter

type SlashingFilter struct {
	MinSlot       uint64
	MaxSlot       uint64
	MinIndex      uint64
	MaxIndex      uint64
	ValidatorName string
	SlasherName   string
	WithOrphaned  uint8
	WithReason    SlashingReason
}

type SlashingReason

type SlashingReason uint8
const (
	UnspecifiedSlashing SlashingReason = iota
	ProposerSlashing
	AttesterSlashing
)

type Slot

type Slot struct {
	Slot                  uint64     `db:"slot"`
	Proposer              uint64     `db:"proposer"`
	Status                SlotStatus `db:"status"`
	Root                  []byte     `db:"root"`
	ParentRoot            []byte     `db:"parent_root"`
	StateRoot             []byte     `db:"state_root"`
	Graffiti              []byte     `db:"graffiti"`
	GraffitiText          string     `db:"graffiti_text"`
	AttestationCount      uint64     `db:"attestation_count"`
	DepositCount          uint64     `db:"deposit_count"`
	ExitCount             uint64     `db:"exit_count"`
	WithdrawCount         uint64     `db:"withdraw_count"`
	WithdrawAmount        uint64     `db:"withdraw_amount"`
	AttesterSlashingCount uint64     `db:"attester_slashing_count"`
	ProposerSlashingCount uint64     `db:"proposer_slashing_count"`
	BLSChangeCount        uint64     `db:"bls_change_count"`
	EthTransactionCount   uint64     `db:"eth_transaction_count"`
	EthBlockNumber        *uint64    `db:"eth_block_number"`
	EthBlockHash          []byte     `db:"eth_block_hash"`
	EthBlockExtra         []byte     `db:"eth_block_extra"`
	EthBlockExtraText     string     `db:"eth_block_extra_text"`
	SyncParticipation     float32    `db:"sync_participation"`
	ForkId                uint64     `db:"fork_id"`
}

type SlotAssignment

type SlotAssignment struct {
	Slot     uint64 `db:"slot"`
	Proposer uint64 `db:"proposer"`
}

type SlotHeader

type SlotHeader struct {
	Slot     uint64     `db:"slot"`
	Proposer uint64     `db:"proposer"`
	Status   SlotStatus `db:"status"`
}

type SlotStatus

type SlotStatus uint8
const (
	Missing SlotStatus = iota
	Canonical
	Orphaned
)

type SyncAssignment

type SyncAssignment struct {
	Period    uint64 `db:"period"`
	Index     uint32 `db:"index"`
	Validator uint64 `db:"validator"`
}

type TxFunctionSignature

type TxFunctionSignature struct {
	Signature string `db:"signature"`
	Bytes     []byte `db:"bytes"`
	Name      string `db:"name"`
}

type TxPendingFunctionSignature

type TxPendingFunctionSignature struct {
	Bytes     []byte `db:"bytes"`
	QueueTime uint64 `db:"queuetime"`
}

type TxUnknownFunctionSignature

type TxUnknownFunctionSignature struct {
	Bytes     []byte `db:"bytes"`
	LastCheck uint64 `db:"lastcheck"`
}

type UnfinalizedBlock

type UnfinalizedBlock struct {
	Root      []byte                 `db:"root"`
	Slot      uint64                 `db:"slot"`
	HeaderVer uint64                 `db:"header_ver"`
	HeaderSSZ []byte                 `db:"header_ssz"`
	BlockVer  uint64                 `db:"block_ver"`
	BlockSSZ  []byte                 `db:"block_ssz"`
	Status    UnfinalizedBlockStatus `db:"status"`
	ForkId    uint64                 `db:"fork_id"`
}

type UnfinalizedBlockFilter added in v1.11.0

type UnfinalizedBlockFilter struct {
	MinSlot  uint64
	MaxSlot  uint64
	WithBody bool
}

type UnfinalizedBlockStatus added in v1.11.0

type UnfinalizedBlockStatus uint32
const (
	UnfinalizedBlockStatusUnprocessed UnfinalizedBlockStatus = iota
	UnfinalizedBlockStatusPruned
	UnfinalizedBlockStatusProcessed
)

type UnfinalizedDuty added in v1.11.0

type UnfinalizedDuty struct {
	Epoch         uint64 `db:"epoch"`
	DependentRoot []byte `db:"dependent_root"`
	DutiesSSZ     []byte `db:"duties"`
}

type UnfinalizedEpoch added in v1.11.0

type UnfinalizedEpoch struct {
	Epoch                 uint64  `db:"epoch"`
	DependentRoot         []byte  `db:"dependent_root"`
	EpochHeadRoot         []byte  `db:"epoch_head_root"`
	EpochHeadForkId       uint64  `db:"epoch_head_fork_id"`
	ValidatorCount        uint64  `db:"validator_count"`
	ValidatorBalance      uint64  `db:"validator_balance"`
	Eligible              uint64  `db:"eligible"`
	VotedTarget           uint64  `db:"voted_target"`
	VotedHead             uint64  `db:"voted_head"`
	VotedTotal            uint64  `db:"voted_total"`
	BlockCount            uint16  `db:"block_count"`
	OrphanedCount         uint16  `db:"orphaned_count"`
	AttestationCount      uint64  `db:"attestation_count"`
	DepositCount          uint64  `db:"deposit_count"`
	ExitCount             uint64  `db:"exit_count"`
	WithdrawCount         uint64  `db:"withdraw_count"`
	WithdrawAmount        uint64  `db:"withdraw_amount"`
	AttesterSlashingCount uint64  `db:"attester_slashing_count"`
	ProposerSlashingCount uint64  `db:"proposer_slashing_count"`
	BLSChangeCount        uint64  `db:"bls_change_count"`
	EthTransactionCount   uint64  `db:"eth_transaction_count"`
	SyncParticipation     float32 `db:"sync_participation"`
}

type ValidatorName

type ValidatorName struct {
	Index uint64 `db:"index"`
	Name  string `db:"name"`
}

type VoluntaryExit

type VoluntaryExit struct {
	SlotNumber     uint64 `db:"slot_number"`
	SlotIndex      uint64 `db:"slot_index"`
	SlotRoot       []byte `db:"slot_root"`
	Orphaned       bool   `db:"orphaned"`
	ValidatorIndex uint64 `db:"validator"`
	ForkId         uint64 `db:"fork_id"`
}

type VoluntaryExitFilter

type VoluntaryExitFilter struct {
	MinSlot       uint64
	MaxSlot       uint64
	MinIndex      uint64
	MaxIndex      uint64
	ValidatorName string
	WithOrphaned  uint8
}

type WithdrawalRequest added in v1.11.0

type WithdrawalRequest struct {
	SlotNumber      uint64  `db:"slot_number"`
	SlotRoot        []byte  `db:"slot_root"`
	SlotIndex       uint64  `db:"slot_index"`
	Orphaned        bool    `db:"orphaned"`
	ForkId          uint64  `db:"fork_id"`
	SourceAddress   []byte  `db:"source_address"`
	ValidatorIndex  *uint64 `db:"validator_index"`
	ValidatorPubkey []byte  `db:"validator_pubkey"`
	Amount          uint64  `db:"amount"`
	TxHash          []byte  `db:"tx_hash"`
	BlockNumber     uint64  `db:"block_number"`
}

type WithdrawalRequestFilter added in v1.11.0

type WithdrawalRequestFilter struct {
	MinSlot       uint64
	MaxSlot       uint64
	SourceAddress []byte
	MinIndex      uint64
	MaxIndex      uint64
	ValidatorName string
	MinAmount     *uint64
	MaxAmount     *uint64
	WithOrphaned  uint8
}

type WithdrawalRequestTx added in v1.12.1

type WithdrawalRequestTx struct {
	BlockNumber     uint64  `db:"block_number"`
	BlockIndex      uint64  `db:"block_index"`
	BlockTime       uint64  `db:"block_time"`
	BlockRoot       []byte  `db:"block_root"`
	ForkId          uint64  `db:"fork_id"`
	SourceAddress   []byte  `db:"source_address"`
	ValidatorPubkey []byte  `db:"validator_pubkey"`
	ValidatorIndex  *uint64 `db:"validator_index"`
	Amount          uint64  `db:"amount"`
	TxHash          []byte  `db:"tx_hash"`
	TxSender        []byte  `db:"tx_sender"`
	TxTarget        []byte  `db:"tx_target"`
	DequeueBlock    uint64  `db:"dequeue_block"`
}

type WithdrawalRequestTxFilter added in v1.12.1

type WithdrawalRequestTxFilter struct {
	MinDequeue    uint64
	MaxDequeue    uint64
	SourceAddress []byte
	MinIndex      uint64
	MaxIndex      uint64
	ValidatorName string
	MinAmount     *uint64
	MaxAmount     *uint64
	WithOrphaned  uint8
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL