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

Backport AVM 1.0 DB support to 2.6.2 #699

Merged
merged 5 commits into from
Oct 4, 2021

Conversation

winder
Copy link
Contributor

@winder winder commented Oct 2, 2021

Summary

Update accounting to process inner transactions.
Update transaction participation table to find the root transaction by inner transaction participants.

Some of these changes are backported from these issues:
#656
#661
#675

Test Plan

Unit tests.

@winder winder force-pushed the will/hotfix/inner-txn-participation branch from 8a6e7fa to 0bdea2d Compare October 2, 2021 21:30
@winder winder changed the title Backport AVM 1.0 support to 2.6.2 Backport AVM 1.0 DB support to 2.6.2 Oct 2, 2021
@codecov-commenter
Copy link

codecov-commenter commented Oct 2, 2021

Codecov Report

Merging #699 (737d41d) into hotfix/2.6.3 (821ed62) will increase coverage by 1.27%.
The diff coverage is 100.00%.

Impacted file tree graph

@@               Coverage Diff                @@
##           hotfix/2.6.3     #699      +/-   ##
================================================
+ Coverage         47.50%   48.78%   +1.27%     
================================================
  Files                25       25              
  Lines              3873     3876       +3     
================================================
+ Hits               1840     1891      +51     
+ Misses             1752     1698      -54     
- Partials            281      287       +6     
Impacted Files Coverage Δ
idb/postgres/postgres.go 45.81% <100.00%> (+2.63%) ⬆️

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 821ed62...737d41d. Read the comment docs.

@winder winder force-pushed the will/hotfix/inner-txn-participation branch 3 times, most recently from 13c130f to aa2b2ac Compare October 3, 2021 02:16
Copy link
Contributor

@brianolson brianolson left a comment

Choose a reason for hiding this comment

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

The one-inner-txn limit in importer is weird, but I believe that is correct and good enough for now.

@winder winder force-pushed the will/hotfix/inner-txn-participation branch from aa2b2ac to dfdf58a Compare October 3, 2021 14:45
}
num := 0
for _, stxn := range stxns {
participants = participate(participants, copyAddr(stxn.Txn.Sender))
Copy link
Contributor

Choose a reason for hiding this comment

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

why copying address?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was being overwritten by the range

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure I understand. stxn - yes, it is overwritten and that's why it is an error to take a loop var address.
In the same time referencing to values is fine - they either fully copied (primitives) or shallow-copied and point to different underlying memory in case of slices/maps, like in this example https://play.golang.org/p/6yT1jFVJc3s

@winder winder merged commit 44925b0 into hotfix/2.6.3 Oct 4, 2021
@winder winder deleted the will/hotfix/inner-txn-participation branch October 4, 2021 14:58
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.

5 participants