-
-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add response headers to produceBlockV3 #6228
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## unstable #6228 +/- ##
============================================
+ Coverage 80.81% 80.83% +0.02%
============================================
Files 185 185
Lines 17964 17986 +22
Branches 1082 1082
============================================
+ Hits 14517 14539 +22
Misses 3421 3421
Partials 26 26 |
...serverRoutes.produceBlockV3, | ||
handler: async (req, res) => { | ||
const response = await api.produceBlockV3(...reqSerializers.produceBlockV3.parseReq(req)); | ||
void res.header("Eth-Consensus-Version", response.version); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want set other headers here as well? My guess is that most should get those from the json body anyways though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want set other headers here as well? My guess is that most should get those from the json body anyways though
I was trying to ask sproul if he needs the other headers but it doesn't seem like he needs them.
I guess it's easy enough to add the other headers. It doesn't hurt to add them now so might as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One optimization could be that you just look at the block value header and not even parse the body, might be what vouch is doing if it requests blocks from multiple bns
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Eth-Consensus-Version
header to produceBlockV3
🎉 This PR is included in v1.14.0 🎉 |
* Add `Eth-Consensus-Version` to produceBlockV3 * Lint * Lint * Add header
Motivation
Some tools (eg. blockdreamer) rely on
Eth-Consenus-Version
header fromproduceBlockV3
before further processing.Description
This is a temporary solution to add the 4 headers (
Eth-Consensus-Version
,Eth-Execution-Payload-Blinded
,Eth-Execution-Payload-Value
,Eth-Consensus-Block-Value
) forproduceBlockV3
according to the spec before a more permanent solution of returning api response headers is introduced.Closes #6202