/eth/v1/validator/duties/attester/{epoch}

Get attester duties

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

NameRequiredTypeDetail
epochString (Query)Should only be allowed 1 epoch ahead

POST JSON Body

KeyRequiredTypeDetail
StringAn array of the validator indices for which to obtain the duties. Please see examples

Result

Return a set of attestation duties

Example

Request

curl -X POST <your-endpoint>/eth/v1/validator/duties/attester/1 \
--header 'Content-Type: application/json' \
--data-raw '[
  "1"
]'

Return

On success

{
    "dependent_root": "0x24df3795eaf885b5b128cd451cb98140aa9cc635af053f92440c48d86ba198f5",
    "data": [
        {
            "pubkey": "0xa1d1ad0714035353258038e964ae9675dc0252ee22cea896825c01458e1807bfad2f9969338798548d9858a571f7425c",
            "validator_index": "1",
            "committee_index": "26",
            "committee_length": "195",
            "committees_at_slot": "64",
            "validator_committee_index": "128",
            "slot": "3949203"
        }
    ],
    "execution_optimistic": false
}