Skip to content

Made tcp connection context-aware#2718

Merged
pompon0 merged 110 commits intomainfrom
gprusak-tcp
Jan 21, 2026
Merged

Made tcp connection context-aware#2718
pompon0 merged 110 commits intomainfrom
gprusak-tcp

Conversation

@pompon0
Copy link
Contributor

@pompon0 pompon0 commented Jan 20, 2026

This simplifies usage of the connection (connection errors are not leaked all over the place) at the cost of running a background task for connection management. Additionally:

  • added a NodeSecretKey/NodePublicKey wrappers of ed25519 keys, which can be solely used for connection authentication (domain separation from validator keys)
  • rewritten (deprecated) protoio to handle context-aware connections
  • moved authentication from SecretConnection to Router.handshake, which will eventually also handle handshaking the giga p2p connections.
  • Moved p2p proto messages to use the the upstream proto generator.
  • renamed import from "proto" to (deprecated) "gogoproto" within sei-tendermint/internal to avoid collision with the upstream proto library that will replace gogoproto.

@github-actions
Copy link

github-actions bot commented Jan 20, 2026

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedJan 21, 2026, 5:30 PM

@pompon0 pompon0 marked this pull request as ready for review January 20, 2026 15:12
@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

❌ Patch coverage is 58.46154% with 162 lines in your changes missing coverage. Please review.
✅ Project coverage is 44.03%. Comparing base (65c8ad5) to head (70e2a97).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
sei-tendermint/libs/utils/tcp/tcp.go 18.66% 61 Missing ⚠️
sei-tendermint/internal/p2p/transport.go 69.84% 11 Missing and 8 partials ⚠️
sei-tendermint/internal/mux/mux.go 35.71% 8 Missing and 10 partials ⚠️
...-tendermint/internal/p2p/conn/secret_connection.go 72.30% 11 Missing and 7 partials ⚠️
sei-tendermint/internal/p2p/conn/protoio.go 55.17% 9 Missing and 4 partials ⚠️
sei-tendermint/internal/protoutils/msg.go 0.00% 8 Missing ⚠️
sei-tendermint/internal/p2p/conn/connection.go 80.55% 4 Missing and 3 partials ⚠️
sei-tendermint/internal/protoutils/conv.go 0.00% 7 Missing ⚠️
sei-tendermint/internal/p2p/conv.go 82.35% 3 Missing and 3 partials ⚠️
sei-tendermint/internal/p2p/router.go 87.17% 4 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2718      +/-   ##
==========================================
+ Coverage   44.01%   44.03%   +0.02%     
==========================================
  Files        1984     1986       +2     
  Lines      162891   162970      +79     
==========================================
+ Hits        71694    71762      +68     
- Misses      84670    84688      +18     
+ Partials     6527     6520       -7     
Flag Coverage Δ
sei-chain 46.20% <ø> (-0.01%) ⬇️
sei-cosmos 38.06% <ø> (+<0.01%) ⬆️
sei-db 68.72% <ø> (ø)
sei-tendermint 47.51% <58.46%> (+0.09%) ⬆️

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

Files with missing lines Coverage Δ
sei-tendermint/internal/mux/stream_state.go 87.50% <ø> (-0.26%) ⬇️
sei-tendermint/internal/p2p/testonly.go 68.94% <100.00%> (ø)
sei-tendermint/node/setup.go 66.54% <100.00%> (ø)
sei-tendermint/internal/p2p/router.go 76.80% <87.17%> (+4.16%) ⬆️
sei-tendermint/internal/p2p/conv.go 82.35% <82.35%> (ø)
sei-tendermint/internal/p2p/conn/connection.go 80.00% <80.55%> (-1.65%) ⬇️
sei-tendermint/internal/protoutils/conv.go 0.00% <0.00%> (ø)
sei-tendermint/internal/protoutils/msg.go 0.00% <0.00%> (ø)
sei-tendermint/internal/p2p/conn/protoio.go 55.17% <55.17%> (ø)
sei-tendermint/internal/mux/mux.go 75.00% <35.71%> (+1.05%) ⬆️
... and 3 more

... and 13 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.

import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"

Check notice

Code scanning / CodeQL

Sensitive package import Note

Certain system packages contain functions which may be a possible source of non-determinism
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"

Check notice

Code scanning / CodeQL

Sensitive package import Note

Certain system packages contain functions which may be a possible source of non-determinism
Base automatically changed from gprusak-mux to main January 21, 2026 16:37
@pompon0 pompon0 enabled auto-merge (squash) January 21, 2026 17:29
@pompon0 pompon0 merged commit 23fde73 into main Jan 21, 2026
38 of 41 checks passed
@pompon0 pompon0 deleted the gprusak-tcp branch January 21, 2026 18:01
yzang2019 added a commit that referenced this pull request Jan 21, 2026
* main:
  update: set MaxPacketMsgPayloadSize use MB unit (#2729)
  fix: set max packet msg payload default to 1MB (#2725)
  Add CI workflow to build libwasmvm dynamic libraries (#2724)
  Made tcp connection context-aware (#2718)
  tcp multiplexer for sei giga (#2679)
  [STO-237] remove unused cosmos invariants (#2719)
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.

4 participants