mirror of
https://github.com/ZmnSCPxj/clboss.git
synced 2026-08-13 12:33:20 +02:00
Add AskreneUpdates, a standalone module both rebalancers will use to hold the node disables and channel_update overrides they learn from routing failures. askrene never ages these (they carry no timestamp, unlike the inform-channel constraints), so instead of accumulating them in a shared askrene layer they live in two append-only sqlite tables here and are projected, still-fresh, into a private per-request layer for each getroutes. Records arrive as AskreneNodeDisableUpdate / AskreneChannelUpdate. A ReqResp (Request/ResponseAskreneUpdates) returns the distinct nodes disabled within clboss-node-disable-age-secs and the latest override per channel direction within clboss-channel-update-age-secs. Static open_layer/close_layer build and tear down a uuid-named, non-persistent layer from a response (open_layer returns an empty name if askrene is absent, so a caller never names a missing layer). Rows are pruned only at clboss-update-retain-secs (default 30d), so the log survives long enough to mine. Nothing calls the module yet. Also add an AskreneLayer header comment pointing at this store for where the learned node disables and channel_update overrides live.
25 lines
805 B
C++
25 lines
805 B
C++
#ifndef BOSS_MSG_ASKRENENODEDISABLEUPDATE_HPP
|
|
#define BOSS_MSG_ASKRENENODEDISABLEUPDATE_HPP
|
|
|
|
#include"Ln/NodeId.hpp"
|
|
|
|
namespace Boss { namespace Msg {
|
|
|
|
/** struct Boss::Msg::AskreneNodeDisableUpdate
|
|
*
|
|
* @brief a rebalancer learned, from routing-failure feedback, that a
|
|
* whole node should be avoided (a NODE-level failure).
|
|
*
|
|
* @desc recorded by Boss::Mod::AskreneUpdates into its append-only
|
|
* node-disable log. askrene never ages disabled_nodes, so CLBOSS owns
|
|
* their lifetime: they are re-projected into a private per-request layer
|
|
* only while still within clboss-node-disable-age-secs of the last such
|
|
* failure, and pruned from the log at the retention horizon.
|
|
*/
|
|
struct AskreneNodeDisableUpdate {
|
|
Ln::NodeId node;
|
|
};
|
|
|
|
}}
|
|
|
|
#endif /* !defined(BOSS_MSG_ASKRENENODEDISABLEUPDATE_HPP) */
|