xaya / libxayagame

MIT License
21 stars 19 forks source link

SQLite introspection utilities #124

Closed domob1812 closed 1 year ago

domob1812 commented 1 year ago

This adds a new file sqliteintro to the core xayagame library. The file contains basic introspection utilities for SQLite, and in particular also has the ability to deterministically dump (or hash) the content of a database. With this, GSPs can implement their own functionality to hash the game state, which can be useful in detecting and debugging forks.

In the future, there may be more libxayagame-level utilities around it, e.g. for automatically saving hashes every X blocks.