rpc: add documentation for genesis chunked api (#6776)

This commit is contained in:
Sam Kleinman
2021-07-28 14:20:40 -04:00
committed by GitHub
parent 9e41414a53
commit 6a94b55d12
2 changed files with 65 additions and 1 deletions

View File

@@ -24,6 +24,7 @@ Friendly reminder: We have a [bug bounty program](https://hackerone.com/tendermi
- [fastsync/rpc] \#6620 Add TotalSyncedTime & RemainingTime to SyncInfo in /status RPC (@JayT106)
- [rpc/grpc] \#6725 Mark gRPC in the RPC layer as deprecated.
- [blockchain/v2] \#6730 Fast Sync v2 is deprecated, please use v0
- [rpc] Add genesis_chunked method to support paginated and parallel fetching of large genesis documents.
- Apps
- [ABCI] \#6408 Change the `key` and `value` fields from `[]byte` to `string` in the `EventAttribute` type. (@alexanderbez)

View File

@@ -806,6 +806,7 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/genesis:
get:
summary: Get Genesis
@@ -813,7 +814,7 @@ paths:
tags:
- Info
description: |
Get genesis.
Get the genesis document.
responses:
"200":
description: Genesis results.
@@ -827,6 +828,39 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/genesis_chunked:
get:
summary: Get Genesis in paginated chunks
operationId: genesis_chunked
tags:
- Info
description: |
Get genesis document in a paginated/chunked format to make it
easier to iterate through larger gensis structures.
parameters:
- in: query
name: chunkID
description: Sequence number of the chunk to download.
schema:
type: integer
default: 0
example: 1
responses:
"200":
description: Genesis results.
content:
application/json:
schema:
$ref: "#/components/schemas/GenesisChunkedResponse"
"500":
description: Error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/dump_consensus_state:
get:
summary: Get consensus state
@@ -1894,6 +1928,35 @@ components:
properties: {}
type: object
GenesisChunkedResponse:
type: object
required:
- "jsonrpc"
- "id"
- "result"
properties:
jsonrpc:
type: string
example: "2.0"
id:
type: integer
example: 0
result:
required:
- "chunk"
- "total"
- "data"
properties:
chunk:
type: integer
example: 0
total:
type: integer
example: 1
data:
type: string
example: "Z2VuZXNpcwo="
DumpConsensusResponse:
type: object
required: