Skip to content

[wip] [3.6] commitment: skip GetLatest for keys creation#21790

Open
AskAlexSharov wants to merge 3 commits into
mainfrom
alex/perf_comm_prevval_36
Open

[wip] [3.6] commitment: skip GetLatest for keys creation#21790
AskAlexSharov wants to merge 3 commits into
mainfrom
alex/perf_comm_prevval_36

Conversation

@AskAlexSharov

@AskAlexSharov AskAlexSharov commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

cherry-pick #21789 to main

PutBranch does call GetLatest inside - if we don't pass prevVal - this PR passing it for "new keys" (which not exists in commitment domain) - we have this metadatata in trie already.

When branchBefore[row] is false the branch did not exist in DB at unfold
time, so the WarmupCache and ctx.Branch() lookups in CollectUpdate /
CollectDeferredUpdate return empty unconditionally. Pass isNew=true from
foldBranch to skip both calls and supply []byte{} as the known-empty prev
sentinel, which also causes DomainPut to skip its internal GetLatest().
@AskAlexSharov AskAlexSharov changed the title [wip] execution/commitment: skip prev lookup for new branch nodes execution/commitment: skip prev lookup for new branch nodes Jun 13, 2026
@AskAlexSharov AskAlexSharov changed the title execution/commitment: skip prev lookup for new branch nodes [wip] execution/commitment: skip prev lookup for new branch nodes Jun 13, 2026
@AskAlexSharov AskAlexSharov changed the title [wip] execution/commitment: skip prev lookup for new branch nodes [wip] commitment: skip prev lookup for new keys Jun 14, 2026
@AskAlexSharov AskAlexSharov changed the title [wip] commitment: skip prev lookup for new keys [wip] [3.6] commitment: skip prev lookup for new keys Jun 14, 2026
@AskAlexSharov AskAlexSharov changed the title [wip] [3.6] commitment: skip prev lookup for new keys [wip] [3.6] commitment: skip GetLatest for keys creation Jun 14, 2026
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.

1 participant