From dff3e50b9e9dea17de10471bf7840bab0387c379 Mon Sep 17 00:00:00 2001 From: Paul Harris Date: Tue, 11 Jan 2022 08:29:28 +1000 Subject: [PATCH] Clarify validator id as any bytes48 Validator ID in a query parameter should not be required to be on the g2 curve to be valid, any bytes48 should be allowed to be queried on. Reading in any bytes48 without validating against the g2 curve will reduce overheads of parsing large lists, and given that valid missing keys are just not returned, there are no real negatives to querying a key that will definitely be missing. fixes #183 --- apis/beacon/states/validator.yaml | 2 +- apis/beacon/states/validator_balances.yaml | 4 ++-- apis/beacon/states/validators.yaml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apis/beacon/states/validator.yaml b/apis/beacon/states/validator.yaml index 1cd6b70d..8f4900ab 100644 --- a/apis/beacon/states/validator.yaml +++ b/apis/beacon/states/validator.yaml @@ -10,7 +10,7 @@ get: in: path $ref: '../../../beacon-node-oapi.yaml#/components/parameters/StateId' - name: validator_id - description: "Either hex encoded public key (with 0x prefix) or validator index" + description: "Either hex encoded public key (any bytes48 with 0x prefix) or validator index" in: path required: true schema: diff --git a/apis/beacon/states/validator_balances.yaml b/apis/beacon/states/validator_balances.yaml index 62775f68..88897408 100644 --- a/apis/beacon/states/validator_balances.yaml +++ b/apis/beacon/states/validator_balances.yaml @@ -15,7 +15,7 @@ get: in: path $ref: '../../../beacon-node-oapi.yaml#/components/parameters/StateId' - name: id - description: "Either hex encoded public key (with 0x prefix) or validator index" + description: "Either hex encoded public key (any bytes48 with 0x prefix) or validator index" in: query required: false schema: @@ -23,7 +23,7 @@ get: maxItems: 30 uniqueItems: true items: - description: "Either hex encoded public key (with 0x prefix) or validator index" + description: "Either hex encoded public key (any bytes48 with 0x prefix) or validator index" type: string responses: diff --git a/apis/beacon/states/validators.yaml b/apis/beacon/states/validators.yaml index abdc4ed4..888dea9d 100644 --- a/apis/beacon/states/validators.yaml +++ b/apis/beacon/states/validators.yaml @@ -15,7 +15,7 @@ get: in: path $ref: '../../../beacon-node-oapi.yaml#/components/parameters/StateId' - name: id - description: "Either hex encoded public key (with 0x prefix) or validator index" + description: "Either hex encoded public key (any bytes48 with 0x prefix) or validator index" in: query required: false schema: @@ -23,7 +23,7 @@ get: maxItems: 30 uniqueItems: true items: - description: "Either hex encoded public key (with 0x prefix) or validator index" + description: "Either hex encoded public key (any bytes48 with 0x prefix) or validator index" type: string - name: status description: "[Validator status specification](https://hackmd.io/ofFJ5gOmQpu1jjHilHbdQQ)"