Skip to content
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

Add granularity options to pruning state #5709

Merged
merged 20 commits into from
Feb 28, 2020

Conversation

jgimeno
Copy link
Contributor

@jgimeno jgimeno commented Feb 27, 2020

Closes: #5684

Description


For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@jgimeno jgimeno added WIP C:CLI T: API Breaking Breaking changes that impact APIs and the SDK only (not state machine). labels Feb 27, 2020
server/pruning_test.go Show resolved Hide resolved
server/pruning_test.go Show resolved Hide resolved
server/start.go Outdated Show resolved Hide resolved
@jgimeno
Copy link
Contributor Author

jgimeno commented Feb 27, 2020

Even that it does not break back compatibility unless they use the new flags the new way to call SetPruning from gaia for example is:

baseapp.SetPruning(server.GetPruningOptionsFromFlags()),

instead of

baseapp.SetPruning(store.NewPruningOptionsFromString(viper.GetString("pruning"))),

So I don't know if it is worth it to deprecate the old NewPruningOptionsFromString, and later make it private. Ideas?

@jgimeno jgimeno changed the title Jonathan/5684 prune syncable Add granularity options to pruning state Feb 27, 2020
server/pruning_test.go Outdated Show resolved Hide resolved
server/start_test.go Outdated Show resolved Hide resolved
@jgimeno jgimeno marked this pull request as ready for review February 27, 2020 16:34
@jgimeno jgimeno added R4R and removed WIP labels Feb 27, 2020
Copy link
Collaborator

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

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

LGTM. Minor comments only

server/pruning.go Outdated Show resolved Hide resolved
server/start.go Outdated Show resolved Hide resolved
server/start.go Outdated Show resolved Hide resolved
Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

minor nitpicks, but otherwise LGTM. Great job @jgimeno 👍

server/pruning.go Outdated Show resolved Hide resolved
server/start.go Show resolved Hide resolved
server/start.go Outdated Show resolved Hide resolved
@jgimeno jgimeno requested a review from alexanderbez February 28, 2020 15:21
Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

ACK ☕️

@alexanderbez alexanderbez added the A:automerge Automatically merge PR once all prerequisites pass. label Feb 28, 2020
@codecov
Copy link

codecov bot commented Feb 28, 2020

Codecov Report

Merging #5709 into master will increase coverage by 0.22%.
The diff coverage is 27.16%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #5709      +/-   ##
=========================================
+ Coverage   35.47%   35.7%   +0.22%     
=========================================
  Files         333     335       +2     
  Lines       32604   32695      +91     
=========================================
+ Hits        11566   11673     +107     
+ Misses      19816   19790      -26     
- Partials     1222    1232      +10
Impacted Files Coverage Δ
simapp/test_helpers.go 0% <0%> (ø) ⬆️
x/staking/keeper/val_state_change.go 65.03% <100%> (ø) ⬆️
x/staking/keeper/keeper.go 60% <100%> (+11.51%) ⬆️
x/staking/keeper/validator.go 79.57% <100%> (ø) ⬆️
x/staking/keeper/delegation.go 75.66% <100%> (+0.89%) ⬆️
x/staking/keeper/slash.go 71.53% <100%> (ø) ⬆️
version/command.go 77.77% <80%> (ø)
version/version.go 100% <0%> (ø)
... and 4 more

@alexanderbez alexanderbez merged commit 7d6fc7e into master Feb 28, 2020
@alexanderbez alexanderbez deleted the jonathan/5684-prune-syncable branch February 28, 2020 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass. C:CLI T: API Breaking Breaking changes that impact APIs and the SDK only (not state machine).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Granular Pruning Options
5 participants