-
Notifications
You must be signed in to change notification settings - Fork 91
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
Incentives: Add a way to lookup the blocks proposed by an address #1623
Comments
Nodely will have a PR with this soon. playground: More here: |
What a powerhouse Nodely is! Wow! |
Do you think there are use cases where full_header would be too much and some dApp would benefit from smaller response ? What would be the bare bones fields (except for the incentives related) ? At the moment the block header response is : {
"bonus": 10000000,
"genesis-hash": "kUt08LxeVAAGHnh4JoAoAMM9ql/hBwSoiFtlnKNeOxA=",
"genesis-id": "fnet-v1",
"previous-block-hash": "MxEZcDvDrppd8QYrWzJgNnr4ERCaE9sxtJpluTQvzIk=",
"proposer": "FNET43EQJGPZNQPDWZSWEPAGTVFBA5WKUB64BPWWWLD4MCJUCMQDSONATA",
"rewards": {
"fee-sink": "FEESINK7OJKODDB5ZB4W2SRYPUSTOTK65UDCUYZ5DB4BW3VOHDHGO6JUNE",
"rewards-calculation-round": 500000,
"rewards-level": 0,
"rewards-pool": "7777777777777777777777777777777777777777777777777774MSJUVU",
"rewards-rate": 1,
"rewards-residue": 6
},
"round": 6,
"seed": "Ssp16N2gKGL44LL7yGAtS6/6wbTUy6kMYVt4dff/uiE=",
"state-proof-tracking": [
{
"next-round": 512,
"online-total-weight": 0,
"type": 0
}
],
"timestamp": 1724938350,
"transactions-root": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"transactions-root-sha256": "HQn2+iMjWIFRTaDl+PeJdn5rKOch+otqMK5/Gao+puc=",
"txn-counter": 1005,
"upgrade-state": {
"current-protocol": "fnet1",
"next-protocol-approvals": 0,
"next-protocol-switch-on": 0,
"next-protocol-vote-before": 0
},
"upgrade-vote": {
"upgrade-approve": false,
"upgrade-delay": 0
}
} I guess the with header_full=false the we should have at least: {
"bonus": 10000000,
"genesis-hash": "kUt08LxeVAAGHnh4JoAoAMM9ql/hBwSoiFtlnKNeOxA=",
"genesis-id": "fnet-v1",
"proposer": "FNET43EQJGPZNQPDWZSWEPAGTVFBA5WKUB64BPWWWLD4MCJUCMQDSONATA",
[... other incentives related...]
"round": 6,
"timestamp": 1724938350,
"txn-counter": 1005
} |
If the implementation and development resource cost on having such a _full header param is relatively affordable, I would say yes, it makes a difference and would be a very practical option for devs to use. |
Problem
With the upcoming release of participation incentives, users will want to track the incentives that an individual account accrues over time.
Incentives are not transferred by transactions, so existing transaction lookup endpoints can't solve this problem. Instead this information is present in the block header.
Solution
A solution is to have a new endpoint which takes an account address as an argument and returns information about all blocks proposed by that address, likely in a paginated list with the most recent blocks first.
As for the information about individual blocks being returned, the following are both possibilities:
Depending on the expected use cases, one of these may make more sense than the other.
Dependencies
An index on block proposers would help make the suggested endpoint more efficient.
Urgency
Good to think about before incentives are live on mainnet
The text was updated successfully, but these errors were encountered: