Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove generic Hex primitive type #408

Merged
merged 7 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apis/config/deposit_contract.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ get:
- example: "1"
address:
allOf:
- $ref: ../../beacon-node-oapi.yaml#/components/schemas/Hex
- $ref: ../../beacon-node-oapi.yaml#/components/schemas/ExecutionAddress
- description: Hex encoded deposit contract address with 0x prefix
- example: "0x1Db3439a222C519ab44bb1144fC28167b4Fa6EE6"
- example: "0x00000000219ab540356cBB839Cbe05303d7705Fa"
"500":
$ref: ../../beacon-node-oapi.yaml#/components/responses/InternalError
2 changes: 0 additions & 2 deletions beacon-node-oapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,6 @@ components:
$ref: './types/primitive.yaml#/Finalized'
Root:
$ref: './types/primitive.yaml#/Root'
Hex:
$ref: './types/primitive.yaml#/Hex'
Graffiti:
$ref: './types/primitive.yaml#/Graffiti'
Signature:
Expand Down
4 changes: 2 additions & 2 deletions types/altair/sync_committee.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ Altair:
aggregation_bits:
allOf:
- description: 'A bit is set if a signature from the validator at the corresponding index in the subcommittee is present in the aggregate `signature`.'
- $ref: "../primitive.yaml#/Hex"
- example: "0x01"
- $ref: "../primitive.yaml#/Bitvector"
- example: "0xffffffffffffffffffffffffffffffff"
signature:
allOf:
- $ref: '../primitive.yaml#/Signature'
Expand Down
4 changes: 2 additions & 2 deletions types/p2p.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ MetaData:
attnets:
allOf:
- description: "Bitvector representing the node's persistent attestation subnet subscriptions."
- $ref: "./primitive.yaml#/Hex"
- $ref: "./primitive.yaml#/Bitvector"
- example: "0x0000000000000000"
syncnets:
allOf:
- description: "Bitvector representing the node's sync committee subnet subscriptions. This metadata is not present in phase0, but will be present in Altair."
- $ref: "./primitive.yaml#/Hex"
- $ref: "./primitive.yaml#/Bitvector"
- example: "0x0f"

Peer:
Expand Down
13 changes: 7 additions & 6 deletions types/primitive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@ Graffiti:
example: "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
pattern: "^0x[a-fA-F0-9]{64}$"

Hex:
type: string
format: hex
pattern: "^0x[a-fA-F0-9]{2,}$"

Signature:
type: string
format: hex
Expand All @@ -91,7 +86,13 @@ BitList:
type: string
format: hex
example: "0x01"
pattern: "^0x[a-fA-F0-9]+$"
pattern: "^0x[a-fA-F0-9]{2,64}$"

Bitvector:
type: string
format: hex
example: "0x01"
pattern: "^0x[a-fA-F0-9]{2,64}$"

Uint8:
type: string
Expand Down
Loading