Hive#4
Merged
Merged
Conversation
12 tasks
Merged
10 tasks
This was referenced Apr 17, 2026
12 tasks
2 tasks
This was referenced May 5, 2026
This was referenced May 15, 2026
16 tasks
This was referenced May 19, 2026
This was referenced May 25, 2026
Merged
kamilchodola
added a commit
that referenced
this pull request
May 28, 2026
#3+#4 (correctness/robustness): the sparse-vs-Patricia agreement counter lived in static fields on FlatWorldStateScope. Every scope (read-only RPC, parallel block processing, snapshot validation) updated and read the same counter, so one scope's mismatch could reset another's confidence and one scope's wins could promote another to authoritative without that scope validating its own sparse trie. Moved to SparseAuthoritativeTracker held by FlatScopeProvider so each provider owns its own confidence. Also tied _sparseIsAuthoritative to SparseTrieSkipPatricia: the previous condition (just 10 consecutive matches and !VerificationMode) flipped sparse into the authoritative root/commit role while Patricia BulkSet still ran on every block, paying for trie work whose result was thrown away. Now sparse takes over only when the operator has explicitly opted out of Patricia persistence via SparseTrieSkipPatricia (currently default-on for the EXPB sparse-storage runs). #5 (performance): storage commit walked every retained sparse storage trie on every block. With cross-block PreservedSparseTrie reuse and no LFU pruning yet, that's O(retained contracts) per commit and grows unboundedly. Expose DirtyStorageAccountHashes (a lock-free enumeration of SparseRootComputer's _storageChanges keys) and walk only the contracts whose storage actually changed this block. CommitStorageTrie still skips clean subtrees internally as a second filter, but now we don't even iterate cold contracts at the outer level. Test updates: FlatWorldStateScopeProviderTests registers SparseAuthoritativeTracker in the Autofac container; FlatOverridableWorldScope and WriteBatchBenchmark pass new instances at construction. All 432 State.Flat tests pass.
16 tasks
14 tasks
15 tasks
This was referenced Jun 9, 2026
Marchhill
added a commit
that referenced
this pull request
Jun 10, 2026
ArrayPoolList<Transaction> for the reservoir — Count tracks actual non-blob fill, so the prior alloc + Array.Resize + copy pair when the mempool yielded fewer than capacity non-blob txs is gone. Buffer is rented from the shared ArrayPool and disposed via the using in GetInclusionList. Addresses Lukasz's #4 round-5 comment.
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
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.
No description provided.