feat: validate received headers were actually requested#438
feat: validate received headers were actually requested#438xdustinface merged 1 commit intov0.42-devfrom
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthroughReject unrequested or post-checkpoint headers in SegmentState::receive_headers, make tip segment accept unsolicited post-sync headers by resetting completion and marking them in-flight, expose Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 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 |
140672f to
e130389
Compare
Reject headers in `SegmentState::receive_headers` if the coordinator does not recognize the `prev_hash` as an in-flight request. Returns an `InvalidState` error instead of silently processing unexpected responses. Also adjust the post-sync processing to allow for unrequested headers since we don't request post-sync headers, they get announced.
|
This PR has merge conflicts with the base branch. Please rebase or merge the base branch into your branch to resolve them. |
e130389 to
c871e02
Compare
Reject headers in
SegmentState::receive_headersif the coordinatordoes not recognize the
prev_hashas an in-flight request. Returns anInvalidStateerror instead of silently processing unexpected responses.Also adjust the post-sync processing to allow for unrequested headers since we don't request post-sync headers, they get announced.
Summary by CodeRabbit
Bug Fixes
Behavior Changes
Tests