Skip to content

ledger: new db methods to abstract queries needed by the deltas (9 of N)#4864

Merged
algorandskiy merged 4 commits intoalgorand:masterfrom
icorderi:refactor/accountdb-9
Dec 8, 2022
Merged

ledger: new db methods to abstract queries needed by the deltas (9 of N)#4864
algorandskiy merged 4 commits intoalgorand:masterfrom
icorderi:refactor/accountdb-9

Conversation

@icorderi
Copy link
Copy Markdown
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
Copy Markdown

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

@icorderi icorderi force-pushed the refactor/accountdb-9 branch from e523f7d to 70b8113 Compare December 7, 2022 23:51
Copy link
Copy Markdown
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

Comment thread ledger/store/accountsV2.go Outdated
@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.

3 participants