mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-14 14:58:21 +00:00
14c15cba43
* save * save * Squashed 'interfaces/' content from commit 08c32a09e git-subtree-dir: interfaces git-subtree-split: 08c32a09e40b1e6fcb5922e723191c9477545356 * Revert "Squashed 'interfaces/' content from commit 08c32a09e" This reverts commit 8393d9fd * save * seve * Squashed 'interfaces/' content from commit dd6a42724 git-subtree-dir: interfaces git-subtree-split: dd6a42724401f34c21662ca1aa1718effb92320d * ensure versions compatibility of all remote services * Revert "Squashed 'interfaces/' content from commit dd6a42724" This reverts commit 2a764bf9 * Squashed 'interfaces/' content from commit dd6a42724 git-subtree-dir: interfaces git-subtree-split: dd6a42724401f34c21662ca1aa1718effb92320d * Revert "Squashed 'interfaces/' content from commit dd6a42724" This reverts commit 52621846 * Squashed 'interfaces/' content from commit dd6a42724 git-subtree-dir: interfaces git-subtree-split: dd6a42724401f34c21662ca1aa1718effb92320d * a * a * a * a * a Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
46 lines
1.3 KiB
Protocol Buffer
46 lines
1.3 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
import "google/protobuf/empty.proto";
|
|
import "types/types.proto";
|
|
|
|
package txpool;
|
|
|
|
option go_package = "./txpool;txpool";
|
|
|
|
message TxHashes { repeated types.H256 hashes = 1; }
|
|
|
|
message AddRequest { repeated bytes rlpTxs = 1; }
|
|
|
|
enum ImportResult {
|
|
SUCCESS = 0;
|
|
ALREADY_EXISTS = 1;
|
|
FEE_TOO_LOW = 2;
|
|
STALE = 3;
|
|
INVALID = 4;
|
|
INTERNAL_ERROR = 5;
|
|
}
|
|
|
|
message AddReply { repeated ImportResult imported = 1; repeated string errors = 2; }
|
|
|
|
message TransactionsRequest { repeated types.H256 hashes = 1; }
|
|
message TransactionsReply { repeated bytes rlpTxs = 1; }
|
|
|
|
message OnAddRequest {}
|
|
message OnAddReply {
|
|
repeated bytes rplTxs = 1;
|
|
}
|
|
|
|
service Txpool {
|
|
// Version returns the service version number
|
|
rpc Version(google.protobuf.Empty) returns (types.VersionReply);
|
|
// preserves incoming order, changes amount, unknown hashes will be omitted
|
|
rpc FindUnknown(TxHashes) returns (TxHashes);
|
|
// Expecting signed transactions. Preserves incoming order and amount
|
|
// Adding txs as local (use P2P to add remote txs)
|
|
rpc Add(AddRequest) returns (AddReply);
|
|
// preserves incoming order and amount, if some transaction doesn't exists in pool - returns nil in this slot
|
|
rpc Transactions(TransactionsRequest) returns (TransactionsReply);
|
|
// subscribe to new transactions add event
|
|
rpc OnAdd(OnAddRequest) returns (stream OnAddReply);
|
|
}
|