Skip to content

Commit 6840596

Browse files
committed
Add schema for fcUV4
1 parent 3d695a3 commit 6840596

File tree

2 files changed

+86
-0
lines changed

2 files changed

+86
-0
lines changed

src/engine/openrpc/methods/forkchoice.yaml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,63 @@
153153
latestValidHash: '0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858'
154154
validationError: null
155155
payloadId: '0x0000000021f32cc1'
156+
- name: engine_forkchoiceUpdatedV4
157+
summary: Updates the forkchoice state
158+
externalDocs:
159+
description: Method specification
160+
url: https://github.com/ethereum/execution-apis/blob/main/src/engine/prague.md#engine_forkchoiceupdatedv4
161+
params:
162+
- name: Forkchoice state
163+
required: true
164+
schema:
165+
$ref: '#/components/schemas/ForkchoiceStateV1'
166+
- name: Payload attributes
167+
required: false
168+
schema:
169+
$ref: '#/components/schemas/PayloadAttributesV4'
170+
result:
171+
name: Response object
172+
schema:
173+
$ref: '#/components/schemas/ForkchoiceUpdatedResponseV1'
174+
errors:
175+
- code: -38002
176+
message: Invalid forkchoice state
177+
- code: -38003
178+
message: Invalid payload attributes
179+
- code: -32602
180+
message: Invalid params
181+
- code: -38005
182+
message: Unsupported fork
183+
examples:
184+
- name: engine_forkchoiceUpdatedV4 example
185+
params:
186+
- name: Forkchoice state
187+
value:
188+
headBlockHash: '0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858'
189+
safeBlockHash: '0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858'
190+
finalizedBlockHash: '0x3b8fb240d288781d4aac94d3fd16809ee413bc99294a085798a589dae51ddd4a'
191+
- name: Payload attributes
192+
value:
193+
timestamp: '0x64e7785b'
194+
prevRandao: '0xc130d5e63c61c935f6089e61140ca9136172677cf6aa5800dcc1cf0a02152a14'
195+
suggestedFeeRecipient: '0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b'
196+
withdrawals:
197+
- index: '0xf0'
198+
validatorIndex: '0xf0'
199+
address: '0x00000000000000000000000000000000000010f0'
200+
amount: '0x1'
201+
- index: '0xf1'
202+
validatorIndex: '0xf1'
203+
address: '0x00000000000000000000000000000000000010f1'
204+
amount: '0x1'
205+
parentBeaconBlockRoot: '0x11f780a954bcba8889998e4e61deaae6388dd2391e9c810bd9c94962cc1eadc1'
206+
targetBlobsPerBlock: '0x3'
207+
maxBlobsPerBlock: '0x6'
208+
result:
209+
name: Response object
210+
value:
211+
payloadStatus:
212+
status: VALID
213+
latestValidHash: '0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858'
214+
validationError: null
215+
payloadId: '0x0000000021f32cc1'

src/engine/openrpc/schemas/forkchoice.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,29 @@ PayloadAttributesV3:
8585
parentBeaconBlockRoot:
8686
title: Parent beacon block root
8787
$ref: '#/components/schemas/hash32'
88+
PayloadAttributesV4:
89+
title: Payload attributes object V4
90+
type: object
91+
required:
92+
- timestamp
93+
- prevRandao
94+
- suggestedFeeRecipient
95+
- withdrawals
96+
- parentBeaconBlockRoot
97+
- targetBlobsPerBlock
98+
- maxBlobsPerBlock
99+
properties:
100+
timestamp:
101+
$ref: '#/components/schemas/PayloadAttributesV3/properties/timestamp'
102+
prevRandao:
103+
$ref: '#/components/schemas/PayloadAttributesV3/properties/prevRandao'
104+
suggestedFeeRecipient:
105+
$ref: '#/components/schemas/PayloadAttributesV3/properties/suggestedFeeRecipient'
106+
withdrawals:
107+
$ref: '#/components/schemas/PayloadAttributesV3/properties/withdrawals'
108+
parentBeaconBlockRoot:
109+
$ref: '#/components/schemas/PayloadAttributesV3/properties/parentBeaconBlockRoot'
110+
targetBlobsPerBlock:
111+
$ref: '#/components/schemas/uint64'
112+
maxBlobsPerBlock:
113+
$ref: '#/components/schemas/uint64'

0 commit comments

Comments
 (0)