-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Improve Rpc inflation tooling #10309
Improve Rpc inflation tooling #10309
Conversation
bff1ec1
to
05f54e6
Compare
05f54e6
to
1890bb6
Compare
Codecov Report
@@ Coverage Diff @@
## master #10309 +/- ##
=========================================
- Coverage 81.3% 81.3% -0.1%
=========================================
Files 288 288
Lines 66906 66982 +76
=========================================
+ Hits 54433 54489 +56
- Misses 12473 12493 +20 |
1890bb6
to
d8ca31e
Compare
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.
Thanks, looks good. Let's backport to v1.2 and v1.1 for RPC consistency, this is super low risk
@@ -635,33 +636,59 @@ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "m | |||
{"jsonrpc":"2.0","result":{"identity": "2r1F4iWqVcb8M1DbAjQuFpebkQHY9hcVU4WuW2DJBppN"},"id":1} | |||
``` | |||
|
|||
### getInflation |
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.
Can you please mark getInflation
as deprecated in core/src/rpc.rs too, so future readers know why that endpoint is no longer documented
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.
Currently, this pr removes the getInflation
endpoint entirely. My thinking was that there are unlikely to be downstream users, since no inflation on mainnet-beta, and only very new to testnet.
Should I restore?
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.
Ah, I totally missed that in the diff. Yanking it seems fine, I agree
d8ca31e
to
e526bba
Compare
automerge (cherry picked from commit b563b49) # Conflicts: # core/Cargo.toml # core/src/rpc.rs # genesis-programs/src/lib.rs # runtime/src/bank.rs
automerge (cherry picked from commit b563b49) # Conflicts: # core/Cargo.toml # runtime/src/bank.rs
automerge (cherry picked from commit b563b49)
automerge (cherry picked from commit b563b49)
automerge (cherry picked from commit b563b49)
automerge (cherry picked from commit b563b49)
Problem
The
getInflation
endpoint returns essentially an inflation governor, not any information about current inflation rates. This forces user to re-implement the same calculator methods that we have in the sdk/inflation module.Summary of Changes
getInflationGovernor
endpoint that returns the inflation governor datagetInflationRate
endpoint that calculates the current inflation for an epoch (default, current epoch)Fixes #10094
Fixes #10092