Closed czarcas7ic closed 5 months ago
The project has undergone a significant update focused on improving performance, code organization, and maintainability. The Golang version was upgraded, and a custom linting command was introduced. Thread safety in BatchWithFlusher
was enhanced with mutex locks. Comments were added to clarify the immutability of certain function inputs. The encoding layer received optimizations and new functionalities. A new FastPrefixFormatter
type was introduced for efficient key manipulation. Node
structure was refined for better child node handling, and the database management code was restructured with new mutexes, deletion methods, and more efficient key handling.
File(s) | Change Summary |
---|---|
.github/workflows/lint.yml |
Updated Golang to 1.21, switched to custom lint command. |
batch.go |
Added mutex for thread safety in BatchWithFlusher . |
fastnode/fast_node.go , internal/encoding/encoding.go |
Added immutability comments; encoding.go also includes new functions and simplifications. |
keyformat/.../prefix_formatter.go |
Introduced FastPrefixFormatter for key operations. |
mutable_tree.go , node.go |
Refactored methods for leaf and child node handling. |
nodedb.go |
Overhauled key formatting, added mutexes and new deletion methods, optimized key iteration. |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Does it include all of #863, #864, #865 changes?
This needs to be reopened with the proper changes just haven't had a moment to do so
Closing in favor of #877 and #876
This is cherry picks of work from both John Reynolds and Dev to ensure main stays up to date with the iavl v1.0.0 branch we will be using in v21 of Osmosis.
Previously, we would block chain progress on pruning orphan nodes. For a chain like Osmosis, this took upwards of 2 hours. This change allows chain progress to continue, while pruning orphan nodes synchronously.
As a drive by change, this also fixes the golang linter in this repo.