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

ledger: preload resources argument in EvalForIndexer #3019

Merged

Conversation

tsachiherman
Copy link
Contributor

@tsachiherman tsachiherman commented Oct 7, 2021

Summary

rebase Tolik's PR on master; this PR add the ability for the indexer to preload account data so that it would be used by the evaluator.

Test Plan

Existing unit tests updated.

@codecov-commenter
Copy link

codecov-commenter commented Oct 7, 2021

Codecov Report

Merging #3019 (60843de) into master (6887d0e) will increase coverage by 0.00%.
The diff coverage is 50.19%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #3019    +/-   ##
========================================
  Coverage   43.84%   43.85%            
========================================
  Files         385      385            
  Lines       86329    86754   +425     
========================================
+ Hits        37852    38042   +190     
- Misses      42515    42704   +189     
- Partials     5962     6008    +46     
Impacted Files Coverage Δ
data/basics/userBalance.go 19.54% <0.00%> (-1.45%) ⬇️
data/bookkeeping/block.go 50.18% <ø> (ø)
ledger/appcow.go 83.38% <0.00%> (+1.21%) ⬆️
data/bookkeeping/msgp_gen.go 42.55% <45.63%> (-1.60%) ⬇️
agreement/msgp_gen.go 41.23% <49.85%> (-0.62%) ⬇️
ledger/evalIndexer.go 42.42% <50.00%> (-1.00%) ⬇️
ledger/eval.go 78.98% <91.17%> (+1.11%) ⬆️
config/consensus.go 84.64% <100.00%> (+0.10%) ⬆️
data/transactions/verify/txn.go 44.29% <0.00%> (ø)
... and 8 more

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 c59326f...60843de. Read the comment docs.

Comment on lines +144 to 154
func saveResourcesInCowBase(resources EvalForIndexerResources, base *roundCowBase) {
for address, accountData := range resources.accounts {
if accountData == nil {
base.accounts[address] = basics.AccountData{}
} else {
base.accounts[address] = *accountData
}
}

return res
base.creators = resources.creators
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This method being placed here is wrong; I'm planning on merging this functionality with the startEvaluator, but I'll be doing that after merging this code in, as other structural changes are already pending and I'd rather avoid blocking those. @tolikzinovyev @algorandskiy

@tsachiherman tsachiherman changed the title Tsachi/eval for indexer resources ledger: preload resources argument in EvalForIndexer Oct 8, 2021
@tsachiherman tsachiherman self-assigned this Oct 8, 2021
@tsachiherman tsachiherman merged commit ff8139a into algorand:master Oct 8, 2021
@tsachiherman tsachiherman deleted the tsachi/eval-for-indexer-resources branch October 8, 2021 12:48
cce pushed a commit to cce/go-algorand that referenced this pull request Oct 28, 2021
## Summary

rebase Tolik's PR on master; this PR add the ability for the indexer to preload account data so that it would be used by the evaluator.

## Test Plan

Existing unit tests updated.
@egieseke egieseke mentioned this pull request Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants