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

Move update next slot cache earlier #12321

Merged
merged 4 commits into from
Apr 25, 2023
Merged

Conversation

terencechain
Copy link
Member

@terencechain terencechain commented Apr 23, 2023

Update next slot cache currently happens after many things.

  • forkchoice methods
  • setter methods

This PR moves it earlier to the right after update head and only if it's head. There's no reason to wait for this

@terencechain terencechain requested a review from a team as a code owner April 23, 2023 10:17
Copy link
Contributor

@potuz potuz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want this, we want at the very least to have run forkchoice to ascertain the incoming block was head or similar. Even in the current implementation syncing an old non canonical block will corrupt the nsc with mostly useless info. I think you want to move it here so that you can have it before FCU and thus use it to get the payloadattributes. I suspect it's best to do it after forkchoice and only for canonical blocks

@terencechain
Copy link
Member Author

I don't think we want this, we want at the very least to have run forkchoice to ascertain the incoming block was head or similar. Even in the current implementation syncing an old non canonical block will corrupt the nsc with mostly useless info. I think you want to move it here so that you can have it before FCU and thus use it to get the payloadattributes. I suspect it's best to do it after forkchoice and only for canonical blocks

Currently, today's behavior, it's triggered based on a newly arrived block, not a canonical block. This PR doesn't change it but I get what you meant by altering the behavior to only update NSC for the canonical block. I can update to that

@terencechain terencechain self-assigned this Apr 24, 2023
@terencechain terencechain added the Ready For Review A pull request ready for code review label Apr 24, 2023
@prylabs-bulldozer prylabs-bulldozer bot merged commit fa7a2bd into develop Apr 25, 2023
@delete-merged-branch delete-merged-branch bot deleted the mv-update-nsc-earlier branch April 25, 2023 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants