mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-09 20:41:20 +00:00
97a03a1ad7
* Squashed 'interfaces/' content from commit c4e14d6dc git-subtree-dir: interfaces git-subtree-split: c4e14d6dc80a157c60acd42f0152d631d250601e * Squashed 'interfaces/' changes from c4e14d6dc..84c5faa5f 84c5faa5f Update README.md 07db484a1 Update README.md ea14fa4e3 Update README.md git-subtree-dir: interfaces git-subtree-split: 84c5faa5f956ea52119911f39ac5864b282dcec2 * Change proto paths * Squashed 'interfaces/' changes from 84c5faa5f..eb9859d41 eb9859d41 Correct syntax ae78fe955 Add go package git-subtree-dir: interfaces git-subtree-split: eb9859d4157351fac3b8bd2f477307a09978e6df * Switch to shared proto files * Fix generation * Remove duplicate files * Init hard-coded tips when not recovering * Only check initiation when extending up
49 lines
1.1 KiB
Protocol Buffer
49 lines
1.1 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
import "google/protobuf/empty.proto";
|
|
|
|
package sentry;
|
|
|
|
option go_package = "./sentry;sentry";
|
|
|
|
enum OutboundMessageId {
|
|
GetBlockHeaders = 0; GetBlockBodies = 1; GetNodeData = 2;
|
|
}
|
|
|
|
message OutboundMessageData {
|
|
OutboundMessageId id = 1;
|
|
bytes data = 2;
|
|
}
|
|
|
|
message SendMessageByMinBlockRequest {
|
|
OutboundMessageData data = 1;
|
|
uint64 min_block = 2;
|
|
}
|
|
|
|
message SendMessageByIdRequest {
|
|
OutboundMessageData data = 1;
|
|
bytes peer_id = 2;
|
|
}
|
|
|
|
message SendMessageToRandomPeersRequest {
|
|
OutboundMessageData data = 1;
|
|
uint64 max_peers = 2;
|
|
}
|
|
|
|
message SentPeers { repeated bytes peers = 1; }
|
|
|
|
enum PenaltyKind { Kick = 0; }
|
|
|
|
message PenalizePeerRequest {
|
|
bytes peer_id = 1;
|
|
PenaltyKind penalty = 2;
|
|
}
|
|
|
|
service Sentry {
|
|
rpc PenalizePeer(PenalizePeerRequest) returns(google.protobuf.Empty);
|
|
rpc SendMessageByMinBlock(SendMessageByMinBlockRequest) returns(SentPeers);
|
|
rpc SendMessageById(SendMessageByIdRequest) returns(SentPeers);
|
|
rpc SendMessageToRandomPeers(SendMessageToRandomPeersRequest)
|
|
returns(SentPeers);
|
|
rpc SendMessageToAll(OutboundMessageData) returns(SentPeers);
|
|
} |