adds missing check for Seal.FinalState#8563
Conversation
proposed fix for onflow/flow-go-internal#7214; Summary: added a single localized check at the top of `validateSeal` method that retrieves the verified final state from `executionResult.FinalStateCommitment()` and rejects seals with mismatching `Seal.FinalState` by returning an `engine.NewInvalidInputErrorf`
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThis PR adds final-state integrity validation to the seal validator: validateSeal derives the expected final-state commitment from the execution result, returns an irrecoverable error if derivation fails, and rejects seals whose FinalState does not match; includes a test and a .gitignore update. ChangesSeal Final-State Integrity Validation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This comment has been minimized.
This comment has been minimized.
…e commitment is available for the sealed result
first AI DRAFT - Only partially REVIEWED by human
goal: fix missing check for
Seal.FinalState; details see: https://github.com/onflow/flow-go-internal/issues/7214Overview
validateSealmethod that retrieves the verified final state fromexecutionResult.FinalStateCommitment()and rejects seals with mismatchingSeal.FinalStateby returning anengine.NewInvalidInputErrorfErrNoChunks(prohibited by constructorflow.NewExecutionResult) is treated as an exception per high-assurance convention. Updated godoc to explain rationale.Summary by CodeRabbit
Bug Fixes
Tests
Chores