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: new db methods to abstract queries needed by the deltas (9 of N) #4864

Merged
merged 4 commits into from Dec 8, 2022

Conversation

icorderi
Copy link
Contributor

@icorderi icorderi commented Dec 6, 2022

Summary

This PR creates a few more methods needed by the deltas.

Previous parts of this refactor:

What remains to be moved out:

  • iterators
    • orderedAccountsIter
    • catchpointPendingHashesIterator
  • deltas
    • accountsLoadOld and resourcesLoadOld have a couple queries that we might want to move out to avoid pulling all the deltas into store

Test Plan

Existing tests.

@codecov
Copy link

codecov bot commented Dec 6, 2022

Codecov Report

Merging #4864 (a0b66eb) into master (8515e46) will decrease coverage by 0.05%.
The diff coverage is 19.14%.

@@            Coverage Diff             @@
##           master    #4864      +/-   ##
==========================================
- Coverage   53.14%   53.09%   -0.06%     
==========================================
  Files         427      427              
  Lines       54064    54080      +16     
==========================================
- Hits        28732    28713      -19     
- Misses      23068    23102      +34     
- Partials     2264     2265       +1     
Impacted Files Coverage Δ
ledger/store/accountsV2.go 15.95% <2.77%> (-1.64%) ⬇️
ledger/accountdb.go 76.47% <72.72%> (+0.41%) ⬆️
network/wsPeer.go 67.06% <0.00%> (-2.39%) ⬇️
crypto/merkletrie/trie.go 66.42% <0.00%> (-2.19%) ⬇️
crypto/merkletrie/node.go 91.62% <0.00%> (-1.87%) ⬇️
catchup/peerSelector.go 98.95% <0.00%> (-1.05%) ⬇️
data/transactions/verify/txn.go 73.61% <0.00%> (-0.86%) ⬇️
ledger/acctupdates.go 68.99% <0.00%> (-0.25%) ⬇️
network/wsNetwork.go 64.92% <0.00%> (+0.17%) ⬆️
catchup/service.go 69.32% <0.00%> (+0.24%) ⬆️
... and 2 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

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.

LGTM

ledger/store/accountsV2.go Outdated Show resolved Hide resolved
@algorandskiy algorandskiy merged commit ebe4e80 into algorand:master Dec 8, 2022
@algorandskiy algorandskiy changed the title refactor: accountdb.go into a store package (9 of N) ledger: new db methods to abstract queries needed by the deltas (9 of N) Dec 8, 2022
@icorderi icorderi deleted the refactor/accountdb-9 branch December 16, 2022 21:39
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.

None yet

3 participants