0xPolygon / kurtosis-cdk

A Kurtosis package that deploys a private, portable, and modular Polygon CDK devnet
https://docs.polygon.technology/cdk
Apache License 2.0
42 stars 72 forks source link

feat: add blutgang integration #87

Closed jhkimqd closed 5 months ago

jhkimqd commented 5 months ago

Description

This PR integrates blutgang to kurtosis-cdk as an L2 load balancer/cache.

Blutgang caches RPC calls and significantly reduces recurring queries to the RPC nodes.

Before cache blutgang1

After cache blutgang2

This PR sets up the blutgang service in front of the RPC endpoints as shown in the blutgang-config.toml file:

[sequencer]
url = "{{.l2_sequencer_url}}"
ws_url = "{{.l2_sequencer_ws_url}}"
# The maximum amount of time we can use this rpc in a row.
max_consecutive = 150
# Max amount of queries per second.
max_per_second = 200

[rpc]
url = "{{.l2_rpc_url}}"
ws_url = "{{.l2_ws_url}}"
# The maximum amount of time we can use this rpc in a row.
max_consecutive = 150
# Max amount of queries per second.
max_per_second = 200

[rpcpless]
url = "{{.l2_rpc_pless_url}}"
ws_url = "{{.l2_ws_pless_url}}"
# The maximum amount of time we can use this rpc in a row.
max_consecutive = 150
# Max amount of queries per second.
max_per_second = 200

The queries/results are cached inside the local db within the blutgang service.

sonarcloud[bot] commented 5 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud