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

[Upgrades] v0.0.12 upgrade #1043

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

[Upgrades] v0.0.12 upgrade #1043

wants to merge 2 commits into from

Conversation

okdas
Copy link
Member

@okdas okdas commented Jan 24, 2025

Summary

Adding an upgrade handler for v0.0.12

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

@okdas okdas added the protocol General core protocol related changes label Jan 24, 2025
@okdas okdas added this to the Beta TestNet Iteration milestone Jan 24, 2025
@okdas okdas self-assigned this Jan 24, 2025
// - Before: v0.0.11
// - After: v0.0.12

// TODO_IN_THIS_PR: WIP. Using this diff as a starting point: https://github.com/pokt-network/poktroll/compare/v0.0.11...feat/proof-endblocker

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: WIP. Using this diff as a starting point: v0.0.11...feat/proof-endblocker

// - After: v0.0.12

// TODO_IN_THIS_PR: WIP. Using this diff as a starting point: https://github.com/pokt-network/poktroll/compare/v0.0.11...feat/proof-endblocker
// TODO_IN_THIS_PR: Wait for https://github.com/pokt-network/poktroll/pull/1042

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: Wait for #1042

},
StakingFee: &cosmosTypes.Coin{
Denom: "upokt",
// TODO_IN_THIS_PR: 100upokt a good value?

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: 100upokt a good value?

}
logger.Info("Successfully updated supplier params", "new_params", supplierParams)

// TODO_IN_THIS_PR: RevSharePercent / DefaultRevSharePercent has been changed from float32 to uint64.

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: RevSharePercent / DefaultRevSharePercent has been changed from float32 to uint64.

// and maintain two versions of protobuf files IF we need to loop through existing suppliers and update their onchain
// data.

// TODO_IN_THIS_PR: Add service.params.target_num_relays.

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: Add service.params.target_num_relays.

// data.

// TODO_IN_THIS_PR: Add service.params.target_num_relays.
// TODO_IN_THIS_PR: Add tokenomics.params.global_inflation_per_claim.

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: Add tokenomics.params.global_inflation_per_claim.

// protobuf field. As a result, we expect existing on-chain data to switch to default value.
// Investigate the impact of this change on existing on-chain data.
//
// TODO_IN_THIS_PR: decide if we need a proper module migration.

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: decide if we need a proper module migration.

@okdas okdas force-pushed the upgrade/prep-v0.0.12 branch from 5a3decc to f187c35 Compare January 30, 2025 23:49
@okdas okdas changed the title [Upgrades][WIP] prepare for v0.0.12 [Upgrades] v0.0.12 migration Jan 31, 2025
@okdas okdas changed the title [Upgrades] v0.0.12 migration [Upgrades] v0.0.12 upgrade Jan 31, 2025
@okdas okdas requested a review from Olshansk January 31, 2025 01:54
@okdas okdas marked this pull request as ready for review January 31, 2025 01:55
Copy link
Contributor

@red-0ne red-0ne left a comment

Choose a reason for hiding this comment

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

LGTM! I feel we are starting to improve our migration plans 👏

},
StakingFee: &cosmosTypes.Coin{
Denom: "upokt",
// TODO_IN_THIS_PR: 100upokt a good value?
Copy link
Contributor

Choose a reason for hiding this comment

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

I think 100upokt or 1000upokt is a good value for now. We have the transaction fees that also protect from sibyl.

// Force all services to have a 100% revshare to the supplier.
// Not something we would do on a real mainnet, but it's a quick way to resolve the issue.
// Currently, we don't break any existing suppliers (as all of them have a 100% revshare to the supplier).
service.RevShare = []*sharedtypes.ServiceRevenueShare{
Copy link
Contributor

Choose a reason for hiding this comment

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

Ideally we would be able to loop over the old revshare map by unmashalling to the old proto type then create the new Supplier proto with the new values.

But since we don't have proto versioning and we marked the old (float32) value as reserved, this is the next best option offered to us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
protocol General core protocol related changes
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

2 participants