Skip to content

Conversation

@raushan728
Copy link

@raushan728 raushan728 commented Dec 31, 2025

Optimized p-memo base execution and enhanced memory safety.

Performance (Sub-300 CU)

  • Base Case (0 signers): 283 CU (9.6% reduction from 313).
  • Empty Memo: 139 CU.
  • Max Memo (1232b): 1985 CU.

Engineering

  • Optimization: Replaced pinocchio_log macros with direct sol_log_ syscalls.
  • Safety: Replaced instruction_data_unchecked() with safe instruction_data()? access.
  • Consistency: Explicitly validated UTF-8 to return InvalidInstructionData, aligning with SPL standard.
  • Tests: Added functional coverage for 0-byte and maximum MTU-sized memos.

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.

1 participant