Add support for Prepare/ProcessProposal
in simulation testing #13843
Open
Description
opened on Nov 11, 2022
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 skippingPrepareProposal
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