Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Move RPC root check to underlying Blockstore functions #33991

Closed

Conversation

steviez
Copy link
Contributor

@steviez steviez commented Nov 8, 2023

Problem

The getBlock and getBlockTime methods perform several checks to return a proper error when commitment level finalized is passed. Currently, most of these checks occur within the underlying Blockstore methods, but one of these checks occurs in rpc.rs. It would be better to have all of the checks in the same location.

Summary of Changes

Move the logic that checks whether a requested slot exceeds the Blockstore's maximum root from JsonRpcRequestProcessor to Blockstore. The result is that the previous function in JsonRpcRequestProcessor simply translates BlockstoreError to the appropriate RPC error type.

This is a spin out from #33901 (comment).

@steviez steviez changed the title Rpc bounds check to bstore Move RPC root check to underlying Blockstore functions Nov 8, 2023
@github-actions github-actions bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Nov 23, 2023
@github-actions github-actions bot closed this Nov 30, 2023
@steviez steviez reopened this Nov 30, 2023
@steviez steviez removed the stale [bot only] Added to stale content; results in auto-close after a week. label Nov 30, 2023
@github-actions github-actions bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Dec 15, 2023
@steviez steviez removed the stale [bot only] Added to stale content; results in auto-close after a week. label Dec 15, 2023
@github-actions github-actions bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Jan 1, 2024
@steviez steviez removed the stale [bot only] Added to stale content; results in auto-close after a week. label Jan 3, 2024
@github-actions github-actions bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Jan 18, 2024
@github-actions github-actions bot closed this Jan 25, 2024
@CriesofCarrots
Copy link
Contributor

@steviez , should we reopen this? Can't remember if we ever discussed it

@steviez
Copy link
Contributor Author

steviez commented Jan 25, 2024

@steviez , should we reopen this? Can't remember if we ever discussed it

Yeah definitely; when I was last looking at it, I discovered a secondary issue and then other stuff came up. Still on my backlog tho and reopening

@steviez
Copy link
Contributor Author

steviez commented Jan 25, 2024

Actually, I still have the GH issues for tracking work so I'm going to let this PR close out; I already see a merge conflict and re-approaching this problem with a fresh view could be beneficial.

For the sake of paper-trail, the GH issues related to the work this PR was looking to address are #33859 AND #33858

@steviez steviez closed this Jan 25, 2024
@steviez steviez deleted the rpc_bounds_check_to_bstore branch January 25, 2024 17:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stale [bot only] Added to stale content; results in auto-close after a week.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants