Skip to content
Snippets Groups Projects
Commit 2cbc0adb authored by Mateusz Kudela's avatar Mateusz Kudela Committed by Mateusz Żebrak
Browse files

Adjust test tools readme to newest changes

parent 6b901cb0
No related branches found
No related tags found
1 merge request!137Adjust test tools readme to plugin changes
Pipeline #68541 passed
...@@ -6,28 +6,31 @@ As you can see nodes have different use cases and needs to be configured properl ...@@ -6,28 +6,31 @@ As you can see nodes have different use cases and needs to be configured properl
### Short summary ### Short summary
| Node type | Purpose | Prepared<br>for blocks<br>generation | Enabled APIs | Shared<br>file size | Witness<br>plugin<br>enabled | | Node type | Purpose | Prepared<br>for blocks<br>generation | Enabled APIs | Shared<br>file size | Witness<br>plugin<br>enabled |
| --------------------------------------- | ---------------------------------- |:------------------------------------:|:----------------------------:|:-------------------:|:----------------------------:| |-------------------------------------------| ---------------------------------- |:------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------:|:-------------------:|:----------------------------:|
| Init node ([details](#init-node)) | Network start,<br>handle API calls | yes | all | 128 MB | yes | | Init node ([details](#init-node)) | Network start,<br>handle API calls | yes | block_api, database_api, debug_node_api, network_node_api, wallet_bridge_api | 128 MB | yes |
| Witness node ([details](#witness-node)) | Sign blocks | no | all | 128 MB | yes | | Witness node ([details](#witness-node)) | Sign blocks | no | block_api, database_api, debug_node_api, network_node_api, wallet_bridge_api | 128 MB | yes |
| Api node ([details](#api-node)) | Handle api calls | no | all | 128 MB | no | | Api node ([details](#api-node)) | Handle api calls | no | all except account_history | 128 MB | no |
| Raw node ([details](#raw-node)) | _Unconfigured_ | no | account_by_key,<br>condenser | 54 GB | yes | | Full Api node ([details](#full-api-node)) | Handle api calls | no | all | 128 MB | no |
| Raw node ([details](#raw-node)) | _Unconfigured_ | no | account_by_key | 54 GB | yes |
### Base test node ### Base test node
Nodes are organized in a hierarchy. Init, witness and api nodes are nodes configured for tests. It is described in diagram below as base test node. You can't create this type of node. But all mentioned nodes have same behavior and extend it. Nodes are organized in a hierarchy. Init, witness, api and full api nodes are nodes configured for tests. It is described in diagram below as base test node. You can't create this type of node. But all mentioned nodes have same behavior and extend it.
```mermaid ```mermaid
graph TD; graph TD;
Init[Init Node]; Init[Init Node];
Witness[Witness Node]; Witness[Witness Node];
Api[Api Node]; Api[Api Node];
FullApi [Full Api Node];
Base[Base Test Node]; Base[Base Test Node];
Raw[Raw Node]; Raw[Raw Node];
Init-->Base; Init-->Base;
Witness-->Base; Witness-->Base;
Api-->Base; Api-->Base;
FullApi-->Api;
Base-->Raw; Base-->Raw;
style Base stroke-dasharray: 5 5 style Base stroke-dasharray: 5 5
...@@ -88,7 +91,7 @@ https://gitlab.syncad.com/hive/hive/-/blob/develop/tests/functional/python_tests ...@@ -88,7 +91,7 @@ https://gitlab.syncad.com/hive/hive/-/blob/develop/tests/functional/python_tests
### Api node ### Api node
Responsibility of this node type is api calls handling. Responsibility of this node type is api calls handling. It supports all apis except _account_history_.
<details> <details>
<summary>Code example</summary> <summary>Code example</summary>
...@@ -106,6 +109,27 @@ print(response) ...@@ -106,6 +109,27 @@ print(response)
``` ```
</details> </details>
### Full Api node
It's extension of Api Node with _account_history_ api plugin available.
<details>
<summary>Code example</summary>
```python
# Define network
network = tt.Network()
init_node = tt.InitNode(network=network)
full_api_node = tt.FullApiNode(network=network)
network.run()
# Send account history api calls
response = full_api_node.api.account_history.get_ops_in_block(block_num=4)
print(response)
```
</details>
### Raw node ### Raw node
Node with default, unmodified configuration. Can be useful for tests which checks default behavior of node. Using this type of node is not recomended. Should be avoided and used only if any other can't meet the requirements. Every raw node creates 54 GB file for block log and has only few APIs included (it means additional code for including APIs in every test case). Node with default, unmodified configuration. Can be useful for tests which checks default behavior of node. Using this type of node is not recomended. Should be avoided and used only if any other can't meet the requirements. Every raw node creates 54 GB file for block log and has only few APIs included (it means additional code for including APIs in every test case).
......
...@@ -250,6 +250,7 @@ code ([read more](documentation/node_types.md)). Following node types are suppor ...@@ -250,6 +250,7 @@ code ([read more](documentation/node_types.md)). Following node types are suppor
- init node, - init node,
- witness node, - witness node,
- api node, - api node,
- full api node,
- raw node. - raw node.
This is how network consisting of init, witness and api node can be defined: This is how network consisting of init, witness and api node can be defined:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment