Skip to content

Commit

Permalink
solana: update to 2.0.5 (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
fanatid authored Aug 17, 2024
1 parent d444247 commit d4621bd
Show file tree
Hide file tree
Showing 8 changed files with 372 additions and 541 deletions.
865 changes: 342 additions & 523 deletions Cargo.lock

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[workspace]
resolver = "2"
members = [
"plerkle", # 1.6.0+solana.1.18.21
"plerkle", # 1.6.0+solana.2.0.5
"plerkle_messenger", # 1.6.6
"plerkle_serialization", # 1.6.0+solana.1.18.21
"plerkle_serialization", # 1.6.0+solana.2.0.5
]

[profile.release]
Expand Down
10 changes: 5 additions & 5 deletions plerkle/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "plerkle"
description = "Geyser plugin with dynamic config reloading, message bus agnostic abstractions and a whole lot of fun."
version = "1.6.0+solana.1.18.21"
version = "1.6.0+solana.2.0.5"
authors = ["Metaplex Developers <[email protected]>"]
repository = "https://github.com/metaplex-foundation/digital-asset-validator-plugin"
license = "AGPL-3.0"
Expand All @@ -13,6 +13,7 @@ publish = false
crate-type = ["cdylib", "rlib"]

[dependencies]
agave-geyser-plugin-interface = "=2.0.5"
async-trait = "0.1.53"
base64 = "0.21.0"
bs58 = "0.4.0"
Expand All @@ -31,10 +32,9 @@ plerkle_serialization = { path = "../plerkle_serialization", version = "1.6.0" }
serde = "1.0.144"
serde_derive = "1.0.103"
serde_json = "1.0.83"
solana-geyser-plugin-interface = "=1.18.21"
solana-logger = "=1.18.21"
solana-sdk = "=1.18.21"
solana-transaction-status = "=1.18.21"
solana-logger = "=2.0.5"
solana-sdk = "=2.0.5"
solana-transaction-status = "=2.0.5"
thiserror = "1.0.30"
tokio = { version = "1.23.0", features = ["full"] }
tracing = "0.1.37"
Expand Down
2 changes: 1 addition & 1 deletion plerkle/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use thiserror::Error;

use solana_geyser_plugin_interface::geyser_plugin_interface::GeyserPluginError;
use agave_geyser_plugin_interface::geyser_plugin_interface::GeyserPluginError;

#[derive(Error, Debug)]
pub enum PlerkleError {
Expand Down
21 changes: 16 additions & 5 deletions plerkle/src/geyser_plugin_nft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use plerkle_serialization::serializer::{
use serde::Deserialize;
use tokio::sync::mpsc::{unbounded_channel, UnboundedSender};

use solana_geyser_plugin_interface::geyser_plugin_interface::{
use agave_geyser_plugin_interface::geyser_plugin_interface::{
GeyserPlugin, GeyserPluginError, ReplicaAccountInfoVersions, ReplicaBlockInfoVersions,
ReplicaTransactionInfoVersions, Result, SlotStatus,
};
Expand Down Expand Up @@ -149,6 +149,17 @@ impl<'a> PlerklePrivateMethods for Plerkle<'a> {
executed_transaction_count: 0,
}
}
ReplicaBlockInfoVersions::V0_0_4(block_info) => {
plerkle_serialization::solana_geyser_plugin_interface_shims::ReplicaBlockInfoV2 {
parent_slot: 0,
parent_blockhash: "",
slot: block_info.slot,
blockhash: block_info.blockhash,
block_time: block_info.block_time,
block_height: block_info.block_height,
executed_transaction_count: 0,
}
}
}
}
}
Expand Down Expand Up @@ -474,7 +485,7 @@ impl GeyserPlugin for Plerkle<'static> {
account: ReplicaAccountInfoVersions,
slot: u64,
is_startup: bool,
) -> solana_geyser_plugin_interface::geyser_plugin_interface::Result<()> {
) -> agave_geyser_plugin_interface::geyser_plugin_interface::Result<()> {
if !self.handle_startup && is_startup {
return Ok(());
}
Expand Down Expand Up @@ -561,7 +572,7 @@ impl GeyserPlugin for Plerkle<'static> {

fn notify_end_of_startup(
&self,
) -> solana_geyser_plugin_interface::geyser_plugin_interface::Result<()> {
) -> agave_geyser_plugin_interface::geyser_plugin_interface::Result<()> {
metric! {
statsd_time!("startup.timer", self.started_at.unwrap().elapsed());
}
Expand All @@ -574,7 +585,7 @@ impl GeyserPlugin for Plerkle<'static> {
slot: u64,
parent: Option<u64>,
status: SlotStatus,
) -> solana_geyser_plugin_interface::geyser_plugin_interface::Result<()> {
) -> agave_geyser_plugin_interface::geyser_plugin_interface::Result<()> {
info!("Slot status update: {:?} {:?}", slot, status);
if status == SlotStatus::Processed {
if let Some(parent) = parent {
Expand Down Expand Up @@ -637,7 +648,7 @@ impl GeyserPlugin for Plerkle<'static> {
&self,
transaction_info: ReplicaTransactionInfoVersions,
slot: u64,
) -> solana_geyser_plugin_interface::geyser_plugin_interface::Result<()> {
) -> agave_geyser_plugin_interface::geyser_plugin_interface::Result<()> {
let seen = Instant::now();
let rep: plerkle_serialization::solana_geyser_plugin_interface_shims::ReplicaTransactionInfoV2;
let transaction_info = match transaction_info {
Expand Down
2 changes: 1 addition & 1 deletion plerkle_messenger/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async-trait = "0.1.53"
blake3 = "1.3.3"
cadence = "0.29.0"
cadence-macros = "0.29.0"
figment = "0.10.6"
figment = { version = "0.10.6", features = ["env", "test"] }
futures = "0.3"
log = "0.4.11"
redis = { version = "0.22.3", features = ["aio", "tokio-comp", "streams", "tokio-native-tls-comp", "connection-manager"], optional = true }
Expand Down
6 changes: 3 additions & 3 deletions plerkle_serialization/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "plerkle_serialization"
description = "Metaplex Flatbuffers Plerkle Serialization for Geyser plugin producer/consumer patterns."
version = "1.6.0+solana.1.18.21"
version = "1.6.0+solana.2.0.5"
authors = ["Metaplex Developers <[email protected]>"]
repository = "https://github.com/metaplex-foundation/digital-asset-validator-plugin"
license = "AGPL-3.0"
Expand All @@ -14,8 +14,8 @@ bs58 = "0.4.0"
chrono = "0.4.22"
flatbuffers = "23.1.21"
serde = "1.0.152"
solana-sdk = "=1.18.21"
solana-transaction-status = "=1.18.21"
solana-sdk = "=2.0.5"
solana-transaction-status = "=2.0.5"
thiserror = "1.0.32"

[package.metadata.docs.rs]
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "1.75.0"
channel = "1.78.0"
components = ["clippy", "rustfmt"]
profile = "minimal"

0 comments on commit d4621bd

Please sign in to comment.