mirror of
https://source.quilibrium.com/quilibrium/ceremonyclient.git
synced 2024-12-26 00:25:17 +00:00
1.1.4 – Reversed sync, detached consensus loop
This commit is contained in:
parent
20aae290cb
commit
45554cb9c2
@ -6,4 +6,5 @@ type EngineConfig struct {
|
||||
GenesisSeed string `yaml:"genesisSeed"`
|
||||
MaxFrames int64 `yaml:"maxFrames"`
|
||||
PendingCommitWorkers int64 `yaml:"pendingCommitWorkers"`
|
||||
MinimumPeersRequired int `yaml:"minimumPeersRequired"`
|
||||
}
|
||||
|
@ -8,7 +8,6 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/iden3/go-iden3-crypto/poseidon"
|
||||
"github.com/libp2p/go-libp2p/core/peer"
|
||||
"github.com/pkg/errors"
|
||||
"go.uber.org/zap"
|
||||
"golang.org/x/crypto/sha3"
|
||||
@ -158,6 +157,10 @@ func (e *CeremonyDataClockConsensusEngine) handleCeremonyPeerListAnnounce(
|
||||
|
||||
e.peerMapMx.Lock()
|
||||
for _, p := range announce.PeerList {
|
||||
if p.Timestamp < time.Now().UnixMilli()-PEER_INFO_TTL {
|
||||
continue
|
||||
}
|
||||
|
||||
if _, ok := e.uncooperativePeersMap[string(p.PeerId)]; ok {
|
||||
continue
|
||||
}
|
||||
@ -166,83 +169,40 @@ func (e *CeremonyDataClockConsensusEngine) handleCeremonyPeerListAnnounce(
|
||||
continue
|
||||
}
|
||||
|
||||
multiaddr := p.Multiaddr
|
||||
if bytes.Equal(p.PeerId, peerID) {
|
||||
// we have to fetch self-reported peer info
|
||||
multiaddr = e.pubSub.GetMultiaddrOfPeer(peerID)
|
||||
}
|
||||
|
||||
pr, ok := e.peerMap[string(p.PeerId)]
|
||||
if !ok {
|
||||
if bytes.Equal(p.PeerId, peerID) {
|
||||
e.peerMap[string(p.PeerId)] = &peerInfo{
|
||||
peerId: p.PeerId,
|
||||
multiaddr: e.pubSub.GetMultiaddrOfPeer(peerID),
|
||||
maxFrame: p.MaxFrame,
|
||||
direct: bytes.Equal(p.PeerId, peerID),
|
||||
lastSeen: time.Now().Unix(),
|
||||
}
|
||||
} else {
|
||||
e.peerMap[string(p.PeerId)] = &peerInfo{
|
||||
peerId: p.PeerId,
|
||||
multiaddr: p.Multiaddr,
|
||||
maxFrame: p.MaxFrame,
|
||||
direct: bytes.Equal(p.PeerId, peerID),
|
||||
lastSeen: time.Now().Unix(),
|
||||
}
|
||||
e.peerMap[string(p.PeerId)] = &peerInfo{
|
||||
peerId: p.PeerId,
|
||||
multiaddr: multiaddr,
|
||||
maxFrame: p.MaxFrame,
|
||||
direct: bytes.Equal(p.PeerId, peerID),
|
||||
lastSeen: time.Now().Unix(),
|
||||
timestamp: p.Timestamp,
|
||||
}
|
||||
} else {
|
||||
if bytes.Equal(p.PeerId, peerID) {
|
||||
e.peerMap[string(p.PeerId)] = &peerInfo{
|
||||
peerId: p.PeerId,
|
||||
multiaddr: e.pubSub.GetMultiaddrOfPeer(peerID),
|
||||
multiaddr: multiaddr,
|
||||
maxFrame: p.MaxFrame,
|
||||
direct: bytes.Equal(p.PeerId, peerID),
|
||||
direct: true,
|
||||
lastSeen: time.Now().Unix(),
|
||||
timestamp: p.Timestamp,
|
||||
}
|
||||
} else {
|
||||
if pr.direct {
|
||||
dst := int64(p.MaxFrame) - int64(pr.maxFrame)
|
||||
if time.Now().Unix()-pr.lastSeen > 30 {
|
||||
e.peerMap[string(p.PeerId)] = &peerInfo{
|
||||
peerId: p.PeerId,
|
||||
multiaddr: p.Multiaddr,
|
||||
maxFrame: p.MaxFrame,
|
||||
direct: false,
|
||||
lastSeen: time.Now().Unix(),
|
||||
}
|
||||
} else if dst > 4 {
|
||||
e.logger.Warn(
|
||||
"peer sent announcement with higher frame index for peer",
|
||||
zap.String("sender_peer", peer.ID(peerID).String()),
|
||||
zap.String("announced_peer", peer.ID(pr.peerId).String()),
|
||||
zap.Int64("frame_distance", dst),
|
||||
)
|
||||
e.peerMap[string(p.PeerId)] = &peerInfo{
|
||||
peerId: p.PeerId,
|
||||
multiaddr: p.Multiaddr,
|
||||
maxFrame: p.MaxFrame,
|
||||
direct: false,
|
||||
lastSeen: time.Now().Unix(),
|
||||
}
|
||||
} else if dst < -4 {
|
||||
e.logger.Debug(
|
||||
"peer sent announcement with lower frame index for peer",
|
||||
zap.String("sender_peer", peer.ID(peerID).String()),
|
||||
zap.String("announced_peer", peer.ID(pr.peerId).String()),
|
||||
zap.Int64("frame_distance", dst),
|
||||
)
|
||||
} else {
|
||||
e.peerMap[string(p.PeerId)] = &peerInfo{
|
||||
peerId: p.PeerId,
|
||||
multiaddr: p.Multiaddr,
|
||||
maxFrame: p.MaxFrame,
|
||||
direct: false,
|
||||
lastSeen: time.Now().Unix(),
|
||||
}
|
||||
}
|
||||
} else {
|
||||
e.peerMap[string(p.PeerId)] = &peerInfo{
|
||||
peerId: p.PeerId,
|
||||
multiaddr: p.Multiaddr,
|
||||
maxFrame: p.MaxFrame,
|
||||
direct: false,
|
||||
lastSeen: time.Now().Unix(),
|
||||
}
|
||||
} else if !pr.direct || time.Now().Unix()-pr.lastSeen > 30 {
|
||||
e.peerMap[string(p.PeerId)] = &peerInfo{
|
||||
peerId: p.PeerId,
|
||||
multiaddr: p.Multiaddr,
|
||||
maxFrame: p.MaxFrame,
|
||||
direct: false,
|
||||
lastSeen: time.Now().Unix(),
|
||||
timestamp: p.Timestamp,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,9 @@ import (
|
||||
"source.quilibrium.com/quilibrium/monorepo/node/tries"
|
||||
)
|
||||
|
||||
const PEER_INFO_TTL = 5 * 60 * 1000
|
||||
const UNCOOPERATIVE_PEER_INFO_TTL = 60 * 60 * 1000
|
||||
|
||||
type InclusionMap = map[curves.PairingPoint]*protobufs.InclusionCommitment
|
||||
type PolynomialMap = map[curves.PairingPoint][]curves.PairingScalar
|
||||
type SyncStatusType int
|
||||
@ -36,6 +39,7 @@ type peerInfo struct {
|
||||
peerId []byte
|
||||
multiaddr string
|
||||
maxFrame uint64
|
||||
timestamp int64
|
||||
lastSeen int64
|
||||
direct bool
|
||||
}
|
||||
@ -68,6 +72,7 @@ type CeremonyDataClockConsensusEngine struct {
|
||||
stagedKeyCommits InclusionMap
|
||||
stagedKeyPolynomials PolynomialMap
|
||||
stagedLobbyStateTransitions *protobufs.CeremonyLobbyStateTransition
|
||||
minimumPeersRequired int
|
||||
|
||||
frameChan chan *protobufs.ClockFrame
|
||||
executionEngines map[string]execution.ExecutionEngine
|
||||
@ -127,6 +132,11 @@ func NewCeremonyDataClockConsensusEngine(
|
||||
panic(errors.New("pubsub is nil"))
|
||||
}
|
||||
|
||||
minimumPeersRequired := engineConfig.MinimumPeersRequired
|
||||
if minimumPeersRequired == 0 {
|
||||
minimumPeersRequired = 6
|
||||
}
|
||||
|
||||
e := &CeremonyDataClockConsensusEngine{
|
||||
frame: 0,
|
||||
difficulty: 10000,
|
||||
@ -157,6 +167,7 @@ func NewCeremonyDataClockConsensusEngine(
|
||||
peerAnnounceMap: map[string]*protobufs.CeremonyPeerListAnnounce{},
|
||||
peerMap: map[string]*peerInfo{},
|
||||
uncooperativePeersMap: map[string]*peerInfo{},
|
||||
minimumPeersRequired: minimumPeersRequired,
|
||||
}
|
||||
|
||||
logger.Info("constructing consensus engine")
|
||||
@ -243,12 +254,27 @@ func (e *CeremonyDataClockConsensusEngine) Start(
|
||||
multiaddr: "",
|
||||
maxFrame: e.frame,
|
||||
}
|
||||
deletes := []*peerInfo{}
|
||||
for _, v := range e.peerMap {
|
||||
list.PeerList = append(list.PeerList, &protobufs.CeremonyPeer{
|
||||
PeerId: v.peerId,
|
||||
Multiaddr: v.multiaddr,
|
||||
MaxFrame: v.maxFrame,
|
||||
})
|
||||
if v.timestamp > time.Now().UnixMilli()-PEER_INFO_TTL {
|
||||
list.PeerList = append(list.PeerList, &protobufs.CeremonyPeer{
|
||||
PeerId: v.peerId,
|
||||
Multiaddr: v.multiaddr,
|
||||
MaxFrame: v.maxFrame,
|
||||
Timestamp: v.timestamp,
|
||||
})
|
||||
} else {
|
||||
deletes = append(deletes, v)
|
||||
}
|
||||
}
|
||||
for _, v := range e.uncooperativePeersMap {
|
||||
if v.timestamp <= time.Now().UnixMilli()-UNCOOPERATIVE_PEER_INFO_TTL {
|
||||
deletes = append(deletes, v)
|
||||
}
|
||||
}
|
||||
for _, v := range deletes {
|
||||
delete(e.peerMap, string(v.peerId))
|
||||
delete(e.uncooperativePeersMap, string(v.peerId))
|
||||
}
|
||||
e.peerMapMx.Unlock()
|
||||
|
||||
@ -258,26 +284,54 @@ func (e *CeremonyDataClockConsensusEngine) Start(
|
||||
}
|
||||
}()
|
||||
|
||||
go func() {
|
||||
latest := latestFrame
|
||||
for {
|
||||
time.Sleep(30 * time.Second)
|
||||
peerCount := e.pubSub.GetNetworkPeersCount()
|
||||
if peerCount >= e.minimumPeersRequired {
|
||||
e.logger.Info("selecting leader")
|
||||
latest, err = e.commitLongestPath(latest)
|
||||
if err != nil {
|
||||
e.logger.Error("could not collect longest path", zap.Error(err))
|
||||
latest, _, err = e.clockStore.GetDataClockFrame(e.filter, 0)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
go func() {
|
||||
for e.state < consensus.EngineStateStopping {
|
||||
switch e.state {
|
||||
case consensus.EngineStateCollecting:
|
||||
if latestFrame, err = e.collect(latestFrame); err != nil {
|
||||
e.logger.Error("could not collect", zap.Error(err))
|
||||
e.state = consensus.EngineStateCollecting
|
||||
errChan <- err
|
||||
}
|
||||
case consensus.EngineStateProving:
|
||||
if latestFrame, err = e.prove(latestFrame); err != nil {
|
||||
e.logger.Error("could not prove", zap.Error(err))
|
||||
e.state = consensus.EngineStateCollecting
|
||||
errChan <- err
|
||||
}
|
||||
case consensus.EngineStatePublishing:
|
||||
if err = e.publishProof(latestFrame); err != nil {
|
||||
e.logger.Error("could not publish", zap.Error(err))
|
||||
e.state = consensus.EngineStateCollecting
|
||||
errChan <- err
|
||||
peerCount := e.pubSub.GetNetworkPeersCount()
|
||||
if peerCount < e.minimumPeersRequired {
|
||||
e.logger.Info(
|
||||
"waiting for minimum peers",
|
||||
zap.Int("peer_count", peerCount),
|
||||
)
|
||||
time.Sleep(1 * time.Second)
|
||||
} else {
|
||||
switch e.state {
|
||||
case consensus.EngineStateCollecting:
|
||||
if latestFrame, err = e.collect(latestFrame); err != nil {
|
||||
e.logger.Error("could not collect", zap.Error(err))
|
||||
e.state = consensus.EngineStateCollecting
|
||||
errChan <- err
|
||||
}
|
||||
case consensus.EngineStateProving:
|
||||
if latestFrame, err = e.prove(latestFrame); err != nil {
|
||||
e.logger.Error("could not prove", zap.Error(err))
|
||||
e.state = consensus.EngineStateCollecting
|
||||
errChan <- err
|
||||
}
|
||||
case consensus.EngineStatePublishing:
|
||||
if err = e.publishProof(latestFrame); err != nil {
|
||||
e.logger.Error("could not publish", zap.Error(err))
|
||||
e.state = consensus.EngineStateCollecting
|
||||
errChan <- err
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -356,6 +410,7 @@ func (
|
||||
PeerId: v.peerId,
|
||||
Multiaddrs: []string{v.multiaddr},
|
||||
MaxFrame: v.maxFrame,
|
||||
Timestamp: v.timestamp,
|
||||
})
|
||||
}
|
||||
for _, v := range e.uncooperativePeersMap {
|
||||
@ -365,6 +420,7 @@ func (
|
||||
PeerId: v.peerId,
|
||||
Multiaddrs: []string{v.multiaddr},
|
||||
MaxFrame: v.maxFrame,
|
||||
Timestamp: v.timestamp,
|
||||
},
|
||||
)
|
||||
}
|
||||
|
@ -861,165 +861,215 @@ func (e *CeremonyDataClockConsensusEngine) GetMostAheadPeer() (
|
||||
return peer, max, nil
|
||||
}
|
||||
|
||||
func (e *CeremonyDataClockConsensusEngine) collect(
|
||||
currentFramePublished *protobufs.ClockFrame,
|
||||
func (e *CeremonyDataClockConsensusEngine) reverseOptimisticSync(
|
||||
currentLatest *protobufs.ClockFrame,
|
||||
maxFrame uint64,
|
||||
peerId []byte,
|
||||
) (*protobufs.ClockFrame, error) {
|
||||
if e.state == consensus.EngineStateCollecting {
|
||||
e.logger.Info("collecting vdf proofs")
|
||||
latest := currentLatest
|
||||
cc, err := e.pubSub.GetDirectChannel(peerId)
|
||||
if err != nil {
|
||||
e.logger.Error(
|
||||
"could not establish direct channel",
|
||||
zap.Error(err),
|
||||
)
|
||||
e.peerMapMx.Lock()
|
||||
e.uncooperativePeersMap[string(peerId)] = e.peerMap[string(peerId)]
|
||||
delete(e.peerMap, string(peerId))
|
||||
e.peerMapMx.Unlock()
|
||||
e.syncingTarget = nil
|
||||
return latest, errors.Wrap(err, "reverse optimistic sync")
|
||||
}
|
||||
|
||||
latest, err := e.clockStore.GetLatestDataClockFrame(e.filter, nil)
|
||||
client := protobufs.NewCeremonyServiceClient(cc)
|
||||
|
||||
from := latest.FrameNumber
|
||||
if from == 0 {
|
||||
from = 1
|
||||
}
|
||||
|
||||
if maxFrame-from > 32 {
|
||||
// divergence is high, ask them for the latest frame and if they
|
||||
// respond with a valid answer, optimistically continue from this
|
||||
// frame, if we hit a fault we'll mark them as uncooperative and move
|
||||
// on
|
||||
from = 1
|
||||
s, err := client.GetCompressedSyncFrames(
|
||||
context.Background(),
|
||||
&protobufs.ClockFramesRequest{
|
||||
Filter: e.filter,
|
||||
FromFrameNumber: maxFrame - 32,
|
||||
},
|
||||
grpc.MaxCallRecvMsgSize(400*1024*1024),
|
||||
)
|
||||
if err != nil {
|
||||
e.logger.Error("could not obtain latest clock frame", zap.Error(err))
|
||||
|
||||
return nil, errors.Wrap(err, "collect")
|
||||
}
|
||||
|
||||
maxFrame := uint64(0)
|
||||
var peerId []byte
|
||||
peerId, maxFrame, err = e.GetMostAheadPeer()
|
||||
if err != nil {
|
||||
e.logger.Warn("no peers available, skipping sync")
|
||||
} else if peerId == nil {
|
||||
e.logger.Info("currently up to date, skipping sync")
|
||||
} else {
|
||||
e.syncingStatus = SyncStatusAwaitingResponse
|
||||
e.logger.Info(
|
||||
"setting syncing target",
|
||||
zap.String("peer_id", peer.ID(peerId).String()),
|
||||
e.logger.Error(
|
||||
"received error from peer",
|
||||
zap.Error(err),
|
||||
)
|
||||
|
||||
cc, err := e.pubSub.GetDirectChannel(peerId)
|
||||
if err != nil {
|
||||
e.peerMapMx.Lock()
|
||||
e.uncooperativePeersMap[string(peerId)] = e.peerMap[string(peerId)]
|
||||
delete(e.peerMap, string(peerId))
|
||||
e.peerMapMx.Unlock()
|
||||
e.syncingTarget = nil
|
||||
return latest, errors.Wrap(err, "reverse optimistic sync")
|
||||
}
|
||||
var syncMsg *protobufs.CeremonyCompressedSync
|
||||
for syncMsg, err = s.Recv(); err == nil; syncMsg, err = s.Recv() {
|
||||
e.logger.Info(
|
||||
"received compressed sync frame",
|
||||
zap.Uint64("from", syncMsg.FromFrameNumber),
|
||||
zap.Uint64("to", syncMsg.ToFrameNumber),
|
||||
zap.Int("frames", len(syncMsg.TruncatedClockFrames)),
|
||||
zap.Int("proofs", len(syncMsg.Proofs)),
|
||||
)
|
||||
var next *protobufs.ClockFrame
|
||||
if next, err = e.decompressAndStoreCandidates(
|
||||
syncMsg,
|
||||
e.logger.Info,
|
||||
); err != nil && !errors.Is(err, ErrNoNewFrames) {
|
||||
e.logger.Error(
|
||||
"could not establish direct channel",
|
||||
"could not decompress and store candidate",
|
||||
zap.Error(err),
|
||||
)
|
||||
e.peerMapMx.Lock()
|
||||
e.uncooperativePeersMap[string(peerId)] = e.peerMap[string(peerId)]
|
||||
delete(e.peerMap, string(peerId))
|
||||
e.peerMapMx.Unlock()
|
||||
} else {
|
||||
from := latest.FrameNumber
|
||||
originalFrom := from
|
||||
originalLatest := latest
|
||||
if from == 0 {
|
||||
from = 1
|
||||
} else if maxFrame-from > 32 {
|
||||
// divergence is high, we need to confirm we're not in a fork
|
||||
from = 1
|
||||
latest, _, err = e.clockStore.GetDataClockFrame(e.filter, 0)
|
||||
if err != nil {
|
||||
// This should never happen for healthy systems, if it does we're
|
||||
// in a severely corrupted state.
|
||||
e.logger.Error(
|
||||
"could not find genesis frame, please reset your store",
|
||||
)
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
client := protobufs.NewCeremonyServiceClient(cc)
|
||||
s, err := client.GetCompressedSyncFrames(
|
||||
context.Background(),
|
||||
&protobufs.ClockFramesRequest{
|
||||
Filter: e.filter,
|
||||
FromFrameNumber: from,
|
||||
ToFrameNumber: maxFrame,
|
||||
ParentSelector: latest.ParentSelector,
|
||||
},
|
||||
grpc.MaxCallRecvMsgSize(400*1024*1024),
|
||||
)
|
||||
if err != nil {
|
||||
e.logger.Error(
|
||||
"error while retrieving sync",
|
||||
zap.Error(err),
|
||||
)
|
||||
latest = originalLatest
|
||||
e.peerMapMx.Lock()
|
||||
e.uncooperativePeersMap[string(peerId)] = e.peerMap[string(peerId)]
|
||||
delete(e.peerMap, string(peerId))
|
||||
e.peerMapMx.Unlock()
|
||||
} else {
|
||||
var syncMsg *protobufs.CeremonyCompressedSync
|
||||
askedFrom := from
|
||||
for syncMsg, err = s.Recv(); err == nil; syncMsg, err = s.Recv() {
|
||||
if syncMsg.FromFrameNumber < askedFrom {
|
||||
askedFrom = syncMsg.FromFrameNumber
|
||||
}
|
||||
|
||||
e.logger.Info(
|
||||
"received compressed sync frame",
|
||||
zap.Uint64("from", syncMsg.FromFrameNumber),
|
||||
zap.Uint64("to", syncMsg.ToFrameNumber),
|
||||
zap.Int("frames", len(syncMsg.TruncatedClockFrames)),
|
||||
zap.Int("proofs", len(syncMsg.Proofs)),
|
||||
)
|
||||
if err = e.decompressAndStoreCandidates(syncMsg); err != nil {
|
||||
e.logger.Error(
|
||||
"could not decompress and store candidate",
|
||||
zap.Error(err),
|
||||
)
|
||||
from = originalFrom
|
||||
latest = originalLatest
|
||||
break
|
||||
}
|
||||
}
|
||||
if err != nil && err != io.EOF {
|
||||
e.logger.Error("error while receiving sync", zap.Error(err))
|
||||
from = originalFrom
|
||||
latest = originalLatest
|
||||
askedFrom = from
|
||||
}
|
||||
|
||||
if askedFrom < from {
|
||||
e.logger.Info(
|
||||
"peer provided deeper history due to fork, rewinding consensus " +
|
||||
"head",
|
||||
)
|
||||
askedLatest, _, err := e.clockStore.GetDataClockFrame(
|
||||
e.filter,
|
||||
askedFrom-1,
|
||||
)
|
||||
if err != nil {
|
||||
e.logger.Error("error while receiving sync", zap.Error(err))
|
||||
} else {
|
||||
latest = askedLatest
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if err := cc.Close(); err != nil {
|
||||
e.logger.Error("error while closing connection", zap.Error(err))
|
||||
}
|
||||
|
||||
e.syncingTarget = nil
|
||||
return currentLatest, errors.Wrap(err, "reverse optimistic sync")
|
||||
}
|
||||
if next != nil {
|
||||
latest = next
|
||||
}
|
||||
}
|
||||
if err != nil && err != io.EOF && !errors.Is(err, ErrNoNewFrames) {
|
||||
if err := cc.Close(); err != nil {
|
||||
e.logger.Error("error while closing connection", zap.Error(err))
|
||||
}
|
||||
e.logger.Error("error while receiving sync", zap.Error(err))
|
||||
e.syncingTarget = nil
|
||||
return latest, errors.Wrap(err, "reverse optimistic sync")
|
||||
}
|
||||
}
|
||||
|
||||
go func() {
|
||||
defer func() { e.syncingTarget = nil }()
|
||||
e.logger.Info("continuing sync in background")
|
||||
s, err := client.GetCompressedSyncFrames(
|
||||
context.Background(),
|
||||
&protobufs.ClockFramesRequest{
|
||||
Filter: e.filter,
|
||||
FromFrameNumber: from,
|
||||
ToFrameNumber: maxFrame,
|
||||
},
|
||||
grpc.MaxCallRecvMsgSize(400*1024*1024),
|
||||
)
|
||||
if err != nil {
|
||||
e.logger.Error(
|
||||
"error while retrieving sync",
|
||||
zap.Error(err),
|
||||
)
|
||||
e.peerMapMx.Lock()
|
||||
e.uncooperativePeersMap[string(peerId)] = e.peerMap[string(peerId)]
|
||||
delete(e.peerMap, string(peerId))
|
||||
e.peerMapMx.Unlock()
|
||||
|
||||
if err := cc.Close(); err != nil {
|
||||
e.logger.Error("error while closing connection", zap.Error(err))
|
||||
}
|
||||
return
|
||||
} else {
|
||||
var syncMsg *protobufs.CeremonyCompressedSync
|
||||
for syncMsg, err = s.Recv(); err == nil; syncMsg, err = s.Recv() {
|
||||
e.logger.Debug(
|
||||
"received compressed sync frame",
|
||||
zap.Uint64("from", syncMsg.FromFrameNumber),
|
||||
zap.Uint64("to", syncMsg.ToFrameNumber),
|
||||
zap.Int("frames", len(syncMsg.TruncatedClockFrames)),
|
||||
zap.Int("proofs", len(syncMsg.Proofs)),
|
||||
)
|
||||
if _, err = e.decompressAndStoreCandidates(
|
||||
syncMsg,
|
||||
e.logger.Debug,
|
||||
); err != nil && !errors.Is(err, ErrNoNewFrames) {
|
||||
e.logger.Error(
|
||||
"could not decompress and store candidate",
|
||||
zap.Error(err),
|
||||
)
|
||||
|
||||
if err := cc.Close(); err != nil {
|
||||
e.logger.Error("error while closing connection", zap.Error(err))
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
if err != nil && err != io.EOF && !errors.Is(err, ErrNoNewFrames) {
|
||||
e.logger.Error("error while receiving sync", zap.Error(err))
|
||||
if err := cc.Close(); err != nil {
|
||||
e.logger.Error("error while closing connection", zap.Error(err))
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
e.logger.Info("selecting leader")
|
||||
latestFrame, err := e.commitLongestPath(latest)
|
||||
if err := cc.Close(); err != nil {
|
||||
e.logger.Error("error while closing connection", zap.Error(err))
|
||||
}
|
||||
}()
|
||||
|
||||
return latest, nil
|
||||
}
|
||||
|
||||
func (e *CeremonyDataClockConsensusEngine) collect(
|
||||
currentFramePublished *protobufs.ClockFrame,
|
||||
) (*protobufs.ClockFrame, error) {
|
||||
if e.state == consensus.EngineStateCollecting {
|
||||
e.logger.Info("collecting vdf proofs")
|
||||
|
||||
latest := currentFramePublished
|
||||
maxFrame := uint64(0)
|
||||
var peerId []byte
|
||||
peerId, maxFrame, err := e.GetMostAheadPeer()
|
||||
if err != nil {
|
||||
e.logger.Error("could not collect longest path", zap.Error(err))
|
||||
return nil, errors.Wrap(err, "collect")
|
||||
e.logger.Warn("no peers available, skipping sync")
|
||||
} else if peerId == nil {
|
||||
e.logger.Info("currently up to date, skipping sync")
|
||||
} else if e.syncingTarget == nil {
|
||||
e.syncingStatus = SyncStatusAwaitingResponse
|
||||
e.logger.Info(
|
||||
"setting syncing target",
|
||||
zap.String("peer_id", peer.ID(peerId).String()),
|
||||
)
|
||||
|
||||
e.syncingTarget = peerId
|
||||
latest, err = e.reverseOptimisticSync(latest, maxFrame, peerId)
|
||||
}
|
||||
|
||||
go func() {
|
||||
_, err = e.keyStore.GetProvingKey(e.provingKeyBytes)
|
||||
if errors.Is(err, store.ErrNotFound) &&
|
||||
latestFrame.FrameNumber-e.lastKeyBundleAnnouncementFrame > 6 {
|
||||
latest.FrameNumber-e.lastKeyBundleAnnouncementFrame > 6 {
|
||||
if err = e.announceKeyBundle(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
e.lastKeyBundleAnnouncementFrame = latestFrame.FrameNumber
|
||||
e.lastKeyBundleAnnouncementFrame = latest.FrameNumber
|
||||
}
|
||||
}()
|
||||
|
||||
e.logger.Info(
|
||||
"returning leader frame",
|
||||
zap.Uint64("frame_number", latestFrame.FrameNumber),
|
||||
zap.Uint64("frame_number", latest.FrameNumber),
|
||||
)
|
||||
|
||||
e.setFrame(latestFrame)
|
||||
e.setFrame(latest)
|
||||
e.state = consensus.EngineStateProving
|
||||
return latestFrame, nil
|
||||
return latest, nil
|
||||
}
|
||||
|
||||
return nil, nil
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"go.uber.org/zap"
|
||||
"go.uber.org/zap/zapcore"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/protobuf/proto"
|
||||
"google.golang.org/protobuf/types/known/anypb"
|
||||
@ -17,6 +18,8 @@ import (
|
||||
"source.quilibrium.com/quilibrium/monorepo/node/store"
|
||||
)
|
||||
|
||||
var ErrNoNewFrames = errors.New("peer reported no frames")
|
||||
|
||||
func (e *CeremonyDataClockConsensusEngine) handleSync(
|
||||
message *pb.Message,
|
||||
) error {
|
||||
@ -151,9 +154,9 @@ func (e *CeremonyDataClockConsensusEngine) GetCompressedSyncFrames(
|
||||
for {
|
||||
if to == 0 || to-from > 32 {
|
||||
if max > from+31 {
|
||||
to = from + 31
|
||||
to = from + 32
|
||||
} else {
|
||||
to = max
|
||||
to = max + 1
|
||||
}
|
||||
}
|
||||
|
||||
@ -187,23 +190,29 @@ func (e *CeremonyDataClockConsensusEngine) GetCompressedSyncFrames(
|
||||
|
||||
func (e *CeremonyDataClockConsensusEngine) decompressAndStoreCandidates(
|
||||
syncMsg *protobufs.CeremonyCompressedSync,
|
||||
) error {
|
||||
loggerFunc func(msg string, fields ...zapcore.Field),
|
||||
) (*protobufs.ClockFrame, error) {
|
||||
if len(syncMsg.TruncatedClockFrames) == 0 {
|
||||
return nil, ErrNoNewFrames
|
||||
}
|
||||
|
||||
if len(syncMsg.TruncatedClockFrames) != int(
|
||||
syncMsg.ToFrameNumber-syncMsg.FromFrameNumber+1,
|
||||
) {
|
||||
return errors.New("invalid continuity for compressed sync response")
|
||||
return nil, errors.New("invalid continuity for compressed sync response")
|
||||
}
|
||||
|
||||
var final *protobufs.ClockFrame
|
||||
for _, frame := range syncMsg.TruncatedClockFrames {
|
||||
frame := frame
|
||||
commits := (len(frame.Input) - 516) / 74
|
||||
e.logger.Info(
|
||||
loggerFunc(
|
||||
"processing frame",
|
||||
zap.Uint64("frame_number", frame.FrameNumber),
|
||||
zap.Int("aggregate_commits", commits),
|
||||
)
|
||||
for j := 0; j < commits; j++ {
|
||||
e.logger.Info(
|
||||
loggerFunc(
|
||||
"processing commit",
|
||||
zap.Uint64("frame_number", frame.FrameNumber),
|
||||
zap.Int("commit_index", j),
|
||||
@ -213,7 +222,7 @@ func (e *CeremonyDataClockConsensusEngine) decompressAndStoreCandidates(
|
||||
for _, a := range syncMsg.Proofs {
|
||||
a := a
|
||||
if bytes.Equal(a.FrameCommit, commit) {
|
||||
e.logger.Info(
|
||||
loggerFunc(
|
||||
"found matching proof",
|
||||
zap.Uint64("frame_number", frame.FrameNumber),
|
||||
zap.Int("commit_index", j),
|
||||
@ -229,7 +238,7 @@ func (e *CeremonyDataClockConsensusEngine) decompressAndStoreCandidates(
|
||||
zap.Int("commit_index", j),
|
||||
zap.Binary("proof", aggregateProof.Proof),
|
||||
)
|
||||
return errors.Wrap(
|
||||
return nil, errors.Wrap(
|
||||
store.ErrInvalidData,
|
||||
"decompress and store candidates",
|
||||
)
|
||||
@ -244,7 +253,7 @@ func (e *CeremonyDataClockConsensusEngine) decompressAndStoreCandidates(
|
||||
for k, c := range aggregateProof.Commitments {
|
||||
k := k
|
||||
c := c
|
||||
e.logger.Info(
|
||||
loggerFunc(
|
||||
"adding inclusion commitment",
|
||||
zap.Uint64("frame_number", frame.FrameNumber),
|
||||
zap.Int("commit_index", j),
|
||||
@ -273,7 +282,7 @@ func (e *CeremonyDataClockConsensusEngine) decompressAndStoreCandidates(
|
||||
if bytes.Equal(s.Hash, h) {
|
||||
if output != nil {
|
||||
if l == 0 {
|
||||
e.logger.Info(
|
||||
loggerFunc(
|
||||
"found first half of matching segment data",
|
||||
zap.Uint64("frame_number", frame.FrameNumber),
|
||||
zap.Int("commit_index", j),
|
||||
@ -283,7 +292,7 @@ func (e *CeremonyDataClockConsensusEngine) decompressAndStoreCandidates(
|
||||
output.Address = s.Data[:32]
|
||||
output.Output = s.Data[32:]
|
||||
} else {
|
||||
e.logger.Info(
|
||||
loggerFunc(
|
||||
"found second half of matching segment data",
|
||||
zap.Uint64("frame_number", frame.FrameNumber),
|
||||
zap.Int("commit_index", j),
|
||||
@ -293,13 +302,16 @@ func (e *CeremonyDataClockConsensusEngine) decompressAndStoreCandidates(
|
||||
output.Proof = s.Data
|
||||
b, err := proto.Marshal(output)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "decompress and store candidates")
|
||||
return nil, errors.Wrap(
|
||||
err,
|
||||
"decompress and store candidates",
|
||||
)
|
||||
}
|
||||
incCommit.Data = b
|
||||
break
|
||||
}
|
||||
} else {
|
||||
e.logger.Info(
|
||||
loggerFunc(
|
||||
"found matching segment data",
|
||||
zap.Uint64("frame_number", frame.FrameNumber),
|
||||
zap.Int("commit_index", j),
|
||||
@ -326,7 +338,7 @@ func (e *CeremonyDataClockConsensusEngine) decompressAndStoreCandidates(
|
||||
|
||||
f, err := proto.Marshal(frame)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "decompress and store candidates")
|
||||
return nil, errors.Wrap(err, "decompress and store candidates")
|
||||
}
|
||||
|
||||
any := &anypb.Any{
|
||||
@ -339,16 +351,17 @@ func (e *CeremonyDataClockConsensusEngine) decompressAndStoreCandidates(
|
||||
any,
|
||||
true,
|
||||
); err != nil {
|
||||
return errors.Wrap(err, "decompress and store candidates")
|
||||
return nil, errors.Wrap(err, "decompress and store candidates")
|
||||
}
|
||||
final = frame
|
||||
}
|
||||
|
||||
e.logger.Info(
|
||||
loggerFunc(
|
||||
"decompressed and stored sync for range",
|
||||
zap.Uint64("from", syncMsg.FromFrameNumber),
|
||||
zap.Uint64("to", syncMsg.ToFrameNumber),
|
||||
)
|
||||
return nil
|
||||
return final, nil
|
||||
}
|
||||
|
||||
type svr struct {
|
||||
|
@ -230,5 +230,5 @@ func printLogo() {
|
||||
|
||||
func printVersion() {
|
||||
fmt.Println(" ")
|
||||
fmt.Println(" Quilibrium Node - v1.1.3 – Dawn")
|
||||
fmt.Println(" Quilibrium Node - v1.1.4 – Dawn")
|
||||
}
|
||||
|
@ -1027,6 +1027,7 @@ type CeremonyPeer struct {
|
||||
PeerId []byte `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
|
||||
Multiaddr string `protobuf:"bytes,2,opt,name=multiaddr,proto3" json:"multiaddr,omitempty"`
|
||||
MaxFrame uint64 `protobuf:"varint,3,opt,name=max_frame,json=maxFrame,proto3" json:"max_frame,omitempty"`
|
||||
Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
|
||||
}
|
||||
|
||||
func (x *CeremonyPeer) Reset() {
|
||||
@ -1082,6 +1083,13 @@ func (x *CeremonyPeer) GetMaxFrame() uint64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *CeremonyPeer) GetTimestamp() int64 {
|
||||
if x != nil {
|
||||
return x.Timestamp
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type CeremonyCompressedSync struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -1638,79 +1646,81 @@ var file_ceremony_proto_rawDesc = []byte{
|
||||
0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d,
|
||||
0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x63, 0x65, 0x72, 0x65, 0x6d, 0x6f, 0x6e, 0x79, 0x2e, 0x70,
|
||||
0x62, 0x2e, 0x43, 0x65, 0x72, 0x65, 0x6d, 0x6f, 0x6e, 0x79, 0x50, 0x65, 0x65, 0x72, 0x52, 0x08,
|
||||
0x70, 0x65, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x62, 0x0a, 0x0c, 0x43, 0x65, 0x72, 0x65,
|
||||
0x6d, 0x6f, 0x6e, 0x79, 0x50, 0x65, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72,
|
||||
0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49,
|
||||
0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x61, 0x64, 0x64, 0x72, 0x12,
|
||||
0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x04, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x22, 0xe0, 0x02, 0x0a,
|
||||
0x16, 0x43, 0x65, 0x72, 0x65, 0x6d, 0x6f, 0x6e, 0x79, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73,
|
||||
0x73, 0x65, 0x64, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x2a, 0x0a, 0x11, 0x66, 0x72, 0x6f, 0x6d, 0x5f,
|
||||
0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x04, 0x52, 0x0f, 0x66, 0x72, 0x6f, 0x6d, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x4e, 0x75, 0x6d,
|
||||
0x62, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x6f, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f,
|
||||
0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x74, 0x6f,
|
||||
0x46, 0x72, 0x61, 0x6d, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x5a, 0x0a, 0x16, 0x74,
|
||||
0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x66,
|
||||
0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x71, 0x75,
|
||||
0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x63, 0x6c,
|
||||
0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6c, 0x6f, 0x63, 0x6b, 0x46, 0x72, 0x61, 0x6d,
|
||||
0x65, 0x52, 0x14, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x6f, 0x63,
|
||||
0x6b, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x6f, 0x66,
|
||||
0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62,
|
||||
0x72, 0x69, 0x75, 0x6d, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x63, 0x65, 0x72, 0x65, 0x6d, 0x6f,
|
||||
0x6e, 0x79, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x50,
|
||||
0x72, 0x6f, 0x6f, 0x66, 0x73, 0x4d, 0x61, 0x70, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x73,
|
||||
0x12, 0x4d, 0x0a, 0x08, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x31, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d, 0x2e,
|
||||
0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x63, 0x65, 0x72, 0x65, 0x6d, 0x6f, 0x6e, 0x79, 0x2e, 0x70, 0x62,
|
||||
0x2e, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x73, 0x4d, 0x61, 0x70, 0x52, 0x08, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22,
|
||||
0xa5, 0x01, 0x0a, 0x12, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f,
|
||||
0x6f, 0x66, 0x73, 0x4d, 0x61, 0x70, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f,
|
||||
0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x66, 0x72,
|
||||
0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f,
|
||||
0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12,
|
||||
0x56, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75,
|
||||
0x6d, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x63, 0x65, 0x72, 0x65, 0x6d, 0x6f, 0x6e, 0x79, 0x2e,
|
||||
0x70, 0x62, 0x2e, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x6d,
|
||||
0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x4d, 0x61, 0x70, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d,
|
||||
0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x3e, 0x0a, 0x14, 0x49, 0x6e, 0x63, 0x6c, 0x75,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x4d, 0x61, 0x70, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68,
|
||||
0x61, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x7b, 0x0a, 0x17, 0x49, 0x6e, 0x63, 0x6c, 0x75,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x4d,
|
||||
0x61, 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x25, 0x0a,
|
||||
0x0e, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18,
|
||||
0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0d, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x61,
|
||||
0x73, 0x68, 0x65, 0x73, 0x32, 0x89, 0x02, 0x0a, 0x0f, 0x43, 0x65, 0x72, 0x65, 0x6d, 0x6f, 0x6e,
|
||||
0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7e, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43,
|
||||
0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x53, 0x79, 0x6e, 0x63, 0x46, 0x72, 0x61,
|
||||
0x6d, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d,
|
||||
0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x62, 0x2e, 0x43,
|
||||
0x6c, 0x6f, 0x63, 0x6b, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x33, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x6e,
|
||||
0x6f, 0x64, 0x65, 0x2e, 0x63, 0x65, 0x72, 0x65, 0x6d, 0x6f, 0x6e, 0x79, 0x2e, 0x70, 0x62, 0x2e,
|
||||
0x70, 0x65, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x80, 0x01, 0x0a, 0x0c, 0x43, 0x65, 0x72,
|
||||
0x65, 0x6d, 0x6f, 0x6e, 0x79, 0x50, 0x65, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x65, 0x65,
|
||||
0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72,
|
||||
0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x61, 0x64, 0x64, 0x72, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x61, 0x64, 0x64, 0x72,
|
||||
0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a,
|
||||
0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xe0, 0x02, 0x0a, 0x16,
|
||||
0x43, 0x65, 0x72, 0x65, 0x6d, 0x6f, 0x6e, 0x79, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73,
|
||||
0x65, 0x64, 0x53, 0x79, 0x6e, 0x63, 0x30, 0x01, 0x12, 0x76, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50,
|
||||
0x75, 0x62, 0x6c, 0x69, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x2e, 0x2e, 0x71,
|
||||
0x75, 0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x63,
|
||||
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x32, 0x50, 0x43, 0x68, 0x61,
|
||||
0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x1a, 0x2e, 0x2e, 0x71,
|
||||
0x75, 0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x63,
|
||||
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x32, 0x50, 0x43, 0x68, 0x61,
|
||||
0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x28, 0x01, 0x30, 0x01,
|
||||
0x42, 0x3a, 0x5a, 0x38, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69,
|
||||
0x62, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62,
|
||||
0x72, 0x69, 0x75, 0x6d, 0x2f, 0x6d, 0x6f, 0x6e, 0x6f, 0x72, 0x65, 0x70, 0x6f, 0x2f, 0x6e, 0x6f,
|
||||
0x64, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
0x65, 0x64, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x2a, 0x0a, 0x11, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x66,
|
||||
0x72, 0x61, 0x6d, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x04, 0x52, 0x0f, 0x66, 0x72, 0x6f, 0x6d, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x4e, 0x75, 0x6d, 0x62,
|
||||
0x65, 0x72, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x6f, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x6e,
|
||||
0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x74, 0x6f, 0x46,
|
||||
0x72, 0x61, 0x6d, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x5a, 0x0a, 0x16, 0x74, 0x72,
|
||||
0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x66, 0x72,
|
||||
0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x71, 0x75, 0x69,
|
||||
0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x63, 0x6c, 0x6f,
|
||||
0x63, 0x6b, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6c, 0x6f, 0x63, 0x6b, 0x46, 0x72, 0x61, 0x6d, 0x65,
|
||||
0x52, 0x14, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x6f, 0x63, 0x6b,
|
||||
0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x73,
|
||||
0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62, 0x72,
|
||||
0x69, 0x75, 0x6d, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x63, 0x65, 0x72, 0x65, 0x6d, 0x6f, 0x6e,
|
||||
0x79, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72,
|
||||
0x6f, 0x6f, 0x66, 0x73, 0x4d, 0x61, 0x70, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x12,
|
||||
0x4d, 0x0a, 0x08, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x31, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x6e,
|
||||
0x6f, 0x64, 0x65, 0x2e, 0x63, 0x65, 0x72, 0x65, 0x6d, 0x6f, 0x6e, 0x79, 0x2e, 0x70, 0x62, 0x2e,
|
||||
0x49, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x73, 0x4d, 0x61, 0x70, 0x52, 0x08, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xa5,
|
||||
0x01, 0x0a, 0x12, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x6f,
|
||||
0x66, 0x73, 0x4d, 0x61, 0x70, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x63,
|
||||
0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x66, 0x72, 0x61,
|
||||
0x6d, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f,
|
||||
0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x56,
|
||||
0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d,
|
||||
0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x63, 0x65, 0x72, 0x65, 0x6d, 0x6f, 0x6e, 0x79, 0x2e, 0x70,
|
||||
0x62, 0x2e, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69,
|
||||
0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x4d, 0x61, 0x70, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x69,
|
||||
0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x3e, 0x0a, 0x14, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x4d, 0x61, 0x70, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61,
|
||||
0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c,
|
||||
0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x7b, 0x0a, 0x17, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x4d, 0x61,
|
||||
0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x25, 0x0a, 0x0e,
|
||||
0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x03,
|
||||
0x20, 0x03, 0x28, 0x0c, 0x52, 0x0d, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73,
|
||||
0x68, 0x65, 0x73, 0x32, 0x89, 0x02, 0x0a, 0x0f, 0x43, 0x65, 0x72, 0x65, 0x6d, 0x6f, 0x6e, 0x79,
|
||||
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7e, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x6f,
|
||||
0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x53, 0x79, 0x6e, 0x63, 0x46, 0x72, 0x61, 0x6d,
|
||||
0x65, 0x73, 0x12, 0x2c, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d, 0x2e,
|
||||
0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6c,
|
||||
0x6f, 0x63, 0x6b, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x33, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x6e, 0x6f,
|
||||
0x64, 0x65, 0x2e, 0x63, 0x65, 0x72, 0x65, 0x6d, 0x6f, 0x6e, 0x79, 0x2e, 0x70, 0x62, 0x2e, 0x43,
|
||||
0x65, 0x72, 0x65, 0x6d, 0x6f, 0x6e, 0x79, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65,
|
||||
0x64, 0x53, 0x79, 0x6e, 0x63, 0x30, 0x01, 0x12, 0x76, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x75,
|
||||
0x62, 0x6c, 0x69, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x2e, 0x2e, 0x71, 0x75,
|
||||
0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x63, 0x68,
|
||||
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x32, 0x50, 0x43, 0x68, 0x61, 0x6e,
|
||||
0x6e, 0x65, 0x6c, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x1a, 0x2e, 0x2e, 0x71, 0x75,
|
||||
0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x63, 0x68,
|
||||
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x32, 0x50, 0x43, 0x68, 0x61, 0x6e,
|
||||
0x6e, 0x65, 0x6c, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x28, 0x01, 0x30, 0x01, 0x42,
|
||||
0x3a, 0x5a, 0x38, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62,
|
||||
0x72, 0x69, 0x75, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62, 0x72,
|
||||
0x69, 0x75, 0x6d, 0x2f, 0x6d, 0x6f, 0x6e, 0x6f, 0x72, 0x65, 0x70, 0x6f, 0x2f, 0x6e, 0x6f, 0x64,
|
||||
0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -135,6 +135,7 @@ message CeremonyPeer {
|
||||
bytes peer_id = 1;
|
||||
string multiaddr = 2;
|
||||
uint64 max_frame = 3;
|
||||
int64 timestamp = 4;
|
||||
}
|
||||
|
||||
message CeremonyCompressedSync {
|
||||
|
@ -332,6 +332,7 @@ type PeerInfo struct {
|
||||
PeerId []byte `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
|
||||
Multiaddrs []string `protobuf:"bytes,2,rep,name=multiaddrs,proto3" json:"multiaddrs,omitempty"`
|
||||
MaxFrame uint64 `protobuf:"varint,3,opt,name=max_frame,json=maxFrame,proto3" json:"max_frame,omitempty"`
|
||||
Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
|
||||
}
|
||||
|
||||
func (x *PeerInfo) Reset() {
|
||||
@ -387,6 +388,13 @@ func (x *PeerInfo) GetMaxFrame() uint64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *PeerInfo) GetTimestamp() int64 {
|
||||
if x != nil {
|
||||
return x.Timestamp
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type PeerInfoResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -591,68 +599,70 @@ var file_node_proto_rawDesc = []byte{
|
||||
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62,
|
||||
0x72, 0x69, 0x75, 0x6d, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x2e,
|
||||
0x70, 0x62, 0x2e, 0x43, 0x6c, 0x6f, 0x63, 0x6b, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x0a, 0x63,
|
||||
0x6c, 0x6f, 0x63, 0x6b, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x22, 0x60, 0x0a, 0x08, 0x50, 0x65, 0x65,
|
||||
0x6c, 0x6f, 0x63, 0x6b, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x22, 0x7e, 0x0a, 0x08, 0x50, 0x65, 0x65,
|
||||
0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e,
|
||||
0x0a, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x61, 0x64, 0x64, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03,
|
||||
0x28, 0x09, 0x52, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x61, 0x64, 0x64, 0x72, 0x73, 0x12, 0x1b,
|
||||
0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x04, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x22, 0xad, 0x01, 0x0a, 0x10,
|
||||
0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x3e, 0x0a, 0x09, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d,
|
||||
0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x65,
|
||||
0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x12, 0x59, 0x0a, 0x17, 0x75, 0x6e, 0x63, 0x6f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x76,
|
||||
0x65, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x03, 0x28,
|
||||
0x04, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74,
|
||||
0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
|
||||
0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xad, 0x01, 0x0a, 0x10, 0x50, 0x65,
|
||||
0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e,
|
||||
0x0a, 0x09, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x21, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x6e,
|
||||
0x6f, 0x64, 0x65, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x65, 0x65, 0x72,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x15, 0x75, 0x6e, 0x63, 0x6f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74,
|
||||
0x69, 0x76, 0x65, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x65, 0x0a, 0x0b, 0x4e,
|
||||
0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x65,
|
||||
0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x65, 0x65,
|
||||
0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x61, 0x64, 0x64, 0x72,
|
||||
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x61, 0x64,
|
||||
0x64, 0x72, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x73, 0x63, 0x6f, 0x72,
|
||||
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x70, 0x65, 0x65, 0x72, 0x53, 0x63, 0x6f,
|
||||
0x72, 0x65, 0x22, 0x5e, 0x0a, 0x13, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66,
|
||||
0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0c, 0x6e, 0x65, 0x74,
|
||||
0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x24, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x6e, 0x6f, 0x64,
|
||||
0x65, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72,
|
||||
0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x32, 0xaf, 0x03, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x12, 0x5f, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12,
|
||||
0x29, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x6e, 0x6f, 0x64,
|
||||
0x65, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x72, 0x61,
|
||||
0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x71, 0x75, 0x69,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x59,
|
||||
0x0a, 0x17, 0x75, 0x6e, 0x63, 0x6f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f,
|
||||
0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x21, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x6e, 0x6f, 0x64,
|
||||
0x65, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x52, 0x15, 0x75, 0x6e, 0x63, 0x6f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x76,
|
||||
0x65, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x65, 0x0a, 0x0b, 0x4e, 0x65, 0x74,
|
||||
0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72,
|
||||
0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49,
|
||||
0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x61, 0x64, 0x64, 0x72, 0x73, 0x18,
|
||||
0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x61, 0x64, 0x64, 0x72,
|
||||
0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x70, 0x65, 0x65, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x65,
|
||||
0x22, 0x5e, 0x0a, 0x13, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0c, 0x6e, 0x65, 0x74, 0x77, 0x6f,
|
||||
0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e,
|
||||
0x71, 0x75, 0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e,
|
||||
0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x32, 0xaf, 0x03, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x12, 0x5f, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x29, 0x2e,
|
||||
0x71, 0x75, 0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e,
|
||||
0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65,
|
||||
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69,
|
||||
0x62, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e,
|
||||
0x70, 0x62, 0x2e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x68, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x66,
|
||||
0x6f, 0x12, 0x2c, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x6e,
|
||||
0x6f, 0x64, 0x65, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x46,
|
||||
0x72, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x2a, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x6e, 0x6f, 0x64,
|
||||
0x65, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0b, 0x47,
|
||||
0x65, 0x74, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2b, 0x2e, 0x71, 0x75, 0x69,
|
||||
0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6e, 0x6f, 0x64,
|
||||
0x65, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x12, 0x2c, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d,
|
||||
0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65,
|
||||
0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x2a, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x6e,
|
||||
0x6f, 0x64, 0x65, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x72, 0x61, 0x6d,
|
||||
0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a,
|
||||
0x0b, 0x47, 0x65, 0x74, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2b, 0x2e, 0x71,
|
||||
0x75, 0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6e,
|
||||
0x6f, 0x64, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x71, 0x75, 0x69, 0x6c,
|
||||
0x69, 0x62, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6e, 0x6f, 0x64, 0x65,
|
||||
0x2e, 0x70, 0x62, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f,
|
||||
0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2e, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62, 0x72,
|
||||
0x69, 0x75, 0x6d, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x62,
|
||||
0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62, 0x72,
|
||||
0x69, 0x75, 0x6d, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x62,
|
||||
0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3a, 0x5a, 0x38, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x71,
|
||||
0x75, 0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x71, 0x75,
|
||||
0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d, 0x2f, 0x6d, 0x6f, 0x6e, 0x6f, 0x72, 0x65, 0x70,
|
||||
0x6f, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x65, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62,
|
||||
0x72, 0x69, 0x75, 0x6d, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70,
|
||||
0x62, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x12, 0x6e, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2e, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75,
|
||||
0x6d, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x47,
|
||||
0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75,
|
||||
0x6d, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x4e,
|
||||
0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x42, 0x3a, 0x5a, 0x38, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x71, 0x75, 0x69,
|
||||
0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x71, 0x75, 0x69, 0x6c,
|
||||
0x69, 0x62, 0x72, 0x69, 0x75, 0x6d, 0x2f, 0x6d, 0x6f, 0x6e, 0x6f, 0x72, 0x65, 0x70, 0x6f, 0x2f,
|
||||
0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0x62, 0x06,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -35,6 +35,7 @@ message PeerInfo {
|
||||
bytes peer_id = 1;
|
||||
repeated string multiaddrs = 2;
|
||||
uint64 max_frame = 3;
|
||||
int64 timestamp = 4;
|
||||
}
|
||||
|
||||
message PeerInfoResponse {
|
||||
|
Loading…
Reference in New Issue
Block a user