Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw an error when historical state data is not available (when running a full node) #12977

Open
antonis19 opened this issue Dec 3, 2024 · 0 comments
Assignees
Labels
erigon3 imp1 High importance
Milestone

Comments

@antonis19
Copy link
Member

Rationale

When running a full node and serving a historical RPC request, the data for an old block or transaction might be pruned. In that case we should throw an error denoting that this data is not available instead of incorrectly using the latest state data.

Related issue: #12292

Why should this feature exist?

For more clarity in error messages of RPC responses of full nodes.

Implementation

We need make sure that when historical data is not available a suitable error is captured and thrown, instead of receiving latest state data.

Additionally we may want to use the mode the node is in (full or archive), and if it is full we can preempt the attempt to serve old historical data by immediately returning with an error.

@antonis19 antonis19 added imp1 High importance erigon3 labels Dec 3, 2024
antonis19 added a commit that referenced this issue Dec 6, 2024
Throw error in `seekInFiles` if txNum is less than smallest txNum in
files.

Eventually this error needs to be handled by IntrablockState, and
ideally the RPC call layer should check if the data is available to
serve the request, but that will be a feature for later.

Issue: #12977

Co-authored-by: antonis19 <[email protected]>
@VBulikov VBulikov added this to the 3.0.0-beta2 milestone Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
erigon3 imp1 High importance
Projects
None yet
Development

No branches or pull requests

2 participants