[r3.4] db/state, cmd/integration: 4x larger commitment rebuild shard, squeeze flag transparent#21147
Merged
Merged
Conversation
AskAlexSharov
approved these changes
May 13, 2026
pull Bot
pushed a commit
to Dustin4444/erigon
that referenced
this pull request
May 29, 2026
Cherry-pick of 5 performance improvements from the `performance` branch to `main`: 1. warmuper: cancelable worker — erigontech#20941 2. db/state, cmd/integration: 4x larger commitment rebuild shard, squeeze flag transparent — erigontech#21147 3. db/rawdb: increase ChangeSets3 prune loop stride 100→1000, move log inside stride check — erigontech#21204 4. db/seg: increase bufio pool size from 256KB to 512KB 5. db/kv/prune: remove dead `limit` parameter from `TableScanningPrune` (accepted but never forwarded internally) --------- Co-authored-by: awskii <awskii@users.noreply.github.com> Co-authored-by: moskud <sudeepdino008@gmail.com> Co-authored-by: info@weblogix.biz <admin@10gbps.weblogix.it>
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.
Summary
Two tuning/transparency changes for commitment rebuild on
release/3.4. Subset ofawskii/r34-inc-shard-def-size— theminStepsForReferencingandAggregatorSqueezeCommitmentValuesconstant changes from that branch are intentionally excluded here.db/state/squeeze.go: raiseshardStepsSizecap from 16 → 64 steps duringRebuildCommitmentFiles. Larger shards cut per-shard overhead on long rebuilds.db/state/squeeze.go: stop forcingReplaceKeysInValues=trueinside the rebuild's squeeze path. The post-rebuild squeeze now actually honours the caller'ssqueezeflag —if !squeeze { return }(wasif !squeeze && !statecfg.Schema.CommitmentDomain.ReplaceKeysInValues), andForTestReplaceKeysInValues(..., squeeze)(was hardcodedtrue).cmd/integration/commands/flags.go: flip the--squeezeflag default fromtrue→falseso the integrationcommitment_rebuildcommand no longer squeezes by default.Net effect: rebuild is faster (bigger shards) and squeeze is opt-in via flag, not silently forced.