algorand / algorand/go-algorand
Improve dryrun/TEAL debugger
- 主要語言
- Go
- 星號
- 1.4k
- 分支
- 537
- 平均合併
- 1 天 6 小時
- 30 天內合併 PR
- 17
描述
## Problem
To the best of my knowledge, the dryrun endpoint and tealdbg program do not share the same underlying logic for evaluating transactions. This results in different TEAL features being supported by each debug tool. Additionally, transaction groups are currently being evaluated in a way that does not reflect the real-life evaluation behavior. Some examples of this are: [foreign apps/assets](#2609), creatable IDs, apps which access global state mutated in the first transaction from within the second transaction, and many more. This is because, in the case of the dryrun endpoint, transactions are evaluated using only a subset of all the evaluation systems.
And while rewriting the debugger logic to fix the problems above, it would be nice if dryrun requests default to using actual data found on the chain when an execution environment has not been given. This issue of using actual data was tracked previously by #2520.
In theory, these changes should be able to be made in a way which preserves backwards compatibility. Dryrun environments that explicitly set apps, assets, and balances should still work exactly as before. The only case in which code that previously worked will stop working is if that code had a bug which had not been caught yet, or perhaps had a program that assumed incorrectly about the nature of how applied data works between transactions in a group.
## Solution
There are three main steps in improving the dryrun/tealdbg tools:
1. Consolidate dryrun/debugger logic into a single location/package.
2. Use the real transaction evaluation system (`ledger/eval.go` plus logicsig logic) instead of how the dryrun request currently works.
3. Default to using live data from the chain when running dryrun/debug requests _unless_ overwritten by a provided environment.
## Dependencies
None.
## Urgency
Providing improved debugging tools will be invaluable as people start writing more complex apps with the AVM 1.0 release.
貢獻指南
評估
這個 Issue 還沒有評估資料。