Reintroduced caching to kate RPC's #739
Open
+355
−54
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request type
Please add the labels corresponding to the type of changes your PR introduces:
Description
Constructing the evaluation grid and polynomial grid is one of the most resource-intensive operations in Kate RPCs. This PR introduces caching for both grids, which optimizes performance for
kate_queryProofandkate_queryRows. The cache sizes for these grids can be configured using the CLI options--kate-eval-grid-sizeand--kate-poly-grid-size.TODO
Since the implementation of
kate_queryProofandkate_queryRowsRPCs has been moved to the client, the runtime APIs currently used by these RPCs should be removed in an upcoming RTU once all nodes have upgraded to binaries containing this version or later.Checklist
cargo test.cargo fmt.cargo build --releaseandcargo build --release --features runtime-benchmarks.cargo clippy.