Skip to content

Add a randomized test for 'frozen' DEX offers.#5174

Merged
dmkozh merged 1 commit intostellar:masterfrom
dmkozh:cap77_test
Mar 30, 2026
Merged

Add a randomized test for 'frozen' DEX offers.#5174
dmkozh merged 1 commit intostellar:masterfrom
dmkozh:cap77_test

Conversation

@dmkozh
Copy link
Copy Markdown
Contributor

@dmkozh dmkozh commented Mar 12, 2026

Description

Removal of offers that would affect frozen entries from DEX has already been covered in a simple smoke test. This is a more robust randomized test that ensures that DEX behavior is the same both with and without 'frozen' offers.

Checklist

  • Reviewed the contributing document
  • Rebased on top of master (no merge commits)
  • Ran clang-format v8.0.0 (via make format or the Visual Studio extension)
  • Compiles
  • Ran all tests
  • If change impacts performance, include supporting evidence per the performance document

Copilot AI review requested due to automatic review settings March 12, 2026 01:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new randomized acceptance test to validate that offers owned by accounts with frozen ledger keys do not perturb DEX matching outcomes (i.e., matching results and account balance deltas remain identical to a baseline run without frozen offers).

Changes:

  • Introduces a randomized market simulation that runs twice per iteration (baseline vs. with frozen offers) and compares resulting balance deltas for taker + active makers.
  • Adds aggregate assertions intended to ensure the test actually exercised both successful transactions and frozen-offer removals.

Removal of offers that would affect frozen entries from DEX has already been covered in a simple smoke test. This is a more robust randomized test that ensures that DEX behavior is the same both with and without 'frozen' offers.
@dmkozh dmkozh added this pull request to the merge queue Mar 30, 2026
Merged via the queue into stellar:master with commit 5dc8b35 Mar 30, 2026
67 checks passed
@dmkozh dmkozh deleted the cap77_test branch March 30, 2026 22:00
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