Skip to content

Commit

Permalink
Improve the schema for skip_randao_verification flag type (#444)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
nazarhussain and rolfyone authored Jun 18, 2024
1 parent 3132da1 commit 672e03e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 24 deletions.
9 changes: 1 addition & 8 deletions apis/validator/blinded_block.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 1 addition & 8 deletions apis/validator/block.v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 1 addition & 8 deletions apis/validator/block.v3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions beacon-node-oapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,8 @@ components:
$ref: './params/index.yaml#/BlockId'
BlockRoot:
$ref: './params/index.yaml#/BlockRoot'
SkipRandaoVerification:
$ref: './params/index.yaml#/SkipRandaoVerification'

responses:
InvalidRequest:
Expand Down
12 changes: 12 additions & 0 deletions params/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,15 @@ BlockRoot:
description: |
Block root.
\<hex encoded blockRoot with 0x prefix\>.
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

0 comments on commit 672e03e

Please sign in to comment.