Commit Graph

11 Commits

Author SHA1 Message Date
Christian Kamm 80423fdac9 Track "is_selected" to denote closed/reused accounts 2022-01-28 10:12:01 +01:00
Christian Kamm 685dd75bfc Minor index fixes 2022-01-24 13:08:36 +01:00
Christian Kamm 08b99875c2 Postgres: Add an index to account write tables
This index matches exactly the most frequent query type of
SELECT DISTINCT(pubkey) ...
    ORDER BY pubkey, slot DESC, write_version DESC
2022-01-20 11:23:02 +01:00
Christian Kamm 7d8fd45de4 Add support for updating a monitoring table
That way connector interruptions can be seen directly form the target
database.
2022-01-06 12:54:35 +01:00
Christian Kamm a941f486ed Fix bug introduced by deleting older slots
Deleting older slots meant that older (but still most recent) account
writes that had their slot deleted would no longer show up in views.

Now the guarantee is that an account write for a missing slot that is
smaller than the top slot in the slots table is rooted.

To guarantee that, account writes for non-rooted slots that preceed
rooted slots are deleted now.
2021-11-25 10:38:55 +01:00
Christian Kamm 4c9b782d1f Mango: Drop all views in drop_views.sql 2021-11-15 16:18:27 +01:00
Christian Kamm 5ef1a19300 Mango: Update views and PnL query 2021-11-15 16:15:18 +01:00
Christian Kamm 456b19ea06 Add example SQL script for computing mango PnL 2021-11-09 14:50:08 +01:00
Christian Kamm 11f4d6bd67 Use separate pubkey table 2021-11-08 14:10:48 +01:00
Christian Kamm a17f142875 Use enum for slot status 2021-11-08 12:44:01 +01:00
Christian Kamm e67dd6c235 Split into connector library, and raw and mango binaries 2021-11-08 09:45:41 +01:00