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

task(storage/child-trie): implement store/load of child trie from DB #2122

Merged
merged 14 commits into from
Jan 11, 2022

Conversation

kishansagathiya
Copy link
Contributor

Changes

  • implement store/load of child trie from DB

Tests


Issues

Primary Reviewer

@kishansagathiya kishansagathiya changed the title implement store/load of child trie from DB task(storage/child-trie): implement store/load of child trie from DB Dec 16, 2021
@codecov
Copy link

codecov bot commented Dec 16, 2021

Codecov Report

Merging #2122 (06c7a3d) into development (cc3599a) will decrease coverage by 0.08%.
The diff coverage is 64.61%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #2122      +/-   ##
===============================================
- Coverage        61.54%   61.46%   -0.09%     
===============================================
  Files              213      213              
  Lines            27469    27497      +28     
===============================================
- Hits             16906    16901       -5     
- Misses            8697     8721      +24     
- Partials          1866     1875       +9     
Flag Coverage Δ
unit-tests 61.46% <64.61%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
lib/trie/database.go 47.86% <0.00%> (-3.11%) ⬇️
lib/trie/child_storage.go 44.26% <25.00%> (ø)
internal/trie/node/branch_encode.go 87.28% <100.00%> (+2.43%) ⬆️
dot/network/inbound.go 82.14% <0.00%> (-7.15%) ⬇️
dot/network/test_helpers.go 79.02% <0.00%> (-3.50%) ⬇️
dot/network/message.go 66.52% <0.00%> (-2.61%) ⬇️
lib/grandpa/message.go 61.15% <0.00%> (-2.16%) ⬇️
dot/network/notifications.go 64.50% <0.00%> (-1.37%) ⬇️
lib/grandpa/vote_message.go 80.73% <0.00%> (-1.23%) ⬇️
... and 1 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 790dfb5...06c7a3d. Read the comment docs.

lib/trie/child_storage.go Outdated Show resolved Hide resolved
lib/trie/child_storage.go Outdated Show resolved Hide resolved
lib/trie/database.go Outdated Show resolved Hide resolved
lib/trie/database.go Outdated Show resolved Hide resolved
lib/trie/database.go Outdated Show resolved Hide resolved
lib/trie/database.go Outdated Show resolved Hide resolved
dot/state/storage_test.go Outdated Show resolved Hide resolved
dot/state/storage_test.go Outdated Show resolved Hide resolved
dot/state/storage_test.go Outdated Show resolved Hide resolved
lib/trie/child_storage.go Outdated Show resolved Hide resolved
lib/trie/child_storage.go Outdated Show resolved Hide resolved
lib/trie/database.go Outdated Show resolved Hide resolved
lib/trie/database.go Outdated Show resolved Hide resolved
lib/trie/database.go Outdated Show resolved Hide resolved
dot/state/storage_test.go Outdated Show resolved Hide resolved
lib/trie/child_storage.go Outdated Show resolved Hide resolved
@kishansagathiya
Copy link
Contributor Author

I should have made this draft.
There was some code leftover, which I used to test things out, but forgot to remove while making the PR.

Some of the changes that I made earlier were not required after applying changes recommended by noot.

@qdm12 Made changes you asked for in last two commits.

Copy link
Contributor

@qdm12 qdm12 left a comment

Choose a reason for hiding this comment

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

Nice 👍 Sorry I didn't know it was still a drafty PR 😉 Note you can convert it back to draft even if you open it as non-draft (although people will still be notified for reviews).

lib/trie/database.go Show resolved Hide resolved
dot/state/storage_test.go Outdated Show resolved Hide resolved
dot/state/storage_test.go Outdated Show resolved Hide resolved
dot/state/storage_test.go Outdated Show resolved Hide resolved
dot/state/storage_test.go Outdated Show resolved Hide resolved
dot/state/storage_test.go Outdated Show resolved Hide resolved
@kishansagathiya kishansagathiya requested a review from noot January 4, 2022 07:01
qdm12
qdm12 previously requested changes Jan 5, 2022
lib/trie/database.go Show resolved Hide resolved
Copy link
Contributor

@noot noot left a comment

Choose a reason for hiding this comment

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

looks good to me! awesome work :D

@kishansagathiya kishansagathiya dismissed qdm12’s stale review January 11, 2022 11:41

created a separate small task, so that I can merge this now #2171

@kishansagathiya kishansagathiya merged commit 0cc4006 into development Jan 11, 2022
@kishansagathiya kishansagathiya deleted the kishan/task/child-trie branch January 11, 2022 13:17
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