Skip to content

Add support for Prepare/ProcessProposal in simulation testing #13843

Open
@ttl33

Description

Summary

During simulated testing, operations are randomly generated and then executed by the app directly by calling App.SimDeliver

With PrepareProposal, the app logic now has the ability to add, remove or re-order txs/operations.

Because the simulation testing delivers each tx and operation directly, the above PrepareProposal app logic is skipped.

For example:

  • There are two types of transactions A and B
  • Say during simulation generates the following txs [B A B]
  • The app's PrepareProposal logic would reorder these txs in a way that As appear before Bs. so the above should be arrange to [A B B]
  • However, because simulation is directly calling App.SimDeliver for each operation, above assumption ("As appear before Bs") is violated and we are essentially skipping PrepareProposal

Problem Definition

Without this, custom PrepareProposal app logic would be skipped during simulated testing, which means ProcessProposal will likely fail and simulation won't be simulating the actual app logic.

Proposal

Update simulation testing so that the randomly generated operations are pre-processed by the app's custom PrepareProposal logic.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions