getnetworksolps - Zcash
Example code for the getnetworksolps JSON-RPC method. Complete guide on how to use the getnetworksolps JSON-RPC method in GetBlock.io Web3 documentation.
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
blocks
integer
No
Number of blocks to average over. Default 120. Use -1 for the full averaging window since the last difficulty adjustment
height
integer
No
Block height at which to estimate. Default -1 (current tip)
Request
curl --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"
}'const 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);Response
Response Parameters
result
integer
Estimated network Equihash solutions per second
Use Cases
Network Hashrate Charts: Feed historical
networksolpsvalues into visualization dashboardsMining 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
-32602
Invalid params
Blocks or height parameter is malformed
-32603
Internal error
Node failed to compute the estimate
Last updated
Was this helpful?