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

Implementation of transaction dry run #2380

Merged
merged 4 commits into from
Aug 9, 2024

Conversation

steelgeek091
Copy link
Collaborator

@steelgeek091 steelgeek091 commented Aug 7, 2024

When publishing the module, perform a dry run. If an error occurs, stop and report the following error:

Transaction dry run failed: "VMError with status ABORTED with sub status 6789 at location Module ModuleId { address: 285529d7fd13ffcda9d89cd250b4025ba9226c0e2e57f5ca3d739cb236dc259d, name: Identifier("counter") } and message 0x285529d7fd13ffcda9d89cd250b4025ba9226c0e2e57f5ca3d739cb236dc259d::counter::f5 at offset 1 at code offset 1 in function definition 4"

CallStack trace:
0 0x285529d7fd13ffcda9d89cd250b4025ba9226c0e2e57f5ca3d739cb236dc259d::counter::f4.0
1 0x285529d7fd13ffcda9d89cd250b4025ba9226c0e2e57f5ca3d739cb236dc259d::counter::f3.0
2 0x285529d7fd13ffcda9d89cd250b4025ba9226c0e2e57f5ca3d739cb236dc259d::counter::f2.0
3 0x285529d7fd13ffcda9d89cd250b4025ba9226c0e2e57f5ca3d739cb236dc259d::counter::f1.0
4 0x285529d7fd13ffcda9d89cd250b4025ba9226c0e2e57f5ca3d739cb236dc259d::counter::init.6

Do we need to dry run trasaction when executing normal transaction?

Copy link

vercel bot commented Aug 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rooch-portal ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 9, 2024 3:59am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
rooch ⬜️ Ignored (Inspect) Visit Preview Aug 9, 2024 3:59am

return error info when dry run execution function

finish the dry_run

finish the transaction dry run while publishing the transaction

remove debug code in counter example

remove unused parameter

execute the action directly instead sign it
@jolestar
Copy link
Contributor

jolestar commented Aug 8, 2024

建议 rooch move run 的交易也 dry_run 一下。不过这个可以在新的 PR 里完成。

@steelgeek091 steelgeek091 merged commit ccc3153 into rooch-network:main Aug 9, 2024
7 checks passed
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.

2 participants