Integrate Permits in EthAPI #9298
Labels
A-rpc
Related to the RPC implementation
C-enhancement
New feature or request
D-good-first-issue
Nice and easy! A great choice to get started
Describe the feature
with ethProof the EthApi now has an expensive endpoint that should be ratelimited.
the tracing endpoints, like debug already have a shared
BlockingTaskGuard
:reth/crates/rpc/rpc/src/debug.rs
Lines 1024 to 1030 in edbbc96
However, these are aimed at the CPU, while eth_proof focuses more on the memory.
we can solve this with an additional guard in ethAPI itself. we want to explicitly restrict eth_getproof without interfering too much with the regular tracing calls.
TODO
This needs
proof_permits: usize
in the new function:reth/crates/rpc/rpc/src/eth/core.rs
Lines 40 to 47 in edbbc96
reth/crates/rpc/rpc/src/eth/core.rs
Line 156 in edbbc96
reth/crates/rpc/rpc-eth-api/src/helpers/blocking_task.rs
Line 10 in edbbc96
similar to
reth/crates/tasks/src/pool.rs
Lines 31 to 39 in edbbc96
Additional context
No response
The text was updated successfully, but these errors were encountered: