Skip to content

sync_committee_subscriptions endpoint does not follow standard #2582

@mcdee

Description

@mcdee

Description

The /eth/v1/validator/sync_committee_subscriptions endpoint expects unquoted integers for the validator_index and sync_committee_indices fields, whereas the standard states these should be quoted.

Version

Lighthouse v1.5.2-rc.0-ddbd4e6
BLS library: blst-modern
SHA256 hardware acceleration: true
Specs: mainnet (true), minimal (false)

Present Behaviour

The following request against a prater node:

curl -H 'Content-type: application/json' --data '[{"validator_index":"203963","sync_committee_indices":["474"],"until_epoch":"38656"}]' http://beacon-d02.attestant.io:5052/eth/v1/validator/sync_committee_subscriptions

returns the following:

{"code":400,"message":"BAD_REQUEST: body deserialize error: Request body deserialize error: invalid type: string \"203963\", expected u64 at line 1 column 28","stacktraces":[]}

Note that if the validator_index field is unquoted the error changes to:

{"code":400,"message":"BAD_REQUEST: body deserialize error: Request body deserialize error: invalid type: string \"474\", expected u64 at line 1 column 58","stacktraces":[]}

so the API currently expects both validator_index and sync_committee_indices to be unquoted.

Expected Behaviour

The API should accept quoted integers as per the standard.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions