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

chore(lib/trie): add Deltas in internal/trie/tracking #2896

Merged
merged 3 commits into from
Jan 26, 2023

Conversation

qdm12
Copy link
Contributor

@qdm12 qdm12 commented Oct 18, 2022

Changes

This is done following Tim's comment #2873 (comment) and (performance) discoveries whilst working on #2881 - this unblocks #2881

  • Define Deltas struct in internal/trie/tracking (with unit tests)
  • Replace passing of a plain Go map[string]struct{} by passing pendingDeltas DeltaRecorder in the trie code
  • Define trie local deltas interfaces
  • Allows for extending functionality, since it's very much needed in feat(lib/trie): cache inserted trie node Merkle values #2881

Tests

go test -tags integration ./lib/trie/...  ./internal/trie/tracking/... 

Issues

Unblocks #2854 and #2838

Primary Reviewer

@timwu20

@qdm12 qdm12 changed the base branch from development to qdm12/trie/fix-deleted-keys October 18, 2022 08:39
@qdm12 qdm12 marked this pull request as ready for review October 18, 2022 09:49
@qdm12 qdm12 force-pushed the qdm12/trie/fix-deleted-keys branch from e0c6446 to b72a7c6 Compare October 31, 2022 13:14
@qdm12 qdm12 force-pushed the qdm12/trie/fix-deleted-keys branch from b72a7c6 to 400a69e Compare November 2, 2022 16:05
@qdm12 qdm12 force-pushed the qdm12/trie/fix-deleted-keys branch from 400a69e to 2d2cf27 Compare November 4, 2022 11:47
@qdm12 qdm12 force-pushed the qdm12/trie/fix-deleted-keys branch 2 times, most recently from 105d1f7 to ccb592a Compare November 9, 2022 10:18
@qdm12 qdm12 force-pushed the qdm12/trie/tracking-struct branch 3 times, most recently from 4c54bd0 to 089fa9f Compare November 9, 2022 13:29
@qdm12 qdm12 force-pushed the qdm12/trie/fix-deleted-keys branch from ccb592a to ce9ff3b Compare November 16, 2022 08:24
@qdm12 qdm12 force-pushed the qdm12/trie/fix-deleted-keys branch from aebf0f1 to 4e60257 Compare November 23, 2022 13:56
@qdm12 qdm12 force-pushed the qdm12/trie/fix-deleted-keys branch 4 times, most recently from 0d91179 to c61ae90 Compare January 10, 2023 14:50
Base automatically changed from qdm12/trie/fix-deleted-keys to development January 10, 2023 16:04
Copy link
Contributor

@jimjbrettj jimjbrettj left a comment

Choose a reason for hiding this comment

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

Feels like a really nice improvement, great work!

internal/trie/tracking/deltas_test.go Outdated Show resolved Hide resolved
lib/trie/database.go Show resolved Hide resolved
@qdm12 qdm12 merged commit 83b3278 into development Jan 26, 2023
@qdm12 qdm12 deleted the qdm12/trie/tracking-struct branch January 26, 2023 16:30
Copy link

🎉 This PR is included in version 0.8.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

3 participants