Expand description
This crate contains all the Strategies for HOPRd. Strategies are vital for (partial) automation of ticket and HOPR channel operations during node runtime.
- passive strategy
- promiscuous strategy
- auto funding strategy
- auto redeeming strategy
- aggregating strategy
- multiple strategy chains
HOPRd can be configured to use any of the above strategies.
§Configuring strategies in HOPRd
There are two ways of configuring strategies in HOPRd: via CLI and via a YAML config file.
The configuration through CLI allows only fairly primitive single-strategy setting, through the defaultStrategy
parameter. It can be set to any of the above strategies, however, the strategy parameters are not further
configurable via the CLI and will always have their default values.
In addition, if the disableTicketAutoRedeem
CLI argument is false
, the default Auto Redeem strategy is added to the
strategy configured via the defaultStrategy
argument (they execute together as Multi strategy).
For more complex strategy configurations, the YAML configuration method is recommended via the strategy
YAML section.
In this case, the top-most strategy is always assumed to be Multi strategy:
strategy:
on_fail_continue: true
allow_recursive: true
execution_interval: 60
strategies:
- !Promiscuous
max_channels: 50
new_channel_stake: 20
- !AutoFunding
funding_amount: 20
- !Aggregating:
aggregation_threshold: 1000
Modules§
- aggregating
- Aggregating Strategy
- auto_
funding - Auto Funding Strategy
- auto_
redeeming - Auto Redeeming Strategy
- errors
- promiscuous
- Promiscuous Strategy
- strategy
- Multi Strategy
Enums§
- Strategy
- Lists all possible strategies with their respective configurations.
Functions§
- hopr_
default_ strategies - Default HOPR node strategies (in order).
Type Aliases§
- Strategy
Config - An alias for the strategy configuration type.