-
Notifications
You must be signed in to change notification settings - Fork 863
tcp multiplexer for sei giga #2679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| 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
codchen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logics themselves look good. Have a q about context
|
|
||
| // NewMux constructs a new multipexer. | ||
| // Remember to spawn Mux.Run() afterwards. | ||
| func NewMux(cfg *Config) *Mux { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the input/output of this multiplexer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Streams of messages of fixed size. This will be used for p2p communication between nodes in giga (mainly consensus messages and block syncing). It is like a gRPC server/client, but with stricter semantics.
* 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)
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