Decrease xchain rpc requests by using batching
Closed this issue · 1 comments
corverroos commented
Problem to Solve
Validators need to do a ton of requests to ensure they "vote for all source chain blocks (and conf levels)".
This currently results in an average of 50rps and bursts up to 200rps.
Proposed Solution
Batch the 2 event log get requests into a single batch requiest in xchain/provider/fetch.go::GetBlock
.
This should result in 25% decrease in request rate (since we query on average 4 requests per block which will be decreased to 3).
Note: are we sure all JSON-RPC provider support batching? Maybe this should be a feature to enable/disable?
fabtreb commented
@corverroos did this have the desired effect?