-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
[cherrypick][jsonrpc] fix estimated rewards during safe mode (#20182) #20187
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
emmazzz
temporarily deployed
to
sui-typescript-aws-kms-test-env
November 6, 2024 00:19
— with
GitHub Actions
Inactive
emmazzz
changed the title
[jsonrpc] fix estimated rewards during safe mode (#20182)
[cherrypick][jsonrpc] fix estimated rewards during safe mode (#20182)
Nov 6, 2024
ebmifa
approved these changes
Nov 6, 2024
## Description Currently if the exchange rate for an epoch is not found, we would assign it the default exchange rate while we should've used the exchange rate from the previous existing epoch instead. This PR fixes that. ## Test plan Added some unit tests. --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] Indexer: - [x] JSON-RPC: fixed reward estimation in `getStakes` API so that we don't overestimate stake rewards of stakes activated during safe mode epochs. - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK: - [ ] REST API:
emmazzz
force-pushed
the
emma/pick-20182-1.37
branch
from
November 12, 2024 01:57
8d23b61
to
a55db37
Compare
emmazzz
temporarily deployed
to
sui-typescript-aws-kms-test-env
November 12, 2024 01:57
— with
GitHub Actions
Inactive
Waiting on dependent packages to update.
## Description We are not using this dependency and `cargo deny` includes an advisory that it has been rolled into `opentelemetry`, which this change silences. ## Test plan CI
## Description `derivative` is unmaintained. Switch existing uses to use `derive_more` instead, which is an existing dependency that has all the necessary features. This also required bumping `derive_more` to `1.0.0`, which introduced some small breaking changes, and means that we are pulling in two versions of `derive_more` due to transitive dependency constraints, but in this case, it should be okay because we are mainly using this dep for its proc macros, and one hopes that eventually the transitive deps will upgrade to `1.x` as well. ## Test plan CI
emmazzz
temporarily deployed
to
sui-typescript-aws-kms-test-env
November 12, 2024 02:56
— with
GitHub Actions
Inactive
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Currently if the exchange rate for an epoch is not found, we would assign it the default exchange rate while we should've used the exchange rate from the previous existing epoch instead. This PR fixes that.
Test plan
Added some unit tests.
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.
getStakes
API so that we don't overestimate stake rewards of stakes activated during safe mode epochs.Description
Describe the changes or additions included in this PR.
Test plan
How did you test the new or updated feature?
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.