From a523edcb2a8394fa252c97f2768e922961c9dfc4 Mon Sep 17 00:00:00 2001 From: Cassandra Heart <7929478+CassOnMars@users.noreply.github.com> Date: Sun, 3 Mar 2024 21:20:24 -0600 Subject: [PATCH] v1.4.1 (#94) --- node/app/db_console.go | 4 +- node/app/node.go | 5 + node/consensus/consensus_engine.go | 2 +- node/consensus/master/broadcast_messaging.go | 2 +- .../master/master_clock_consensus_engine.go | 49 ++ node/consensus/time/data_time_reel.go | 219 +++---- node/consensus/time/data_time_reel_test.go | 2 +- node/main.go | 3 +- node/p2p/blossomsub.go | 7 +- node/protobufs/node.pb.go | 547 +++++++++++++++--- node/protobufs/node.pb.gw.go | 85 +++ node/protobufs/node.proto | 47 ++ node/protobufs/node_grpc.pb.go | 49 +- node/protobufs/protobufs.go | 2 +- node/rpc/rpc_server.go | 11 + 15 files changed, 824 insertions(+), 210 deletions(-) diff --git a/node/app/db_console.go b/node/app/db_console.go index ec26bbf..718eb72 100644 --- a/node/app/db_console.go +++ b/node/app/db_console.go @@ -887,11 +887,11 @@ func logoVersion(width int) string { out += " ''---.. ...---'' ##\n" out += " ''----------''\n" out += " \n" - out += " Quilibrium Node - v1.4.0 – Sunset\n" + out += " Quilibrium Node - v1.4.1 – Sunset\n" out += " \n" out += " DB Console\n" } else { - out = "Quilibrium Node - v1.4.0 – Sunset - DB Console\n" + out = "Quilibrium Node - v1.4.1 – Sunset - DB Console\n" } return out } diff --git a/node/app/node.go b/node/app/node.go index ce9b1fe..0a88b13 100644 --- a/node/app/node.go +++ b/node/app/node.go @@ -5,6 +5,7 @@ import ( "go.uber.org/zap" "source.quilibrium.com/quilibrium/monorepo/node/consensus" + "source.quilibrium.com/quilibrium/monorepo/node/consensus/master" "source.quilibrium.com/quilibrium/monorepo/node/execution" "source.quilibrium.com/quilibrium/monorepo/node/execution/intrinsics/ceremony" "source.quilibrium.com/quilibrium/monorepo/node/keys" @@ -83,6 +84,10 @@ func (n *Node) GetPubSub() p2p.PubSub { return n.pubSub } +func (n *Node) GetMasterClock() *master.MasterClockConsensusEngine { + return n.engine.(*master.MasterClockConsensusEngine) +} + func (n *Node) GetExecutionEngines() []execution.ExecutionEngine { list := []execution.ExecutionEngine{} for _, e := range n.execEngines { diff --git a/node/consensus/consensus_engine.go b/node/consensus/consensus_engine.go index 79f2066..9541380 100644 --- a/node/consensus/consensus_engine.go +++ b/node/consensus/consensus_engine.go @@ -59,5 +59,5 @@ func GetMinimumVersion() []byte { } func GetVersion() []byte { - return []byte{0x01, 0x04, 0x00} + return []byte{0x01, 0x04, 0x01} } diff --git a/node/consensus/master/broadcast_messaging.go b/node/consensus/master/broadcast_messaging.go index 4f9db16..f030f80 100644 --- a/node/consensus/master/broadcast_messaging.go +++ b/node/consensus/master/broadcast_messaging.go @@ -146,7 +146,7 @@ func (e *MasterClockConsensusEngine) handleSelfTestReport( } e.peerMapMx.Lock() - if _, ok := e.peerMap[string(peerID)]; !ok { + if _, ok := e.peerMap[string(peerID)]; ok { e.peerMapMx.Unlock() return nil } diff --git a/node/consensus/master/master_clock_consensus_engine.go b/node/consensus/master/master_clock_consensus_engine.go index 3c512ac..af86e15 100644 --- a/node/consensus/master/master_clock_consensus_engine.go +++ b/node/consensus/master/master_clock_consensus_engine.go @@ -3,6 +3,7 @@ package master import ( "context" "encoding/hex" + "math/big" "sync" "time" @@ -280,6 +281,54 @@ func (e *MasterClockConsensusEngine) Stop(force bool) <-chan error { return errChan } +func ( + e *MasterClockConsensusEngine, +) GetPeerManifests() *protobufs.PeerManifestsResponse { + response := &protobufs.PeerManifestsResponse{ + PeerManifests: []*protobufs.PeerManifest{}, + } + e.peerMapMx.Lock() + for peerId, peerManifest := range e.peerMap { + peerId := peerId + peerManifest := peerManifest + manifest := &protobufs.PeerManifest{ + PeerId: []byte(peerId), + Difficulty: peerManifest.Difficulty, + DifficultyMetric: peerManifest.DifficultyMetric, + Commit_16Metric: peerManifest.Commit_16Metric, + Commit_128Metric: peerManifest.Commit_128Metric, + Commit_1024Metric: peerManifest.Commit_1024Metric, + Commit_65536Metric: peerManifest.Commit_65536Metric, + Proof_16Metric: peerManifest.Proof_16Metric, + Proof_128Metric: peerManifest.Proof_128Metric, + Proof_1024Metric: peerManifest.Proof_1024Metric, + Proof_65536Metric: peerManifest.Proof_65536Metric, + Cores: peerManifest.Cores, + Memory: new(big.Int).SetBytes(peerManifest.Memory).Bytes(), + Storage: new(big.Int).SetBytes(peerManifest.Storage).Bytes(), + } + + for _, capability := range peerManifest.Capabilities { + metadata := make([]byte, len(capability.AdditionalMetadata)) + copy(metadata[:], capability.AdditionalMetadata[:]) + manifest.Capabilities = append( + manifest.Capabilities, + &protobufs.Capability{ + ProtocolIdentifier: capability.ProtocolIdentifier, + AdditionalMetadata: metadata, + }, + ) + } + + response.PeerManifests = append( + response.PeerManifests, + manifest, + ) + } + e.peerMapMx.Unlock() + return response +} + func (e *MasterClockConsensusEngine) GetDifficulty() uint32 { return e.difficulty } diff --git a/node/consensus/time/data_time_reel.go b/node/consensus/time/data_time_reel.go index 52710fa..2c74e0a 100644 --- a/node/consensus/time/data_time_reel.go +++ b/node/consensus/time/data_time_reel.go @@ -34,6 +34,7 @@ var unknownDistance = new(big.Int).SetBytes([]byte{ type pendingFrame struct { selector *big.Int parentSelector *big.Int + frameNumber uint64 } type DataTimeReel struct { @@ -57,7 +58,7 @@ type DataTimeReel struct { proverTrie *tries.RollingFrecencyCritbitTrie pending map[uint64][]*pendingFrame incompleteForks map[uint64][]*pendingFrame - frames chan *protobufs.ClockFrame + frames chan *pendingFrame newFrameCh chan *protobufs.ClockFrame badFrameCh chan *protobufs.ClockFrame done chan bool @@ -111,7 +112,7 @@ func NewDataTimeReel( lruFrames: cache, pending: make(map[uint64][]*pendingFrame), incompleteForks: make(map[uint64][]*pendingFrame), - frames: make(chan *protobufs.ClockFrame), + frames: make(chan *pendingFrame), newFrameCh: make(chan *protobufs.ClockFrame), badFrameCh: make(chan *protobufs.ClockFrame), done: make(chan bool), @@ -168,8 +169,22 @@ func (d *DataTimeReel) Insert(frame *protobufs.ClockFrame) error { d.lruFrames.Add(string(frame.Output[:64]), string(frame.ParentSelector)) + parent := new(big.Int).SetBytes(frame.ParentSelector) + selector, err := frame.GetSelector() + if err != nil { + panic(err) + } + + distance, _ := d.GetDistance(frame) + + d.storePending(selector, parent, distance, frame) + go func() { - d.frames <- frame + d.frames <- &pendingFrame{ + selector: selector, + parentSelector: parent, + frameNumber: frame.FrameNumber, + } }() return nil @@ -251,24 +266,14 @@ func (d *DataTimeReel) runLoop() { for { select { case frame := <-d.frames: - d.logger.Debug( - "processing frame", - zap.Uint64("frame_number", frame.FrameNumber), - zap.String("output_tag", hex.EncodeToString(frame.Output[:64])), - zap.Uint64("head_number", d.head.FrameNumber), - zap.String("head_output_tag", hex.EncodeToString(d.head.Output[:64])), - ) // Most common scenario: in order – new frame is higher number - if d.head.FrameNumber < frame.FrameNumber { + if d.head.FrameNumber < frame.frameNumber { d.logger.Debug("frame is higher") - parent := new(big.Int).SetBytes(frame.ParentSelector) - selector, err := frame.GetSelector() - if err != nil { - panic(err) - } - - distance, err := d.GetDistance(frame) + // tag: equinox – master filter changes + _, err := d.clockStore.GetMasterClockFrame( + allBitmaskFilter, + frame.frameNumber) if err != nil { d.logger.Debug("no master, add pending") @@ -279,7 +284,7 @@ func (d *DataTimeReel) runLoop() { panic(err) } - d.addPending(selector, parent, distance, frame) + d.addPending(frame.selector, frame.parentSelector, frame.frameNumber) d.processPending(d.head, frame) continue } @@ -289,58 +294,84 @@ func (d *DataTimeReel) runLoop() { panic(err) } + rawFrame, err := d.clockStore.GetParentDataClockFrame( + d.filter, + frame.frameNumber, + frame.selector.FillBytes(make([]byte, 32)), + false, + ) + if err != nil { + panic(err) + } + + distance, err := d.GetDistance(rawFrame) + if err != nil { + panic(err) + } + // If the frame has a gap from the head or is not descendent, mark it as // pending: - if frame.FrameNumber-d.head.FrameNumber != 1 || - parent.Cmp(headSelector) != 0 { + if frame.frameNumber-d.head.FrameNumber != 1 || + frame.parentSelector.Cmp(headSelector) != 0 { d.logger.Debug( "frame has has gap or is non-descendent, fork choice", - zap.Bool("has_gap", frame.FrameNumber-d.head.FrameNumber != 1), - zap.String("parent_selector", parent.Text(16)), + zap.Bool("has_gap", frame.frameNumber-d.head.FrameNumber != 1), + zap.String("parent_selector", frame.parentSelector.Text(16)), zap.String("head_selector", headSelector.Text(16)), ) - d.forkChoice(frame, distance) + d.forkChoice(rawFrame, distance) d.processPending(d.head, frame) continue } // Otherwise set it as the next and process all pending - d.setHead(frame, distance) + d.setHead(rawFrame, distance) d.processPending(d.head, frame) - } else if d.head.FrameNumber == frame.FrameNumber { + } else if d.head.FrameNumber == frame.frameNumber { // frames are equivalent, no need to act - if bytes.Equal(d.head.Output, frame.Output) { + headSelector, err := d.head.GetSelector() + if err != nil { + panic(err) + } + + if headSelector.Cmp(frame.selector) == 0 { d.logger.Debug("equivalent frame") d.processPending(d.head, frame) continue } - distance, err := d.GetDistance(frame) + rawFrame, err := d.clockStore.GetParentDataClockFrame( + d.filter, + frame.frameNumber, + frame.selector.FillBytes(make([]byte, 32)), + false, + ) + if err != nil { + panic(err) + } + + distance, err := d.GetDistance(rawFrame) if err != nil { panic(err) } - d.logger.Debug( - "frame is same height", - zap.String("head_distance", d.headDistance.Text(16)), - zap.String("distance", distance.Text(16)), - ) // Optimization: if competing frames share a parent we can short-circuit // fork choice - if bytes.Equal(d.head.ParentSelector, frame.ParentSelector) && - distance.Cmp(d.headDistance) < 0 { + if new(big.Int).SetBytes(d.head.ParentSelector).Cmp( + frame.parentSelector, + ) == 0 && distance.Cmp(d.headDistance) < 0 { d.logger.Debug( "frame shares parent, has shorter distance, short circuit", ) d.totalDistance.Sub(d.totalDistance, d.headDistance) - d.setHead(frame, distance) + d.setHead(rawFrame, distance) d.processPending(d.head, frame) continue } // Choose fork - d.forkChoice(frame, distance) + d.forkChoice(rawFrame, distance) d.processPending(d.head, frame) } else { d.logger.Debug("frame is lower height") @@ -349,7 +380,7 @@ func (d *DataTimeReel) runLoop() { // thrashing existing, _, err := d.clockStore.GetDataClockFrame( d.filter, - frame.FrameNumber, + frame.frameNumber, true, ) if err != nil { @@ -358,22 +389,17 @@ func (d *DataTimeReel) runLoop() { panic(err) } + existingSelector, err := existing.GetSelector() + if err != nil { + panic(err) + } + // It's a fork, but it's behind. We need to stash it until it catches // up (or dies off) - if !bytes.Equal(existing.Output, frame.Output) { + if existingSelector.Cmp(frame.selector) != 0 { d.logger.Debug("is fork, add pending") - distance, err := d.GetDistance(frame) - if err != nil { - panic(err) - } - - parent, selector, err := frame.GetParentAndSelector() - if err != nil { - panic(err) - } - - d.addPending(selector, parent, distance, frame) + d.addPending(frame.selector, frame.parentSelector, frame.frameNumber) d.processPending(d.head, frame) } } @@ -386,25 +412,23 @@ func (d *DataTimeReel) runLoop() { func (d *DataTimeReel) addPending( selector *big.Int, parent *big.Int, - distance *big.Int, - frame *protobufs.ClockFrame, + frameNumber uint64, ) { d.logger.Debug( "add pending", zap.Uint64("head_frame_number", d.head.FrameNumber), - zap.Uint64("add_frame_number", frame.FrameNumber), + zap.Uint64("add_frame_number", frameNumber), zap.String("selector", selector.Text(16)), zap.String("parent", parent.Text(16)), - zap.String("distance", distance.Text(16)), ) - if d.head.FrameNumber <= frame.FrameNumber { - if _, ok := d.pending[frame.FrameNumber]; !ok { - d.pending[frame.FrameNumber] = []*pendingFrame{} + if d.head.FrameNumber <= frameNumber { + if _, ok := d.pending[frameNumber]; !ok { + d.pending[frameNumber] = []*pendingFrame{} } // avoid heavy thrashing - for _, frame := range d.pending[frame.FrameNumber] { + for _, frame := range d.pending[frameNumber] { if frame.selector.Cmp(selector) == 0 { d.logger.Debug("exists in pending already") return @@ -412,6 +436,29 @@ func (d *DataTimeReel) addPending( } } + if d.head.FrameNumber <= frameNumber { + d.logger.Debug( + "accumulate in pending", + zap.Int("pending_neighbors", len(d.pending[frameNumber])), + ) + + d.pending[frameNumber] = append( + d.pending[frameNumber], + &pendingFrame{ + selector: selector, + parentSelector: parent, + frameNumber: frameNumber, + }, + ) + } +} + +func (d *DataTimeReel) storePending( + selector *big.Int, + parent *big.Int, + distance *big.Int, + frame *protobufs.ClockFrame, +) { // avoid db thrashing if existing, err := d.clockStore.GetParentDataClockFrame( frame.Filter, @@ -446,26 +493,11 @@ func (d *DataTimeReel) addPending( panic(err) } } - - if d.head.FrameNumber <= frame.FrameNumber { - d.logger.Debug( - "accumulate in pending", - zap.Int("pending_neighbors", len(d.pending[frame.FrameNumber])), - ) - - d.pending[frame.FrameNumber] = append( - d.pending[frame.FrameNumber], - &pendingFrame{ - selector: selector, - parentSelector: parent, - }, - ) - } } func (d *DataTimeReel) processPending( frame *protobufs.ClockFrame, - lastReceived *protobufs.ClockFrame, + lastReceived *pendingFrame, ) { d.logger.Debug( "process pending", @@ -484,10 +516,7 @@ func (d *DataTimeReel) processPending( return frameNumbers[i] > frameNumbers[j] }) - lastSelector, err := lastReceived.GetSelector() - if err != nil { - panic(err) - } + lastSelector := lastReceived.selector for _, f := range frameNumbers { if f < d.head.FrameNumber { @@ -514,7 +543,7 @@ func (d *DataTimeReel) processPending( d.logger.Debug("try process next") next := nextPending[0] d.pending[f] = d.pending[f][1:] - if f == lastReceived.FrameNumber && next.selector.Cmp(lastSelector) == 0 { + if f == lastReceived.frameNumber && next.selector.Cmp(lastSelector) == 0 { d.pending[f] = append(d.pending[f], next) if len(d.pending[f]) == 1 { nextPending = nil @@ -522,28 +551,10 @@ func (d *DataTimeReel) processPending( continue } - nextFrame, err := d.clockStore.GetParentDataClockFrame( - d.filter, - f, - next.selector.FillBytes(make([]byte, 32)), - false, - ) - if err != nil && !errors.Is(err, store.ErrNotFound) { - panic(err) - } - if nextFrame != nil { - d.logger.Debug("next found, send frame back in") - go func() { - d.frames <- nextFrame - }() - return - } - - if len(d.pending[f]) == 0 { - d.logger.Debug("last next processing, clear list") - delete(d.pending, f) - nextPending = nil - } + go func() { + d.frames <- next + }() + return } } } @@ -690,7 +701,7 @@ func (d *DataTimeReel) forkChoice( if err != nil { // If lineage cannot be verified, set it for later if errors.Is(err, store.ErrNotFound) { - d.addPending(selector, parentSelector, distance, frame) + d.addPending(selector, parentSelector, frame.FrameNumber) return } else { panic(err) @@ -753,7 +764,7 @@ func (d *DataTimeReel) forkChoice( if err != nil { // If lineage cannot be verified, set it for later if errors.Is(err, store.ErrNotFound) { - d.addPending(selector, parentSelector, distance, frame) + d.addPending(selector, parentSelector, frame.FrameNumber) return } else { panic(err) @@ -787,7 +798,7 @@ func (d *DataTimeReel) forkChoice( zap.String("right_total", rightTotal.Text(16)), zap.String("left_total", overweight.Text(16)), ) - d.addPending(selector, parentSelector, distance, frame) + d.addPending(selector, parentSelector, frame.FrameNumber) return } diff --git a/node/consensus/time/data_time_reel_test.go b/node/consensus/time/data_time_reel_test.go index 19854bc..91efad7 100644 --- a/node/consensus/time/data_time_reel_test.go +++ b/node/consensus/time/data_time_reel_test.go @@ -107,7 +107,7 @@ func generateTestProvers() ( } func TestDataTimeReel(t *testing.T) { - logger, _ := zap.NewProduction() + logger, _ := zap.NewDevelopment() db := store.NewInMemKVDB() clockStore := store.NewPebbleClockStore(db, logger) prover := qcrypto.NewWesolowskiFrameProver(logger) diff --git a/node/main.go b/node/main.go index 05845f4..214d7f3 100644 --- a/node/main.go +++ b/node/main.go @@ -180,6 +180,7 @@ func main() { node.GetClockStore(), node.GetKeyManager(), node.GetPubSub(), + node.GetMasterClock(), node.GetExecutionEngines(), ) if err != nil { @@ -494,5 +495,5 @@ func printLogo() { func printVersion() { fmt.Println(" ") - fmt.Println(" Quilibrium Node - v1.4.0 – Sunset") + fmt.Println(" Quilibrium Node - v1.4.1 – Sunset") } diff --git a/node/p2p/blossomsub.go b/node/p2p/blossomsub.go index a86f26f..c66a716 100644 --- a/node/p2p/blossomsub.go +++ b/node/p2p/blossomsub.go @@ -297,7 +297,7 @@ func initDHT( logger.Info("establishing dht") var kademliaDHT *dht.IpfsDHT var err error - if !isBootstrapPeer { + if isBootstrapPeer { kademliaDHT, err = dht.New(ctx, h, dht.Mode(dht.ModeServer)) } else { kademliaDHT, err = dht.New(ctx, h, dht.Mode(dht.ModeAuto)) @@ -327,6 +327,11 @@ func initDHT( wg.Add(1) go func() { defer wg.Done() + if peerinfo.ID == h.ID() || + h.Network().Connectedness(peerinfo.ID) == network.Connected { + return + } + if err := h.Connect(ctx, *peerinfo); err != nil { logger.Info("error while connecting to dht peer", zap.Error(err)) } else { diff --git a/node/protobufs/node.pb.go b/node/protobufs/node.pb.go index b6b0c66..8f0e14f 100644 --- a/node/protobufs/node.pb.go +++ b/node/protobufs/node.pb.go @@ -1263,6 +1263,272 @@ func (x *ValidationMessage) GetValidation() []byte { return nil } +type GetPeerManifestsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetPeerManifestsRequest) Reset() { + *x = GetPeerManifestsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_node_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPeerManifestsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPeerManifestsRequest) ProtoMessage() {} + +func (x *GetPeerManifestsRequest) ProtoReflect() protoreflect.Message { + mi := &file_node_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPeerManifestsRequest.ProtoReflect.Descriptor instead. +func (*GetPeerManifestsRequest) Descriptor() ([]byte, []int) { + return file_node_proto_rawDescGZIP(), []int{20} +} + +type PeerManifest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PeerId []byte `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` + // The difficulty the self test was conducted under + Difficulty uint32 `protobuf:"varint,2,opt,name=difficulty,proto3" json:"difficulty,omitempty"` + // The resulting local time of computing the VDF test under the difficulty + DifficultyMetric int64 `protobuf:"varint,3,opt,name=difficulty_metric,json=difficultyMetric,proto3" json:"difficulty_metric,omitempty"` + // The resulting local time of computing a KZG commitment for a 16 degree + // polynomial + Commit_16Metric int64 `protobuf:"varint,4,opt,name=commit_16_metric,json=commit16Metric,proto3" json:"commit_16_metric,omitempty"` + // The resulting local time of computing a KZG commitment for a 128 degree + // polynomial + Commit_128Metric int64 `protobuf:"varint,5,opt,name=commit_128_metric,json=commit128Metric,proto3" json:"commit_128_metric,omitempty"` + // The resulting local time of computing a KZG commitment for a 1024 degree + // polynomial + Commit_1024Metric int64 `protobuf:"varint,6,opt,name=commit_1024_metric,json=commit1024Metric,proto3" json:"commit_1024_metric,omitempty"` + // The resulting local time of computing a KZG commitment for a 65536 degree + // polynomial + Commit_65536Metric int64 `protobuf:"varint,7,opt,name=commit_65536_metric,json=commit65536Metric,proto3" json:"commit_65536_metric,omitempty"` + // The resulting local time of computing a KZG proof for a 16 degree + // polynomial + Proof_16Metric int64 `protobuf:"varint,8,opt,name=proof_16_metric,json=proof16Metric,proto3" json:"proof_16_metric,omitempty"` + // The resulting local time of computing a KZG proof for a 128 degree + // polynomial + Proof_128Metric int64 `protobuf:"varint,9,opt,name=proof_128_metric,json=proof128Metric,proto3" json:"proof_128_metric,omitempty"` + // The resulting local time of computing a KZG proof for a 1024 degree + // polynomial + Proof_1024Metric int64 `protobuf:"varint,10,opt,name=proof_1024_metric,json=proof1024Metric,proto3" json:"proof_1024_metric,omitempty"` + // The resulting local time of computing a KZG proof for a 65536 degree + // polynomial + Proof_65536Metric int64 `protobuf:"varint,11,opt,name=proof_65536_metric,json=proof65536Metric,proto3" json:"proof_65536_metric,omitempty"` + // The number of reported accessible cores + Cores uint32 `protobuf:"varint,12,opt,name=cores,proto3" json:"cores,omitempty"` + // The total available memory + Memory []byte `protobuf:"bytes,13,opt,name=memory,proto3" json:"memory,omitempty"` + // The total available storage + Storage []byte `protobuf:"bytes,14,opt,name=storage,proto3" json:"storage,omitempty"` + // The list of supported capabilities + Capabilities []*Capability `protobuf:"bytes,15,rep,name=capabilities,proto3" json:"capabilities,omitempty"` +} + +func (x *PeerManifest) Reset() { + *x = PeerManifest{} + if protoimpl.UnsafeEnabled { + mi := &file_node_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PeerManifest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PeerManifest) ProtoMessage() {} + +func (x *PeerManifest) ProtoReflect() protoreflect.Message { + mi := &file_node_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PeerManifest.ProtoReflect.Descriptor instead. +func (*PeerManifest) Descriptor() ([]byte, []int) { + return file_node_proto_rawDescGZIP(), []int{21} +} + +func (x *PeerManifest) GetPeerId() []byte { + if x != nil { + return x.PeerId + } + return nil +} + +func (x *PeerManifest) GetDifficulty() uint32 { + if x != nil { + return x.Difficulty + } + return 0 +} + +func (x *PeerManifest) GetDifficultyMetric() int64 { + if x != nil { + return x.DifficultyMetric + } + return 0 +} + +func (x *PeerManifest) GetCommit_16Metric() int64 { + if x != nil { + return x.Commit_16Metric + } + return 0 +} + +func (x *PeerManifest) GetCommit_128Metric() int64 { + if x != nil { + return x.Commit_128Metric + } + return 0 +} + +func (x *PeerManifest) GetCommit_1024Metric() int64 { + if x != nil { + return x.Commit_1024Metric + } + return 0 +} + +func (x *PeerManifest) GetCommit_65536Metric() int64 { + if x != nil { + return x.Commit_65536Metric + } + return 0 +} + +func (x *PeerManifest) GetProof_16Metric() int64 { + if x != nil { + return x.Proof_16Metric + } + return 0 +} + +func (x *PeerManifest) GetProof_128Metric() int64 { + if x != nil { + return x.Proof_128Metric + } + return 0 +} + +func (x *PeerManifest) GetProof_1024Metric() int64 { + if x != nil { + return x.Proof_1024Metric + } + return 0 +} + +func (x *PeerManifest) GetProof_65536Metric() int64 { + if x != nil { + return x.Proof_65536Metric + } + return 0 +} + +func (x *PeerManifest) GetCores() uint32 { + if x != nil { + return x.Cores + } + return 0 +} + +func (x *PeerManifest) GetMemory() []byte { + if x != nil { + return x.Memory + } + return nil +} + +func (x *PeerManifest) GetStorage() []byte { + if x != nil { + return x.Storage + } + return nil +} + +func (x *PeerManifest) GetCapabilities() []*Capability { + if x != nil { + return x.Capabilities + } + return nil +} + +type PeerManifestsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PeerManifests []*PeerManifest `protobuf:"bytes,1,rep,name=peer_manifests,json=peerManifests,proto3" json:"peer_manifests,omitempty"` +} + +func (x *PeerManifestsResponse) Reset() { + *x = PeerManifestsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_node_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PeerManifestsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PeerManifestsResponse) ProtoMessage() {} + +func (x *PeerManifestsResponse) ProtoReflect() protoreflect.Message { + mi := &file_node_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PeerManifestsResponse.ProtoReflect.Descriptor instead. +func (*PeerManifestsResponse) Descriptor() ([]byte, []int) { + return file_node_proto_rawDescGZIP(), []int{22} +} + +func (x *PeerManifestsResponse) GetPeerManifests() []*PeerManifest { + if x != nil { + return x.PeerManifests + } + return nil +} + var File_node_proto protoreflect.FileDescriptor var file_node_proto_rawDesc = []byte{ @@ -1433,55 +1699,109 @@ var file_node_proto_rawDesc = []byte{ 0x74, 0x69, 0x65, 0x73, 0x22, 0x33, 0x0a, 0x11, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x80, 0x01, 0x0a, 0x11, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x6b, 0x0a, 0x11, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 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, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 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, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x80, 0x05, 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, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x19, 0x0a, 0x17, 0x47, 0x65, 0x74, + 0x50, 0x65, 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x22, 0xe5, 0x04, 0x0a, 0x0c, 0x50, 0x65, 0x65, 0x72, 0x4d, 0x61, 0x6e, + 0x69, 0x66, 0x65, 0x73, 0x74, 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, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x2b, + 0x0a, 0x11, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x5f, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x64, 0x69, 0x66, 0x66, 0x69, + 0x63, 0x75, 0x6c, 0x74, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x28, 0x0a, 0x10, 0x63, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x31, 0x36, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x31, 0x36, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, + 0x31, 0x32, 0x38, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x31, 0x32, 0x38, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x12, 0x2c, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x31, 0x30, 0x32, 0x34, + 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x63, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x31, 0x30, 0x32, 0x34, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, + 0x2e, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x36, 0x35, 0x35, 0x33, 0x36, 0x5f, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x36, 0x35, 0x35, 0x33, 0x36, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, + 0x26, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x31, 0x36, 0x5f, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x31, + 0x36, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x28, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x6f, 0x66, + 0x5f, 0x31, 0x32, 0x38, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x31, 0x32, 0x38, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x12, 0x2a, 0x0a, 0x11, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x31, 0x30, 0x32, 0x34, 0x5f, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x70, 0x72, + 0x6f, 0x6f, 0x66, 0x31, 0x30, 0x32, 0x34, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x2c, 0x0a, + 0x12, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x36, 0x35, 0x35, 0x33, 0x36, 0x5f, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x70, 0x72, 0x6f, 0x6f, 0x66, + 0x36, 0x35, 0x35, 0x33, 0x36, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x63, + 0x6f, 0x72, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x72, 0x65, + 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x12, 0x47, 0x0a, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x69, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 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, + 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0c, + 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0x65, 0x0a, 0x15, + 0x50, 0x65, 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0e, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x6d, 0x61, + 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 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, 0x65, - 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 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, 0x4e, 0x6f, 0x64, 0x65, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x71, 0x75, 0x69, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x69, + 0x66, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x70, 0x65, 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, + 0x73, 0x74, 0x73, 0x32, 0x80, 0x01, 0x0a, 0x11, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6b, 0x0a, 0x11, 0x50, 0x65, 0x72, + 0x66, 0x6f, 0x72, 0x6d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 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, 0x4e, 0x6f, 0x64, 0x65, 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, + 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0xf6, 0x05, 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, 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, 0x12, 0x68, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2c, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, + 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, - 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 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, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, + 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, 0x65, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4e, + 0x6f, 0x64, 0x65, 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, 0x4e, 0x6f, 0x64, 0x65, 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, 0x4e, + 0x6f, 0x64, 0x65, 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, 0x12, + 0x68, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 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, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 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, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x74, 0x0a, 0x10, 0x47, 0x65, 0x74, + 0x50, 0x65, 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x73, 0x12, 0x30, 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, 0x4d, + 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 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, 0x50, 0x65, 0x65, 0x72, 0x4d, 0x61, + 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xcf, 0x01, 0x0a, 0x09, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x60, 0x0a, 0x0b, 0x50, 0x75, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2b, 0x2e, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6e, @@ -1514,62 +1834,69 @@ func file_node_proto_rawDescGZIP() []byte { return file_node_proto_rawDescData } -var file_node_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_node_proto_msgTypes = make([]protoimpl.MessageInfo, 23) var file_node_proto_goTypes = []interface{}{ - (*GetFramesRequest)(nil), // 0: quilibrium.node.node.pb.GetFramesRequest - (*GetFrameInfoRequest)(nil), // 1: quilibrium.node.node.pb.GetFrameInfoRequest - (*GetPeerInfoRequest)(nil), // 2: quilibrium.node.node.pb.GetPeerInfoRequest - (*GetNodeInfoRequest)(nil), // 3: quilibrium.node.node.pb.GetNodeInfoRequest - (*GetNetworkInfoRequest)(nil), // 4: quilibrium.node.node.pb.GetNetworkInfoRequest - (*FramesResponse)(nil), // 5: quilibrium.node.node.pb.FramesResponse - (*FrameInfoResponse)(nil), // 6: quilibrium.node.node.pb.FrameInfoResponse - (*PeerInfo)(nil), // 7: quilibrium.node.node.pb.PeerInfo - (*PeerInfoResponse)(nil), // 8: quilibrium.node.node.pb.PeerInfoResponse - (*NetworkInfo)(nil), // 9: quilibrium.node.node.pb.NetworkInfo - (*NodeInfoResponse)(nil), // 10: quilibrium.node.node.pb.NodeInfoResponse - (*PutPeerInfoRequest)(nil), // 11: quilibrium.node.node.pb.PutPeerInfoRequest - (*PutNodeInfoRequest)(nil), // 12: quilibrium.node.node.pb.PutNodeInfoRequest - (*PutResponse)(nil), // 13: quilibrium.node.node.pb.PutResponse - (*NetworkInfoResponse)(nil), // 14: quilibrium.node.node.pb.NetworkInfoResponse - (*GetTokenInfoRequest)(nil), // 15: quilibrium.node.node.pb.GetTokenInfoRequest - (*TokenInfoResponse)(nil), // 16: quilibrium.node.node.pb.TokenInfoResponse - (*Capability)(nil), // 17: quilibrium.node.node.pb.Capability - (*SelfTestReport)(nil), // 18: quilibrium.node.node.pb.SelfTestReport - (*ValidationMessage)(nil), // 19: quilibrium.node.node.pb.ValidationMessage - (*ClockFrame)(nil), // 20: quilibrium.node.clock.pb.ClockFrame + (*GetFramesRequest)(nil), // 0: quilibrium.node.node.pb.GetFramesRequest + (*GetFrameInfoRequest)(nil), // 1: quilibrium.node.node.pb.GetFrameInfoRequest + (*GetPeerInfoRequest)(nil), // 2: quilibrium.node.node.pb.GetPeerInfoRequest + (*GetNodeInfoRequest)(nil), // 3: quilibrium.node.node.pb.GetNodeInfoRequest + (*GetNetworkInfoRequest)(nil), // 4: quilibrium.node.node.pb.GetNetworkInfoRequest + (*FramesResponse)(nil), // 5: quilibrium.node.node.pb.FramesResponse + (*FrameInfoResponse)(nil), // 6: quilibrium.node.node.pb.FrameInfoResponse + (*PeerInfo)(nil), // 7: quilibrium.node.node.pb.PeerInfo + (*PeerInfoResponse)(nil), // 8: quilibrium.node.node.pb.PeerInfoResponse + (*NetworkInfo)(nil), // 9: quilibrium.node.node.pb.NetworkInfo + (*NodeInfoResponse)(nil), // 10: quilibrium.node.node.pb.NodeInfoResponse + (*PutPeerInfoRequest)(nil), // 11: quilibrium.node.node.pb.PutPeerInfoRequest + (*PutNodeInfoRequest)(nil), // 12: quilibrium.node.node.pb.PutNodeInfoRequest + (*PutResponse)(nil), // 13: quilibrium.node.node.pb.PutResponse + (*NetworkInfoResponse)(nil), // 14: quilibrium.node.node.pb.NetworkInfoResponse + (*GetTokenInfoRequest)(nil), // 15: quilibrium.node.node.pb.GetTokenInfoRequest + (*TokenInfoResponse)(nil), // 16: quilibrium.node.node.pb.TokenInfoResponse + (*Capability)(nil), // 17: quilibrium.node.node.pb.Capability + (*SelfTestReport)(nil), // 18: quilibrium.node.node.pb.SelfTestReport + (*ValidationMessage)(nil), // 19: quilibrium.node.node.pb.ValidationMessage + (*GetPeerManifestsRequest)(nil), // 20: quilibrium.node.node.pb.GetPeerManifestsRequest + (*PeerManifest)(nil), // 21: quilibrium.node.node.pb.PeerManifest + (*PeerManifestsResponse)(nil), // 22: quilibrium.node.node.pb.PeerManifestsResponse + (*ClockFrame)(nil), // 23: quilibrium.node.clock.pb.ClockFrame } var file_node_proto_depIdxs = []int32{ - 20, // 0: quilibrium.node.node.pb.FramesResponse.truncated_clock_frames:type_name -> quilibrium.node.clock.pb.ClockFrame - 20, // 1: quilibrium.node.node.pb.FrameInfoResponse.clock_frame:type_name -> quilibrium.node.clock.pb.ClockFrame + 23, // 0: quilibrium.node.node.pb.FramesResponse.truncated_clock_frames:type_name -> quilibrium.node.clock.pb.ClockFrame + 23, // 1: quilibrium.node.node.pb.FrameInfoResponse.clock_frame:type_name -> quilibrium.node.clock.pb.ClockFrame 7, // 2: quilibrium.node.node.pb.PeerInfoResponse.peer_info:type_name -> quilibrium.node.node.pb.PeerInfo 7, // 3: quilibrium.node.node.pb.PeerInfoResponse.uncooperative_peer_info:type_name -> quilibrium.node.node.pb.PeerInfo 7, // 4: quilibrium.node.node.pb.PutPeerInfoRequest.peer_info:type_name -> quilibrium.node.node.pb.PeerInfo 7, // 5: quilibrium.node.node.pb.PutPeerInfoRequest.uncooperative_peer_info:type_name -> quilibrium.node.node.pb.PeerInfo 9, // 6: quilibrium.node.node.pb.NetworkInfoResponse.network_info:type_name -> quilibrium.node.node.pb.NetworkInfo 17, // 7: quilibrium.node.node.pb.SelfTestReport.capabilities:type_name -> quilibrium.node.node.pb.Capability - 19, // 8: quilibrium.node.node.pb.ValidationService.PerformValidation:input_type -> quilibrium.node.node.pb.ValidationMessage - 0, // 9: quilibrium.node.node.pb.NodeService.GetFrames:input_type -> quilibrium.node.node.pb.GetFramesRequest - 1, // 10: quilibrium.node.node.pb.NodeService.GetFrameInfo:input_type -> quilibrium.node.node.pb.GetFrameInfoRequest - 2, // 11: quilibrium.node.node.pb.NodeService.GetPeerInfo:input_type -> quilibrium.node.node.pb.GetPeerInfoRequest - 3, // 12: quilibrium.node.node.pb.NodeService.GetNodeInfo:input_type -> quilibrium.node.node.pb.GetNodeInfoRequest - 4, // 13: quilibrium.node.node.pb.NodeService.GetNetworkInfo:input_type -> quilibrium.node.node.pb.GetNetworkInfoRequest - 15, // 14: quilibrium.node.node.pb.NodeService.GetTokenInfo:input_type -> quilibrium.node.node.pb.GetTokenInfoRequest - 12, // 15: quilibrium.node.node.pb.NodeStats.PutNodeInfo:input_type -> quilibrium.node.node.pb.PutNodeInfoRequest - 11, // 16: quilibrium.node.node.pb.NodeStats.PutPeerInfo:input_type -> quilibrium.node.node.pb.PutPeerInfoRequest - 19, // 17: quilibrium.node.node.pb.ValidationService.PerformValidation:output_type -> quilibrium.node.node.pb.ValidationMessage - 5, // 18: quilibrium.node.node.pb.NodeService.GetFrames:output_type -> quilibrium.node.node.pb.FramesResponse - 6, // 19: quilibrium.node.node.pb.NodeService.GetFrameInfo:output_type -> quilibrium.node.node.pb.FrameInfoResponse - 8, // 20: quilibrium.node.node.pb.NodeService.GetPeerInfo:output_type -> quilibrium.node.node.pb.PeerInfoResponse - 10, // 21: quilibrium.node.node.pb.NodeService.GetNodeInfo:output_type -> quilibrium.node.node.pb.NodeInfoResponse - 14, // 22: quilibrium.node.node.pb.NodeService.GetNetworkInfo:output_type -> quilibrium.node.node.pb.NetworkInfoResponse - 16, // 23: quilibrium.node.node.pb.NodeService.GetTokenInfo:output_type -> quilibrium.node.node.pb.TokenInfoResponse - 13, // 24: quilibrium.node.node.pb.NodeStats.PutNodeInfo:output_type -> quilibrium.node.node.pb.PutResponse - 13, // 25: quilibrium.node.node.pb.NodeStats.PutPeerInfo:output_type -> quilibrium.node.node.pb.PutResponse - 17, // [17:26] is the sub-list for method output_type - 8, // [8:17] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 17, // 8: quilibrium.node.node.pb.PeerManifest.capabilities:type_name -> quilibrium.node.node.pb.Capability + 21, // 9: quilibrium.node.node.pb.PeerManifestsResponse.peer_manifests:type_name -> quilibrium.node.node.pb.PeerManifest + 19, // 10: quilibrium.node.node.pb.ValidationService.PerformValidation:input_type -> quilibrium.node.node.pb.ValidationMessage + 0, // 11: quilibrium.node.node.pb.NodeService.GetFrames:input_type -> quilibrium.node.node.pb.GetFramesRequest + 1, // 12: quilibrium.node.node.pb.NodeService.GetFrameInfo:input_type -> quilibrium.node.node.pb.GetFrameInfoRequest + 2, // 13: quilibrium.node.node.pb.NodeService.GetPeerInfo:input_type -> quilibrium.node.node.pb.GetPeerInfoRequest + 3, // 14: quilibrium.node.node.pb.NodeService.GetNodeInfo:input_type -> quilibrium.node.node.pb.GetNodeInfoRequest + 4, // 15: quilibrium.node.node.pb.NodeService.GetNetworkInfo:input_type -> quilibrium.node.node.pb.GetNetworkInfoRequest + 15, // 16: quilibrium.node.node.pb.NodeService.GetTokenInfo:input_type -> quilibrium.node.node.pb.GetTokenInfoRequest + 20, // 17: quilibrium.node.node.pb.NodeService.GetPeerManifests:input_type -> quilibrium.node.node.pb.GetPeerManifestsRequest + 12, // 18: quilibrium.node.node.pb.NodeStats.PutNodeInfo:input_type -> quilibrium.node.node.pb.PutNodeInfoRequest + 11, // 19: quilibrium.node.node.pb.NodeStats.PutPeerInfo:input_type -> quilibrium.node.node.pb.PutPeerInfoRequest + 19, // 20: quilibrium.node.node.pb.ValidationService.PerformValidation:output_type -> quilibrium.node.node.pb.ValidationMessage + 5, // 21: quilibrium.node.node.pb.NodeService.GetFrames:output_type -> quilibrium.node.node.pb.FramesResponse + 6, // 22: quilibrium.node.node.pb.NodeService.GetFrameInfo:output_type -> quilibrium.node.node.pb.FrameInfoResponse + 8, // 23: quilibrium.node.node.pb.NodeService.GetPeerInfo:output_type -> quilibrium.node.node.pb.PeerInfoResponse + 10, // 24: quilibrium.node.node.pb.NodeService.GetNodeInfo:output_type -> quilibrium.node.node.pb.NodeInfoResponse + 14, // 25: quilibrium.node.node.pb.NodeService.GetNetworkInfo:output_type -> quilibrium.node.node.pb.NetworkInfoResponse + 16, // 26: quilibrium.node.node.pb.NodeService.GetTokenInfo:output_type -> quilibrium.node.node.pb.TokenInfoResponse + 22, // 27: quilibrium.node.node.pb.NodeService.GetPeerManifests:output_type -> quilibrium.node.node.pb.PeerManifestsResponse + 13, // 28: quilibrium.node.node.pb.NodeStats.PutNodeInfo:output_type -> quilibrium.node.node.pb.PutResponse + 13, // 29: quilibrium.node.node.pb.NodeStats.PutPeerInfo:output_type -> quilibrium.node.node.pb.PutResponse + 20, // [20:30] is the sub-list for method output_type + 10, // [10:20] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_node_proto_init() } @@ -1819,6 +2146,42 @@ func file_node_proto_init() { return nil } } + file_node_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPeerManifestsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_node_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PeerManifest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_node_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PeerManifestsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -1826,7 +2189,7 @@ func file_node_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_node_proto_rawDesc, NumEnums: 0, - NumMessages: 20, + NumMessages: 23, NumExtensions: 0, NumServices: 3, }, diff --git a/node/protobufs/node.pb.gw.go b/node/protobufs/node.pb.gw.go index 6205058..b75fb58 100644 --- a/node/protobufs/node.pb.gw.go +++ b/node/protobufs/node.pb.gw.go @@ -269,6 +269,40 @@ func local_request_NodeService_GetTokenInfo_0(ctx context.Context, marshaler run } +func request_NodeService_GetPeerManifests_0(ctx context.Context, marshaler runtime.Marshaler, client NodeServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPeerManifestsRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetPeerManifests(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_NodeService_GetPeerManifests_0(ctx context.Context, marshaler runtime.Marshaler, server NodeServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPeerManifestsRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetPeerManifests(ctx, &protoReq) + return msg, metadata, err + +} + func request_NodeStats_PutNodeInfo_0(ctx context.Context, marshaler runtime.Marshaler, client NodeStatsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq PutNodeInfoRequest var metadata runtime.ServerMetadata @@ -527,6 +561,31 @@ func RegisterNodeServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("POST", pattern_NodeService_GetPeerManifests_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/quilibrium.node.node.pb.NodeService/GetPeerManifests", runtime.WithHTTPPathPattern("/quilibrium.node.node.pb.NodeService/GetPeerManifests")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_NodeService_GetPeerManifests_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_NodeService_GetPeerManifests_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -830,6 +889,28 @@ func RegisterNodeServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("POST", pattern_NodeService_GetPeerManifests_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/quilibrium.node.node.pb.NodeService/GetPeerManifests", runtime.WithHTTPPathPattern("/quilibrium.node.node.pb.NodeService/GetPeerManifests")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_NodeService_GetPeerManifests_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_NodeService_GetPeerManifests_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -845,6 +926,8 @@ var ( pattern_NodeService_GetNetworkInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"quilibrium.node.node.pb.NodeService", "GetNetworkInfo"}, "")) pattern_NodeService_GetTokenInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"quilibrium.node.node.pb.NodeService", "GetTokenInfo"}, "")) + + pattern_NodeService_GetPeerManifests_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"quilibrium.node.node.pb.NodeService", "GetPeerManifests"}, "")) ) var ( @@ -859,6 +942,8 @@ var ( forward_NodeService_GetNetworkInfo_0 = runtime.ForwardResponseMessage forward_NodeService_GetTokenInfo_0 = runtime.ForwardResponseMessage + + forward_NodeService_GetPeerManifests_0 = runtime.ForwardResponseMessage ) // RegisterNodeStatsHandlerFromEndpoint is same as RegisterNodeStatsHandler but diff --git a/node/protobufs/node.proto b/node/protobufs/node.proto index d740066..4a2602b 100644 --- a/node/protobufs/node.proto +++ b/node/protobufs/node.proto @@ -162,6 +162,52 @@ service ValidationService { rpc PerformValidation(ValidationMessage) returns (ValidationMessage); } +message GetPeerManifestsRequest {} + +message PeerManifest { + bytes peer_id = 1; + // The difficulty the self test was conducted under + uint32 difficulty = 2; + // The resulting local time of computing the VDF test under the difficulty + int64 difficulty_metric = 3; + // The resulting local time of computing a KZG commitment for a 16 degree + // polynomial + int64 commit_16_metric = 4; + // The resulting local time of computing a KZG commitment for a 128 degree + // polynomial + int64 commit_128_metric = 5; + // The resulting local time of computing a KZG commitment for a 1024 degree + // polynomial + int64 commit_1024_metric = 6; + // The resulting local time of computing a KZG commitment for a 65536 degree + // polynomial + int64 commit_65536_metric = 7; + // The resulting local time of computing a KZG proof for a 16 degree + // polynomial + int64 proof_16_metric = 8; + // The resulting local time of computing a KZG proof for a 128 degree + // polynomial + int64 proof_128_metric = 9; + // The resulting local time of computing a KZG proof for a 1024 degree + // polynomial + int64 proof_1024_metric = 10; + // The resulting local time of computing a KZG proof for a 65536 degree + // polynomial + int64 proof_65536_metric = 11; + // The number of reported accessible cores + uint32 cores = 12; + // The total available memory + bytes memory = 13; + // The total available storage + bytes storage = 14; + // The list of supported capabilities + repeated Capability capabilities = 15; +} + +message PeerManifestsResponse { + repeated PeerManifest peer_manifests = 1; +} + service NodeService { rpc GetFrames(GetFramesRequest) returns (FramesResponse); rpc GetFrameInfo(GetFrameInfoRequest) returns (FrameInfoResponse); @@ -169,6 +215,7 @@ service NodeService { rpc GetNodeInfo(GetNodeInfoRequest) returns (NodeInfoResponse); rpc GetNetworkInfo(GetNetworkInfoRequest) returns (NetworkInfoResponse); rpc GetTokenInfo(GetTokenInfoRequest) returns (TokenInfoResponse); + rpc GetPeerManifests(GetPeerManifestsRequest) returns (PeerManifestsResponse); } service NodeStats { diff --git a/node/protobufs/node_grpc.pb.go b/node/protobufs/node_grpc.pb.go index 1d5fe7a..9ffa13f 100644 --- a/node/protobufs/node_grpc.pb.go +++ b/node/protobufs/node_grpc.pb.go @@ -109,12 +109,13 @@ var ValidationService_ServiceDesc = grpc.ServiceDesc{ } const ( - NodeService_GetFrames_FullMethodName = "/quilibrium.node.node.pb.NodeService/GetFrames" - NodeService_GetFrameInfo_FullMethodName = "/quilibrium.node.node.pb.NodeService/GetFrameInfo" - NodeService_GetPeerInfo_FullMethodName = "/quilibrium.node.node.pb.NodeService/GetPeerInfo" - NodeService_GetNodeInfo_FullMethodName = "/quilibrium.node.node.pb.NodeService/GetNodeInfo" - NodeService_GetNetworkInfo_FullMethodName = "/quilibrium.node.node.pb.NodeService/GetNetworkInfo" - NodeService_GetTokenInfo_FullMethodName = "/quilibrium.node.node.pb.NodeService/GetTokenInfo" + NodeService_GetFrames_FullMethodName = "/quilibrium.node.node.pb.NodeService/GetFrames" + NodeService_GetFrameInfo_FullMethodName = "/quilibrium.node.node.pb.NodeService/GetFrameInfo" + NodeService_GetPeerInfo_FullMethodName = "/quilibrium.node.node.pb.NodeService/GetPeerInfo" + NodeService_GetNodeInfo_FullMethodName = "/quilibrium.node.node.pb.NodeService/GetNodeInfo" + NodeService_GetNetworkInfo_FullMethodName = "/quilibrium.node.node.pb.NodeService/GetNetworkInfo" + NodeService_GetTokenInfo_FullMethodName = "/quilibrium.node.node.pb.NodeService/GetTokenInfo" + NodeService_GetPeerManifests_FullMethodName = "/quilibrium.node.node.pb.NodeService/GetPeerManifests" ) // NodeServiceClient is the client API for NodeService service. @@ -127,6 +128,7 @@ type NodeServiceClient interface { GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*NodeInfoResponse, error) GetNetworkInfo(ctx context.Context, in *GetNetworkInfoRequest, opts ...grpc.CallOption) (*NetworkInfoResponse, error) GetTokenInfo(ctx context.Context, in *GetTokenInfoRequest, opts ...grpc.CallOption) (*TokenInfoResponse, error) + GetPeerManifests(ctx context.Context, in *GetPeerManifestsRequest, opts ...grpc.CallOption) (*PeerManifestsResponse, error) } type nodeServiceClient struct { @@ -191,6 +193,15 @@ func (c *nodeServiceClient) GetTokenInfo(ctx context.Context, in *GetTokenInfoRe return out, nil } +func (c *nodeServiceClient) GetPeerManifests(ctx context.Context, in *GetPeerManifestsRequest, opts ...grpc.CallOption) (*PeerManifestsResponse, error) { + out := new(PeerManifestsResponse) + err := c.cc.Invoke(ctx, NodeService_GetPeerManifests_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // NodeServiceServer is the server API for NodeService service. // All implementations must embed UnimplementedNodeServiceServer // for forward compatibility @@ -201,6 +212,7 @@ type NodeServiceServer interface { GetNodeInfo(context.Context, *GetNodeInfoRequest) (*NodeInfoResponse, error) GetNetworkInfo(context.Context, *GetNetworkInfoRequest) (*NetworkInfoResponse, error) GetTokenInfo(context.Context, *GetTokenInfoRequest) (*TokenInfoResponse, error) + GetPeerManifests(context.Context, *GetPeerManifestsRequest) (*PeerManifestsResponse, error) mustEmbedUnimplementedNodeServiceServer() } @@ -226,6 +238,9 @@ func (UnimplementedNodeServiceServer) GetNetworkInfo(context.Context, *GetNetwor func (UnimplementedNodeServiceServer) GetTokenInfo(context.Context, *GetTokenInfoRequest) (*TokenInfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetTokenInfo not implemented") } +func (UnimplementedNodeServiceServer) GetPeerManifests(context.Context, *GetPeerManifestsRequest) (*PeerManifestsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPeerManifests not implemented") +} func (UnimplementedNodeServiceServer) mustEmbedUnimplementedNodeServiceServer() {} // UnsafeNodeServiceServer may be embedded to opt out of forward compatibility for this service. @@ -347,6 +362,24 @@ func _NodeService_GetTokenInfo_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _NodeService_GetPeerManifests_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPeerManifestsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NodeServiceServer).GetPeerManifests(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NodeService_GetPeerManifests_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NodeServiceServer).GetPeerManifests(ctx, req.(*GetPeerManifestsRequest)) + } + return interceptor(ctx, in, info, handler) +} + // NodeService_ServiceDesc is the grpc.ServiceDesc for NodeService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -378,6 +411,10 @@ var NodeService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetTokenInfo", Handler: _NodeService_GetTokenInfo_Handler, }, + { + MethodName: "GetPeerManifests", + Handler: _NodeService_GetPeerManifests_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "node.proto", diff --git a/node/protobufs/protobufs.go b/node/protobufs/protobufs.go index be79120..91236b3 100644 --- a/node/protobufs/protobufs.go +++ b/node/protobufs/protobufs.go @@ -8,7 +8,7 @@ const ( ClockPrefix = NamespacePrefix + "clock.pb." KeysPrefix = NamespacePrefix + "keys.pb." CeremonyPrefix = NamespacePrefix + "ceremony.pb." - NodePrefix = NamespacePrefix + "node.pb" + NodePrefix = NamespacePrefix + "node.pb." CeremonyTranscriptType = CeremonyPrefix + "CeremonyTranscript" CeremonyLobbyStateType = CeremonyPrefix + "CeremonyLobbyState" CeremonySeenProverAttestationType = CeremonyPrefix + "CeremonySeenProverAttestation" diff --git a/node/rpc/rpc_server.go b/node/rpc/rpc_server.go index b5d4c22..87c554b 100644 --- a/node/rpc/rpc_server.go +++ b/node/rpc/rpc_server.go @@ -17,6 +17,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/reflection" + "source.quilibrium.com/quilibrium/monorepo/node/consensus/master" "source.quilibrium.com/quilibrium/monorepo/node/execution" "source.quilibrium.com/quilibrium/monorepo/node/execution/intrinsics/ceremony/application" "source.quilibrium.com/quilibrium/monorepo/node/keys" @@ -34,6 +35,7 @@ type RPCServer struct { clockStore store.ClockStore keyManager keys.KeyManager pubSub p2p.PubSub + masterClock *master.MasterClockConsensusEngine executionEngines []execution.ExecutionEngine } @@ -450,6 +452,13 @@ func (r *RPCServer) GetTokenInfo( }, nil } +func (r *RPCServer) GetPeerManifest( + ctx context.Context, + req *protobufs.GetPeerManifestsRequest, +) (*protobufs.PeerManifestsResponse, error) { + return r.masterClock.GetPeerManifests(), nil +} + func NewRPCServer( listenAddrGRPC string, listenAddrHTTP string, @@ -457,6 +466,7 @@ func NewRPCServer( clockStore store.ClockStore, keyManager keys.KeyManager, pubSub p2p.PubSub, + masterClock *master.MasterClockConsensusEngine, executionEngines []execution.ExecutionEngine, ) (*RPCServer, error) { return &RPCServer{ @@ -466,6 +476,7 @@ func NewRPCServer( clockStore: clockStore, keyManager: keyManager, pubSub: pubSub, + masterClock: masterClock, executionEngines: executionEngines, }, nil }