diff --git a/Cargo.toml b/Cargo.toml index 2df7260..8cc8897 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "solana-accountsdb-plugin-kafka" description = "Solana AccountsDb plugin for Kafka" authors = ["Blockdaemon"] -version = "0.1.3+solana.1.10.2" +version = "0.1.3+solana.1.10.7" edition = "2021" repository = "https://github.com/Blockdaemon/solana-accountsdb-plugin-kafka" license = "Apache-2.0" @@ -11,18 +11,18 @@ license = "Apache-2.0" crate-type = ["cdylib", "rlib"] [dependencies] -prost = "0.9" +prost = "0.10" rdkafka = { version = "0.28", features = ["ssl-vendored", "sasl"] } -solana-accountsdb-plugin-interface = { version = "=1.10.2" } -solana-logger = { version = "=1.10.2" } -solana-program = { version = "=1.10.2" } +solana-geyser-plugin-interface = { version = "=1.10.7" } +solana-logger = { version = "=1.10.7" } +solana-program = { version = "=1.10.7" } log = "0.4" serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } simple-error = "0.2.3" [build-dependencies] -prost-build = "0.9" +prost-build = "0.10" [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/src/config.rs b/src/config.rs index ed2a3b5..be1079d 100644 --- a/src/config.rs +++ b/src/config.rs @@ -20,8 +20,8 @@ use { ClientConfig, }, serde::Deserialize, - solana_accountsdb_plugin_interface::accountsdb_plugin_interface::{ - AccountsDbPluginError, Result as PluginResult, + solana_geyser_plugin_interface::geyser_plugin_interface::{ + GeyserPluginError, Result as PluginResult, }, std::{collections::HashMap, fs::File, path::Path}, }; @@ -66,7 +66,7 @@ impl Config { pub fn read_from>(config_path: P) -> PluginResult { let file = File::open(config_path)?; let mut this: Self = serde_json::from_reader(file) - .map_err(|e| AccountsDbPluginError::ConfigFileReadError { msg: e.to_string() })?; + .map_err(|e| GeyserPluginError::ConfigFileReadError { msg: e.to_string() })?; this.fill_defaults(); Ok(this) } diff --git a/src/event.rs b/src/event.rs index a8c416a..355c208 100644 --- a/src/event.rs +++ b/src/event.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use solana_accountsdb_plugin_interface::accountsdb_plugin_interface::SlotStatus as PluginSlotStatus; +use solana_geyser_plugin_interface::geyser_plugin_interface::SlotStatus as PluginSlotStatus; include!(concat!( env!("OUT_DIR"), diff --git a/src/lib.rs b/src/lib.rs index 1e47ca0..4e9d7e5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use solana_accountsdb_plugin_interface::accountsdb_plugin_interface::AccountsDbPlugin; +use solana_geyser_plugin_interface::geyser_plugin_interface::GeyserPlugin; mod config; mod event; @@ -32,12 +32,12 @@ pub use { #[allow(improper_ctypes_definitions)] /// # Safety /// -/// This function returns a pointer to the Kafka Plugin box implementing trait AccountsDbPlugin. +/// This function returns a pointer to the Kafka Plugin box implementing trait GeyserPlugin. /// /// The Solana validator and this plugin must be compiled with the same Rust compiler version and Solana core version. /// Loading this plugin with mismatching versions is undefined behavior and will likely cause memory corruption. -pub unsafe extern "C" fn _create_plugin() -> *mut dyn AccountsDbPlugin { +pub unsafe extern "C" fn _create_plugin() -> *mut dyn GeyserPlugin { let plugin = KafkaPlugin::new(); - let plugin: Box = Box::new(plugin); + let plugin: Box = Box::new(plugin); Box::into_raw(plugin) } diff --git a/src/plugin.rs b/src/plugin.rs index b447b51..dbefc8a 100644 --- a/src/plugin.rs +++ b/src/plugin.rs @@ -17,8 +17,8 @@ use { log::info, rdkafka::util::get_rdkafka_version, simple_error::simple_error, - solana_accountsdb_plugin_interface::accountsdb_plugin_interface::{ - AccountsDbPlugin, AccountsDbPluginError as PluginError, ReplicaAccountInfo, + solana_geyser_plugin_interface::geyser_plugin_interface::{ + GeyserPlugin, GeyserPluginError as PluginError, ReplicaAccountInfo, ReplicaAccountInfoVersions, Result as PluginResult, SlotStatus as PluginSlotStatus, }, std::fmt::{Debug, Formatter}, @@ -37,7 +37,7 @@ impl Debug for KafkaPlugin { } } -impl AccountsDbPlugin for KafkaPlugin { +impl GeyserPlugin for KafkaPlugin { fn name(&self) -> &'static str { "KafkaPlugin" }