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

Update DefaultHistoricalEntries to 100 #6059

Merged
merged 6 commits into from
Apr 23, 2020
Merged

Update DefaultHistoricalEntries to 100 #6059

merged 6 commits into from
Apr 23, 2020

Conversation

jackzampolin
Copy link
Member

Closes: #XXX

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)

x/staking/types/params.go Outdated Show resolved Hide resolved
@@ -28,7 +28,7 @@ const (

// DefaultHistorical entries is 0 since it must only be non-zero for
// IBC connected chains
DefaultHistoricalEntries uint32 = 0
DefaultHistoricalEntries uint32 = 1000
Copy link
Contributor

Choose a reason for hiding this comment

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

Any rationale behind this value?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

This will govern how low-latency IBC handshakes must be in order to complete in time. I think 1000 is fine, it's probably even fine to use something much lower, like 100.

Copy link
Contributor

@alexanderbez alexanderbez Apr 23, 2020

Choose a reason for hiding this comment

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

I see. Are historical entries persisted in state? If so, we should opt for a lower bound instead (nitpick).

Copy link
Collaborator

@fedekunze fedekunze Apr 23, 2020

Choose a reason for hiding this comment

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

after block 100 the new ones start overriding the old ones so there are always at most 100

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.

ACK. Pending @cwgoes and @AdityaSripal's approval

@codecov
Copy link

codecov bot commented Apr 22, 2020

Codecov Report

Merging #6059 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #6059   +/-   ##
=======================================
  Coverage   54.64%   54.64%           
=======================================
  Files         426      426           
  Lines       25890    25890           
=======================================
  Hits        14148    14148           
  Misses      10763    10763           
  Partials      979      979           

Copy link
Contributor

@cwgoes cwgoes left a comment

Choose a reason for hiding this comment

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

ACK, although I think we don't even need to keep 1000, at least as a default

@@ -28,7 +28,7 @@ const (

// DefaultHistorical entries is 0 since it must only be non-zero for
// IBC connected chains
DefaultHistoricalEntries uint32 = 0
DefaultHistoricalEntries uint32 = 1000
Copy link
Contributor

Choose a reason for hiding this comment

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

This will govern how low-latency IBC handshakes must be in order to complete in time. I think 1000 is fine, it's probably even fine to use something much lower, like 100.

@fedekunze fedekunze changed the title Update DefaultHistoricalEntries to 1000 Update DefaultHistoricalEntries to 100 Apr 23, 2020
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 Apr 23, 2020
@mergify mergify bot merged commit 4f52797 into master Apr 23, 2020
@mergify mergify bot deleted the jack/hist-entries branch April 23, 2020 15:06
larry0x pushed a commit to larry0x/cosmos-sdk that referenced this pull request May 22, 2023
* Update DefaultHistoricalEntries to 1000

* hist entries sims and comment on simapp

* changelog and godoc

* update sim param change

* update default to 100

Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
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:x/staking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants