Skip to content

Latest simplex changes#42

Merged
bvscd merged 2 commits intorelease/node/v0.4.0from
simplex_upgrade
Apr 1, 2026
Merged

Latest simplex changes#42
bvscd merged 2 commits intorelease/node/v0.4.0from
simplex_upgrade

Conversation

@bvscd
Copy link
Copy Markdown
Collaborator

@bvscd bvscd commented Apr 1, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 1, 2026 06:27
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces significant updates to the TON Rust node's Simplex consensus implementation, focusing on protocol enhancements for broadcast messaging, session lifecycle management, and configuration restructuring. The changes maintain backward compatibility while enabling improved consensus operation through optional broadcast metadata transmission and controlled session initialization.

Changes:

  • Enhanced broadcast protocol with optional extra metadata field to support consensus.broadcastExtra containing slot information in two-step broadcasts
  • Introduced Session::start() gate to defer FSM timeout clock until explicitly signaled, allowing overlays to warm up peer connections before consensus processing begins
  • Refactored SimplexConfig to separate critical fields (use_quic, slots_per_leader_window) from tunable parameters in NoncriticalParams with backward compatibility for v1/v2 deserialization
  • Updated all ConsensusOverlay implementations to support new broadcast metadata parameter consistently across 8+ implementations
  • Updated test infrastructure including test helper method renames and QuicNode constructor parameter additions
  • Enhanced validator session listener with atomic stalled flag management for improved state tracking

Reviewed changes

Copilot reviewed 69 out of 69 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/tl/ton_api/tl/ton_api.tl Added extra:bytes fields to two-step broadcast types and new consensus.broadcastExtra type definition
src/adnl/src/overlay/broadcast.rs Implemented extra field handling in BroadcastTwostepFecProtocol and BroadcastTwostepSimpleProtocol
src/adnl/src/overlay/mod.rs Added broadcast_twostep method with extra parameter routing to protocol implementations
src/node/consensus-common/src/lib.rs Added Session::start() method to trait and send_broadcast_fec_ex with extra parameter
src/node/validator-session/src/session.rs Implemented Session trait with start() method and LoopbackOverlay with extra parameter support
src/node/tests/compat_test/src/test_helpers.rs Updated broadcast method signatures and QuicNode constructor calls
src/node/tests/compat_test/tests/test_twostep_fec_relay.rs Renamed send_broadcast_two_step to send_broadcast_twostep
src/node/src/validator/validator_session_listener.rs Added g.stalled atomic flag management with Ordering::Relaxed

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bvscd bvscd force-pushed the simplex_upgrade branch from 055efdc to 2ad771d Compare April 1, 2026 06:44
@bvscd bvscd merged commit d954d0c into release/node/v0.4.0 Apr 1, 2026
5 checks passed
@bvscd bvscd deleted the simplex_upgrade branch April 1, 2026 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants