Skip to content

Conversation

@red-0ne
Copy link
Contributor

@red-0ne red-0ne commented Mar 26, 2025

Summary

Enhance params system to track historical parameters and enable retrieval based on block height.
Delay params activation until next session to avoid disturbing the current session with new params.

Primary Changes:

  • Modify ParamsCache interface to support historical storage with GetAtHeight and SetAtHeight methods
  • Add GetParamsAtHeight query functionality to retrieve params effective at a specific block height
  • Update tokenomics and proof keepers methods to use params from the relevant session height instead of current params

Secondary changes:

  • Add ParamsUpdate storage with effective block heights
  • Implement BeginBlocker to activate scheduled param updates at session boundaries
  • Add events for shared params updates
  • Update claim/proof processing to use historically correct parameter values

Issue

Type of change

Select one or more from the following:

Sanity Checklist

  • I have updated the GitHub Issue assignees, reviewers, labels, project, iteration and milestone
  • For docs, I have run make docusaurus_start
  • For code, I have run make go_develop_and_test and make test_e2e
  • For code, I have added the devnet-test-e2e label to run E2E tests in CI
  • For configurations, I have update the documentation
  • I added TODOs where applicable

@red-0ne red-0ne added protocol General core protocol related changes governance Governance related changes on-chain On-chain business logic labels Mar 26, 2025
@red-0ne red-0ne added this to the Beta TestNet Iteration milestone Mar 26, 2025
@red-0ne red-0ne self-assigned this Mar 26, 2025
@red-0ne red-0ne added this to Shannon Mar 26, 2025
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Shannon Mar 26, 2025
// 2a. This likely also requires adding validation to the shared module params.
blockHeight := ctx.BlockHeight()

// TODO_IN_THIS_PR: Iterate over all claims and use the sharedParams as of the

Choose a reason for hiding this comment

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

[linter-name (fail-on-found)] reported by reviewdog 🐶
// TODO_IN_THIS_PR: Iterate over all claims and use the sharedParams as of the

func (sq *sharedQuerier) GetParams(ctx context.Context) (*sharedtypes.Params, error) {
logger := sq.logger.With("query_client", "shared", "method", "GetParams")

// TODO_IN_THIS_PR: Ensure that the latest cached version of the shared module

Choose a reason for hiding this comment

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

[linter-name (fail-on-found)] reported by reviewdog 🐶
// TODO_IN_THIS_PR: Ensure that the latest cached version of the shared module

@red-0ne red-0ne moved this from 📋 Backlog to 👀 In review in Shannon Mar 26, 2025
@red-0ne red-0ne moved this from 👀 In review to 🏗 In progress in Shannon Mar 26, 2025
@red-0ne red-0ne force-pushed the feat/historical-params branch 6 times, most recently from f0ba8c2 to c24e0ce Compare April 7, 2025 11:38
@red-0ne red-0ne force-pushed the feat/historical-params branch from c24e0ce to 3872df9 Compare May 7, 2025 12:11
@github-actions github-actions bot added the consensus-breaking IMPORTANT! If the PR with this tag is merged, next release WILL HAVE TO BE an upgrade. label May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

consensus-breaking IMPORTANT! If the PR with this tag is merged, next release WILL HAVE TO BE an upgrade. governance Governance related changes on-chain On-chain business logic protocol General core protocol related changes

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

3 participants