You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Port mining optimizations for veblop (ethereum#1783)
* feat: disabling gogc override
* internal/cli: add GC variables in config
* core,eth,internal/cli,triedb/pathdb: add maxdifflayers to config
* consensus/bor: fix header timestamp when time is in the past
When the calculated header timestamp based on parent time and producer delay
falls in the past, ensure we add the full producer delay to the current time
rather than just setting it to current time. This prevents immediate timeout
issues in the commit interrupt mechanism where blocks would be interrupted
immediately due to negative time delays.
Previously, when header.Time < now, we would set header.Time = now, which
could still result in timing issues during block building. Now we properly
calculate header.Time = now + CalcProducerDelay() to ensure adequate time
for block building operations.
* consensus/bor,internal/cli,params: add header timestamp fix when in past
* perf(core/blockstm): optimize HasReadDep for small input sizes
Add performance optimization to HasReadDep function based on production metrics
showing ~3M calls with median size of 15. For small inputs (<=512 elements),
use direct nested loop comparison instead of map allocation to improve performance
due to better cache locality and avoiding allocation overhead.
Additionally:
- Replace map[Key]bool with map[Key]struct{} to reduce memory usage
- Add Prometheus metrics to track function calls and input sizes
- Add detailed comments explaining the optimization rationale
The cutoff of 512 was determined through benchmarking and captures >50% of
production calls, providing significant performance improvement for the
common case while maintaining O(n+m) complexity for larger inputs.
* core: add hasReadDepCallCounter and readsMapSizeHist metrics
* eth.internal/cli,triedb: fix lint
* core,eth,internal/cli,triedb/pathdb: rm maxdifflayers config
* core: add dagBuildTimer
* Revert "consensus/bor,internal/cli,params: add header timestamp fix when in past"
This reverts commit 76f6ac5afef4309ec18184cf07618fc25cefff55.
* triedb/pathdb: rm invalid comment
* internal/cli: rm unused function
---------
Co-authored-by: John Hilliard <praetoriansentry@gmail.com>
0 commit comments