Commit 1cf1ea8
rpc: reuse storage composite key buffers (erigontech#21205)
## Summary
- Reuse a storage composite-key buffer in the cached history state
reader.
- Keep the address+slot key layout unchanged while avoiding per-read
heap allocation.
- Match the existing `HistoryReaderV3` composite-key reuse pattern.
## Benchmark
<img width="1948" height="236" alt="519afec69b23bed9cfe7096cb5106034"
src="https://github.com/user-attachments/assets/d6fdaf68-6417-44eb-bf1e-7ab11d3ea62c"
/>
## Test plan
- `gofmt -l rpc/rpchelper/helper.go`
- `git diff --check -- rpc/rpchelper/helper.go`
- `go test -timeout=20m ./rpc/rpchelper`
- `make lint`
Co-authored-by: lupin012 <58134934+lupin012@users.noreply.github.com>1 parent 9e01d17 commit 1cf1ea8
1 file changed
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
240 | 244 | | |
241 | 245 | | |
242 | 246 | | |
243 | | - | |
244 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
245 | 250 | | |
246 | 251 | | |
247 | 252 | | |
| |||
295 | 300 | | |
296 | 301 | | |
297 | 302 | | |
298 | | - | |
| 303 | + | |
| 304 | + | |
299 | 305 | | |
300 | 306 | | |
301 | 307 | | |
| |||
0 commit comments