You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the dry_run command has some custom logic to evaluate a transaction. This sometimes leads to problems like #3358 where the logic of dry run doesn't match the one in protocol. We should try to refactor this to at least rely on the dispatch_tx function so that changes of a diverging behavior are minimized.
We could also think about mocking a one-transaction block and directly call finalize_block: this would enforce the same exact behavior even though it might slow down the simulation given the extra operations performed there. These operations though run only on new epoch so we might be able to side-step them by just mocking a block which is not the first one of a new epoch.
None of the two solutions proposed above can actually be achieved.
To call finalize_block we'd need a mutable reference to the Shell that we don't want.
The solution using dispatch_tx is feasible but it requires to modify some functions' signatures from requiring WlState to requiring a generic S with some trait bounds. Unfortunately it gets complicated to handle ethereum-bridge related functions.
#3758 closes this issue by using dispatch_inner_txs which is instead easily modifiable to be used by dry_run_tx.
Currently the
dry_run
command has some custom logic to evaluate a transaction. This sometimes leads to problems like #3358 where the logic of dry run doesn't match the one in protocol. We should try to refactor this to at least rely on thedispatch_tx
function so that changes of a diverging behavior are minimized.We could also think about mocking a one-transaction block and directly call
finalize_block
: this would enforce the same exact behavior even though it might slow down the simulation given the extra operations performed there. These operations though run only on new epoch so we might be able to side-step them by just mocking a block which is not the first one of a new epoch.For reference: @Fraccaman, @yito88
The text was updated successfully, but these errors were encountered: