Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
metachris committed Jun 13, 2024
1 parent ca70bc0 commit f76ce05
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
11 changes: 5 additions & 6 deletions docs/2024-06_bidcollect.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@ Relayscan.io collects a full, public archive of bids across [relays](../vars/rel

---

### Bids source types

0. [getHeader polling](https://ethereum.github.io/builder-specs/#/Builder/getHeader)
1. [Data API polling](https://flashbots.github.io/relay-specs/#/Data/getReceivedBids)
2. [Ultrasound top-bid websocket stream](https://github.com/ultrasoundmoney/docs/blob/main/top-bid-websocket.md)

### Output

For every day, there are two CSV files:
1. All bids
2. Top bids only

### Bids source types

- `0`: [getHeader polling](https://ethereum.github.io/builder-specs/#/Builder/getHeader)
- `1`: [Data API polling](https://flashbots.github.io/relay-specs/#/Data/getReceivedBids)
- `2`: [Ultrasound top-bid websocket stream](https://github.com/ultrasoundmoney/docs/blob/main/top-bid-websocket.md)

### Collected fields

Expand Down
7 changes: 6 additions & 1 deletion services/bidcollect/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ func (bid *CommonBid) ToCSVFields() []string {
bidIntoSlotTmsString = fmt.Sprint(bitIntoSlotTms)
}

bidIsOptimisticString := ""
if bid.SourceType == SourceTypeDataAPI {
bidIsOptimisticString = boolToString(bid.OptimisticSubmission)
}

return []string{
// Collector-internal fields
fmt.Sprint(bid.SourceType),
Expand All @@ -105,7 +110,7 @@ func (bid *CommonBid) ToCSVFields() []string {
// Data API
bid.ProposerPubkey,
bid.ProposerFeeRecipient,
boolToString(bid.OptimisticSubmission),
bidIsOptimisticString,
}
}

Expand Down

0 comments on commit f76ce05

Please sign in to comment.