-
Notifications
You must be signed in to change notification settings - Fork 35
feat: remove block data pruning restriction #681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release/v0.51.x-celestia
Are you sure you want to change the base?
feat: remove block data pruning restriction #681
Conversation
Co-authored-by: Copilot <[email protected]>
linting ci etc is failing, but nothing important or related to this PR trying to fix in #682 |
baseapp/abci.go
Outdated
// 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 |
There was a problem hiding this comment.
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:
- Extracting a const that explains the 1500 magic number
- 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.
- Removing the "Default is 0" comment b/c that doesn't make sense to me
Co-authored-by: Rootul P <[email protected]>
@evan-forbes your pull request is missing a changelog! |
…lestiaorg/cosmos-sdk into evan/main/remove-storage-restrictions
opening #448 on my own branch