Skip to content

Commit

Permalink
Revert block hash object (#351)
Browse files Browse the repository at this point in the history
* revert block hash object

* fix description

* use anyOf
  • Loading branch information
lightclient authored Jan 10, 2023
1 parent 7a29d6e commit c539f59
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions src/schemas/block.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,6 @@ BlockTag:
- latest
- pending
description: '`earliest`: The lowest numbered block the client has available; `finalized`: The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination; `safe`: The most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions; `latest`: The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions; `pending`: A sample next block built by the client on top of `latest` and containing the set of transactions usually taken from local mempool. Before the merge transition is finalized, any call querying for `finalized` or `safe` block MUST be responded to with `-39001: Unknown block` error'
BlockHash:
title: Block hash
type: object
required:
- blockHash
properties:
blockHash:
title: Block hash
$ref: '#/components/schemas/hash32'
requireCanonical:
title: Require canonical
type: boolean
BlockNumberOrTag:
title: Block number or tag
oneOf:
Expand All @@ -119,14 +107,14 @@ BlockNumberOrTag:
- title: Block tag
$ref: '#/components/schemas/BlockTag'
BlockNumberOrTagOrHash:
title: Block number or tag, or block hash
oneOf:
title: Block number, tag, or block hash
anyOf:
- title: Block number
$ref: '#/components/schemas/uint'
- title: Block tag
$ref: '#/components/schemas/BlockTag'
- title: Block hash
$ref: '#/components/schemas/BlockHash'
$ref: '#/components/schemas/hash32'
BadBlock:
title: Bad block
type: object
Expand Down

0 comments on commit c539f59

Please sign in to comment.