Skip to content

Conversation

evan-forbes
Copy link
Member

opening #448 on my own branch

@evan-forbes evan-forbes self-assigned this Sep 21, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in core/app Sep 21, 2025
@evan-forbes evan-forbes changed the title Evan/main/remove storage restrictions feat: remove block data pruning restriction Sep 21, 2025
@evan-forbes evan-forbes moved this from Needs Triage to In Progress in core/app Sep 21, 2025
@evan-forbes evan-forbes marked this pull request as ready for review September 23, 2025 11:56
@evan-forbes evan-forbes requested a review from a team as a code owner September 23, 2025 11:56
@evan-forbes evan-forbes requested review from sysrex, rootulp, cmwaters and rach-id and removed request for a team September 23, 2025 11:56
@celestiaorg celestiaorg deleted a comment from github-actions bot Sep 23, 2025
@evan-forbes
Copy link
Member Author

linting ci etc is failing, but nothing important or related to this PR

trying to fix in #682

baseapp/abci.go Outdated
Comment on lines 1359 to 1362
// Default is 0
var retentionHeight int64

// Define the number of blocks needed to protect against misbehaving validators
// which allows light clients to operate safely. Note, we piggy back of the
// evidence parameters instead of computing an estimated number of blocks based
// on the unbonding period and block commitment time as the two should be
// equivalent.
cp := app.GetConsensusParams(app.finalizeBlockState.Context())
if cp.Evidence != nil && cp.Evidence.MaxAgeNumBlocks > 0 {
retentionHeight = commitHeight - cp.Evidence.MaxAgeNumBlocks
}
retentionHeight = commitHeight - 1500
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I'm very confused. How is the default 0 if retentionHeight is commitHeight - 1500?

Also why not refactor this to just

	retentionHeight := commitHeight - 1500

Update: I found some historical context: #448 (comment)

I'm in favor of:

  1. Extracting a const that explains the 1500 magic number
  2. Increasing the number to something larger than the snapshot interval because I don't trust that this will help node operators block sync after a state sync given I expect a state sync'ed node to be more than 1500 blocks behind.
  3. Removing the "Default is 0" comment b/c that doesn't make sense to me

@evan-forbes evan-forbes marked this pull request as draft September 24, 2025 12:17
Copy link

@evan-forbes your pull request is missing a changelog!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

3 participants