Repository navigation
fix(syncing): reject DA signed data without metadata - #3500
Conversation
tryDecodeData used Data accessors (DACommitment, Height) that dereference Metadata, but a decoded blob may carry nil Metadata. Guard for it after signature validation and skip the blob instead of dereferencing. Adds a regression test for a validly-signed blob with no metadata.
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Metadata validation and regression test block/internal/syncing/da_retriever.go, block/internal/syncing/da_retriever_test.go |
tryDecodeData logs and rejects signed data with nil metadata before accessing commitment or height fields. The regression test checks that the method returns nil. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers: tac0turtle
Merge Risk: 
Minimal · up to af242
-
No actionable merge-blocking risk remains from the reviewed change.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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 @coderabbitai help to get the list of available commands.
|
The latest Buf updates on your PR. Results from workflow CI / buf-check (pull_request).
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3500 +/- ##
==========================================
- Coverage 69.31% 69.31% -0.01%
==========================================
Files 122 122
Lines 12216 12219 +3
==========================================
+ Hits 8468 8470 +2
- Misses 3748 3749 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Fixing lint |
staticcheck QF1008: SignedData embeds Data, so signedData.Metadata is enough.
Overview
tryDecodeDataused Data accessors(DACommitment, Height)that dereference Metadata, but a decoded blob may carry nil Metadata. Guard for it after signature validation and skip the blob instead of dereferencing.Adds a regression test for a validly-signed blob with no metadata.
Summary by CodeRabbit