Skip to content

Add random memo to apply-load transactions#5322

Merged
dmkozh merged 2 commits into
stellar:masterfrom
Shaptic:random-memo
Jun 12, 2026
Merged

Add random memo to apply-load transactions#5322
dmkozh merged 2 commits into
stellar:masterfrom
Shaptic:random-memo

Conversation

@Shaptic

@Shaptic Shaptic commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

In order to preserve the uniqueness of transaction hashes across multiple apply-load runs, this PR introduces a random memo to every legacy payment transaction.

Copilot AI review requested due to automatic review settings June 11, 2026 22:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR extends transaction/test and simulation utilities to support attaching an optional Memo to generated transactions, and uses that capability in apply-load to ensure classic payment transaction hashes are non-deterministic across runs.

Changes:

  • Add an optional std::optional<Memo> parameter to padded transaction builders in TxTests.
  • Thread optional memo support through TxGenerator transaction creation APIs.
  • Generate and attach a random MEMO_HASH memo for apply-load classic payments to avoid deterministic tx hashes.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/test/TxTests.h Adds optional memo parameter to padded transaction helper declarations.
src/test/TxTests.cpp Applies optional memo to the created V1 transaction envelope and propagates through wrapper.
src/simulation/TxGenerator.h Extends generator APIs to accept an optional memo (defaulting to none).
src/simulation/TxGenerator.cpp Passes memo through to transaction constructors (padded and non-padded).
src/simulation/ApplyLoad.cpp Attaches random memo hashes to generated classic payments to make tx hashes non-deterministic.

Comment thread src/simulation/TxGenerator.h
Comment thread src/simulation/ApplyLoad.cpp Outdated

@dmkozh dmkozh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@dmkozh dmkozh enabled auto-merge June 11, 2026 22:54
@dmkozh dmkozh added this pull request to the merge queue Jun 11, 2026
Merged via the queue into stellar:master with commit 8dbfbf4 Jun 12, 2026
53 checks passed
@Shaptic Shaptic deleted the random-memo branch June 12, 2026 03:07
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.

3 participants