mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-07 03:22:18 +00:00
81ea5bab78
* Initial commit * Add sentry gRPC interface * p2psentry directory * Update README.md * Update README.md * Update README.md * Add go package * Correct syntax * add external downloader interface (#2) * Add txpool (#3) * Add private API (#4) * Invert control.proto, add PeerMinBlock, Separare incoming Tx message into a separate stream (#5) Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local> * Separate upload messages into its own stream (#6) Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local> * Only send changed accounts to listeners (#7) * Txpool interface doc (#9) * More additions * More additions * Fix locking * Intermediate * Fix separation of phases * Intermediate * Fix test * More transformations * New simplified way of downloading headers * Fix hard-coded header sync * Fixed syncing near the tip of the chain * Add architecture diagram source and picture (#10) * More fixes * rename tip to link * Use preverified hashes instead of preverified headers * Fix preverified hashes generation * more parametrisation * Continue parametrisation * Fix grpc data limit, interruption of headers stage * Add ropsten preverified hashes * Typed hashes (#11) * Typed hashes * Fix PeerId * 64-bit tx nonce * Disable penalties * Add goerli settings, bootstrap nodes * Try to fix goerly sync * Remove interfaces * Add proper golang packages, max_block into p2p sentry Status * Prepare for proto overhaul * Squashed 'interfaces/' content from commit ce36053c2 git-subtree-dir: interfaces git-subtree-split: ce36053c24db2f56e48ac752808de60afa1dfb4b * Change EtherReply to address * Adaptations to new types * Switch to new types * Fixes * Fix formatting * Fix lint * Lint fixes, reverse order in types * Fix lint * Fix lint * Fix lint * Fix test * Not supporting eth/66 yet * Fix shutdown * Fix lint * Fix lint * Fix lint * return stopped check Co-authored-by: Artem Vorotnikov <artem@vorotnikov.me> Co-authored-by: b00ris <b00ris@mail.ru> Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local> Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com> Co-authored-by: canepat <16927169+canepat@users.noreply.github.com>
88 lines
2.0 KiB
Protocol Buffer
88 lines
2.0 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
import "google/protobuf/empty.proto";
|
|
import "types/types.proto";
|
|
|
|
package sentry;
|
|
|
|
option go_package = "./sentry;sentry";
|
|
|
|
enum MessageId {
|
|
GetBlockHeaders = 0;
|
|
GetBlockBodies = 1;
|
|
GetNodeData = 2;
|
|
NewBlockHashes = 3;
|
|
BlockHeaders = 4;
|
|
BlockBodies = 5;
|
|
NewBlock = 6;
|
|
NodeData = 7;
|
|
}
|
|
|
|
message OutboundMessageData {
|
|
MessageId id = 1;
|
|
bytes data = 2;
|
|
}
|
|
|
|
message SendMessageByMinBlockRequest {
|
|
OutboundMessageData data = 1;
|
|
uint64 min_block = 2;
|
|
}
|
|
|
|
message SendMessageByIdRequest {
|
|
OutboundMessageData data = 1;
|
|
types.H512 peer_id = 2;
|
|
}
|
|
|
|
message SendMessageToRandomPeersRequest {
|
|
OutboundMessageData data = 1;
|
|
uint64 max_peers = 2;
|
|
}
|
|
|
|
message SentPeers { repeated types.H512 peers = 1; }
|
|
|
|
enum PenaltyKind { Kick = 0; }
|
|
|
|
message PenalizePeerRequest {
|
|
types.H512 peer_id = 1;
|
|
PenaltyKind penalty = 2;
|
|
}
|
|
|
|
message PeerMinBlockRequest {
|
|
types.H512 peer_id = 1;
|
|
uint64 min_block = 2;
|
|
}
|
|
|
|
message InboundMessage {
|
|
MessageId id = 1;
|
|
bytes data = 2;
|
|
types.H512 peer_id = 3;
|
|
}
|
|
|
|
message Forks {
|
|
types.H256 genesis = 1;
|
|
repeated uint64 forks = 2;
|
|
}
|
|
|
|
message StatusData {
|
|
uint64 network_id = 1;
|
|
types.H256 total_difficulty = 2;
|
|
types.H256 best_hash = 3;
|
|
Forks fork_data = 4;
|
|
uint64 max_block = 5;
|
|
}
|
|
|
|
service Sentry {
|
|
rpc PenalizePeer(PenalizePeerRequest) returns (google.protobuf.Empty);
|
|
rpc PeerMinBlock(PeerMinBlockRequest) returns (google.protobuf.Empty);
|
|
rpc SendMessageByMinBlock(SendMessageByMinBlockRequest) returns (SentPeers);
|
|
rpc SendMessageById(SendMessageByIdRequest) returns (SentPeers);
|
|
rpc SendMessageToRandomPeers(SendMessageToRandomPeersRequest)
|
|
returns (SentPeers);
|
|
rpc SendMessageToAll(OutboundMessageData) returns (SentPeers);
|
|
rpc SetStatus(StatusData) returns (google.protobuf.Empty);
|
|
rpc ReceiveMessages(google.protobuf.Empty) returns (stream InboundMessage);
|
|
rpc ReceiveUploadMessages(google.protobuf.Empty)
|
|
returns (stream InboundMessage);
|
|
rpc ReceiveTxMessages(google.protobuf.Empty) returns (stream InboundMessage);
|
|
}
|