You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to independently compute proposal results, we need to fetch voting power for each vote of each past governance proposal. To achieve this, it appears that we need the following data for each past epoch:
total NAM staked on chain
Expected: ABCI query /vp/pos/total_stake/5000 returns total staked amount at epoch 5000
Expected: ABCI query /vp/pos/validator/addresses/5900 returns list of validators at epoch 5900
Actual: ABCI query /vp/pos/validator/addresses/5900 returns an empty list.
stake amount of each validator
same as above (possibly different epoch count)
bond amount of each delegator
same as above (possibly different epoch count)
As far as I understood from epoched.rs, the Epoched struct only keeps data for a fixed number of past epochs. Could you explain why this is the case and whether there is a workaround for fetching historical data from the node?
The text was updated successfully, but these errors were encountered:
Hi @egasimus! Right now, this is a limitation of namada. We "prune" some of the PoS data each epoch, meaning that the data you are looking for its not easily accessible and requires a more complex mechanism to query it. Unfortunately, this is not a priority for us right now and we won't look into it in the short future.
As a workaround, you start a fullnode from scratch and while the fullnode is synching, you can connect an indexer.
Ill' leave the issue open and update it as soon as we start working on this.
Thanks! Fair enough. For the workaround, doesn't that mean a race between the fullnode sync and the indexer? Doesn't sound very reliable. it would be massively helpful if the node at least returned an error that the queried data has been pruned, rather than just returning empty values.
In order to independently compute proposal results, we need to fetch voting power for each vote of each past governance proposal. To achieve this, it appears that we need the following data for each past epoch:
/vp/pos/total_stake/5000
returns total staked amount at epoch 5000/vp/pos/total_stake/5000
returns0n
/vp/pos/validator/addresses/5900
returns list of validators at epoch 5900/vp/pos/validator/addresses/5900
returns an empty list.As far as I understood from
epoched.rs
, theEpoched
struct only keeps data for a fixed number of past epochs. Could you explain why this is the case and whether there is a workaround for fetching historical data from the node?The text was updated successfully, but these errors were encountered: