Skip to content

MCP-18: Add deterministic MCP transaction ordering helpers#31

Open
aeyakovenko wants to merge 306 commits intoanza-xyz:masterfrom
aeyakovenko:issue-1-mcp-ordered-output
Open

MCP-18: Add deterministic MCP transaction ordering helpers#31
aeyakovenko wants to merge 306 commits intoanza-xyz:masterfrom
aeyakovenko:issue-1-mcp-ordered-output

Conversation

@aeyakovenko
Copy link
Copy Markdown

Summary

  • add ledger/src/mcp_ordering.rs with deterministic ordering helpers for reconstructed proposer batches:
    • concat_batches_by_proposer_index(...)
    • order_batches_by_fee_desc(...)
  • enforce canonical concat order by proposer_index ascending
  • enforce B2 ordering policy (highest fee first) with stable tie-break semantics from concatenated order
  • add unit tests for:
    • deterministic concatenation
    • descending-fee ordering
    • stable tie behavior

Why this shape

  • isolates deterministic ordering logic in a small, reusable module
  • aligns with updated MCP policy decisions without changing replay-stage wiring yet

Tests

  • cargo test -p solana-ledger --lib mcp_ordering::tests -- --nocapture

Fixes #1

@aeyakovenko aeyakovenko force-pushed the issue-1-mcp-ordered-output branch from dcaf71a to 691e416 Compare February 8, 2026 15:24
# Conflicts:
#	ledger/src/shred/mcp_shred.rs
#	plan.md
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.

MCP-18 Replay: output ordered transactions

1 participant