Monero
Classes | Namespaces | Macros | Typedefs | Functions | Variables
levin_notify.cpp File Reference
#include "levin_notify.h"
#include <boost/asio/steady_timer.hpp>
#include <boost/system/system_error.hpp>
#include <boost/uuid/uuid_io.hpp>
#include <chrono>
#include <deque>
#include <stdexcept>
#include <utility>
#include "common/expect.h"
#include "common/varint.h"
#include "cryptonote_config.h"
#include "crypto/crypto.h"
#include "crypto/duration.h"
#include "cryptonote_basic/connection_context.h"
#include "cryptonote_core/i_core_events.h"
#include "cryptonote_protocol/cryptonote_protocol_defs.h"
#include "net/dandelionpp.h"
#include "p2p/net_node.h"
Include dependency graph for levin_notify.cpp:

Classes

struct  cryptonote::levin::anonymous_namespace{levin_notify.cpp}::noise_channel
 A queue of levin messages for a noise i2p/tor link. More...
 
struct  cryptonote::levin::detail::zone
 
class  cryptonote::levin::anonymous_namespace{levin_notify.cpp}::queue_covert_notify
 Adds a message to the sending queue of the channel. More...
 
struct  cryptonote::levin::anonymous_namespace{levin_notify.cpp}::fluff_flush
 Sends txs on connections with expired timers, and queues callback for next timer expiration (if any). More...
 
struct  cryptonote::levin::anonymous_namespace{levin_notify.cpp}::fluff_notify
 
struct  cryptonote::levin::anonymous_namespace{levin_notify.cpp}::update_channel
 Updates the connection for a channel. More...
 
struct  cryptonote::levin::anonymous_namespace{levin_notify.cpp}::update_channels
 Merges out_connections_ into the existing zone_->map. More...
 
struct  cryptonote::levin::anonymous_namespace{levin_notify.cpp}::dandelionpp_notify
 Checks fluff status for this node, and then does stem or fluff for txes. More...
 
class  cryptonote::levin::anonymous_namespace{levin_notify.cpp}::change_channels
 Swaps out noise/dandelionpp channels entirely; new epoch start. More...
 
struct  cryptonote::levin::anonymous_namespace{levin_notify.cpp}::send_noise
 Sends a noise packet or real notification and sets timer for next call. More...
 
struct  cryptonote::levin::anonymous_namespace{levin_notify.cpp}::start_epoch
 Prepares connections for new channel/dandelionpp epoch and sets timer for next epoch. More...
 

Namespaces

 anonymous_namespace{levin_notify.cpp}
 
 cryptonote
 Holds cryptonote related classes and helpers.
 
 cryptonote::levin
 
 cryptonote::levin::anonymous_namespace{levin_notify.cpp}
 
 cryptonote::levin::detail
 

Macros

#define MONERO_DEFAULT_LOG_CATEGORY   "net.p2p.tx"
 

Typedefs

using cryptonote::levin::anonymous_namespace{levin_notify.cpp}::fluff_stepsize = std::chrono::duration< std::chrono::milliseconds::rep, std::ratio< 1, 4 > >
 
using cryptonote::levin::anonymous_namespace{levin_notify.cpp}::fluff_duration = crypto::random_poisson_subseconds::result_type
 

Functions

int anonymous_namespace{levin_notify.cpp}::get_command_from_message (const cryptonote::blobdata &msg)
 
std::chrono::steady_clock::duration cryptonote::levin::anonymous_namespace{levin_notify.cpp}::random_duration (std::chrono::steady_clock::duration range)
 
uint64_t cryptonote::levin::anonymous_namespace{levin_notify.cpp}::get_median_remote_height (connections &p2p)
 
uint64_t cryptonote::levin::anonymous_namespace{levin_notify.cpp}::get_blockchain_height (connections &p2p, const i_core_events *core)
 
std::vector< boost::uuids::uuid > cryptonote::levin::anonymous_namespace{levin_notify.cpp}::get_out_connections (connections &p2p, uint64_t blockchain_height)
 
std::vector< boost::uuids::uuid > cryptonote::levin::anonymous_namespace{levin_notify.cpp}::get_out_connections (connections &p2p, const i_core_events *core)
 
std::string cryptonote::levin::anonymous_namespace{levin_notify.cpp}::make_tx_payload (std::vector< blobdata > &&txs, const bool pad, const bool fluff)
 
bool cryptonote::levin::anonymous_namespace{levin_notify.cpp}::make_payload_send_txs (connections &p2p, std::vector< blobdata > &&txs, const boost::uuids::uuid &destination, const bool pad, const bool fluff)
 

Variables

constexpr const std::size_t cryptonote::levin::anonymous_namespace{levin_notify.cpp}::connection_id_reserve_size = 100
 
constexpr const std::chrono::minutes cryptonote::levin::anonymous_namespace{levin_notify.cpp}::noise_min_epoch {CRYPTONOTE_NOISE_MIN_EPOCH}
 
constexpr const std::chrono::seconds cryptonote::levin::anonymous_namespace{levin_notify.cpp}::noise_epoch_range {CRYPTONOTE_NOISE_EPOCH_RANGE}
 
constexpr const std::chrono::minutes cryptonote::levin::anonymous_namespace{levin_notify.cpp}::dandelionpp_min_epoch {CRYPTONOTE_DANDELIONPP_MIN_EPOCH}
 
constexpr const std::chrono::seconds cryptonote::levin::anonymous_namespace{levin_notify.cpp}::dandelionpp_epoch_range {CRYPTONOTE_DANDELIONPP_EPOCH_RANGE}
 
constexpr const std::chrono::seconds cryptonote::levin::anonymous_namespace{levin_notify.cpp}::noise_min_delay {CRYPTONOTE_NOISE_MIN_DELAY}
 
constexpr const std::chrono::seconds cryptonote::levin::anonymous_namespace{levin_notify.cpp}::noise_delay_range {CRYPTONOTE_NOISE_DELAY_RANGE}
 
constexpr const std::chrono::seconds cryptonote::levin::anonymous_namespace{levin_notify.cpp}::fluff_average_in {CRYPTONOTE_DANDELIONPP_FLUSH_AVERAGE}
 
constexpr const fluff_duration cryptonote::levin::anonymous_namespace{levin_notify.cpp}::fluff_average_out {fluff_duration{fluff_average_in} / 2}
 

Macro Definition Documentation

◆ MONERO_DEFAULT_LOG_CATEGORY

#define MONERO_DEFAULT_LOG_CATEGORY   "net.p2p.tx"