Skip to content

feat: configurable pruning limits + span-rotation improves#134

Merged
pratikspatil024 merged 2 commits into
0xPolygon:release/3.2-developfrom
alex-kulam:feature/pruning-and-sync-tuning
Mar 27, 2026
Merged

feat: configurable pruning limits + span-rotation improves#134
pratikspatil024 merged 2 commits into
0xPolygon:release/3.2-developfrom
alex-kulam:feature/pruning-and-sync-tuning

Conversation

@alex-kulam

Copy link
Copy Markdown

This PR contains two improvements:

  1. Configurable Pruning Limits
    Added 4 environment variables to control pruning behavior:
  • ERIGON_PRUNE_LIMIT and ERIGON_PRUNE_TIMEOUT_MS: Control domain tables pruning (AccountsVals, StorageVals, CommitmentVals, CodeVals)
  • ERIGON_PRUNE_CHANGESETS_LIMIT and ERIGON_PRUNE_CHANGESETS_TIMEOUT_MS: Control ChangeSets3 table pruning
    Default limits (100-250ms for domains, 1000-500ms for ChangeSets) were insufficient for Polygon, causing CommitmentVals and ChangeSets3 tables to grow unbounded. This led to severe sync lags and excessive database size.
    Increased limits to 10,000 entities with 2000ms timeouts, enabling effective pruning of accumulated data and maintaining MDBX database size within ~22GB.
  1. Span Rotation Optimization
    Added on-chain timestamp gap validation to prevent false positives in span rotation detection.

@pratikspatil024 pratikspatil024 requested a review from a team March 11, 2026 13:18
@pratikspatil024 pratikspatil024 merged commit d24ab2a into 0xPolygon:release/3.2-develop Mar 27, 2026
9 checks passed
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.

4 participants