GRPC Documentation - BlockValidationAPI
Table of Contents
blockvalidation_api.proto
BlockFoundRequest
swagger:model BlockFoundRequest
| Field | Type | Label | Description |
|---|---|---|---|
| hash | bytes | The hash of the found block | |
| base_url | string | Base URL where the block can be retrieved from | |
| wait_to_complete | bool | Whether to wait for the block processing to complete | |
| peer_id | string | P2P peer identifier for peerMetrics tracking |
CatchupStatusResponse
swagger:model CatchupStatusResponse
| Field | Type | Label | Description |
|---|---|---|---|
| is_catching_up | bool | Indicates if the node is currently catching up | |
| peer_id | string | P2P peer identifier for the catchup source | |
| peer_url | string | URL of the peer being used for catchup | |
| target_block_hash | string | Hash of the target block to catch up to | |
| target_block_height | uint32 | Height of the target block | |
| current_height | uint32 | Current block height during catchup | |
| total_blocks | int32 | Total number of blocks to process | |
| blocks_fetched | int64 | Number of blocks fetched so far | |
| blocks_validated | int64 | Number of blocks validated so far | |
| start_time | int64 | Unix timestamp when catchup started | |
| duration_ms | int64 | Duration of catchup in milliseconds | |
| fork_depth | uint32 | Depth of the fork being resolved | |
| common_ancestor_hash | string | Hash of the common ancestor block | |
| common_ancestor_height | uint32 | Height of the common ancestor block | |
| previous_attempt | PreviousCatchupAttempt | Information about the previous catchup attempt if any |
EmptyMessage
Represents an empty request or response message. Used for endpoints that don't require input parameters or return data.
swagger:model EmptyMessage
HealthResponse
swagger:model HealthResponse
| Field | Type | Label | Description |
|---|---|---|---|
| ok | bool | Indicates if the service is healthy | |
| details | string | Additional health status details | |
| timestamp | google.protobuf.Timestamp | Timestamp when the health check was performed |
PreviousCatchupAttempt
swagger:model PreviousCatchupAttempt
| Field | Type | Label | Description |
|---|---|---|---|
| peer_id | string | P2P peer identifier for the previous attempt | |
| peer_url | string | URL of the peer used in the previous attempt | |
| target_block_hash | string | Hash of the target block in the previous attempt | |
| target_block_height | uint32 | Height of the target block in the previous attempt | |
| error_message | string | Error message from the previous attempt | |
| error_type | string | Type of error encountered | |
| attempt_time | int64 | Unix timestamp when the attempt was made | |
| duration_ms | int64 | Duration of the attempt in milliseconds | |
| blocks_validated | int64 | Number of blocks validated before failure |
ProcessBlockRequest
swagger:model ProcessBlockRequest
| Field | Type | Label | Description |
|---|---|---|---|
| block | bytes | The block data to process | |
| height | uint32 | The height of the block in the blockchain | |
| base_url | string | Base URL where the block can be retrieved from | |
| peer_id | string | P2P peer identifier for peerMetrics tracking |
RevalidateBlockRequest
swagger:model RevalidateBlockRequest
| Field | Type | Label | Description |
|---|---|---|---|
| hash | bytes | The hash of the block to revalidate |
ValidateBlockRequest
swagger:model ValidateBlockRequest
| Field | Type | Label | Description |
|---|---|---|---|
| block | bytes | The block data to validate | |
| height | uint32 | The height of the block in the blockchain | |
| is_revalidation | bool | Indicates this is a revalidation of an invalid block |
ValidateBlockResponse
swagger:model ValidateBlockResponse
| Field | Type | Label | Description |
|---|---|---|---|
| ok | bool | Indicates if the block is valid | |
| message | string | Additional information about validation results |
BlockValidationAPI
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| HealthGRPC | EmptyMessage | HealthResponse | Returns the health status of the BlockValidation service. |
| BlockFound | BlockFoundRequest | EmptyMessage | Notifies the service that a new block has been found and requires validation. |
| ProcessBlock | ProcessBlockRequest | EmptyMessage | Processes a block to validate its content and structure. |
| ValidateBlock | ValidateBlockRequest | ValidateBlockResponse | Validates a block without processing it, returning validation results. |
| RevalidateBlock | RevalidateBlockRequest | EmptyMessage | Revalidates a previously validated block by its hash. |
| GetCatchupStatus | EmptyMessage | CatchupStatusResponse | Returns the current catchup status including progress and peer information. |