Skip to content

autobahn parsing fixes (CON-311)#3541

Merged
pompon0 merged 2 commits into
mainfrom
gprusak-autobahn-parsing
Jun 4, 2026
Merged

autobahn parsing fixes (CON-311)#3541
pompon0 merged 2 commits into
mainfrom
gprusak-autobahn-parsing

Conversation

@pompon0

@pompon0 pompon0 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

giga p2p connection Request/Response types ad-hoc parsing was vulnerable to nil dereference.

@cursor

cursor Bot commented Jun 3, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Touches consensus-related P2P ingest paths, but changes are mostly structural validation with round-trip tests and should reduce crash risk from hostile wire data.

Overview
Centralizes giga P2P wire handling behind typed protoutils.Conv helpers in types.go, and routes availability/data streaming RPCs (avail.go, data.go) through those encoders/decoders instead of reading protobuf fields directly.

Incoming messages now use DecodeReq-style validation on nested signed votes/proposals and QC payloads, so malformed or partially empty peer messages return errors instead of risking nil dereferences during ad-hoc parsing. GetBlock responses are modeled as an optional block (GetBlockRespConv + utils.Option) rather than checking resp.Block == nil after a partial decode.

Adds types_test.go round-trip tests for the new converters; fixes a mislabeled AppVote decode error string on the client app-votes stream.

Reviewed by Cursor Bugbot for commit 017e4e3. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedJun 3, 2026, 4:17 PM

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedJun 3, 2026, 3:24 PM

@codecov

codecov Bot commented Jun 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.92593% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.29%. Comparing base (2151ba0) to head (017e4e3).

Files with missing lines Patch % Lines
sei-tendermint/internal/p2p/giga/avail.go 58.62% 5 Missing and 7 partials ⚠️
sei-tendermint/internal/p2p/giga/data.go 68.18% 3 Missing and 4 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3541      +/-   ##
==========================================
- Coverage   59.12%   58.29%   -0.83%     
==========================================
  Files        2213     2141      -72     
  Lines      182814   174520    -8294     
==========================================
- Hits       108096   101745    -6351     
+ Misses      64993    63727    -1266     
+ Partials     9725     9048     -677     
Flag Coverage Δ
sei-chain-pr 68.76% <85.92%> (?)
sei-db 70.41% <ø> (ø)
sei-db-state-db ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
sei-tendermint/internal/p2p/giga/types.go 100.00% <100.00%> (ø)
sei-tendermint/internal/p2p/giga/data.go 67.34% <68.18%> (-1.20%) ⬇️
sei-tendermint/internal/p2p/giga/avail.go 58.82% <58.62%> (-1.05%) ⬇️

... and 73 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pompon0 pompon0 added this pull request to the merge queue Jun 4, 2026
Merged via the queue into main with commit 3151fbd Jun 4, 2026
80 of 82 checks passed
@pompon0 pompon0 deleted the gprusak-autobahn-parsing branch June 4, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants