-
Notifications
You must be signed in to change notification settings - Fork 39
Fix ErrMessageAtStartSequenceIDNotFound during report generation #1206
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
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
| // If the start sequence ID is 0, it is the first report and we should start from minute 0 since there are no preceding reports | ||
| var startMinute int32 | ||
| if startEnvelope.OriginatorSequenceID() == 0 { | ||
| if startEnvelope == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change 1) here
| if err != nil { | ||
| return nil, nil, ErrMessageAtStartSequenceIDNotFound | ||
| } | ||
| var startEnvelope *envelopes.OriginatorEnvelope |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change 2) here
|
All relevant changes are in the |
neekolas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change makes sense. Thanks for fixing my dumb bug
Fix report verification to avoid
ErrMessageAtStartSequenceIDNotFoundby treatingStartSequenceID == 0as the first report inpayerreport.PayerReportVerifierUpdate report verification to handle first reports without a start envelope and expose types required by tests.
payerreport.PayerReportVerifier.getStartAndEndMessagesto return a nil start envelope whenstartSequenceID == 0, avoiding a lookup and error in verifier.gopayerreport.PayerReportVerifier.verifyMerkleRootto setstartMinute = 0when the start envelope is nil in verifier.gopayerreport.PayerMapand update call sites in generator.go and merkle.gopayerreport.GenerateMerkleTreeTestBinding,payerreport.ValidateReportTransitionTestBinding, andpayerreport.ValidateReportStructureTestBindingin testbindings_test.go📍Where to Start
Start with
payerreport.PayerReportVerifier.getStartAndEndMessagesandpayerreport.PayerReportVerifier.verifyMerkleRootin verifier.go.Macroscope summarized f1bc7dd.