Skip to content

Commit

Permalink
Fixed SubscribeExecutionData description
Browse files Browse the repository at this point in the history
  • Loading branch information
Guitarheroua committed Nov 29, 2023
1 parent 2672347 commit d276bce
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions docs/references/run-and-secure/nodes/access-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1159,11 +1159,8 @@ message ServiceEvent {
| type | Type of an event |
| payload | JSON-serialized content of an event |



## Subscriptions


### SubscribeEvents

`SubscribeEvents` streams events for all blocks starting at the requested start block, up until the latest available block. Once the latest is
Expand All @@ -1180,7 +1177,6 @@ which block to start from when reconnecting.
rpc SubscribeEvents(SubscribeEventsRequest) returns (stream SubscribeEventsResponse)
```


#### Request

```proto
Expand All @@ -1201,9 +1197,6 @@ message SubscribeEventsRequest {
| heartbeat_interval | Interval in block heights at which the server should return a heartbeat message to the client |
| event_encoding_version | Preferred event encoding version of the block events payload. Possible variants: CCF, JSON-CDC |




#### Response

```proto
Expand All @@ -1217,15 +1210,12 @@ message SubscribeEventsResponse {

### SubscribeExecutionData

`SubscribeExecutionData` retrieves execution result for given block. It is different from Transaction Results,
and contain data about chunks/collection level execution results rather than particular transactions.
Particularly, it contains `EventsCollection` hash for every chunk which can be used to verify the events for a block.
`SubscribeExecutionData` streams execution data for all blocks starting at the requested start block, up until the latest available block. Once the latest is reached, the stream will remain open and responses are sent for each new execution data as it becomes available.

```proto
rpc SubscribeExecutionData(SubscribeExecutionDataRequest) returns (stream SubscribeExecutionDataResponse)
```


#### Request

```proto
Expand All @@ -1242,7 +1232,6 @@ message SubscribeExecutionDataRequest {
| start_block_height | Block height of the first block to get execution data for. Only one of start_block_id and start_block_height may be provided, otherwise an InvalidArgument error is returned. If neither are provided, the latest sealed block is used |
| event_encoding_version | Preferred event encoding version of the block events payload. Possible variants: CCF, JSON-CDC |


#### Response

```proto
Expand All @@ -1253,7 +1242,6 @@ message SubscribeExecutionDataResponse {
}
```


## Execution data

### EventFilter
Expand All @@ -1273,4 +1261,4 @@ message EventFilter {
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| event_type | A list of full event types to include. <br/> Event types have 2 formats:<br/> * Protocol events: `flow.[event name]`<br/> * Smart contract events: `A.[contract address].[contract name].[event name]` |
| contract | A list of contracts who's events should be included. Contracts have the following name formats:<br/> * Protocol events: `flow`<br/> * Smart contract events: `A.[contract address].[contract name]`<br/> This filter matches on the full contract including its address, not just the contract's name |
| address | A list of addresses who's events should be included. Addresses must be Flow account addresses in hex format and valid for the network the node is connected to. i.e. only a mainnet address is valid for a mainnet node. Addresses may optionally include the 0x prefix | |
| address | A list of addresses who's events should be included. Addresses must be Flow account addresses in hex format and valid for the network the node is connected to. i.e. only a mainnet address is valid for a mainnet node. Addresses may optionally include the `0x` prefix | |

0 comments on commit d276bce

Please sign in to comment.