Commit Graph

169 Commits

Author SHA1 Message Date
Linus Kendall cba2744c3a Make clippy and cargo fmt happy 2022-07-22 12:28:08 +01:00
Linus Kendall fd1654b416 Version bump 1.10.31 2022-07-22 11:54:57 +01:00
Linus Kendall b04fcc24ca Merge branch 'v1.10-comaspring' of github.com:rpcpool/solana-accountsdb-connector into v1.10-comaspring 2022-07-22 11:54:19 +01:00
Linus Kendall 1cefcbdc39 Version bump 1.10.31 2022-07-22 11:54:05 +01:00
Linus Kendall 057cc19459
Merge pull request #2 from Nader-Sl/v1.10
Adds optional zstd compression to account data
2022-07-13 22:09:52 +02:00
Nader Sleiman 2e92e92c1d format 2022-07-13 21:36:24 +03:00
Nader Sleiman 5adf0ee0af Added optional zstd compression to account data 2022-07-13 21:20:33 +03:00
Linus Kendall 7984be92e2 Merge branch 'v1.10' of github.com:rpcpool/solana-accountsdb-connector into v1.10 2022-07-11 11:55:26 +01:00
Linus Kendall 952e496e9c Added gzip compression support 2022-07-11 11:55:18 +01:00
Linus Kendall 751756e3b4 Fixed ci name 2022-06-20 13:20:31 +01:00
Linus Kendall d8dd027744 fixed plugin name 2022-06-20 12:49:47 +01:00
Linus Kendall 0cd9947d0a Remove incompatible subcrates (temp)
Currently the mango specific crates don't work with 1.10 so removing them from build.
2022-06-20 12:18:38 +01:00
Linus Kendall a80d62f1fb Upgraded solana version 2022-06-20 12:18:23 +01:00
Linus Kendall 80e6099ff2 Added compatibility for 1.10 2022-06-20 12:17:32 +01:00
Linus Kendall c18632c1b2 Added ci build scripts
Added basic github actions build scripts.
2022-05-14 14:57:56 +02:00
Maximilian Schneider ac3eb65e5c service-fills: add to README 2022-04-08 05:24:01 +02:00
Maximilian Schneider 8dde08d377 service-fills: add slote and write version to fill update 2022-04-08 05:23:52 +02:00
Maximilian Schneider b41c094aba merge fill service 2022-03-28 20:01:16 +02:00
Christian Kamm c2f0c0ac05 Fix write_version sanity checking for 1.9
In 1.9, the write_version will no longer be strictly monotonic across
accounts.
2022-03-28 15:37:53 +02:00
Christian Kamm 9e643776dc pnl-service: config options 2022-03-24 13:44:24 +01:00
Christian Kamm 1be0cc8fb6 pnl-service: first working version 2022-03-23 18:39:42 +01:00
Christian Kamm 7d2ad2ed96 pnl-service: regularly compute pnl for all markets 2022-03-23 17:25:03 +01:00
Christian Kamm 30a4ca71ee mango-pnl-service: first steps 2022-03-23 09:07:00 +01:00
Christian Kamm cdf6d54156 Config: Separate out source config
We want to be able to not have a postgres target
2022-03-23 08:51:17 +01:00
Christian Kamm 3beaac671d Add memory_target and chain_data
This will be useful for storing account data in memory.
2022-03-23 08:19:19 +01:00
Christian Kamm 42f07d58a6 Keep slot, write_version etc as u64, convert only for postgres
This makes the conversion to i64 something that's local to the postgres
target, and doesn't affect unrelated code.
2022-03-23 08:18:02 +01:00
Christian Kamm 83e9c54fc0 Fix talking to older plugins
The previous commit only looked like it worked due to stale generated
code.
2022-03-23 08:16:02 +01:00
Christian Kamm 0a72228feb
Merge pull request #3 from rpcpool/fixes_1.9
Compatibility fixes for 1.9
2022-03-22 15:01:33 +01:00
Christian Kamm 2b1bf634c7 grpc proto: Change back to AccountsDb name to avoid incompatibility
Existing plugin deployments must continue to work with the new version
of the connector.
2022-03-22 12:54:38 +01:00
Linus Kendall b6cefddef2 Compatibility fixes for 1.9
- Renamed to geyser everywhere and updated the crates
- Changed FullRpcClient to AccountsDataClient
2022-03-22 08:36:59 +00:00
Christian Kamm f25c49d983 Configurable max account write queue size 2022-03-16 11:04:30 +01:00
Christian Kamm 80423fdac9 Track "is_selected" to denote closed/reused accounts 2022-01-28 10:12:01 +01:00
Christian Kamm 66266a3469 Update solana version to 1.8.14 2022-01-26 10:08:53 +01:00
Christian Kamm e5d17998ab AccountsDB plugin: Track addresses to notice closure/reuse
Previously there were no messages for accounts that were closed
(lamports=0, owner=system_program) or reused for a different program
(which can happen in one tx).

Now messages contain an is_selected flag that lets the receiver know
whether its a message for a tracked account or just a follow-up message
for an account that used to be tracked.
2022-01-26 10:02:43 +01:00
Christian Kamm 685dd75bfc Minor index fixes 2022-01-24 13:08:36 +01:00
Christian Kamm e4e3fb2cac Update example config files 2022-01-20 16:20:16 +01:00
Christian Kamm 185bf4f9cf Postgres: Fix account_write cleanup query
Avoid misbehaving in situations where there's an account write for a
slot that doesn't yet have an entry in the slots table by limiting the
slot numbers.
2022-01-20 15:28:16 +01:00
Christian Kamm 287308daf7 Readme updates 2022-01-20 14:56:34 +01:00
Christian Kamm dc80d8266c Process postgres cleanup jobs separately
Executing them for every rooted slot may overwhelm the database.
2022-01-20 14:49:51 +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 cf26557f7d Update to solana 1.8.12 2022-01-12 12:00:06 +01:00
Christian Kamm afc08d8266 Fix metadata 2022-01-07 08:21:00 +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 b1f18c0b13 Fix data deletion not being enableable 2022-01-05 16:02:34 +01:00
Christian Kamm fb7e0d14e2 Update to solana 1.8.11 2022-01-04 18:39:48 +01:00
Christian Kamm 0755c7ed08 Update dependencies 2022-01-04 10:38:49 +01:00
Christian Kamm 5b5eaba4ff Pipeline SQL inserts for better performance
Previously insert speed was primarily limited by roundtrip time to the
database since they were fully sequential in each connection. Now a full
batch of inserts is done per connection in parallel.

This could still be improved a lot. Currently each connection will fully
wait for all inserts to be done in the current batch before starting
another one.
2022-01-04 10:15:57 +01:00
Christian Kamm 3f242aa3b6 Fix startup issue around rooted slots 2022-01-04 10:14:30 +01:00
Christian Kamm d5395a3b75 Add config flag for deleting old data
Keeping it is very useful for testing.
2022-01-03 10:36:11 +01:00
Christian Kamm f0c26bb8fb Fix write_version from multiple servers and startup
Each node has an internal write_version counter. To deduplicate events
and produce a consistent database snapshot independent of the internal
count, we map it a per-slot-and-pubkey write version.

To do this correctly, we can only process account writes for slots where
all account writes will be received. This is a problem during startup,
where it's unclear what slots we have missed data for.

To make startup easier, let the plugin keep track of the highest slot
number that account writes have happened for, and send it when a new
consumer connects.
2022-01-03 10:36:11 +01:00