Compute Units (CUs)

An explanation for Compute Unite and how it works

Compute Unit is a way to measure your RPC request usage on MegaNode. We provide each MegaNode user a monthly quota of usage, and each method will consume a cost based on the resource required for execution. You can think of this as you have a balance in your account and each method has its own price. This will be deducted from your account upon submission of RPC requests. The price of each RPC method is called Compute Unit. Based on this calculation, we enable our users to utilize the monthly request quota more efficiently. In short, you only pay for what you use.

πŸ“˜

For different subscription tiers, there may have different monthly usage quotas.

CUs of RPC Method

Below are the CUs for each method. We define the CUs based on the resource required for execution.

Supported Method

BSC, Ethereum & Polygon

MethodCUs
eth_accounts5
eth_blockNumber5
eth_chainId5
eth_syncing5
net_listening5
net_version5
web3_clientVersion5
eth_subscribe10
eth_uninstallFilter10
eth_unsubscribe10
web3_sha310
eth_gasPrice15
eth_getBalance15
eth_getBlockByNumber15
eth_getCode15
eth_getStorageAt15
eth_getTransactionByBlockHashAndIndex15
eth_getTransactionByBlockNumberAndIndex15
eth_getTransactionByHash15
eth_getTransactionReceipt15
eth_getBlockByHash18
eth_getBlockTransactionCountByHash18
eth_getBlockTransactionCountByNumber18
eth_getFilterChanges18
eth_newBlockFilter18
eth_newFilter18
eth_newPendingTransactionFilter18
eth_call20
eth_getProof20
eth_getTransactionCount25
eth_getFilterLogs50
eth_getLogs50
eth_estimateGas75
eth_sendRawTransaction150
debug_traceTransaction280
debug_traceCall280
debug_traceBlockByNumber1800
debug_traceBlockByHash1800

Ethereum only

MethodCUs
eth_protocolVersion5
eth_createAccessList10
eth_feeHistory10
eth_maxPriorityFeePerGas10
eth_getUncleByBlockHashAndIndex15
eth_getUncleByBlockNumberAndIndex15
eth_getUncleCountByBlockHash15
eth_getUncleCountByBlockNumber15

Polygon API

MethodCUs
bor_getAuthor15
bor_getCurrentProposer15
bor_getCurrentValidators15
bor_getRootHash15
bor_getSignersAtHash15
eth_getTransactionReceiptsByBlock250

Optimism API

MethodCUs
eth_getBlockRange25
rollup_getInfo15
rollup_gasPrices15

Enhanced API

MethodCUs
debug_traceTransaction280
debug_traceCall280
debug_traceBlockByNumber1800
debug_traceBlockByHash1800
eth_getDiffAccounts1000
eth_getDiffAccountsWithScope1200
nr_getTokenBalance115525
nr_getNFTCollectionHolders300
nr_getNFTCollectionHolderCount50
nr_getNFTInventory200
nr_getNFTHolders300
nr_getNFTHoldersWithBalance100
nr_getNFTHolderCount50
nr_getTokenMeta80
nr_getTotalSupply72125
nr_getTotalSupply115525
nr_getNFTHoldings300
nr_getNFTHoldingCount50
nr_getTokenBalance72125
nr_getSummedSupply1155100
nr_getNFTTokenCount50
nr_getNFTTokens100
nr_getNFTTokenOwners150
nr_getNFTMeta100
nr_getTokenBalance2025
nr_getTotalSupply2025
nr_getTokenCount100
nr_getTokenHoldings300
nr_getTokenHoldingCount50
nr_getTokenHolders300
nr_getTokenHolderCount50
nr_getTransactionReceiptsByBlockHash250
nr_getTransactionReceiptsByBlockNumber250
nr_getTransactionDetail50
nr_getTransactionByAddress250
nr_getTransactionByAddressCount250
nr_getTransferByTokenId250
nr_getContractCreationTransaction250
nr_getAssetTransfersCount150
nr_getAssetTransfers250
txpool_content3000
txpool_inspect20
txpool_status15

Aptos API

MethodCUs
get_account25
get_account_modules25
get_account_resources25
get_account_transaction125
get_blocks_by_height50
get_blocks_by_version50
get_events_by_creation_number125
get_events_by_event_handle125
get_ledger_information25
get_node_health25
get_specific_account_module25
get_specific_account_resource25
get_table_item25
get_transaction_by_hash25
get_transaction_by_version25
get_transactions125
simulate_transaction50
submit_batch_transactions50
submit_transaction25
encode_submission25
estimate_gas_price25
spec200

Unsupported Method

If MegaNode received requests using unsupported RPC method, the CUs are 2 for each request.

How does MegaNode calculate my monthly quota?

We accumulate the monthly usage by account. Regardless of how many apps you created in your account, we calculate the usage by summing the entire usage across apps.

Websocket subscription

MegaNode charges the websocket subscription by bandwidth. For every byte, the cost is 0.04 CU.

What happens if I run out of monthly quota?

If you keep sending RPC request even though you've reached the monthly quota, the request will fail and you will receive http 429 error and an error code: -32005

{
   "jsonrpc":"2.0",
   "id":1,
   "error":{
      "code":-32005,
      "message":"limit exceeded"
   }
}

What happens if I send a request with incorrect payload?

If you're sending a RPC request with an incorrect payload, it will cost:

  • If incorrect method: it will cost you 2 usage for incorrect or unsupported RPC method.
  • If other parameters are incorrect, or execution failed due to the wrong payload: it will consume the original cost of each method.

How much monthly quota do I have?

We provide MegaNode users different tiers of monthly quota according to their pricing plan. Pleaserefer to our pricing plan.


What’s Next