getnetworksolps - Zcash

This method returns an estimate of the network's Equihash solutions per second over a window of recent blocks. This is Zcash's equivalent of Bitcoin's getnetworkhashps — Zcash's Equihash algorithm is measured in solutions/second (sol/s) rather than hashes/second.

Parameters

ParameterTypeRequiredDescription
blocksintegerNoNumber of blocks to average over. Default 120. Use -1 for the full averaging window since the last difficulty adjustment
heightintegerNoBlock height at which to estimate. Default -1 (current tip)

Request

bashcurl --location --request POST 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "getnetworksolps",
    "params": [
        120,
        -1
    ],
    "id": "getblock.io"
}'

example.js

javascriptconst axios = require('axios');

const response = await axios.post('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/', {
    jsonrpc: '2.0',
    method: 'getnetworksolps',
    params: [
        120,
        -1
    ],
    id: 'getblock.io'
}, {
    headers: { 'Content-Type': 'application/json' }
});

console.log(response.data.result);

example.py

pythonimport requests

response = requests.post(
    'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/',
    headers={'Content-Type': 'application/json'},
    json={
        'jsonrpc': '2.0',
        'method': 'getnetworksolps',
        'params': [
        120,
        -1
    ],
        'id': 'getblock.io'
    }
)

print(response.json())

example.rs

rustuse reqwest::Client;
use serde_json::{json, Value};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new();
    
    let response = client
        .post("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/")
        .header("Content-Type", "application/json")
        .json(&json!({
            "jsonrpc": "2.0",
            "method": "getnetworksolps",
            "params": [
        120,
        -1
    ],
            "id": "getblock.io"
        }))
        .send()
        .await?
        .json::<Value>()
        .await?;
    
    println!("Result: {}", response["result"]);
    Ok(())
}

Response

json{
    "jsonrpc": "2.0",
    "result": 31709653247,
    "id": "getblock.io"
}

Response Parameters

ParameterTypeDescription
resultintegerEstimated network Equihash solutions per second

Use Cases

  • Network Hashrate Charts: Feed historical networksolps values into visualization dashboards
  • Mining Profitability Calculators: Combined with block reward and difficulty to project expected earnings
  • Congestion vs Capacity Analysis: Compare hashrate trends to network activity to understand security margins

Error Handling

Error CodeMessageDescription
-32602Invalid paramsBlocks or height parameter is malformed
-32603Internal errorNode failed to compute the estimate