mirror of
https://github.com/0xfnzero/solana-streamer.git
synced 2026-08-17 02:48:05 +00:00
perf: Major event processing system refactor for improved performance
This commit is contained in:
@@ -28,7 +28,8 @@ impl BlockMetaEvent {
|
||||
crate::streaming::event_parser::common::types::ProtocolType::Common,
|
||||
EventType::BlockMeta,
|
||||
solana_sdk::pubkey::Pubkey::default(),
|
||||
"".to_string(),
|
||||
0,
|
||||
None,
|
||||
program_received_time_us,
|
||||
);
|
||||
Self { metadata, slot, block_hash }
|
||||
|
||||
@@ -618,7 +618,8 @@ impl EventParser for BonkEventParser {
|
||||
slot: u64,
|
||||
block_time: Option<Timestamp>,
|
||||
program_received_time_us: i64,
|
||||
index: String,
|
||||
outer_index: i64,
|
||||
inner_index: Option<i64>,
|
||||
) -> Vec<Box<dyn UnifiedEvent>> {
|
||||
self.inner.parse_events_from_inner_instruction(
|
||||
inner_instruction,
|
||||
@@ -626,7 +627,8 @@ impl EventParser for BonkEventParser {
|
||||
slot,
|
||||
block_time,
|
||||
program_received_time_us,
|
||||
index,
|
||||
outer_index,
|
||||
inner_index,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -638,7 +640,8 @@ impl EventParser for BonkEventParser {
|
||||
slot: u64,
|
||||
block_time: Option<Timestamp>,
|
||||
program_received_time_us: i64,
|
||||
index: String,
|
||||
outer_index: i64,
|
||||
inner_index: Option<i64>,
|
||||
) -> Vec<Box<dyn UnifiedEvent>> {
|
||||
self.inner.parse_events_from_instruction(
|
||||
instruction,
|
||||
@@ -647,7 +650,8 @@ impl EventParser for BonkEventParser {
|
||||
slot,
|
||||
block_time,
|
||||
program_received_time_us,
|
||||
index,
|
||||
outer_index,
|
||||
inner_index,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,8 @@ impl EventParser for MutilEventParser {
|
||||
slot: u64,
|
||||
block_time: Option<Timestamp>,
|
||||
program_received_time_us: i64,
|
||||
index: String,
|
||||
outer_index: i64,
|
||||
inner_index: Option<i64>,
|
||||
) -> Vec<Box<dyn UnifiedEvent>> {
|
||||
self.inner.parse_events_from_inner_instruction(
|
||||
inner_instruction,
|
||||
@@ -87,7 +88,8 @@ impl EventParser for MutilEventParser {
|
||||
slot,
|
||||
block_time,
|
||||
program_received_time_us,
|
||||
index,
|
||||
outer_index,
|
||||
inner_index,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -99,7 +101,8 @@ impl EventParser for MutilEventParser {
|
||||
slot: u64,
|
||||
block_time: Option<Timestamp>,
|
||||
program_received_time_us: i64,
|
||||
index: String,
|
||||
outer_index: i64,
|
||||
inner_index: Option<i64>,
|
||||
) -> Vec<Box<dyn UnifiedEvent>> {
|
||||
self.inner.parse_events_from_instruction(
|
||||
instruction,
|
||||
@@ -108,7 +111,8 @@ impl EventParser for MutilEventParser {
|
||||
slot,
|
||||
block_time,
|
||||
program_received_time_us,
|
||||
index,
|
||||
outer_index,
|
||||
inner_index,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -299,7 +299,8 @@ impl EventParser for PumpFunEventParser {
|
||||
slot: u64,
|
||||
block_time: Option<Timestamp>,
|
||||
program_received_time_us: i64,
|
||||
index: String,
|
||||
outer_index: i64,
|
||||
inner_index: Option<i64>,
|
||||
) -> Vec<Box<dyn UnifiedEvent>> {
|
||||
self.inner.parse_events_from_inner_instruction(
|
||||
inner_instruction,
|
||||
@@ -307,7 +308,8 @@ impl EventParser for PumpFunEventParser {
|
||||
slot,
|
||||
block_time,
|
||||
program_received_time_us,
|
||||
index,
|
||||
outer_index,
|
||||
inner_index,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -319,7 +321,8 @@ impl EventParser for PumpFunEventParser {
|
||||
slot: u64,
|
||||
block_time: Option<Timestamp>,
|
||||
program_received_time_us: i64,
|
||||
index: String,
|
||||
outer_index: i64,
|
||||
inner_index: Option<i64>,
|
||||
) -> Vec<Box<dyn UnifiedEvent>> {
|
||||
self.inner.parse_events_from_instruction(
|
||||
instruction,
|
||||
@@ -328,7 +331,8 @@ impl EventParser for PumpFunEventParser {
|
||||
slot,
|
||||
block_time,
|
||||
program_received_time_us,
|
||||
index,
|
||||
outer_index,
|
||||
inner_index,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -389,7 +389,8 @@ impl EventParser for PumpSwapEventParser {
|
||||
slot: u64,
|
||||
block_time: Option<Timestamp>,
|
||||
program_received_time_us: i64,
|
||||
index: String,
|
||||
outer_index: i64,
|
||||
inner_index: Option<i64>,
|
||||
) -> Vec<Box<dyn UnifiedEvent>> {
|
||||
self.inner.parse_events_from_inner_instruction(
|
||||
inner_instruction,
|
||||
@@ -397,7 +398,8 @@ impl EventParser for PumpSwapEventParser {
|
||||
slot,
|
||||
block_time,
|
||||
program_received_time_us,
|
||||
index,
|
||||
outer_index,
|
||||
inner_index,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -409,7 +411,8 @@ impl EventParser for PumpSwapEventParser {
|
||||
slot: u64,
|
||||
block_time: Option<Timestamp>,
|
||||
program_received_time_us: i64,
|
||||
index: String,
|
||||
outer_index: i64,
|
||||
inner_index: Option<i64>,
|
||||
) -> Vec<Box<dyn UnifiedEvent>> {
|
||||
self.inner.parse_events_from_instruction(
|
||||
instruction,
|
||||
@@ -418,7 +421,8 @@ impl EventParser for PumpSwapEventParser {
|
||||
slot,
|
||||
block_time,
|
||||
program_received_time_us,
|
||||
index,
|
||||
outer_index,
|
||||
inner_index,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -391,7 +391,8 @@ impl EventParser for RaydiumAmmV4EventParser {
|
||||
slot: u64,
|
||||
block_time: Option<Timestamp>,
|
||||
program_received_time_us: i64,
|
||||
index: String,
|
||||
outer_index: i64,
|
||||
inner_index: Option<i64>,
|
||||
) -> Vec<Box<dyn UnifiedEvent>> {
|
||||
self.inner.parse_events_from_inner_instruction(
|
||||
inner_instruction,
|
||||
@@ -399,7 +400,8 @@ impl EventParser for RaydiumAmmV4EventParser {
|
||||
slot,
|
||||
block_time,
|
||||
program_received_time_us,
|
||||
index,
|
||||
outer_index,
|
||||
inner_index,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -411,7 +413,8 @@ impl EventParser for RaydiumAmmV4EventParser {
|
||||
slot: u64,
|
||||
block_time: Option<Timestamp>,
|
||||
program_received_time_us: i64,
|
||||
index: String,
|
||||
outer_index: i64,
|
||||
inner_index: Option<i64>,
|
||||
) -> Vec<Box<dyn UnifiedEvent>> {
|
||||
self.inner.parse_events_from_instruction(
|
||||
instruction,
|
||||
@@ -420,7 +423,8 @@ impl EventParser for RaydiumAmmV4EventParser {
|
||||
slot,
|
||||
block_time,
|
||||
program_received_time_us,
|
||||
index,
|
||||
outer_index,
|
||||
inner_index,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -432,7 +432,8 @@ impl EventParser for RaydiumClmmEventParser {
|
||||
slot: u64,
|
||||
block_time: Option<Timestamp>,
|
||||
program_received_time_us: i64,
|
||||
index: String,
|
||||
outer_index: i64,
|
||||
inner_index: Option<i64>,
|
||||
) -> Vec<Box<dyn UnifiedEvent>> {
|
||||
self.inner.parse_events_from_inner_instruction(
|
||||
inner_instruction,
|
||||
@@ -440,7 +441,8 @@ impl EventParser for RaydiumClmmEventParser {
|
||||
slot,
|
||||
block_time,
|
||||
program_received_time_us,
|
||||
index,
|
||||
outer_index,
|
||||
inner_index,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -452,7 +454,8 @@ impl EventParser for RaydiumClmmEventParser {
|
||||
slot: u64,
|
||||
block_time: Option<Timestamp>,
|
||||
program_received_time_us: i64,
|
||||
index: String,
|
||||
outer_index: i64,
|
||||
inner_index: Option<i64>,
|
||||
) -> Vec<Box<dyn UnifiedEvent>> {
|
||||
self.inner.parse_events_from_instruction(
|
||||
instruction,
|
||||
@@ -461,7 +464,8 @@ impl EventParser for RaydiumClmmEventParser {
|
||||
slot,
|
||||
block_time,
|
||||
program_received_time_us,
|
||||
index,
|
||||
outer_index,
|
||||
inner_index,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -282,7 +282,8 @@ impl EventParser for RaydiumCpmmEventParser {
|
||||
slot: u64,
|
||||
block_time: Option<Timestamp>,
|
||||
program_received_time_us: i64,
|
||||
index: String,
|
||||
outer_index: i64,
|
||||
inner_index: Option<i64>,
|
||||
) -> Vec<Box<dyn UnifiedEvent>> {
|
||||
self.inner.parse_events_from_inner_instruction(
|
||||
inner_instruction,
|
||||
@@ -290,7 +291,8 @@ impl EventParser for RaydiumCpmmEventParser {
|
||||
slot,
|
||||
block_time,
|
||||
program_received_time_us,
|
||||
index,
|
||||
outer_index,
|
||||
inner_index,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -302,7 +304,8 @@ impl EventParser for RaydiumCpmmEventParser {
|
||||
slot: u64,
|
||||
block_time: Option<Timestamp>,
|
||||
program_received_time_us: i64,
|
||||
index: String,
|
||||
outer_index: i64,
|
||||
inner_index: Option<i64>,
|
||||
) -> Vec<Box<dyn UnifiedEvent>> {
|
||||
self.inner.parse_events_from_instruction(
|
||||
instruction,
|
||||
@@ -311,7 +314,8 @@ impl EventParser for RaydiumCpmmEventParser {
|
||||
slot,
|
||||
block_time,
|
||||
program_received_time_us,
|
||||
index,
|
||||
outer_index,
|
||||
inner_index,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user