syntax = "proto3"; option go_package = "./pb"; package pb; import "common.proto"; service BlockQueryService { rpc QueryBlockByHash(QueryBlockReq) returns (pb.Response); rpc QueryBlockByHeight(QueryBlockReq) returns (pb.Response); rpc QueryLatestBlock(QueryBlockReq) returns (pb.Response); } message Block { string hash = 1; // 区块 hash int64 height = 2; // 区块块高 int64 block_time = 3; // 区块时间 string chain_id = 4; // 所在链 ID int64 txsCount = 5; // 区块包含的交易数量 repeated string txs = 6; // 区块交易 } message QueryBlockReq { string chain_id = 1; // 查询的子链 chain-id string hash = 2; // 区块 hash int64 height = 3; // 区块块高 bool has_txs = 4; // 返回是否包含区块交易 }