Skip to content

Conversation

@algorandskiy
Copy link
Contributor

@algorandskiy algorandskiy commented Sep 15, 2021

Summary

dryrun/tealdbg ledgers do not have block info so cannot provide correct value of rewardLevel used in balance calculation for balance opcode. Fixed by clearing RewardBase field in account data returned by dryrun/tealdbg ledgers.

The crash was reported at the community forum.

Test Plan

Test added

Copy link
Contributor

@jasonpaulos jasonpaulos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a good fix to me

@codecov-commenter
Copy link

codecov-commenter commented Sep 15, 2021

Codecov Report

Merging #2894 (d0962b4) into master (b7a5b82) will decrease coverage by 0.00%.
The diff coverage is 80.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2894      +/-   ##
==========================================
- Coverage   47.27%   47.27%   -0.01%     
==========================================
  Files         355      355              
  Lines       57199    57202       +3     
==========================================
+ Hits        27040    27041       +1     
- Misses      27101    27102       +1     
- Partials     3058     3059       +1     
Impacted Files Coverage Δ
daemon/algod/api/server/v2/account.go 78.20% <0.00%> (ø)
cmd/tealdbg/localLedger.go 59.15% <100.00%> (+0.58%) ⬆️
daemon/algod/api/server/v2/dryrun.go 61.90% <100.00%> (+0.11%) ⬆️
cmd/algoh/blockWatcher.go 77.77% <0.00%> (-3.18%) ⬇️
ledger/blockqueue.go 81.03% <0.00%> (-1.15%) ⬇️
ledger/acctupdates.go 62.55% <0.00%> (-0.09%) ⬇️
network/wsPeer.go 74.37% <0.00%> (ø)
network/requestTracker.go 71.55% <0.00%> (+0.43%) ⬆️
catchup/peerSelector.go 100.00% <0.00%> (+1.04%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b7a5b82...d0962b4. Read the comment docs.

Copy link
Contributor

@jannotti jannotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems right.

@jannotti jannotti merged commit 9fe1bf4 into algorand:master Sep 15, 2021
@algobarb algobarb mentioned this pull request Sep 17, 2021
tsachiherman pushed a commit that referenced this pull request Sep 17, 2021
![GitHub Logo](https://raw.githubusercontent.com/algorand/go-algorand/master/release/release-banner.jpg)




# Highlights

This version adds debugging for itxn programs and includes a bugfix for dryrun crashes. 
**This release does not contain a protocol upgrade.**

# Changes

1. TEAL
    * Added
        * Enable debugging itxn programs (#2900)
    * Fixed
        * Fix dryrun crash on rewards calculation (#2894)

## Additional Resources
* [Algorand Forum](https://forum.algorand.org)
* [Developer Documentation](https://developer.algorand.org)
@algorandskiy algorandskiy deleted the pavel/dryrun-reward-fix branch September 21, 2021 16:55
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.

4 participants