Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solana: update to v2.0 #37

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,230 changes: 540 additions & 690 deletions Cargo.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ publish = false
crate-type = ["cdylib", "rlib"]

[dependencies]
agave-geyser-plugin-interface = "=2.0.13"
hyper = { version = "0.14.26", features = ["server"] }
lazy_static = "1.4.0"
log = "0.4.0"
Expand All @@ -20,18 +21,17 @@ prost = "0.12.1"
rdkafka = { version = "0.33.0", features = ["ssl", "sasl"] }
serde = { version = "1.0.147", features = ["derive"] }
serde_json = "1.0.81"
solana-geyser-plugin-interface = "~1.18.23"
solana-logger = "~1.18.23"
solana-program = "~1.18.23"
solana-transaction-status = "~1.18.23"
solana-logger = "2.0.13"
solana-program = "2.0.13"
solana-transaction-status = "2.0.13"
tokio = { version = "1.32.0", features = ["rt-multi-thread", "time", "macros", "sync"] }

[build-dependencies]
anyhow = "1.0.65"
cargo-lock = "9.0.0"
git-version = "0.3.5"
prost-build = "0.12.1"
vergen = { version = "8.2.1", features = ["build", "rustc"] }
vergen = { version = "9.0.1", features = ["build", "rustc"] }

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
7 changes: 4 additions & 3 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ fn main() -> anyhow::Result<()> {
config.compile_protos(&["proto/event.proto"], &["proto/"])?;

// Version metrics
let mut envs = vergen::EmitBuilder::builder();
envs.all_build().all_rustc();
envs.emit()?;
vergen::Emitter::default()
.add_instructions(&vergen::BuildBuilder::all_build()?)?
.add_instructions(&vergen::RustcBuilder::all_rustc()?)?
.emit()?;

// vergen git version does not looks cool
println!(
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "1.75.0"
channel = "1.78.0"
components = ["clippy", "rustfmt"]
targets = []
profile = "minimal"
8 changes: 4 additions & 4 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
// limitations under the License.

use {
crate::{prom::StatsThreadedProducerContext, PrometheusService},
crate::{metrics::StatsThreadedProducerContext, PrometheusService},
agave_geyser_plugin_interface::geyser_plugin_interface::{
GeyserPluginError, Result as PluginResult,
},
rdkafka::{
config::FromClientConfigAndContext,
error::KafkaResult,
producer::{DefaultProducerContext, ThreadedProducer},
ClientConfig,
},
serde::Deserialize,
solana_geyser_plugin_interface::geyser_plugin_interface::{
GeyserPluginError, Result as PluginResult,
},
std::{collections::HashMap, fs::File, io::Result as IoResult, net::SocketAddr, path::Path},
};

Expand Down
2 changes: 1 addition & 1 deletion src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use solana_geyser_plugin_interface::geyser_plugin_interface::SlotStatus as PluginSlotStatus;
use agave_geyser_plugin_interface::geyser_plugin_interface::SlotStatus as PluginSlotStatus;

include!(concat!(
env!("OUT_DIR"),
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use solana_geyser_plugin_interface::geyser_plugin_interface::GeyserPlugin;
use agave_geyser_plugin_interface::geyser_plugin_interface::GeyserPlugin;

mod config;
mod event;
mod filter;
mod metrics;
mod plugin;
mod prom;
mod publisher;
mod version;

pub use {
config::{Config, ConfigFilter, Producer},
event::*,
filter::Filter,
metrics::PrometheusService,
plugin::KafkaPlugin,
prom::PrometheusService,
publisher::Publisher,
};

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ use {
TransactionStatusMeta, TransactionTokenBalance, UiTokenAmount, UpdateAccountEvent,
V0LoadedMessage, V0Message,
},
log::{debug, error, info, log_enabled},
rdkafka::util::get_rdkafka_version,
solana_geyser_plugin_interface::geyser_plugin_interface::{
agave_geyser_plugin_interface::geyser_plugin_interface::{
GeyserPlugin, GeyserPluginError as PluginError, ReplicaAccountInfoV3,
ReplicaAccountInfoVersions, ReplicaTransactionInfoV2, ReplicaTransactionInfoVersions,
Result as PluginResult, SlotStatus as PluginSlotStatus,
},
log::{debug, error, info, log_enabled},
rdkafka::util::get_rdkafka_version,
solana_program::pubkey::Pubkey,
std::{
concat, env,
Expand Down
2 changes: 1 addition & 1 deletion src/publisher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use {
crate::{
message_wrapper::EventMessage::{self, Account, Slot, Transaction},
prom::{
metrics::{
StatsThreadedProducerContext, UPLOAD_ACCOUNTS_TOTAL, UPLOAD_SLOTS_TOTAL,
UPLOAD_TRANSACTIONS_TOTAL,
},
Expand Down