Skip to content

Conversation

@pompon0
Copy link
Contributor

@pompon0 pompon0 commented Jan 8, 2026

TCP Multiplexer for sei giga. It is a replacement for sei-tendermint/internal/p2p/conn.MConnection. It will be used with autobahn only (currently unused). The high level overview of the protocol is described in package comment in mux/mux.go

}
}
return n, err
panic("unreachable")

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods Warning

Possible panics in BeginBock- or EndBlock-related consensus methods could cause a chain halt
Comment on lines +405 to +410
for kind, c := range cfg.Kinds {
kinds[kind] = &kindState{
acceptsQueue: make(chan *streamState, c.MaxAccepts),
connectsQueue: make(chan *streamState, c.MaxConnects),
}
}

Check warning

Code scanning / CodeQL

Iteration over map Warning

Iteration over map may be a possible source of non-determinism
Comment on lines +49 to +55
for kind, c := range h.Kinds {
kinds = append(kinds, &pb.StreamKindConfig{
Kind: uint64(kind),
MaxConnects: c.MaxConnects,
MaxAccepts: c.MaxAccepts,
})
}

Check warning

Code scanning / CodeQL

Iteration over map Warning

Iteration over map may be a possible source of non-determinism
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
Comment on lines +364 to +373
for kind, cfg := range m.cfg.Kinds {
remCfg, ok := handshake.Kinds[kind]
if !ok {
remCfg = &StreamKindConfig{}
}
inner.acceptsSem[kind] = min(cfg.MaxAccepts, remCfg.MaxConnects)
for range min(cfg.MaxConnects, remCfg.MaxAccepts) {
m.kinds[kind].connectsQueue <- inner.newConnectStream(kind)
}
}

Check warning

Code scanning / CodeQL

Iteration over map Warning

Iteration over map may be a possible source of non-determinism
@pompon0 pompon0 changed the title Gprusak mux tcp multiplexer for sei giga Jan 13, 2026
@pompon0 pompon0 marked this pull request as ready for review January 13, 2026 16:04
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