mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
feat: improve squelching configuration (#5438)
This commit introduces the following changes: * Renames `vp_enable config` option to `vp_base_squelch_enable` to enable squelching for validators. * Removes `vp_squelch` config option which was used to configure whether to send squelch messages to peers or not. With this flag removed, if squelching is enabled, squelch messages will be sent. This was an option used for debugging. * Introduces a temporary `vp_base_squelch_max_trusted_peers` config option to change the max number of peers who are selected as validator message sources. This is a temporary option, which will be removed once a good value is found. * Adds a traffic counter to count the number of times peers ignored squelch messages and kept sending messages for squelched validators. * Moves the decision whether squelching is enabled and ready into Slot.h.
This commit is contained in:
@@ -473,17 +473,14 @@ public:
|
||||
Config c;
|
||||
std::stringstream str;
|
||||
str << "[reduce_relay]\n"
|
||||
<< "vp_enable=1\n"
|
||||
<< "vp_squelch=1\n"
|
||||
<< "vp_base_squelch_enable=1\n"
|
||||
<< "[compression]\n"
|
||||
<< enable << "\n";
|
||||
c.loadFromString(str.str());
|
||||
auto env = std::make_shared<jtx::Env>(*this);
|
||||
env->app().config().COMPRESSION = c.COMPRESSION;
|
||||
env->app().config().VP_REDUCE_RELAY_ENABLE =
|
||||
c.VP_REDUCE_RELAY_ENABLE;
|
||||
env->app().config().VP_REDUCE_RELAY_SQUELCH =
|
||||
c.VP_REDUCE_RELAY_SQUELCH;
|
||||
env->app().config().VP_REDUCE_RELAY_BASE_SQUELCH_ENABLE =
|
||||
c.VP_REDUCE_RELAY_BASE_SQUELCH_ENABLE;
|
||||
return env;
|
||||
};
|
||||
auto handshake = [&](int outboundEnable, int inboundEnable) {
|
||||
@@ -496,7 +493,7 @@ public:
|
||||
env->app().config().COMPRESSION,
|
||||
false,
|
||||
env->app().config().TX_REDUCE_RELAY_ENABLE,
|
||||
env->app().config().VP_REDUCE_RELAY_ENABLE);
|
||||
env->app().config().VP_REDUCE_RELAY_BASE_SQUELCH_ENABLE);
|
||||
http_request_type http_request;
|
||||
http_request.version(request.version());
|
||||
http_request.base() = request.base();
|
||||
|
||||
Reference in New Issue
Block a user