Skip to content
Open
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
5,490 changes: 2,080 additions & 3,410 deletions Cargo.lock

Large diffs are not rendered by default.

38 changes: 21 additions & 17 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ path = "src/tools/tree_validator/main.rs"
ark-serialize = "0.5"
ark-bn254 = "0.5"

anchor-lang = "0.29.0"
anyhow = "1.0.79"
async-std = { version = "1", features = ["attributes", "tokio1"] }
async-trait = "0.1.85"
base64 = "0.21.0"
borsh = "0.10.3"
borsh1 = { package = "borsh", version = "1.5" }
bs58 = "0.4.0"
byteorder = "1.5.0"
cadence-macros = "1.2.0"
Expand Down Expand Up @@ -74,22 +74,26 @@ sea-orm-migration = { version = "0.10.6", features = [
serde = { version = "1.0.217", features = ["derive"] }
serde_json = "1.0.82"

solana-client = "1.18.0"
solana-program = "1.18.0"
solana-sdk = "1.18.0"
solana-pubkey = "2.3.0"
solana-client = "3.0.8"
solana-pubkey = { version = "3.0.0", features = ["serde", "borsh"] }
solana-signature = "3.1.0"
solana-account = "3.2.0"
solana-clock = "3.0.0"
solana-transaction = "3.0.1"
solana-bn254 = "3.1.2"
solana-commitment-config = "3.0.0"

solana-transaction-status = "1.18.0"
solana-transaction-status = "3.0.8"

light-zero-copy = { version = "0.4.0", features = ["solana"] }
light-concurrent-merkle-tree = { version = "3.0.0", features = ["solana"] }
light-batched-merkle-tree = { version = "0.5.0", features = ["solana"] }
light-merkle-tree-metadata = { version = "0.5.0", features = ["solana"] }
light-compressed-account = { version = "0.5.0", features = ["anchor"] }
light-hasher = { version = "4.0.0", features = ["solana"] }
light-zero-copy = { version = "0.5",default-features = false}
light-concurrent-merkle-tree = {version = "4", default-features = false }
light-batched-merkle-tree = { version = "0.6", default-features = false}
light-merkle-tree-metadata = { version = "0.6", default-features = false }
light-compressed-account = { version = "0.6", default-features = false }
light-hasher = { version = "5", features = ["poseidon", "keccak", "sha256"], default-features = false}
light-poseidon = "0.3.0"
light-indexed-merkle-tree = "3.0.0"
account-compression = "2.0.0"
light-indexed-merkle-tree = { version = "4", default-features = false }
light-event = "0.1"

sqlx = { version = "0.6.2", features = [
"macros",
Expand Down Expand Up @@ -121,8 +125,8 @@ utoipa = { version = "4.2.0", features = [
"chrono",
"non_strict_integers",
] }
yellowstone-grpc-client = "1.15.0"
yellowstone-grpc-proto = "1.14.0"
yellowstone-grpc-client = "10.1.1"
yellowstone-grpc-proto = "10.1.1"
Comment on lines +128 to +129
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify Yellowstone gRPC client/proto v10.1.1 API compatibility.

Yellowstone gRPC dependencies have jumped from 1.15.0/1.14.0 to 10.1.1—a major version increase. This suggests either:

  • A versioning reset in the upstream project.
  • Significant API/protocol changes requiring code adaptation.

Confirm that your gRPC client code, subscription handlers, and message parsing are compatible with the v10.1.1 API surface. Check the release notes or changelog for breaking changes.


🏁 Script executed:

#!/bin/bash
# Description: Verify Yellowstone gRPC API usage is compatible with v10.1.1.

# Search for yellowstone gRPC client usage
rg -n 'yellowstone_grpc|GrpcClient|UpdateOnDemand|AccountUpdate' --type rust | head -20

# Check for any hardcoded version assumptions in code
rg -n '10\\.1\\.1|1\\.15|1\\.14' --type rust --type toml

Length of output: 653






🏁 Script executed:

#!/bin/bash
# Examine the grpc.rs file for subscription handlers and message parsing details
cat src/ingester/fetchers/grpc.rs | head -100

Length of output: 4503


🏁 Script executed:

#!/bin/bash
# Look for subscription handlers and how messages are processed
rg -n 'subscribe|Subscribe|on_update|OnUpdate|handle' --type rust src/ingester/fetchers/grpc.rs -A 3

Length of output: 2119


🌐 Web query:

Yellowstone gRPC v10.1.1 changelog breaking changes

💡 Result:

I couldn't find a published changelog entry that lists breaking changes specifically for Yellowstone gRPC v10.1.1. The project changelog (shows up through v10.0.1 and earlier breaking-change notes) and the crate page for v10.1.1 are here for reference:

  • Project changelog (shows breaking notes up to v10.0.1). [1]
  • docs.rs listing for yellowstone-grpc-client 10.1.1. [2]
  • GitHub releases/tags for the rpcpool/yellowstone-grpc repo (latest tags include v10.0.1 variants). [3]

If you want, I can:

  • search GitHub tags/commits for the v10.1.1 tag or commit and extract any breaking-change notes, or
  • open the v10.1.1 crate/source to compare public API/proto changes and list breaking changes.

Which would you prefer?






🌐 Web query:

Yellowstone gRPC GitHub releases v10.1.1 rpcpool

💡 Result:

I couldn't find a v10.1.1 release for rpcpool/yellowstone-grpc on GitHub. The repository's releases page lists tags up to v10.0.1 (and v9.1.0 as the latest shown). [1][2]

Sources:

  • rpcpool/yellowstone-grpc releases page. [1]
  • rpcpool/yellowstone-grpc repository README. [2]

🌐 Web query:

yellowstone-grpc-proto 10.1.1 crates.io API documentation

💡 Result:

I couldn't find published docs for version 10.1.1, but the nearest available API docs and sources are:

If you specifically need 10.1.1 API docs, do you want me to: (A) check crates.io for that exact version and try to open its docs, or (B) fetch the 10.1.1 crate sources from crates.io/GitHub so I can generate or inspect the API surface?






---

🏁 Script executed:

```shell
#!/bin/bash
# Check if Cargo.lock exists and what versions are actually locked
if [ -f Cargo.lock ]; then
  echo "=== Cargo.lock entries for yellowstone ==="
  rg -n 'name = "yellowstone' Cargo.lock -A 2
else
  echo "No Cargo.lock found"
fi

Length of output: 308


🌐 Web query:

crates.io yellowstone-grpc-client 10.1.1 version

💡 Result:

Yes — version 10.1.1 of yellowstone-grpc-client is published (docs/metadata available). [1][2]

Sources:

  • docs.rs page for yellowstone-grpc-client 10.1.1. [1]
  • versions/metadata listing for the crate. [2]

🌐 Web query:

crates.io yellowstone-grpc-proto 10.1.1 version

💡 Result:

There is no yellowstone-grpc-proto v10.1.1 on crates.io — the latest published crate version is 10.1.0 (as shown on docs.rs). [1][2]

Sources:

  • yellowstone-grpc-proto (docs.rs) — latest / 10.1.0. [1]
  • rpcpool/yellowstone-grpc releases (GitHub) — tags/releases show v10.0.1 series; no v10.1.1 for the proto crate. [2]





🏁 Script executed:

#!/bin/bash
# Extract the exact dependency specification from Cargo.toml
rg -n 'yellowstone-grpc' Cargo.toml -A 1 -B 1

Length of output: 106


🌐 Web query:

yellowstone-grpc-proto 10.1.1 yanked deprecated version status

💡 Result:

I can't find any record that yellowstone-grpc-proto v10.1.1 exists or was yanked. The published crate documentation and index show v10.1.0 as the latest release of yellowstone-grpc-proto. [1][2]

Sources:

  • docs.rs listing for yellowstone-grpc-proto (latest / 10.1.0). [1]
  • docs.rs page specifically for 10.0.1 / 10.1.0 (package docs). [2]

Fix Cargo.toml: yellowstone-grpc-proto v10.1.1 does not exist on crates.io.

yellowstone-grpc-proto v10.1.1 is not published on crates.io; the latest version is 10.1.0. While yellowstone-grpc-client v10.1.1 exists, the proto dependency in Cargo.toml (line 129) is unresolvable. Update yellowstone-grpc-proto = "10.1.1" to "10.1.0" to match the available crate version, or verify if a different proto version is intended.

🤖 Prompt for AI Agents
In Cargo.toml around lines 128 to 129, the dependency declaration lists
yellowstone-grpc-proto = "10.1.1" which is not published on crates.io; change
that version to "10.1.0" (or to the intended published version) so the proto
crate resolves, ensuring the client and proto versions remain compatible.

cadence = "1.4.0"
async-stream = "0.3.5"
rand = "0.8.5"
Expand All @@ -134,7 +138,7 @@ cloud-storage = "0.11.1"
[dev-dependencies]
function_name = "0.3.0"
serial_test = "2.0.0"
light-merkle-tree-reference = "3.0.0"
light-merkle-tree-reference = "4"

[profile.dev]
# Do not produce debug info for ~40% faster incremental compilation.
Expand Down
9 changes: 1 addition & 8 deletions src/api/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ use cadence_macros::statsd_count;
use jsonrpsee::core::Error as RpcError;
use jsonrpsee::types::error::CallError;
use log::error;
use solana_pubkey::ParsePubkeyError as SolanaPubkeyParseError;
use solana_sdk::pubkey::ParsePubkeyError;
use solana_pubkey::ParsePubkeyError;
use thiserror::Error;

#[derive(Error, Debug, PartialEq, Eq)]
Expand Down Expand Up @@ -85,12 +84,6 @@ impl From<ParsePubkeyError> for PhotonApiError {
}
}

impl From<SolanaPubkeyParseError> for PhotonApiError {
fn from(_error: SolanaPubkeyParseError) -> Self {
PhotonApiError::UnexpectedError("Invalid public key in database".to_string())
}
}

fn invalid_request(e: PhotonApiError) -> RpcError {
RpcError::Call(CallError::from_std_error(e))
}
Expand Down
2 changes: 1 addition & 1 deletion src/api/method/get_multiple_new_address_proofs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ pub async fn get_multiple_new_address_proofs_helper(
let queued_address = SerializablePubkey::try_from(queued_address)?;
return Err(PhotonApiError::ValidationError(format!(
"Address {} already exists",
address
queued_address
)));
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/api/method/get_transaction_with_compression_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ use serde::{Deserialize, Serialize};
use solana_client::nonblocking::rpc_client::RpcClient;
use solana_client::rpc_config::RpcTransactionConfig;
use solana_client::rpc_request::RpcRequest;
use solana_sdk::commitment_config::{CommitmentConfig, CommitmentLevel};
use solana_commitment_config::CommitmentConfig;
use solana_commitment_config::CommitmentLevel;
use solana_transaction_status::{EncodedConfirmedTransactionWithStatusMeta, UiTransactionEncoding};
use std::convert::TryFrom;
use utoipa::{
Expand Down
2 changes: 1 addition & 1 deletion src/api/method/get_validity_proof/prover/gnark.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::api::error::PhotonApiError;
use crate::api::method::get_validity_proof::prover::structs::{CompressedProof, ProofABC};
use ark_serialize::{CanonicalDeserialize, CanonicalSerialize, Compress, Validate};
use solana_program::alt_bn128::compression::prelude::{
use solana_bn254::compression::prelude::{
alt_bn128_g1_compress, alt_bn128_g2_compress, convert_endianness,
};
use std::ops::Neg;
Expand Down
2 changes: 1 addition & 1 deletion src/api/method/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use sea_orm::{
QueryOrder, QuerySelect, Statement, Value,
};
use serde::{Deserialize, Serialize};
use solana_sdk::signature::Signature;
use solana_signature::Signature;

use crate::common::typedefs::context::Context;
use crate::common::typedefs::hash::Hash;
Expand Down
2 changes: 1 addition & 1 deletion src/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use cadence_macros::set_global_default;
use clap::{Parser, ValueEnum};
use sea_orm::{DatabaseBackend, DatabaseConnection, SqlxPostgresConnector};
use solana_client::{nonblocking::rpc_client::RpcClient, rpc_config::RpcBlockConfig};
use solana_sdk::commitment_config::CommitmentConfig;
use solana_commitment_config::CommitmentConfig;
use solana_transaction_status::{TransactionDetails, UiTransactionEncoding};
use sqlx::{
postgres::{PgConnectOptions, PgPoolOptions},
Expand Down
2 changes: 1 addition & 1 deletion src/common/typedefs/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use serde::de::{self, Visitor};
use serde::ser::Serializer;
use serde::Deserializer;
#[allow(unused_imports)]
use solana_sdk::pubkey::Pubkey;
use solana_pubkey::Pubkey;
use thiserror::Error;

// Maximum length of a 32 byte base58 encoded hash
Expand Down
14 changes: 7 additions & 7 deletions src/common/typedefs/serializable_pubkey.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ impl SerializablePubkey {
}
}

impl anchor_lang::AnchorDeserialize for SerializablePubkey {
impl BorshDeserialize for SerializablePubkey {
fn deserialize(buf: &mut &[u8]) -> Result<Self, std::io::Error> {
<SolanaPubkey as BorshDeserialize>::deserialize(buf).map(SerializablePubkey)
use borsh1::BorshDeserialize as BorshDeserialize1;
<SolanaPubkey as BorshDeserialize1>::deserialize(buf).map(SerializablePubkey)
}

fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, std::io::Error> {
let mut buffer = [0u8; 32]; // SolanaPubkey is 32 bytes
reader.read_exact(&mut buffer)?;
Ok(SerializablePubkey(SolanaPubkey::new_from_array(buffer)))
use borsh1::BorshDeserialize as BorshDeserialize1;
<SolanaPubkey as BorshDeserialize1>::deserialize_reader(reader).map(SerializablePubkey)
}
}

impl anchor_lang::AnchorSerialize for SerializablePubkey {
impl borsh::BorshSerialize for SerializablePubkey {
fn serialize<W: std::io::Write>(&self, writer: &mut W) -> Result<(), std::io::Error> {
writer.write_all(&self.0.to_bytes())
}
Comment on lines +44 to 47
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

write_all needs the Write trait in scope here.
writer.write_all will not compile until the Write trait is imported or the call is fully qualified. Please update the call accordingly.

-        writer.write_all(&self.0.to_bytes())
+        std::io::Write::write_all(writer, &self.0.to_bytes())
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
impl borsh::BorshSerialize for SerializablePubkey {
fn serialize<W: std::io::Write>(&self, writer: &mut W) -> Result<(), std::io::Error> {
writer.write_all(&self.0.to_bytes())
}
impl borsh::BorshSerialize for SerializablePubkey {
fn serialize<W: std::io::Write>(&self, writer: &mut W) -> Result<(), std::io::Error> {
std::io::Write::write_all(writer, &self.0.to_bytes())
}
🤖 Prompt for AI Agents
In src/common/typedefs/serializable_pubkey.rs around lines 53 to 56, the call to
writer.write_all(...) requires the Write trait to be in scope; either add use
std::io::Write; at the top of the file or change the call to the fully-qualified
form std::io::Write::write_all(writer, &self.0.to_bytes()); make that single
change so the serialize method compiles without altering the method signature.

Expand Down Expand Up @@ -109,7 +109,7 @@ impl From<[u8; 32]> for SerializablePubkey {

impl From<LightPubkey> for SerializablePubkey {
fn from(pubkey: LightPubkey) -> Self {
SerializablePubkey(pubkey.into())
SerializablePubkey(SolanaPubkey::from(pubkey.to_bytes()))
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/common/typedefs/serializable_signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use serde::{
de::{self, Visitor},
Deserialize, Deserializer, Serialize, Serializer,
};
use solana_sdk::signature::Signature;
use solana_signature::Signature;
use utoipa::{
openapi::{ObjectBuilder, RefOr, Schema, SchemaType},
ToSchema,
Expand Down
8 changes: 4 additions & 4 deletions src/common/typedefs/token_data.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use anchor_lang::{AnchorDeserialize, AnchorSerialize};
use borsh::{BorshDeserialize, BorshSerialize};
use num_enum::TryFromPrimitive;
use serde::Serialize;
use utoipa::ToSchema;
Expand All @@ -14,8 +14,8 @@ use super::{
Debug,
PartialEq,
Eq,
AnchorSerialize,
AnchorDeserialize,
BorshSerialize,
BorshDeserialize,
TryFromPrimitive,
ToSchema,
Serialize,
Expand All @@ -31,7 +31,7 @@ pub enum AccountState {
}

#[derive(
Debug, PartialEq, Eq, AnchorDeserialize, AnchorSerialize, Clone, ToSchema, Serialize, Default,
Debug, PartialEq, Eq, BorshDeserialize, BorshSerialize, Clone, ToSchema, Serialize, Default,
)]
#[serde(rename_all = "camelCase")]
pub struct TokenData {
Expand Down
4 changes: 2 additions & 2 deletions src/common/typedefs/unsigned_integer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl<'de> Deserialize<'de> for UnsignedInteger {
}
}

impl anchor_lang::AnchorDeserialize for UnsignedInteger {
impl borsh::BorshDeserialize for UnsignedInteger {
fn deserialize(buf: &mut &[u8]) -> Result<Self, std::io::Error> {
if buf.len() < 8 {
return Err(std::io::Error::new(
Expand All @@ -85,7 +85,7 @@ impl anchor_lang::AnchorDeserialize for UnsignedInteger {
}
}

impl anchor_lang::AnchorSerialize for UnsignedInteger {
impl borsh::BorshSerialize for UnsignedInteger {
fn serialize<W: std::io::Write>(&self, writer: &mut W) -> Result<(), std::io::Error> {
writer.write_all(&self.0.to_le_bytes())
}
Expand Down
4 changes: 2 additions & 2 deletions src/ingester/fetchers/grpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ use rand::distributions::Alphanumeric;
use rand::Rng;
use solana_client::nonblocking::rpc_client::RpcClient;
use solana_pubkey::Pubkey;
use solana_sdk::pubkey::Pubkey as SdkPubkey;
use solana_sdk::signature::Signature;
use solana_pubkey::Pubkey as SdkPubkey;
use solana_signature::Signature;
use tokio::time::sleep;
use tracing::error;
use yellowstone_grpc_client::{GeyserGrpcBuilderResult, GeyserGrpcClient, Interceptor};
Expand Down
4 changes: 2 additions & 2 deletions src/ingester/fetchers/poller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use solana_client::{
nonblocking::rpc_client::RpcClient, rpc_config::RpcBlockConfig, rpc_request::RpcError,
};

use solana_sdk::commitment_config::CommitmentConfig;
use solana_commitment_config::CommitmentConfig;
use solana_transaction_status::{TransactionDetails, UiTransactionEncoding};

use crate::{
Expand Down Expand Up @@ -123,7 +123,7 @@ pub async fn fetch_block_with_infinite_retries(
Err(e) => {
if let solana_client::client_error::ClientErrorKind::RpcError(
RpcError::RpcResponseError { code, .. },
) = e.kind
) = *e.kind
{
if SKIPPED_BLOCK_ERRORS.contains(&code) {
metric! {
Expand Down
Loading
Loading