Skip to content

Commit 79c3997

Browse files
alextesjtraglia
andauthored
Remove deprecated HeaderStartTimeUnixMS (#749)
- Remove HeaderStartTimeUnixMS constant from constants.go - Remove HeaderStartTimeUnixMS from getHeader and processPayload methods - Fully transition to using HeaderDateMilliseconds for request timing Co-authored-by: Justin Traglia <[email protected]>
1 parent b047c49 commit 79c3997

File tree

4 files changed

+2
-7
lines changed

4 files changed

+2
-7
lines changed

server/constants.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@ const (
66
HeaderEthConsensusVersion = "Eth-Consensus-Version"
77
HeaderKeySlotUID = "X-MEVBoost-SlotID"
88
HeaderKeyVersion = "X-MEVBoost-Version"
9-
// Deprecated: replaced by HeaderDateMilliseconds below.
10-
HeaderStartTimeUnixMS = "X-MEVBoost-StartTimeUnixMS"
11-
HeaderUserAgent = "User-Agent"
9+
HeaderUserAgent = "User-Agent"
1210
// Header which communicates when a request was sent. Used to measure latency.
13-
// Replaces HeaderStartTimeUnixMS above which may be dropped in a future release.
1411
HeaderDateMilliseconds = "Date-Milliseconds"
1512

1613
MediaTypeJSON = "application/json"

server/get_header.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ func (m *BoostService) getHeader(log *logrus.Entry, slot phase0.Slot, pubkey, pa
8787
// Add header fields to this request
8888
req.Header.Set(HeaderAccept, proposerAcceptContentTypes)
8989
req.Header.Set(HeaderKeySlotUID, slotUID.String())
90-
req.Header.Set(HeaderStartTimeUnixMS, startTime)
9190
req.Header.Set(HeaderUserAgent, userAgent)
9291
req.Header.Set(HeaderDateMilliseconds, startTime)
9392

server/get_payload.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ func (m *BoostService) getPayload(log *logrus.Entry, signedBlindedBeaconBlockByt
175175
req.Header.Set(HeaderContentType, proposerContentType)
176176
req.Header.Set(HeaderEthConsensusVersion, proposerEthConsensusVersion)
177177
req.Header.Set(HeaderKeySlotUID, currentSlotUID)
178-
req.Header.Set(HeaderStartTimeUnixMS, fmt.Sprintf("%d", time.Now().UTC().UnixMilli()))
179178
req.Header.Set(HeaderDateMilliseconds, fmt.Sprintf("%d", time.Now().UTC().UnixMilli()))
180179
req.Header.Set(HeaderUserAgent, userAgent)
181180

server/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ func (m *BoostService) handleRegisterValidator(w http.ResponseWriter, req *http.
228228
// Additional header fields
229229
header := req.Header
230230
header.Set(HeaderUserAgent, wrapUserAgent(ua))
231-
header.Set(HeaderStartTimeUnixMS, fmt.Sprintf("%d", time.Now().UTC().UnixMilli()))
231+
header.Set(HeaderDateMilliseconds, fmt.Sprintf("%d", time.Now().UTC().UnixMilli()))
232232

233233
// Read the validator registrations
234234
regBytes, err := io.ReadAll(req.Body)

0 commit comments

Comments
 (0)