-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add upgrade handler to add default navs for testnet markers #1881
Add upgrade handler to add default navs for testnet markers #1881
Conversation
WalkthroughThis update introduces a new feature that automatically sets the net asset values (NAVs) for markers in the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (3)
- CHANGELOG.md (1 hunks)
- app/upgrades.go (1 hunks)
- app/upgrades_test.go (1 hunks)
Additional comments: 8
app/upgrades.go (1)
- 139-139: The addition of
addMarkerNavs(ctx, app, GetPioTestnet1DenomToNav())
within the "tourmaline-rc3" upgrade handler is a critical update for setting default NAVs for markers in the testnet environment. This change aligns with the PR objectives and ensures that the blockchain reflects real-world economic values accurately.
- The change is logically sound and aligns with the PR's objectives.
- It's important to ensure that
GetPioTestnet1DenomToNav()
fetches the latest and accurate NAVs from the Figure Technologies pricing engine. Manual verification or automated tests should confirm that the fetched NAVs are as expected on the date specified (March 19, 2024).app/upgrades_test.go (6)
- 449-450: The test asserts log messages for adding marker net asset values during the
tourmaline-rc3
upgrade. Ensure the actual upgrade handler's implementation aligns with these expectations.- 449-450: Ensure the
addMarkerNavs
function, which is tested here, robustly handles edge cases and errors, especially for markers without supply or existing NAVs.- 449-450: Confirm that the
setExchangeParams
function preserves existing configurations where appropriate, especially when parameters are already set.- 449-450: Verify the accuracy of NAV unit conversions by the
convertNavUnits
function, particularly for markers with the USD denomination in their NAVs.- 449-450: Ensure the
updateMsgFeesNhashPerMil
function precisely updates theNhashPerUsdMil
parameter to the intended value without unintended side effects.- 449-450: Confirm that the
setExchangePaymentParamsToDefaults
function preserves existing configurations where appropriate, especially when payment parameters are already set.CHANGELOG.md (1)
- 44-44: The changelog entry is clear and concise, accurately summarizing the addition of an upgrade handler for setting net asset values to markers in
pio-testnet-1
. Good job on maintaining the clarity and brevity expected in a changelog.
* add denom to nav pricing data method * add testnet navs to upgrade handler rc3 * comment out negative price, keep as reference * add upgrade handler * remove negative value marker * add change log
…1882) * add denom to nav pricing data method * add testnet navs to upgrade handler rc3 * comment out negative price, keep as reference * add upgrade handler * remove negative value marker * add change log Co-authored-by: Carlton Hanna <nullpointer0x00@gmail.com>
Description
Add an upgrade handler to set the navs of Figure markers values in testnet.
This is the query used to populate the prices: https://test.figure.tech/service-pricing-engine/external/api/v1/pricing/marker/new?time=2024-03-19T00:00:00.000-05:00
closes: #XXXX
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passesSummary by CodeRabbit