mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-05-27 17:26:43 +00:00

* Add PruningPointProof to externalapi. * Add BuildPruningPointProof and ValidatePruningPointProof to Consensus. * Add the pruning point proof to the protocol. * Add the pruning point proof to the wire package. * Add PruningPointBlueWork. * Make go vet happy. * Properly initialize PruningPointProof in consensus.go. * Validate pruning point blue work. * Populate PruningPointBlueWork with the actual blue work of the pruning point. * Revert "Populate PruningPointBlueWork with the actual blue work of the pruning point." This reverts commit f2a9829998a8161ca24c259f971bd144084f0488. * Revert "Validate pruning point blue work." This reverts commit c6a90c5d2c5137657484d49ae8f33609aeb50235. * Revert "Properly initialize PruningPointProof in consensus.go." This reverts commit 9391574bbf711ab14eaf0c7700ae4d4b2e782e9d. * Revert "Add PruningPointBlueWork." This reverts commit 48182f652a5ff5048017d2c26640a1ffec79bc60. * Fix PruningPointProof and MsgPruningPointProof to be two-dimensional. * Fix wire PruningPointProof to be two-dimensional.
263 lines
4.6 KiB
Protocol Buffer
263 lines
4.6 KiB
Protocol Buffer
syntax = "proto3";
|
|
package protowire;
|
|
|
|
option go_package = "github.com/kaspanet/kaspad/protowire";
|
|
|
|
message RequestAddressesMessage{
|
|
bool includeAllSubnetworks = 1;
|
|
SubnetworkId subnetworkId = 2;
|
|
}
|
|
|
|
message AddressesMessage{
|
|
repeated NetAddress addressList = 1;
|
|
}
|
|
|
|
message NetAddress{
|
|
int64 timestamp = 1;
|
|
bytes ip = 3;
|
|
uint32 port = 4;
|
|
}
|
|
|
|
message SubnetworkId{
|
|
bytes bytes = 1;
|
|
}
|
|
|
|
message TransactionMessage{
|
|
uint32 version = 1;
|
|
repeated TransactionInput inputs = 2;
|
|
repeated TransactionOutput outputs = 3;
|
|
uint64 lockTime = 4;
|
|
SubnetworkId subnetworkId = 5;
|
|
uint64 gas = 6;
|
|
bytes payload = 8;
|
|
}
|
|
|
|
message TransactionInput{
|
|
Outpoint previousOutpoint = 1;
|
|
bytes signatureScript = 2;
|
|
uint64 sequence = 3;
|
|
uint32 sigOpCount = 4;
|
|
}
|
|
|
|
message Outpoint{
|
|
TransactionId transactionId = 1;
|
|
uint32 index = 2;
|
|
}
|
|
|
|
message TransactionId{
|
|
bytes bytes = 1;
|
|
}
|
|
message ScriptPublicKey {
|
|
bytes script = 1;
|
|
uint32 version = 2;
|
|
}
|
|
|
|
message TransactionOutput{
|
|
uint64 value = 1;
|
|
ScriptPublicKey scriptPublicKey = 2;
|
|
}
|
|
|
|
message BlockMessage{
|
|
BlockHeader header = 1;
|
|
repeated TransactionMessage transactions = 2;
|
|
}
|
|
|
|
message BlockHeader{
|
|
uint32 version = 1;
|
|
repeated BlockLevelParents parents = 12;
|
|
Hash hashMerkleRoot = 3;
|
|
Hash acceptedIdMerkleRoot = 4;
|
|
Hash utxoCommitment = 5;
|
|
int64 timestamp = 6;
|
|
uint32 bits = 7;
|
|
uint64 nonce = 8;
|
|
uint64 daaScore = 9;
|
|
bytes blueWork = 10;
|
|
Hash pruningPoint = 14;
|
|
uint64 blueScore = 13;
|
|
}
|
|
|
|
message BlockLevelParents {
|
|
repeated Hash parentHashes = 1;
|
|
}
|
|
|
|
message Hash{
|
|
bytes bytes = 1;
|
|
}
|
|
|
|
message RequestBlockLocatorMessage{
|
|
Hash highHash = 1;
|
|
uint32 limit = 2;
|
|
}
|
|
|
|
message BlockLocatorMessage{
|
|
repeated Hash hashes = 1;
|
|
}
|
|
|
|
message RequestHeadersMessage{
|
|
Hash lowHash = 1;
|
|
Hash highHash = 2;
|
|
}
|
|
|
|
message RequestNextHeadersMessage{
|
|
}
|
|
|
|
message DoneHeadersMessage{
|
|
}
|
|
|
|
message RequestRelayBlocksMessage{
|
|
repeated Hash hashes = 1;
|
|
}
|
|
|
|
message RequestTransactionsMessage {
|
|
repeated TransactionId ids = 1;
|
|
}
|
|
|
|
message TransactionNotFoundMessage{
|
|
TransactionId id = 1;
|
|
}
|
|
|
|
message InvRelayBlockMessage{
|
|
Hash hash = 1;
|
|
}
|
|
|
|
message InvTransactionsMessage{
|
|
repeated TransactionId ids = 1;
|
|
}
|
|
|
|
message PingMessage{
|
|
uint64 nonce = 1;
|
|
}
|
|
|
|
message PongMessage{
|
|
uint64 nonce = 1;
|
|
}
|
|
|
|
message VerackMessage{
|
|
}
|
|
|
|
message VersionMessage{
|
|
uint32 protocolVersion = 1;
|
|
uint64 services = 2;
|
|
int64 timestamp = 3;
|
|
NetAddress address = 4;
|
|
bytes id = 5;
|
|
string userAgent = 6;
|
|
bool disableRelayTx = 8;
|
|
SubnetworkId subnetworkId = 9;
|
|
string network = 10;
|
|
}
|
|
|
|
message RejectMessage{
|
|
string reason = 1;
|
|
}
|
|
|
|
message RequestPruningPointUTXOSetMessage{
|
|
Hash pruningPointHash = 1;
|
|
}
|
|
|
|
message PruningPointUtxoSetChunkMessage{
|
|
repeated OutpointAndUtxoEntryPair outpointAndUtxoEntryPairs = 1;
|
|
}
|
|
|
|
message OutpointAndUtxoEntryPair{
|
|
Outpoint outpoint = 1;
|
|
UtxoEntry utxoEntry = 2;
|
|
}
|
|
|
|
message UtxoEntry {
|
|
uint64 amount = 1;
|
|
ScriptPublicKey scriptPublicKey = 2;
|
|
uint64 blockDaaScore = 3;
|
|
bool isCoinbase = 4;
|
|
}
|
|
|
|
message RequestNextPruningPointUtxoSetChunkMessage {
|
|
}
|
|
|
|
message DonePruningPointUtxoSetChunksMessage {
|
|
}
|
|
|
|
message RequestIBDBlocksMessage{
|
|
repeated Hash hashes = 1;
|
|
}
|
|
|
|
message UnexpectedPruningPointMessage{
|
|
}
|
|
|
|
message IbdBlockLocatorMessage {
|
|
Hash targetHash = 1;
|
|
repeated Hash blockLocatorHashes = 2;
|
|
}
|
|
|
|
message IbdBlockLocatorHighestHashMessage {
|
|
Hash highestHash = 1;
|
|
}
|
|
|
|
message IbdBlockLocatorHighestHashNotFoundMessage {
|
|
}
|
|
|
|
message BlockHeadersMessage {
|
|
repeated BlockHeader blockHeaders = 1;
|
|
}
|
|
|
|
message RequestPruningPointAndItsAnticoneMessage {
|
|
}
|
|
|
|
message BlockWithTrustedDataMessage {
|
|
BlockMessage block = 1;
|
|
uint64 daaScore = 2;
|
|
repeated DaaBlock daaWindow = 3;
|
|
repeated BlockGhostdagDataHashPair ghostdagData = 4;
|
|
}
|
|
|
|
message DaaBlock {
|
|
BlockHeader header = 1;
|
|
GhostdagData ghostdagData = 2;
|
|
}
|
|
|
|
message BlockGhostdagDataHashPair {
|
|
Hash hash = 1;
|
|
GhostdagData ghostdagData = 2;
|
|
}
|
|
|
|
message GhostdagData {
|
|
uint64 blueScore = 1;
|
|
bytes blueWork = 2;
|
|
Hash selectedParent = 3;
|
|
repeated Hash mergeSetBlues = 4;
|
|
repeated Hash mergeSetReds = 5;
|
|
repeated BluesAnticoneSizes bluesAnticoneSizes = 6;
|
|
}
|
|
|
|
message BluesAnticoneSizes {
|
|
Hash blueHash = 1;
|
|
uint32 anticoneSize = 2;
|
|
}
|
|
|
|
message DoneBlocksWithTrustedDataMessage {
|
|
}
|
|
|
|
message RequestBlockBlueWorkMessage {
|
|
Hash block = 1;
|
|
}
|
|
|
|
message BlockBlueWorkMessage {
|
|
bytes blueWork = 1;
|
|
}
|
|
|
|
message PruningPointsMessage {
|
|
repeated BlockHeader headers = 1;
|
|
}
|
|
|
|
message RequestPruningPointProofMessage {
|
|
}
|
|
|
|
message PruningPointProofMessage {
|
|
repeated PruningPointProofHeaderArray headers = 1;
|
|
}
|
|
|
|
message PruningPointProofHeaderArray {
|
|
repeated BlockHeader headers = 1;
|
|
}
|