Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow simulating txs with forc run #1652

Closed
adlerjohn opened this issue May 24, 2022 · 3 comments · Fixed by #1845
Closed

Allow simulating txs with forc run #1652

adlerjohn opened this issue May 24, 2022 · 3 comments · Fixed by #1845
Assignees
Labels
enhancement New feature or request forc good first issue Good for newcomers

Comments

@adlerjohn
Copy link
Contributor

Instead of actually sending the transaction to be included in the chain, add an option to just simulate it.

@adlerjohn adlerjohn added enhancement New feature or request good first issue Good for newcomers forc labels May 24, 2022
@adlerjohn adlerjohn moved this to Todo in Fuel Network May 24, 2022
@ra0x3 ra0x3 moved this from Todo to In Progress in Fuel Network May 31, 2022
@ra0x3
Copy link
Contributor

ra0x3 commented May 31, 2022

@adlerjohn

  • For someone without the context. What is the difference between simulating vs actually sending?
  • Is this similar to dry_run in the tests?

@ra0x3 ra0x3 self-assigned this May 31, 2022
@adlerjohn
Copy link
Contributor Author

Simulating here means the node executes the transaction and returns the final mutated transaction along with receipts (which includes whether the transaction reverted or not). The transaction is not inserted in the node's view of the blockchain, i.e. it does not affect the chain state. Sending here means the node executes then inserts the transaction into the blockchain.

It is similar to dry_run from fuel-core tests from what I can tell, but @Voxelot would be able to give a more definitive answer.

@Voxelot
Copy link
Member

Voxelot commented Jun 1, 2022

Yes this would be using the dry_run api without a utxo_validation override (default to node setting for utxo_validation).

@ra0x3 ra0x3 linked a pull request Jun 3, 2022 that will close this issue
Repository owner moved this from In Progress to Done in Fuel Network Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request forc good first issue Good for newcomers
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants