2

Can't figure out... How to get block producers votes on some past date? From cleos preferably :) By default it returns latest data, while i need it for let's say - yesterday or a week ago. Or can i derive this votes from blocks/transactions data extracted with mongo_gb_plugin? I have all data extracted into database.

2
  • yes, get latest or loop the blocks
    – Jimmy Guo
    Commented Aug 29, 2018 at 4:35
  • ok. and what? how to calculate votes? repeat whole process as nodeos is doing with vote degradation, etc? it seems not reliable at all :) Commented Aug 30, 2018 at 5:44

1 Answer 1

1

Current state which is accessible to dApps is stored in RAM. This is for best performance.

Past state which is not needed by dApps is only in the log. There are several plugins which help save the log data to a database for easier and faster querying of the historical data.

You need to set up a node with a plugin that suites your needs and wait for it to sync with the main net. Then you can query any info you're interested in.

It is recommended to filter the info you want to be collected in the database so it is not too big.

1
  • as I've said, i have whole database already. how to get votes out of it on particular date? Commented Aug 30, 2018 at 5:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.