Skip to content
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

Store state hash per block height #346

Closed
aakoshh opened this issue Feb 16, 2023 · 0 comments · Fixed by consensus-shipyard/fendermint#38
Closed

Store state hash per block height #346

aakoshh opened this issue Feb 16, 2023 · 0 comments · Fixed by consensus-shipyard/fendermint#38

Comments

@aakoshh
Copy link
Contributor

aakoshh commented Feb 16, 2023

A followup for #347

Currently the application only remembers the last committed state, however, if we stored the state hash at each past block height, or the last N heights, we could go back in state (it's not emptied from the IPLD store) and run multiple consistent queries on the same height.

Think about how to implement this in the view of a new block being produced every second:

  • Should we remember the last N heights, and purge the ones before?
  • Should we insert all and hope RocksDB will just store them?
  • Is there some data structure we could use to only store changes, but still have fast lookups? Should we do bisection to find which range a block falls into?

Tendermint will also store all all hashes as part of the headers, but it also has an option of how many blocks to retain. It would be reasonable to say: we support queries up to the last hour, or last 24 hours.

@jsoares jsoares transferred this issue from consensus-shipyard/fendermint Dec 19, 2023
@jsoares jsoares closed this as not planned Won't fix, can't repro, duplicate, stale Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants