Skip to content

Prune data during blocksync#3

Merged
kostko merged 1 commit into
v0.37.15-oasisfrom
martin/feature/prune-during-blocksync
Sep 18, 2025
Merged

Prune data during blocksync#3
kostko merged 1 commit into
v0.37.15-oasisfrom
martin/feature/prune-during-blocksync

Conversation

@martintomazic

@martintomazic martintomazic commented Sep 10, 2025

Copy link
Copy Markdown

Needed for oasisprotocol/oasis-core#6319.

Tested this quickly with state sync and block sync from the genesis (short period). Works.

Seems to also work as a mitigation for badgerDB instances growing too much and not being able to reclaim the disk space: oasisprotocol/oasis-core#6286 (comment).

Comment thread blocksync/reactor.go
Comment thread blocksync/reactor.go Outdated
@martintomazic martintomazic force-pushed the martin/feature/prune-during-blocksync branch from 26f2d93 to 0d9bd93 Compare September 10, 2025 12:10
This enables pruning of cometbft db instances during initial block
sync (starting either from the checkpoint or genesis).

Cherry-picked from commit (cometbft/cometbft: db26cff) and resolved
the conflicts:
* Changelog was removed.
* Where applicable `ApplyVerifiedBlock` was used.
@martintomazic martintomazic marked this pull request as draft September 11, 2025 10:11
@martintomazic martintomazic force-pushed the martin/feature/prune-during-blocksync branch from 0d9bd93 to 3988ee5 Compare September 11, 2025 10:14
@martintomazic

martintomazic commented Sep 11, 2025

Copy link
Copy Markdown
Author

CI failing:

Error: Failed to run: Error: Command failed: /home/runner/golangci-lint-1.64.8-linux-amd64/golangci-lint config verify
jsonschema: "linters-settings" does not validate with "/properties/linters-settings/additionalProperties": additional properties 'golint', 'maligned' not allowed

This properties can be removed, and then we can fix the linting issues. There are also some failing test that I think were there before -> will double check again now that I changed the code.

Not sure we should fix this given this problems are also part of the upstream branch?

Changelog:
Omitted the changelog looking at our previous patches. Once this is merged, we make a new release, and bump the oasis-core part to it, adding a changelog there and impact of the bump (pruning works during block sync)?

Update:
Given that v0.37.15 (upstream) is a longterm support release, I am surprised this was not patched already, like is done for other bugs. Maybe this is not critical or they consider it performance optimization for which you are encouraged to upgrade to a newer version. Possibly given commit name, they are not even aware this was a bug fix... Asking if we should also file an issue for this and aim for this to also get merged upstream eventually...

@martintomazic martintomazic changed the title blocksync: Prune data during blocksync Prune data during blocksync Sep 11, 2025
@martintomazic martintomazic marked this pull request as ready for review September 11, 2025 10:25
@kostko

kostko commented Sep 12, 2025

Copy link
Copy Markdown
Member

Upstream is EOL AFAIK.

@kostko kostko merged commit 3988ee5 into v0.37.15-oasis Sep 18, 2025
15 of 21 checks passed
@kostko kostko deleted the martin/feature/prune-during-blocksync branch September 18, 2025 12:50
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