Skip to content

performance: cherry-pick inc-shard-def-size updates#21033

Merged
AskAlexSharov merged 8 commits into
performancefrom
awskii/inc-shard-def-size-performance
May 7, 2026
Merged

performance: cherry-pick inc-shard-def-size updates#21033
AskAlexSharov merged 8 commits into
performancefrom
awskii/inc-shard-def-size-performance

Conversation

@awskii

@awskii awskii commented May 7, 2026

Copy link
Copy Markdown
Member

Cherry-pick of #20930, #21025, and #21026 onto performance.

awskii and others added 8 commits May 7, 2026 10:24
(cherry picked from commit 9ba41ee)
(cherry picked from commit 856b696)
(cherry picked from commit 831742f)
…ment rebuild and CommitmentRoot

Replace LimitedHistoryStateReader (which fell back to GetLatest on miss and
silently leaked post-limit values) with a strict files-only reader for the
two callers that need a fixed boundary snapshot:

- RebuildCommitmentFiles uses FilesOnlyStateReader(rwTx, lastTxnumInShard-1)
  so commitment.kv is rebuilt only from the matching accounts/storage/code
  .kv files at the shard boundary.
- CheckCommitmentRoot's checkCommitmentRootViaSd uses FilesOnlyStateReader
  at maxTxNum, and checkCommitmentRootViaRecompute switches from an
  account-domain-only touchHistoricalKeys to sd.TouchChangedKeysFromHistory
  (accounts + storage; code is covered transitively via account.codeHash).

getLatestFromFiles walkback is also fixed: the previous bound skipped files
ending before maxTxNum, which broke the walkback semantics and made
files-only reads return nil for any key whose latest write lives in an
older .kv. Now only files starting strictly after maxTxNum are skipped.
@AskAlexSharov AskAlexSharov enabled auto-merge (squash) May 7, 2026 11:40
@AskAlexSharov AskAlexSharov merged commit 2f0099c into performance May 7, 2026
35 of 36 checks passed
@AskAlexSharov AskAlexSharov deleted the awskii/inc-shard-def-size-performance branch May 7, 2026 12:04
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