@@ -219,10 +219,7 @@ function tango.dissector (tvb, pinfo, tree)
219219 if link_name == " net_netmux" or link_name == " quic_netmux" or link_name == " shred_netmux" or link_name == " net_quic" or link_name == " quic_net" or link_name == " shred_net" or link_name == " net_shred" then
220220 local dissector = Dissector .get (" eth_withoutfcs" )
221221 dissector :call (dcache_contents , pinfo , dcache_tree )
222- elseif link_name == " gossip_dedup" then
223- local dissector = Dissector .get (" solana.tpu.udp" )
224- dissector :call (dcache_contents , pinfo , dcache_tree )
225- elseif link_name == " verify_dedup" or link_name == " dedup_pack" or link_name == " dedup_resolv" or link_name == " resolv_pack" or link_name == " bundle_verif" then
222+ elseif link_name == " verify_dedup" or link_name == " dedup_pack" or link_name == " dedup_resolv" or link_name == " resolv_pack" or link_name == " bundle_verif" or " quic_verify" or link_name == " gossip_verif" or link_name == " send_txns" or link_name == " gossip_dedup" then
226223 local dissector = Dissector .get (" fd_txn_m_t" )
227224 dissector :call (dcache_contents , pinfo , dcache_tree )
228225 elseif link_name == " poh_shred" then
@@ -264,9 +261,6 @@ function tango.dissector (tvb, pinfo, tree)
264261 elseif link_name == " poh_pack" then
265262 local dissector = Dissector .get (" fd_became_leader_t" )
266263 dissector :call (dcache_contents , pinfo , dcache_tree )
267- elseif link_name == " quic_verify" then
268- local dissector = Dissector .get (" solana.tpu.udp" )
269- dissector :call (dcache_contents , pinfo , dcache_tree )
270264 end
271265end
272266
@@ -544,6 +538,16 @@ local fd_txnm = Proto("fd_txn_m_t", "FD Transaction with Payload and Metadata")
544538-- Define fields
545539local f_ref_slot = ProtoField .uint64 (" fd_txn_m_t.reference_slot" , " Reference Slot" )
546540local f_txn_t_sz = ProtoField .uint16 (" fd_txn_m_t.txn_t_sz" , " Size of fd_txn_t" )
541+ local f_source_ipv4 = ProtoField .ipv4 (" fd_txn_m_t.source_ipv4" , " IP Address" )
542+
543+ local source_tpu_enum = {
544+ [1 ] = " QUIC" ,
545+ [2 ] = " UDP" ,
546+ [4 ] = " GOSSIP" ,
547+ [8 ] = " BUNDLE" ,
548+ [16 ] = " SEND"
549+ }
550+ local f_source_tpu = ProtoField .uint8 (" fd_txn_m_t.source_tpu" , " Source TPU" , base .DEC , source_tpu_enum )
547551local f_payload_sz = ProtoField .uint16 (" fd_txn_m_t.payload_sz" , " Size of payload" )
548552local f_bundle_id = ProtoField .uint64 (" fd_txn_m_t.bundle_id" , " Bundle ID" )
549553local f_bundle_txn_cnt = ProtoField .uint64 (" fd_txn_m_t.bundle_txn_cnt" , " Bundle Transaction Count" )
@@ -552,7 +556,7 @@ local f_bundle_pubkey = ProtoField.bytes("fd_txn_m_t.bundle_commission_pubkey",
552556local f_alt_entry = ProtoField .bytes (" fd_txn_m_t.alt_entry" , " Address Lookup Table Account Address" )
553557
554558-- Add the fields to the protocol
555- fd_txnm .fields = { f_ref_slot , f_txn_t_sz , f_payload_sz , f_bundle_id , f_bundle_txn_cnt , f_bundle_commission , f_bundle_pubkey , f_alt_entry }
559+ fd_txnm .fields = { f_ref_slot , f_txn_t_sz , f_source_ipv4 , f_source_tpu , f_payload_sz , f_bundle_id , f_bundle_txn_cnt , f_bundle_commission , f_bundle_pubkey , f_alt_entry }
556560
557561function fd_txnm .dissector (buffer , pinfo , tree )
558562 local subtree = tree :add (fd_txnm , buffer (), " fd_txn_m_t" )
@@ -563,21 +567,26 @@ function fd_txnm.dissector(buffer, pinfo, tree)
563567 subtree :add_le (f_ref_slot , buffer (0 , 8 ))
564568 subtree :add_le (f_payload_sz , buffer (8 , 2 ))
565569 subtree :add_le (f_txn_t_sz , buffer (10 , 2 ))
570+ subtree :add (f_source_ipv4 , buffer (12 , 4 ))
571+ subtree :add_le (f_source_tpu , buffer (16 , 1 ))
572+
573+ subtree :add_le (f_bundle_id , buffer (24 , 8 ))
574+ subtree :add_le (f_bundle_txn_cnt , buffer (32 , 8 ))
575+ subtree :add_le (f_bundle_commission , buffer (40 , 1 ))
576+ subtree :add (f_bundle_pubkey , buffer (41 , 32 ))
577+ local payload_start = 80
566578
567- local payload_start = 16
568- if true then
569- subtree :add_le (f_bundle_id , buffer (16 , 8 ))
570- subtree :add_le (f_bundle_txn_cnt , buffer (24 , 8 ))
571- subtree :add_le (f_bundle_commission , buffer (32 , 1 ))
572- subtree :add (f_bundle_pubkey , buffer (33 , 32 ))
573- payload_start = 72
574- end
575-
576579 local payload_tree = tree :add (buffer (payload_start ,payload_sz ), " Solana Transaction" )
577580 local udp_dissector = Dissector .get (" solana.tpu.udp" )
578581 udp_dissector :call (buffer (payload_start ,payload_sz ):tvb (), pinfo , payload_tree )
579582
580583 local offset = payload_start + payload_sz
584+
585+ -- pre-dedup frags don't have fields after the payload
586+ if offset == buffer :len () then
587+ return
588+ end
589+
581590 -- Align to 2
582591 if offset % 2 == 1 then
583592 offset = offset + 1
@@ -602,6 +611,5 @@ function fd_txnm.dissector(buffer, pinfo, tree)
602611end
603612
604613
605-
606614local udp_port = DissectorTable .get (" udp.port" )
607615udp_port :add (9001 , Dissector .get (" solana.tpu.udp" ))
0 commit comments