dspostgres

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Emptybytes32 = [32]byte{}
	Emptybytes48 = [48]byte{}
)
View Source
var SlotsPerEpoch = 32

Functions

This section is empty.

Types

type Datastore

type Datastore struct {
	RelayID uint64
	DB      *sql.DB
	// contains filtered or unexported fields
}

func NewDatastore

func NewDatastore(l log.Logger, db *sql.DB, relayID uint64) *Datastore

func (*Datastore) AttachMetrics added in v0.6.0

func (s *Datastore) AttachMetrics(m *metrics.Metrics)

func (*Datastore) GetBuilderBlockSubmissions

func (s *Datastore) GetBuilderBlockSubmissions(ctx context.Context, w io.Writer, headSlot uint64, payload structs.SubmissionTraceQuery) error

func (*Datastore) GetDeliveredPayloads

func (s *Datastore) GetDeliveredPayloads(ctx context.Context, w io.Writer, headSlot uint64, queryArgs structs.PayloadTraceQuery) error

func (*Datastore) PutBuilderBlockSubmission

func (s *Datastore) PutBuilderBlockSubmission(ctx context.Context, bid structs.BidTraceWithTimestamp, isMostProfitable bool) (err error)

func (*Datastore) PutDelivered

func (s *Datastore) PutDelivered(ctx context.Context, slot structs.Slot, payload structs.DeliveredTrace) (err error)

type GetBuilderSubmissionsFilters

type GetBuilderSubmissionsFilters struct {
	Slot          uint64
	Limit         uint64
	BlockHash     string
	BlockNumber   uint64
	BuilderPubkey string
}

type GetDeliveredPayloadsFilters

type GetDeliveredPayloadsFilters struct {
	Slot           uint64
	Cursor         uint64
	Limit          uint64
	BlockHash      string
	BlockNumber    uint64
	ProposerPubkey string
	BuilderPubkey  string
	OrderByValue   int8
}

type PostgresMetrics added in v0.6.0

type PostgresMetrics struct {
	ErrorsCount *prometheus.CounterVec
}

Jump to

Keyboard shortcuts

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