Line data Source code
1 : #ifndef HEADER_fd_src_disco_plugin_fd_plugin_h 2 : #define HEADER_fd_src_disco_plugin_fd_plugin_h 3 : 4 0 : #define FD_PLUGIN_MSG_SLOT_ROOTED ( 0UL) 5 0 : #define FD_PLUGIN_MSG_SLOT_OPTIMISTICALLY_CONFIRMED ( 1UL) 6 0 : #define FD_PLUGIN_MSG_SLOT_COMPLETED ( 2UL) 7 0 : #define FD_PLUGIN_MSG_SLOT_ESTIMATED ( 3UL) 8 0 : #define FD_PLUGIN_MSG_GOSSIP_UPDATE ( 4UL) 9 0 : #define FD_PLUGIN_MSG_VOTE_ACCOUNT_UPDATE ( 5UL) 10 0 : #define FD_PLUGIN_MSG_LEADER_SCHEDULE ( 6UL) 11 0 : #define FD_PLUGIN_MSG_VALIDATOR_INFO ( 7UL) 12 0 : #define FD_PLUGIN_MSG_SLOT_START ( 8UL) 13 : 14 : typedef struct { 15 : ulong slot; 16 : ulong parent_slot; 17 : } fd_plugin_msg_slot_start_t; 18 : 19 0 : #define FD_PLUGIN_MSG_SLOT_END ( 9UL) 20 : 21 : typedef struct { 22 : ulong slot; 23 : ulong cus_used; 24 : } fd_plugin_msg_slot_end_t; 25 : 26 0 : #define FD_PLUGIN_MSG_SLOT_RESET (10UL) 27 0 : #define FD_PLUGIN_MSG_BALANCE (11UL) 28 0 : #define FD_PLUGIN_MSG_START_PROGRESS (12UL) 29 0 : #define FD_PLUGIN_MSG_GENESIS_HASH_KNOWN (13UL) 30 : 31 : struct __attribute__((packed, aligned(8))) fd_replay_complete_msg { 32 : ulong slot; 33 : ulong total_txn_count; 34 : ulong nonvote_txn_count; 35 : ulong failed_txn_count; 36 : ulong nonvote_failed_txn_count; 37 : ulong compute_units; 38 : ulong transaction_fee; 39 : ulong priority_fee; 40 : ulong parent_slot; 41 : }; 42 : typedef struct fd_replay_complete_msg fd_replay_complete_msg_t; 43 : 44 0 : #define FD_CLUSTER_NODE_CNT (200U*201U - 1U) 45 0 : #define FD_GOSSIP_LINK_MSG_SIZE (58U + 12U * 6U) 46 : #define FD_VALIDATOR_INFO_MSG_SIZE ( 608U) 47 : 48 : struct __attribute__((packed)) fd_gossip_update_msg { 49 : uchar pubkey[32]; // 0..31 50 : ulong wallclock; // 32..39 51 : ushort shred_version; // 40..41 52 : uchar version_type; // 42 53 : ushort version_major; // 43..44 54 : ushort version_minor; // 45..46 55 : ushort version_patch; // 47..48 56 : uchar version_commit_type; // 49 57 : uint version_commit; // 50..53 58 : uint version_feature_set; // 54..57 59 : /* gossip_socket, 60 : rpc_socket, 61 : rpc_pubsub_socket, 62 : serve_repair_socket_udp, 63 : serve_repair_socket_quic, 64 : tpu_socket_udp, 65 : tpu_socket_quic, 66 : tvu_socket_udp, 67 : tvu_socket_quic, 68 : tpu_forwards_socket_udp, 69 : tpu_forwards_socket_quic, 70 : tpu_vote_socket, */ 71 : struct __attribute__((packed)) { 72 : uint ip; // 0..3 73 : ushort port; // 4..5 74 : } addrs[12]; 75 : }; 76 : typedef struct fd_gossip_update_msg fd_gossip_update_msg_t; 77 : 78 : FD_STATIC_ASSERT( sizeof(fd_gossip_update_msg_t) == FD_GOSSIP_LINK_MSG_SIZE, fd_gossip_update_msg ); 79 : 80 : struct __attribute__((packed)) fd_vote_update_msg { 81 : uchar vote_pubkey[32]; // 0..31 82 : uchar node_pubkey[32]; // 32..63 83 : ulong activated_stake; // 64..71 84 : ulong last_vote; // 72..79 85 : ulong root_slot; // 80..87 86 : ulong epoch_credits; // 88..95 87 : uchar commission; // 96 88 : uchar is_delinquent; // 97 89 : }; 90 : typedef struct fd_vote_update_msg fd_vote_update_msg_t; 91 : 92 : FD_STATIC_ASSERT( sizeof(fd_vote_update_msg_t) <= FD_GOSSIP_LINK_MSG_SIZE, fd_vote_update_msg ); 93 : 94 0 : #define FD_PLUGIN_MSG_BLOCK_ENGINE_UPDATE (14UL) 95 : 96 0 : #define FD_PLUGIN_MSG_BLOCK_ENGINE_UPDATE_STATUS_DISCONNECTED (0) 97 0 : #define FD_PLUGIN_MSG_BLOCK_ENGINE_UPDATE_STATUS_CONNECTING (1) 98 0 : #define FD_PLUGIN_MSG_BLOCK_ENGINE_UPDATE_STATUS_CONNECTED (2) 99 : 100 : typedef struct { 101 : char name[ 16 ]; 102 : char url[ 256 ]; 103 : int status; 104 : } fd_plugin_msg_block_engine_update_t; 105 : 106 : #endif /* HEADER_fd_src_disco_plugin_fd_plugin_h */