xaya / libxayagame

MIT License
21 stars 19 forks source link

Framework for game-state processors and state hashing #127

Closed domob1812 closed 1 year ago

domob1812 commented 1 year ago

This introduces a framework for "game-state processors": They can be added to the Game and will then be notified about state updates. For SQLite specifically, they can be used to compute specific "extra data" (that is not directly consensus relevant), e.g. some caches for frontends.

In particular, with this we also implement a feature for hashing the SQLite game database every X blocks, which can be useful to detect and debug forks.