Skip to content

feat: preserve original bincode payload in transactions #959

@bmuddha

Description

@bmuddha

Problem:
The upcoming replicator will stream transactions from primary to standby nodes. Currently, transactions enter the system as bincode bytes (via sendTransaction), are deserialized, and the original bytes are discarded. This means the replicator would need to re-serialize transactions for streaming - wasteful since the original payload already exists.

Proposal:
Preserve the original bincode bytes alongside the sanitized transaction as it flows through the system. This allows the future replicator to access and transmit raw bytes directly.

Changes:

  • Add original_bincode: Option<Vec<u8>> field to ProcessableTransaction
  • Capture and attach the raw bytes at the entry point (prepare_transaction)
  • Propagate through SanitizeableTransaction trait or wrapper type
  • Backward compatible - existing code paths use None

Entry point reference: magicblock-aperture/src/requests/http/mod.rs:prepare_transaction

Acceptance criteria:

  • ProcessableTransaction includes original_bincode: Option<Vec<u8>> field

Reference: MIMD-0019 Transaction streaming

Parent epic: #935

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions