-
Notifications
You must be signed in to change notification settings - Fork 177
/
Copy pathattester.yaml
71 lines (65 loc) · 2.55 KB
/
attester.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
post:
tags:
- ValidatorRequiredApi
- Validator
summary: "Get attester duties"
operationId: "getAttesterDuties"
description: "Requests the beacon node to provide a set of attestation duties,
which should be performed by validators, for a particular epoch.
Duties should only need to be checked once per epoch,
however a chain reorganization (of > MIN_SEED_LOOKAHEAD epochs) could occur,
resulting in a change of duties. For full safety, you should monitor head events and confirm the
dependent root in this response matches:
- event.previous_duty_dependent_root when `compute_epoch_at_slot(event.slot) == epoch`
- event.current_duty_dependent_root when `compute_epoch_at_slot(event.slot) + 1 == epoch`
- event.block otherwise
The dependent_root value is `get_block_root_at_slot(state, compute_start_slot_at_epoch(epoch - 1) - 1)`
or the genesis block root in the case of underflow."
parameters:
- name: epoch
description: "Should only be allowed 1 epoch ahead"
in: path
required: true
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/Uint64"
requestBody:
description: "An array of the validator indices for which to obtain the duties."
required: true
content:
application/json:
schema:
title: GetAttesterDutiesBody
type: array
minItems: 1
items:
$ref: '../../../beacon-node-oapi.yaml#/components/schemas/Uint64'
responses:
"200":
description: Success response
content:
application/json:
schema:
title: GetAttesterDutiesResponse
type: object
properties:
dependent_root:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/DependentRoot"
execution_optimistic:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic"
data:
type: array
items:
$ref: '../../../beacon-node-oapi.yaml#/components/schemas/AttesterDuty'
"400":
description: "Invalid epoch or index"
content:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 400
message: "Invalid epoch: -2"
"500":
$ref: '../../../beacon-node-oapi.yaml#/components/responses/InternalError'
"503":
$ref: '../../../beacon-node-oapi.yaml#/components/responses/CurrentlySyncing'