Skip to content

MCP: Node binary - #3262

Merged
michael-yxchen merged 1 commit into
mcp-devfrom
xinyuan/node-binary
Sep 17, 2026
Merged

michael-yxchen merged 1 commit into
mcp-devfrom
xinyuan/node-binary

Conversation

@xinyuan-dev

@xinyuan-dev xinyuan-dev commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

This PR implements a simple node binary for MCP for testing.

  • The Node runs three tasks simultaneously (using tokio::spawn):
    • CadenceTask runs cadence state machine and bridges cadence events
    • DATask runs da state machine and bridges its events
    • ProposingTask runs a mock proposing state machine, that emits proposals when polled
  • The Node tracks timers internally, using tokio's DelayQueue.
  • The Node talks to a NetworkHandle to sends/receives one of three variants of networking messages (pre-serialized):
    • Cadence
    • Chunk
    • ChunkRequest
    • (all network messages must be authenticated by networking adaptor)
  • A Node is constructed solely from a NodeConfig, deserialized from a toml config, that contains all parameters of the chain and the node itself
  • Stubbed components
    • types: node id/pub key/etc still uses the small stub types
    • udp network: packet is just [sender(8), variant(1), payload] over udp. packets larger than mtu is dropped.
    • proposing logic: propose random bytes of random length 1B-1MiB, proposed at slot deadlines - C
    • proposer election: simple rotating seats
    • finalization: only logging

The monad-mcp-node crate includes two binaries:

  • monad-mcp-node: $0 <config.toml> runs a standalone node
    • monad-mcp-node/swarm.sh <n_val> <m_sec> runs a swarm using the standalone node as processes
  • examples/swarm: $0 <n_val> <m_sec> runs a swarm of n validators for m seconds in the same process, communicating through real network (loopback interface)

The code is mostly generated using Claude Fable 5.1 and GPT 6.

@xinyuan-dev
xinyuan-dev added this pull request to stack #3261 September 15, 2026 13:27
Base automatically changed from xinyuan/proposal-assembly to mcp-dev September 17, 2026 20:43
@michael-yxchen
michael-yxchen merged commit 9c74ea5 into mcp-dev Sep 17, 2026
12 of 17 checks passed
@michael-yxchen
michael-yxchen deleted the xinyuan/node-binary branch September 17, 2026 20:43
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