-
Notifications
You must be signed in to change notification settings - Fork 11
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
expose historic average gas price data #1861
Comments
@hanssv is there any way to obtain the gas price from a previous historical block and not just top blocks? |
No, there is no way to retrieve historical data in the same format as the newly added endpoint. There is a (fair) bit of scanning and computing involved so adding this for an arbitrary height is not a great idea as @dincho explain. For the top height it is cached, but that approach doesn't scale. I don't know the context, but isn't this exactly the kind of data you'd expect the mdw to computed during sync/scan and then provide? |
@hanssv the mdw services stay at the top node height at all times, and even if we started syncing the node from height 0 we do not stop the node, get the top height data and have the node resume the syncing. Also, the mdw syncing might be too fast for the node syncing or the other way round. We can only implement it if we can reliably obtain information from the past |
Sorry, what? Isn't the mdw a service that aggregates, stores and provides historical data? (For example it provides information about transactions where one of the values is gas price, so how you couldn't yourself compute historical gas prices is beyond me?) If the node is supposed to provide all the necessary data in an aggregated format I'm not sure what the purpose of the mdw is? |
mdw grabs the node blocks from height 0 and begins processing them all up until the end using node functions, indexing information that the node does not provide via it's public API |
👍 sounds like indexing historical gas prices fits that description perfectly - you would have to do a little bit of arithmetics, but doing that once while going from 0 to the top is definitely the right way. (Compared to digging up an hours worth of microblocks to compute it on-the-fly) |
Cool, we'll try to mimic the arithmetics the node does. Thank you 🙏 |
It should be possible as discussed here
aeternity/aescan#857
The text was updated successfully, but these errors were encountered: