Skip to content

Instantly share code, notes, and snippets.

@adaszko
Created April 23, 2020 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adaszko/af8f55ba53a63f5860ae1879fe8a72f0 to your computer and use it in GitHub Desktop.
Save adaszko/af8f55ba53a63f5860ae1879fe8a72f0 to your computer and use it in GitHub Desktop.

This document lists differences between the current state of the Lighthouse ReST API and the minimal official Eth2 spec.

/beacon/genesis

  • Exists in Lighthouse at /beacon/state/genesis
  • Lighthouse response payload includes genesis_time in the body
  • Lighthouse response payload does not return the genesis_validators_root attribute, but instead, returns details about validators participating in the genesis ceremony.

GET /beacon/fork

  • Matches the spec up to some trivial restructuring of the response.

GET /beacon/fork/stream

  • Does not exist in Lighthouse yet (WIP).

GET /node/syncing

  • Exists in Lighthouse at /lighthouse/syncing endpoint
  • There's one attribute missing in the Lighthouse's response misses: highest_slot, otherwise just a matter of restructuring the JSON response silghtly.

GET /validator/{pubkey}

  • Exists in Lighthouse at /beacon/validators
  • pubkey argument is passed via request body in Lighthouse whereas in the spec, via HTTP path, otherwise atrributes match

GET /validator/duties/{epoch}/attester

  • Exists in Lighthouse at /validator/duties
  • Difference in passing epoch via path and the request body
  • Payload difference: validator_index vs committee_index

GET /validator/duties/{epoch}/proposer

  • Difference in passing epoch via path and the request body
  • The information is included in the `/validator/duties endpoint response in a slightly different form. Needs to be reshaped.

POST /validator/beacon_committe_subscriptions

Request body differences:

Spec:

[
  {
    "attestation_committee_index": "1213123123123123123123123122",
    "slot": "1213123123123123123123123122",
    "slot_signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
    "aggregator_pubkey": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc"
  }
]

Lighthouse:

[
    {
        validator_index:  10,
        attestation_committee_index: 12,
        slot: 3,
        is_aggregator: true
    }
]

GET /validator/aggregate_and_proof

  • It's described in the docs but I don't see it anywhere in the code. Looks like it's been removed in commit 65ae8fda47cc323d7ed591037e3968b97ee978ec.

POST /validator/aggregate_and_proof

  • Ditto

GET /validator/attestation

  • Lighthouse's implementation does not take into account validator's public key. Needs to be added AFACT.

POST /validator/attestation

  • Lighthouse's endpoint /validator/attestions accepts a signature. The spec does not as it's not required for the attestation to be signed. Needs to be removed.

GET /validator/block

  • The spec does not show what a valid response looks like.

POST /validator/block

  • The spec does not show what a valid request body looks like.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment