analyseether / ether_sql

A python library to push ethereum blockchain data into an sql database.
http://ether-sql.readthedocs.io
Apache License 2.0
69 stars 22 forks source link

Function to get state at block = X #19

Closed ankitchiplunkar closed 6 years ago

ankitchiplunkar commented 6 years ago

Is your feature request related to a problem? Please describe. We are pushing the difference in storage and state after each block, this means that we can theoretically derive the state at a particular block number using the available data.

Describe the solution you'd like We need to also maintain a current state and current storage table in the database. This function can be either used to create the current state, current storage.

Sample algorithm for getting current state.

https://stackoverflow.com/questions/7745609/sql-select-only-rows-with-max-value-on-a-column?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa