v0.1.0-pre.012

This commit is contained in:
2026-07-24 15:59:00 +02:00
parent 60660ca555
commit e753a80c3a
179 changed files with 5653 additions and 10813 deletions

View File

@@ -5,7 +5,6 @@
/// Default page size for repository list operations.
pub const DEFAULT_PAGE_SIZE: u16 = 100;
/// Maximum page size for repository list operations.
pub const MAX_PAGE_SIZE: u16 = 1000;

View File

@@ -1,5 +1,5 @@
// file: kb-store/src/lib.rs
// version: 3
// version: 4
//! Backend-neutral storage contracts and PostgreSQL implementation.
#![warn(missing_docs)]

View File

@@ -5,63 +5,44 @@
/// PostgreSQL schema policy used by application migrations.
pub const DEFAULT_SCHEMA_POLICY: &str = "current_profile_schema";
/// Canonical Solana table prefix.
pub const SOLANA_TABLE_PREFIX: &str = "kb_sol_";
/// Migration table name used by sqlx when migrations are enabled later.
pub const MIGRATION_TABLE_NAME: &str = "_sqlx_migrations";
/// Migration strategy used by the canonical transaction and core stores.
pub const MIGRATION_STRATEGY: &str =
"idempotent_canonical_transaction_observation_and_core_tables_without_application_schemas";
/// Advisory lock id used while applying idempotent store schema statements.
pub const STORE_SCHEMA_ADVISORY_LOCK_ID: i64 = 2_024_000_204;
/// Canonical raw transaction table name.
pub const RAW_TRANSACTIONS_TABLE_NAME: &str = "kb_sol_raw_transactions";
/// Lightweight transaction acquisition observation table name.
pub const TRANSACTION_OBSERVATIONS_TABLE_NAME: &str = "kb_sol_obs_transaction_observations";
/// Core transaction table name.
pub const CORE_TRANSACTIONS_TABLE_NAME: &str = "kb_sol_core_transactions";
/// Core account key table name.
pub const CORE_ACCOUNT_KEYS_TABLE_NAME: &str = "kb_sol_core_account_keys";
/// Core instruction table name.
pub const CORE_INSTRUCTIONS_TABLE_NAME: &str = "kb_sol_core_instructions";
/// Core inner instruction table name.
pub const CORE_INNER_INSTRUCTIONS_TABLE_NAME: &str = "kb_sol_core_inner_instructions";
/// Core log table name.
pub const CORE_LOGS_TABLE_NAME: &str = "kb_sol_core_logs";
/// Core balance change table name.
pub const CORE_BALANCE_CHANGES_TABLE_NAME: &str = "kb_sol_core_balance_changes";
/// Processing ledger table name.
pub const PROCESSING_LEDGER_TABLE_NAME: &str = "kb_sol_ops_processing_ledger";
/// Versioned decoded event table name.
pub const DECODE_EVENTS_TABLE_NAME: &str = "kb_sol_decode_events";
/// Machine-readable decoder coverage declaration table name.
pub const DECODE_COVERAGE_DECLARATIONS_TABLE_NAME: &str = "kb_sol_decode_coverage_declarations";
/// Observed decoder coverage classification table name.
pub const DECODE_COVERAGE_OBSERVATIONS_TABLE_NAME: &str = "kb_sol_decode_coverage_observations";
/// Versioned materialized output table name.
pub const MATERIALIZED_EVENTS_TABLE_NAME: &str = "kb_sol_mat_events";
/// Canonical transaction acquisition table names active since `0.3.1`.
pub const RAW_STORE_TABLE_NAMES: &[&str] =
&[crate::RAW_TRANSACTIONS_TABLE_NAME, crate::TRANSACTION_OBSERVATIONS_TABLE_NAME];
/// Core Solana table names introduced by `0.2.4`.
pub const CORE_STORE_TABLE_NAMES: &[&str] = &[
crate::CORE_TRANSACTIONS_TABLE_NAME,
@@ -72,7 +53,6 @@ pub const CORE_STORE_TABLE_NAMES: &[&str] = &[
crate::CORE_BALANCE_CHANGES_TABLE_NAME,
crate::PROCESSING_LEDGER_TABLE_NAME,
];
/// Decode and materialization table names introduced by `0.4.0`.
pub const DECODE_STORE_TABLE_NAMES: &[&str] = &[
crate::DECODE_EVENTS_TABLE_NAME,
@@ -80,7 +60,6 @@ pub const DECODE_STORE_TABLE_NAMES: &[&str] = &[
crate::DECODE_COVERAGE_OBSERVATIONS_TABLE_NAME,
crate::MATERIALIZED_EVENTS_TABLE_NAME,
];
/// Allowed Solana table domains encoded after the `kb_sol_` prefix.
pub const ALLOWED_SOLANA_TABLE_DOMAINS: &[&str] =
&["raw", "core", "obs", "decode", "mat", "catalog", "agg", "ops", "wallet"];