mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00

* Extract syncPruningPointUTXOSet to a separate method. * Implement logic to send pruning point utxo set chunks in a loop. * Replace IBDRootUTXOSetAndBlockMessage with IbdRootUtxoSetChunkMessage. * Add a new message: RequestNextIBDRootUTXOSetChunk. * Add a new message: DoneIBDRootUTXOSetChunks. * Protect HandleRequestIBDRootUTXOSetAndBlock from rogue messages. * Reimplement receiveIBDRootUTXOSetAndBlock. * Add CmdDoneIBDRootUTXOSetChunks to the HandleRelayInvs flow. * Decrease the max message size to 10mb. * Fix bad step. * Fix confusion between outgoing/incoming routes. * Measure how long it takes to send/receive the UTXO set. * Use LogAndMeasure in handleRequestIBDRootUTXOSetAndBlockFlow.
110 lines
6.0 KiB
Protocol Buffer
110 lines
6.0 KiB
Protocol Buffer
syntax = "proto3";
|
|
package protowire;
|
|
|
|
option go_package = "github.com/kaspanet/kaspad/protowire";
|
|
|
|
import "p2p.proto";
|
|
import "rpc.proto";
|
|
|
|
message KaspadMessage {
|
|
oneof payload {
|
|
AddressesMessage addresses = 1;
|
|
BlockMessage block = 2;
|
|
TransactionMessage transaction = 3;
|
|
RequestBlockLocatorMessage requestBlockLocator = 4;
|
|
BlockLocatorMessage blockLocator = 5;
|
|
RequestAddressesMessage requestAddresses = 6;
|
|
RequestHeadersMessage requestHeaders = 7;
|
|
RequestNextHeadersMessage requestNextHeaders = 8;
|
|
DoneHeadersMessage DoneHeaders = 9;
|
|
RequestRelayBlocksMessage requestRelayBlocks = 10;
|
|
RequestTransactionsMessage requestTransactions = 12;
|
|
BlockMessage ibdBlock = 13;
|
|
InvRelayBlockMessage invRelayBlock = 14;
|
|
InvTransactionsMessage invTransactions = 15;
|
|
PingMessage ping = 16;
|
|
PongMessage pong = 17;
|
|
VerackMessage verack = 19;
|
|
VersionMessage version = 20;
|
|
TransactionNotFoundMessage transactionNotFound = 21;
|
|
RejectMessage reject = 22;
|
|
RequestIBDRootUTXOSetAndBlockMessage requestIBDRootUTXOSetAndBlock = 24;
|
|
IbdRootUtxoSetChunkMessage ibdRootUtxoSetChunk = 25;
|
|
RequestIBDBlocksMessage requestIBDBlocks = 26;
|
|
IBDRootNotFoundMessage ibdRootNotFound = 27;
|
|
RequestIBDRootHashMessage requestIBDRootHash = 28;
|
|
IBDRootHashMessage ibdRootHash = 29;
|
|
IbdBlockLocatorMessage ibdBlockLocator = 30;
|
|
IbdBlockLocatorHighestHashMessage ibdBlockLocatorHighestHash = 31;
|
|
BlockHeadersMessage blockHeaders = 32;
|
|
RequestNextIbdRootUtxoSetChunkMessage requestNextIbdRootUtxoSetChunk = 33;
|
|
DoneIbdRootUtxoSetChunksMessage doneIbdRootUtxoSetChunks = 34;
|
|
|
|
GetCurrentNetworkRequestMessage getCurrentNetworkRequest = 1001;
|
|
GetCurrentNetworkResponseMessage getCurrentNetworkResponse = 1002;
|
|
SubmitBlockRequestMessage submitBlockRequest = 1003;
|
|
SubmitBlockResponseMessage submitBlockResponse = 1004;
|
|
GetBlockTemplateRequestMessage getBlockTemplateRequest = 1005;
|
|
GetBlockTemplateResponseMessage getBlockTemplateResponse = 1006;
|
|
NotifyBlockAddedRequestMessage notifyBlockAddedRequest = 1007;
|
|
NotifyBlockAddedResponseMessage notifyBlockAddedResponse = 1008;
|
|
BlockAddedNotificationMessage blockAddedNotification = 1009;
|
|
GetPeerAddressesRequestMessage getPeerAddressesRequest = 1010;
|
|
GetPeerAddressesResponseMessage getPeerAddressesResponse = 1011;
|
|
GetSelectedTipHashRequestMessage getSelectedTipHashRequest = 1012;
|
|
GetSelectedTipHashResponseMessage getSelectedTipHashResponse = 1013;
|
|
GetMempoolEntryRequestMessage getMempoolEntryRequest = 1014;
|
|
GetMempoolEntryResponseMessage getMempoolEntryResponse = 1015;
|
|
GetConnectedPeerInfoRequestMessage getConnectedPeerInfoRequest = 1016;
|
|
GetConnectedPeerInfoResponseMessage getConnectedPeerInfoResponse = 1017;
|
|
AddPeerRequestMessage addPeerRequest = 1018;
|
|
AddPeerResponseMessage addPeerResponse = 1019;
|
|
SubmitTransactionRequestMessage submitTransactionRequest = 1020;
|
|
SubmitTransactionResponseMessage submitTransactionResponse = 1021;
|
|
NotifyVirtualSelectedParentChainChangedRequestMessage notifyVirtualSelectedParentChainChangedRequest = 1022;
|
|
NotifyVirtualSelectedParentChainChangedResponseMessage notifyVirtualSelectedParentChainChangedResponse = 1023;
|
|
VirtualSelectedParentChainChangedNotificationMessage virtualSelectedParentChainChangedNotification = 1024;
|
|
GetBlockRequestMessage getBlockRequest = 1025;
|
|
GetBlockResponseMessage getBlockResponse = 1026;
|
|
GetSubnetworkRequestMessage getSubnetworkRequest = 1027;
|
|
GetSubnetworkResponseMessage getSubnetworkResponse = 1028;
|
|
GetVirtualSelectedParentChainFromBlockRequestMessage getVirtualSelectedParentChainFromBlockRequest = 1029;
|
|
GetVirtualSelectedParentChainFromBlockResponseMessage getVirtualSelectedParentChainFromBlockResponse = 1030;
|
|
GetBlocksRequestMessage getBlocksRequest = 1031;
|
|
GetBlocksResponseMessage getBlocksResponse = 1032;
|
|
GetBlockCountRequestMessage getBlockCountRequest = 1033;
|
|
GetBlockCountResponseMessage getBlockCountResponse = 1034;
|
|
GetBlockDagInfoRequestMessage getBlockDagInfoRequest = 1035;
|
|
GetBlockDagInfoResponseMessage getBlockDagInfoResponse = 1036;
|
|
ResolveFinalityConflictRequestMessage resolveFinalityConflictRequest = 1037;
|
|
ResolveFinalityConflictResponseMessage resolveFinalityConflictResponse = 1038;
|
|
NotifyFinalityConflictsRequestMessage notifyFinalityConflictsRequest = 1039;
|
|
NotifyFinalityConflictsResponseMessage notifyFinalityConflictsResponse = 1040;
|
|
FinalityConflictNotificationMessage finalityConflictNotification = 1041;
|
|
FinalityConflictResolvedNotificationMessage finalityConflictResolvedNotification = 1042;
|
|
GetMempoolEntriesRequestMessage getMempoolEntriesRequest = 1043;
|
|
GetMempoolEntriesResponseMessage getMempoolEntriesResponse = 1044;
|
|
ShutDownRequestMessage shutDownRequest = 1045;
|
|
ShutDownResponseMessage shutDownResponse = 1046;
|
|
GetHeadersRequestMessage getHeadersRequest = 1047;
|
|
GetHeadersResponseMessage getHeadersResponse = 1048;
|
|
NotifyUtxosChangedRequestMessage notifyUtxosChangedRequest = 1049;
|
|
NotifyUtxosChangedResponseMessage notifyUtxosChangedResponse = 1050;
|
|
UtxosChangedNotificationMessage utxosChangedNotification = 1051;
|
|
GetUtxosByAddressesRequestMessage getUtxosByAddressesRequest = 1052;
|
|
GetUtxosByAddressesResponseMessage getUtxosByAddressesResponse = 1053;
|
|
GetVirtualSelectedParentBlueScoreRequestMessage getVirtualSelectedParentBlueScoreRequest = 1054;
|
|
GetVirtualSelectedParentBlueScoreResponseMessage getVirtualSelectedParentBlueScoreResponse = 1055;
|
|
NotifyVirtualSelectedParentBlueScoreChangedRequestMessage notifyVirtualSelectedParentBlueScoreChangedRequest = 1056;
|
|
NotifyVirtualSelectedParentBlueScoreChangedResponseMessage notifyVirtualSelectedParentBlueScoreChangedResponse = 1057;
|
|
VirtualSelectedParentBlueScoreChangedNotificationMessage virtualSelectedParentBlueScoreChangedNotification = 1058;
|
|
}
|
|
}
|
|
|
|
service P2P {
|
|
rpc MessageStream (stream KaspadMessage) returns (stream KaspadMessage) {}
|
|
}
|
|
|
|
service RPC {
|
|
rpc MessageStream (stream KaspadMessage) returns (stream KaspadMessage) {}
|
|
} |