[Networking] Report message decode failures on staked channels to ALSP - #8696
[Networking] Report message decode failures on staked channels to ALSP#8696zhangchiqing wants to merge 2 commits into
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe change adds lazy peer identity resolution to authenticated message violations. Staked-channel decode and validation failures now reach ALSP with the peer identity. Public-channel failures remain excluded from ALSP reporting. ChangesAuthenticated violation reporting
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to Staked-channel decode and validation violations now include sender identity for ALSP reporting, while public-channel violations remain excluded. The covered behaviors preserve the intended reporting boundary and no merge-blocking risk remains. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Messages received on staked channels that fail to decode, or that fail structural validation in
ToInternal, were not being reported to the application-layer spam prevention manager because the violation carried a nilIdentity.Changes:
processAuthenticatedMessage, populateViolation.Identityfor all four decode/validation failure branches (unknown message code, unmarshal/invalid encoding, unexpected decode error, andToInternalfailure).Identity, preserving the existing exemption where the slashing consumer skips reporting.Tests added to
network/underlay/network_test.gocovering:ToInternalstructural validation on a staked channel is reported to ALSP.The related nil-identity sites on the unicast path (
handleIncomingStreamno-subscription and max-size branches) are left for a follow-up.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
Bug Fixes
Tests