v0.1.0-pre.014

This commit is contained in:
2026-07-24 17:14:02 +02:00
parent 5f6f7df509
commit 60a75c4434
140 changed files with 6217 additions and 1213 deletions

View File

@@ -1,10 +1,68 @@
// file: kb-lib/src/executor/solana/core.rs
// version: 1
// version: 2
//! Migration boundary for legacy crate `kb_executor_solana_core`.
//! Reserved executor for `solana_core`.
/// Legacy crate name retained for migration and compatibility tracking.
const LEGACY_CRATE: &str = "kb_executor_solana_core";
/// Reserved executor for the `solana_core` program surface.
#[derive(Clone, Debug, Default)]
pub struct ExSolanaCoreExecutor;
/// Current porting status.
const MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::ExApiInstructionExecutor for crate::ExSolanaCoreExecutor {
fn executor_name(&self) -> &'static str {
return "kb_executor_solana_core";
}
fn executor_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[
kb_program_ids::ADDRESS_LOOKUP_TABLE_PROGRAM_ID,
kb_program_ids::BPF_LOADER_DEPRECATED_PROGRAM_ID,
kb_program_ids::BPF_LOADER_PROGRAM_ID,
kb_program_ids::BPF_LOADER_UPGRADEABLE_PROGRAM_ID,
kb_program_ids::COMPUTE_BUDGET_PROGRAM_ID,
kb_program_ids::CONFIG_PROGRAM_ID,
kb_program_ids::ED25519_PROGRAM_ID,
kb_program_ids::FEATURE_PROGRAM_ID,
kb_program_ids::LOADER_V4_PROGRAM_ID,
kb_program_ids::NATIVE_LOADER_PROGRAM_ID,
kb_program_ids::SECP256K1_PROGRAM_ID,
kb_program_ids::SECP256R1_PROGRAM_ID,
kb_program_ids::SLASHING_PROGRAM_ID,
kb_program_ids::STAKE_PROGRAM_ID,
kb_program_ids::SYSTEM_PROGRAM_ID,
kb_program_ids::VOTE_PROGRAM_ID,
kb_program_ids::ZK_ELGAMAL_PROOF_PROGRAM_ID,
kb_program_ids::ZK_TOKEN_PROOF_PROGRAM_ID,
];
}
fn supports_request(
&self,
request: &crate::ExApiExecutionRequest,
) -> crate::ExApiExecutionSupport {
if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) {
return crate::ExApiExecutionSupport::Maybe;
}
return crate::ExApiExecutionSupport::No;
}
fn build_plan(
&self,
_request: &crate::ExApiExecutionRequest,
) -> kb_core::Result<crate::ExApiExecutionPlan> {
let payload_json = match crate::executor_api_serialize_payload_json(
&serde_json::json!({"status":"reserved_executor","surface":"solana_core"}),
) {
std::result::Result::Ok(serialized) => serialized,
std::result::Result::Err(error) => return std::result::Result::Err(error),
};
return std::result::Result::Ok(crate::ExApiExecutionPlan {
executor_name: "kb_executor_solana_core".to_string(),
instruction_count: 0,
payload_json,
});
}
}