Skip to content

Commit

Permalink
getPayload request to all relays (flashbots#531)
Browse files Browse the repository at this point in the history
  • Loading branch information
metachris authored Jun 17, 2023
1 parent d9f54e1 commit 2ee8c41
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions server/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -647,12 +647,6 @@ func (m *BoostService) processCapellaPayload(w http.ResponseWriter, req *http.Re
// send bid and signed block to relay monitor with capella payload
// go m.sendAuctionTranscriptToRelayMonitors(&AuctionTranscript{Bid: originalBid.response.Data, Acceptance: payload})

relays := originalBid.relays
if len(relays) == 0 {
log.Warn("originating relay not found, sending getPayload request to all relays")
relays = m.relays
}

// Get the uid for this slot
uid := ""
m.slotUIDLock.Lock()
Expand All @@ -675,7 +669,7 @@ func (m *BoostService) processCapellaPayload(w http.ResponseWriter, req *http.Re
requestCtx, requestCtxCancel := context.WithCancel(context.Background())
defer requestCtxCancel()

for _, relay := range relays {
for _, relay := range m.relays {
wg.Add(1)
go func(relay RelayEntry) {
defer wg.Done()
Expand Down Expand Up @@ -739,7 +733,7 @@ func (m *BoostService) processCapellaPayload(w http.ResponseWriter, req *http.Re
// If no payload has been received from relay, log loudly about withholding!
if result.Capella == nil || types.Hash(result.Capella.BlockHash) == nilHash {
originRelays := RelayEntriesToStrings(originalBid.relays)
log.WithField("relays", strings.Join(originRelays, ", ")).Error("no payload received from relay!")
log.WithField("relaysWithBid", strings.Join(originRelays, ", ")).Error("no payload received from relay!")
m.respondError(w, http.StatusBadGateway, errNoSuccessfulRelayResponse.Error())
return
}
Expand Down

0 comments on commit 2ee8c41

Please sign in to comment.