v0.2.9-pre.009
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-onchain-transport-lib/tests/public_api.rs
|
||||
// version: 45
|
||||
// version: 46
|
||||
|
||||
//! Integration tests for the public `ksp-onchain-transport-lib` consumer contract.
|
||||
|
||||
@@ -969,3 +969,26 @@ fn public_v0_2_9_pre_008_yellowstone_blocks_contract_is_available_from_crate_roo
|
||||
let _entry_info = std::any::type_name::<ksp_onchain_transport_lib::YellowstoneEntryInfo>();
|
||||
let _entry_update = std::any::type_name::<ksp_onchain_transport_lib::YellowstoneEntryUpdate>();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn public_v0_2_9_pre_009_yellowstone_bidi_session_contract_is_available_from_crate_root() {
|
||||
fn assert_send<T: Send>() {
|
||||
return;
|
||||
}
|
||||
assert_send::<ksp_onchain_transport_lib::SolanaYellowstoneGrpcSubscribeSession>();
|
||||
assert_send::<ksp_onchain_transport_lib::YellowstoneSubscribeUpdate>();
|
||||
let _open = ksp_onchain_transport_lib::YellowstoneGrpcChannel::open_standard_subscribe;
|
||||
let _session = std::any::type_name::<ksp_onchain_transport_lib::SolanaYellowstoneGrpcSubscribeSession>();
|
||||
let _ping = std::any::type_name::<ksp_onchain_transport_lib::YellowstoneSubscribePingUpdate>();
|
||||
let _pong = std::any::type_name::<ksp_onchain_transport_lib::YellowstoneSubscribePongUpdate>();
|
||||
let _states = [
|
||||
ksp_onchain_transport_lib::YellowstoneGrpcSubscribeState::Active,
|
||||
ksp_onchain_transport_lib::YellowstoneGrpcSubscribeState::Closing,
|
||||
ksp_onchain_transport_lib::YellowstoneGrpcSubscribeState::Closed,
|
||||
ksp_onchain_transport_lib::YellowstoneGrpcSubscribeState::Failed,
|
||||
];
|
||||
assert_eq!(ksp_onchain_transport_lib::ERROR_CODE_GRPC_BACKPRESSURE_OVERFLOW.domain(), "onchain_transport");
|
||||
assert_eq!(ksp_onchain_transport_lib::ERROR_CODE_GRPC_BACKPRESSURE_OVERFLOW.code(), "grpc_backpressure_overflow");
|
||||
assert_eq!(ksp_onchain_transport_lib::ERROR_CODE_GRPC_SESSION_CLOSED.domain(), "onchain_transport");
|
||||
assert_eq!(ksp_onchain_transport_lib::ERROR_CODE_GRPC_SESSION_CLOSED.code(), "grpc_session_closed");
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-onchain-transport-lib/tests/release_completeness.rs
|
||||
// version: 39
|
||||
// version: 40
|
||||
|
||||
//! Release-level completeness canaries for staged HTTP and WebSocket Transport coverage.
|
||||
|
||||
@@ -1144,8 +1144,8 @@ fn release_v0_2_9_pre_005_accounts_and_slots_contract_remains_complete() {
|
||||
assert!(source.contains("MAX_GRPC_SUBSCRIBE_CUCKOO_DATA_LENGTH_BYTES"));
|
||||
assert!(source.contains("MAX_GRPC_SUBSCRIBE_ACCOUNT_DATA_LENGTH_BYTES"));
|
||||
assert!(source.contains("MAX_GRPC_SUBSCRIBE_SLOT_DEAD_ERROR_LENGTH_BYTES"));
|
||||
assert!(source.contains("#[cfg(test)]\nfn decode_account_update"));
|
||||
assert!(source.contains("#[cfg(test)]\nfn decode_slot_update"));
|
||||
assert!(source.contains("fn decode_account_update"));
|
||||
assert!(source.contains("fn decode_slot_update"));
|
||||
assert!(!source.contains("SubscribeDeshred"));
|
||||
assert!(!source.contains("PublicNode"));
|
||||
assert!(!crate_root.contains("pub use tonic"));
|
||||
@@ -1180,7 +1180,7 @@ fn release_v0_2_9_pre_006_namespaces_unambiguously_http_owned_private_modules()
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn release_v0_2_9_pre_007_transactions_contract_remains_complete_without_bidi() {
|
||||
fn release_v0_2_9_pre_007_transactions_contract_remains_complete() {
|
||||
let source = include_str!("../src/grpc_subscribe.rs");
|
||||
let crate_root = include_str!("../src/lib.rs");
|
||||
for required in [
|
||||
@@ -1221,7 +1221,7 @@ fn release_v0_2_9_pre_007_transactions_contract_remains_complete_without_bidi()
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn release_v0_2_9_pre_008_completes_standard_blocks_without_advancing_bidi() {
|
||||
fn release_v0_2_9_pre_008_standard_blocks_contract_remains_complete() {
|
||||
let source = include_str!("../src/grpc_subscribe.rs");
|
||||
let crate_root = include_str!("../src/lib.rs");
|
||||
for required in [
|
||||
@@ -1252,7 +1252,7 @@ fn release_v0_2_9_pre_008_completes_standard_blocks_without_advancing_bidi() {
|
||||
assert!(source.contains("std::vec::Vec<crate::YellowstoneTransactionInfo>"));
|
||||
assert!(source.contains("std::vec::Vec<crate::YellowstoneAccountInfo>"));
|
||||
assert!(source.contains("std::vec::Vec<crate::YellowstoneEntryInfo>"));
|
||||
assert!(source.contains("#[cfg(test)]\nfn decode_block_update"));
|
||||
assert!(source.contains("fn decode_block_update"));
|
||||
assert!(!source.contains("pub async fn subscribe("));
|
||||
assert!(!source.contains("SubscribeDeshred"));
|
||||
assert!(!source.contains("PublicNode"));
|
||||
@@ -1262,3 +1262,49 @@ fn release_v0_2_9_pre_008_completes_standard_blocks_without_advancing_bidi() {
|
||||
let _meta = std::any::type_name::<ksp_onchain_transport_lib::YellowstoneBlockMetaUpdate>();
|
||||
let _entry = std::any::type_name::<ksp_onchain_transport_lib::YellowstoneEntryUpdate>();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn release_v0_2_9_pre_009_opens_one_bounded_standard_bidi_session_without_reconnect_or_provider_coupling() {
|
||||
let stream_source = include_str!("../src/grpc_stream.rs");
|
||||
let subscribe_source = include_str!("../src/grpc_subscribe.rs");
|
||||
let channel_source = include_str!("../src/grpc_channel.rs");
|
||||
let crate_root = include_str!("../src/lib.rs");
|
||||
for required in [
|
||||
"const PATH_SUBSCRIBE: &str = \"/geyser.Geyser/Subscribe\"",
|
||||
".streaming(",
|
||||
"tokio::sync::mpsc::channel",
|
||||
"tokio::sync::watch::channel",
|
||||
"try_send",
|
||||
"AUTO_SUBSCRIBE_PING_ID",
|
||||
"ping_request_wire",
|
||||
"finish_client_half_close",
|
||||
"timeout_at",
|
||||
"max_decoding_message_size",
|
||||
"max_encoding_message_size",
|
||||
"YellowstoneGrpcSubscribeState",
|
||||
"SolanaYellowstoneGrpcSubscribeSession",
|
||||
] {
|
||||
assert!(stream_source.contains(required), "missing pre.009 bidi runtime token: {required}");
|
||||
}
|
||||
for required in [
|
||||
"YellowstoneSubscribeUpdate",
|
||||
"YellowstoneSubscribePingUpdate",
|
||||
"YellowstoneSubscribePongUpdate",
|
||||
"yellowstone_subscribe_request_to_wire",
|
||||
"yellowstone_subscribe_update_from_wire",
|
||||
] {
|
||||
assert!(subscribe_source.contains(required), "missing pre.009 runtime wire bridge token: {required}");
|
||||
}
|
||||
assert!(channel_source.contains("pub async fn open_standard_subscribe"));
|
||||
assert!(!stream_source.contains("unbounded_channel"));
|
||||
assert!(!stream_source.contains("SubscribeDeshred"));
|
||||
assert!(!stream_source.contains("PublicNode"));
|
||||
assert!(!stream_source.contains("OrbitFlare"));
|
||||
assert!(!stream_source.contains("Helius"));
|
||||
assert!(!stream_source.contains("reconnect"));
|
||||
assert!(!crate_root.contains("pub use tonic"));
|
||||
assert!(!crate_root.contains("pub use yellowstone_grpc_proto"));
|
||||
let _session = std::any::type_name::<ksp_onchain_transport_lib::SolanaYellowstoneGrpcSubscribeSession>();
|
||||
let _state = ksp_onchain_transport_lib::YellowstoneGrpcSubscribeState::Active;
|
||||
let _update = std::any::type_name::<ksp_onchain_transport_lib::YellowstoneSubscribeUpdate>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user