Skip to content

Commit

Permalink
Remove generic Hex primitive type (#408)
Browse files Browse the repository at this point in the history
Co-authored-by: Paul Harris <paul.harris@consensys.net>
  • Loading branch information
nflaig and rolfyone committed Jan 15, 2024
1 parent 0d2aa4c commit 1449e7d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 deletions.
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

0 comments on commit 1449e7d

Please sign in to comment.