Skip to content

Conversation

@HugoDutchie
Copy link

@HugoDutchie HugoDutchie commented Dec 19, 2025

Problem

Chaindata grows indefinitely even though snapshots are created. initialCycle flips to
false too early, reducing prune rate from 10K to 10 blocks/cycle.

Fix

Keep initialCycle=true while prune backlog exists (blocks in chaindata already frozen
in snapshots).

Related

See 0xPolygon/erigon PR for Bor-specific fix (forkchoice.go + block_snapshots.go) see #92

@pratikspatil024
Copy link
Member

Hi @HugoDutchie - is this not related to Polygon? I see you addresses similar issue in #92.

@HugoDutchie
Copy link
Author

I had a talk with Mark Holt from erigontech team, he asked to publish the fix for erigon main branch as well. This section is not ran by bor enabled nodes, its a different code path, but Mark said trying to keep both erigontech and polygon fork versions as close to eachother as possible. They suffer with same problem.

Also note that both PR's I did are not the final solution. I'm trying to get a more decent fix.

@pratikspatil024 pratikspatil024 changed the base branch from release/3.2 to main December 22, 2025 09:55
@pratikspatil024
Copy link
Member

Got it, thanks! So do you think it will be better to create this PR in the upstream erigontech/erigon repo?
I can then close this PR and only test #92

@HugoDutchie
Copy link
Author

Maybe yes, because this was untested, more like a proposal. Maybe first get the polygon version completely fixed.

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.

2 participants