Skip to content

Conversation

@qj0r9j0vc2
Copy link
Member

Summary

  • Add bidirectional network capability to TcpWorkerNetwork (listener + connection handling)
  • Add worker_sender() getter to PrimaryHandle for bridge tasks
  • Spawn Workers in node.rs and wire up Primary ↔ Worker ↔ Network bridges

Problem

Consensus was stuck at height 1 with "Still waiting for cut" because Workers could not receive batch broadcasts from peers. TcpWorkerNetwork only had send capability, so batches never propagated, Primaries couldn't verify batch availability, and no attestations were generated.

Solution

  1. network.rs: Added start_listener(), handle_connection(), and connect_to_all_peers() to TcpWorkerNetwork
  2. runner.rs: Added worker_sender() getter for channel cloning
  3. node.rs: Workers now spawn with network listeners and bridge tasks for:
    • Primary → Worker (batch requests)
    • Worker → Primary (batch availability)
    • Network → Worker (peer messages)

Test plan

  • All 102 data-chain tests pass
  • All 66 node tests pass
  • Clippy clean with no warnings
  • Manual test with 4-validator testnet

@qj0r9j0vc2 qj0r9j0vc2 merged commit f629b82 into main Jan 20, 2026
9 checks passed
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.

2 participants