forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 14
stracktrie: use pooling, less allocs #3
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
Merged
gballet
merged 1 commit into
gballet:derive-sha-with-stacktrie-rewrite
from
holiman:stacktrie_edge
Sep 3, 2020
Merged
stracktrie: use pooling, less allocs #3
gballet
merged 1 commit into
gballet:derive-sha-with-stacktrie-rewrite
from
holiman:stacktrie_edge
Sep 3, 2020
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gballet
reviewed
Sep 3, 2020
| // Add new child | ||
| if st.children[idx] == nil { | ||
| st.children[idx] = stackTrieFromPool(st.db) | ||
| st.children[idx].keyOffset = st.keyOffset + 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason this got moved here?
gballet
reviewed
Sep 3, 2020
| st.children[idx] = NewStackTrie(st.db) | ||
| st.children[idx].keyOffset = st.keyOffset + 1 | ||
| } | ||
| // Unresolve elder siblings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer "hash" to "unresolve"
|
Reason for moving it is that hashing siblings may free up some nodes that can be reused for the new insertion.
|
gballet
added a commit
that referenced
this pull request
Sep 24, 2020
core/types: use stacktrie for derivesha trie: add stacktrie file trie: fix linter core/types: use stacktrie for derivesha rebased: adapt stacktrie to the newer version of DeriveSha Co-authored-by: Martin Holst Swende <[email protected]> More linter fixes review feedback: no key offset for nodes converted to hashes trie: use EncodeRLP for full nodes core/types: insert txs in order in derivesha trie: tests for derivesha with stacktrie trie: make stacktrie use pooled hashers trie: make stacktrie reuse tmp slice space trie: minor polishes on stacktrie trie/stacktrie: less rlp dancing core/types: explain the contorsions in DeriveSha ci: fix goimport errors trie: clear mem on subtrie hashing squashme: linter fix stracktrie: use pooling, less allocs (#3) trie: in-place hex prefix, reduce allocs and add rawNode.EncodeRLP Reintroduce the `[]node` method, add the missing `EncodeRLP` implementation for `rawNode` and calculate the hex prefix in place. Co-authored-by: Martin Holst Swende <[email protected]>
gballet
added a commit
that referenced
this pull request
Oct 3, 2020
core/types: use stacktrie for derivesha trie: add stacktrie file trie: fix linter core/types: use stacktrie for derivesha rebased: adapt stacktrie to the newer version of DeriveSha Co-authored-by: Martin Holst Swende <[email protected]> More linter fixes review feedback: no key offset for nodes converted to hashes trie: use EncodeRLP for full nodes core/types: insert txs in order in derivesha trie: tests for derivesha with stacktrie trie: make stacktrie use pooled hashers trie: make stacktrie reuse tmp slice space trie: minor polishes on stacktrie trie/stacktrie: less rlp dancing core/types: explain the contorsions in DeriveSha ci: fix goimport errors trie: clear mem on subtrie hashing squashme: linter fix stracktrie: use pooling, less allocs (#3) trie: in-place hex prefix, reduce allocs and add rawNode.EncodeRLP Reintroduce the `[]node` method, add the missing `EncodeRLP` implementation for `rawNode` and calculate the hex prefix in place. Co-authored-by: Martin Holst Swende <[email protected]> Co-authored-by: Martin Holst Swende <[email protected]>
gballet
added a commit
that referenced
this pull request
Mar 15, 2024
regenerate posdao contract bindings more build fixes more build fixes more build fixes fix simple name fix more build errors 39 build errors to go! fix build add chiado chainspec start import from #3 forkid hack genesis init base fee collector only apply max code size check after shanghai handshake hack add bootnodes to list add TTD + banner info fix: create the correct genesis fix: duplicate field a few bug fixes found during my tests more error fixes fixes to run through up to 6M blocks and counting fix eip1559FeeCollector location in config config fix + support post london free txs fix contract rewrite decoding fix resume-time panic when still in aura mode speedup: hardcode forkblock to determine if pos is active add withdrawals contract to config add cancun time
gballet
pushed a commit
that referenced
this pull request
Mar 28, 2025
…m#31081) This PR is #3 of a 3-part series that implements the new log index intended to replace core/bloombits. Based on ethereum#31079 and ethereum#31080 Replaces ethereum#30370 This part removes the old bloombits package and the chain indexer that was only used by bloombits. Deletes the old bloombits database. FilterMaps data structure explanation: https://gist.github.com/zsfelfoldi/a60795f9da7ae6422f28c7a34e02a07e Log index generator code overview: https://gist.github.com/zsfelfoldi/97105dff0b1a4f5ed557924a24b9b9e7 Search pattern matcher code overview: https://gist.github.com/zsfelfoldi/5981735641c956afb18065e84f8aff34 Note that the possibility of a tree hashing scheme and remote proof protocol are mentioned in the documents above but they are not exactly specified yet. These specs are WIP and will be finalized after the local log indexer/filter code is finalized and merged. --------- Co-authored-by: Felix Lange <[email protected]>
gballet
pushed a commit
that referenced
this pull request
Sep 11, 2025
…m#31081) This PR is #3 of a 3-part series that implements the new log index intended to replace core/bloombits. Based on ethereum#31079 and ethereum#31080 Replaces ethereum#30370 This part removes the old bloombits package and the chain indexer that was only used by bloombits. Deletes the old bloombits database. FilterMaps data structure explanation: https://gist.github.com/zsfelfoldi/a60795f9da7ae6422f28c7a34e02a07e Log index generator code overview: https://gist.github.com/zsfelfoldi/97105dff0b1a4f5ed557924a24b9b9e7 Search pattern matcher code overview: https://gist.github.com/zsfelfoldi/5981735641c956afb18065e84f8aff34 Note that the possibility of a tree hashing scheme and remote proof protocol are mentioned in the documents above but they are not exactly specified yet. These specs are WIP and will be finalized after the local log indexer/filter code is finalized and merged. --------- Co-authored-by: Felix Lange <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These changes reduces the allocs and allocated bytes (heap allocs) quite substantially.
But I figured I'd rather make it as a PR than push to your branch, because the changes might be 'ugly' ...