v0.3.15-pre.007-fix.001
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
# file: Cargo.toml
|
# file: Cargo.toml
|
||||||
# version: 606
|
# version: 607
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
resolver = "3"
|
resolver = "3"
|
||||||
members = ["crates/ksp-app-backfill-desk", "crates/ksp-app-config-desk", "crates/ksp-app-raw-transaction-ingest-desk", "crates/ksp-app-solprices-desk", "crates/ksp-app-store-desk", "crates/ksp-app-wallet-desk", "crates/ksp-config-lib", "crates/ksp-core-lib", "crates/ksp-interface-lib", "crates/ksp-job-api", "crates/ksp-job-backfill-lib", "crates/ksp-logging-lib", "crates/ksp-offchain-transport-lib", "crates/ksp-onchain-transport-lib", "crates/ksp-program-api", "crates/ksp-raw-transaction-lib", "crates/ksp-store-api", "crates/ksp-store-lib", "crates/ksp-store-postgres-lib", "crates/ksp-wallet-lib", "crates/ksp-worker-api", "crates/ksp-worker-raw-transaction-ingest-lib"]
|
members = ["crates/ksp-app-backfill-desk", "crates/ksp-app-config-desk", "crates/ksp-app-raw-transaction-ingest-desk", "crates/ksp-app-solprices-desk", "crates/ksp-app-store-desk", "crates/ksp-app-wallet-desk", "crates/ksp-config-lib", "crates/ksp-core-lib", "crates/ksp-interface-lib", "crates/ksp-job-api", "crates/ksp-job-backfill-lib", "crates/ksp-logging-lib", "crates/ksp-offchain-transport-lib", "crates/ksp-onchain-transport-lib", "crates/ksp-program-api", "crates/ksp-raw-transaction-lib", "crates/ksp-store-api", "crates/ksp-store-lib", "crates/ksp-store-postgres-lib", "crates/ksp-wallet-lib", "crates/ksp-worker-api", "crates/ksp-worker-raw-transaction-ingest-lib"]
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.3.15-pre.7"
|
version = "0.3.15-pre.7.fix.1"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://git.sasedev.com/Sasedev/khadhroony-solana-project"
|
repository = "https://git.sasedev.com/Sasedev/khadhroony-solana-project"
|
||||||
|
|||||||
@@ -99,10 +99,7 @@ impl crate::AppState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Revalidates one future Start request and reconstructs its exact Transport/Worker source contract without launching a Worker.
|
/// Revalidates one future Start request and reconstructs its exact Transport/Worker source contract without launching a Worker.
|
||||||
pub(crate) fn validate_route_start(
|
pub(crate) fn validate_route_start(&self, request: &crate::RawIngestRouteStartRequestDto) -> ksp_core_lib::Result<crate::RawIngestRouteStartValidationDto> {
|
||||||
&self,
|
|
||||||
request: &crate::RawIngestRouteStartRequestDto,
|
|
||||||
) -> ksp_core_lib::Result<crate::RawIngestRouteStartValidationDto> {
|
|
||||||
let generation = self.inventory_generation.lock();
|
let generation = self.inventory_generation.lock();
|
||||||
let generation = match generation {
|
let generation = match generation {
|
||||||
std::result::Result::Ok(value) => *value,
|
std::result::Result::Ok(value) => *value,
|
||||||
|
|||||||
@@ -26,13 +26,7 @@ impl crate::RawIngestRouteId {
|
|||||||
/// Returns all V1 route identifiers in stable UI order.
|
/// Returns all V1 route identifiers in stable UI order.
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub(crate) fn all() -> std::vec::Vec<Self> {
|
pub(crate) fn all() -> std::vec::Vec<Self> {
|
||||||
return vec![
|
return vec![Self::YellowstoneHydrated, Self::StandardLogsHydrated, Self::StandardBlockDirect, Self::HeliusTransactionHydrated, Self::HttpBlockPolling];
|
||||||
Self::YellowstoneHydrated,
|
|
||||||
Self::StandardLogsHydrated,
|
|
||||||
Self::StandardBlockDirect,
|
|
||||||
Self::HeliusTransactionHydrated,
|
|
||||||
Self::HttpBlockPolling,
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the application-owned route family used by safe UI projections.
|
/// Returns the application-owned route family used by safe UI projections.
|
||||||
@@ -263,11 +257,7 @@ impl crate::RawIngestRouteDto {
|
|||||||
|
|
||||||
/// Builds one route that is not composable from the current Config profile.
|
/// Builds one route that is not composable from the current Config profile.
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub(crate) fn unavailable(
|
pub(crate) fn unavailable(route_id: crate::RawIngestRouteId, network: std::option::Option<&str>, reason: crate::RawIngestRouteUnavailableReason) -> Self {
|
||||||
route_id: crate::RawIngestRouteId,
|
|
||||||
network: std::option::Option<&str>,
|
|
||||||
reason: crate::RawIngestRouteUnavailableReason,
|
|
||||||
) -> Self {
|
|
||||||
return Self {
|
return Self {
|
||||||
family: route_id.family(),
|
family: route_id.family(),
|
||||||
label: route_id.label().to_owned(),
|
label: route_id.label().to_owned(),
|
||||||
|
|||||||
@@ -39,11 +39,9 @@ pub(crate) const ERROR_CODE_SPLASH_ORIGIN_INVALID: ksp_core_lib::ErrorCode =
|
|||||||
pub(crate) const ERROR_CODE_SPLASH_SETTING_INVALID: ksp_core_lib::ErrorCode =
|
pub(crate) const ERROR_CODE_SPLASH_SETTING_INVALID: ksp_core_lib::ErrorCode =
|
||||||
ksp_core_lib::ErrorCode::new("raw_transaction_ingest_desk", "splash_setting_invalid");
|
ksp_core_lib::ErrorCode::new("raw_transaction_ingest_desk", "splash_setting_invalid");
|
||||||
/// Tauri runtime assembly or execution failed.
|
/// Tauri runtime assembly or execution failed.
|
||||||
pub(crate) const ERROR_CODE_TAURI_RUNTIME_FAILED: ksp_core_lib::ErrorCode =
|
pub(crate) const ERROR_CODE_TAURI_RUNTIME_FAILED: ksp_core_lib::ErrorCode = ksp_core_lib::ErrorCode::new("raw_transaction_ingest_desk", "tauri_runtime_failed");
|
||||||
ksp_core_lib::ErrorCode::new("raw_transaction_ingest_desk", "tauri_runtime_failed");
|
|
||||||
/// A required Tauri window is missing from the configured application runtime.
|
/// A required Tauri window is missing from the configured application runtime.
|
||||||
pub(crate) const ERROR_CODE_TAURI_WINDOW_MISSING: ksp_core_lib::ErrorCode =
|
pub(crate) const ERROR_CODE_TAURI_WINDOW_MISSING: ksp_core_lib::ErrorCode = ksp_core_lib::ErrorCode::new("raw_transaction_ingest_desk", "tauri_window_missing");
|
||||||
ksp_core_lib::ErrorCode::new("raw_transaction_ingest_desk", "tauri_window_missing");
|
|
||||||
/// A Tauri window show/focus/destroy/event operation failed.
|
/// A Tauri window show/focus/destroy/event operation failed.
|
||||||
pub(crate) const ERROR_CODE_TAURI_WINDOW_OPERATION_FAILED: ksp_core_lib::ErrorCode =
|
pub(crate) const ERROR_CODE_TAURI_WINDOW_OPERATION_FAILED: ksp_core_lib::ErrorCode =
|
||||||
ksp_core_lib::ErrorCode::new("raw_transaction_ingest_desk", "tauri_window_operation_failed");
|
ksp_core_lib::ErrorCode::new("raw_transaction_ingest_desk", "tauri_window_operation_failed");
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ pub(crate) use self::constants::COMPOSITE_COMPONENT_ID_LOGGING;
|
|||||||
pub(crate) use self::constants::COMPOSITE_COMPONENT_ID_STORE;
|
pub(crate) use self::constants::COMPOSITE_COMPONENT_ID_STORE;
|
||||||
/// Composite-local identifier for the standard Transport component.
|
/// Composite-local identifier for the standard Transport component.
|
||||||
pub(crate) use self::constants::COMPOSITE_COMPONENT_ID_TRANSPORT;
|
pub(crate) use self::constants::COMPOSITE_COMPONENT_ID_TRANSPORT;
|
||||||
/// Prefix used by optional same-network Transport capability sources.
|
|
||||||
pub(crate) use self::constants::COMPOSITE_COMPONENT_ID_TRANSPORT_PREFIX;
|
|
||||||
/// Composite-local optional Transport source for Helius WebSocket capabilities.
|
/// Composite-local optional Transport source for Helius WebSocket capabilities.
|
||||||
pub(crate) use self::constants::COMPOSITE_COMPONENT_ID_TRANSPORT_HELIUS;
|
pub(crate) use self::constants::COMPOSITE_COMPONENT_ID_TRANSPORT_HELIUS;
|
||||||
|
/// Prefix used by optional same-network Transport capability sources.
|
||||||
|
pub(crate) use self::constants::COMPOSITE_COMPONENT_ID_TRANSPORT_PREFIX;
|
||||||
/// Composite-local optional Transport source for Yellowstone gRPC capabilities.
|
/// Composite-local optional Transport source for Yellowstone gRPC capabilities.
|
||||||
pub(crate) use self::constants::COMPOSITE_COMPONENT_ID_TRANSPORT_YELLOWSTONE;
|
pub(crate) use self::constants::COMPOSITE_COMPONENT_ID_TRANSPORT_YELLOWSTONE;
|
||||||
/// Structured domain used while bootstrapping Config and Logging.
|
/// Structured domain used while bootstrapping Config and Logging.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: crates/ksp-app-raw-transaction-ingest-desk/src/route_inventory.rs
|
// file: crates/ksp-app-raw-transaction-ingest-desk/src/route_inventory.rs
|
||||||
// version: 4
|
// version: 5
|
||||||
|
|
||||||
//! Config-only logical route inventory for Raw Transaction Ingest Desk.
|
//! Config-only logical route inventory for Raw Transaction Ingest Desk.
|
||||||
|
|
||||||
@@ -48,10 +48,7 @@ impl RouteCapabilities {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Rebuilds the complete safe route inventory from validated Config without opening any network, Store or Worker resource.
|
/// Rebuilds the complete safe route inventory from validated Config without opening any network, Store or Worker resource.
|
||||||
pub(crate) fn build_route_inventory(
|
pub(crate) fn build_route_inventory(management: &ksp_config_lib::ConfigManagement, generation: u32) -> ksp_core_lib::Result<crate::RawIngestRouteInventoryDto> {
|
||||||
management: &ksp_config_lib::ConfigManagement,
|
|
||||||
generation: u32,
|
|
||||||
) -> ksp_core_lib::Result<crate::RawIngestRouteInventoryDto> {
|
|
||||||
let environment = ksp_config_lib::ConfigEnvironment::load();
|
let environment = ksp_config_lib::ConfigEnvironment::load();
|
||||||
let environment = match environment {
|
let environment = match environment {
|
||||||
std::result::Result::Ok(value) => value,
|
std::result::Result::Ok(value) => value,
|
||||||
@@ -61,7 +58,7 @@ pub(crate) fn build_route_inventory(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Rebuilds the complete safe route inventory from one already captured Config environment snapshot.
|
/// Rebuilds the complete safe route inventory from one already captured Config environment snapshot.
|
||||||
pub(crate) pub(crate) fn build_route_inventory_with_environment(
|
pub(crate) fn build_route_inventory_with_environment(
|
||||||
management: &ksp_config_lib::ConfigManagement,
|
management: &ksp_config_lib::ConfigManagement,
|
||||||
environment: &ksp_config_lib::ConfigEnvironment,
|
environment: &ksp_config_lib::ConfigEnvironment,
|
||||||
generation: u32,
|
generation: u32,
|
||||||
@@ -73,12 +70,7 @@ pub(crate) pub(crate) fn build_route_inventory_with_environment(
|
|||||||
};
|
};
|
||||||
let mut profiles = std::vec::Vec::with_capacity(catalog.profile_ids.len());
|
let mut profiles = std::vec::Vec::with_capacity(catalog.profile_ids.len());
|
||||||
for profile_id in &catalog.profile_ids {
|
for profile_id in &catalog.profile_ids {
|
||||||
profiles.push(build_profile_inventory(
|
profiles.push(build_profile_inventory(management, environment, profile_id.as_str(), profile_id == &catalog.default_profile));
|
||||||
management,
|
|
||||||
environment,
|
|
||||||
profile_id.as_str(),
|
|
||||||
profile_id == &catalog.default_profile,
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
ksp_logging_lib::debug!(
|
ksp_logging_lib::debug!(
|
||||||
target: crate::TRACING_TARGET,
|
target: crate::TRACING_TARGET,
|
||||||
@@ -164,11 +156,8 @@ fn build_profile_inventory(
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
let network = store.settings().network().as_str().to_owned();
|
let network = store.settings().network().as_str().to_owned();
|
||||||
let base_transport_profile = crate::required_composite_component_profile(
|
let base_transport_profile =
|
||||||
&composite,
|
crate::required_composite_component_profile(&composite, crate::COMPOSITE_COMPONENT_ID_TRANSPORT, ksp_config_lib::FILE_ID_STD_TRANSPORT);
|
||||||
crate::COMPOSITE_COMPONENT_ID_TRANSPORT,
|
|
||||||
ksp_config_lib::FILE_ID_STD_TRANSPORT,
|
|
||||||
);
|
|
||||||
let base_transport_profile = match base_transport_profile {
|
let base_transport_profile = match base_transport_profile {
|
||||||
std::result::Result::Ok(value) => value,
|
std::result::Result::Ok(value) => value,
|
||||||
std::result::Result::Err(_) => {
|
std::result::Result::Err(_) => {
|
||||||
@@ -184,12 +173,7 @@ fn build_profile_inventory(
|
|||||||
let base_transport = match base_transport {
|
let base_transport = match base_transport {
|
||||||
std::result::Result::Ok(value) => value,
|
std::result::Result::Ok(value) => value,
|
||||||
std::result::Result::Err(error) => {
|
std::result::Result::Err(error) => {
|
||||||
return unavailable_profile(
|
return unavailable_profile(profile_id, is_default, std::option::Option::Some(network.as_str()), resolution_error_reason(&error));
|
||||||
profile_id,
|
|
||||||
is_default,
|
|
||||||
std::option::Option::Some(network.as_str()),
|
|
||||||
resolution_error_reason(&error),
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
if !transport_matches_network(&base_transport, network.as_str()) {
|
if !transport_matches_network(&base_transport, network.as_str()) {
|
||||||
|
|||||||
@@ -60,11 +60,8 @@ pub(crate) fn validate_route_start(
|
|||||||
"Raw Transaction Ingest Desk Start-time Store network no longer matches the selected route",
|
"Raw Transaction Ingest Desk Start-time Store network no longer matches the selected route",
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
let transport_profile = crate::required_composite_component_profile(
|
let transport_profile =
|
||||||
&composite,
|
crate::required_composite_component_profile(&composite, crate::COMPOSITE_COMPONENT_ID_TRANSPORT, ksp_config_lib::FILE_ID_STD_TRANSPORT);
|
||||||
crate::COMPOSITE_COMPONENT_ID_TRANSPORT,
|
|
||||||
ksp_config_lib::FILE_ID_STD_TRANSPORT,
|
|
||||||
);
|
|
||||||
let transport_profile = match transport_profile {
|
let transport_profile = match transport_profile {
|
||||||
std::result::Result::Ok(value) => value,
|
std::result::Result::Ok(value) => value,
|
||||||
std::result::Result::Err(error) => return route_start_error("Cannot resolve Start-time base Transport profile", error),
|
std::result::Result::Err(error) => return route_start_error("Cannot resolve Start-time base Transport profile", error),
|
||||||
@@ -115,12 +112,8 @@ fn prepare_standard_logs(
|
|||||||
network: &str,
|
network: &str,
|
||||||
commitment: ksp_onchain_transport_lib::SolanaCommitment,
|
commitment: ksp_onchain_transport_lib::SolanaCommitment,
|
||||||
) -> ksp_core_lib::Result<()> {
|
) -> ksp_core_lib::Result<()> {
|
||||||
let endpoint = single_ws_endpoint(
|
let endpoint =
|
||||||
transport,
|
single_ws_endpoint(transport, network, ksp_onchain_transport_lib::WsProtocolKind::SolanaStandard, ksp_onchain_transport_lib::WsSubscriptionKind::Logs);
|
||||||
network,
|
|
||||||
ksp_onchain_transport_lib::WsProtocolKind::SolanaStandard,
|
|
||||||
ksp_onchain_transport_lib::WsSubscriptionKind::Logs,
|
|
||||||
);
|
|
||||||
let endpoint = match endpoint {
|
let endpoint = match endpoint {
|
||||||
std::result::Result::Ok(value) => value,
|
std::result::Result::Ok(value) => value,
|
||||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||||
@@ -155,12 +148,8 @@ fn prepare_standard_block(
|
|||||||
network: &str,
|
network: &str,
|
||||||
commitment: ksp_onchain_transport_lib::SolanaCommitment,
|
commitment: ksp_onchain_transport_lib::SolanaCommitment,
|
||||||
) -> ksp_core_lib::Result<()> {
|
) -> ksp_core_lib::Result<()> {
|
||||||
let endpoint = single_ws_endpoint(
|
let endpoint =
|
||||||
transport,
|
single_ws_endpoint(transport, network, ksp_onchain_transport_lib::WsProtocolKind::SolanaStandard, ksp_onchain_transport_lib::WsSubscriptionKind::Block);
|
||||||
network,
|
|
||||||
ksp_onchain_transport_lib::WsProtocolKind::SolanaStandard,
|
|
||||||
ksp_onchain_transport_lib::WsSubscriptionKind::Block,
|
|
||||||
);
|
|
||||||
let endpoint = match endpoint {
|
let endpoint = match endpoint {
|
||||||
std::result::Result::Ok(value) => value,
|
std::result::Result::Ok(value) => value,
|
||||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||||
@@ -416,9 +405,7 @@ fn single_http_role(
|
|||||||
let matching = roles
|
let matching = roles
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter(|role_name| {
|
.filter(|role_name| {
|
||||||
return request_kinds
|
return request_kinds.iter().all(|request_kind| return http_role_supports_request_kind(settings, network, role_name.as_str(), request_kind));
|
||||||
.iter()
|
|
||||||
.all(|request_kind| return http_role_supports_request_kind(settings, network, role_name.as_str(), request_kind));
|
|
||||||
})
|
})
|
||||||
.collect::<std::vec::Vec<_>>();
|
.collect::<std::vec::Vec<_>>();
|
||||||
if matching.len() != 1 {
|
if matching.len() != 1 {
|
||||||
@@ -427,12 +414,7 @@ fn single_http_role(
|
|||||||
return std::result::Result::Ok(ksp_onchain_transport_lib::HttpRoleName::new(matching[0].clone()));
|
return std::result::Result::Ok(ksp_onchain_transport_lib::HttpRoleName::new(matching[0].clone()));
|
||||||
}
|
}
|
||||||
|
|
||||||
fn http_role_supports_request_kind(
|
fn http_role_supports_request_kind(settings: &ksp_onchain_transport_lib::HttpTransportSettings, network: &str, role_name: &str, request_kind: &str) -> bool {
|
||||||
settings: &ksp_onchain_transport_lib::HttpTransportSettings,
|
|
||||||
network: &str,
|
|
||||||
role_name: &str,
|
|
||||||
request_kind: &str,
|
|
||||||
) -> bool {
|
|
||||||
for endpoint in settings.endpoints() {
|
for endpoint in settings.endpoints() {
|
||||||
if !endpoint.enabled() || endpoint.cluster().as_str() != network {
|
if !endpoint.enabled() || endpoint.cluster().as_str() != network {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -149,8 +149,6 @@ async fn validate_route_start(
|
|||||||
let result = state.validate_route_start(&request);
|
let result = state.validate_route_start(&request);
|
||||||
return match result {
|
return match result {
|
||||||
std::result::Result::Ok(value) => std::result::Result::Ok(value),
|
std::result::Result::Ok(value) => std::result::Result::Ok(value),
|
||||||
std::result::Result::Err(error) => {
|
std::result::Result::Err(error) => std::result::Result::Err(project_command_error("validate_route_start", crate::TRACING_DOMAIN_ROUTE_START, &error)),
|
||||||
std::result::Result::Err(project_command_error("validate_route_start", crate::TRACING_DOMAIN_ROUTE_START, &error))
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: crates/ksp-app-raw-transaction-ingest-desk/tests/desktop_security.rs
|
// file: crates/ksp-app-raw-transaction-ingest-desk/tests/desktop_security.rs
|
||||||
// version: 4
|
// version: 5
|
||||||
|
|
||||||
//! Desktop security canaries for the Raw Transaction Ingest Desk scaffold.
|
//! Desktop security canaries for the Raw Transaction Ingest Desk scaffold.
|
||||||
|
|
||||||
@@ -107,6 +107,6 @@ fn pre_007_start_request_and_acknowledgement_are_logical_only_and_resource_free(
|
|||||||
assert!(route_start.contains("ERROR_CODE_ROUTE_START_STALE_INVENTORY"));
|
assert!(route_start.contains("ERROR_CODE_ROUTE_START_STALE_INVENTORY"));
|
||||||
assert!(route_start.contains("build_route_inventory_with_environment"));
|
assert!(route_start.contains("build_route_inventory_with_environment"));
|
||||||
assert!(route_start.contains("resolve_store_config_profile"));
|
assert!(route_start.contains("resolve_store_config_profile"));
|
||||||
assert!(!route_start.contains("with_context("endpoint"));
|
assert!(!route_start.contains("with_context(\"endpoint\""));
|
||||||
assert!(!route_start.contains("with_context("provider"));
|
assert!(!route_start.contains("with_context(\"provider\""));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,12 +27,8 @@ fn pre_006_route_requirement_projection_is_fail_closed_and_ordered() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn pre_006_unavailable_profile_projects_all_five_routes_without_physical_material() {
|
fn pre_006_unavailable_profile_projects_all_five_routes_without_physical_material() {
|
||||||
let profile = super::unavailable_profile(
|
let profile =
|
||||||
"mainnet",
|
super::unavailable_profile("mainnet", false, std::option::Option::Some("mainnet"), crate::RawIngestRouteUnavailableReason::MissingRequiredSecret);
|
||||||
false,
|
|
||||||
std::option::Option::Some("mainnet"),
|
|
||||||
crate::RawIngestRouteUnavailableReason::MissingRequiredSecret,
|
|
||||||
);
|
|
||||||
assert_eq!(profile.routes.len(), 5);
|
assert_eq!(profile.routes.len(), 5);
|
||||||
assert_eq!(profile.network.as_deref(), std::option::Option::Some("mainnet"));
|
assert_eq!(profile.network.as_deref(), std::option::Option::Some("mainnet"));
|
||||||
for route in profile.routes {
|
for route in profile.routes {
|
||||||
@@ -63,7 +59,10 @@ fn pre_006_fix_003_network_profiles_aggregate_same_network_capabilities_and_omit
|
|||||||
};
|
};
|
||||||
assert_eq!(inventory.generation, 7);
|
assert_eq!(inventory.generation, 7);
|
||||||
assert_eq!(inventory.default_profile, "devnet");
|
assert_eq!(inventory.default_profile, "devnet");
|
||||||
assert_eq!(inventory.profiles.iter().map(|profile| return profile.profile_id.as_str()).collect::<std::vec::Vec<_>>(), vec!["devnet", "mainnet", "testnet"]);
|
assert_eq!(
|
||||||
|
inventory.profiles.iter().map(|profile| return profile.profile_id.as_str()).collect::<std::vec::Vec<_>>(),
|
||||||
|
vec!["devnet", "mainnet", "testnet"]
|
||||||
|
);
|
||||||
let devnet = profile(&inventory, "devnet");
|
let devnet = profile(&inventory, "devnet");
|
||||||
assert!(devnet.is_some());
|
assert!(devnet.is_some());
|
||||||
if let std::option::Option::Some(devnet) = devnet {
|
if let std::option::Option::Some(devnet) = devnet {
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// file: crates/ksp-app-raw-transaction-ingest-desk/unit_tests/route_start.rs
|
// file: crates/ksp-app-raw-transaction-ingest-desk/unit_tests/route_start.rs
|
||||||
// version: 1
|
// version: 1
|
||||||
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn pre_007_stale_generation_is_rejected_before_config_or_transport_reconstruction() {
|
fn pre_007_stale_generation_is_rejected_before_config_or_transport_reconstruction() {
|
||||||
let management = crate::config_management(&[]);
|
let management = crate::config_management(&[]);
|
||||||
@@ -46,7 +45,8 @@ fn pre_007_public_standard_profiles_reconstruct_block_and_http_sources_without_n
|
|||||||
std::result::Result::Err(_) => return,
|
std::result::Result::Err(_) => return,
|
||||||
};
|
};
|
||||||
for profile in inventory.profiles {
|
for profile in inventory.profiles {
|
||||||
for route_id in [crate::RawIngestRouteId::StandardLogsHydrated, crate::RawIngestRouteId::StandardBlockDirect, crate::RawIngestRouteId::HttpBlockPolling] {
|
for route_id in [crate::RawIngestRouteId::StandardLogsHydrated, crate::RawIngestRouteId::StandardBlockDirect, crate::RawIngestRouteId::HttpBlockPolling]
|
||||||
|
{
|
||||||
let route = profile.routes.iter().find(|route| return route.route_id == route_id);
|
let route = profile.routes.iter().find(|route| return route.route_id == route_id);
|
||||||
assert!(route.is_some(), "missing base route for {}", profile.profile_id);
|
assert!(route.is_some(), "missing base route for {}", profile.profile_id);
|
||||||
if let std::option::Option::Some(route) = route {
|
if let std::option::Option::Some(route) = route {
|
||||||
|
|||||||
54
deltas/0.3.15/pre.007-fix.001.md
Normal file
54
deltas/0.3.15/pre.007-fix.001.md
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
<!-- file: deltas/0.3.15/pre.007-fix.001.md -->
|
||||||
|
<!-- version: 1 -->
|
||||||
|
|
||||||
|
# Delta `0.3.15-pre.007-fix.001`
|
||||||
|
|
||||||
|
## Objet
|
||||||
|
|
||||||
|
Corriger deux erreurs de syntaxe introduites dans `pre.007` qui empêchaient `cargo fmt`, `cargo check`, Clippy et les tests du Raw Transaction Ingest Desk de compiler la tranche.
|
||||||
|
|
||||||
|
## Corrections
|
||||||
|
|
||||||
|
Dans `route_inventory.rs`, la déclaration de `build_route_inventory_with_environment` contenait un doublon de visibilité :
|
||||||
|
|
||||||
|
```text
|
||||||
|
pub(crate) pub(crate) fn
|
||||||
|
```
|
||||||
|
|
||||||
|
Elle redevient :
|
||||||
|
|
||||||
|
```text
|
||||||
|
pub(crate) fn
|
||||||
|
```
|
||||||
|
|
||||||
|
Dans `tests/desktop_security.rs`, deux canaris recherchant des appels interdits à `with_context` contenaient des guillemets internes non échappés. Les littéraux Rust sont corrigés pour rechercher explicitement :
|
||||||
|
|
||||||
|
```text
|
||||||
|
with_context(\"endpoint\"
|
||||||
|
with_context(\"provider\"
|
||||||
|
```
|
||||||
|
|
||||||
|
Le reexport crate-root de `COMPOSITE_COMPONENT_ID_TRANSPORT_PREFIX` est conservé : il est effectivement consommé par `route_inventory.rs`. L'avertissement `unused_import` observé dans le gate était une conséquence du fichier non parsable et non un export mort.
|
||||||
|
|
||||||
|
## Périmètre
|
||||||
|
|
||||||
|
Aucune sémantique de `pre.007` n'est modifiée :
|
||||||
|
|
||||||
|
- même requête logique `profile_id + route_id + inventory_generation + commitment` ;
|
||||||
|
- même revalidation Config au Start ;
|
||||||
|
- mêmes cinq reconstructions de ressources Transport ;
|
||||||
|
- aucun `Store::open` ;
|
||||||
|
- aucune connexion réseau active ;
|
||||||
|
- aucun lancement de Worker ;
|
||||||
|
- aucun changement frontend fonctionnel.
|
||||||
|
|
||||||
|
## Version
|
||||||
|
|
||||||
|
```text
|
||||||
|
header racine : 606 -> 607
|
||||||
|
workspace : 0.3.15-pre.7 -> 0.3.15-pre.7.fix.1
|
||||||
|
```
|
||||||
|
|
||||||
|
## Gate opérateur
|
||||||
|
|
||||||
|
Le gate complet de `pre.007` doit être rejoué après application de ce fix.
|
||||||
Reference in New Issue
Block a user