JoinMarket-Org / joinmarket-clientserver

Bitcoin CoinJoin implementation with incentive structure to convince people to take part
GNU General Public License v3.0
711 stars 175 forks source link

Store structured history data somewhere #1609

Open kristapsk opened 9 months ago

kristapsk commented 9 months ago

See https://github.com/dennisreimann/joinmarket-log-parser. It's a tool that analyzes JoinMarket log files and extracts structured data from them. It would make sense to store that data in structured manner by JoinMarket itself.

Data gathered are:

IMHO SQLite database could be the best way to do this, as we already use it for some in-memory stuff and will not add new dependencies. Then some tool could be added on top that would allow CSV, JSON or whatever dumps. But that is a detail we could discuss.

Related Nostr thread - https://coracle.social/nevent1qqs86axmpzpnc0lmm2pzysc8dj74dkguhw322c7xgsnuwsur6ntaz4cpp4mhxue69uhkummn9ekx7mqpzemhxue69uhhyetvv9ujumn0wd68ytnzv9hxgqg5waehxw309aex2mrp0yhxummnw3ezucn8qgs2e08vgadp5nu5sxfeanaars73z86mtfr55wdwqwdmcus0m5c9hmqfvy5na.

kristapsk commented 9 months ago

Another thing to think about - this would be superset of existing yigen-statement.csv functionality. Probably that could be removed and file could be generated by the script from sqlite db when needed.

AdamISZ commented 9 months ago

IMHO SQLite database could be the best way to do this, as we already use it for some in-memory stuff and will not add new dependencies. Then some tool could be added on top that would allow CSV, JSON or whatever dumps. But that is a detail we could discuss.

Good thinking, I very much agree with that, at least, at a first impression. So we could use existing log events to trigger the database entries.