func (msg *P2PBasicMsg) GetNodePubKey() []byte {
	return msg.NodePubKey
}
GetNodePubKey - in older versions <= v0.7.0
returns pubkey that is unmarshallable to p2pID secp pubkey
Post v0.7.0 this returns a pubkey that is unmarshallable to common.Point{}
package dkgnode
import (
	"context"
	"errors"
	"fmt"
	"io/ioutil"
	"math/big"
	"time"
	pcmn "github.com/torusresearch/torus-node/common"
	"github.com/torusresearch/torus-node/telemetry"
	libp2p "github.com/libp2p/go-libp2p"
	libp2pcrypto "github.com/libp2p/go-libp2p-core/crypto"
	"github.com/libp2p/go-libp2p-core/helpers"
	"github.com/libp2p/go-libp2p-core/host"
	inet "github.com/libp2p/go-libp2p-core/network"
	"github.com/libp2p/go-libp2p-core/peer"
	pstore "github.com/libp2p/go-libp2p-core/peerstore"
	"github.com/libp2p/go-libp2p-core/protocol"
	ma "github.com/multiformats/go-multiaddr"
	logging "github.com/sirupsen/logrus"
	"github.com/torusresearch/bijson"
	"github.com/torusresearch/torus-common/common"
	"github.com/torusresearch/torus-common/crypto"
	"github.com/torusresearch/torus-node/config"
	"github.com/torusresearch/torus-node/eventbus"
	"github.com/torusresearch/torus-node/tcontext"
	"github.com/torusresearch/torus-node/version"
)
var p2pServiceLibrary ServiceLibrary
type P2PMessage interface {
	GetTimestamp() big.Int
	GetId() string
	GetGossip() bool
	GetNodeId() string
	GetNodePubKey() []byte
	GetSign() []byte
	SetSign(sig []byte)
	GetMsgType() string
	GetPayload() []byte
	GetSerializedBody() []byte
}
type p2pMessageVersion string
func CreateP2PBasicMsg(r P2PBasicMsgRaw) P2PBasicMsg {
	return P2PBasicMsg{
		Version:    p2pMessageVersion(version.NodeVersion),
		Timestamp:  r.Timestamp,
		Id:         r.Id,
		Gossip:     r.Gossip,
		NodeId:     r.NodeId,
		NodePubKey: r.NodePubKey,
		Sign:       r.Sign,
		MsgType:    r.MsgType,
		Payload:    r.Payload,
	}
}
type P2PBasicMsgRaw struct {
	Timestamp  big.Int
	Id         string
	Gossip     bool
	NodeId     string
	NodePubKey []byte
	Sign       []byte
	MsgType    string
	Payload    []byte
}
type P2PBasicMsg struct {
	Version    p2pMessageVersion `json:"version,omitempty"`
	Timestamp  big.Int           `json:"timestamp,omitempty"`   
	Id         string            `json:"id,omitempty"`          
	Gossip     bool              `json:"gossip,omitempty"`      
	NodeId     string            `json:"nodeId,omitempty"`      
	NodePubKey []byte            `json:"nodePubKey,omitempty"`  
	Sign       []byte            `json:"sign,omitempty"`        
	MsgType    string            `json:"msgtype,omitempty"`     
	Payload    []byte            `json:"payload"`               
}
type P2PSuite struct {
	host.Host
	HostAddress ma.Multiaddr
	PingProto   *PingProtocol
}
func (msg *P2PBasicMsg) GetTimestamp() big.Int {
	return msg.Timestamp
}
func (msg *P2PBasicMsg) GetId() string {
	return msg.Id
}
func (msg *P2PBasicMsg) GetGossip() bool {
	return msg.Gossip
}
func (msg *P2PBasicMsg) GetNodeId() string {
	return msg.NodeId
}