Skip to content

Conversation

@mempirate
Copy link
Contributor

Adds the option to extract the X-BuilderNet-SentAtUs header to the Go proxy. Allows 2 connected proxies to establish some latency stats on exchanged messages, which is useful in benchmarking.

@metachris metachris requested a review from Copilot October 7, 2025 09:14
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds support for extracting the X-BuilderNet-SentAtUs header to enable latency statistics between connected proxies for benchmarking purposes.

  • Introduces header extraction configuration and parsing logic for microsecond timestamps
  • Adds context storage and accessor function for the parsed timestamp
  • Refactors hardcoded header names to use constants for better maintainability

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +319 to +320
}
}
Copy link

Copilot AI Oct 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The header parsing silently ignores errors when the timestamp is invalid or missing. Consider logging invalid header values for debugging purposes, as this could help identify issues during benchmarking.

Suggested change
}
}
} else {
slog.Warn("Invalid or missing builderNetSentAtHeader value", "header", builderNetSentAtHeader, "value", builderNetSentAt, "error", err)
}

Copilot uses AI. Check for mistakes.
@metachris metachris merged commit d57b32b into flashbots:main Oct 7, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants