Skip to content

RPC Configuration with 2.0.0

Joe Sacher edited this page Mar 18, 2025 · 2 revisions

The sidecar replaces the node for RPC serving. Two configurations are required for throughput:

casper-node config located in /etc/casper/<protocol_version>/config.toml

qps_limit is for binary port. For high RPC node volume you might increase this to 1500. We have been configuring it to 3x the RPC limit for high RPC volume nodes as one RPC request has 1-n binary port calls.

allow_request_get_all_values = true will allow expensive calls such as auction_info to go through. It is safest to have as false for performance of the node, but might need enabled based on use cases.

[binary_port_server]
# The global max rate of requests (per second) before they are limited.
# The implementation uses a sliding window algorithm.
qps_limit = 110

# Flag that enables the `AllValues` get request. Disabled by default, because it can potentially be abused to retrieve huge amounts of data and clog the node.
allow_request_get_all_values = false

Sidecar config is located in /etc/casper-sidecar/config.toml. For higher throughput RPC, set the qps_limit to around 1/3 of the binary port setting above.

[rpc_server.main_server]
# The global maximum rate of HTTP requests (per second) before they are limited.
# Request will be delayed to the next one second bucket once limited.
qps_limit = 100

Once settings are changed, restart both node and sidecar with:

sudo /etc/casper/node_util.py restart
sudo /etc/casper/node_util.py sidecar_restart

If you do not have sidecar subcommands in node_util.py please update to 1.0.6+ of casper-node-launcher.

Clone this wiki locally