mirror of
https://github.com/oxen-io/oxen-core.git
synced 2023-12-14 02:22:56 +01:00
ce9d0a9c1e
Improves the oxend<->storage server communications protocol: - pass storage server HTTPS port as part of the storage server ping (which already carries the also-required OMQ port) rather than needing to provide it when starting up oxend. --storage-server-port is now obsolete (and ignored, if specified). - Fix up the internal API to use `storage_https_port` and `storage_omq_port` rather than `storage_port` and `storage_lmq_port`. - Redo and the SS ping RPC endpoint so that it is less verbose and more closely matches the lokinet endpoint; instead of: { "version_major": 2, "version_minor": 0, "version_patch": 9, "storage_lmq_port": 22222 } we now expect: { "version": [2,0,9], "https_port": 11111, "omq_port": 22222 } - Tweaks the (not-yet-released) SS proof key names: "s"->"shp" and "slp"->"sop"
41 lines
1.2 KiB
C++
41 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include "service_node_list.h"
|
|
#include "../cryptonote_protocol/cryptonote_protocol_defs.h"
|
|
#include <oxenmq/bt_serialize.h>
|
|
|
|
namespace uptime_proof
|
|
{
|
|
|
|
class Proof
|
|
{
|
|
|
|
public:
|
|
std::array<uint16_t, 3> version;
|
|
std::array<uint16_t, 3> storage_server_version;
|
|
std::array<uint16_t, 3> lokinet_version;
|
|
|
|
uint64_t timestamp;
|
|
crypto::public_key pubkey;
|
|
crypto::signature sig;
|
|
crypto::ed25519_public_key pubkey_ed25519;
|
|
crypto::ed25519_signature sig_ed25519;
|
|
uint32_t public_ip;
|
|
uint16_t storage_https_port;
|
|
uint16_t storage_omq_port;
|
|
uint16_t qnet_port;
|
|
|
|
Proof() = default;
|
|
Proof(uint32_t sn_public_ip, uint16_t sn_storage_https_port, uint16_t sn_storage_omq_port, std::array<uint16_t, 3> ss_version, uint16_t quorumnet_port, std::array<uint16_t, 3> lokinet_version, const service_nodes::service_node_keys& keys);
|
|
|
|
Proof(const std::string& serialized_proof);
|
|
oxenmq::bt_dict bt_encode_uptime_proof() const;
|
|
|
|
crypto::hash hash_uptime_proof() const;
|
|
|
|
cryptonote::NOTIFY_BTENCODED_UPTIME_PROOF::request generate_request() const;
|
|
};
|
|
|
|
}
|
|
bool operator==(const uptime_proof::Proof& lhs, const uptime_proof::Proof& rhs);
|
|
bool operator!=(const uptime_proof::Proof& lhs, const uptime_proof::Proof& rhs);
|