From 672e03e25ace85a3bacaea553fbf374f4f844435 Mon Sep 17 00:00:00 2001 From: Nazar Hussain Date: Tue, 18 Jun 2024 17:56:16 +0200 Subject: [PATCH] Improve the schema for skip_randao_verification flag type (#444) * Fix the skip_randao_verification flag type * Remove the quote around null * Make the schema more explicit * Update the schema for skip_randao_verification * Fix the comments --------- Co-authored-by: Paul Harris --- apis/validator/blinded_block.yaml | 9 +-------- apis/validator/block.v2.yaml | 9 +-------- apis/validator/block.v3.yaml | 9 +-------- beacon-node-oapi.yaml | 2 ++ params/index.yaml | 12 ++++++++++++ 5 files changed, 17 insertions(+), 24 deletions(-) diff --git a/apis/validator/blinded_block.yaml b/apis/validator/blinded_block.yaml index be7d60c2..d8a6e6a8 100644 --- a/apis/validator/blinded_block.yaml +++ b/apis/validator/blinded_block.yaml @@ -33,14 +33,7 @@ get: schema: $ref: '../../beacon-node-oapi.yaml#/components/schemas/Graffiti' - name: skip_randao_verification - in: query - required: false - description: | - Skip verification of the `randao_reveal` value. If this flag is set then the - `randao_reveal` must be set to the point at infinity (`0xc0..00`). This query parameter - is a flag and does not take a value. - schema: {} - allowEmptyValue: true + $ref: '../../beacon-node-oapi.yaml#/components/parameters/SkipRandaoVerification' responses: "200": description: Success response diff --git a/apis/validator/block.v2.yaml b/apis/validator/block.v2.yaml index f436294d..ff3fc8cb 100644 --- a/apis/validator/block.v2.yaml +++ b/apis/validator/block.v2.yaml @@ -30,14 +30,7 @@ get: schema: $ref: '../../beacon-node-oapi.yaml#/components/schemas/Graffiti' - name: skip_randao_verification - in: query - required: false - description: | - Skip verification of the `randao_reveal` value. If this flag is set then the - `randao_reveal` must be set to the point at infinity (`0xc0..00`). This query parameter - is a flag and does not take a value. - schema: {} - allowEmptyValue: true + $ref: '../../beacon-node-oapi.yaml#/components/parameters/SkipRandaoVerification' responses: "200": description: Success response diff --git a/apis/validator/block.v3.yaml b/apis/validator/block.v3.yaml index 7932ac57..b5f4d858 100644 --- a/apis/validator/block.v3.yaml +++ b/apis/validator/block.v3.yaml @@ -35,14 +35,7 @@ get: schema: $ref: '../../beacon-node-oapi.yaml#/components/schemas/Graffiti' - name: skip_randao_verification - in: query - required: false - description: | - Skip verification of the `randao_reveal` value. If this flag is set then the - `randao_reveal` must be set to the point at infinity (`0xc0..00`). This query parameter - is a flag and does not take a value. - schema: {} - allowEmptyValue: true + $ref: '../../beacon-node-oapi.yaml#/components/parameters/SkipRandaoVerification' - name: builder_boost_factor in: query required: false diff --git a/beacon-node-oapi.yaml b/beacon-node-oapi.yaml index b9640ae3..26ba6992 100644 --- a/beacon-node-oapi.yaml +++ b/beacon-node-oapi.yaml @@ -389,6 +389,8 @@ components: $ref: './params/index.yaml#/BlockId' BlockRoot: $ref: './params/index.yaml#/BlockRoot' + SkipRandaoVerification: + $ref: './params/index.yaml#/SkipRandaoVerification' responses: InvalidRequest: diff --git a/params/index.yaml b/params/index.yaml index 06b05839..4dd673e5 100644 --- a/params/index.yaml +++ b/params/index.yaml @@ -27,3 +27,15 @@ BlockRoot: description: | Block root. \. +SkipRandaoVerification: + name: skip_randao_verification + in: query + required: false + description: | + Skip verification of the `randao_reveal` value. If this flag is set then the + `randao_reveal` must be set to the point at infinity (`0xc0..00`). + schema: + type: string + minLength: 0 + maxLength: 0 + allowEmptyValue: true