Use bulk insertion to Postgres at startup to reduce time taken for initial snapshot restore for postgres plugin. Avoid duplicate writes of accounts at startup. Doing account plugin notification and indexing in parallel. Improved error handling for postgres plugin to show the real db issues for debug purpose Added more metrics for postgres plugin. Refactored plugin centric code out to a sub module from accounts_db and added unit tests |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |
README.md
Solana AccountsDb Plugin Interface
This crate enables an AccountsDb plugin to be plugged into the Solana Validator runtime to take actions
at the time of each account update; for example, saving the account state to an external database. The plugin must implement the AccountsDbPlugin
trait. Please see the detail of the accountsdb_plugin_interface.rs
for the interface definition.
The plugin should produce a cdylib
dynamic library, which must expose a C
function _create_plugin()
that
instantiates the implementation of the interface.
The solana-accountsdb-plugin-postgres
crate provides an example of how to create a plugin which saves the accounts data into an
external PostgreSQL databases.
More information about Solana is available in the Solana documentation.
Still have questions? Ask us on Discord