blocknetdx / blocknet

Official Blocknet cryptocurrency wallet
https://www.blocknet.org
MIT License
214 stars 94 forks source link

[feature] simplify service node ping p2p message #589

Open rikublock opened 3 years ago

rikublock commented 3 years ago

The ServiceNodePing (snp) message currently contains a lot of duplicate information. The entire service node object snode is being serialized and broadcasted.

Current ServiceNodePing structure:

    CPubKey snodePubKey;
    uint32_t bestBlock{0};
    uint256 bestBlockHash;
    uint32_t pingTime{0};
    std::string config;
    ServiceNode snode;
    std::vector<unsigned char> signature;

Additionally, the entire service node config is broadcasted with every ping, even though it rarely changes.

Here three things a proposed: