-
Notifications
You must be signed in to change notification settings - Fork 477
/
Copy pathpeer.proto
40 lines (29 loc) · 969 Bytes
/
peer.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
syntax = "proto3";
message Peer {
// Multiaddrs we know about
repeated Address addresses = 1;
// The protocols the peer supports
repeated string protocols = 2;
// The public key of the peer
optional bytes public_key = 4;
// The most recently received signed PeerRecord
optional bytes peer_record_envelope = 5;
// Any peer metadata
map<string, bytes> metadata = 6;
// Any tags the peer has
map<string, Tag> tags = 7;
}
// Address represents a single multiaddr
message Address {
bytes multiaddr = 1;
// Flag to indicate if the address comes from a certified source
optional bool isCertified = 2;
// ms timestamp when we last succesfully dialed this address
optional uint64 lastSuccess = 3;
// ms timestamp when we last failed to dial this address
optional uint64 lastFailure = 4;
}
message Tag {
uint32 value = 1; // tag value 0-100
optional uint64 expiry = 2; // ms timestamp after which the tag is no longer valid
}