This commit is contained in:
2026-05-20 23:57:15 +02:00
parent fad7ec5107
commit 62831a0abe
56 changed files with 6603 additions and 114 deletions

View File

@@ -122,6 +122,9 @@ pub struct LocalPipelineDiagnosticSummaryDto {
pub pair_without_candle_count: i64,
/// Diagnostics grouped by DEX.
pub dex_summaries: std::vec::Vec<crate::LocalDexDiagnosticSummaryDto>,
/// Raydium surface diagnostics derived from the matrix and observed instructions.
pub raydium_surface_summaries:
std::vec::Vec<crate::LocalRaydiumSurfaceDiagnosticSummaryDto>,
/// Diagnostics grouped by pair.
pub pair_summaries: std::vec::Vec<crate::LocalPairDiagnosticSummaryDto>,
/// Diagnostics grouped by pair materialization/actionability class.
@@ -185,6 +188,60 @@ pub struct LocalDexDiagnosticSummaryDto {
pub pair_candle_count: i64,
}
/// Local diagnostics for one Raydium surface from the DEX-first matrix.
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct LocalRaydiumSurfaceDiagnosticSummaryDto {
/// DEX matrix code, such as `raydium_clmm` or `raydium_amm_v4`.
pub dex_code: std::string::String,
/// Human readable surface name.
pub display_name: std::string::String,
/// DEX-first role attached to this surface.
pub surface_role: std::string::String,
/// Program id from the support matrix, when known.
pub program_id: std::option::Option<std::string::String>,
/// Program id verification status from the support matrix.
pub program_id_status: std::string::String,
/// Support status from the support matrix.
pub status: std::string::String,
/// Whether this surface is enabled in the local DEX catalog.
pub catalog_enabled: bool,
/// Total projected instructions for this program in the current database.
pub instruction_count: i64,
/// Total distinct projected transactions for this program in the current database.
pub transaction_count: i64,
/// Total decoded events for this DEX code.
pub decoded_event_count: i64,
/// Total materialized trade events for this DEX code.
pub trade_event_count: i64,
/// Total candle buckets for this DEX code.
pub pair_candle_count: i64,
/// Latest slot where this program was observed, when present.
pub latest_slot: std::option::Option<i64>,
/// Latest signature where this program was observed, when present.
pub latest_signature: std::option::Option<std::string::String>,
/// Whether projected instructions prove this program exists in the current corpus.
pub observed_in_current_corpus: bool,
/// Whether this DEX code has decoded events in the current corpus.
pub decoded_in_current_corpus: bool,
/// Whether this DEX code has materialized trades in the current corpus.
pub trade_materialized_in_current_corpus: bool,
}
/// Projected instruction diagnostics grouped by Raydium program id.
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct LocalRaydiumProgramInstructionDiagnosticSummaryDto {
/// Program id.
pub program_id: std::string::String,
/// Total projected instruction rows.
pub instruction_count: i64,
/// Total distinct transactions.
pub transaction_count: i64,
/// Latest slot where the program appears, when present.
pub latest_slot: std::option::Option<i64>,
/// Latest signature where the program appears, when present.
pub latest_signature: std::option::Option<std::string::String>,
}
/// Local pair diagnostics summary.
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct LocalPairDiagnosticSummaryDto {
@@ -537,6 +594,16 @@ pub(crate) struct LocalDexDiagnosticSummaryRow {
pub(crate) pair_candle_count: i64,
}
/// SQL row for Raydium program instruction diagnostics.
#[derive(Debug, Clone, sqlx::FromRow)]
pub(crate) struct LocalRaydiumProgramInstructionDiagnosticSummaryRow {
pub(crate) program_id: std::string::String,
pub(crate) instruction_count: i64,
pub(crate) transaction_count: i64,
pub(crate) latest_slot: std::option::Option<i64>,
pub(crate) latest_signature: std::option::Option<std::string::String>,
}
/// SQL row for local pair diagnostics.
#[derive(Debug, Clone, sqlx::FromRow)]
pub(crate) struct LocalPairDiagnosticSummaryRow {