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

chore: payment refactor to use global store prices for billing #408

Merged
merged 15 commits into from
Aug 15, 2023

Conversation

forcodedancing
Copy link
Contributor

@forcodedancing forcodedancing commented Aug 9, 2023

Description

This pr will update the price logic and billing calculation.

  • There will be a global storage price (including read and store). It is a median of all sps' price settings. The global storage price will be updated periodically (e.g., every 30 days).
  • The fee for bucket will use the global price, including read fee and store fee.

Rationale

  • make the price more transparent and steady

Example

QueryGlobalSpStorePriceByTime

Changes

Notable changes:

  • remove some price queries and add new ones

@forcodedancing forcodedancing force-pushed the payment_refactor branch 3 times, most recently from b7810ae to ac40f56 Compare August 9, 2023 08:51
Copy link
Collaborator

@unclezoro unclezoro left a comment

Choose a reason for hiding this comment

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

need change the update price time limitation

@forcodedancing forcodedancing force-pushed the payment_refactor branch 2 times, most recently from 2141b5f to 61dd9d0 Compare August 10, 2023 07:46
go.mod Outdated
@@ -177,7 +177,7 @@ replace (
github.com/cometbft/cometbft => github.com/bnb-chain/greenfield-cometbft v0.0.2
github.com/cometbft/cometbft-db => github.com/bnb-chain/greenfield-cometbft-db v0.8.1-alpha.1
github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0
github.com/cosmos/cosmos-sdk => github.com/bnb-chain/greenfield-cosmos-sdk v0.2.4-alpha.1
github.com/cosmos/cosmos-sdk => github.com/bnb-chain/greenfield-cosmos-sdk v0.2.3-alpha.3.0.20230810070304-b0d00febdec4
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@unclezoro
Copy link
Collaborator

Please resolve the conflicts

@forcodedancing
Copy link
Contributor Author

Please resolve the conflicts

resolved

@unclezoro unclezoro added this pull request to the merge queue Aug 15, 2023
Merged via the queue into bnb-chain:develop with commit 0d07730 Aug 15, 2023
5 checks passed
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

Successfully merging this pull request may close these issues.

4 participants