github.com/amazechain/amc@v0.1.3/api/protocol/msg_proto/msg.proto (about) 1 // Copyright 2022 The AmazeChain Authors 2 // This file is part of the AmazeChain library. 3 // 4 // The AmazeChain library is free software: you can redistribute it and/or modify 5 // it under the terms of the GNU Lesser General Public License as published by 6 // the Free Software Foundation, either version 3 of the License, or 7 // (at your option) any later version. 8 // 9 // The AmazeChain library is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // GNU Lesser General Public License for more details. 13 // 14 // You should have received a copy of the GNU Lesser General Public License 15 // along with the AmazeChain library. If not, see <http://www.gnu.org/licenses/>. 16 17 syntax = "proto3"; 18 package msg_proto; 19 20 import "types_pb/types.proto"; 21 option go_package = "github.com/amazechain/amc/api/protocol/msg_proto"; 22 23 message MessageData { 24 string clientVersion = 2; //client version 25 int64 timestamp = 3; //unix time 26 string id = 4; // message id hash256(payload) 27 string nodeID = 5; //id of peer that created the message, not the peer that may have send it. 28 bytes nodePubKey = 6; // peer public key 29 bytes sign = 7; // signature of message data 30 bytes payload = 8; // payload 31 bool gossip = 9; 32 } 33 34 message NewBlockMessageData { 35 types_pb.H256 hash = 1 ; 36 types_pb.H256 Number = 2; 37 types_pb.Block block = 3; 38 } 39 40 message ProtocolHandshakeMessage { 41 string version = 1; 42 types_pb.H256 genesisHash = 2; 43 types_pb.H256 currentHeight = 3; 44 } 45 46 47 message TopicScoreSnapshot { 48 // Time a peer has spent in the gossip mesh. 49 uint64 time_in_mesh = 1; 50 // This is the number of first message deliveries in the topic. 51 float first_message_deliveries = 2; 52 // This is the number of message deliveries in the mesh, within the MeshMessageDeliveriesWindow of 53 // message validation.It effectively tracks first and near-first 54 // deliveries, ie a message seen from a mesh peer before we have forwarded it to them. 55 float mesh_message_deliveries = 3; 56 // This is the number of invalid messages in the topic from the peer. 57 float invalid_message_deliveries = 4; 58 }