Revert "Deduplicate partial and full GMessage validation logic (#1010)"#1014
Closed
Kubuxu wants to merge 1 commit into
Closed
Revert "Deduplicate partial and full GMessage validation logic (#1010)"#1014Kubuxu wants to merge 1 commit into
Kubuxu wants to merge 1 commit into
Conversation
This reverts commit 54abe92. Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
There was a problem hiding this comment.
Pull Request Overview
This PR reverts commit 54abe92 that deduplicated partial and full GMessage validation logic in order to address anomalies observed in metrics. The changes restore separate validation implementations and associated types across the codebase.
- Restores the standalone partial validator in pmsg/partial_validator.go.
- Reverts type and pointer changes from gpbft.PartialGMessage to pmsg.PartialGMessage in multiple files.
- Reinstates the original validator and participant implementations with separate handling for full and partial messages.
Reviewed Changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pmsg/partial_validator.go | Adds back the dedicated partial validator implementation and reintroduces its comments. |
| pmsg/partial_msg.go | Reverts type changes and pointer usage for partial messages, ensuring consistency. |
| gpbft/validator.go | Reverts changes in validation logic and error/wrapping messages to restore original behavior. |
| (Other files) | Update references from gpbft.PartialGMessage to pmsg.PartialGMessage across the project. |
Comments suppressed due to low confidence (3)
pmsg/partial_validator.go:33
- [nitpick] Consider expanding this TODO comment with a reference to a tracked issue or an outline of the future refactoring plan so that the technical debt is clearly documented for future improvements.
// TODO: Reduce duplicate code between this and the full validator. Doing this ...
pmsg/partial_msg.go:139
- [nitpick] Verify that the conversion to using pointers for PartialGMessage in the LRU cache and associated helper functions is fully consistent, ensuring no nil dereference issues occur during concurrent processing.
inferJustificationVoteValue(pgmsg.PartialGMessage)
gpbft/validator.go:90
- [nitpick] Double-check that the revised error wrapping and logging messages maintain our standard format across all validators, so that future debugging and metric attribution remain consistent.
if cacheMessage { if _, err := v.cache.Add(msg.Vote.Instance, messageCacheNamespace, buf.Bytes()); err != nil {
BigLep
approved these changes
Jun 12, 2025
Contributor
Author
|
After trawling through the logs, it seems like input to signature validation is wrong somewhere in the new code. |
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.
This reverts commit 54abe92.
We've observed an anomaly in metrics when running this code.
Reverting it temporarily to prevent it from being included in a release until the root cause is identified.