github.com/quantosnetwork/Quantos@v0.0.0-20220306172517-e20b28c5a29a/blocks/pb/block.proto (about) 1 syntax="proto3"; 2 3 package quantos.blocks.pb; 4 option go_package="blockspb"; 5 6 service BlockAPI { 7 rpc GetBlockByID(BlockRequest) returns (BlockResponse); 8 rpc SyncAllBlocks(AllBlocksRequest) returns (stream AllBlocks); 9 rpc GetBlockHeader(BlockRequest) returns (BlockHeader); 10 rpc GetBlockHeaders(AllBlocksRequest) returns (stream BlockHeader); 11 12 } 13 14 message BlockRequest { 15 string chain_id = 1; 16 string block_id = 2; 17 } 18 19 message BlockResponse { 20 string chain_id = 1; 21 string block_hash = 2; 22 string payload = 3; 23 } 24 25 message AllBlocksRequest { 26 string chain_id = 1; 27 } 28 29 message AllBlocks { 30 repeated BlockResponse blocks = 1; 31 } 32 33 message BlockHeader { 34 uint32 height = 1; 35 string previousHash = 2; 36 string validator = 3; 37 string stateMerkleRoot = 4; 38 string txMerkleRoot = 5; 39 string receiptsMerkleRoot = 6; 40 string numberAncestors = 7; 41 int64 timestamp = 8; 42 repeated bytes extraData = 9; 43 string dposConsensusHash = 10; 44 } 45 46 message Block { 47 BlockHeader blockHeader = 1; 48 49 }