Skip to content

Commit 147b14d

Browse files
committed
Request SSZ encoding for getHeader response (with Accept header)
1 parent b66471c commit 147b14d

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

apis/builder/blinded_blocks.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ post:
99
1010
If the builder is not able to unblind the corresponding
1111
`ExecutionPayloadHeader`, it must error.
12+
13+
The request body can be encoded as JSON (application/json) or SSZ (application/octet-stream).
14+
Note: SSZ support can be determined by requesting an SSZ encoded response in the `getHeader`
15+
request.
1216
tags:
1317
- Builder
1418
requestBody:
@@ -22,6 +26,8 @@ post:
2226
examples:
2327
bellatrix:
2428
$ref: "../../builder-oapi.yaml#/components/examples/Bellatrix.SignedBlindedBeaconBlock"
29+
application/octet-stream:
30+
examples:
2531

2632
responses:
2733
"200":
@@ -42,6 +48,12 @@ post:
4248
examples:
4349
bellatrix:
4450
$ref: "../../builder-oapi.yaml#/components/examples/Bellatrix.ExecutionPayload"
51+
application/octet-stream:
52+
schema:
53+
title: SubmitBlindedBlockResponse
54+
type: string
55+
format: binary
56+
description: SSZ encoded SubmitBlindedBlockResponse
4557
"400":
4658
description: Error response.
4759
content:

apis/builder/header.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ get:
1818
builder must return a header that moves `gas_limit` the maximum amount
1919
allowed under the rules of consensus (currently `parent.gas_limit +/-
2020
parent.gas_limit / 1024`).
21+
22+
A SSZ encoded response can be requested using the `Accept` request header:
23+
`Accept: application/octet-stream`.
2124
tags:
2225
- Builder
2326
parameters:
@@ -39,6 +42,12 @@ get:
3942
description: The validator's BLS public key.
4043
schema:
4144
$ref: "../../builder-oapi.yaml#/components/schemas/Pubkey"
45+
- name: accept
46+
in: header
47+
type: string
48+
description: "requested encoding: `application/octet-stream` (SSZ), `application/json`, or a combination."
49+
example: "application/octet-stream;q=1,application/json;q=0.9"
50+
required: false
4251
responses:
4352
"200":
4453
description: Success response.
@@ -58,6 +67,13 @@ get:
5867
examples:
5968
bellatrix:
6069
$ref: "../../builder-oapi.yaml#/components/examples/Bellatrix.SignedBuilderBid"
70+
application/octet-stream:
71+
schema:
72+
title: GetHeaderResponse
73+
type: string
74+
format: binary
75+
description: SSZ encoded GetHeaderResponse
76+
6177
"204":
6278
description: No header is available.
6379
"400":

0 commit comments

Comments
 (0)