dspostgres

package
v0.4.16-aplha Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: AGPL-3.0 Imports: 7 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
}

func NewDatastore

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

func (*Datastore) GetBuilderBlockSubmissions

func (s *Datastore) GetBuilderBlockSubmissions(ctx context.Context, headSlot uint64, payload structs.SubmissionTraceQuery) (bts []structs.BidTraceWithTimestamp, err error)

func (*Datastore) GetDeliveredPayloads

func (s *Datastore) GetDeliveredPayloads(ctx context.Context, headSlot uint64, queryArgs structs.PayloadTraceQuery) (bts []structs.BidTraceExtended, err 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, ttl time.Duration) (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
}

Jump to

Keyboard shortcuts

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