Merged
Conversation
rkapka
previously approved these changes
Jul 31, 2025
Reported by NuConstruct The stater package looks for a stateroot using the head state from the blockchain package. However, this state is very unlikely to have the poststateroot since that's only added after slot processing. I assume that essentially any REST endpoint that uses this mechanism to get head is broken if it needs to gather a state by stateroot. This PR is a placeholder to verify this is the issue, here I just check if the NSC already has the post-state since that will have already the processing state cached.
james-prysm
reviewed
Aug 6, 2025
| if err != nil { | ||
| return errors.Wrap(err, "could not get parent state") | ||
| // Check if the state is already cached | ||
| parentState := transition.NextSlotState(parentBlockRoot[:], blk.Block().Slot()) |
Contributor
There was a problem hiding this comment.
I wonder if this needs to be a function on s*Server if we might need to fix it elsewhere too
rkapka
approved these changes
Aug 7, 2025
jtraglia
pushed a commit
to jtraglia/prysm
that referenced
this pull request
Aug 11, 2025
* Fix validateConsensus Reported by NuConstruct The stater package looks for a stateroot using the head state from the blockchain package. However, this state is very unlikely to have the poststateroot since that's only added after slot processing. I assume that essentially any REST endpoint that uses this mechanism to get head is broken if it needs to gather a state by stateroot. This PR is a placeholder to verify this is the issue, here I just check if the NSC already has the post-state since that will have already the processing state cached. * Add changelog * add fallback * Fix tests
fernantho
pushed a commit
to fernantho/prysm
that referenced
this pull request
Sep 26, 2025
* Fix validateConsensus Reported by NuConstruct The stater package looks for a stateroot using the head state from the blockchain package. However, this state is very unlikely to have the poststateroot since that's only added after slot processing. I assume that essentially any REST endpoint that uses this mechanism to get head is broken if it needs to gather a state by stateroot. This PR is a placeholder to verify this is the issue, here I just check if the NSC already has the post-state since that will have already the processing state cached. * Add changelog * add fallback * Fix tests
fernantho
pushed a commit
to fernantho/prysm
that referenced
this pull request
Sep 26, 2025
* Fix validateConsensus Reported by NuConstruct The stater package looks for a stateroot using the head state from the blockchain package. However, this state is very unlikely to have the poststateroot since that's only added after slot processing. I assume that essentially any REST endpoint that uses this mechanism to get head is broken if it needs to gather a state by stateroot. This PR is a placeholder to verify this is the issue, here I just check if the NSC already has the post-state since that will have already the processing state cached. * Add changelog * add fallback * Fix tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Reported by NuConstruct
The stater package looks for a stateroot using the head state from the blockchain package. However, this state is very unlikely to have the poststateroot since that's only added after slot processing. I assume that essentially any REST endpoint that uses this mechanism to get head is broken if it needs to gather a state by stateroot.
This PR is a placeholder to verify this is the issue, here I just check if the NSC already has the post-state since that will have already the processing state cached.