Documentation ¶
Overview ¶
Package bidcollect contains code for bid collection from various sources.
Index ¶
- Constants
- Variables
- type BidCollector
- type BidCollectorOpts
- type BidProcessor
- type BidProcessorOpts
- type CommonBid
- type DataAPIPoller
- type DataAPIPollerBidsMsg
- type DataAPIPollerOpts
- type GetHeaderPoller
- type GetHeaderPollerBidsMsg
- type GetHeaderPollerOpts
- type OutFiles
- type UltrasoundStreamBidsMsg
- type UltrasoundStreamConnection
- type UltrasoundStreamOpts
Constants ¶
View Source
const ( SourceTypeGetHeader = 0 SourceTypeDataAPI = 1 SourceTypeUltrasoundStream = 2 )
Variables ¶
View Source
var CommonBidCSVFields = []string{
"source_type",
"received_at_ms",
"timestamp_ms",
"slot",
"slot_t_ms",
"value",
"block_hash",
"parent_hash",
"builder_pubkey",
"block_number",
"block_fee_recipient",
"relay",
"proposer_pubkey",
"proposer_fee_recipient",
"optimistic_submission",
}
Functions ¶
This section is empty.
Types ¶
type BidCollector ¶
type BidCollector struct {
// contains filtered or unexported fields
}
func NewBidCollector ¶
func NewBidCollector(opts *BidCollectorOpts) *BidCollector
func (*BidCollector) MustStart ¶
func (c *BidCollector) MustStart()
type BidCollectorOpts ¶
type BidProcessor ¶
type BidProcessor struct {
// contains filtered or unexported fields
}
func NewBidProcessor ¶
func NewBidProcessor(opts *BidProcessorOpts) *BidProcessor
func (*BidProcessor) Start ¶
func (c *BidProcessor) Start()
type BidProcessorOpts ¶
type CommonBid ¶
type CommonBid struct { // Collector-internal fields SourceType int `json:"source_type"` ReceivedAtMs int64 `json:"received_at"` // Common fields Slot uint64 `json:"slot"` BlockNumber uint64 `json:"block_number"` BlockHash string `json:"block_hash"` ParentHash string `json:"parent_hash"` BuilderPubkey string `json:"builder_pubkey"` Value string `json:"value"` // Ultrasound top-bid stream - https://github.com/ultrasoundmoney/docs/blob/main/top-bid-websocket.md BlockFeeRecipient string `json:"block_fee_recipient"` // Data API // - Ultrasound: https://relay-analytics.ultrasound.money/relay/v1/data/bidtraces/builder_blocks_received?slot=9194844 // - Flashbots: https://boost-relay.flashbots.net/relay/v1/data/bidtraces/builder_blocks_received?slot=8969837 Relay string `json:"relay"` TimestampMs int64 `json:"timestamp_ms"` ProposerPubkey string `json:"proposer_pubkey"` ProposerFeeRecipient string `json:"proposer_fee_recipient"` OptimisticSubmission bool `json:"optimistic_submission"` }
func DataAPIToCommonBids ¶
func DataAPIToCommonBids(bids DataAPIPollerBidsMsg) []*CommonBid
func GetHeaderToCommonBid ¶
func GetHeaderToCommonBid(bid GetHeaderPollerBidsMsg) *CommonBid
func UltrasoundStreamToCommonBid ¶
func UltrasoundStreamToCommonBid(bid *UltrasoundStreamBidsMsg) *CommonBid
func (*CommonBid) ToCSVFields ¶
func (*CommonBid) ValueAsBigInt ¶
type DataAPIPoller ¶
type DataAPIPoller struct { Log *logrus.Entry BidC chan DataAPIPollerBidsMsg Relays []common.RelayEntry }
func NewDataAPIPoller ¶
func NewDataAPIPoller(opts *DataAPIPollerOpts) *DataAPIPoller
func (*DataAPIPoller) Start ¶
func (poller *DataAPIPoller) Start()
type DataAPIPollerBidsMsg ¶
type DataAPIPollerBidsMsg struct { Bids []relaycommon.BidTraceV2WithTimestampJSON Relay common.RelayEntry ReceivedAt time.Time }
type DataAPIPollerOpts ¶
type DataAPIPollerOpts struct { Log *logrus.Entry BidC chan DataAPIPollerBidsMsg Relays []common.RelayEntry }
type GetHeaderPoller ¶
type GetHeaderPoller struct {
// contains filtered or unexported fields
}
func NewGetHeaderPoller ¶
func NewGetHeaderPoller(opts *GetHeaderPollerOpts) *GetHeaderPoller
func (*GetHeaderPoller) Start ¶
func (poller *GetHeaderPoller) Start()
type GetHeaderPollerBidsMsg ¶
type GetHeaderPollerBidsMsg struct { Slot uint64 Bid types.GetHeaderResponse Relay common.RelayEntry ReceivedAt time.Time }
type GetHeaderPollerOpts ¶
type GetHeaderPollerOpts struct { Log *logrus.Entry BidC chan GetHeaderPollerBidsMsg BeaconURI string Relays []common.RelayEntry }
type UltrasoundStreamBidsMsg ¶
type UltrasoundStreamBidsMsg struct { Bid common.UltrasoundStreamBid Relay string ReceivedAt time.Time }
type UltrasoundStreamConnection ¶
type UltrasoundStreamConnection struct {
// contains filtered or unexported fields
}
func NewUltrasoundStreamConnection ¶
func NewUltrasoundStreamConnection(opts UltrasoundStreamOpts) *UltrasoundStreamConnection
func (*UltrasoundStreamConnection) Start ¶
func (ustream *UltrasoundStreamConnection) Start()
type UltrasoundStreamOpts ¶
type UltrasoundStreamOpts struct { Log *logrus.Entry BidC chan UltrasoundStreamBidsMsg }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.