|
| 1 | +get: |
| 2 | + tags: |
| 3 | + - ValidatorRequiredApi |
| 4 | + - Validator |
| 5 | + summary: "Get block proposers duties" |
| 6 | + operationId: "getProposerDutiesV2" |
| 7 | + description: "Request beacon node to provide all validators that are scheduled to propose a block in the given epoch. |
| 8 | +
|
| 9 | + Duties should only need to be checked once per epoch, |
| 10 | + however a chain reorganization could occur that results in a change of duties. For full safety, |
| 11 | + you should monitor head events and confirm the dependent root in this response matches. After Fulu, |
| 12 | + different checks need to be performed as the dependent root changes due to deterministic proposer lookahead. |
| 13 | +
|
| 14 | +
|
| 15 | + Before Fulu: |
| 16 | +
|
| 17 | + - event.current_duty_dependent_root when `compute_epoch_at_slot(event.slot) == epoch` |
| 18 | +
|
| 19 | + - event.block otherwise |
| 20 | +
|
| 21 | + - dependent_root value is `get_block_root_at_slot(state, compute_start_slot_at_epoch(epoch) - 1)` |
| 22 | +
|
| 23 | +
|
| 24 | + After Fulu: |
| 25 | +
|
| 26 | + - event.previous_duty_dependent_root when `compute_epoch_at_slot(event.slot) == epoch` |
| 27 | +
|
| 28 | + - event.block otherwise |
| 29 | +
|
| 30 | + - dependent_root value is `get_block_root_at_slot(state, compute_start_slot_at_epoch(epoch - 1) - 1)` |
| 31 | +
|
| 32 | +
|
| 33 | + The dependent_root value is the genesis block root in the case of underflow." |
| 34 | + parameters: |
| 35 | + - name: epoch |
| 36 | + in: path |
| 37 | + required: true |
| 38 | + schema: |
| 39 | + $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Uint64' |
| 40 | + responses: |
| 41 | + "200": |
| 42 | + description: Success response |
| 43 | + content: |
| 44 | + application/json: |
| 45 | + schema: |
| 46 | + title: GetProposerDutiesResponse |
| 47 | + type: object |
| 48 | + required: [dependent_root, execution_optimistic, data] |
| 49 | + properties: |
| 50 | + dependent_root: |
| 51 | + $ref: "../../../beacon-node-oapi.yaml#/components/schemas/DependentRoot" |
| 52 | + execution_optimistic: |
| 53 | + $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic" |
| 54 | + data: |
| 55 | + type: array |
| 56 | + items: |
| 57 | + $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ProposerDuty" |
| 58 | + "400": |
| 59 | + description: "Invalid epoch" |
| 60 | + content: |
| 61 | + application/json: |
| 62 | + schema: |
| 63 | + $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage" |
| 64 | + example: |
| 65 | + code: 400 |
| 66 | + message: "Invalid epoch: -2" |
| 67 | + "500": |
| 68 | + $ref: '../../../beacon-node-oapi.yaml#/components/responses/InternalError' |
| 69 | + "503": |
| 70 | + $ref: '../../../beacon-node-oapi.yaml#/components/responses/CurrentlySyncing' |
0 commit comments