Skip to content

Commit

Permalink
Merge pull request #2641 from jorgemmsilva/fix/jsonrpc-history
Browse files Browse the repository at this point in the history
fix:jsonrpc history
  • Loading branch information
jorgemmsilva authored Jun 28, 2023
2 parents bdac4b7 + 4891321 commit a0cc527
Show file tree
Hide file tree
Showing 15 changed files with 733 additions and 211 deletions.
33 changes: 15 additions & 18 deletions config_defaults.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,26 @@
"pipeliningLimit": -1,
"consensusDelay": "500ms"
},
"stateManager": {
"blockCacheMaxSize": 1000,
"blockCacheBlocksInCacheDuration": "1h",
"blockCacheBlockCleaningPeriod": "1m",
"stateManagerGetBlockRetry": "3s",
"stateManagerRequestCleaningPeriod": "1s",
"stateManagerTimerTickPeriod": "1s",
"pruningMinStatesToKeep": 10000,
"pruningMaxStatesToDelete": 1000
},
"validator": {
"address": ""
},
"wal": {
"enabled": true,
"path": "waspdb/wal"
},
"webapi": {
"enabled": true,
"bindAddress": "0.0.0.0:9090",
"nodeOwnerAddresses": [],
"auth": {
"scheme": "jwt",
"jwt": {
Expand All @@ -96,7 +108,7 @@
"limits": {
"timeout": "30s",
"readTimeout": "10s",
"writeTimeout": "10s",
"writeTimeout": "1m",
"maxBodyLength": "2M",
"maxTopicSubscriptionsPerClient": 0,
"confirmedStateLagThreshold": 2
Expand All @@ -112,21 +124,6 @@
},
"prometheus": {
"enabled": true,
"bindAddress": "0.0.0.0:2112",
"nodeMetrics": true,
"blockWALMetrics": true,
"consensusMetrics": true,
"mempoolMetrics": true,
"chainMessagesMetrics": true,
"chainStateMetrics": true,
"chainStateManagerMetrics": true,
"chainNodeConnMetrics": true,
"chainPipeMetrics": true,
"peeringMetrics": true,
"restAPIMetrics": true,
"goMetrics": true,
"processMetrics": true,
"promhttpMetrics": true,
"webAPIMetrics": true
"bindAddress": "0.0.0.0:2112"
}
}
104 changes: 59 additions & 45 deletions documentation/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,53 @@ Example:
}
```

## <a id="wal"></a> 9. Write-Ahead Logging
## <a id="statemanager"></a> 9. StateManager

| Name | Description | Type | Default value |
| --------------------------------- | --------------------------------------------------------------------------------------------- | ------ | ------------- |
| blockCacheMaxSize | How many blocks may be stored in cache before old ones start being deleted | int | 1000 |
| blockCacheBlocksInCacheDuration | How long should the block stay in block cache before being deleted | string | "1h" |
| blockCacheBlockCleaningPeriod | How often should the block cache be cleaned | string | "1m" |
| stateManagerGetBlockRetry | How often get block requests should be repeated | string | "3s" |
| stateManagerRequestCleaningPeriod | How often requests waiting for response should be checked for expired context | string | "1s" |
| stateManagerTimerTickPeriod | How often timer tick fires in state manager | string | "1s" |
| pruningMinStatesToKeep | This number of states will always be available in the store; if 0 - store pruning is disabled | int | 10000 |
| pruningMaxStatesToDelete | On single store pruning attempt at most this number of states will be deleted | int | 1000 |

Example:

```json
{
"stateManager": {
"blockCacheMaxSize": 1000,
"blockCacheBlocksInCacheDuration": "1h",
"blockCacheBlockCleaningPeriod": "1m",
"stateManagerGetBlockRetry": "3s",
"stateManagerRequestCleaningPeriod": "1s",
"stateManagerTimerTickPeriod": "1s",
"pruningMinStatesToKeep": 10000,
"pruningMaxStatesToDelete": 1000
}
}
```

## <a id="validator"></a> 10. Validator

| Name | Description | Type | Default value |
| ------- | ------------------------------------------------------------------------------------------------------------------ | ------ | ------------- |
| address | Bech32 encoded address to identify the node (as access node on gov contract and to collect validator fee payments) | string | "" |

Example:

```json
{
"validator": {
"address": ""
}
}
```

## <a id="wal"></a> 11. Write-Ahead Logging

| Name | Description | Type | Default value |
| ------- | -------------------------------------------- | ------- | ------------- |
Expand All @@ -313,13 +359,12 @@ Example:
}
```

## <a id="webapi"></a> 10. Web API
## <a id="webapi"></a> 12. Web API

| Name | Description | Type | Default value |
| ------------------------- | -------------------------------------------------------- | ------- | -------------- |
| enabled | Whether the web api plugin is enabled | boolean | true |
| bindAddress | The bind address for the node web api | string | "0.0.0.0:9090" |
| nodeOwnerAddresses | Defines a list of node owner addresses (bech32) | array | |
| [auth](#webapi_auth) | Configuration for auth | object | |
| [limits](#webapi_limits) | Configuration for limits | object | |
| debugRequestLoggerEnabled | Whether the debug logging for requests should be enabled | boolean | false |
Expand Down Expand Up @@ -357,7 +402,7 @@ Example:
| ------------------------------ | ----------------------------------------------------------------------------- | ------ | ------------- |
| timeout | The timeout after which a long running operation will be canceled | string | "30s" |
| readTimeout | The read timeout for the HTTP request body | string | "10s" |
| writeTimeout | The write timeout for the HTTP response body | string | "10s" |
| writeTimeout | The write timeout for the HTTP response body | string | "1m" |
| maxBodyLength | The maximum number of characters that the body of an API call may contain | string | "2M" |
| maxTopicSubscriptionsPerClient | Defines the max amount of subscriptions per client. 0 = deactivated (default) | int | 0 |
| confirmedStateLagThreshold | The threshold that define a chain is unsynchronized | uint | 2 |
Expand All @@ -369,7 +414,6 @@ Example:
"webapi": {
"enabled": true,
"bindAddress": "0.0.0.0:9090",
"nodeOwnerAddresses": [],
"auth": {
"scheme": "jwt",
"jwt": {
Expand All @@ -387,7 +431,7 @@ Example:
"limits": {
"timeout": "30s",
"readTimeout": "10s",
"writeTimeout": "10s",
"writeTimeout": "1m",
"maxBodyLength": "2M",
"maxTopicSubscriptionsPerClient": 0,
"confirmedStateLagThreshold": 2
Expand All @@ -397,7 +441,7 @@ Example:
}
```

## <a id="profiling"></a> 11. Profiling
## <a id="profiling"></a> 13. Profiling

| Name | Description | Type | Default value |
| ----------- | ------------------------------------------------- | ------- | ---------------- |
Expand All @@ -415,7 +459,7 @@ Example:
}
```

## <a id="profilingrecorder"></a> 12. ProfilingRecorder
## <a id="profilingrecorder"></a> 14. ProfilingRecorder

| Name | Description | Type | Default value |
| ------- | ----------------------------------------------- | ------- | ------------- |
Expand All @@ -431,50 +475,20 @@ Example:
}
```

## <a id="prometheus"></a> 13. Prometheus

| Name | Description | Type | Default value |
| ------------------------ | ------------------------------------------------------------ | ------- | -------------- |
| enabled | Whether the prometheus plugin is enabled | boolean | true |
| bindAddress | The bind address on which the Prometheus exporter listens on | string | "0.0.0.0:2112" |
| nodeMetrics | Whether to include node metrics | boolean | true |
| blockWALMetrics | Whether to include block Write-Ahead Log (WAL) metrics | boolean | true |
| consensusMetrics | Whether to include consensus metrics | boolean | true |
| mempoolMetrics | Whether to include mempool metrics | boolean | true |
| chainMessagesMetrics | Whether to include chain messages metrics | boolean | true |
| chainStateMetrics | Whether to include chain state metrics | boolean | true |
| chainStateManagerMetrics | Whether to include chain state manager metrics | boolean | true |
| chainNodeConnMetrics | Whether to include chain node conn metrics | boolean | true |
| chainPipeMetrics | Whether to include chain pipe metrics | boolean | true |
| peeringMetrics | Whether to include peering metrics | boolean | true |
| restAPIMetrics | Whether to include restAPI metrics | boolean | true |
| goMetrics | Whether to include go metrics | boolean | true |
| processMetrics | Whether to include process metrics | boolean | true |
| promhttpMetrics | Whether to include promhttp metrics | boolean | true |
| webAPIMetrics | Whether to include webapi metrics | boolean | true |
## <a id="prometheus"></a> 15. Prometheus

| Name | Description | Type | Default value |
| ----------- | ------------------------------------------------------------ | ------- | -------------- |
| enabled | Whether the prometheus plugin is enabled | boolean | true |
| bindAddress | The bind address on which the Prometheus exporter listens on | string | "0.0.0.0:2112" |

Example:

```json
{
"prometheus": {
"enabled": true,
"bindAddress": "0.0.0.0:2112",
"nodeMetrics": true,
"blockWALMetrics": true,
"consensusMetrics": true,
"mempoolMetrics": true,
"chainMessagesMetrics": true,
"chainStateMetrics": true,
"chainStateManagerMetrics": true,
"chainNodeConnMetrics": true,
"chainPipeMetrics": true,
"peeringMetrics": true,
"restAPIMetrics": true,
"goMetrics": true,
"processMetrics": true,
"promhttpMetrics": true,
"webAPIMetrics": true
"bindAddress": "0.0.0.0:2112"
}
}
```
Expand Down
Loading

0 comments on commit a0cc527

Please sign in to comment.