[r3.4] execution/state: use index-based range over log topics to avoid copy#20372
Merged
AskAlexSharov merged 2 commits intorelease/3.4from Apr 7, 2026
Merged
[r3.4] execution/state: use index-based range over log topics to avoid copy#20372AskAlexSharov merged 2 commits intorelease/3.4from
AskAlexSharov merged 2 commits intorelease/3.4from
Conversation
sudeepdino008
approved these changes
Apr 7, 2026
AskAlexSharov
added a commit
that referenced
this pull request
Apr 8, 2026
…d copy (#20372) ## Summary - Replace `for _, topic := range lg.Topics` with `for i := range lg.Topics` in `applyLogsAndTraces4` - Avoids copying each `common.Hash` (32 bytes) on every iteration; uses index access instead ## Test plan - [ ] `go test ./execution/state/...`
github-merge-queue bot
pushed a commit
that referenced
this pull request
Apr 10, 2026
## Summary Cherry-pick of release/3.4 PRs: - #20368 rpc: use synctest for TestClientCancelHTTP to fix CI flakiness - #20373 integrity: blk/sec fix - #20372 execution/state: use index-based range over log topics to avoid copy - #20367 fix: preserve stored chain config when genesis hash doesn't match known chain - #20374 ParseVersion: optimize - #20369 batchSize: more precise estimate - #20399 hive: pin more things --------- Co-authored-by: erigon-copilot[bot] <265817861+erigon-copilot[bot]@users.noreply.github.com> Co-authored-by: root <giulio.rebuffo@gmail.com> Co-authored-by: yperbasis <andrey.ashikhmin@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Muzry <muzrry@gmail.com> Co-authored-by: muzry.li <muzry.li1@ambergroup.io> Co-authored-by: Andrew Ashikhmin <34320705+yperbasis@users.noreply.github.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
for _, topic := range lg.Topicswithfor i := range lg.TopicsinapplyLogsAndTraces4common.Hash(32 bytes) on every iteration; uses index access insteadTest plan
go test ./execution/state/...