Skip to content

Conversation

@pompon0
Copy link
Contributor

@pompon0 pompon0 commented Jan 27, 2026

GigaRouter is a router which will handle seigiga p2p connections. GigaRouter shares the tcp port with SeiV2 Router - I've added a bool flag to the handshake message to distinguish one from another (for backward compatibility both peers need to set it for the connection to be considered Giga). It can be enabled by setting Giga config in the RouterOptions. Currently it is hardcoded to None (i.e. disabled). It is a stub in a sense that all the autobahn RPCs are already defined, but there is no logic handling those. The next PR will be porting the autobahn core logic to sei-chain. Additionally:

  • mux was moved under internal/p2p directory
  • (initial version of) rpc framework was implemented on top of mux
  • MConnection was moved from p2p/conn/connection.go to p2p/conn/oldmux.go
  • autobahn message types have been copied over from sei-v3

@github-actions
Copy link

github-actions bot commented Jan 27, 2026

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedJan 29, 2026, 3:07 PM

@codecov
Copy link

codecov bot commented Jan 27, 2026

Codecov Report

❌ Patch coverage is 60.13180% with 242 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.64%. Comparing base (3bb32df) to head (ebfd9db).

Files with missing lines Patch % Lines
sei-tendermint/internal/p2p/rpc/rpc.go 12.28% 49 Missing and 1 partial ⚠️
sei-tendermint/internal/p2p/giga_router.go 0.00% 48 Missing ⚠️
sei-tendermint/internal/p2p/giga/pool.go 0.00% 41 Missing ⚠️
sei-tendermint/internal/p2p/handshake.go 54.90% 13 Missing and 10 partials ⚠️
sei-tendermint/libs/utils/tcp/tcp.go 0.00% 21 Missing ⚠️
sei-tendermint/internal/p2p/conn/oldmux.go 92.74% 12 Missing and 6 partials ⚠️
...ndermint/internal/autobahn/pb/autobahn.hashable.go 0.00% 13 Missing ⚠️
sei-tendermint/libs/utils/wait.go 28.57% 10 Missing ⚠️
sei-tendermint/internal/p2p/conn/testonly.go 83.92% 9 Missing ⚠️
sei-tendermint/internal/p2p/router.go 83.72% 4 Missing and 3 partials ⚠️
... and 1 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2775      +/-   ##
==========================================
+ Coverage   47.09%   56.64%   +9.54%     
==========================================
  Files        1939     2015      +76     
  Lines      159354   165305    +5951     
==========================================
+ Hits        75053    93633   +18580     
+ Misses      77801    63468   -14333     
- Partials     6500     8204    +1704     
Flag Coverage Δ
sei-chain 41.46% <1.15%> (-0.17%) ⬇️
sei-cosmos 48.13% <ø> (+<0.01%) ⬆️
sei-db 68.72% <ø> (ø)
sei-tendermint 57.95% <60.13%> (?)

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

Files with missing lines Coverage Δ
sei-tendermint/internal/p2p/conn/connection.go 0.00% <ø> (ø)
sei-tendermint/internal/p2p/conn/protoio.go 75.86% <100.00%> (+75.86%) ⬆️
sei-tendermint/internal/p2p/mux/mux.go 74.10% <ø> (ø)
sei-tendermint/internal/p2p/mux/stream.go 87.50% <ø> (ø)
sei-tendermint/internal/p2p/mux/stream_state.go 87.50% <ø> (ø)
sei-tendermint/internal/p2p/routeroptions.go 86.04% <ø> (+86.04%) ⬆️
sei-tendermint/internal/p2p/transport.go 83.72% <100.00%> (+83.72%) ⬆️
sei-tendermint/internal/hashable/testonly.go 0.00% <0.00%> (ø)
sei-tendermint/internal/p2p/router.go 83.18% <83.72%> (+83.18%) ⬆️
sei-tendermint/internal/p2p/conn/testonly.go 83.92% <83.92%> (ø)
... and 8 more

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

Comment on lines +270 to +274
for _, ch := range q.channels {
// Exponential decay of stats.
// TODO(gprusak): This is not atomic at all.
ch.recentlySent.Store(uint64(float64(ch.recentlySent.Load()) * 0.8))
}

Check warning

Code scanning / CodeQL

Iteration over map Warning

Iteration over map may be a possible source of non-determinism
for {
if q.ping {
q.ping = false
q.setFlush(time.Now())

Check warning

Code scanning / CodeQL

Calling the system time Warning

Calling the system time may be a possible source of non-determinism
}
if q.pong {
q.pong = false
q.setFlush(time.Now())

Check warning

Code scanning / CodeQL

Calling the system time Warning

Calling the system time may be a possible source of non-determinism
Comment on lines +306 to +314
for _, channel := range q.channels {
if channel.queue.Len() == 0 {
continue
}
if ratio := channel.ratio(); ratio < leastRatio {
leastRatio = ratio
leastChannel = channel
}
}

Check warning

Code scanning / CodeQL

Iteration over map Warning

Iteration over map may be a possible source of non-determinism
}
}
if leastChannel != nil {
q.setFlush(time.Now().Add(c.config.FlushThrottle))

Check warning

Code scanning / CodeQL

Calling the system time Warning

Calling the system time may be a possible source of non-determinism
_ "github.com/tendermint/tendermint/internal/hashable/pb"
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
for _, ch := range q.channels {
// Exponential decay of stats.
// TODO(gprusak): This is not atomic at all.
ch.recentlySent.Store(uint64(float64(ch.recentlySent.Load()) * 0.8))

Check notice

Code scanning / CodeQL

Floating point arithmetic Note

Floating point arithmetic operations are not associative and a possible source of non-determinism
}

func (ch *sendChannel) ratio() float32 {
return float32(ch.recentlySent.Load()) / float32(ch.desc.Priority)

Check notice

Code scanning / CodeQL

Floating point arithmetic Note

Floating point arithmetic operations are not associative and a possible source of non-determinism
"github.com/tendermint/tendermint/libs/utils"
"github.com/tendermint/tendermint/libs/utils/scope"
"golang.org/x/time/rate"
"reflect"

Check notice

Code scanning / CodeQL

Sensitive package import Note

Certain system packages contain functions which may be a possible source of non-determinism
@pompon0 pompon0 marked this pull request as ready for review January 27, 2026 16:31
@pompon0 pompon0 requested a review from stevenlanders January 27, 2026 16:31
@pompon0 pompon0 assigned arajasek and unassigned arajasek Jan 27, 2026
@pompon0 pompon0 requested review from arajasek and sei-will January 27, 2026 16:31
@pompon0 pompon0 changed the title Added GigaRouter stub. Added GigaRouter stub (CON-157) Jan 27, 2026
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