---
# System prepended metadata

title: Senior QA Engineer task

---

## Nethermind Senior QA Engineer Assignment

This assignment consists of a few tasks:

- Set up and run Nethermind Ethereum client.
- Creating API verification and performance testing suite for Nethermind client's JSON-RPC.
- Setting up Github Actions pipeline(s) for the above test suites.

### 1. Nethermind client set up

There are various options exist to set up and run the Nethermind client. For the simplicity, we suggest using Sedge - A dockerizied solution for running various Ethereum clients. If you are curious, feel free to explore other options here https://docs.nethermind.io/get-started/installing-nethermind.

Below are the Sedge set up steps:

1. **Install Sedge** on the agent using the following commands. Consult the **Sedge** documentation: https://docs.sedge.nethermind.io/ for more information.
2. **Run Sedge** using the provided commands to generate the necessary environment for testing.
    
    ```
    echo 'Running sedge...'
    ./sedge deps install >>sedge.logs
    ./sedge generate --logging none -p $HOME full-node \
    --map-all --no-mev-boost --no-validator \
    --network chiado -c lighthouse:sigp/lighthouse:latest \
    -e nethermind:nethermindeth/nethermind:master \
    --el-extra-flag Sync.NonValidatorNode=true \
    --el-extra-flag Sync.DownloadBodiesInFastSync=false \
    --el-extra-flag Sync.DownloadReceiptsInFastSync=false \
    --el-extra-flag JsonRpc.EnabledModules=[Eth,TxPool,Web3,Net,Health,Rpc,Debug] \
    --el-extra-flag Sync.SnapSync=true \
    --cl-extra-flag checkpoint-sync-url=http://139.144.26.89:4000/ >>sedge.logs
    ./sedge run -p . >>sedge.logs
    ```
    
3. **Ensure client synchronization completed**
    1. Check if node proceeded to a proper stage of sync (SnapSync) using this endpoint: https://docs.nethermind.io/interacting/json-rpc-ns/debug/#debug_getsyncstage
    2. Check if node is syncing using https://docs.nethermind.io/interacting/json-rpc-ns/eth#eth_syncing. At first it should return structure like this:
        
        ```
        {'startingBlock':'0x0', 'currentBlock': 0x0', 'highestBlock':'0x0'}
        ```
        
        but after a while it should return:
        ```
        {'jsonrpc': '2.0', 'result': False, 'id': 0}
        ```        
        meaning it is synced.

### 2. API testing suite

**Develop a test suite** that includes the following tests:

- **Test 1**: JSON-RPC verification
    - Retrieve the chain head from a synced node using the eth_blockNumber API call. (https://docs.nethermind.io/nethermind/ethereum-client/json-rpc/eth#eth_blocknumber).
    - Obtain block details using the eth_getBlockByNumber endpoint.(https://docs.nethermind.io/nethermind/ethereum-client/json-rpc/eth#eth_getblockbynumber).
    - Ensure the response is not empty, contains block data, and is free of error information.
    - Prepare additional relevant scenarios.
- **Test 2**: JSON-RPC Benchmark
    - Execute the `getBlockByNumber` endpoint for a selected block head (always using the same block number consistently).
    - Assess endpoint behavior when executed 1,000 and 10,000 times with different levels of parallelism, simulating high load by multiple users on public JSON-RPC API.
    - Prepare a report based on the results.
- **Test 3**: Test Suite Extension for Selected Endpoint
    - For any chosen JSON-RPC endpoint from the Nethermind documentation, prepare additional scenarios (both verification and performance tests). https://docs.nethermind.io/nethermind/ethereum-client/json-rpc

### 3. Create Github Action workflows

**Create a GitHub Action** running on the `ubuntu-latest` machine. Integrate API test suites into created action. Make sure the test suites are running on fully synced client, as explained in first task.

---

During the preparation of the solution, ensure readability, reusability, and performance. If possible, make it easy to switch between verification and performance scenarios.

You can use any programming language and tools. Ensure that each scenario can be executed by GitHub Action(s).

Also please create a `Readme.md` file in your solution where you can put any important informations about implementation details, possible improvements which can be applied but will require more time and any testing reports (you can include performance report in there also).

**After completing the task invite the following members to the repository:**

- [kamil@nethermind.io](mailto:kamil@nethermind.io) (https://github.com/kamilchodola)
- [wojciech.zieba@nethermind.io](mailto:wojciech.zieba@nethermind.io) (https://github.com/wojciechos)
- [yaroslav@nethermind.io](mailto:yaroslav@nethermind.io) (https://github.com/brbrr)