Comments (3)
Will this "simply" add a new field
pending
to the endpoint response? If that is the case, is this pending rewards information not available (doing a bit of local computation) in current and previous versions of the staking pallet? This way we would have a stable output format.
No, my intention was not to modify the endpoints' responses as soon as pending_rewards
goes live, only to check if it can be used to simplify the internal calculations in our endpoints. The reason I added this issue was more of a tracker issue to re iterate through the logic as soon as it is available. It could potentially make the code simpler and more efficient.
Based on this comment for example, the response under claimed will now be something like this:
"claimedRewards": [
{
"era": "1322",
"status": "claimed"
},
{
"era": "1323",
"status": "unclaimed"
},
{
"era": "1324",
"status": "partially claimed"
},
which is calculated by currently comparing the results from 3 calls and quite a few if else
statements. So if pending_rewards
can be used to reduce this, maybe it is worth re iterating. Wdyt?
Note: I updated the More Info
section in the Description
to give some more context.
from substrate-api-sidecar.
So if
pending_rewards
can be used to reduce this, maybe it is worth re iterating. Wdyt?
Yes, that total makes sense. Bear in mind that this will simplify the logic from the relevant spec version onwards, but for previous ones, we will still need to maintain the more complex logic as introduced by #1445
from substrate-api-sidecar.
Will this "simply" add a new field pending
to the endpoint response? If that is the case, is this pending rewards information not available (doing a bit of local computation) in current and previous versions of the staking pallet? This way we would have a stable output format.
from substrate-api-sidecar.
Related Issues (20)
- Substrate API Sidecar Postman collection has no URLs HOT 5
- Add nominations to the `GET /accounts/{accountId}/staking-info` endpoint as per stated in the docs
- Investigate diff between `staking-payouts` results vs `staking.nominators` call (`targets`)
- Add `GET /accounts/{accountID}/foreign-asset-balances` endpoint HOT 1
- API request error:Unable to decode storage staking.ledger HOT 4
- Failed to parse transaction HOT 8
- Fee estimation/tx broadcast stopped working HOT 2
- Sidecar feee request issue HOT 3
- Tao Blockchain info":{"error":"Fee calculation not supported for this network"}, HOT 2
- avail chain this error HOT 5
- fis chain can not get fee HOT 2
- Basic Grafana Dashboard
- Expand prometheus metrics coverage to include custom route-based metrics
- Integrate Loki logs aggregation
- Add `pallets/approved-referenda` endpoint
- Sidecar fails after reaching 4GB RSS Memory
- Sidecar Hangs After Bad Request
- Remove Rococo references after deprecation
- AssetHub Migration: Update code, tests & docs accordingly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from substrate-api-sidecar.