syntax = "proto3"; import "types/types.proto"; package txpool; option go_package = "./txpool;txpool"; message TxHashes { repeated types.H256 hashes = 1; } message ImportRequest { repeated bytes txs = 1; } enum ImportResult { SUCCESS = 0; ALREADY_EXISTS = 1; FEE_TOO_LOW = 2; STALE = 3; INVALID = 4; INTERNAL_ERROR = 5; } message ImportReply { repeated ImportResult imported = 1; } message GetTransactionsRequest { repeated types.H256 hashes = 1; } message GetTransactionsReply { repeated bytes txs = 1; } service Txpool { // preserves incoming order, changes amount, unknown hashes will be omitted rpc FindUnknownTransactions(TxHashes) returns (TxHashes); // preserves incoming order and amount rpc ImportTransactions(ImportRequest) returns (ImportReply); // preserves incoming order and amount, if some transaction doesn't exists in pool - returns nil in this slot rpc GetTransactions(GetTransactionsRequest) returns (GetTransactionsReply); }