Documentation ¶
Overview ¶
Package database exposes the postgres database
Index ¶
- Variables
- func BuilderSubmissionEntryToBidTraceV2WithTimestampJSON(payload *BuilderBlockSubmissionEntry) common.BidTraceV2WithTimestampJSON
- func DeliveredPayloadEntryToBidTraceV2JSON(payload *DeliveredPayloadEntry) common.BidTraceV2JSON
- func ExecutionPayloadEntryToExecutionPayload(executionPayloadEntry *ExecutionPayloadEntry) (payload *builderApi.VersionedSubmitBlindedBlockResponse, err error)
- func NewNullInt64(i int64) sql.NullInt64
- func NewNullString(s string) sql.NullString
- func NewNullTime(t time.Time) sql.NullTime
- type BlockBuilderEntry
- type BuilderBlockSubmissionEntry
- type BuilderDemotionEntry
- type DatabaseService
- func (s *DatabaseService) Close() error
- func (s *DatabaseService) DeleteExecutionPayloads(idFirst, idLast uint64) error
- func (s *DatabaseService) GetBlockBuilderByPubkey(pubkey string) (*BlockBuilderEntry, error)
- func (s *DatabaseService) GetBlockBuilders() ([]*BlockBuilderEntry, error)
- func (s *DatabaseService) GetBlockSubmissionEntry(slot uint64, proposerPubkey, blockHash string) (entry *BuilderBlockSubmissionEntry, err error)
- func (s *DatabaseService) GetBuilderDemotion(trace *common.BidTraceV2) (*BuilderDemotionEntry, error)
- func (s *DatabaseService) GetBuilderSubmissions(filters GetBuilderSubmissionsFilters) ([]*BuilderBlockSubmissionEntry, error)
- func (s *DatabaseService) GetBuilderSubmissionsBySlots(slotFrom, slotTo uint64) (entries []*BuilderBlockSubmissionEntry, err error)
- func (s *DatabaseService) GetDeliveredPayloads(idFirst, idLast uint64) (entries []*DeliveredPayloadEntry, err error)
- func (s *DatabaseService) GetExecutionPayloadEntryByID(executionPayloadID int64) (entry *ExecutionPayloadEntry, err error)
- func (s *DatabaseService) GetExecutionPayloadEntryBySlotPkHash(slot uint64, proposerPubkey, blockHash string) (entry *ExecutionPayloadEntry, err error)
- func (s *DatabaseService) GetExecutionPayloads(idFirst, idLast uint64) (entries []*ExecutionPayloadEntry, err error)
- func (s *DatabaseService) GetLatestValidatorRegistrations(timestampOnly bool) ([]*ValidatorRegistrationEntry, error)
- func (s *DatabaseService) GetNumDeliveredPayloads() (uint64, error)
- func (s *DatabaseService) GetRecentDeliveredPayloads(queryArgs GetPayloadsFilters) ([]*DeliveredPayloadEntry, error)
- func (s *DatabaseService) GetTooLateGetPayload(slot uint64) (entries []*TooLateGetPayloadEntry, err error)
- func (s *DatabaseService) GetValidatorRegistration(pubkey string) (*ValidatorRegistrationEntry, error)
- func (s *DatabaseService) GetValidatorRegistrationsForPubkeys(pubkeys []string) (entries []*ValidatorRegistrationEntry, err error)
- func (s *DatabaseService) IncBlockBuilderStatsAfterGetPayload(builderPubkey string) error
- func (s *DatabaseService) InsertBuilderDemotion(submitBlockRequest *common.VersionedSubmitBlockRequest, simError error) error
- func (s *DatabaseService) InsertTooLateGetPayload(slot uint64, proposerPubkey, blockHash string, ...) error
- func (s *DatabaseService) NumRegisteredValidators() (count uint64, err error)
- func (s *DatabaseService) NumValidatorRegistrationRows() (count uint64, err error)
- func (s *DatabaseService) SaveBuilderBlockSubmission(payload *common.VersionedSubmitBlockRequest, ...) (entry *BuilderBlockSubmissionEntry, err error)
- func (s *DatabaseService) SaveDeliveredPayload(bidTrace *common.BidTraceV2, ...) error
- func (s *DatabaseService) SaveValidatorRegistration(entry ValidatorRegistrationEntry) error
- func (s *DatabaseService) SetBlockBuilderCollateral(pubkey, builderID, collateral string) error
- func (s *DatabaseService) SetBlockBuilderIDStatusIsOptimistic(pubkey string, isOptimistic bool) error
- func (s *DatabaseService) SetBlockBuilderStatus(pubkey string, status common.BuilderStatus) error
- func (s *DatabaseService) UpdateBuilderDemotion(trace *common.BidTraceV2, signedBlock *common.VersionedSignedBlockRequest, ...) error
- func (s *DatabaseService) UpsertBlockBuilderEntryAfterSubmission(lastSubmission *BuilderBlockSubmissionEntry, isError bool) error
- type DeliveredPayloadEntry
- type ExecutionPayloadEntry
- type GetBuilderSubmissionsFilters
- type GetPayloadsFilters
- type IDatabaseService
- type MockDB
- func (db MockDB) DeleteExecutionPayloads(idFirst, idLast uint64) error
- func (db MockDB) GetBlockBuilderByPubkey(pubkey string) (*BlockBuilderEntry, error)
- func (db MockDB) GetBlockBuilders() ([]*BlockBuilderEntry, error)
- func (db MockDB) GetBlockSubmissionEntry(slot uint64, proposerPubkey, blockHash string) (entry *BuilderBlockSubmissionEntry, err error)
- func (db MockDB) GetBuilderDemotion(trace *common.BidTraceV2) (*BuilderDemotionEntry, error)
- func (db MockDB) GetBuilderSubmissions(filters GetBuilderSubmissionsFilters) ([]*BuilderBlockSubmissionEntry, error)
- func (db MockDB) GetBuilderSubmissionsBySlots(slotFrom, slotTo uint64) (entries []*BuilderBlockSubmissionEntry, err error)
- func (db MockDB) GetDeliveredPayloads(idFirst, idLast uint64) (entries []*DeliveredPayloadEntry, err error)
- func (db MockDB) GetExecutionPayloadEntryByID(executionPayloadID int64) (entry *ExecutionPayloadEntry, err error)
- func (db MockDB) GetExecutionPayloadEntryBySlotPkHash(slot uint64, proposerPubkey, blockHash string) (entry *ExecutionPayloadEntry, err error)
- func (db MockDB) GetExecutionPayloads(idFirst, idLast uint64) (entries []*ExecutionPayloadEntry, err error)
- func (db MockDB) GetLatestValidatorRegistrations(timestampOnly bool) ([]*ValidatorRegistrationEntry, error)
- func (db MockDB) GetNumDeliveredPayloads() (uint64, error)
- func (db MockDB) GetRecentDeliveredPayloads(filters GetPayloadsFilters) ([]*DeliveredPayloadEntry, error)
- func (db MockDB) GetTooLateGetPayload(slot uint64) (entries []*TooLateGetPayloadEntry, err error)
- func (db MockDB) GetValidatorRegistration(pubkey string) (*ValidatorRegistrationEntry, error)
- func (db MockDB) GetValidatorRegistrationsForPubkeys(pubkeys []string) (entries []*ValidatorRegistrationEntry, err error)
- func (db MockDB) IncBlockBuilderStatsAfterGetHeader(slot uint64, blockhash string) error
- func (db MockDB) IncBlockBuilderStatsAfterGetPayload(builderPubkey string) error
- func (db MockDB) InsertBuilderDemotion(submitBlockRequest *common.VersionedSubmitBlockRequest, simError error) error
- func (db MockDB) InsertTooLateGetPayload(slot uint64, proposerPubkey, blockHash string, ...) error
- func (db MockDB) NumRegisteredValidators() (count uint64, err error)
- func (db MockDB) SaveBuilderBlockSubmission(payload *common.VersionedSubmitBlockRequest, ...) (entry *BuilderBlockSubmissionEntry, err error)
- func (db MockDB) SaveDeliveredPayload(bidTrace *common.BidTraceV2, ...) error
- func (db MockDB) SaveValidatorRegistration(entry ValidatorRegistrationEntry) error
- func (db MockDB) SetBlockBuilderCollateral(pubkey, builderID, collateral string) error
- func (db MockDB) SetBlockBuilderIDStatusIsOptimistic(pubkey string, isOptimistic bool) error
- func (db MockDB) SetBlockBuilderStatus(pubkey string, status common.BuilderStatus) error
- func (db MockDB) UpdateBuilderDemotion(trace *common.BidTraceV2, signedBlock *common.VersionedSignedBlockRequest, ...) error
- func (db MockDB) UpsertBlockBuilderEntryAfterSubmission(lastSubmission *BuilderBlockSubmissionEntry, isError bool) error
- type TooLateGetPayloadEntry
- type ValidatorRegistrationEntry
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnsupportedExecutionPayload = errors.New("unsupported execution payload version")
View Source
var ExecutionPayloadEntryCSVHeader = []string{"id", "inserted_at", "slot", "proposer_pubkey", "block_hash", "version", "payload"}
Functions ¶
func BuilderSubmissionEntryToBidTraceV2WithTimestampJSON ¶ added in v0.10.0
func BuilderSubmissionEntryToBidTraceV2WithTimestampJSON(payload *BuilderBlockSubmissionEntry) common.BidTraceV2WithTimestampJSON
func DeliveredPayloadEntryToBidTraceV2JSON ¶ added in v0.10.0
func DeliveredPayloadEntryToBidTraceV2JSON(payload *DeliveredPayloadEntry) common.BidTraceV2JSON
func ExecutionPayloadEntryToExecutionPayload ¶ added in v0.26.0
func ExecutionPayloadEntryToExecutionPayload(executionPayloadEntry *ExecutionPayloadEntry) (payload *builderApi.VersionedSubmitBlindedBlockResponse, err error)
func NewNullInt64 ¶
func NewNullString ¶
func NewNullString(s string) sql.NullString
Types ¶
type BlockBuilderEntry ¶ added in v0.7.0
type BlockBuilderEntry struct { ID int64 `db:"id" json:"id"` InsertedAt time.Time `db:"inserted_at" json:"inserted_at"` BuilderPubkey string `db:"builder_pubkey" json:"builder_pubkey"` Description string `db:"description" json:"description"` IsHighPrio bool `db:"is_high_prio" json:"is_high_prio"` IsBlacklisted bool `db:"is_blacklisted" json:"is_blacklisted"` IsOptimistic bool `db:"is_optimistic" json:"is_optimistic"` Collateral string `db:"collateral" json:"collateral"` BuilderID string `db:"builder_id" json:"builder_id"` LastSubmissionID sql.NullInt64 `db:"last_submission_id" json:"last_submission_id"` LastSubmissionSlot uint64 `db:"last_submission_slot" json:"last_submission_slot"` NumSubmissionsTotal uint64 `db:"num_submissions_total" json:"num_submissions_total"` NumSubmissionsSimError uint64 `db:"num_submissions_simerror" json:"num_submissions_simerror"` NumSentGetPayload uint64 `db:"num_sent_getpayload" json:"num_sent_getpayload"` }
type BuilderBlockSubmissionEntry ¶
type BuilderBlockSubmissionEntry struct { ID int64 `db:"id"` InsertedAt time.Time `db:"inserted_at"` ReceivedAt sql.NullTime `db:"received_at"` EligibleAt sql.NullTime `db:"eligible_at"` // Delivered ExecutionPayload ExecutionPayloadID sql.NullInt64 `db:"execution_payload_id"` // Sim Result WasSimulated bool `db:"was_simulated"` SimSuccess bool `db:"sim_success"` SimError string `db:"sim_error"` SimReqError string `db:"sim_req_error"` // BidTrace data Signature string `db:"signature"` Slot uint64 `db:"slot"` ParentHash string `db:"parent_hash"` BlockHash string `db:"block_hash"` BuilderPubkey string `db:"builder_pubkey"` ProposerPubkey string `db:"proposer_pubkey"` ProposerFeeRecipient string `db:"proposer_fee_recipient"` GasUsed uint64 `db:"gas_used"` GasLimit uint64 `db:"gas_limit"` NumTx uint64 `db:"num_tx"` Value string `db:"value"` // Helpers Epoch uint64 `db:"epoch"` BlockNumber uint64 `db:"block_number"` // Profile data. DecodeDuration uint64 `db:"decode_duration"` PrechecksDuration uint64 `db:"prechecks_duration"` SimulationDuration uint64 `db:"simulation_duration"` RedisUpdateDuration uint64 `db:"redis_update_duration"` TotalDuration uint64 `db:"total_duration"` OptimisticSubmission bool `db:"optimistic_submission"` }
type BuilderDemotionEntry ¶ added in v0.24.0
type BuilderDemotionEntry struct { ID int64 `db:"id"` InsertedAt time.Time `db:"inserted_at"` SubmitBlockRequest sql.NullString `db:"submit_block_request"` SignedBeaconBlock sql.NullString `db:"signed_beacon_block"` SignedValidatorRegistration sql.NullString `db:"signed_validator_registration"` Slot uint64 `db:"slot"` Epoch uint64 `db:"epoch"` BuilderPubkey string `db:"builder_pubkey"` ProposerPubkey string `db:"proposer_pubkey"` Value string `db:"value"` FeeRecipient string `db:"fee_recipient"` BlockHash string `db:"block_hash"` SimError string `db:"sim_error"` }
type DatabaseService ¶
func NewDatabaseService ¶
func NewDatabaseService(dsn string) (*DatabaseService, error)
func (*DatabaseService) Close ¶
func (s *DatabaseService) Close() error
func (*DatabaseService) DeleteExecutionPayloads ¶ added in v0.11.0
func (s *DatabaseService) DeleteExecutionPayloads(idFirst, idLast uint64) error
func (*DatabaseService) GetBlockBuilderByPubkey ¶ added in v0.7.0
func (s *DatabaseService) GetBlockBuilderByPubkey(pubkey string) (*BlockBuilderEntry, error)
func (*DatabaseService) GetBlockBuilders ¶ added in v0.7.0
func (s *DatabaseService) GetBlockBuilders() ([]*BlockBuilderEntry, error)
func (*DatabaseService) GetBlockSubmissionEntry ¶
func (s *DatabaseService) GetBlockSubmissionEntry(slot uint64, proposerPubkey, blockHash string) (entry *BuilderBlockSubmissionEntry, err error)
func (*DatabaseService) GetBuilderDemotion ¶ added in v0.24.0
func (s *DatabaseService) GetBuilderDemotion(trace *common.BidTraceV2) (*BuilderDemotionEntry, error)
func (*DatabaseService) GetBuilderSubmissions ¶ added in v0.5.1
func (s *DatabaseService) GetBuilderSubmissions(filters GetBuilderSubmissionsFilters) ([]*BuilderBlockSubmissionEntry, error)
func (*DatabaseService) GetBuilderSubmissionsBySlots ¶ added in v0.14.0
func (s *DatabaseService) GetBuilderSubmissionsBySlots(slotFrom, slotTo uint64) (entries []*BuilderBlockSubmissionEntry, err error)
func (*DatabaseService) GetDeliveredPayloads ¶ added in v0.9.1
func (s *DatabaseService) GetDeliveredPayloads(idFirst, idLast uint64) (entries []*DeliveredPayloadEntry, err error)
func (*DatabaseService) GetExecutionPayloadEntryByID ¶
func (s *DatabaseService) GetExecutionPayloadEntryByID(executionPayloadID int64) (entry *ExecutionPayloadEntry, err error)
func (*DatabaseService) GetExecutionPayloadEntryBySlotPkHash ¶
func (s *DatabaseService) GetExecutionPayloadEntryBySlotPkHash(slot uint64, proposerPubkey, blockHash string) (entry *ExecutionPayloadEntry, err error)
func (*DatabaseService) GetExecutionPayloads ¶ added in v0.11.0
func (s *DatabaseService) GetExecutionPayloads(idFirst, idLast uint64) (entries []*ExecutionPayloadEntry, err error)
func (*DatabaseService) GetLatestValidatorRegistrations ¶ added in v0.9.1
func (s *DatabaseService) GetLatestValidatorRegistrations(timestampOnly bool) ([]*ValidatorRegistrationEntry, error)
func (*DatabaseService) GetNumDeliveredPayloads ¶
func (s *DatabaseService) GetNumDeliveredPayloads() (uint64, error)
func (*DatabaseService) GetRecentDeliveredPayloads ¶
func (s *DatabaseService) GetRecentDeliveredPayloads(queryArgs GetPayloadsFilters) ([]*DeliveredPayloadEntry, error)
func (*DatabaseService) GetTooLateGetPayload ¶ added in v0.20.0
func (s *DatabaseService) GetTooLateGetPayload(slot uint64) (entries []*TooLateGetPayloadEntry, err error)
func (*DatabaseService) GetValidatorRegistration ¶ added in v0.9.1
func (s *DatabaseService) GetValidatorRegistration(pubkey string) (*ValidatorRegistrationEntry, error)
func (*DatabaseService) GetValidatorRegistrationsForPubkeys ¶ added in v0.9.1
func (s *DatabaseService) GetValidatorRegistrationsForPubkeys(pubkeys []string) (entries []*ValidatorRegistrationEntry, err error)
func (*DatabaseService) IncBlockBuilderStatsAfterGetPayload ¶ added in v0.7.0
func (s *DatabaseService) IncBlockBuilderStatsAfterGetPayload(builderPubkey string) error
func (*DatabaseService) InsertBuilderDemotion ¶ added in v0.24.0
func (s *DatabaseService) InsertBuilderDemotion(submitBlockRequest *common.VersionedSubmitBlockRequest, simError error) error
func (*DatabaseService) InsertTooLateGetPayload ¶ added in v0.20.0
func (s *DatabaseService) InsertTooLateGetPayload(slot uint64, proposerPubkey, blockHash string, slotStart, requestTime, decodeTime, msIntoSlot uint64) error
func (*DatabaseService) NumRegisteredValidators ¶ added in v0.9.1
func (s *DatabaseService) NumRegisteredValidators() (count uint64, err error)
NumRegisteredValidators returns the number of unique pubkeys that have registered
func (*DatabaseService) NumValidatorRegistrationRows ¶ added in v0.9.1
func (s *DatabaseService) NumValidatorRegistrationRows() (count uint64, err error)
func (*DatabaseService) SaveBuilderBlockSubmission ¶
func (s *DatabaseService) SaveBuilderBlockSubmission(payload *common.VersionedSubmitBlockRequest, requestError, validationError error, receivedAt, eligibleAt time.Time, wasSimulated, saveExecPayload bool, profile common.Profile, optimisticSubmission bool) (entry *BuilderBlockSubmissionEntry, err error)
func (*DatabaseService) SaveDeliveredPayload ¶
func (s *DatabaseService) SaveDeliveredPayload(bidTrace *common.BidTraceV2, signedBlindedBeaconBlock *common.VersionedSignedBlindedBlockRequest, signedAt time.Time, publishMs uint64) error
func (*DatabaseService) SaveValidatorRegistration ¶
func (s *DatabaseService) SaveValidatorRegistration(entry ValidatorRegistrationEntry) error
func (*DatabaseService) SetBlockBuilderCollateral ¶ added in v0.24.0
func (s *DatabaseService) SetBlockBuilderCollateral(pubkey, builderID, collateral string) error
func (*DatabaseService) SetBlockBuilderIDStatusIsOptimistic ¶ added in v0.24.0
func (s *DatabaseService) SetBlockBuilderIDStatusIsOptimistic(pubkey string, isOptimistic bool) error
func (*DatabaseService) SetBlockBuilderStatus ¶ added in v0.7.0
func (s *DatabaseService) SetBlockBuilderStatus(pubkey string, status common.BuilderStatus) error
func (*DatabaseService) UpdateBuilderDemotion ¶ added in v0.24.0
func (s *DatabaseService) UpdateBuilderDemotion(trace *common.BidTraceV2, signedBlock *common.VersionedSignedBlockRequest, signedRegistration *builderApiV1.SignedValidatorRegistration) error
func (*DatabaseService) UpsertBlockBuilderEntryAfterSubmission ¶ added in v0.7.0
func (s *DatabaseService) UpsertBlockBuilderEntryAfterSubmission(lastSubmission *BuilderBlockSubmissionEntry, isError bool) error
type DeliveredPayloadEntry ¶
type DeliveredPayloadEntry struct { ID int64 `db:"id"` InsertedAt time.Time `db:"inserted_at"` SignedAt sql.NullTime `db:"signed_at"` SignedBlindedBeaconBlock sql.NullString `db:"signed_blinded_beacon_block"` Slot uint64 `db:"slot"` Epoch uint64 `db:"epoch"` BuilderPubkey string `db:"builder_pubkey"` ProposerPubkey string `db:"proposer_pubkey"` ProposerFeeRecipient string `db:"proposer_fee_recipient"` ParentHash string `db:"parent_hash"` BlockHash string `db:"block_hash"` BlockNumber uint64 `db:"block_number"` GasUsed uint64 `db:"gas_used"` GasLimit uint64 `db:"gas_limit"` NumTx uint64 `db:"num_tx"` Value string `db:"value"` PublishMs uint64 `db:"publish_ms"` }
type ExecutionPayloadEntry ¶
type ExecutionPayloadEntry struct { ID int64 `db:"id"` InsertedAt time.Time `db:"inserted_at"` Slot uint64 `db:"slot"` ProposerPubkey string `db:"proposer_pubkey"` BlockHash string `db:"block_hash"` Version string `db:"version"` Payload string `db:"payload"` }
func PayloadToExecPayloadEntry ¶
func PayloadToExecPayloadEntry(payload *common.VersionedSubmitBlockRequest) (*ExecutionPayloadEntry, error)
func (*ExecutionPayloadEntry) ToCSVRecord ¶ added in v0.11.0
func (e *ExecutionPayloadEntry) ToCSVRecord() []string
type GetBuilderSubmissionsFilters ¶ added in v0.5.1
type GetPayloadsFilters ¶
type IDatabaseService ¶
type IDatabaseService interface { NumRegisteredValidators() (count uint64, err error) SaveValidatorRegistration(entry ValidatorRegistrationEntry) error GetLatestValidatorRegistrations(timestampOnly bool) ([]*ValidatorRegistrationEntry, error) GetValidatorRegistration(pubkey string) (*ValidatorRegistrationEntry, error) GetValidatorRegistrationsForPubkeys(pubkeys []string) ([]*ValidatorRegistrationEntry, error) SaveBuilderBlockSubmission(payload *common.VersionedSubmitBlockRequest, requestError, validationError error, receivedAt, eligibleAt time.Time, wasSimulated, saveExecPayload bool, profile common.Profile, optimisticSubmission bool) (entry *BuilderBlockSubmissionEntry, err error) GetBlockSubmissionEntry(slot uint64, proposerPubkey, blockHash string) (entry *BuilderBlockSubmissionEntry, err error) GetBuilderSubmissions(filters GetBuilderSubmissionsFilters) ([]*BuilderBlockSubmissionEntry, error) GetBuilderSubmissionsBySlots(slotFrom, slotTo uint64) (entries []*BuilderBlockSubmissionEntry, err error) GetExecutionPayloadEntryByID(executionPayloadID int64) (entry *ExecutionPayloadEntry, err error) GetExecutionPayloadEntryBySlotPkHash(slot uint64, proposerPubkey, blockHash string) (entry *ExecutionPayloadEntry, err error) GetExecutionPayloads(idFirst, idLast uint64) (entries []*ExecutionPayloadEntry, err error) DeleteExecutionPayloads(idFirst, idLast uint64) error SaveDeliveredPayload(bidTrace *common.BidTraceV2, signedBlindedBeaconBlock *common.VersionedSignedBlindedBlockRequest, signedAt time.Time, publishMs uint64) error GetNumDeliveredPayloads() (uint64, error) GetRecentDeliveredPayloads(filters GetPayloadsFilters) ([]*DeliveredPayloadEntry, error) GetDeliveredPayloads(idFirst, idLast uint64) (entries []*DeliveredPayloadEntry, err error) GetBlockBuilders() ([]*BlockBuilderEntry, error) GetBlockBuilderByPubkey(pubkey string) (*BlockBuilderEntry, error) SetBlockBuilderStatus(pubkey string, status common.BuilderStatus) error SetBlockBuilderIDStatusIsOptimistic(pubkey string, isOptimistic bool) error SetBlockBuilderCollateral(pubkey, builderID, collateral string) error UpsertBlockBuilderEntryAfterSubmission(lastSubmission *BuilderBlockSubmissionEntry, isError bool) error IncBlockBuilderStatsAfterGetPayload(builderPubkey string) error InsertBuilderDemotion(submitBlockRequest *common.VersionedSubmitBlockRequest, simError error) error UpdateBuilderDemotion(trace *common.BidTraceV2, signedBlock *common.VersionedSignedBlockRequest, signedRegistration *builderApiV1.SignedValidatorRegistration) error GetBuilderDemotion(trace *common.BidTraceV2) (*BuilderDemotionEntry, error) GetTooLateGetPayload(slot uint64) (entries []*TooLateGetPayloadEntry, err error) InsertTooLateGetPayload(slot uint64, proposerPubkey, blockHash string, slotStart, requestTime, decodeTime, msIntoSlot uint64) error }
type MockDB ¶
type MockDB struct { ExecPayloads map[string]*ExecutionPayloadEntry Builders map[string]*BlockBuilderEntry Demotions map[string]bool Refunds map[string]bool }
func (MockDB) DeleteExecutionPayloads ¶ added in v0.11.0
func (MockDB) GetBlockBuilderByPubkey ¶ added in v0.7.0
func (db MockDB) GetBlockBuilderByPubkey(pubkey string) (*BlockBuilderEntry, error)
func (MockDB) GetBlockBuilders ¶ added in v0.7.0
func (db MockDB) GetBlockBuilders() ([]*BlockBuilderEntry, error)
func (MockDB) GetBlockSubmissionEntry ¶
func (db MockDB) GetBlockSubmissionEntry(slot uint64, proposerPubkey, blockHash string) (entry *BuilderBlockSubmissionEntry, err error)
func (MockDB) GetBuilderDemotion ¶ added in v0.24.0
func (db MockDB) GetBuilderDemotion(trace *common.BidTraceV2) (*BuilderDemotionEntry, error)
func (MockDB) GetBuilderSubmissions ¶ added in v0.5.1
func (db MockDB) GetBuilderSubmissions(filters GetBuilderSubmissionsFilters) ([]*BuilderBlockSubmissionEntry, error)
func (MockDB) GetBuilderSubmissionsBySlots ¶ added in v0.14.0
func (db MockDB) GetBuilderSubmissionsBySlots(slotFrom, slotTo uint64) (entries []*BuilderBlockSubmissionEntry, err error)
func (MockDB) GetDeliveredPayloads ¶ added in v0.9.1
func (db MockDB) GetDeliveredPayloads(idFirst, idLast uint64) (entries []*DeliveredPayloadEntry, err error)
func (MockDB) GetExecutionPayloadEntryByID ¶
func (db MockDB) GetExecutionPayloadEntryByID(executionPayloadID int64) (entry *ExecutionPayloadEntry, err error)
func (MockDB) GetExecutionPayloadEntryBySlotPkHash ¶
func (db MockDB) GetExecutionPayloadEntryBySlotPkHash(slot uint64, proposerPubkey, blockHash string) (entry *ExecutionPayloadEntry, err error)
func (MockDB) GetExecutionPayloads ¶ added in v0.11.0
func (db MockDB) GetExecutionPayloads(idFirst, idLast uint64) (entries []*ExecutionPayloadEntry, err error)
func (MockDB) GetLatestValidatorRegistrations ¶ added in v0.9.1
func (db MockDB) GetLatestValidatorRegistrations(timestampOnly bool) ([]*ValidatorRegistrationEntry, error)
func (MockDB) GetNumDeliveredPayloads ¶
func (MockDB) GetRecentDeliveredPayloads ¶
func (db MockDB) GetRecentDeliveredPayloads(filters GetPayloadsFilters) ([]*DeliveredPayloadEntry, error)
func (MockDB) GetTooLateGetPayload ¶ added in v0.20.0
func (db MockDB) GetTooLateGetPayload(slot uint64) (entries []*TooLateGetPayloadEntry, err error)
func (MockDB) GetValidatorRegistration ¶ added in v0.9.1
func (db MockDB) GetValidatorRegistration(pubkey string) (*ValidatorRegistrationEntry, error)
func (MockDB) GetValidatorRegistrationsForPubkeys ¶ added in v0.9.1
func (db MockDB) GetValidatorRegistrationsForPubkeys(pubkeys []string) (entries []*ValidatorRegistrationEntry, err error)
func (MockDB) IncBlockBuilderStatsAfterGetHeader ¶ added in v0.7.0
func (MockDB) IncBlockBuilderStatsAfterGetPayload ¶ added in v0.7.0
func (MockDB) InsertBuilderDemotion ¶ added in v0.24.0
func (db MockDB) InsertBuilderDemotion(submitBlockRequest *common.VersionedSubmitBlockRequest, simError error) error
func (MockDB) InsertTooLateGetPayload ¶ added in v0.20.0
func (MockDB) NumRegisteredValidators ¶ added in v0.9.1
func (MockDB) SaveBuilderBlockSubmission ¶
func (MockDB) SaveDeliveredPayload ¶
func (db MockDB) SaveDeliveredPayload(bidTrace *common.BidTraceV2, signedBlindedBeaconBlock *common.VersionedSignedBlindedBlockRequest, signedAt time.Time, publishMs uint64) error
func (MockDB) SaveValidatorRegistration ¶
func (db MockDB) SaveValidatorRegistration(entry ValidatorRegistrationEntry) error
func (MockDB) SetBlockBuilderCollateral ¶ added in v0.24.0
func (MockDB) SetBlockBuilderIDStatusIsOptimistic ¶ added in v0.24.0
func (MockDB) SetBlockBuilderStatus ¶ added in v0.7.0
func (db MockDB) SetBlockBuilderStatus(pubkey string, status common.BuilderStatus) error
func (MockDB) UpdateBuilderDemotion ¶ added in v0.24.0
func (db MockDB) UpdateBuilderDemotion(trace *common.BidTraceV2, signedBlock *common.VersionedSignedBlockRequest, signedRegistration *builderApiV1.SignedValidatorRegistration) error
func (MockDB) UpsertBlockBuilderEntryAfterSubmission ¶ added in v0.7.0
func (db MockDB) UpsertBlockBuilderEntryAfterSubmission(lastSubmission *BuilderBlockSubmissionEntry, isError bool) error
type TooLateGetPayloadEntry ¶ added in v0.20.0
type TooLateGetPayloadEntry struct { ID int64 `db:"id"` InsertedAt time.Time `db:"inserted_at"` Slot uint64 `db:"slot"` SlotStartTimestamp uint64 `db:"slot_start_timestamp"` RequestTimestamp uint64 `db:"request_timestamp"` DecodeTimestamp uint64 `db:"decode_timestamp"` ProposerPubkey string `db:"proposer_pubkey"` BlockHash string `db:"block_hash"` MsIntoSlot uint64 `db:"ms_into_slot"` }
type ValidatorRegistrationEntry ¶
type ValidatorRegistrationEntry struct { ID int64 `db:"id"` InsertedAt time.Time `db:"inserted_at"` Pubkey string `db:"pubkey"` FeeRecipient string `db:"fee_recipient"` Timestamp uint64 `db:"timestamp"` GasLimit uint64 `db:"gas_limit"` Signature string `db:"signature"` }
func SignedValidatorRegistrationToEntry ¶ added in v0.9.1
func SignedValidatorRegistrationToEntry(valReg builderApiV1.SignedValidatorRegistration) ValidatorRegistrationEntry
func (ValidatorRegistrationEntry) ToSignedValidatorRegistration ¶ added in v0.9.1
func (reg ValidatorRegistrationEntry) ToSignedValidatorRegistration() (*builderApiV1.SignedValidatorRegistration, error)
Directories ¶
Path | Synopsis |
---|---|
Package migrations contains all the migration files
|
Package migrations contains all the migration files |
Package vars contains the database variables such as dynamic table names
|
Package vars contains the database variables such as dynamic table names |
Click to show internal directories.
Click to hide internal directories.