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

Change module parameters with height #245

Closed
rigelrozanski opened this issue Sep 1, 2017 · 3 comments
Closed

Change module parameters with height #245

rigelrozanski opened this issue Sep 1, 2017 · 3 comments

Comments

@rigelrozanski
Copy link
Contributor

From conversation with @ebuchman. We need to have a specialized mechanism for changing the parameters of modules DURING operation based on block height and custom logic; as well as enable and disable modules based on block height and custom logic. A great example of how this will need to be used is for the initialization period of the cosmos hub launch. During this period (which should last about as many blocks as should be mined in 2 weeks), there will be no sendTx and the unbonding period should be 0 (instant). After the delegatation-game period sendTx is turned on, and unbonding period becomes 1 month.

Another example is the number of maximum validators scaling with block height. This number starts at 100 but will gradually be increased to 300 (https://cosmos.network/whitepaper).

This mechanism should also be built with the intention of including integration with governance no minimize the number of soft forks required to change the parameters of the system.

@ethanfrey
Copy link
Contributor

If I understand correctly, you want a hook to execute code (and modify state) every block, whether or not a given module processes DeliverTx or something else? Is that basically the issue?

Could we add a method to the Handler like

type Ticker interface {
  Tick(height uint64, store SimpleDB)
}

And then execute it on every registered module on eg. BeginBlock. Is that general idea correct? Do you need more info? eg. the whole block header, or height and timestamp, or....???

@rigelrozanski
Copy link
Contributor Author

I don't think that these parameter changes check need to be necessarily happen every single block, it could really be variable depending on the application... I guess that check could be performed as the first operation in the logic space, but as many applications I'm envisioning probably don't need to happen every block, it may be worth building in that check by default within BeginBlock. If we end up providing time guarantees then yes need to include this. Do we need the whole block header? Maybe for the punishment module proofs... so yes?

@ebuchman
Copy link
Member

stale. replaced by #346

sosedoff referenced this issue in figment-networks/cosmos-sdk Jun 4, 2022
…ting during the upgrade (#244) (#245)

(cherry picked from commit 9a05fa0)

Co-authored-by: Roman <[email protected]>
yihuang added a commit to yihuang/cosmos-sdk that referenced this issue Apr 2, 2024
Solution:
- fix and add test to support the usage pattern in ethermint

add Discard method to CacheWrap

better testing
dudong2 referenced this issue in b-harvest/cosmos-sdk Oct 17, 2024
Solution:
- fix and add test to support the usage pattern in ethermint

add Discard method to CacheWrap

better testing
dudong2 referenced this issue in b-harvest/cosmos-sdk Oct 30, 2024
Solution:
- fix and add test to support the usage pattern in ethermint

add Discard method to CacheWrap

better testing
mmsqe pushed a commit to mmsqe/cosmos-sdk that referenced this issue Dec 12, 2024
Solution:
- fix and add test to support the usage pattern in ethermint

add Discard method to CacheWrap

better testing
mmsqe pushed a commit to mmsqe/cosmos-sdk that referenced this issue Dec 12, 2024
Solution:
- fix and add test to support the usage pattern in ethermint

add Discard method to CacheWrap

better testing
mmsqe pushed a commit to mmsqe/cosmos-sdk that referenced this issue Dec 16, 2024
Solution:
- fix and add test to support the usage pattern in ethermint

add Discard method to CacheWrap

better testing
mmsqe pushed a commit to mmsqe/cosmos-sdk that referenced this issue Dec 16, 2024
Solution:
- fix and add test to support the usage pattern in ethermint

add Discard method to CacheWrap

better testing
mmsqe pushed a commit to mmsqe/cosmos-sdk that referenced this issue Dec 31, 2024
Solution:
- fix and add test to support the usage pattern in ethermint

add Discard method to CacheWrap

better testing
mmsqe pushed a commit to mmsqe/cosmos-sdk that referenced this issue Jan 9, 2025
Solution:
- fix and add test to support the usage pattern in ethermint

add Discard method to CacheWrap

better testing
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

No branches or pull requests

3 participants