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

Race condition in handle_load_stacks_chain_tip for rpc requests #2977

Open
pavitthrap opened this issue Dec 17, 2021 · 3 comments
Open

Race condition in handle_load_stacks_chain_tip for rpc requests #2977

pavitthrap opened this issue Dec 17, 2021 · 3 comments
Assignees
Labels
icebox Issues that are not being worked on

Comments

@pavitthrap
Copy link
Contributor

The function handle_load_stacks_chain_tip (in rpc.rs) is used to load the stacks tip against which an rpc request is executed.
The function will load the latest unconfirmed tip if that is requested. However, it is possible that this tip will be invalidated by the time the it is used in maybe_read_only_clarity_tx.

The consequences of this race would be that the user would receive a 404 response.

If this race condition seems to happen frequently, we can modify maybe_read_only_clarity_tx to reload the unconfirmed tip again if it is found to be invalid.

This race condition was mentioned by @jcnelson in PR #2778

@stale
Copy link

stale bot commented Dec 24, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 24, 2022
@jcnelson
Copy link
Member

This is not stale; it's a back-burner task.

@jcnelson
Copy link
Member

Temporarily assigning to @pavitthrap so this has an owner. Please feel free to reassign.

@pavitthrap pavitthrap added icebox Issues that are not being worked on and removed back-burner labels Apr 3, 2023
@pavitthrap pavitthrap assigned wileyj and unassigned pavitthrap Jul 14, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New in Stacks Core Eng Aug 4, 2023
@wileyj wileyj moved this from 🆕 New to 📋 Backlog in Stacks Core Eng Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
icebox Issues that are not being worked on
Projects
Status: Status: 📋 Backlog
Development

No branches or pull requests

3 participants