Skip to content

MCP-17: add two-pass fee-only and skip-fee replay controls#41

Open
aeyakovenko wants to merge 306 commits intoanza-xyz:masterfrom
aeyakovenko:issue-8-mcp-two-pass-fees
Open

MCP-17: add two-pass fee-only and skip-fee replay controls#41
aeyakovenko wants to merge 306 commits intoanza-xyz:masterfrom
aeyakovenko:issue-8-mcp-two-pass-fees

Conversation

@aeyakovenko
Copy link
Copy Markdown

Summary

  • add MCP two-pass fee primitives in SVM and Bank
  • svm::transaction_processor:
    • add TransactionProcessingConfig.skip_fee_collection for second-pass execution without fee re-deduction
    • add collect_fees_only_sanitized_transactions(...) as a dedicated fee-only pass
    • when skip_fee_collection=true, skip fee payer debit and zero fee_details
  • runtime::bank:
    • add collect_fees_only_for_transactions(...) wrapper for fee-only pass
    • add load_and_execute_transactions_skip_fee_collection(...) wrapper for second pass
  • keep default behavior unchanged by setting skip_fee_collection: false in existing call sites

Testing

  • cargo test -p solana-svm --lib test_validate_transaction_fee_payer_skip_fee_collection -- --nocapture
  • cargo test -p solana-svm --lib test_collect_fees_only_sanitized_transactions -- --nocapture
  • cargo test -p solana-runtime --lib test_filter_program_errors_and_collect_fee_details -- --nocapture

Closes #8

@aeyakovenko aeyakovenko force-pushed the issue-8-mcp-two-pass-fees branch from d52a806 to 99ffa24 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-17 Replay: do an initial pass to deduct fees before applying state transitions

1 participant