Conversation
There was a problem hiding this comment.
Pull request overview
Optimizes snapshot file version parsing by reducing allocations and standardizing invalid-version errors within db/version.
Changes:
- Introduces
ErrInvalidVersionsentinel error for invalid version strings. - Rewrites
ParseVersionto avoidstrings.Splitandfmt.Errorfin the hot path (uses index-based parsing and returns a static error).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
sudeepdino008
left a comment
There was a problem hiding this comment.
shld add copilot's suggestion
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
return static err instead of errorf - to reduce allocations
## 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>
return static err instead of errorf - to reduce allocations